$is_old = false; } else { $haveTicket = isset($_GET["ticket"]); // must be done before initPhpCAS which removes it $noCache = isset($_GET["noCache"]); if (@$_GET["PHPSESSID"]) { $_COOKIE["PHPSESSID"] = $_GET["PHPSESSID"]; } session_start(); if ($noCache && !isset($_GET["auth_checked"])) { // cleanup SESSION, esp. to force CAS authentification again debug_msg("cleaning SESSION"); $_SESSION = array(); } initPhpCAS($cas_host, '443', $cas_context, $CA_certificate_file); list($isAuthenticated, $noCookies, $wasPreviouslyAuthenticated) = checkAuthentication($noCache, $haveTicket); if (!$isAuthenticated) { setcookie("PHPSESSID", "", 1, "/"); } $uid = $isAuthenticated ? get_uid() : ''; $person = $uid ? $ldap_server ? getLdapPeopleInfo($uid) : array("uid" => array($uid)) : array(); $person['id'] = $person['uid']; $is_old = is_old() && !$noCache; } } list($validApps, $layout) = computeLayout($person); $bandeauHeader = computeBandeauHeader($person, $validApps); $exportApps = exportApps($person); $static_js = file_get_contents('bandeau-ENT-static.js'); $default_logout_url = @$ent_base_url ? $ent_base_url . '/Logout' : (@$layout[0] ? via_CAS($cas_login_url, $APPS[$layout[0]["apps"][0]]["url"]) : ''); $js_conf = array('cas_login_url' => $cas_login_url, 'bandeau_ENT_url' => $bandeau_ENT_url, 'ent_logout_url' => via_CAS($cas_logout_url, $default_logout_url), 'time_before_checking_browser_cache_is_up_to_date' => $time_before_checking_browser_cache_is_up_to_date);
<?php // Includng configuration file include 'config/config.php'; //Check user is already login or not checkAuthentication(); $id = $_SESSION['adminid']; $product = new product(); $order = new order(); $cashmemo = new cashmemo(); if (isset($_GET['action']) && $_GET['action'] == 'suggestprod') { $keyword = $_GET['keyword']; $elementid = $_GET['id']; $string = ''; $autosuggpro = $product->getSearchProducts($keyword); if (is_array($autosuggpro)) { $string .= '<ul>'; foreach ($autosuggpro as $val) { $string .= '<li onClick="fillname(\'' . addslashes($val['name']) . '\',\'' . $elementid . '\');fillcode(\'' . addslashes($val['sku']) . '\',\'' . $elementid . '\');fillprice(\'' . addslashes($val['price']) . '\',\'' . $elementid . '\');" >' . $val['name'] . '</li>'; } $string .= '</ul>'; } else { $string .= '<li>No Record found</li></ul>'; } echo $string; exit; } elseif (isset($_GET['action']) && $_GET['action'] == 'suggestchalan') { $keyword = $_GET['chalan_no']; $string = ''; $autosuggpro = $order->getChalanOrders($keyword); if (is_array($autosuggpro)) {
<?php //API //Exposes the methods for the iPhone app to use //Constants include_once 'apiKeys.php'; //API functions include_once 'apiMethods.php'; //Functions for outputting responses include_once 'apiOutput.php'; //Include include_once "apiDb.php"; //Make sure the request is in a valid format validate(); //Authenticate $userId = checkAuthentication(); //Process the request (ie. run the function) processTheRequest($userId); ?> <?php /* processTheRequest() Handles seeing what function the user wanted to call and calling that */ function processTheRequest($userId) { $function = getIntendedFunction(); $timezone = getParameter(APIKeys::$TIMEZONE); //Login