1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36:
<?php
if (!function_exists('writeHeader')) {
function writeHeader($str, $level = 1) {
$levels = array(
1 => '=',
2 => '=',
3 => '-',
4 => '^',
5 => '~'
);
$count = strlen($str);
$char = isset($levels[$level])?$levels[$level]:"'";
if ($level == 1) {
for ($i = 0; $i < $count; $i++) {
echo $char;
}
}
echo "\n$str\n";
for ($i = 0; $i < $count; $i++) {
echo $char;
}
echo "\n";
}
}
writeHeader($view['title'],$view['titleLevel']);
echo "\n";
echo $view['description'];
echo "\n\n";
foreach ($view['fields'] as $field) {
echo $field['label'];
echo "\n";
echo " ".$T('Describe *${0}* here..', array($field['label']));
echo "\n\n";
}