Example #1
0
function check_power()
{
    global $global;
    $flag = 0;
    if ($global['admin_id']) {
        $obj = new admin();
        $obj->set_where('adm_id = ' . $global['admin_id']);
        $one = $obj->get_one();
        if ($one['adm_power'] == 'all') {
            $flag = 1;
        } elseif ($one['adm_power'] != '') {
            $val = $global['channel'] . '/mod-' . $global['mod'];
            $urls = explode('|', $one['adm_power']);
            for ($i = 0; $i < count($urls); $i++) {
                if ($urls[$i] == '/' . $val . '/') {
                    $flag = 1;
                    break;
                }
            }
            if ($flag == 0) {
                $obj = new menu();
                $obj->set_where('');
                $obj->set_where("men_url like '%" . $val . "%'");
                if ($obj->get_count() == 0) {
                    $flag = 1;
                }
            }
        }
    }
    return $flag;
}
Example #2
0
 function active($id = 0, $value)
 {
     $menu = new menu($id);
     if (!$menu->exists()) {
         show_404();
     }
     $menu->active = ($menu->active + 1) % 2;
     $menu->save();
     flash_message('success', "Kích hoạt thành công.");
     redirect($this->admin . 'menus/list_all/');
 }
Example #3
0
function get_power_arr()
{
    $arr = array();
    $obj = new menu();
    $obj->set_where('');
    $obj->set_where("left(men_type,6) = 'admin_'");
    $list = $obj->get_list();
    for ($i = 0; $i < count($list); $i++) {
        $arr[$i]['name'] = $list[$i]['men_name'];
        $arr[$i]['url'] = '/' . $list[$i]['men_url'];
        $arr[$i]['set'] = 0;
    }
    return $arr;
}
Example #4
0
function add_nav()
{
    global $smarty, $lang;
    $type = post('type');
    $word = post('word');
    $link = post('link');
    $obj = new menu();
    $obj->set_value('men_type', $type);
    $obj->set_value('men_name', $word);
    $obj->set_value('men_url', $link);
    $obj->add();
    $smarty->assign('info_text', '添加导航成功');
    $smarty->assign('link_text', $lang['return_list']);
    $smarty->assign('link_href', url(array('channel' => 'super', 'mod' => 'nav_list')));
}
Example #5
0
function module_footer()
{
    global $smarty;
    $obj = new menu();
    $obj->set_where("men_type = 'footer'");
    $smarty->assign('footer_nav', $obj->get_list());
    $obj = new varia();
    $site['domain'] = $obj->get_value('site_domain');
    $site['record'] = $obj->get_value('site_record');
    $site['record_url'] = $obj->get_value('site_record_url');
    $site['tech'] = $obj->get_value('site_tech');
    $site['tech_url'] = $obj->get_value('site_tech_url');
    $site['statistical_code'] = im_filter($obj->get_value('statistical_code', true));
    $smarty->assign('site', $site);
}
Example #6
0
 function save($object = '', $related_field = '')
 {
     if (!$this->exists()) {
         $o = new menu();
         $o->select_max('position');
         $o->get();
         if (count($o->all) != 0) {
             $max = $o->position + 1;
             $this->position = $max;
         } else {
             $this->postion = 1;
         }
     }
     return parent::save($object, $related_field);
 }
 function mainpage($mydata)
 {
     $this->data['mytitle'] = 'Monitoring website';
     $this->data['diagnostic'] = $diagnostic;
     foreach ($mydata as $key => $variable) {
         $this->data[$key] = $variable;
     }
     //here's the menu class
     $fred = new menu();
     $this->load->library('session');
     $mysess = $this->session->userdata('session_id');
     if (isset($this->status) && $this->status > 0) {
         $this->data['menu'] = $fred->show_menu($this->status);
     }
     $this->load->view('basic_view', $this->data);
 }
Example #8
0
 function mainpage($mydata)
 {
     Display();
     $this->data['title'] = 'Monitoring website';
     foreach ($mydata as $key => $variable) {
         $this->data[$key] = $variable;
     }
     /*here's the menu class we looked at in Chapter 3*/
     $fred = new menu();
     $this->load->library('session');
     $mysess = $this->session->userdata('session_id');
     if (isset($this->status) && $this->status > 0) {
         $this->data['menu'] = $fred->show_menu($this->status);
     }
     $this->load->view('header.tpl.php', $this->data);
 }
Example #9
0
function module_nav_list()
{
    global $smarty;
    $obj = new varia();
    $obj->set_where("left(var_name,10) = 'nav_stage_'");
    $arr = $obj->get_list();
    for ($i = 0; $i < count($arr); $i++) {
        $name = substr($arr[$i]['var_name'], 10);
        $obj = new menu();
        $obj->set_where("men_type = '{$name}'");
        $list[$name] = $obj->get_list();
        $nav[$i]['type'] = $name;
        $nav[$i]['name'] = $arr[$i]['var_value'];
    }
    $smarty->assign('nav', $nav);
    $smarty->assign('list', $list);
}
Example #10
0
 public static function Ret()
 {
     $class = __CLASS__;
     if (!self::$SINGLETON) {
         self::$SINGLETON = new $class();
     }
     return self::$SINGLETON;
 }
 function actionAddUser($view)
 {
     $view->menu = menu::getDataMenu();
     $userDataArray = array();
     $userDataArray['login'] = $_POST['login'];
     $userDataArray['password'] = $_POST['password'];
     $userDataArray['dblPassword'] = $_POST['dblPassword'];
     $userDataArray['email'] = $_POST['email'];
     $userDataArray['user_name'] = $_POST['user_name'];
     $userDataArray['user_surname'] = $_POST['user_surname'];
     if ($userDataArray['password'] !== $userDataArray['dblPassword']) {
         $view->userDataArray = $userDataArray;
         $view->message = " Пароли не совпадают !";
         echo $view->render('registration.php');
         return false;
     }
     if (!$userDataArray['login'] || !$userDataArray['password'] || !$userDataArray['dblPassword'] || !$userDataArray['email'] || !$userDataArray['user_name'] || !$userDataArray['user_surname']) {
         $view->userDataArray = $userDataArray;
         $view->message = " Введены не все данные !";
         echo $view->render('registration.php');
         return false;
     }
     $userDataArray = checkClass::checkAll($userDataArray);
     $query = "SELECT user_id FROM user WHERE user.user_login ="******";";
     if (getDataBase::getData($query, 1)) {
         $view->userDataArray = $userDataArray;
         $view->message = " Данный логи занят";
         echo $view->render('registration.php');
         return false;
     }
     $query = "INSERT INTO  `maket`.`user` (`user_id` ,`user_login` ,`user_password` ,`user_status` ,`user_block`)\r\n                  VALUES (NULL ,  '" . $userDataArray['login'] . "','" . $userDataArray['dblPassword'] . "',  'student',  '0');";
     if (!self::addData($query)) {
         $view->userDataArray = $userDataArray;
         $view->message = " Регистрация не удалась, попробуйте позже";
         echo $view->render('registration.php');
         return false;
     }
     $query = "SELECT user_id FROM user WHERE user.user_login ="******";";
     $id = getDataBase::getData($query, 1);
     if (!$id) {
         $view->userDataArray = $userDataArray;
         $view->message = " Регистрация не удалась, попробуйте позже";
         echo $view->render('registration.php');
         return false;
     }
     $query = "INSERT INTO `maket`.`user_data` (`user_data_id`, `user_id`, `user_data_name`, `user_data_surname`,\r\n                    `user_data_email`, `user_data_secret_w`, `user_data_secret_a`, `user_data_cantry`, `user_data_sity`)\r\n                    VALUES (NULL, '" . $id . "', '" . $userDataArray['user_name'] . "', '" . $userDataArray['user_surname'] . "',\r\n                     '" . $userDataArray['email'] . "', \\'апап\\', \\'апа\\', \\'Беларусь\\', \\'Минск\\');";
     if (!self::addData($query)) {
         $view->userDataArray = $userDataArray;
         $view->message = " Регистрация не удалась, попробуйте позже";
         echo $view->render('registration.php');
         return false;
     }
     $view->message = " Регистрация не удалась, попробуйте позже";
     echo $view->render('addUser.php');
 }
Example #12
0
 public function getData($cnd = " = 0")
 {
     $data = array();
     foreach (menu::model()->findAll('parent_id' . $cnd) as $model) {
         $row['text'] = $model->title;
         $row['id'] = $model->id;
         $row['children'] = Menu::getData(' =' . $model->id);
         $data[] = $row;
     }
     return $data;
 }
 public function addItem()
 {
     $output = "<div class='col-md-8 col-md-offset-2'>\n                <div class='alert alert-danger'>\n                    <p>This function is still in development.</p>\n                </div>\n            </div>";
     try {
         //  $beer = new beer('Bud Light');
         $menu = new menu($this->registry->db);
         $beerList = $menu->getJSON();
         $this->registry->template->menuItems = $beerList;
         $this->registry->template->error = $output;
         $this->registry->template->show('dashboard');
         /*
                     } else {
                         $this->registry->template->body = "An error occurred";
                         $this->registry->template->show('index');
                     } */
     } catch (Exception $e) {
         $this->registry->template->body = "An error occurred {$e->getMessage()}";
         $this->registry->template->show('dashboard');
     }
 }
Example #14
0
function module_header()
{
    global $smarty;
    $obj = new varia();
    $obj->set_where("var_name = 'languages'");
    $list = $obj->get_list();
    for ($i = 0; $i < count($list); $i++) {
        $arr = explode('{v}', $list[$i]['var_value']);
        $list[$i]['pack_name'] = $arr[0];
        $list[$i]['index_entrance'] = $arr[1];
        $list[$i]['admin_entrance'] = $arr[2];
        $list[$i]['chinese_name'] = $arr[3];
        $list[$i]['foreign_name'] = $arr[4];
    }
    $smarty->assign('lang_pack', $list);
    $obj = new menu();
    $obj->set_where("men_type = 'header'");
    $obj->set_field('men_name,men_url');
    $smarty->assign('nav', $obj->get_list());
}
 function index()
 {
     $usuario = new usuario();
     $adm = $usuario->esAdm();
     $this->registry->template->adm = $adm;
     $series = new series();
     $this->registry->template->seccion = $series->obtenerSeccionDeParaCajas();
     $this->registry->template->exp_id = "";
     $this->registry->template->ete_id = "";
     $menu = new menu();
     $liMenu = $menu->imprimirMenu(VAR1, $_SESSION['USU_ID']);
     $this->registry->template->men_titulo = $liMenu;
     $this->registry->template->PATH_WEB = PATH_WEB;
     $this->registry->template->PATH_DOMAIN = PATH_DOMAIN;
     $this->registry->template->PATH_EVENT = "view";
     $this->registry->template->GRID_SW = "false";
     $this->registry->template->PATH_J = "jquery";
     $this->registry->template->show('headerG');
     $this->registry->template->show('etiexpediente/tab_etiqexpedienteg.tpl');
     $this->registry->template->show('footer');
 }
Example #16
0
function initMenu($menuname, $skipCache = false)
{
    global $_GROUPS, $_TABLES, $_USER;
    $menu = NULL;
    $cacheInstance = 'menuobject_' . $menuname . '_' . CACHE_security_hash() . '__data';
    if ($skipCache == false) {
        $retval = CACHE_check_instance($cacheInstance, 0);
        if ($retval) {
            $menu = unserialize($retval);
            return $menu;
        }
    }
    $mbadmin = SEC_hasRights('menu.admin');
    $root = SEC_inGroup('Root');
    if (COM_isAnonUser()) {
        $uid = 1;
    } else {
        $uid = $_USER['uid'];
    }
    $result = DB_query("SELECT * FROM {$_TABLES['menu']} WHERE menu_active=1 AND menu_name='" . DB_escapeString($menuname) . "'", 1);
    $menuRow = DB_fetchArray($result);
    if ($menuRow) {
        $menu = new menu();
        $menu->id = $menuRow['id'];
        $menu->name = $menuRow['menu_name'];
        $menu->type = $menuRow['menu_type'];
        $menu->active = $menuRow['menu_active'];
        $menu->group_id = $menuRow['group_id'];
        if ($mbadmin || $root) {
            $menu->permission = 3;
        } else {
            if ($menuRow['group_id'] == 998) {
                if (COM_isAnonUser()) {
                    $menu->permission = 3;
                } else {
                    $menu->permission = 0;
                    return NULL;
                }
            } else {
                if (in_array($menuRow['group_id'], $_GROUPS)) {
                    $menu->permission = 3;
                } else {
                    return NULL;
                }
            }
        }
        $menu->getElements();
        $cacheMenu = serialize($menu);
        CACHE_create_instance($cacheInstance, $cacheMenu, 0);
    }
    return $menu;
}
Example #17
0
 /**
  * 检查页面权限
  * @param unknown $authority        	
  * @param unknown $checkvalue        	
  * @return boolean
  */
 public function checkAuthority($authority, $checkvalue)
 {
     if (empty($authority)) {
         return false;
     }
     //超管直接返回成功
     if ($authority == '-1') {
         return true;
     }
     Doo::loadClassAt('Menu', 'default');
     $menu = new menu(DBproxy::getManage());
     $menuList = $menu->getMenuArray();
     foreach ($menuList as $key => $var) {
         if (empty($var['url'])) {
             continue;
         }
         if (strpos($var['url'], '/') !== 0) {
             continue;
         }
         $menuid = -2;
         if (strpos($var['url'], '/') === 0) {
             $first = '';
         } else {
             $first = '/';
         }
         // var_dump($_SERVER['REDIRECT_URL'] , trim('/'.Doo::conf()->adminRoute.$first.$var['url']),'<br>');
         //寻找后台菜单URL和当前URL 是否匹配。
         if ($_SERVER['REDIRECT_URL'] == trim('/' . Doo::conf()->adminRoute . $first . $var['url'])) {
             $menuid = $var['id'];
             // echo '<pre>';var_dump($_SESSION['authory'],isset($authority[$menuid]),$var);
             // var_dump($authority,$menuid,$checkvalue);die;
         }
         if (isset($authority[$menuid]) && ($authority[$menuid] & $checkvalue) == $checkvalue) {
             return true;
         }
     }
     return false;
 }
 function index()
 {
     $tseries = new series();
     $series = "";
     if ($_SESSION["ROL_COD"] == "AA" || $_SESSION["ROL_COD"] == "AC" || $_SESSION["ROL_COD"] == "AI") {
         $series = $tseries->obtenerSelectTodas();
     } else {
         $series = $tseries->obtenerSelectSeries();
     }
     $departamento = new departamento();
     $this->registry->template->dep_id = $departamento->obtenerSelect();
     $fondo = new fondo();
     $this->registry->template->fon_id = $fondo->obtenerSelectFondos();
     $this->registry->template->uni_id = "";
     $this->registry->template->ser_id = "";
     //$this->registry->template->exp_id = "";
     $this->registry->template->tra_id = "";
     $this->registry->template->cue_id = "";
     $tmenu = new menu();
     $liMenu = $tmenu->imprimirMenu("buscarArchivo", $_SESSION['USU_ID']);
     $this->registry->template->men_titulo = $liMenu;
     $this->registry->template->UNI_ID = $_SESSION['UNI_ID'];
     $this->registry->template->PATH_WEB = PATH_WEB;
     $this->registry->template->PATH_DOMAIN = PATH_DOMAIN;
     $this->registry->template->PATH_EVENT = "search";
     $this->registry->template->PATH_EVENT2 = "verifpass";
     $this->registry->template->PATH_EVENT_VERIF_PASS = "******";
     $this->registry->template->PATH_EVENT3 = "download";
     $this->registry->template->PATH_EVENT4 = "getConfidencialidad";
     $this->registry->template->PATH_EVENT_EXPORT = "exportar";
     $this->registry->template->GRID_SW = "false";
     $this->registry->template->PATH_J = "jquery-1.4.1";
     $this->registry->template->show('headerBuscador');
     $this->registry->template->show('archivo/buscarArchivo.tpl');
     $this->registry->template->show('footer');
 }
Example #19
0
function module_left()
{
    global $global, $smarty;
    if ($global['channel'] == 'about' || $global['channel'] == 'recruit' || $global['channel'] == 'download') {
        $type = 'article';
    } else {
        $type = $global['channel'];
    }
    $obj = new menu();
    $obj->set_field('men_name,men_url');
    $obj->set_where('');
    $obj->set_where("men_lang = 'none'");
    $obj->set_where("men_type = 'admin_" . $type . "'");
    $obj->set_where("men_show = 1");
    $smarty->assign('nav_left', $obj->get_list());
}
Example #20
0
 private static function to_node($row)
 {
     $url = menu::get_url($row["url"]);
     $data = array('id' => $row["id"], 'text' => $row["name"], 'leaf' => empty($row["children"]));
     if ($data["leaf"] == true) {
         $data['iconCls'] = 'icon-cls';
         $data['url'] = $url;
         $data['qtip'] = $url;
     } else {
         $data['iconCls'] = 'icon-pkg';
         $data["singleClickExpand"] = true;
         foreach ($row["children"] as $k => $v) {
             $row["children"][$k] = self::to_node($v);
         }
         $data['children'] = $row["children"];
     }
     return $data;
 }
Example #21
0
 public static function jsonMenu()
 {
     $menus = Menu::where('depth', 1)->where('status', 1)->get();
     $submenus = menu::where('depth', 2)->where('status', 1)->get();
     function getSubs($subs, $mid)
     {
         $submenu = array();
         foreach ($subs as $sub) {
             if ($sub->parent_id == $mid) {
                 array_push($submenu, $sub);
             }
         }
         return $submenu;
     }
     $subList = array();
     foreach ($menus as $menu) {
         $subList[$menu->id] = getSubs($submenus, $menu->id);
     }
     return ['menus' => $menus, 'submenus' => $subList];
 }
Example #22
0
 public function menuNivel2($xb)
 {
     $subElementos = new menu();
     switch ($xb) {
         case 0:
             $subElementos->cargarElemento("fa-check-square-o", "../../0/home/estatus", " Activar/Desactivar");
             $subElementos->cargarElemento("fa-bug", "../../0/analisis/index", " Análisis");
             return $subElementos->mostrar();
             break;
         case 1:
             $subElementos->cargarElemento("fa-search", "../../0/producto/inve", " Inventario");
             $subElementos->cargarElemento("fa-gift", "../../0/producto/index", " Nuevos productos");
             return $subElementos->mostrar();
             break;
         case 3:
             $subElementos->cargarElemento("fa-list", "../../0/home/gestion_usuario", " Gestion de usuarios");
             $subElementos->cargarElemento("fa-cloud-download", "../../includes/respaldo", " Respaldar");
             $subElementos->cargarElemento("fa-cloud-upload", "../../0/home/restaurar", " Restaurar");
             return $subElementos->mostrar();
             break;
     }
 }
Example #23
0
         $submenu .= '<a href="' . $link . '">' . $title . '</a>';
         $subdata = $this->get_childs($args, $subclass);
         $submenu .= $subdata['submenu'];
         if (isset($subdata['class']) && strlen($subdata['class'])) {
             $result['class'] = $subdata['class'];
         }
         $submenu .= '</li>';
     }
     $submenu .= '</ul>';
     $submenu .= $this->aftersubm;
 }
 $result['submenu'] = $submenu;
 return $result;
Example #24
0
<?php

session_start();
include_once "../../librerias/plantilla/cuerpo.php";
include_once "../../librerias/plantilla/menu.php";
$obj_cuerpo = new cuerpo();
$obj_menu = new menu();
$auxnom = $_SESSION['usuario'];
echo $obj_cuerpo->a();
echo $obj_menu->c();
$obj_menu->d();
?>
    
    <div class="container-fluid">  
        <div class="row"> 
            <div class="col-md-3"></div>
            <div class="col-md-6">
            <?php 
if ($_SESSION['menini'] == 1) {
    echo "<br><div class='alert alert-success alert-dismissible'role='alert'>\n                        <button type='button' class='close' data-dismiss='alert' aria-label='Close'>\n                        <span aria-hidden='true'>&times;</span></button><strong>BIENVENIDO " . $auxnom[0]['nombre'] . " " . $auxnom[0]['apellido'] . " </strong> \n                    </div>";
}
?>
            </div>
        </div>
        <div class="row">
            <div class="col-md-12">
                <div class="page-header">
                    <h1>ESCRITORIO</h1>
                </div>   
            </div>            
        </div>
Example #25
0
function MB_editMenu($mid)
{
    global $_CONF, $_TABLES, $_ST_CONF, $stMenu, $LANG_MB00, $LANG_MB01, $LANG_MB_ADMIN, $LANG_MB_TYPES, $LANG_MB_GLTYPES, $LANG_MB_GLFUNCTION, $LANG_MB_MENU_TYPES;
    $retval = '';
    $menu_id = $mid;
    $menu = menu::getInstance($menu_id);
    $menu_arr = array(array('url' => $_CONF['site_admin_url'] . '/menu.php?mode=menu&amp;menu=' . $menu_id, 'text' => $LANG_MB01['return_to'] . $menu->name), array('url' => $_CONF['site_admin_url'] . '/menu.php', 'text' => $LANG_MB01['menu_list']));
    $retval .= COM_startBlock($LANG_MB01['menu_builder'] . ' :: ' . $LANG_MB01['edit_element'] . ' for ' . $menu->name, '', COM_getBlockTemplate('_admin_block', 'header'));
    $retval .= ADMIN_createMenu($menu_arr, $LANG_MB_ADMIN[5], $_CONF['layout_url'] . '/images/icons/menubuilder.png');
    // build menu type select
    $menuTypeSelect = '<select id="menutype" name="menutype">' . LB;
    while ($types = current($LANG_MB_MENU_TYPES)) {
        $menuTypeSelect .= '<option value="' . key($LANG_MB_MENU_TYPES) . '"';
        if (key($LANG_MB_MENU_TYPES) == $menu->type) {
            $menuTypeSelect .= ' selected="selected"';
        }
        $menuTypeSelect .= '>' . $types . '</option>' . LB;
        next($LANG_MB_MENU_TYPES);
    }
    $menuTypeSelect .= '</select>' . LB;
    // build group select
    $rootUser = DB_getItem($_TABLES['group_assignments'], 'ug_uid', 'ug_main_grp_id=1');
    $usergroups = SEC_getUserGroups($rootUser);
    $usergroups[$LANG_MB01['non-logged-in']] = 998;
    uksort($usergroups, "strnatcasecmp");
    $group_select = '<select id="group" name="group">' . LB;
    for ($i = 0; $i < count($usergroups); $i++) {
        $group_select .= '<option value="' . $usergroups[key($usergroups)] . '"';
        if ($usergroups[key($usergroups)] == $menu->group_id) {
            $group_select .= ' selected="selected"';
        }
        $group_select .= '>' . ucfirst(key($usergroups)) . '</option>' . LB;
        next($usergroups);
    }
    $group_select .= '</select>' . LB;
    $T = new Template($_CONF['path_layout'] . 'admin/menu');
    $T->set_file(array('admin' => 'editmenu.thtml'));
    if ($mid == 1 || $mid == 2 || $mid == 3) {
        $disabled = ' readonly ';
    } else {
        $disabled = '';
    }
    $menu_active_check = $menu->active == 1 ? ' checked="checked"' : '';
    $T->set_var(array('group_select' => $group_select, 'menutype' => $menu->type, 'menutype_select' => $menuTypeSelect, 'menuactive' => $menu->active == 1 ? ' checked="checked"' : ' ', 'form_action' => $_CONF['site_admin_url'] . '/menu.php', 'menu_id' => $mid, 'menuname' => $menu->name, 'enabled' => $menu_active_check, 'disabled' => $disabled));
    $T->parse('output', 'admin');
    $retval .= $T->finish($T->get_var('output'));
    $retval .= COM_endBlock(COM_getBlockTemplate('_admin_block', 'footer'));
    return $retval;
}
Example #26
0
/>
        绑定已有模块</td>
      <td id="tableTips" colspan="2">请以字母开头,留空将按模块名称拼音</td>
    </tr>
    <tr class="nobg">
      <td class="td80">模块说明:</td>
      <td class="rowform"><textarea  rows="6" onkeyup="textareasize(this)" name="desc" id="desc" cols="50" class="tarea"><?php 
echo $rs['desc'];
?>
</textarea></td>
      <td class="tips2" colspan="2">100字以内</td>
    </tr>
    <tr class="nobg">
      <td class="td80">菜单位置:</td>
      <td class="rowform"><?php 
foreach (menu::load() as $H => $value) {
    if ($rs['table'] != $H) {
        $rs['position'] == $H && ($checked = ' checked="checked" ');
        echo '<span id="pos' . $H . '" class="pos"></span><input type="radio" name="position" class="radio" value="' . $H . '"' . $checked . '/> ' . UI::lang('header_' . $H) . '<br /><br />';
    }
}
?>
</td>
      <td class="tips2" colspan="2">选择菜单所在位置</td>
    </tr>
    <thead>
      <tr>
        <th colspan="4">快捷链接</th>
      </tr>
    </thead>
    <tr class="nobg">
Example #27
0
 public function confirmUssdProcess($user, $message)
 {
     $menu = ussd_menu::find($user->menu_id);
     if (self::validationVariations($message, 1, "yes")) {
         //if confirmed
         if (self::postUssdConfirmationProcess($user)) {
             $response = $menu->confirmation_message;
         } else {
             $response = "We had a problem processing your request. Please contact Watu Credit Customer Care on 0729 405 464";
         }
         self::resetUser($user);
         $notify = new NotifyController();
         $notify->sendSms($user->phone_no, $response);
         self::sendResponse($response, 2, $user);
     } elseif (self::validationVariations($message, 2, "no")) {
         if ($user->menu_id == 3) {
             self::resetUser($user);
             $menu = menu::find(2);
             $user->menu_id = 2;
             $user->session = 2;
             $user->progress = 1;
             $user->save();
             //get home menu
             $menu = menu::find(2);
             $menu_items = self::getMenuItems($menu->id);
             $i = 1;
             $response = $menu->title . PHP_EOL;
             foreach ($menu_items as $key => $value) {
                 $response = $response . $i . ": " . $value->description . PHP_EOL;
                 $i++;
             }
             self::sendResponse($response, 1, $user);
         }
         $response = self::nextMenuSwitch($user, $menu);
         return $response;
     } else {
         //not confirmed
         $response = "We could not understand your response";
         //restart the process
         $output = self::confirmBatch($user, $menu);
         $response = $response . PHP_EOL . $output;
         return $response;
         //request to confirm again
     }
 }
Example #28
0
            unset($_SESSION['box_' . $_GET['boxid'] . '_active']);
        } else {
            $_SESSION['box_' . $_GET['boxid'] . '_active'] = 1;
        }
    }
}
### Generate Boxes
include_once 'modules/boxes/class_boxes.php';
// Fetch Boxes
$MenuActive = 0;
$BoxRes = $db->qry("SELECT boxid, name, place, source, module, callback, login, internet FROM %prefix%boxes\n  WHERE active = 1\n    AND (internet = 0 OR internet = %int% + 1)\n    AND (login = 0 OR (login = 1 AND %int% = 0) OR (login = 2 AND %int% = 1) OR (login > 2 AND login <= %int% + 1))\n  ORDER BY pos\n  ", $cfg['sys_internet'], $auth['login'], $auth['login'], $auth['type']);
while ($BoxRow = $db->fetch_array($BoxRes)) {
    if (($BoxRow['module'] == '' or $func->isModActive($BoxRow['module'])) and ($BoxRow['callback'] == '' or call_user_func($BoxRow['callback'], ''))) {
        if ($BoxRow['source'] == 'menu') {
            include_once 'modules/boxes/class_menu.php';
            $menu = new menu($BoxRow['boxid'], $BoxRow['name'], $BoxRow['source']);
            if ($BoxRow['place'] == 0 or $framework->IsMobileBrowser) {
                $templ['index']['control']['boxes_letfside'] .= $menu->get_menu_items();
            } elseif ($BoxRow['place'] == 1) {
                $templ['index']['control']['boxes_rightside'] .= $menu->get_menu_items();
            }
            if ($menu->box->box_rows) {
                $MenuActive = 1;
            }
            unset($menu);
        } else {
            $box = new boxes();
            if (!$BoxRow['module']) {
                $BoxRow['module'] = 'install';
            }
            if (file_exists('modules/' . $BoxRow['module'] . '/boxes/' . $BoxRow['source'] . '.php')) {
Example #29
0
              </div></td>
          </tr>
        </table>
        <div class="top_border"></div>
      </div></td>
  </tr>
  <tr>
    <td valign="top" width="1%"><!--次菜单-->
      <div class="left">
        <div class="main_menu_title">
          <div class="main_menu_title_left"></div>
          <div class="main_menu_title_right" id="off"> </div>
          <div class="none"></div>
        </div>
        <div class="left_menu" id="left_menu"> <?php 
menu::left();
?>
          <ul id="forumTree" style="display: none"><div class="backmenu" onclick="hideFT();"><img src="admin/images/home.gif" align="absmiddle" /> 返回菜单</div></ul>
        </div>
      </div></td>
    <td rowspan="2" valign="top" style="padding:0px;" id="iTd"><iframe src="<?php 
echo __SELF__ . '?' . $this->extra;
?>
" name="main" id="main" width="100%" height="100%" frameborder="0" scrolling="auto" style="overflow: visible;"></iframe></td>
  </tr>
  <tr>
    <td valign="top" style="height:32px;"><div class="left">
        <p>Powered by:<a href="http://www.idreamsoft.com" target="_blank">iCMS</a> <?php 
echo iCMS_VER;
?>
</p>
Example #30
0
<?
 //WEBSITE STARTUP
  include_once('class_login2.php');
  include('class_menu.php');

  $login = new login(0, 2);
  $login->main();
  
  $menu = new menu();
  
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
<head>
   <title>SV Nieuwerkerk | Beheer</title>
   
   <meta name="author" content="Rob Hoogland" />
   <meta name="copyright" content="&copy; 2010 jeugdschaken.nl" />
   <meta name="description" content="Welkom - mijn-2e-huis.nl" />
   <meta name="keywords" content="Share documents, School Project, information, file sharing" />
   <meta name="robots" content="index,nofollow" />
    
   <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />

   <link rel="stylesheet" type="text/css" href="style.css" />


</head>