bebeboutik/modules/privatesales_countdown/AdminPrivateSalesCountdown.php
Srv Bebeboutik 6c0978166c add modules
2016-01-04 12:49:26 +01:00

34 lines
1.8 KiB
PHP
Executable File

<?php
include_once(_PS_ROOT_DIR_.'/modules/privatesales/Sale.php');
class AdminPrivateSalesCountdown extends AdminTab {
public function __construct() {
$this->lang = TRUE;
parent::__construct();
}
public function display() {
echo '<form method="post" action="'.$_SERVER['REQUEST_URI'].'">
<fieldset>
<legend><img src="../img/admin/tab-tools.gif" alt="" />'.$this->l('Countdown Configuration').'</legend>
<div style="overflow: auto;">
<label style="padding-top: 1px;">'.$this->l('Countdown format:').'</label>
<div class="margin-form">
<input type="text" value="'.Configuration::get('PRIVATESALES_COUNTDOWNFMT').'" name="countdown_format" style="width: 320px;" /><sup> *</sup>
<p>'.$this->l('{desc} for the description, {sep} for the time separator, {pv} where p is y for years, o for months, w for weeks, d for days, h for hours, m for minutes, or s for seconds and v is n for the period value, nn for the period value with a minimum of two digits, nnn for a minimum of three digits, or l for the period label (long or short form depending on the compact setting), or {pd} where p is as above and d is 1 for the units digit, 10 for the tens digit, 100 for the hundreds digit, or 1000 for the thousands digit. If you need to exclude entire sections when the period value is zero and you have specified the period as optional, surround these sections with {p<} and {p>}, where p is the same as above.').'</p>
</div>
</div>
<div class="margin-form">
<input type="submit" class="button" name="submitUpdate" value="'.$this->l('Update settings').'" />
</div>
</fieldset>
</form>';
}
function postProcess() {
if($countdown_format = Tools::getValue('countdown_format')) {
Configuration::updateValue('PRIVATESALES_COUNTDOWNFMT', htmlentities($countdown_format));
}
}
}