当前位置: 首页>>代码示例>>PHP>>正文


PHP check_menu函数代码示例

本文整理汇总了PHP中check_menu函数的典型用法代码示例。如果您正苦于以下问题:PHP check_menu函数的具体用法?PHP check_menu怎么用?PHP check_menu使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了check_menu函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 function __construct()
 {
     date_default_timezone_set('Asia/Jakarta');
     parent::__construct();
     check_address();
     check_login();
     if (!check_menu()) {
         redirect(base_url() . 'dashboard/');
     }
     $this->load->model('Model_inventory_correction');
     $this->load->model('Model_products_variant_detail');
 }
开发者ID:nochtavio,项目名称:storefrontcms,代码行数:12,代码来源:Inventory_correction.php

示例2: get_data

 public function get_data()
 {
     //param
     $param['name'] = $this->input->post('name', TRUE) ? $this->input->post('name', TRUE) : "";
     $param['code'] = $this->input->post('code', TRUE) ? $this->input->post('code', TRUE) : "";
     $param['discount_type'] = $this->input->post('discount_type', TRUE) ? $this->input->post('discount_type', TRUE) : 0;
     $param['transaction_type'] = $this->input->post('transaction_type', TRUE) ? $this->input->post('transaction_type', TRUE) : 0;
     $param['active'] = $this->input->post('active', TRUE) ? $this->input->post('active', TRUE) : 0;
     $param['order'] = $this->input->post('order', TRUE) ? $this->input->post('order', TRUE) : -1;
     //end param
     //paging
     $get_data = $this->Model_voucher->get_data($param);
     $page = $this->input->post('page', TRUE) ? $this->input->post('page', TRUE) : 1;
     $size = $this->input->post('size', TRUE) ? $this->input->post('size', TRUE) : 10;
     $limit = ($page - 1) * $size;
     //End Set totalpaging
     if ($get_data->num_rows() > 0) {
         $get_data_paging = $this->Model_voucher->get_data($param, $limit, $size);
         $temp = 0;
         foreach ($get_data_paging->result() as $row) {
             $data['result'] = "r1";
             $data['id'][$temp] = $row->id;
             $data['name'][$temp] = $row->name;
             $data['code'][$temp] = $row->code;
             $data['discount_type'][$temp] = $row->discount_type;
             $data['transaction_type'][$temp] = $row->transaction_type;
             $data['value'][$temp] = number_format($row->value);
             $data['usage'][$temp] = number_format($row->usage);
             $data['start_date'][$temp] = $row->start_date == NULL ? NULL : date_format(date_create($row->start_date), 'd F Y H:i:s');
             $data['end_date'][$temp] = $row->end_date == NULL ? NULL : date_format(date_create($row->end_date), 'd F Y H:i:s');
             $data['active'][$temp] = $row->active;
             $data['cretime'][$temp] = date_format(date_create($row->cretime), 'd F Y H:i:s');
             $data['creby'][$temp] = $row->creby;
             $data['modtime'][$temp] = $row->modtime == NULL ? NULL : date_format(date_create($row->modtime), 'd F Y H:i:s');
             $data['modby'][$temp] = $row->modby;
             $temp++;
         }
         $data['allowed_edit'] = check_menu("", 2);
         $data['allowed_delete'] = check_menu("", 3);
         $data['total'] = $temp;
         $data['size'] = $size;
         $data['totalpage'] = ceil($get_data->num_rows() / $size);
     } else {
         $data['result'] = "r2";
         $data['message'] = "No Voucher";
     }
     echo json_encode($data);
 }
开发者ID:nochtavio,项目名称:storefrontcms,代码行数:48,代码来源:Voucher.php

示例3: get_data

 public function get_data()
 {
     //param
     $param['url'] = $this->input->post('url', TRUE) ? $this->input->post('url', TRUE) : '';
     $param['link'] = $this->input->post('link', TRUE) ? $this->input->post('link', TRUE) : '';
     $param['active'] = $this->input->post('active', TRUE) ? $this->input->post('active', TRUE) : 0;
     $param['order'] = $this->input->post('order', TRUE) ? $this->input->post('order', TRUE) : -1;
     //end param
     //paging
     $get_data = $this->Model_slider->get_data($param);
     $page = $this->input->post('page', TRUE) ? $this->input->post('page', TRUE) : 1;
     $size = $this->input->post('size', TRUE) ? $this->input->post('size', TRUE) : 10;
     $limit = ($page - 1) * $size;
     //End Set totalpaging
     if ($get_data->num_rows() > 0) {
         $get_data_paging = $this->Model_slider->get_data($param, $limit, $size);
         $temp = 0;
         foreach ($get_data_paging->result() as $row) {
             $data['result'] = "r1";
             $data['id'][$temp] = $row->id;
             $data['show_order'][$temp] = $row->show_order;
             $data['url'][$temp] = $row->url;
             $data['link'][$temp] = $row->link;
             $data['target'][$temp] = $row->target;
             $data['title'][$temp] = $row->title;
             $data['description'][$temp] = $row->description;
             $data['additional_text'][$temp] = $row->additional_text;
             $data['active'][$temp] = $row->active;
             $data['cretime'][$temp] = date_format(date_create($row->cretime), 'd F Y H:i:s');
             $data['creby'][$temp] = $row->creby;
             $data['modtime'][$temp] = $row->modtime == NULL ? NULL : date_format(date_create($row->modtime), 'd F Y H:i:s');
             $data['modby'][$temp] = $row->modby;
             $temp++;
         }
         $data['allowed_edit'] = check_menu("", 2);
         $data['allowed_delete'] = check_menu("", 3);
         $data['total'] = $temp;
         $data['size'] = $size;
         $data['totalpage'] = ceil($get_data->num_rows() / $size);
     } else {
         $data['result'] = "r2";
         $data['message'] = "No Slider";
     }
     echo json_encode($data);
 }
开发者ID:nochtavio,项目名称:storefrontcms,代码行数:45,代码来源:Slider.php

示例4: get_data

 public function get_data()
 {
     //param
     $param['name'] = $this->input->post('name', TRUE) ? $this->input->post('name', TRUE) : "";
     $param['store_name'] = $this->input->post('store_name', TRUE) ? $this->input->post('store_name', TRUE) : "";
     $param['email'] = $this->input->post('email', TRUE) ? $this->input->post('email', TRUE) : "";
     $param['phone'] = $this->input->post('phone', TRUE) ? $this->input->post('phone', TRUE) : "";
     $param['status'] = $this->input->post('status', TRUE) ? $this->input->post('status', TRUE) : -1;
     $param['minimum_wallet'] = $this->input->post('minimum_wallet', TRUE) ? $this->input->post('minimum_wallet', TRUE) : -1;
     $param['order'] = $this->input->post('order', TRUE) ? $this->input->post('order', TRUE) : -1;
     //end param
     //paging
     $get_data = $this->Model_reseller->get_data($param);
     $page = $this->input->post('page', TRUE) ? $this->input->post('page', TRUE) : 1;
     $size = $this->input->post('size', TRUE) ? $this->input->post('size', TRUE) : 10;
     $limit = ($page - 1) * $size;
     //End Set totalpaging
     if ($get_data->num_rows() > 0) {
         $get_data_paging = $this->Model_reseller->get_data($param, $limit, $size);
         $temp = 0;
         foreach ($get_data_paging->result() as $row) {
             $data['result'] = "r1";
             $data['id'][$temp] = $row->id;
             $data['name'][$temp] = $row->name;
             $data['store_name'][$temp] = $row->store_name;
             $data['email'][$temp] = $row->email;
             $data['phone'][$temp] = $row->phone;
             $data['wallet'][$temp] = number_format($row->wallet);
             $data['status'][$temp] = $row->status;
             $data['cretime'][$temp] = date_format(date_create($row->cretime), 'd F Y H:i:s');
             $data['modtime'][$temp] = $row->modtime == NULL ? NULL : date_format(date_create($row->modtime), 'd F Y H:i:s');
             $temp++;
         }
         $data['allowed_edit'] = check_menu("", 2);
         $data['allowed_delete'] = check_menu("", 3);
         $data['total'] = $temp;
         $data['size'] = $size;
         $data['totalpage'] = ceil($get_data->num_rows() / $size);
     } else {
         $data['result'] = "r2";
         $data['message'] = "No Reseller";
     }
     echo json_encode($data);
 }
开发者ID:nochtavio,项目名称:storefrontcms,代码行数:44,代码来源:Reseller.php

示例5: get_data

 public function get_data()
 {
     //param
     $param['purchase_code'] = $this->input->post('purchase_code', TRUE) ? $this->input->post('purchase_code', TRUE) : "";
     $param['customer_email'] = $this->input->post('customer_email', TRUE) ? $this->input->post('customer_email', TRUE) : "";
     $param['start_date'] = $this->input->post('start_date', TRUE) ? $this->input->post('start_date', TRUE) : "";
     $param['end_date'] = $this->input->post('end_date', TRUE) ? $this->input->post('end_date', TRUE) : "";
     $param['status_payment'] = $this->input->post('status_payment', TRUE) ? $this->input->post('status_payment', TRUE) : -1;
     $param['status'] = $this->input->post('status', TRUE) ? $this->input->post('status', TRUE) : 0;
     $param['order'] = $this->input->post('order', TRUE) ? $this->input->post('order', TRUE) : -1;
     //end param
     //paging
     $get_data = $this->Model_order->get_data($param);
     $page = $this->input->post('page', TRUE) ? $this->input->post('page', TRUE) : 1;
     $size = $this->input->post('size', TRUE) ? $this->input->post('size', TRUE) : 10;
     $limit = ($page - 1) * $size;
     //End Set totalpaging
     if ($get_data->num_rows() > 0) {
         $get_data_paging = $this->Model_order->get_data($param, $limit, $size);
         $temp = 0;
         foreach ($get_data_paging->result() as $row) {
             $data['result'] = "r1";
             $data['id'][$temp] = $row->order_id;
             $data['purchase_code'][$temp] = $row->purchase_code;
             $data['customer_email'][$temp] = $row->customer_email;
             $data['payment_name'][$temp] = $row->payment_name;
             $data['confirm_transfer_by'][$temp] = $row->confirm_transfer_by == NULL ? "" : $row->confirm_transfer_by;
             $data['confirm_transfer_bank'][$temp] = $row->confirm_transfer_bank == NULL ? "" : $row->confirm_transfer_bank;
             $data['confirm_transfer_amount'][$temp] = $row->confirm_transfer_amount == NULL ? "" : number_format($row->confirm_transfer_amount);
             $data['status'][$temp] = $row->status;
             $data['purchase_date'][$temp] = date_format(date_create($row->purchase_date), 'd F Y H:i:s');
             $data['updated_by'][$temp] = $row->updated_by == NULL ? "" : $row->updated_by;
             $temp++;
         }
         $data['allowed_edit'] = check_menu("", 2);
         $data['total'] = $temp;
         $data['size'] = $size;
         $data['totalpage'] = ceil($get_data->num_rows() / $size);
     } else {
         $data['result'] = "r2";
         $data['message'] = "No Order";
     }
     echo json_encode($data);
 }
开发者ID:nochtavio,项目名称:storefrontcms,代码行数:44,代码来源:Order.php

示例6: get_data

 public function get_data()
 {
     //param
     $param['purchase_code'] = $this->input->post('purchase_code', TRUE) ? $this->input->post('purchase_code', TRUE) : "";
     $param['customer_email'] = $this->input->post('customer_email', TRUE) ? $this->input->post('customer_email', TRUE) : "";
     $param['status'] = $this->input->post('status', TRUE) ? $this->input->post('status', TRUE) : 0;
     $param['order'] = $this->input->post('order', TRUE) ? $this->input->post('order', TRUE) : -1;
     //end param
     //paging
     $get_data = $this->Model_customer_return->get_data($param);
     $page = $this->input->post('page', TRUE) ? $this->input->post('page', TRUE) : 1;
     $size = $this->input->post('size', TRUE) ? $this->input->post('size', TRUE) : 10;
     $limit = ($page - 1) * $size;
     //End Set totalpaging
     if ($get_data->num_rows() > 0) {
         $get_data_paging = $this->Model_customer_return->get_data($param, $limit, $size);
         $temp = 0;
         foreach ($get_data_paging->result() as $row) {
             $data['result'] = "r1";
             $data['id'][$temp] = $row->id;
             $data['purchase_code'][$temp] = $row->purchase_code;
             $data['products_name'][$temp] = $row->products_name;
             $data['SKU'][$temp] = $row->SKU;
             $data['qty'][$temp] = $row->qty;
             $data['customer_email'][$temp] = $row->customer_email;
             $data['status'][$temp] = $row->status;
             $data['cretime'][$temp] = date_format(date_create($row->cretime), 'd F Y H:i:s');
             $data['creby'][$temp] = $row->creby;
             $data['modtime'][$temp] = $row->modtime == NULL ? NULL : date_format(date_create($row->modtime), 'd F Y H:i:s');
             $data['modby'][$temp] = $row->modby;
             $temp++;
         }
         $data['allowed_edit'] = check_menu("", 2);
         $data['allowed_delete'] = check_menu("", 3);
         $data['total'] = $temp;
         $data['size'] = $size;
         $data['totalpage'] = ceil($get_data->num_rows() / $size);
     } else {
         $data['result'] = "r2";
         $data['message'] = "No Customer Return";
     }
     echo json_encode($data);
 }
开发者ID:nochtavio,项目名称:storefrontcms,代码行数:43,代码来源:Customer_return.php

示例7: get_data

 public function get_data()
 {
     //param
     $param['email'] = $this->input->post('email', TRUE) ? $this->input->post('email', TRUE) : "";
     $param['type'] = $this->input->post('type', TRUE) ? $this->input->post('type', TRUE) : 0;
     $param['credit_log_type'] = $this->input->post('credit_log_type', TRUE) ? $this->input->post('credit_log_type', TRUE) : 0;
     $param['status'] = $this->input->post('status', TRUE) ? $this->input->post('status', TRUE) : 0;
     $param['order'] = $this->input->post('order', TRUE) ? $this->input->post('order', TRUE) : -1;
     //end param
     //paging
     $get_data = $this->Model_credit_log->get_data($param);
     $page = $this->input->post('page', TRUE) ? $this->input->post('page', TRUE) : 1;
     $size = $this->input->post('size', TRUE) ? $this->input->post('size', TRUE) : 20;
     $limit = ($page - 1) * $size;
     //End Set totalpaging
     if ($get_data->num_rows() > 0) {
         $get_data_paging = $this->Model_credit_log->get_data($param, $limit, $size);
         $temp = 0;
         foreach ($get_data_paging->result() as $row) {
             $data['result'] = "r1";
             $data['id'][$temp] = $row->id;
             $data['email'][$temp] = $row->customer_email != NULL ? $row->customer_email : $row->email;
             $data['credit_log_type'][$temp] = $row->id_customer == 1 ? 'Customer' : 'Reseller';
             $data['amount'][$temp] = number_format($row->amount);
             $data['type'][$temp] = $row->type;
             $data['description'][$temp] = $row->description;
             $data['payment_method'][$temp] = $row->payment_method;
             $data['status'][$temp] = $row->status;
             $data['cretime'][$temp] = date_format(date_create($row->cretime), 'd F Y H:i:s');
             $data['modtime'][$temp] = $row->modtime == NULL ? NULL : date_format(date_create($row->modtime), 'd F Y H:i:s');
             $data['modby'][$temp] = $row->modby;
             $temp++;
         }
         $data['allowed_edit'] = check_menu("", 2);
         $data['total'] = $temp;
         $data['size'] = $size;
         $data['totalpage'] = ceil($get_data->num_rows() / $size);
     } else {
         $data['result'] = "r2";
         $data['message'] = "No Credit_log";
     }
     echo json_encode($data);
 }
开发者ID:nochtavio,项目名称:storefrontcms,代码行数:43,代码来源:Credit_log.php

示例8: get_data

 public function get_data()
 {
     //param
     $param['customer_email'] = $this->input->post('customer_email', TRUE) ? $this->input->post('customer_email', TRUE) : "";
     $param['name'] = $this->input->post('name', TRUE) ? $this->input->post('name', TRUE) : "";
     $param['customer_gender'] = $this->input->post('customer_gender', TRUE) ? $this->input->post('customer_gender', TRUE) : -1;
     $param['customer_province'] = $this->input->post('customer_province', TRUE) ? $this->input->post('customer_province', TRUE) : "";
     $param['customer_city'] = $this->input->post('customer_city', TRUE) ? $this->input->post('customer_city', TRUE) : "";
     $param['customer_status'] = $this->input->post('customer_status', TRUE) ? $this->input->post('customer_status', TRUE) : 0;
     $param['order'] = $this->input->post('order', TRUE) ? $this->input->post('order', TRUE) : -1;
     //end param
     //paging
     $get_data = $this->Model_customer->get_data($param);
     $page = $this->input->post('page', TRUE) ? $this->input->post('page', TRUE) : 1;
     $size = $this->input->post('size', TRUE) ? $this->input->post('size', TRUE) : 10;
     $limit = ($page - 1) * $size;
     //End Set totalpaging
     if ($get_data->num_rows() > 0) {
         $get_data_paging = $this->Model_customer->get_data($param, $limit, $size);
         $temp = 0;
         foreach ($get_data_paging->result() as $row) {
             $data['result'] = "r1";
             $data['customer_id'][$temp] = $row->customer_id;
             $data['customer_email'][$temp] = $row->customer_email;
             $data['name'][$temp] = $row->customer_fname . " " . $row->customer_lname;
             $data['customer_province'][$temp] = $row->customer_province;
             $data['customer_city'][$temp] = $row->customer_city;
             $data['customer_status'][$temp] = $row->customer_status;
             $data['customer_registration_date'][$temp] = date_format(date_create($row->customer_registration_date), 'd F Y H:i:s');
             $data['last_modified'][$temp] = $row->last_modified == NULL ? NULL : date_format(date_create($row->last_modified), 'd F Y H:i:s');
             $temp++;
         }
         $data['allowed_edit'] = check_menu("", 2);
         $data['total'] = $temp;
         $data['size'] = $size;
         $data['totalpage'] = ceil($get_data->num_rows() / $size);
     } else {
         $data['result'] = "r2";
         $data['message'] = "No Customer";
     }
     echo json_encode($data);
 }
开发者ID:nochtavio,项目名称:storefrontcms,代码行数:42,代码来源:Customer.php

示例9: get_data

 public function get_data()
 {
     //param
     $param['products_name'] = $this->input->post('products_name', TRUE) ? $this->input->post('products_name', TRUE) : "";
     $param['SKU'] = $this->input->post('SKU', TRUE) ? $this->input->post('SKU', TRUE) : "";
     $param['reseller_email'] = $this->input->post('reseller_email', TRUE) ? $this->input->post('reseller_email', TRUE) : "";
     $param['reseller_name'] = $this->input->post('reseller_name', TRUE) ? $this->input->post('reseller_name', TRUE) : "";
     $param['order'] = $this->input->post('order', TRUE) ? $this->input->post('order', TRUE) : -1;
     //end param
     //paging
     $get_data = $this->Model_order_item->get_data($param);
     $page = $this->input->post('page', TRUE) ? $this->input->post('page', TRUE) : 1;
     $size = $this->input->post('size', TRUE) ? $this->input->post('size', TRUE) : 10;
     $limit = ($page - 1) * $size;
     //End Set totalpaging
     if ($get_data->num_rows() > 0) {
         $get_data_paging = $this->Model_order_item->get_data($param, $limit, $size);
         $temp = 0;
         foreach ($get_data_paging->result() as $row) {
             $data['result'] = "r1";
             $data['id'][$temp] = $row->order_item_id;
             $data['products_name'][$temp] = $row->products_name;
             $data['SKU'][$temp] = $row->SKU;
             $data['color_name'][$temp] = $row->color_name;
             $data['reseller_email'][$temp] = $row->reseller_email;
             $data['reseller_name'][$temp] = $row->reseller_name;
             $data['quantity'][$temp] = $row->quantity;
             $temp++;
         }
         $data['allowed_edit'] = check_menu("", 2);
         $data['allowed_delete'] = check_menu("", 3);
         $data['total'] = $temp;
         $data['size'] = $size;
         $data['totalpage'] = ceil($get_data->num_rows() / $size);
     } else {
         $data['result'] = "r2";
         $data['message'] = "No Data";
     }
     echo json_encode($data);
 }
开发者ID:nochtavio,项目名称:storefrontcms,代码行数:40,代码来源:Order_item.php

示例10: get_data

 public function get_data()
 {
     //param
     $param['id_category'] = $this->input->post('id_category', TRUE) ? $this->input->post('id_category', TRUE) : 0;
     $param['name'] = $this->input->post('name', TRUE) ? $this->input->post('name', TRUE) : "";
     $param['active'] = $this->input->post('active', TRUE) ? $this->input->post('active', TRUE) : 0;
     $param['order'] = $this->input->post('order', TRUE) ? $this->input->post('order', TRUE) : -1;
     //end param
     //paging
     $get_data = $this->Model_category_child->get_data($param);
     $page = $this->input->post('page', TRUE) ? $this->input->post('page', TRUE) : 1;
     $size = $this->input->post('size', TRUE) ? $this->input->post('size', TRUE) : 10;
     $limit = ($page - 1) * $size;
     //End Set totalpaging
     if ($get_data->num_rows() > 0) {
         $get_data_paging = $this->Model_category_child->get_data($param, $limit, $size);
         $temp = 0;
         foreach ($get_data_paging->result() as $row) {
             $data['result'] = "r1";
             $data['id'][$temp] = $row->id;
             $data['name'][$temp] = $row->name;
             $data['url'][$temp] = $row->url;
             $data['active'][$temp] = $row->active;
             $data['cretime'][$temp] = date_format(date_create($row->cretime), 'd F Y H:i:s');
             $data['creby'][$temp] = $row->creby;
             $data['modtime'][$temp] = $row->modtime == NULL ? NULL : date_format(date_create($row->modtime), 'd F Y H:i:s');
             $data['modby'][$temp] = $row->modby;
             $temp++;
         }
         $data['allowed_edit'] = check_menu("", 2);
         $data['allowed_delete'] = check_menu("", 3);
         $data['total'] = $temp;
         $data['size'] = $size;
         $data['totalpage'] = ceil($get_data->num_rows() / $size);
     } else {
         $data['result'] = "r2";
         $data['message'] = "No Categories";
     }
     echo json_encode($data);
 }
开发者ID:nochtavio,项目名称:storefrontcms,代码行数:40,代码来源:Category_child.php

示例11: onAfterRoute


//.........这里部分代码省略.........
         $query = "SELECT * FROM `#__community_acl_access` WHERE `option` IN ( 'menu', '{$option}') AND " . ($back_end ? ' `isbackend` = 1 ' : ' `isfrontend` = 1 ') . " AND ( `group_id` IN ( '" . implode("','", $groups) . "') OR `role_id` IN ( '" . implode("','", $roles) . "') )";
     }
     $db->setQuery($query);
     $access = $db->loadObjectList();
     //What is a frole and fgroup???
     $froles = array();
     $fgroups = array();
     if (is_array($access) && count($access) > 0) {
         foreach ($access as $item) {
             //forbidden components
             //echo $item->name .', $option = '.$option. ' $item->role_id=' .$item->role_id; die();
             /**
              * Functions are not singling out articles
              * Attempting to trigger the logic to run checking functions for articles.
              * —BUR 8/2/2011
              */
             if ('###' === $item->name && 'com_content' === $item->option && 'com_content' === $option && !empty($cid) && in_array($task, array('unarchive', 'archive', 'publish', 'unpublish', 'movesect', 'copy', 'remove', 'edit', 'add', 'apply', 'save', 'cancel'))) {
                 if ($item->role_id == '0') {
                     $fgroups[] = $item->group_id;
                 } else {
                     $froles[] = $item->role_id;
                 }
             }
             /**
              * end
              */
             if ($item->name == '###' && $option == $item->option && ($option != 'com_content' && !($option == 'com_login' && $task == 'logout'))) {
                 if ($item->role_id == '0') {
                     $fgroups[] = $item->group_id;
                 } else {
                     $froles[] = $item->role_id;
                 }
             } elseif ($item->name == '###' && $item->option == 'menu') {
                 if (check_menu($item->value, $_REQUEST['Itemid'])) {
                     if ($config->default_action == 'allow') {
                         $_SESSION['cacl_redirect_url'] = $_SERVER['REQUEST_URI'];
                         $mainframe->redirect($redirect_url, JText::_('ALERTNOTAUTH'));
                     }
                 }
             } elseif ($item->name != '###') {
                 //forbidden content, sections, categiries
                 if ($back_end) {
                     if ('com_content' === $item->option && $option == 'com_content' && ($id == $item->value || in_array($item->value, $cid))) {
                         if ($item->role_id == '0') {
                             $fgroups[] = $item->group_id;
                         } else {
                             $froles[] = $item->role_id;
                         }
                     } elseif ($option == 'com_content' && ($item->option == 'com_sections' && $sectionid == $item->value || $item->option == 'com_categories' && $catid == $item->value)) {
                         if ($item->role_id == '0') {
                             $fgroups[] = $item->group_id;
                         } else {
                             $froles[] = $item->role_id;
                         }
                     } elseif ($option == 'com_sections' && ($id == $item->value || in_array($item->value, $cid))) {
                         if ($item->role_id == '0') {
                             $fgroups[] = $item->group_id;
                         } else {
                             $froles[] = $item->role_id;
                         }
                     } elseif ($option == 'com_categories' && ($id == $item->value || in_array($item->value, $cid))) {
                         if ($item->role_id == '0') {
                             $fgroups[] = $item->group_id;
                         } else {
                             $froles[] = $item->role_id;
                         }
开发者ID:vincethecoder,项目名称:community_acl,代码行数:67,代码来源:community_acl.php

示例12: check_menu

<?php

/**
 * Sidebar Plugins Template
 *
 * @package GetSimple
 */
?>
<ul class="snav">
	<li id="sb_plugins" ><a href="plugins.php" <?php 
check_menu('plugins');
?>
 accesskey="<?php 
echo find_accesskey(i18n_r('SHOW_PLUGINS'));
?>
" ><?php 
i18n('SHOW_PLUGINS');
?>
</a></li>
	<?php 
exec_action("plugins-sidebar");
?>
	<li id="sb_extend" ><a href="http://get-simple.info/extend/" target="_blank" accesskey="<?php 
echo find_accesskey(i18n_r('GET_PLUGINS_LINK'));
?>
" ><?php 
i18n('GET_PLUGINS_LINK');
?>
</a></li>
</ul>
开发者ID:google-code-backups,项目名称:get-simple-cms,代码行数:30,代码来源:sidebar-plugins.php

示例13: find_accesskey

?>
 accesskey="<?php 
echo find_accesskey(i18n_r('SIDE_SUPPORT_LOG'));
?>
" ><?php 
i18n('SIDE_SUPPORT_LOG');
?>
</a></li>
	<?php 
if (get_filename_id() === 'log') {
    ?>
<li id="sb_log" ><a href="#"  class="current" ><?php 
    i18n('SIDE_VIEW_LOG');
    ?>
</a></li><?php 
}
?>
	<li id="sb_healthcheck" ><a href="health-check.php" <?php 
check_menu('health-check');
?>
 accesskey="<?php 
echo find_accesskey(i18n_r('SIDE_HEALTH_CHK'));
?>
" ><?php 
i18n('SIDE_HEALTH_CHK');
?>
</a></li>
	<?php 
exec_action("support-sidebar");
?>
</ul>
开发者ID:Emmett-Brown,项目名称:linea,代码行数:31,代码来源:sidebar-support.php

示例14: get_data

 public function get_data()
 {
     //param
     $param['type'] = $this->input->post('type', TRUE) ? $this->input->post('type', TRUE) : 0;
     //end param
     //paging
     $get_data = $this->Model_static_content->get_data($param);
     $page = $this->input->post('page', TRUE) ? $this->input->post('page', TRUE) : 1;
     $size = $this->input->post('size', TRUE) ? $this->input->post('size', TRUE) : 20;
     $limit = ($page - 1) * $size;
     //End Set totalpaging
     if ($get_data->num_rows() > 0) {
         $get_data_paging = $this->Model_static_content->get_data($param, $limit, $size);
         $temp = 0;
         foreach ($get_data_paging->result() as $row) {
             $data['result'] = "r1";
             $data['id'][$temp] = $row->id;
             $data['name'][$temp] = $row->name;
             $data['type'][$temp] = $row->type;
             $data['type_name'][$temp] = $this->get_type_name($row->type);
             $data['modtime'][$temp] = $row->modtime == NULL ? NULL : date_format(date_create($row->modtime), 'd F Y H:i:s');
             $data['modby'][$temp] = $row->modby;
             $temp++;
         }
         $data['allowed_edit'] = check_menu("", 2);
         $data['allowed_delete'] = check_menu("", 3);
         $data['total'] = $temp;
         $data['size'] = $size;
         $data['totalpage'] = ceil($get_data->num_rows() / $size);
     } else {
         $data['result'] = "r2";
         $data['message'] = "No Data";
     }
     echo json_encode($data);
 }
开发者ID:nochtavio,项目名称:storefrontcms,代码行数:35,代码来源:Static_content.php

示例15: find_accesskey

?>
 accesskey="<?php 
echo find_accesskey(i18n_r('SIDE_PAGE_BAK'));
?>
" ><?php 
i18n('SIDE_PAGE_BAK');
?>
</a></li>
	<?php 
if (get_filename_id() === 'backup-edit') {
    ?>
<li id="sb_viewbackup" ><a href="#" class="current"><?php 
    i18n('SIDE_VIEW_BAK');
    ?>
</a></li><?php 
}
?>
	<li id="sb_archives" ><a href="archive.php" <?php 
check_menu('archive');
?>
 accesskey="<?php 
echo find_accesskey(i18n_r('SIDE_WEB_ARCHIVES'));
?>
" ><?php 
i18n('SIDE_WEB_ARCHIVES');
?>
</a></li>
	<?php 
exec_action("backups-sidebar");
?>
</ul>
开发者ID:Foltys,项目名称:Masopust,代码行数:31,代码来源:sidebar-backups.php


注:本文中的check_menu函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。