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 . '"')); }
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; }
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)); }
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; }
function DrawEditorForm($name, $formname = '', $init = true) { global $CORE; $CORE->AddStyle('time'); tplp('back/timepicker', array('name' => $formname . '_' . $name, 'value' => $this->GetValue())); }
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); } }
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; }