'.$template['name'].'';
echo ''.__('Type').': '.get_alert_templates_type_name ($template['type']).'
';
switch ($template['type']) {
case 'regex':
case 'equal':
case 'not_equal':
echo ''.__('Value').': ';
if (empty ($template['value']))
echo ''.__('Empty').'';
else
echo ''.$template['value'].'
';
echo '
';
break;
case 'max':
case 'max_min':
echo ''.__('Max. Value').': ';
echo format_numeric ($template['max_value']);
echo '
';
/* Break on max to not show min */
if ($template['type'] == 'max')
break;
case 'min':
echo ''.__('Min. Value').': ';
echo format_numeric ($template['min_value']);
echo '
';
}
if ($template['description'] != '') {
echo ''.__('Description').':
';
echo $template['description'];
echo '
';
}
if ($template['monday'] && $template['tuesday']
&& $template['wednesday'] && $template['thursday']
&& $template['friday'] && $template['saturday']
&& $template['sunday']) {
/* Everyday */
echo ''.__('Everyday').'
';
} else {
$days = array ('monday' => __('Monday'),
'tuesday' => __('Tuesday'),
'wednesday' => __('Wednesday'),
'thursday' => __('Thursday'),
'friday' => __('Friday'),
'saturday' => __('Saturday'),
'sunday' => __('Sunday'));
echo ''.__('Days').': '.__('Every').' ';
$actives = array ();
foreach ($days as $day => $name) {
if ($template[$day])
array_push ($actives, $name);
}
$last = array_pop ($actives);
if (count ($actives)) {
echo implode (', ', $actives);
echo ' '.__('and').' ';
}
echo $last;
}
echo '
';
if ($template['time_from'] != $template['time_to']) {
echo ''.__('From').' ';
echo $template['time_from'];
echo ' '.__('to').' ';
echo $template['time_to'];
echo '
';
}
return;
}
return;
}
echo '