Ejemplo n.º 1
0
 function calendar($name = '', $date = '')
 {
     calendar_include_stuff();
     if ($date == '') {
         $date = date('Y-m-d');
     }
     tplp('back/calendar', array('name' => $name, 'date' => $date));
     add_body_handler('onload', 'calendar_Init', array('"' . $name . '"'));
 }
Ejemplo n.º 2
0
 function contents_builtin()
 {
     global $contents_builtin_Included, $CORE;
     if ($contents_builtin_Included) {
         return;
     }
     $CORE->AddStyle('contents');
     tplp('back/stencil/contents_script');
     $contents_builtin_Included = true;
 }
Ejemplo n.º 3
0
 function stencil_render()
 {
     $body = stencil_get('boby');
     if ($body) {
         $stencil_body = eval_code($body);
     } else {
         $stencil_body = stencil_get('stencil_body');
     }
     tplp('stencil/' . stencil_get('stencil_template'), array('body' => $stencil_body));
 }
Ejemplo n.º 4
0
 function iframe_include_stuff()
 {
     global $iframe_stuff_included, $CORE;
     if ($iframe_stuff_included) {
         return;
     }
     $CORE->AddStyle('iframe');
     include 'scripts.js';
     tplp('back/iframe/scripts');
     $iframe_stuff_included = true;
 }
Ejemplo n.º 5
0
 function DrawEditorForm($name, $formname = '', $init = true)
 {
     global $CORE;
     $CORE->AddStyle('time');
     tplp('back/timepicker', array('name' => $formname . '_' . $name, 'value' => $this->GetValue()));
 }
Ejemplo n.º 6
0
 function tpl_linkage($dir, $vars = array())
 {
     global $DOCUMENT_ROOT, $tpl_stack;
     if ($dir[0] == '.') {
         $_dir = $tpl_stack[$tpl_stack['count'] - 1];
         $dir = preg_replace('/^\\./', '', $dir);
         $dir = $_dir . $dir;
     }
     $relative = $dir;
     $dir = '/inc/templates/' . $dir;
     $arr = dir_listing($dir);
     for ($i = 0; $i < count($arr); $i++) {
         tplp($relative . '/' . $arr[$i], $vars);
     }
 }
Ejemplo n.º 7
0
 function check_locked()
 {
     global $login, $passwd;
     if (!opt_get('site_lock')) {
         return false;
     }
     if ($login != '') {
         user_authorize($login, $passwd);
     }
     if (user_access_root()) {
         return false;
     }
     tplp('common/site_lock');
     return true;
 }