function create_menu(array $array) { if ($array['security_id'] != 1 && $_SESSION['admin_id'] != 1) { if (isset($array['security_id']) && $array['security_id'] != '') { if (array_key_exists($array['security_id'], $_SESSION['admin_security']) == false || $_SESSION['admin_security'][$array['security_id']] < 1) { return ''; } } } if (isset($array['submenu'])) { usort($array['submenu'], 'sortByOrder'); if (check_permission($array['submenu'])) { echo ' <li><a href="' . $array['link'] . '" ' . $array['params'] . '>' . (isset($array['icon']) ? $array['icon'] . ' ' . $array['text'] : $array['text']) . '</a>' . chr(10); echo ' <ul>' . chr(10); foreach ($array['submenu'] as $menu_item) { create_menu($menu_item); } echo ' </ul>' . chr(10); echo ' </li>' . chr(10); } } else { echo ' <li><a href="' . $array['link'] . '" ' . $array['params'] . '>' . chr(10); if ($array['text'] == TEXT_HOME && ENABLE_ENCRYPTION && strlen($_SESSION['admin_encrypt']) > 0) { echo html_icon('emblems/emblem-readonly.png', TEXT_ENCRYPTION_ENABLED, 'small'); } echo (isset($array['icon']) ? $array['icon'] . ' ' . $array['text'] : $array['text']) . '</a> </li>' . chr(10); } return true; }
function create_form($farray, $menuname) { ?> <form method="get"> <?php create_menu($farray, $menuname); ?> <input type="submit" name="getfeed" value="Get Feed!!"> </form> <?php }
function create_menu(array $arrayItem, $id_parent = 0, $level = 0) { echo str_repeat("", $level), '<ul>', PHP_EOL; foreach ($arrayItem[$id_parent] as $id_item => $item) { echo str_repeat("", $level + 1), '<li class="', $item['class'], '"><a href="', $item['ruta'], '"> <i class="', $item['icono_clase'], '"></i> ', $item['text'], '</a>', PHP_EOL; if (isset($arrayItem[$id_item])) { create_menu($arrayItem, $id_item, $level + 2); } echo str_repeat("", $level + 1), '</li>', PHP_EOL; } echo str_repeat("", $level), '</ul>', PHP_EOL; }
function create_menu($pParentID = 0) { $vSQL = "SELECT * FROM menus \n\t\tWHERE (ParentID={$pParentID}) AND (IFNULL(Visible,0)=1) \n\t\tORDER BY Possition ASC"; $vResult = mysql_query($vSQL); $vOutput = ""; if (mysql_num_rows($vResult) > 0) { $vOutput .= "<ul>\n"; while ($row = mysql_fetch_array($vResult)) { //echo $vSQL; $MenuID = $row["ID"]; $MenuName = $row["MenuName"]; $MenuPath = $row["Path"]; if (checkRole_Menu($MenuID) == true) { $vOutput .= "<li>\n"; $vOutput .= "<a href=\"index.php{$MenuPath}\">{$MenuName}</a>\n"; $vOutput .= create_menu($MenuID); $vOutput .= "</li>\n"; } } $vOutput .= "</ul>\n"; } return $vOutput; }
$orattadeAntal = 0; $sql = "SELECT name_orig,inlamnad,namn FROM uppgifter INNER JOIN kurs ON uppgifter.kurs_id=kurs.id WHERE user_id='{$userId}' AND rattad='0' ORDER BY inlamnad DESC"; $q = mysql_query($sql); if (mysql_num_rows($q) > 0) { while ($r = mysql_fetch_array($q)) { $orattade[] = $r; $orattadeAntal++; } } else { $orattade[] = ""; } $sql = "SELECT uppgifter.id AS id, uppgifter.name_orig AS name, uppgifter.inlamnad AS inlamnad, uppgifter.betyg AS betyg, uppgifter.rattad AS rattad, users.fNamn AS fnamn, users.eNamn AS enamn, kurs.namn AS kursnamn FROM uppgifter RIGHT JOIN kurs ON kurs.id=uppgifter.kurs_id RIGHT JOIN users ON users.id=rattad_av WHERE user_id='{$userId}' AND rattad='1' AND kurs.active='1' ORDER BY uppgifter.inlamnad DESC"; $q = mysql_query($sql); if (mysql_num_rows($q) > 0) { while ($r = mysql_fetch_array($q)) { $rattade[] = $r; $rattadeAntal++; } } else { $rattade[] = ""; } $smarty->assign('orattade', $orattade); $smarty->assign('orattadeAntal', $orattadeAntal); $smarty->assign('rattade', $rattade); $smarty->assign('rattadeAntal', $rattadeAntal); $smarty->assign('message', $message); $smarty->assign('userName', $userName); $smarty->assign('siteMenu', create_menu($userId)); $smarty->assign('title', "SendMe :: Mina resultat"); $smarty->assign('page', "results_student"); $smarty->display('main.tpl');
<h2 class="ui-widget-header header"><span><?php echo TXT_MENU_ADDITIONAL; ?> </span></h2> <div class="ui-widget-content box_content"> <?php // FIX menu admin begin include 'include/menu/static_content/menu_admin_begin.html'; ?> <!-- ###################### --> <?php // Select ConfigClasses $query = 'SELECT * FROM ConfigClasses WHERE nav_privs = "admin" AND nav_visible = "yes" ORDER BY UPPER(grouping), ordering ASC, config_class'; $result = db_handler($query, "array", "Select admin Navigation classes"); // Creates admin menu dynamic create_menu($result); ?> </div> <?php // FIX menu user end include 'include/menu/static_content/menu_admin_end.html'; // FIX administration menu (attributes and classes) include 'include/menu/menu_administration.html';
<h2 class="header"><span>On-call</span></h2> <div class="box_content"> <?php # generate on call menu $oncall_menu = array(); array_push($oncall_menu, array("nav_links" => "Change on-call settings::overview.php?class=contact&xmode=pikett", "friendly_name" => "", "grouping" => "")); array_push($oncall_menu, array("nav_links" => "Generate Nagios config::generate_config.php", "friendly_name" => "", "grouping" => "")); create_menu($oncall_menu); ?> </div>
require_once 'db_functions.php'; ?> <div class="db_form"> <form action="db_insert_data.php" method="post" enctype="multipart/form-data"> <input type="text" name="reference" value=""> reference<br><p></p> <input type="text" name="qty" value=""> qty<br><p></p> <input type="text" name="brand" value=""> brand<br><p></p> <input type="text" name="type" value=""> type<br><p></p> <input type="text" name="model" value=""> model<br><p></p> <input type="text" name="width" value=""> width<br><p></p> <input type="text" name="option" value=""> option<br><p></p> <select id="year" name="year"> <script> var myDate = new Date(); var year = myDate.getFullYear(); for(var i = 1900; i < year+1; i++){ document.write('<option value="'+i+'">'+i+'</option>'); } </script> </select>year<br><p></p> <!-- здесь будет скрипт инпута загрузки нескольких файлов--> <input type="file" min="1" max="20" name="photos[]" multiple="true" /> photo<br><p></p> <input type="submit" value="send"><br><p></p> </form> <?php create_menu("reference"); ?> </div>
<?php session_start(); if (!isset($_SESSION['sendMe']['id'])) { header("Location: index.php"); } require 'config.php'; require 'functions.php'; $userName = $_SESSION['sendMe']['fullName']; $userId = $_SESSION['sendMe']['id']; $menu = create_menu($userId); $message = ""; $_minaKurserAntal = 0; if (isset($_POST['submitAddCourse'])) { $kurs_id = db_clean($_POST['kurs_id']); //$message = $kurs_id; $sql = "SELECT id FROM kurs_user WHERE user_id='" . $_SESSION['sendMe']['id'] . "' AND kurs_id='{$kurs_id}' LIMIT 1"; if (mysql_num_rows(mysql_query($sql)) == 1) { $message = "Du är redan medlem i den kursen."; } else { $sql = "INSERT INTO kurs_user(user_id, kurs_id) VALUES('" . $_SESSION['sendMe']['id'] . "','" . $kurs_id . "')"; mysql_query($sql); $message = "Du lades till i kursen " . db_get_course_name($kurs_id) . " ."; } } // Hämta alla kurser $sql = "SELECT id, namn, skapad_av FROM kurs WHERE active='1' ORDER BY namn"; $q = mysql_query($sql); if (mysql_num_rows($q) > 0) { while ($r = mysql_fetch_array($q)) { $_kurser[] = $r;
<body> <div id="wrapper"> <div id="topmenu"><?php include_once "includes/topmenu.php"; ?> </div> <div id="header"><?php include_once "includes/header.php"; ?> </div> <div id="nav-menu"><?php echo create_menu(); ?> </div> <div><?php include_once "includes/slider.php"; ?> </div> <div class="clear"></div> <div id="main"> <div id="mainleft"><?php include_once "includes/left.php"; ?> </div> <div id="mainright">
$lang['tab_general'] = '主要信息'; $smarty->assign('data', $data); $smarty->assign('wxch_lang', $wxch_lang); $smarty->assign('lang', $lang); $smarty->display('wxch_tj_muli_user.html'); } elseif ($_REQUEST['act'] == 'remove') { $id = $_GET['id']; if (!isset($id)) { sys_msg("非法请求", 0); } $db->query("DELETE FROM wxch_muli_user WHERE id = '{$id}' "); $lnk[] = array('text' => "返回上一页", 'href' => 'wxch-ent.php?act=muli_user'); sys_msg("删除成功", 0, $lnk); } elseif ($_REQUEST['act'] == 'diymen') { $id = $_GET['id']; $ret_msg = create_menu($db, $id); if ($ret_msg->errmsg == 'ok') { sys_msg('设置成功', 0, $link); } else { if ($ret_msg) { print_r($ret_msg); echo '<br>'; echo '请将以上错误内容发送给' . $wxch_lang['kefu']; } else { sys_msg('生成菜单失败,请重新生成一次,如多次仍然不行,请联系:甜心100', 0, $link); } } } elseif ($_REQUEST['act'] == 'query') { if (!empty($_POST['keyword'])) { $keyword = $_POST['keyword']; $filter['page'] = $_POST['page'];
array_urlencode($value); } else { $value = urlencode($value); //echo $value . "<br />"; } } } // 生成自定义菜单按钮 function create_menu($access_token, $menu_array) { array_urlencode($menu_array); //var_dump($menu_array); //json_encode中文会乱码,需要先使用urlencode,然后对json_encode的返回值进行urldecode $menu_json = urldecode(json_encode($menu_array)); //echo $menu_json; $create_menu_url = "https://api.weixin.qq.com/cgi-bin/menu/create?access_token=" . $access_token; $json_result = doCurlPostRequest($create_menu_url, $menu_json); //var_dump($json_result); $json_array = json_decode($json_result); var_dump($json_array); } create_menu($access_token, $menu_array); // 删除自定义菜单按钮 function delete_menu($access_token) { $delete_menu_url = "https://api.weixin.qq.com/cgi-bin/menu/delete"; $get_data_array = array("access_token" => $access_token); $json_result = doCurlGetRquest($delete_menu_url, $get_data_array); var_dump($json_result); } //delete_menu($access_token);
function create_menu($parent, $level_array, $class = null) { $obj =& get_instance(); $has_childs = false; //this prevents printing 'ul' if we don't have subcategories for this category //use global array variable instead of a local variable to lower stack memory requierment foreach ($level_array as $key => $value) { if ($value['parent'] == $parent) { //if this is the first child print '<ul>' if ($has_childs === false) { //don't print '<ul>' multiple times $has_childs = true; echo '<ul ' . ($value['parent'] == $parent ? "class='" . (isset($class) ? $class : "") . "'" : "") . '>'; } ?> <li><a title="" href="<?php echo $value['path'] != "" ? base_url() . $value['path'] : "javascript:;"; ?> "><?php echo $value['name']; ?> </a> <?php create_menu($key, $level_array); //call function again to generate nested list for subcategories belonging to this category echo '</li>'; } } if ($has_childs === true) { echo '</ul>'; } //generate menu starting with parent categories (that have a 0 parent) }
public function set_plugin_options() { if (!current_user_can($this->capability)) { wp_die(__('You do not have sufficient permissions to access this page.')); } echo create_menu(); // error_log(date("Y-m-d H:i:s", time()), 3, "/tmp/log/php/php_errors.log"); // デバッグ(メニューにアクセスしたら記事取得) // $this->get_articles(); }
$menusub = $this->db->get_where('tbl_submenu', array('smenu_id' => $mnids[$i], 'sstatus' => '1'))->result(); foreach ($menusub as $key) { $menusba = array('nama_smenu' => $key->nama_smenu, 'anak' => $key->anak, 'sicon' => $key->sicon, 'parent' => $key->parent, 'link' => $key->slink, 'smenu_id' => $key->smenu_id); array_push($menusbb, $menusba); } } for ($ii = 0; $ii < count($mnidsx) - 1; $ii++) { $menusubx = $this->db->get_where('tbl_submenux', array('smenu_id' => $mnidsx[$ii], 'sstatusx' => '1'))->result(); if (count($menusubx) > 0) { foreach ($menusubx as $key) { $menusbax = array('nama_smenux' => $key->nama_smenux, 'siconx' => $key->siconx, 'parentx' => $key->parentx, 'linkx' => $key->slinkx, 'smenu_idx' => $key->smenu_id); array_push($menusbbx, $menusbax); } } } create_menu($pmenus, $menusbb, $menusbbx, $kelas); } function create_menu($pmenus, $menusbb, $menusbbx, $kelas) { $out = ""; for ($i = 0; $i < count($pmenus); $i++) { if (is_array($pmenus[$i])) { if ($kelas == $pmenus[$i]['kelas']) { $kls = 'class="has-sub active"'; $kk = 'class="sub-menu"'; $kx = 'class="caret pull-right"'; $klsx = 'class="has-sub active"'; } else { $kls = 'class="has-sub"'; $kk = 'class="sub-menu"'; $kx = 'class="caret pull-right"';
$second2 = $_POST['second2']; $value2 = $_POST['value2']; foreach ($second2 as $k => $v) { $sql = "INSERT INTO `wxch_menu` (`menu_type`, `level`, `name`, `value`, `aid`) VALUES ( '{$menu_type2[$k]}', {$level}, '{$second2[$k]}', '{$value2[$k]}', {$aid})"; $db->query($sql); } $aid = 3; $menu_type3 = $_POST['menu_type3']; $second3 = $_POST['second3']; $value3 = $_POST['value3']; foreach ($second2 as $k => $v) { $sql = "INSERT INTO `wxch_menu` (`menu_type`, `level`, `name`, `value`, `aid`) VALUES ( '{$menu_type3[$k]}', {$level}, '{$second3[$k]}', '{$value3[$k]}', {$aid})"; $db->query($sql); } $link[] = array('href' => 'wxch-ent.php?act=menu', 'text' => '微信菜单设置'); $ret_msg = create_menu($db); if ($ret_msg->errmsg == 'ok') { sys_msg('设置成功', 0, $link); } else { if ($ret_msg) { print_r($ret_msg); echo '<br>'; echo '请将以上错误内容发送给' . $wxch_lang['kefu']; } else { echo '生成菜单失败,请重新生成一次,如多次仍然不行,请联系' . $wxch_lang['kefu']; } } } else { $data = array(); $sql = "SELECT * FROM `wxch_menu` WHERE `aid` =0"; $data['first'] = $db->getAll($sql);
<?php include "../header.php"; include "../db.php"; create_menu($_POST['title'], $_POST['link']); echo "Стараница успешно создана!";
foreach ($menusub as $key) { $menusba = array('nama_smenu' => $key->nama_smenu, 'anak' => $key->anak, 'sicon' => $key->sicon, 'parent' => $key->parent, 'link' => $key->slink, 'smenu_id' => $key->smenu_id); array_push($menusbb, $menusba); } } for ($ii = 0; $ii < count($mnidsx) - 1; $ii++) { $this->db->order_by('urut', 'ASC'); $menusubx = $this->db->get_where('tbl_submenux', array('smenu_id' => $mnidsx[$ii], 'sstatusx' => '1'))->result(); if (count($menusubx) > 0) { foreach ($menusubx as $key) { $menusbax = array('nama_smenux' => $key->nama_smenux, 'siconx' => $key->siconx, 'parentx' => $key->parentx, 'linkx' => $key->slinkx, 'smenu_idx' => $key->smenu_id); array_push($menusbbx, $menusbax); } } } create_menu($pmenus, $menusbb, $menusbbx, $kelas, $namamenu); } function create_menu($pmenus, $menusbb, $menusbbx, $kelas, $namamenu) { $out = ""; for ($i = 0; $i < count($pmenus); $i++) { if (is_array($pmenus[$i])) { if ($kelas == $pmenus[$i]['kelas']) { $kls = 'class="has-sub active"'; $kk = 'class="sub-menu"'; $kx = 'class="caret pull-right"'; // $klsx = 'class="has-sub"'; } else { $kls = 'class="has-sub"'; $kk = 'class="sub-menu"'; $kx = 'class="caret pull-right"';
function get_sous_regions_menu() { $items = array(create_menu_item('vins', 'Vins'), create_menu_item('promotions', 'Promotions'), create_menu_item('divers', 'Divers')); $html = create_menu($items); return $html; }
/** * 后台文件初始化,检查是否已登陆,根据权限生成菜单,assign通用信息 * @author 王仁欢 * @date 2015-08-05 * @return void */ function back_base_init() { //是否已登陆 if (!check_admin_login()) { show_system_message('请先登陆', array(array('link' => 'index.php', 'alt' => '登陆'))); exit; } $activeNav = get_active_nav(); $realMenus = create_menu(); if ($activeNav != 'main.php') { $is_main = false; } else { $is_main = true; } global $menus; $menuMark = array(); foreach ($menus as $key => $menu) { if ($activeNav == $menu['url']) { $menuMark['name'] = $realMenus[$menu['parent']]['key']; $menuMark['count'] = $realMenus[$menu['parent']]['count']; break; } } assign('menuMark', $menuMark); assign('is_main', $is_main); assign('activeNav', $activeNav); assign('pageTitle', '三级分销系统-管理后台'); assign('currentAdmin', $_SESSION['name']); //待处理商户数量 global $db; $get_business_exam_count = 'select count(*) from ' . $db->table('business') . ' where status = 1'; $business_exam_count = $db->fetchOne($get_business_exam_count); $get_business_auth_count = 'select count(*) from ' . $db->table('auth') . ' where status = 0'; $business_auth_count = $db->fetchOne($get_business_auth_count); $business_deal_count = $business_auth_count + $business_exam_count; assign('business_deal_count', $business_deal_count); //待处理产品数量 $get_product_exam_count = 'select count(*) from ' . $db->table('product') . ' where status = 2'; $product_exam_count = $db->fetchOne($get_product_exam_count); assign('product_exam_count', $product_exam_count); //待处理提现 $get_member_withdraw_deal_count = 'select count(*) from' . $db->table('withdraw') . ' where status = 0'; $member_withdraw_deal_count = $db->fetchOne($get_member_withdraw_deal_count); $get_business_withdraw_deal_count = 'select count(*) from' . $db->table('business_withdraw') . ' where status = 0'; $business_withdraw_deal_count = $db->fetchOne($get_business_withdraw_deal_count); $withdraw_deal_count = $member_withdraw_deal_count + $business_withdraw_deal_count; //待处理充值 $get_recharge_deal_count = 'select count(*) from ' . $db->table('recharge') . ' where status = 2 and `type` = 1'; $recharge_deal_count = $db->fetchOne($get_recharge_deal_count); $finance_count = $withdraw_deal_count + $recharge_deal_count; assign('member_withdraw_count', $member_withdraw_deal_count); assign('business_withdraw_count', $business_withdraw_deal_count); assign('withdraw_deal_count', $withdraw_deal_count); assign('recharge_deal_count', $recharge_deal_count); assign('finance_count', $finance_count); }
<?php if ($pFaq) { ?> <li <?php create_menu('faq'); ?> ><a href="faq.php"><i class="fa fa-question-circle"></i><span>FAQ</span></a></li> <?php } ?> <?php if ($pPresenze) { ?> <li <?php create_menu('presenze'); ?> ><a href="presenze.php"><i class="fa fa-line-chart"></i><span>Registro Presenze</span></a></li> <?php } ?> </ul><!-- /.sidebar-menu --> </section> <!-- /.sidebar --> </aside> <?php # attribuisce la classe "active" alla voce del menu # $treeview = 1, indica che la voce nell'elenco puntato contiene delle sottovoci function create_menu($page_menu, $treeview = 0)
echo '</div>'; echo '</div>'; } else { echo '<div class="menu-section">'; echo '<span class="row-move"><i class="fa fa-bars"></i></span>'; echo '<div class="spmenu sp-row">'; $columnNumber = 12 / $count; foreach ($item_array as $key => $item_array) { echo '<div class="column sp-col-md-' . $columnNumber . '" data-column="' . $columnNumber . '">'; echo '<div class="column-items-wrap">'; foreach ($item_array as $key => $item) { $id = $item[0]; echo '<h4 data-current_child="' . $id . '" >' . $menuItems->getItem($id)->title . '</h4>'; if ($item[1]) { echo '<ul class="child-menu-items">'; echo create_menu($id); echo '</ul>'; } } echo '<div class="modules-container"></div>'; echo '</div>'; echo '</div>'; } echo '</div>'; echo '</div>'; } } ?> </div> </div>
function init_page() { create_menu(); register_setting('suburb-generator-settings', 'suburb_template'); register_setting('suburb-generator-settings', 'title_template'); }
/** * 后台文件初始化,检查是否已登陆,根据权限生成菜单,assign通用信息 * @author 王仁欢 * @date 2015-08-05 * @return void */ function back_base_init() { global $config; //是否已登陆 if (!check_admin_login()) { show_system_message('请先登陆', array(array('link' => 'index.php', 'alt' => '登陆'))); exit; } $activeNav = get_active_nav(); $realMenus = create_menu(); if ($activeNav != 'main.php') { $is_main = false; } else { $is_main = true; } global $menus; $menuMark = array(); foreach ($menus as $key => $menu) { if ($activeNav == $menu['url']) { $menuMark['name'] = $realMenus[$menu['parent']]['key']; $menuMark['count'] = $realMenus[$menu['parent']]['count']; break; } } assign('menu_mark', $menuMark); assign('is_main', $is_main); assign('active_nav', $activeNav); assign('pageTitle', $config['site_name'] . '-管理后台'); assign('currentAdmin', $_SESSION['name']); }
function Header_body_menu() { global $sLanguage, $bDefectiveBrowser, $bExportCSV, $sMetaRefresh, $bToolTipsOn, $iNavMethod, $bRegistered, $sHeader, $sGlobalMessage; global $MenuFirst, $sPageTitle, $sRootPath; $MenuFirst = 1; if ($bDefectiveBrowser) { echo "<script language=\"javascript\" src=\"" . $sRootPath . "/Include/domMenu-IE.js\" type=\"text/javascript\"></script>"; } else { echo "<script language=\"javascript\" src=\"" . $sRootPath . "/Include/domMenu.js\" type=\"text/javascript\"></script>"; } ?> <script language="javascript" type="text/javascript"> // ChurchInfo Menu Bar Items: <?php create_menu("root"); ?> </script> <?php if (!$bDefectiveBrowser) { echo "<div style=\"position:fixed; top:0; left:0; width: 100%;\">"; } if ($sHeader) { // Optional Header Code (Entered on General Settings page - sHeader) // Must first set a table with a background color, or content scrolls across // the background of the custom code when using a non-defective browser echo "<table width=100% bgcolor=white cellpadding=0 cellspacing=0 border=0><tr><td width=100%>"; echo html_entity_decode($sHeader, ENT_QUOTES); echo "</td></tr></table>"; } if (strlen($_SESSION['iUserID'])) { ?> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td colspan="7" width="100%"> <div class="p" id="domMenu_BJ" style="height:20px; margin-bottom:0px;"></div> <script language="javascript" type="text/javascript"> domMenu_activate('domMenu_BJ'); </script> </td> </tr> <tr> <td class="Search"> </td> <td class="Search" width="50%"> <form name="SelectFilter" method="get" action="<?php echo $sRootPath . "/"; ?> SelectList.php"> <input class="menuButton" style="font-size: 8pt; margin-top: 5px;" type="text" name="Filter" id="SearchText" <?php echo 'value="' . gettext("Search") . '"'; ?> onfocus="ClearFieldOnce(this);"> <input name="mode" type="radio" value="person" <?php if (!$_SESSION['bSearchFamily']) { echo "checked"; } ?> ><?php echo gettext("Person"); ?> <input type="radio" name="mode" value="family" <?php if ($_SESSION['bSearchFamily']) { echo "checked"; } ?> ><?php echo gettext("Family"); ?> </form> </td> <td class="Search" align="center"> <?php if ($_SESSION['bFinance']) { echo gettext("Current deposit slip") . ": " . $_SESSION['iCurrentDeposit']; } ?> </td> <td class="Search" align="right"> <?php echo gettext("Items in Cart") . ": " . count($_SESSION['aPeopleCart']); ?> </td> <td class="Search"> </td> <td class="Search" align="right"> <?php echo gettext("User:"******" " . $_SESSION['UserFirstName'] . " " . $_SESSION['UserLastName']; ?> </td> <td class="Search"> </td> </tr> </table> <?php } if (!$bDefectiveBrowser) { echo "</div>"; if ($sHeader) { // Optional Header Code (Entered on General Settings page - sHeader) // Must first set a table with a background color, or content scrolls across // the background of the custom code when using a non-defective browser echo " <table width=100% bgcolor=white cellpadding=0 cellspacing=0 border=0>\n <tr><td width=100%>"; echo html_entity_decode($sHeader, ENT_QUOTES); echo "</td></tr></table>"; } echo "<BR><BR><BR>"; } ?> <table width="100%" border="0" cellpadding="5" cellspacing="0" align="left"> <tr> <td valign="top" width="100%" align="center"> <table width="95%" border="0"> <tr> <td valign="top"> <br> <p class="PageTitle"><?php echo $sPageTitle; ?> </p> <p align="center" style="color: red; font-weight: bold;"><?php $sGlobalMessage; ?> </p> <?php }
# Create oncall link, if $ONCALL_GROUPS is defined if (!empty($ONCALL_GROUPS)) { array_push($user_menu_begin2, array("nav_links" => "Change on-call settings::overview.php?class=contact&xmode=pikett", "friendly_name" => "", "grouping" => "")); } # Generate Nagios config link array_push($user_menu_begin2, array("nav_links" => "Generate Nagios config::generate_config.php", "friendly_name" => "", "grouping" => "")); # create output create_menu($user_menu_begin2); ### # user navigation links of classes # Select ConfigClasses $query = 'SELECT grouping, nav_links, friendly_name FROM ConfigClasses WHERE nav_privs = "user" AND nav_visible = "yes" ORDER BY UPPER(grouping), ordering ASC, config_class'; $user_menu_end = db_handler($query, "array", "Select user Navigation classes"); /* -> this seems to be not needed anymore, it makes not correct ordering in the menu # sorts a multidimensional array (grouping) # because of manual added entries like "generate nagios config" $tmp = Array(); foreach($user_menu_end as &$ma){ $tmp[] = &$ma["grouping"]; } NConf_DEBUG::set($tmp, 'DEBUG', 'temporary'); NConf_DEBUG::set($user_menu_end, 'DEBUG', 'user_menu_end'); array_multisort($tmp, $user_menu_end); */ NConf_DEBUG::set($user_menu_end, 'DEBUG', 'Create menu user'); # Display menu create_menu($user_menu_end); echo '</div>'; // FIX menu user end //include('include/menu/static_content/menu_user_end.php'); include 'include/menu/static_content/menu_user_end.html';
function compile($tpl_file = "", $username_i = true) { $CI =& get_instance(); $CI->config->load("rf_settings"); $CI->load->helper("number"); $title = config("office_name", "rf_settings") . " - "; if (isset($CI->data['title'])) { $title .= $CI->data['title']; } get_license(); if (isset($CI->data['menu'])) { $CI->data['menu'] .= create_menu(); } else { $CI->data['menu'] = create_menu(); } $expire = $CI->data['licexpire'] == "0" ? lang("offunlimlic") : timespan(time(), time() + $CI->data['licexpire']); $license = br(1) . lang("off_license") . $CI->data['licname'] . lang("off_expire") . $expire; $CI->data['title'] = $title; $CI->data['site'] = base_url(); $CI->data['tpl'] = base_url() . APPPATH . "views/" . $CI->config->item("theme"); $CI->data['lang'] = anchor("/main_index/lang/english", icon("english.png", "Select English lang")) . anchor("/main_index/lang/russian", icon("russia.png", "Select Russian lang")); $CI->data['username'] = construct_login($username_i); $CI->data['copyright'] = icon("F.logo25.png") . anchor("http://www.fdcore.ru/", "Freelance Developer Center 2007-" . date("Y")) . $license . '<br>'; if ($tpl_file == "") { $tpl_file = $CI->config->item("theme") . "/main"; } if (strpos($CI->load->view($tpl_file, "", true), "{copyright}") == 0) { exit("Ќужно указать тег копирайтов в шаблоне!"); } $CI->parser->parse($tpl_file, $CI->data); echo "<!-- RF CI CORE http://www.fdcore.ru Copyright (c) 2008-2009, FDCore Studio. All rights reserved. -->\r\n"; }