first commit
This commit is contained in:
28
admin/class/class.Menu.php
Normal file
28
admin/class/class.Menu.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
class Menu extends Frame
|
||||
{
|
||||
public function getTemplate()
|
||||
{
|
||||
if (!($template = $this->template)) {
|
||||
$template = './menu/'.getVal('type').'.tpl';
|
||||
}
|
||||
|
||||
if ($this->smarty->templateExists($template)) {
|
||||
return $template;
|
||||
}
|
||||
|
||||
return './menu.tpl';
|
||||
}
|
||||
|
||||
public function get_vars()
|
||||
{
|
||||
$vars = parent::get_vars();
|
||||
|
||||
return array_merge($vars, [
|
||||
'dateToday' => date('Y-m-d'),
|
||||
'dateFrom' => date('Y-m-d', time() - (14 * 86400)),
|
||||
'type' => getVal('type'),
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user