bebeboutik/modules/ant_alert/AdminAntAlert.php
2016-03-29 17:38:35 +02:00

38 lines
1.9 KiB
PHP

<?php
class AdminAntAlert extends AdminTab {
public function postProcess() {
if(($limit = Tools::getValue('ant_alert_limit')) !== FALSE) {
Configuration::updateValue('ANT_ALTER_LIMIT', (int) $limit);
}
if($hours = Tools::getValue('ant_alert_hours')) {
Configuration::updateValue('ANT_ALTER_HOURS', (int) $hours);
}
}
public function display() {
global $cookie;
echo '
<form action="'.$_SERVER['REQUEST_URI'].'" method="post">
<fieldset>
<legend><img src="../img/admin/AdminTools.gif" alt="" />'.$this->l('Configuration Alert').'</legend>
<p>'.$this->l('Last send : ').Configuration::get('ANT_ALTER_DATESEND').'<p>
<div style="overflow: auto;">
<label style="font-weight:normal; padding-top: 1px; width: 250px">'.$this->l('Limit (mail number before sending alert)').'</label>
<div class="margin-form">
<input value="'. Configuration::get('ANT_ALTER_LIMIT') .'" type="text" size="120" name="ant_alert_limit">
</div>
</div>
<div style="overflow: auto;">
<label style="font-weight:normal; padding-top: 1px; width: 250px">'.$this->l('Time (in hours, ex: by 24h)').'</label>
<div class="margin-form">
<input value="'. Configuration::get('ANT_ALTER_HOURS') .'" type="text" size="120" name="ant_alert_hours">
</div>
</div>
<div class="margin-form">
<input value="'. $this->l('Sauvegarder') .'" type="submit" name="saveAntAlert" class="button">
</div>
</fieldset>
</form>
<br class="clear" />';
}
}