case 'security':
     $admin =& $backend;
     require_once CAT_PATH . '/framework/CAT/Helper/Captcha/WB/captcha.php';
     $captcha = getCaptchaTypes($backend);
     $tpl_data = array_merge($tpl_data, $captcha);
     $tpl_data['useable_captchas'] = $useable_captchas;
     $tpl_data['ttf_image'] = CAT_URL . '/framework/CAT/Helper/Captcha/WB/captchas/ttf_image.png';
     $tpl_data['calc_image'] = CAT_URL . '/framework/CAT/Helper/Captcha/WB/captchas/calc_image.png';
     $tpl_data['calc_ttf_image'] = CAT_URL . '/framework/CAT/Helper/Captcha/WB/captchas/calc_ttf_image.png';
     $tpl_data['old_image'] = CAT_URL . '/framework/CAT/Helper/Captcha/WB/captchas/old_image.png';
     $tpl_data['calc_text'] = CAT_URL . '/framework/CAT/Helper/Captcha/WB/captchas/calc_text.png';
     $tpl_data['text'] = CAT_URL . '/framework/CAT/Helper/Captcha/WB/captchas/text.png';
     break;
 case 'sysinfo':
     // format installation date and time
     $tpl_data['values']['installation_time'] = CAT_Helper_DateTime::getDateTime(INSTALLATION_TIME);
     // get page statistics
     $pg = CAT_Helper_Page::getPagesByVisibility();
     foreach (array_keys($pg) as $key) {
         $tpl_data['values']['pages_count'][] = array('visibility' => $key, 'count' => count($pg[$key]));
     }
     break;
 case 'headers':
     $files = CAT_Helper_Page::getExtraHeaderFiles(0);
     $tpl_data['use_core'] = isset($files['use_core']) ? $files['use_core'] : NULL;
     $tpl_data['use_ui'] = isset($files['use_ui']) ? $files['use_ui'] : NULL;
     $tpl_data['page_js'] = isset($files['js']) ? $files['js'] : '';
     $tpl_data['page_css'] = isset($files['css']) ? $files['css'] : '';
     $tpl_data['jquery_plugins'] = CAT_Helper_Directory::getInstance()->maxRecursionDepth(0)->scanDirectory(CAT_PATH . '/modules/lib_jquery/plugins', false, false, CAT_PATH . '/modules/lib_jquery/plugins/');
     $tpl_data['js_files'] = CAT_Helper_Directory::getInstance()->maxRecursionDepth(5)->setSuffixFilter(array('js'))->scanDirectory(CAT_PATH . '/modules/lib_jquery/plugins', true, true, CAT_PATH . '/modules/lib_jquery/plugins');
     $tpl_data['css_files'] = CAT_Helper_Directory::getInstance()->maxRecursionDepth(5)->setSuffixFilter(array('css'))->scanDirectory(CAT_PATH . '/modules/lib_jquery/plugins', true, true, CAT_PATH . '/modules/lib_jquery/plugins');
Beispiel #2
0
 /**
  * prints the top of the backend page
  *
  * @access public
  * @return void
  **/
 public static function print_banner()
 {
     global $page_id, $parser;
     $results_array = CAT_Helper_Page::properties($page_id);
     $user = CAT_Users::get_user_details($results_array['modified_by']);
     $tpl_data = array();
     foreach ($results_array as $key => $value) {
         $tpl_data[strtoupper($key)] = $value;
     }
     $tpl_data['MODIFIED_BY'] = $user['display_name'];
     $tpl_data['MODIFIED_BY_USERNAME'] = $user['username'];
     $tpl_data['MODIFIED_WHEN'] = $results_array['modified_when'] != 0 ? $modified_ts = CAT_Helper_DateTime::getDateTime($results_array['modified_when']) : false;
     $tpl_data['PAGE_HEADER'] = self::getInstance('')->lang()->translate('Modify page');
     $tpl_data['CUR_TAB'] = 'modify';
     $tpl_data['PAGE_LINK'] = CAT_Helper_Page::getLink($results_array['page_id']);
     $parser->output('backend_pages_header', $tpl_data);
     $parser->output('backend_pages_banner', $tpl_data);
 }
Beispiel #3
0
 $tpl_data['blocks'][$bcnt]['current_block_id'] = $section['block'];
 $tpl_data['blocks'][$bcnt]['current_block_name'] = $parser->get_template_block_name($current_template, $section['block']) . ' (' . $backend->lang()->translate('Block number') . ': ' . $section['block'] . ')';
 $tpl_data['blocks'][$bcnt]['section_id'] = $section['section_id'];
 $tpl_data['blocks'][$bcnt]['module'] = $section['module'];
 $tpl_data['blocks'][$bcnt]['name'] = $section['name'];
 $tpl_data['blocks'][$bcnt]['date_day_from'] = $section['publ_start'] > 0 ? date('d', $section['publ_start']) : '';
 $tpl_data['blocks'][$bcnt]['date_month_from'] = $section['publ_start'] > 0 ? date('m', $section['publ_start']) : '';
 $tpl_data['blocks'][$bcnt]['date_year_from'] = $section['publ_start'] > 0 ? date('Y', $section['publ_start']) : '';
 $tpl_data['blocks'][$bcnt]['date_hour_from'] = $section['publ_start'] > 0 ? date('H', $section['publ_start']) : '';
 $tpl_data['blocks'][$bcnt]['date_minute_from'] = $section['publ_start'] > 0 ? date('i', $section['publ_start']) : '';
 $tpl_data['blocks'][$bcnt]['date_day_to'] = $section['publ_start'] > 0 ? date('d', $section['publ_end']) : '';
 $tpl_data['blocks'][$bcnt]['date_month_to'] = $section['publ_start'] > 0 ? date('m', $section['publ_end']) : '';
 $tpl_data['blocks'][$bcnt]['date_year_to'] = $section['publ_start'] > 0 ? date('Y', $section['publ_end']) : '';
 $tpl_data['blocks'][$bcnt]['date_hour_to'] = $section['publ_start'] > 0 ? date('H', $section['publ_end']) : '';
 $tpl_data['blocks'][$bcnt]['date_minute_to'] = $section['publ_start'] > 0 ? date('i', $section['publ_end']) : '';
 $tpl_data['blocks'][$bcnt]['modified_when'] = $section['modified_when'] ? CAT_Helper_DateTime::getDateTime($section['modified_when']) : '';
 $tpl_data['blocks'][$bcnt]['modified_by'] = $section['modified_by'] ? (CAT_Users::get_user_details($section['modified_by'], 'display_name') ? CAT_Users::get_user_details($section['modified_by'], 'display_name') : '') . ' (' . CAT_Users::get_user_details($section['modified_by'], 'username') . ')' : '';
 // load language file (if any)
 $langfile = CAT_Helper_Directory::sanitizePath(CAT_PATH . '/modules/' . $module . '/languages/' . LANGUAGE . '.php');
 if (file_exists($langfile)) {
     if (!$backend->lang()->checkFile($langfile, 'LANG', true)) {
         // old fashioned language file
         include $langfile;
     } else {
         // modern language file
         $backend->lang()->addFile(LANGUAGE . '.php', CAT_Helper_Directory::sanitizePath(CAT_PATH . '/modules/' . $module . '/languages'));
     }
 }
 // ======================================================
 // ! Include the module and add it to the output buffer
 // ======================================================
Beispiel #4
0
}
$backend = CAT_Backend::getInstance('Pages', 'pages_settings');
$page = CAT_Helper_Page::getPage($page_id);
$user = CAT_Users::get_user_details($page['modified_by']);
$files = CAT_Helper_Page::getExtraHeaderFiles($page_id);
// ==================================
// ! Add globals to the template data
// ==================================
$tpl_data['CUR_TAB'] = 'headers';
$tpl_data['PAGE_HEADER'] = $backend->lang()->translate('Modify header files');
$tpl_data['PAGE_ID'] = $page_id;
$tpl_data['PAGE_LINK'] = CAT_Helper_Page::getLink($page['link']);
$tpl_data['PAGE_TITLE'] = $page['page_title'];
$tpl_data['MODIFIED_BY'] = $user['display_name'];
$tpl_data['MODIFIED_BY_USERNAME'] = $user['username'];
$tpl_data['MODIFIED_WHEN'] = $page['modified_when'] != 0 ? CAT_Helper_DateTime::getDateTime($page['modified_when']) : false;
$tpl_data['page_js'] = isset($files['js']) ? $files['js'] : '';
$tpl_data['page_css'] = isset($files['css']) ? $files['css'] : '';
$tpl_data['use_core'] = isset($files['use_core']) ? $files['use_core'] : NULL;
$tpl_data['use_ui'] = isset($files['use_ui']) ? $files['use_ui'] : NULL;
$tpl_data['jquery_plugins'] = CAT_Helper_Directory::getInstance()->maxRecursionDepth(0)->scanDirectory(CAT_PATH . '/modules/lib_jquery/plugins', false, false, CAT_PATH . '/modules/lib_jquery/plugins/');
$tpl_data['js_files'] = CAT_Helper_Directory::getInstance()->maxRecursionDepth(5)->setSuffixFilter(array('js'))->scanDirectory(CAT_PATH . '/modules/lib_jquery/plugins', true, true, CAT_PATH . '/modules/lib_jquery/plugins');
$tpl_data['css_files'] = CAT_Helper_Directory::getInstance()->maxRecursionDepth(5)->setSuffixFilter(array('css'))->scanDirectory(CAT_PATH . '/modules/lib_jquery/plugins', true, true, CAT_PATH . '/modules/lib_jquery/plugins');
$backend->print_header();
// ====================
// ! Parse output tpl
// ====================
$parser->output('backend_pages_headerfiles', $tpl_data);
// ======================
// ! Print admin footer
// ======================