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'); break; }
/** * **/ function getPagesList($fieldname, $selected, $add_empty = false) { $pages_list = CAT_Helper_Page::getPages(CAT_Backend::isBackend()); $deleted = CAT_Helper_Page::getPagesByVisibility('deleted'); if (count($deleted)) { $arrh = CAT_Helper_Array::getInstance(); foreach ($deleted as $page) { $arrh->ArrayRemove($page, $pages_list, 'page_id'); } } if ($add_empty) { array_unshift($pages_list, array('page_id' => 0, 'parent' => 0, 'level' => 0, 'is_open' => false, 'menu_title' => CAT_Helper_Page::getInstance()->lang()->translate('[none (use internal)]'))); } return CAT_Helper_ListBuilder::getInstance(true)->config(array('space' => '|-- '))->dropdown($fieldname, $pages_list, 0, $selected); }
} } // =========== // ! get pages // =========== $pages_list = CAT_Helper_Page::getPages(CAT_Backend::isBackend()); // skip current page $arrh->ArrayRemove($page_id, $pages_list, 'page_id'); // skip already linked pages if (is_array($items) && count($items)) { foreach ($items as $item) { $arrh->ArrayRemove($item['link_page_id'], $pages_list, 'page_id'); } } // skip deleted pages $deleted = CAT_Helper_Page::getPagesByVisibility('deleted'); foreach ($deleted as $item) { $arrh->ArrayRemove($item['page_id'], $pages_list, 'page_id'); } // ========================================================= // ! Get display name of person who last modified the page // ========================================================= $user = $users->get_user_details($page['modified_by']); // ============================================= // ! Add result_array to the template variable // ============================================= $tpl_data['CUR_TAB'] = 'lang'; $tpl_data['PAGE_HEADER'] = $backend->lang()->translate('Modify language mappings'); $tpl_data['PAGE_ID'] = $page_id; $tpl_data['PAGE_LINK'] = CAT_Helper_Page::getLink($page['link']); $tpl_data['PAGE_TITLE'] = $page['page_title'];