function index() { $per_page = (int) $this->input->get_post('per_page'); $cupage = config_item('site_page_num'); //每页显示个数 $return_arr = array('total_rows' => true); $where = array(); // if($this->user_info->key != 'root'){ $where['status >='] = 0; $where['gid !='] = 1; // } $title = htmlspecialchars($this->input->get_post("title")); $like = array(); $string = ''; if ($title = trim($title)) { $like['title'] = $title; $string .= "title=" . $title; } $options = array('page' => $cupage, 'per_page' => $per_page, 'like' => $like, 'where' => $where, 'order' => 'gid desc'); $lc_list = $this->model->getAll($options, $return_arr); //查询所有信息 $url = admin_base_url('user/group?'); $page = $this->sharepage->showPage($url, $return_arr['total_rows'], $cupage); $data = array('lc_list' => $lc_list, 'page' => $page, 'title' => $title, 'totals' => $return_arr['total_rows']); $this->_template('admin/user/grouplist', $data); }
function index() { $per_page = (int) $this->input->get_post('per_page'); $cupage = config_item('site_page_num'); //每页显示个数 $return_arr = array('total_rows' => true); if ($this->user_info->key == 'root') { $where['status >='] = -1; } else { $where['status >='] = 0; } $loginname = htmlspecialchars($this->input->get_post("loginname")); $like = array(); $string = ''; if ($loginname = trim($loginname)) { $like['loginname'] = $loginname; $string .= "loginname=" . $loginname; } $options = array('page' => $cupage, 'per_page' => $per_page, 'where' => $where, 'like' => $like, 'order' => "logintime desc,lid desc"); $lc_list = $this->userlog_model->getAll($options, $return_arr); //查询所有信息 $url = admin_base_url('user/userlog?') . $string; $page = $this->sharepage->showPage($url, $return_arr['total_rows'], $cupage); $data = array('lc_list' => $lc_list, 'page' => $page, 'loginname' => $loginname, 'totals' => $return_arr['total_rows']); $this->_template('admin/user/userlog', $data); }
public function index($type = 'all', $start = 0) { switch ($type) { case 'draft': $where = array('state' => 0); break; case 'publish': $where = array('state' => 1); break; case 'trash': $where = array('state' => 2); break; default: $where = array('state !=' => 2); } $data['type'] = in_array($type, array('all', 'publish', 'trash', 'draft')) ? $type : 'all'; $this->load->library('pagination'); $config['base_url'] = admin_base_url('article/' . $data['type']); $config['total_rows'] = $this->article_model->get_rows($where); $config['per_page'] = $this->_prepage; $config['num_links'] = 5; $config['uri_segment'] = 4; $config['suffix'] = config_item('url_suffix'); $this->pagination->initialize($config); $data['pres'] = $this->_prepage; $data['page'] = $this->pagination->create_links(); $data['rows'] = $config['total_rows']; $data['list'] = $this->article_model->get_list($start, $config['per_page'], $where); $this->load->view('admin_article', $data); }
function index() { $per_page = (int) $this->input->get_post('per_page'); $cupage = intval($this->config->item('site_page_num')); //每页显示个数 $return_arr = array('total_rows' => true); $where = array(); $like = array(); if ($this->user_info->key != 'root') { $where[$this->model->_table . '.status >='] = 0; $where['pid'] = $this->user_info->uid; } $user_name = htmlspecialchars($this->input->get_post("user_name")); $string = ''; if ($user_name = trim($user_name)) { $like['user_name'] = $user_name; $string .= "user_name=" . $user_name; } $nickname = htmlspecialchars($this->input->get_post("nickname")); if ($nickname = trim($nickname)) { $like['nickname'] = $nickname; $string .= "nickname=" . $nickname; } $options = array('page' => $cupage, 'per_page' => $per_page, 'where' => $where, 'like' => $like, 'order' => "uid desc"); $lc_list = $this->model->getAll($options, $return_arr); //查询所有信息 // print_r($lc_list);die; $url = admin_base_url('user/index?') . $string; $page = $this->sharepage->showPage($url, $return_arr['total_rows'], $cupage); $data = array('lc_list' => $lc_list, 'page' => $page, 'totals' => $return_arr['total_rows']); $this->_template('admin/user/userlist', $data); }
public function __construct() { try { parent::__construct(); $this->data['title'] = addslashes(t("Admin User Management")); //Browser Title //Define Errors Here// $this->cls_msg = array(); $this->cls_msg["no_result"] = addslashes(t("No information found about admin user.")); $this->cls_msg["save_err"] = addslashes(t("Information about admin user failed to save.")); $this->cls_msg["save_succ"] = addslashes(t("Information about admin user saved successfully.")); $this->cls_msg["delete_err"] = addslashes(t("Information about admin user failed to remove.")); $this->cls_msg["delete_succ"] = addslashes(t("Information about admin user removed successfully.")); //end Define Errors Here// $this->pathtoclass = admin_base_url() . $this->router->fetch_class() . "/"; //table info $this->tbl = $this->db->USER; // loading default model here // $this->load->model("user_login", "mod_rect"); //$this->load->model("customer_model","mod_rect"); $this->load->model("user_type_model", "mod_utype"); // end loading default model here // $this->tbl = $this->db->USER; $this->data['BREADCRUMB'] = array(addslashes(t('Manage Admin User'))); } catch (Exception $err_obj) { show_error($err_obj->getMessage()); } }
public function __construct() { parent::__construct(); $this->data["title"] = addslashes(t('Category')); //Browser Title $this->pathtoclass = admin_base_url() . $this->router->fetch_class() . "/"; $this->tbl = 'acs_category'; // Default Table }
public function index($start = 0) { $this->load->library('pagination'); $config['base_url'] = admin_base_url('category/index'); $config['total_rows'] = $this->category_model->get_rows(); $config['per_page'] = $this->_prepage; $config['num_links'] = 5; $config['uri_segment'] = 4; $config['suffix'] = config_item('url_suffix'); $this->pagination->initialize($config); $data['pres'] = $this->_prepage; $data['page'] = $this->pagination->create_links(); $data['rows'] = $config['total_rows']; $data['list'] = $this->category_model->get_list($start, $config['per_page']); $this->load->view('admin_category', $data); }
public function index($start = 0) { $type = 'all'; $this->load->library('pagination'); $config['base_url'] = admin_base_url('huangye/all'); $this->db->select('*'); $this->db->from('huangye'); $config['total_rows'] = $this->db->get()->num_rows(); $config['per_page'] = $this->_prepage; $config['num_links'] = 5; $config['uri_segment'] = 4; $config['suffix'] = config_item('url_suffix'); $this->pagination->initialize($config); $data['pres'] = $this->_prepage; $data['page'] = $this->pagination->create_links(); $data['rows'] = $config['total_rows']; $data['list'] = $this->huangye_model->get_list($start, $config['per_page']); $this->load->view('admin_huangye', $data); }
public function __construct() { try { parent::__construct(); ////////Define Errors Here////// $this->cls_msg = array(); ////////end Define Errors Here////// $this->pathtoclass = admin_base_url() . $this->router->fetch_class() . "/"; $this->load->model("dashboard_model", "mod_rect"); $this->load->model("user_model", "mod_user"); //$this->load->model("task_model","mod_task"); $this->load->model("common_model", "mod_common"); $logged_in = $this->session->userdata("admin_loggedin"); $this->user_type = decrypt($logged_in["user_type_id"]); $this->user_id = decrypt($logged_in["user_id"]); } catch (Exception $err_obj) { show_error($err_obj->getMessage()); } }
public function __construct() { try { parent::__construct(); ////////Define Errors Here////// $this->cls_msg = array(); $this->cls_msg["no_result"] = addslashes(t("No information found about user.")); $this->cls_msg["save_err"] = addslashes(t("Information about user failed to save.")); $this->cls_msg["save_succ"] = addslashes(t("Information about user saved successfully.")); $this->cls_msg["delete_err"] = addslashes(t("Information about user failed to remove.")); ////////end Define Errors Here////// $this->pathtoclass = admin_base_url() . $this->router->fetch_class() . "/"; $this->load->model("my_account_model", "mod_rect"); $this->load->model('user_model'); $this->load->model("common_model", "mod_common"); // for employee } catch (Exception $err_obj) { show_error($err_obj->getMessage()); } }
function admin_breadcrumb($arr_breadcrumb = null) { $divider = ''; $str_breadcrumb = '<ol class="breadcrumb"><li><a href="' . admin_base_url() . '"><i class="fa fa-dashboard"></i>' . addslashes(t("Home")) . '</a></li>'; if (!empty($arr_breadcrumb)) { $str_breadcrumb .= $divider; foreach ($arr_breadcrumb as $key => $val) { if (!is_array($val)) { $str_breadcrumb .= '<li><a class="active" href="javascript:void(0);">' . $val . '</a></li>'; } else { $str_breadcrumb .= '<li><a href="' . $val['link'] . '">' . $val['text'] . '</a></li>'; } if ($arr_breadcrumb[$key + 1]) { $str_breadcrumb .= $divider; } } } $str_breadcrumb .= '</ol>'; return $str_breadcrumb; }
public function __construct() { try { parent::__construct(); $this->data['title'] = addslashes(t("Generate MVC")); //Browser Title //Define Errors Here// $this->cls_msg = array(); $this->cls_msg["no_result"] = get_message('no_result'); $this->cls_msg["save_err"] = get_message('save_failed'); $this->cls_msg["save_succ"] = get_message('save_success'); $this->cls_msg["delete_err"] = get_message('del_failed'); $this->cls_msg["delete_succ"] = get_message('del_success'); //end Define Errors Here// $this->pathtoclass = admin_base_url() . $this->router->fetch_class() . "/"; $this->load->helper('basic_text_template'); $this->data['BREADCRUMB'] = array(addslashes(t('Generate MVC Depending on Database Table'))); } catch (Exception $err_obj) { show_error($err_obj->getMessage()); } }
public function __construct() { try { parent::__construct(); ////////Define Errors Here////// $this->data['title'] = addslashes(t("Admin Site Setting")); ////Browser Title ////////Define Errors Here////// $this->cls_msg = array(); $this->cls_msg["no_result"] = addslashes(t("No information found about admin site setting.")); $this->cls_msg["save_err"] = addslashes(t("Admin site setting failed to save.")); $this->cls_msg["save_succ"] = addslashes(t("Admin site setting saved successfully.")); $this->cls_msg["delete_err"] = addslashes(t("Admin site setting failed to remove.")); $this->cls_msg["delete_succ"] = addslashes(t("Admin site setting removed successfully.")); ////////end Define Errors Here////// $this->pathtoclass = admin_base_url() . $this->router->fetch_class() . "/"; $this->load->model("site_setting_model", "mod_rect"); //////// end loading default model here ////////////// } catch (Exception $err_obj) { show_error($err_obj->getMessage()); } }
public function __construct() { try { parent::__construct(); $this->data['title'] = addslashes(t("Email Template")); //Browser Title //Define Errors Here// $this->cls_msg = array(); $this->cls_msg["no_result"] = addslashes(t("No information found about automail.")); $this->cls_msg["save_err"] = addslashes(t("Information about automail failed to save.")); $this->cls_msg["save_succ"] = addslashes(t("Information about automail saved successfully.")); $this->cls_msg["delete_err"] = addslashes(t("Information about automail failed to remove.")); $this->cls_msg["delete_succ"] = addslashes(t("Information about automail removed successfully.")); //end Define Errors Here// $this->pathtoclass = admin_base_url() . $this->router->fetch_class() . "/"; // loading default model here // $this->load->model("auto_mail_model", "mod_rect"); // end loading default model here // $this->data['BREADCRUMB'] = array(addslashes(t('Email Template'))); $this->tbl = $this->db->AUTOMAIL; } catch (Exception $err_obj) { show_error($err_obj->getMessage()); } }
public function __construct() { try { parent::__construct(); $this->data['title'] = addslashes(t("Generate MVC")); //Browser Title //Define Errors Here// $this->cls_msg = array(); $this->cls_msg["no_result"] = get_message('no_result'); $this->cls_msg["save_err"] = get_message('save_failed'); $this->cls_msg["save_succ"] = get_message('save_success'); $this->cls_msg["delete_err"] = get_message('del_failed'); $this->cls_msg["delete_succ"] = get_message('del_success'); //end Define Errors Here// $this->pathtoclass = admin_base_url() . $this->router->fetch_class() . "/"; $this->load->helper('basic_text_template'); $this->data['BREADCRUMB'] = array(addslashes(t('Generate MVC Depending on Database Table'))); $this->form_field_type = array('text' => 'Text', 'password' => 'Password', 'textarea' => 'Textarea', 'select' => 'Drop Down', 'radio' => 'Radio', 'checkbox' => 'Checkbox', 'file' => 'File Upload'); $this->data['form_field_type'] = $this->form_field_type; $this->tbl_prefix = $this->db->tableprefix; } catch (Exception $err_obj) { show_error($err_obj->getMessage()); } }
protected function admin_report_showin_table($tbldata, $no_action = FALSE, $i_uri_seg = 6) { try { //echo $this->i_uri_seg;exit; //$this->data['php'] .= $this->load->view("php.tpl.php", array('filename' => $s_filename), true); $s_ret_ = ""; if (!empty($tbldata)) { $s_pageurl = admin_base_url() . $this->router->fetch_class() . '/' . $this->s_action_name . '/' . $tbldata['order_name'] . '/' . $tbldata['order_by']; //$s_pageurl= admin_base_url().$this->router->fetch_class() . '/' . $this->s_action_name; //echo $s_pageurl; exit; $tbldata["pagination"] = $this->get_admin_pagination($s_pageurl, $tbldata["total_db_records"], $this->i_admin_page_limit, $i_uri_seg); //var_dump($tbldata["pagination"]); $tbldata["s_controller_name"] = admin_base_url() . $this->router->fetch_class() . '/'; //This line is added by Jagannath Samanta on 22 June 2011 //Only for product_image module path. Note don't modify it. //$tbldata["s_controller_name_pro_img"]=admin_base_url()."product_image". '/'; $tbldata["i_pageno"] = $this->uri->segment($this->i_uri_seg); //current page number $tbldata['no_action'] = $no_action; //pr($tbldata);exit; //Access control for Insert, Edit, Delete// $tbldata["action_allowed"] = $this->data["action_allowed"]; $s_ret_ = $this->load->view($this->router->fetch_directory() . '/' . "list.tpl.php", $tbldata, TRUE); } unset($tbldata, $s_pageurl); return $s_ret_; } catch (Exception $err_obj) { show_error($err_obj->getMessage()); } }
public function delete($id) { $user = $this->Model_passenger->get_passenger($id); if (!$id || !$user) { show_error('Invalid passenger ID.'); } $this->Model_passenger->delete($id); $this->redirectTO(admin_base_url('customer/lists'), "The passenger successfully deleted."); }
function updatePassword() { //加载表单验证类 $this->load->library('form_validation'); //开始验证,验证规则在config/form_validation.php $valid = $this->form_validation->run('index/_reset_password'); if (!$valid) { //未通过验证 $msg = $this->form_validation->error_string(); ajax_return($msg, 3); } $uid = $this->agentId; $options = array(); $options['where']['sellerid'] = $this->input->get_post('agentid'); $options['where']['agentId'] = $uid; $password = $this->input->get_post('password'); $data = array(); $data['password'] = md5($password); $tof = $this->model->update($data, $options); //信息返回操作 if ($tof) { ajax_return(lang('update_success'), 0, '', admin_base_url('agent/seller')); } else { ajax_return("密码更新失败"); } }
var qd_html = '<div class="passwordStrength"><b>密码强度:</b> <span class="">弱</span><span class="">中</span><span class="last">强</span></div>'; $("#q_password1").closest('span').after(qd_html); $("#city").linkagesel({selected:'<?php echo $item->district; ?> '}); $("#user_name").change(function(){ user_name = $("#user_name").val(); if(user_name !=""){ $.post("<?php echo admin_base_url('user/index/ajaxUserName'); ?> ", { user_name: user_name } , function(data){ result = eval(data); if(result.status == 1){ $("#user_name").val(""); $("#user_name").focus(); alert(result.info); } },"json" ); } }); });
<?php } ?> </div> <div class="visible-xs visible-sm hidden-md hidden-lg"> <div class="inline position-relative"> <button class="btn btn-minier btn-yellow dropdown-toggle" data-toggle="dropdown"> <i class="icon-caret-down icon-only bigger-120"></i> </button> <ul class="dropdown-menu dropdown-only-icon dropdown-yellow pull-right dropdown-caret dropdown-close"> <li> <a href="<?php echo admin_base_url('user/group/info?gid='); echo $item->gid; ?> " class="tooltip-success" data-rel="tooltip" title="修改"> <span class="green"> <i class="icon-edit bigger-120"></i> </span> </a> </li> <li> <a href="javascript:" onclick="msgdelete(<?php echo $item->gid; ?> )" class="tooltip-error" data-rel="tooltip" title="删除"> <span class="red">
echo $item->status == 'OFF' ? '' : 'checked'; ?> > <span class="lbl"></span> </label> </td> <td><?php echo $item->createtime; ?> </td> <td><?php echo $item->updatetime; ?> </td> <td><div class="visible-md visible-lg hidden-sm hidden-xs action-buttons"><a href="<?php echo admin_base_url('agent/seller/modify_pwd?id=' . $item->sellerid); ?> "><i class="icon-undo bigger-130"></i></a></div></td> </tr> <?php } ?> <?php } else { ?> <tr><td colspan="10" style="text-align:center;">未找到数据</td></tr> <?php } ?> </tbody> </table>
<?php echo $table_view; ?> <!-- content ends --> </div> </div> </div> <form name="frm_upload" id="frm_upload" method="POST" enctype="multipart/form-data" action="<?php echo admin_base_url() . "manage_user/csv_file_upload"; ?> " > <div class="modal hide fade" id="myModal_upload"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal">x</button> <h3><?php echo addslashes(t("Upload Csv Here")); ?> </h3> </div> <div class="modal-body" style="height:300 "> <div class="uploader" id="uniform-fileInput"><input class="input-file uniform_on" name="fileInput" id="fileInput" type="file" size="40" style="opacity: 0;"><span class="filename">No file selected</span><span class="action">Choose File</span> </div> <span class="help-inline"></span> <span> Please upload .csv or .xls file only</span>
<div class="row"> <div class="col-xs-12"> <div class="table-responsive"> <div class="dataTables_wrapper"> <div class="row"> <div class="col-sm-12"> <form method="get" action="<?php echo admin_base_url('user/userlog'); ?> "> <label> 用户账号:<input type="text" class="input-text" name="loginname" value="<?php echo $loginname; ?> " /> </label> <label> <button class="btn btn-sm btn-primary" type="submit"> <i class="icon-search"></i>搜索 </button> </label> </form> </div> </div> <table class="table table-striped table-bordered table-hover dataTable"> <colgroup> <col width="5%"> <col width="10%"> <col width="15%">
public function lists() { $this->setViewData('box_header', "Order list"); $this->setPaginationModel($this->Model_booking); $list = $this->Model_booking->get_bookings(); $this->setPagination(admin_base_url('order/' . __FUNCTION__), $this->Model_booking->getTotalCount(), count($list)); $this->setViewData('list', $list); $this->setViewData('list_headers', array('booking_id' => 'Booking ID', 'invoice_id' => 'Invoice ID', 'booking_status' => 'Booking Status', 'pickup_date' => 'Pickup Date', 'requested_pickup_time' => 'Pickup Time', 'action' => 'Action')); $this->get_formated_list(); // $this->debug_view(); $this->render_view('list', 'common'); }
public function show_list($start = NULL, $limit = NULL) { try { $this->data['heading'] = addslashes(t("User Type Master")); ////Package Name[@package] Panel Heading ///////////generating search query/////// ////////Getting Posted or session values for search/// $s_search = isset($_POST["h_search"]) ? $this->input->post("h_search") : $this->session->userdata("h_search"); $s_user_type = $this->input->post("h_search") ? $this->input->post("txt_user_type") : $this->session->userdata("txt_user_type"); $dt_created_on = $this->input->post("h_search") ? $this->input->post("txt_created_on") : $this->session->userdata("txt_created_on"); ////////end Getting Posted or session values for search/// if ($s_search == "basic") { $s_where .= " WHERE ut.s_user_type LIKE '%" . get_formatted_string($s_user_type) . "%' "; /////Storing search values into session/// $this->session->set_userdata("txt_user_type", $s_user_type); $this->session->set_userdata("h_search", $s_search); $this->data["h_search"] = $s_search; $this->data["txt_user_type"] = $s_user_type; $this->data["txt_created_on"] = $dt_created_on; /////end Storing search values into session/// } elseif ($s_search == "advanced") { if (trim($s_user_type) != "") { $arr_search[] = " ut.s_user_type LIKE '%" . get_formatted_string($s_user_type) . "%' "; } if (trim($dt_created_on) != "") { $dt_start = date("Y-m-d", strtotime(trim($dt_created_on . " "))); $arr_search[] = " FROM_UNIXTIME( ut.dt_created_on , '%Y-%m-%d' ) ='" . $dt_start . "' "; unset($dt_start); } $s_where .= count($arr_search) != 0 ? ' WHERE ' . implode('AND', $arr_search) : ''; /////Storing search values into session/// $this->session->set_userdata("txt_faq_title", $s_faq_title); $this->session->set_userdata("txt_created_on", $dt_created_on); $this->session->set_userdata("h_search", $s_search); $this->data["h_search"] = $s_search; $this->data["txt_user_type"] = $s_user_type; $this->data["txt_created_on"] = $dt_created_on; /////end Storing search values into session/// } else { /////Releasing search values from session/// $this->session->unset_userdata("txt_user_type"); $this->session->unset_userdata("txt_created_on"); $this->session->unset_userdata("h_search"); $this->data["h_search"] = $s_search; $this->data["txt_faq_title"] = ""; $this->data["txt_created_on"] = ""; /////end Storing search values into session/// } unset($s_search, $s_user_type, $dt_created_on); ///Setting Limits, If searched then start from 0//// if ($this->input->post("h_search")) { $start = 0; } else { $start = $this->uri->segment($this->i_uri_seg); } ///////////end generating search query/////// $limit = $this->i_admin_page_limit; $info = $this->obj_mod->fetch_multi($s_where, intval($start), $limit); /////////Creating List view for displaying///////// $table_view = array(); //////Table Headers, with width,alignment/////// $table_view["caption"] = addslashes(t("User Type")); $table_view["total_rows"] = count($info); $table_view["total_db_records"] = $this->obj_mod->gettotal_info($s_where); $table_view["headers"][0]["width"] = "25%"; $table_view["headers"][0]["align"] = "left"; $table_view["headers"][0]["val"] = addslashes(t("User Type")); $table_view["headers"][1]["val"] = addslashes(t("Access Control")); //$table_view["headers"][2]["val"] ="Created On"; //$table_view["headers"][3]["val"] ="Status"; //////end Table Headers, with width,alignment/////// /////////Table Data///////// for ($i = 0; $i < $table_view["total_rows"]; $i++) { $i_col = 0; $table_view["tablerows"][$i][$i_col++] = encrypt($info[$i]["id"]); ////Index 0 must be the encrypted PK $table_view["tablerows"][$i][$i_col++] = $info[$i]["s_user_type"]; $table_view["tablerows"][$i][$i_col++] = '<a class="btn btn-mini btn-warning" href="' . admin_base_url() . 'user_type_master/access_control/' . encrypt($info[$i]["id"]) . '"><i class="icon-lock icon-white"></i>Access</a>'; //$table_view["tablerows"][$i][$i_col++] =$info[$i]["dt_created_on"]; //$table_view["tablerows"][$i][$i_col++] =$info[$i]["s_active"]; } /////////end Table Data///////// unset($i, $i_col, $start, $limit); $this->data["table_view"] = $this->admin_showin_table($table_view); /////////Creating List view for displaying///////// $this->data["search_action"] = $this->pathtoclass . $this->router->fetch_method(); ///used for search form action //echo $this->data["search_action"]; $this->render(); unset($table_view, $info); } catch (Exception $err_obj) { show_error($err_obj->getMessage()); } }
<li> <a class="btn" href="#"> <i class="halflings-icon white wrench"></i> </a> </li> <!-- start: User Dropdown --> <li class="dropdown"> <a class="btn dropdown-toggle" data-toggle="dropdown" href="#"> <i class="halflings-icon white user"></i> Dennis Ji <span class="caret"></span> </a> <ul class="dropdown-menu"> <li class="dropdown-menu-title"> <span>Account Settings</span> </li> <li><a href="#"><i class="halflings-icon user"></i> Profile</a></li> <li><a href="<?php __e(admin_base_url('login/logout', false)); ?> "><i class="halflings-icon off"></i> Logout</a></li> </ul> </li> <!-- end: User Dropdown --> </ul> </div> <!-- end: Header Menu --> </div> </div> </div> <!-- start: Header -->
* * Purpose: * View For menu setting List Showing * * @package * @subpackage * * @link InfController.php * @link My_Controller.php * @link views/admin/menu_setting/ */ ?> <script type="text/javascript" language="javascript" > var admin_base_url = "<?php echo admin_base_url(); ?> "; jQuery(function($) { $(document).ready(function() { $("#tab_search").tabs({ cache: true, collapsible: true, fx: {"height": 'toggle', "duration": 500}, show: function(clicked, show) { $("#btn_submit").attr("search", $(show.tab).attr("id")); $("#tabbar ul li a").each(function(i) { $(this).attr("class", ""); }); $(show.tab).attr("class", "select"); }
public function logout() { try { //log report// $this->load->model("User_login", "mod_ul"); $logi["msg"] = "Logged out as " . $this->data['loggedin']["user_fullname"] . "[" . $this->data['loggedin']["user_name"] . "] at " . date("Y-M-d H:i:s"); $this->mod_ul->log_info($logi); unset($logi); //end log report// //$this->session->sess_destroy(); $this->session->destroy(); redirect(admin_base_url() . 'home/'); } catch (Exception $err_obj) { show_error($err_obj->getMessage()); } }
function create_sub_menus2($parent_id, $i_main_menu, $i_sub_menu) { try { $s_ret_ = ""; $CI =& get_instance(); $admin_loggedin = $CI->session->userdata("admin_loggedin"); $CI->load->model('menu_model'); $s_wh_cl = " WHERE i_parent_id = {$parent_id} AND i_main_id!=-99"; $sub_menu = $CI->menu_model->fetch_menus_navigation($s_wh_cl, decrypt($admin_loggedin['user_type_id'])); foreach ($sub_menu as $con => $mnus) { if ($mnus['i_total_controls'] > 0) { $s_link = $mnus["s_link"] != "" ? admin_base_url() . $mnus["s_link"] : "javascript:void(0);"; $s_ret_ .= '<li><a id="mnu_' . $i_main_menu . '_' . $i_sub_menu . '_' . $con . '" href="' . $s_link . '">' . $mnus['s_name'] . '</a>'; $s_ret_ .= '</li>'; } } ///end for ////end Sub sub menu exists i.e layer 2/////// unset($con, $mnus, $s_link, $admin_loggedin); ///end if return $s_ret_ != "" ? '<ul class="sub2">' . $s_ret_ . '</ul>' : ''; } catch (Exception $err_obj) { show_error($err_obj->getMessage()); } }
public function delete($id) { $vehicle = $this->Model_vehical->get_vehical($id); if (!$id || !$vehicle) { show_error('Invalid vehical ID.'); } $this->Model_vehical->delete($id); $this->redirectTO(admin_base_url('lists'), "The vehical successfully deleted."); }