function categories() { $page = CurrentPageName(); $tpl = new templates(); $array_cats = categories_list(); $html = "\n\t<table style='width:100%'>\n\t<td class=legend>{category}:</td>\n\t<td>" . Field_array_Hash($array_cats, "AR_CAT", null, "CatSearch()", null, 0, "font-size:13px;padding:3px") . "</td>\n\t</tr>\n\t<td class=legend>{search}:</td>\n\t<td>" . Field_text("AR_CAT_SE", null, "font-size:13px;padding:3px;width:220px", null, null, null, false, "CatSearchCheck(event)") . "</td>\n\t</tr>\n\t</table>\n\t\t\n\t<div style='margin:5px;padding:5px;height:350px;overflow:auto' id='AR_CAT_LIST'></div>\n\t\n\t<script>\n\t\tfunction CatSearch(){\n\t\t\tvar cat=escape(document.getElementById('AR_CAT').value);\n\t\t\tvar search=escape(document.getElementById('AR_CAT_SE').value);\n\t\t\tLoadAjax('AR_CAT_LIST','{$page}?cat-search=yes&category='+cat+'&search='+search);\n\t\t}\n\t\t\n\t\tfunction CatSearchCheck(e){\n\t\t\tif(checkEnter(e)){CatSearch();}\n\t\t}\n\t\t\n\t\t\n\tvar x_DansGuardianCommunityDeletePattern= function (obj) {\n\t\t\t\tvar results=obj.responseText;\n\t\t\t\tif(results.length>0){alert(results);}\n\t\t\t\tCatSearch();\n\t\t\t}\n\t\t\n\t\tfunction DansGuardianCommunityDeletePattern(category,pattern){\n\t\t\tvar XHR = new XHRConnection();\n\t\t\tXHR.appendData('delete-cat-pattern','yes');\n\t\t\tXHR.appendData('category',category);\n\t\t\tXHR.appendData('pattern',pattern);\n\t\t\tAnimateDiv('AR_CAT_LIST');\n\t\t\tXHR.sendAndLoad('{$page}', 'POST',x_DansGuardianCommunityDeletePattern);\n\t\t\n\t\t}\n\t\t\n\t\t\n\t\n\tCatSearch();\n\t</script>"; echo $tpl->_ENGINE_parse_body($html); }
function categories(){ $page=CurrentPageName(); $tpl=new templates(); $array_cats=categories_list(); $html=" <table style='width:100%'> <td class=legend>{category}:</td> <td>". Field_array_Hash($array_cats,"AR_CAT",null,"CatSearch()",null,0,"font-size:13px;padding:3px")."</td> </tr> <td class=legend>{search}:</td> <td>". Field_text("AR_CAT_SE",null,"font-size:13px;padding:3px;width:220px",null,null,null,false,"CatSearchCheck(event)")."</td> </tr> </table> <div style='margin:5px;padding:5px;height:350px;overflow:auto' id='AR_CAT_LIST'></div> <script> function CatSearch(){ var cat=escape(document.getElementById('AR_CAT').value); var search=escape(document.getElementById('AR_CAT_SE').value); LoadAjax('AR_CAT_LIST','$page?cat-search=yes&category='+cat+'&search='+search); } function CatSearchCheck(e){ if(checkEnter(e)){CatSearch();} } CatSearch(); </script>"; echo $tpl->_ENGINE_parse_body($html); }
thumbnail(); exit; } if (!$_SESSION["AsWebStatisticsAdministrator"]) { die("oups"); } if (isset($_GET["content"])) { content(); exit; } if (isset($_GET["master-content"])) { master_content(); exit; } if (isset($_GET["categories-list"])) { categories_list(); exit; } if (isset($_GET["js"])) { js(); exit; } if (isset($_GET["main-graphs"])) { main_graphs(); exit; } if (isset($_GET["graph1"])) { graph1(); exit; } if (isset($_GET["graph2"])) {
$description = $category_data->cat_desc . " - Page -" . $page; } $keywords = $category_data->cat_keywords; include '_includes/header.php'; ?> <div class="content"> <div class="content-inner"> <header id="content-header"> <div class="inner-container"> <div class="row"> <div class="column-small-11 center"> <div class="row"> <div class="column-small-8 cat-desc"> <div class="row padd0"> <?php categories_list($category_data->cat_name); ?> </div> <h1 class="article-heading"><?php echo $title; ?> </h1> <p><?php $category_data->category_description(); ?> </p> </div> <div class="column-small-4"> <?php ad_box(); ?>
function orders_list() { global $tpl; // use session to decide wether to show the orders list or not // TODO: add get_conf here if (!isset($_SESSION['show_orders_list'])) { $_SESSION['show_orders_list'] = false; } $show_orders = $_SESSION['show_orders_list']; unset($_SESSION['select_all']); $_SESSION['go_back_to_cat'] = 0; $user = new user($_SESSION['userid']); if (table_is_closed($_SESSION['sourceid']) && !$user->level[USER_BIT_CASHIER]) { table_closed_interface(); return 0; } $_SESSION['order_added'] = 0; $tpl->set_waiter_template_file('orders'); if (table_is_takeaway($_SESSION['sourceid'])) { $tpl->set_waiter_template_file('orders_takeaway'); takeaway_form(); } $table = new table($_SESSION['sourceid']); $table->fetch_data(true); if ($cust_id = $table->data['customer']) { $cust = new customer($cust_id); $tmp = ucphr('CUSTOMER') . ': ' . $cust->data['surname']; $tmp .= ' <a href="orders.php?command=customer_search">' . ucphr('EDIT') . '</a>/'; $tmp .= '<a href="orders.php?command=set_customer&data[customer]=0">' . ucphr('REMOVE') . '</a>'; $tmp .= '<br/>'; } else { $tmp = '<a href="orders.php?command=customer_search">' . ucfirst(phr('INSERT_CUSTOMER_DATA')) . '</a><br/>'; } $tpl->append('commands', $tmp); if (!orders_service_fee_exists() && get_conf(__FILE__, __LINE__, 'service_fee_use')) { $tmp = '<a href="orders.php?command=create&dishid=' . SERVICE_ID . '">' . ucfirst(phr('CREATE_SERVICE_FEE')) . '</a><br/>'; $tpl->append('commands', $tmp); } $associated_waiter = table_is_associated(); if (get_conf(__FILE__, __LINE__, "disassociation_allow") && $associated_waiter && ($associated_waiter == $_SESSION['userid'] || $user->level[USER_BIT_CASHIER])) { $tmp = '<a href="orders.php?command=dissociate">' . ucfirst(phr('DISSOCIATE')) . '</a><br/>'; $tpl->append('commands', $tmp); } if ($user->level[USER_BIT_CASHIER]) { $tmp = '<a href="orders.php?command=ask_move">' . ucfirst(phr('MOVE_TABLE')) . '</a><br/>'; $tpl->append('commands', $tmp); } if ($user->level[USER_BIT_CASHIER] && table_is_closed($_SESSION['sourceid'])) { $tmp = '<a href="orders.php?command=reopen_confirm">' . ucfirst(phr('REOPEN_TABLE')) . '</a><br/>'; $tpl->append('commands', $tmp); } if ($_SESSION['show_orders_list'] == false) { $desc = ucfirst(phr('SHOW_ORDERS')); } else { $desc = ucfirst(phr('HIDE_ORDERS')); } $tmp = '<a href="orders.php?command=set_show_orders">' . $desc . '</a><br/>'; $tpl->append('commands', $tmp); $tmp = categories_list(); $tpl->assign('categories', $tmp); $tmp = letters_list(); $tpl->assign('letters', $tmp); if (CONF_FAST_ORDER) { $tmp = order_fast_dishid_form(); $tpl->assign('fast_order_id', $tmp); } else { $tmp = keys_orders(); $tpl->append('scripts', $tmp); } // use session to decide wether to show the orders list or not if (!isset($_SESSION['show_toplist'])) { $_SESSION['show_toplist'] = get_conf(__FILE__, __LINE__, "top_list_show_top"); } if ($_SESSION['show_toplist']) { toplist_show(); } elseif (get_conf(__FILE__, __LINE__, "top_list_show_top")) { $tmp = '<a href="orders.php?command=set_show_toplist">' . ucphr('SHOW_TOPLIST') . '</a><br/>'; $tpl->assign('toplist', $tmp); } $tmp = command_bar_table_vertical(); $tpl->assign('vertical_navbar', $tmp); if ($show_orders) { $table->list_orders(); } if (get_conf(__FILE__, __LINE__, "show_summary")) { $query = "SELECT * FROM `orders`WHERE `sourceid`='" . $_SESSION['sourceid'] . "' AND `id`=`associated_id` ORDER BY `timestamp` DESC LIMIT 1"; $res = common_query($query, __FILE__, __LINE__); if (!$res) { return ERR_MYSQL; } $arr = mysql_fetch_array($res); $mods = get_conf(__FILE__, __LINE__, "show_mods_in_summary"); $table->list_orders('last_order', $arr['id'], $mods); } return 0; }
function categories_edit_form_submit($data) { $data['church_id'] = $_SESSION['log_church_id']; $error = categories_validate($data); if (!empty($error)) { return FALSE; } else { $categories = new Categories(); $update = $categories->update($data); if ($update['code'] == 200) { return categories_list($data['id']); } } }
include_once('ressources/class.templates.inc'); include_once('ressources/class.users.menus.inc'); include_once('ressources/class.squid.inc'); include_once('ressources/class.status.inc'); include_once('ressources/class.artica.graphs.inc'); include_once('ressources/class.computers.inc'); $users=new usersMenus(); if(!$users->AsWebStatisticsAdministrator){die();} if(isset($_GET["popup"])){popup();exit;} if(isset($_GET["parameters"])){parameters();exit;} if(isset($_POST["SquidEnableISPMode"])){parameters_save();exit;} if(isset($_POST["SendTestMessage"])){SendTestMessage();exit;} if(isset($_GET["SendTestMessage"])){SendTestMessage();exit;} if(isset($_GET["blacklist-list"])){categories_list();exit;} if(isset($_POST["category"])){categories_save();exit;} page(); function page(){ $ID=$_GET["ID"]; $page=CurrentPageName(); $tpl=new templates(); $q=new mysql_squid_builder(); $description=$tpl->_ENGINE_parse_body("{description}"); $category=$tpl->_ENGINE_parse_body("{category}"); $delete=$tpl->_ENGINE_parse_body("{delete}"); $explain=$tpl->_ENGINE_parse_body("{global_blacklists_explain}"); $TB_WIDTH=755;
/* * Sending calls to the view * Call functions on {yourmodule}.controller.php */ switch ($_GET['fn']) { case 'categories_list': echo categories_list($_GET['row_id']); break; case 'categories_list_pager': print categories_list(NULL, $_GET['search'], $_GET['sort'], $_GET['page']); break; case 'categories_list_sort': print categories_list(NULL, $_GET['search'], $_GET['sort'], 1); break; case 'categories_list_search': print categories_list(NULL, $_GET['search']); break; case 'categories_create_form': print categories_create_form(); break; case 'categories_create_form_submit': print categories_create_form_submit($_GET); break; case 'categories_edit_form': print categories_edit_form($_GET); break; case 'categories_edit_form_submit': print categories_edit_form_submit($_GET); break; case 'categories_delete_form': print categories_delete_form($_GET);
function search_form() { if (isset($_SESSION['user_email']) || isset($_SESSION['user_id'])) { $send_search_form_to = SITE_ROOT . "/public/admin/search_list_login.php"; } else { $send_search_form_to = SITE_ROOT . "/public/search_list_logout.php"; } isset($_GET['search_term']) ? $default_text = htmlentities($_GET['search_term']) : ($default_text = ""); echo '<form name="search_form" action="' . $send_search_form_to . '" method="get"> <input type="text" name="search_term" id="search_term" size="45" value="' . $default_text . '"> <select name="cn" style="display:none" id="search_category" style="width:110px;" width="15" class="searchBox" onchange="list_select_options(this.id,\'search_type\')" > <option value="">Categories</option>'; categories_list(); echo '</select> <select name="tpn" style="display:none" id="search_type" style="width:85px;" class="searchBox"> <option value="">Types</option> </select> <select name="cyn" style="display:none" id="search_country" style="width:100px;" class="searchBox" onchange="list_select_options(this.id,\'search_state\')"> <option value="">Countries</option>'; countries_list(); echo '</select> <select name="sn" style="display:none" id="search_state" style="width:100px;" class="searchBox" onchange="list_select_options(this.id,\'search_city\')"> <option value="">States</option> </select> <select name="cin" style="display:none" id="search_city" style="width:90px;" class="searchBox"> <option value="">Cities</option> </select> <input type="submit" name="search_submit_button" maxlength="15" style="margin-left:3px" value="Search"/> </form>'; }