<html> <?php //////////////////////////////////////////////////////////////////////// //LOAD LIBRARY //////////////////////////////////////////////////////////////////////// $HOST = $_SERVER["HTTP_HOST"]; $SCRIPTNAME = $_SERVER["SCRIPT_FILENAME"]; $ROOTDIR = rtrim(shell_exec("dirname {$SCRIPTNAME}")); require "{$ROOTDIR}/etc/library.php"; //////////////////////////////////////////////////////////////////////// //INITIALIZATION //////////////////////////////////////////////////////////////////////// $content = ""; $content .= getHeaders(); $content .= getHead(); $content .= getMainMenu(); //////////////////////////////////////////////////////////////////////// //SUBMENU //////////////////////////////////////////////////////////////////////// $content .= <<<M <div class="moduletitle"> Documentos </div> <div class="submenu"> <a href="?">Inicio</a> <span class="level5">| <a href="?mode=mode">Modo</a></span> </div> <div class="container"> M; //////////////////////////////////////////////////////////////////////// //BODY
// case 'cancel_suspend': // $trans_id = $_REQUEST['trans_id']; // CancelSuspended($trans_id); // break; // case 'payment_done': // $object_id = $_REQUEST['obj_id']; // $trans_id = $_REQUEST['trans_id']; // RestoreSuspended($trans_id); // $sum_cost = GetSumPrice($object_id); // $sum_self_cost = GetSumSelfPrice($object_id); // $calculate = Calculate($object_id, $trans_id); // PayDone($object_id, $sum_cost, $sum_self_cost); // break; case 'get_main_menu': //$object_id = $_REQUEST['obj_id']; $data = array('page' => getMainMenu()); break; case 'get_sub_menu': $category_id = $_REQUEST['id']; $data = array('page' => getSubMenu($category_id)); break; case 'prod_ing_page': $object_id = $_REQUEST['obj_id']; $prod_id = $_REQUEST['prod_id']; $check = CheckProdType($prod_id); if (!$check) { $data = array('page' => GetProdPage($object_id, $prod_id)); } else { $data = array('page' => GetProdIngPage($object_id, $prod_id)); } break;
<?php $text = $_REQUEST['text']; $input = getInput($text); switch ($input['level']) { case 0: $reply = getMainMenu(); break; case 1: $reply = levelOneProcess($input); break; case 2: $reply = levelTwoProcess($input); break; default: $reply = getMainMenu(); break; } echo "CON " . $reply; exit; //User dials the code and is requested to enter the drug verification //code //step 2 the code is compared to valid code and if valid gets valid Message //end at this function levelTwoProcess($input) { if ($input['exploded_text'][0] == 1) { //Safaricom Menu level 2 } elseif ($input['exploded_text'][0] == 2) { //MPESA level 2 $reply = getMpesaLevel2($input['latest_message']);
<?php header('Content-Type: text/html; charset= utf-8'); session_start(); require_once 'config.php'; require_once 'functions.php'; $categories = getCategories($mysql_link); $types = get_type($mysql_link); $user = checkUser($mysql_link); if (!empty($user) and is_array($user)) { $add_mess = privileges($mysql_link, $user['role_id'], array('ADD_MESS')); } $action = clearData($mysql_link, $_GET['action']); if (!$action) { $action = 'index'; } $title = getTitle($mysql_link, $action, $user, $types, $categories); $main_menu = getMainMenu($mysql_link, $user, $action); if (file_exists('actions/' . $action . '.inc.php')) { include 'actions/' . $action . '.inc.php'; } else { include 'actions/' . 'index.inc.php'; } require_once THEME . 'index.tpl.php'; unset($_SESSION['msg']); echo '<pre><br /><h4>Текущий пользователь</h4><br />'; print_r($user); echo '</pre>'; echo '<pre><br /><h4>Данные SERVER</h4><br />'; print_r($_SERVER); echo '</pre>';