Beispiel #1
0
 public function index($status = NULL)
 {
     //权限检查 得到所有可管理站点ID列表
     role::check('contact_us');
     $this->template->content = new View("user/contact_us_list");
     //搜索功能
     $search_arr = array('id', 'email', 'name', 'message', 'ip');
     $where = array();
     $where_view = array();
     if ($search_arr) {
         foreach ($search_arr as $search_value) {
             if ($this->input->get('search_type') == $search_value && strlen($this->input->get('search_value'))) {
                 $where[$search_value] = $this->input->get('search_value');
                 if ($search_value == 'ip') {
                     $where[$search_value] = tool::myip2long($this->input->get('search_value'));
                 }
             }
         }
         $where_view['search_type'] = $this->input->get('search_type');
         $where_view['search_value'] = $this->input->get('search_value');
     }
     //列表排序
     $orderby_arr = array(0 => array('id' => 'DESC'), 1 => array('id' => 'ASC'), 2 => array('id' => 'ASC'), 3 => array('id' => 'DESC'), 4 => array('email' => 'ASC'), 5 => array('email' => 'DESC'), 6 => array('name' => 'ASC'), 7 => array('name' => 'DESC'), 8 => array('message' => 'ASC'), 9 => array('message' => 'DESC'), 10 => array('date_add' => 'ASC'), 11 => array('date_add' => 'DESC'), 12 => array('ip' => 'ASC'), 13 => array('ip' => 'DESC'));
     $orderby = controller_tool::orderby($orderby_arr);
     //每页显示条数
     $per_page = controller_tool::per_page();
     //调用分页
     if (isset($status) && $status == 'active') {
         $where['active'] = 1;
     }
     $this->pagination = new Pagination(array('total_items' => Mycontact_us::instance()->count($where), 'items_per_page' => $per_page));
     //调用列表
     $this->template->content->contact_us_list = Mycontact_us::instance()->contact_uses($where, $orderby, $per_page, $this->pagination->sql_offset);
     $this->template->content->where = $where_view;
 }
Beispiel #2
0
 public function index($status = null)
 {
     $per_page = controller_tool::per_page();
     $lotyid = lottnum::getlottid($status);
     $where = array('lottyid' => $lotyid);
     //初始化默认查询结构体
     $query_struct_default = array('orderby' => array('id' => 'DESC'), 'limit' => array('per_page' => $per_page, 'page' => 1), 'where' => $where);
     $jobobj = Lotty_jobService::get_instance();
     $return_data['count'] = $jobobj->count($query_struct_default);
     //统计数量
     /* 调用分页 */
     $this->pagination = new Pagination(array('total_items' => $return_data['count'], 'items_per_page' => $query_struct_default['limit']['per_page']));
     $query_struct_default['limit']['page'] = $this->pagination->current_page;
     $return_data['list'] = $jobobj->query_assoc($query_struct_default);
     //彩种配置
     $lottconfig = Kohana::config("ticket_type.type");
     $return_data['lottconfig'] = $lottconfig;
     //任务状态说明
     $lottnumconfig = Kohana::config("lottnum");
     $return_data['jobstatconfig'] = $lottnumconfig['jobstat'];
     $return_data['jobtype'] = $lottnumconfig['jobtype'];
     $return_data['status'] = is_null($status) ? 'dlt' : $status;
     //近10期期号列表
     $return_data['issues'] = lottnum::getissue(is_null($status) ? 'dlt' : $status);
     $this->template->content = new View("lottnum/jobs", $return_data);
 }
Beispiel #3
0
 /**
  * 后台用户列表
  */
 public function index()
 {
     //zhu add
     role::check('manage_merchant');
     $query_struct = array();
     /* 管理员才能显示分页 */
     $show_page = false;
     //zhu modify
     if (role::is_root()) {
         $show_page = true;
         $per_page = controller_tool::per_page();
         $this->pagination = new Pagination(array('total_items' => Mymanager::instance()->count($query_struct), 'items_per_page' => $per_page));
         $order_by = array('id' => 'DESC');
         $managers = Mymanager::instance()->managers($query_struct, $order_by, $per_page, $this->pagination->sql_offset);
     } else {
         $managers = Mymanager::instance()->subs($this->manager_id);
     }
     foreach ($managers as $managers_key => $managers_value) {
         /* 账号列表中把自己的账号排除、root帐号排除 zhu */
         if ($managers_value['id'] == $this->manager_id || role::is_root($managers_value['username'])) {
             unset($managers[$managers_key]);
             continue;
         }
         $parent_email = Mymanager::instance($managers_value['parent_id'])->get('email');
         $managers[$managers_key]['parent_email'] = empty($parent_email) ? '无' : $parent_email;
     }
     $this->template->content = new View("manage/manager_list");
     $this->template->content->managers = $managers;
     $this->template->content->show_page = $show_page;
 }
Beispiel #4
0
 /**
  * 列表
  */
 public function index()
 {
     $this->template->content = new View("manage/role_list");
     //调用分页
     $per_page = controller_tool::per_page();
     $this->pagination = new Pagination(array('total_items' => Myrole::instance()->count(), 'items_per_page' => $per_page));
     //管理员可能查看所有的用户组,其实只能看到对应等级下面的用户组
     if ($this->manager_is_admin == 1) {
         $roles = Myrole::instance()->roles();
     } else {
         $role_id = Mymanager::instance($this->manager_id)->get('role_id');
         $roles = Myrole::instance()->childrens($role_id);
     }
     foreach ($roles as $k => $v) {
         //显示图片标识
         $roles[$k]['active_img'] = view_tool::get_active_img($v['active']);
         $roles[$k]['type_name'] = 'merchant';
         if ($v['type'] == 1) {
             $roles[$k]['type_name'] = 'admin';
         }
         //列表中显示上级用户组
         $roles[$k]['parent_name'] = '空';
         if ($v['parent_id'] > 0) {
             $role = Myrole::instance($v['parent_id'])->get();
             $roles[$k]['parent_name'] = $role['name'];
         }
     }
     $this->template->content->roles = $roles;
 }
Beispiel #5
0
 /**
  * 列表
  */
 public function index()
 {
     $query_struct = array();
     /**
      * 搜索
      */
     $search_value = $this->input->get('search_value');
     if ($search_value) {
         $query_struct['where']['mail_category_id'] = $search_value;
     }
     //调用分页
     $per_page = controller_tool::per_page();
     $this->pagination = new Pagination(array('total_items' => Mymail_template::instance()->count($query_struct), 'items_per_page' => $per_page));
     $mail_templates = Mymail_template::instance()->mail_templates($query_struct, array('id' => 'DESC'), $per_page, $this->pagination->sql_offset);
     foreach ($mail_templates as $k => $v) {
         foreach ($v as $key => $value) {
             if (!is_numeric($value) && empty($value)) {
                 $mail_templates[$k][$key] = 'NULL';
             }
         }
         $mail_templates[$k]['content_small'] = strip_tags(text::limit_words($v['content'], 30));
         $mail_templates[$k]['active_img'] = view_tool::get_active_img($v['active']);
     }
     $mail_categories = Mymail_category::instance()->mail_categories();
     $this->template->content = new View("manage/mail_template_list");
     $this->template->content->mail_templates = $mail_templates;
     $this->template->content->mail_categories = $mail_categories;
 }
 /**
  * 物流对应的地区列表
  */
 function index($id)
 {
     if (!$id) {
         remind::set(Kohana::lang('o_global.bad_request'), request::referrer(), 'error');
     }
     $deliverycn_service = DeliverycnService::get_instance();
     $deliverycn_region_service = Deliverycn_regionService::get_instance();
     //验证此条物流
     $data = $deliverycn_service->get($id);
     if (!$data['id']) {
         remind::set(Kohana::lang('o_global.access_denied'), request::referrer(), 'error');
     }
     //初始化请求结构体
     $query_struct = array('where' => array('deliverycn_id' => $id), 'like' => array(), 'orderby' => array('position' => 'ASC', 'id' => 'ASC'), 'limit' => array('per_page' => 2000, 'offset' => 0));
     // 每页条目数
     controller_tool::request_per_page($query_struct, $request_data);
     $count = $deliverycn_region_service->query_count($query_struct);
     // 模板输出 分页
     $this->pagination = new Pagination(array('total_items' => $count, 'items_per_page' => $query_struct['limit']['per_page']));
     $query_struct['limit']['offset'] = $this->pagination->sql_offset;
     $query_struct['limit']['page'] = $this->pagination->current_page;
     //调用列表
     $deliverycn_regions = $deliverycn_region_service->get_delivery_regions_by_position($query_struct);
     $this->template->content = new View("site/deliverycn/region");
     $this->template->content->deliverycn_regions = $deliverycn_regions;
     $this->template->content->data = $data;
     $this->template->content->regions = $deliverycn_region_service->get_regions();
 }
Beispiel #7
0
 /**
  * 数据列表
  */
 public function index()
 {
     role::check('product_attribute');
     $return_struct = array('status' => 0, 'code' => 501, 'msg' => 'Not Implemented', 'content' => array());
     try {
         //$profiler = new Profiler;
         //* 初始化返回数据 */
         $return_data = array();
         //* 收集请求数据 ==根据业务逻辑定制== */
         $request_data = $this->input->get();
         // 执行业务逻辑
         //* 初始化默认查询结构体 */
         $query_struct_default = array('where' => array('apply' => self::ATTRIBUTE_TYPE), 'orderby' => array('id' => 'DESC'), 'limit' => array('per_page' => 20, 'page' => 1));
         //* 初始化当前查询结构体 */
         $query_struct_current = array();
         //* 设置合并默认查询条件到当前查询结构体 */
         $query_struct_current = array_merge($query_struct_current, $query_struct_default);
         //列表排序
         $orderby_arr = array(0 => array('id' => 'DESC'), 1 => array('id' => 'ASC'), 2 => array('name' => 'ASC'), 3 => array('name' => 'DESC'), 4 => array('order' => 'ASC'), 5 => array('order' => 'DESC'));
         $orderby = controller_tool::orderby($orderby_arr);
         // 排序处理
         if (isset($request_data['orderby']) && is_numeric($request_data['orderby'])) {
             $query_struct_current['orderby'] = $orderby;
         }
         // 每页条目数
         controller_tool::request_per_page($query_struct_current, $request_data);
         //调用服务执行查询
         $attribute_service = AttributeService::get_instance();
         $count = $attribute_service->count($query_struct_current);
         // 模板输出 分页
         $this->pagination = new Pagination(array('total_items' => $count, 'items_per_page' => $query_struct_current['limit']['per_page']));
         $query_struct_current['limit']['page'] = $this->pagination->current_page;
         $return_data['list'] = $attribute_service->get_attribute_options($query_struct_current);
         //* 补充&修改返回结构体 */
         $return_struct['status'] = 1;
         $return_struct['code'] = 200;
         $return_struct['msg'] = '';
         $return_struct['content'] = $return_data;
         //* 请求类型 */
         if ($this->is_ajax_request()) {
             // ajax 请求
             // json 输出
             $this->template->content = $return_struct;
         } else {
             // html 输出
             //* 模板输出 */
             $content = new View('product/' . $this->class_name . '/' . __FUNCTION__);
             //* 变量绑定 */
             $this->template->title = '规格管理';
             $this->template->content = $content;
             //* 请求结构数据绑定 */
             $this->template->content->request_data = $request_data;
             //* 返回结构体绑定 */
             $this->template->content->return_struct = $return_struct;
         }
         // end of request type determine
     } catch (MyRuntimeException $ex) {
         $this->_ex($ex, $request_data, $return_struct);
     }
 }
 public function index()
 {
     role::check('user_charge_orders');
     /* 初始化默认查询条件 */
     $user_query_struct = array('where' => array(), 'like' => array(), 'orderby' => array('id' => "DESC"), 'limit' => array('per_page' => 20, 'offset' => 0));
     /* 用户列表模板 */
     $this->template->content = new View("user/user_charge_orders");
     /* 搜索功能 */
     $search_arr = array('order_num');
     $search_value = $this->input->get('search_value');
     $where_view = array();
     $user_query_struct['like']['order_num'] = $search_value;
     //$user_query_struct['like']['ret_order_num'] = $search_value;
     $where_view['search_value'] = $search_value;
     /* 每页显示条数 */
     $per_page = controller_tool::per_page();
     $user_query_struct['limit']['per_page'] = $per_page;
     /* 调用分页 */
     $this->pagination = new Pagination(array('total_items' => User_chargeService::get_instance()->query_count($user_query_struct), 'items_per_page' => $per_page));
     //d($this->pagination->sql_offset);
     $user_query_struct['limit']['offset'] = $this->pagination->sql_offset;
     $users = User_chargeService::get_instance()->lists($user_query_struct);
     $userobj = user::get_instance();
     foreach ($users as $key => $rowuser) {
         $users[$key]['userinfo'] = $userobj->get($rowuser['user_id']);
     }
     /* 调用列表 */
     $this->template->content->user_list = $users;
     $this->template->content->where = $where_view;
     $this->template->content->pay_banks = Kohana::config('pay_banks');
 }
Beispiel #9
0
 public function index()
 {
     $news = Mynews::instance();
     $per_page = controller_tool::per_page();
     $orderby_arr = array(0 => array('id' => 'DESC'), 1 => array('id' => 'ASC'), 2 => array('order' => 'ASC'), 3 => array('order' => 'DESC'));
     $orderby = controller_tool::orderby($orderby_arr);
     $query_struct = array('where' => array(), 'orderby' => $orderby, 'limit' => array('per_page' => $per_page, 'offset' => 0));
     $total = $news->count_site_news();
     $this->pagination = new Pagination(array('base_url' => url::current(), 'uri_segment' => 'page', 'total_items' => $total, 'items_per_page' => $per_page, 'style' => 'digg'));
     $query_struct['limit']['offset'] = $this->pagination->sql_offset;
     $news = Mynews::instance()->lists($query_struct);
     $categorys = array();
     foreach ($news as $row) {
         $categorys[$row['classid']] = $row['classid'];
     }
     foreach ($categorys as $v) {
         $str = '';
         $aa = array('where' => array('id' => $v), 'like' => array(), 'limit' => array());
         $categories = Mynews_category::instance()->list_news_categories($aa);
         if (count($categories)) {
             $str = $categories[0]['category_name'];
             if ($categories[0]['parent_id'] > 0) {
                 $aa = array('where' => array('id' => $categories[0]['parent_id']), 'like' => array(), 'limit' => array());
                 $cate = Mynews_category::instance()->list_news_categories($aa);
                 $str = $cate[0]['category_name'] . ' > ' . $str;
             }
         }
         $categorys[$v] = $str;
     }
     $this->template->content = new View("site/news_list");
     $this->template->content->data = $news;
     $this->template->content->categorys = $categorys;
     $this->template->content->title = "site news list";
 }
Beispiel #10
0
 /**
  * 分类列表
  */
 public function index()
 {
     //* 权限验证 */
     $site_id = site::id();
     Myseo_manage::instance()->update_seo_manage_by_site_id($site_id);
     if ($site_id == 0) {
         remind::set('请首先进入所要操作的站点', request::referrer(), 'error');
     }
     $site_id_list = role::check('seo_manage', 0, 0);
     if (empty($site_id_list)) {
         remind::set('access denied', request::referrer(), 'error');
     }
     $query_struct = array();
     $query_struct = array('where' => array('site_id' => $site_id));
     $list_columns = array(array('name' => 'ID', 'column' => 'id', 'class_num' => '1'), array('name' => '分类', 'column' => 'parent_id', 'class_num' => '4'), array('name' => '包含子分类', 'column' => 'is_contain_child', 'class_num' => '3'), array('name' => 'Meta Title', 'column' => 'meta_title', 'class_num' => '5'), array('name' => 'Meta Keywords', 'column' => 'meta_keywords', 'class_num' => '5'), array('name' => 'Meta Description', 'column' => 'meta_description', 'class_num' => '6'), array('name' => '发布时间', 'column' => 'create_timestamp', 'class_num' => '5'), array('name' => '更新时间', 'column' => 'update_timestamp', 'class_num' => '5'));
     $this->template->content = new View("product/seo_manage_list");
     $this->template->content->list_columns = $list_columns;
     /**
      * 搜索
      */
     /*
     		$search_arr = array('site_domain','site_id');
     		
     		$search_type = $this->input->get('search_type');
     		$search_value = $this->input->get('search_value');
     		if($search_value&&$search_type)
     		{
     			if(in_array($search_type,$search_arr))
     			{
     				$query_struct['like'][$search_type] = $search_value;
     			}
     		}*/
     //调用分页
     $per_page = controller_tool::per_page();
     $this->pagination = new Pagination(array('total_items' => Myseo_manage::instance()->count($query_struct), 'items_per_page' => $per_page));
     $orderby = array('update_timestamp' => 'DESC');
     $seo_manages = Myseo_manage::instance()->seo_manages($query_struct, $orderby, $per_page, $this->pagination->sql_offset);
     $request_category = array('where' => array('site_id' => $site_id), 'like' => array(), 'orderby' => array());
     $category = Mycategory::instance()->lists($request_category);
     foreach ($category as $val) {
         $category_list[$val['id']] = $val;
     }
     foreach ($seo_manages as $seo_manages_key => $seo_manages_value) {
         $seo_manages[$seo_manages_key]['is_contain_child'] = view_tool::get_active_img($seo_manages_value['is_contain_child']);
         $seo_manages[$seo_manages_key]['meta_description'] = strip_tags(text::limit_words($seo_manages_value['meta_description'], 50));
         $seo_manages[$seo_manages_key]['create_timestamp'] = date('Y-m-d H:i:s', $seo_manages_value['create_timestamp']);
         $seo_manages[$seo_manages_key]['update_timestamp'] = date('Y-m-d H:i:s', $seo_manages_value['update_timestamp']);
         if ($seo_manages_value['parent_id'] && array_key_exists($seo_manages_value['parent_id'], $category_list)) {
             $seo_manages[$seo_manages_key]['parent_id'] = $category_list[$seo_manages_value['parent_id']]['name'];
         } else {
             $seo_manages[$seo_manages_key]['parent_id'] = '';
         }
         foreach ($seo_manages_value as $key => $value) {
             if (!is_numeric($value) && empty($value)) {
                 $seo_manages[$seo_manages_key][$key] = "NULL";
             }
         }
     }
     $this->template->content->seo_manages = $seo_manages;
 }
Beispiel #11
0
 /**
  * 列表
  */
 public function index()
 {
     //查询条件
     $query_struct = array('orderby' => array('id' => 'DESC'));
     /* 搜索 */
     $search_arr = array('title', 'content');
     $search_type = $this->input->get('search_type');
     $search_value = $this->input->get('search_value');
     if (!empty($search_value) && in_array($search_type, $search_arr)) {
         $query_struct['like'][$search_type] = $search_value;
     }
     $where_view['search_value'] = $search_value;
     //调用分页
     $per_page = controller_tool::per_page();
     $query_struct['per_page'] = $per_page;
     $this->pagination = new Pagination(array('total_items' => Mynotice::instance()->count($query_struct), 'items_per_page' => $per_page));
     $query_struct['per_page'] = $this->pagination->sql_offset;
     $notice = Mynotice::instance()->lists($query_struct);
     foreach ($notice as $k => $v) {
         $notice[$k]['content_small'] = strip_tags(text::limit_words($v['content'], 30));
         $notice[$k]['manager_id'] = Mymanager::instance($v['manager_id'])->get('name');
     }
     //VIEW
     $this->template->content = new View("manage/notice_list");
     $this->template->content->notice = $notice;
     $this->template->content->where = $where_view;
 }
Beispiel #12
0
 /**
  * 数据列表
  */
 public function index()
 {
     role::check('product_rush');
     $return_struct = array('status' => 0, 'code' => 501, 'msg' => 'Not Implemented', 'content' => array());
     try {
         //* 初始化返回数据 */
         $return_data = $rid = array();
         //* 收集请求数据 ==根据业务逻辑定制== */
         $request_data = $this->input->get();
         // 执行业务逻辑
         //* 初始化默认查询结构体 */
         $query_struct_current = array('where' => array(), 'like' => array(), 'orderby' => array('id' => 'DESC'), 'limit' => array('per_page' => 20, 'page' => 1));
         //列表排序
         $orderby_arr = array(0 => array('id' => 'DESC'), 1 => array('id' => 'ASC'), 2 => array('title' => 'ASC'), 3 => array('title' => 'DESC'), 4 => array('start_time' => 'ASC'), 5 => array('end_time' => 'DESC'), 6 => array('position' => 'DESC'), 7 => array('position' => 'ASC'));
         $orderby = controller_tool::orderby($orderby_arr);
         // 排序处理
         if (isset($request_data['orderby']) && is_numeric($request_data['orderby'])) {
             $query_struct_current['orderby'] = $orderby;
         }
         // 每页条目数
         controller_tool::request_per_page($query_struct_current, $request_data);
         //调用服务执行查询
         $product_rush_service = Product_rushService::get_instance();
         $count = $product_rush_service->count($query_struct_current);
         // 模板输出 分页
         $this->pagination = new Pagination(array('total_items' => $count, 'items_per_page' => $query_struct_current['limit']['per_page']));
         $query_struct_current['limit']['page'] = $this->pagination->current_page;
         $return_data['list'] = $product_rush_service->index($query_struct_current);
         foreach ($return_data['list'] as $pd) {
             $rid[$pd['product_id']] = true;
         }
         //* 补充&修改返回结构体 */
         $return_struct['status'] = 1;
         $return_struct['code'] = 200;
         $return_struct['msg'] = '';
         $return_struct['content'] = $return_data;
         //* 请求类型 */
         if ($this->is_ajax_request()) {
             // ajax 请求
             // json 输出
             $this->template->content = $return_struct;
         } else {
             // html 输出
             //* 模板输出 */
             $content = new View('product/' . $this->class_name . '/' . __FUNCTION__, array('rid' => $rid));
             //* 变量绑定 */
             $this->template->title = '抢购商品管理';
             $this->template->content = $content;
             //* 请求结构数据绑定 */
             $this->template->content->request_data = $request_data;
             //* 返回结构体绑定 */
             $this->template->content->return_struct = $return_struct;
         }
         // end of request type determine
     } catch (MyRuntimeException $ex) {
         $this->_ex($ex, $return_struct, $request_data);
     }
 }
Beispiel #13
0
 public function index()
 {
     $user_query_struct = array('where' => array(), 'like' => array(), 'orderby' => array(), 'limit' => array('per_page' => 20, 'offset' => 0));
     /* 搜索功能 */
     $search_arr = array('id', 'email', 'firstname', 'lastname', 'ip', 'mobile', 'real_name');
     $search_value = $this->input->get('search_value');
     $search_type = $this->input->get('search_type');
     $where_view = array();
     if ($search_arr) {
         foreach ($search_arr as $value) {
             if ($search_type == $value && strlen($search_value) > 0) {
                 $user_query_struct['like'][$value] = $search_value;
                 //$user_query_struct['where'][$value] = $search_value;
                 if ($value == 'ip') {
                     $user_query_struct['like'][$value] = tool::myip2long($search_value);
                     //$user_query_struct['where'][$value] = tool::myip2long($search_value);
                 }
             }
         }
         $where_view['search_type'] = $search_type;
         $where_view['search_value'] = $search_value;
     }
     /* 列表排序 */
     $orderby_arr = array(0 => array('id' => 'DESC'), 1 => array('id' => 'ASC'), 4 => array('email' => 'ASC'), 5 => array('email' => 'DESC'), 6 => array('firstname' => 'ASC'), 7 => array('firstname' => 'DESC'), 8 => array('lastname' => 'ASC'), 9 => array('lastname' => 'DESC'), 10 => array('date_add' => 'ASC'), 11 => array('date_add' => 'DESC'), 12 => array('ip' => 'ASC'), 13 => array('ip' => 'DESC'), 14 => array('active' => 'ASC'), 15 => array('active' => 'DESC'), 16 => array('register_mail_active' => 'ASC'), 17 => array('register_mail_active' => 'DESC'));
     $orderby = controller_tool::orderby($orderby_arr);
     $user_query_struct['orderby'] = $orderby;
     /* 每页显示条数 */
     $per_page = controller_tool::per_page();
     $user_query_struct['limit']['per_page'] = $per_page;
     /* 调用分页 */
     $this->pagination = new Pagination(array('total_items' => Myuser::instance()->query_count($user_query_struct), 'items_per_page' => $per_page));
     $user_query_struct['limit']['offset'] = $this->pagination->sql_offset;
     $user_list = Myuser::instance()->query_assoc($user_query_struct);
     //找出所有的站点的用户等级信息
     $user_levelservice = User_levelService::get_instance();
     $query_struct = array('where' => array('active' => 1));
     $user_levels = $user_levelservice->index($query_struct);
     $tmp = array();
     foreach ($user_levels as $user_level) {
         if ($user_level['is_default']) {
             $tmp['default'] = $user_level;
         }
         $tmp[$user_level['id']] = $user_level;
     }
     $user_levels = $tmp;
     foreach ($user_list as $key => $value) {
         $users[$key]['level'] = '';
         if (!empty($user_levels[$value['level_id']])) {
             $users[$key]['level'] = $user_levels[$value['level_id']]['name_manage'];
         } else {
             //$users[$key]['level'] = $user_levels['default']['name_manage'];
         }
     }
     $this->template->content = new View("superplaner/agent_select_list");
     $this->template->content->where = $where_view;
     $this->template->content->user_list = $user_list;
 }
Beispiel #14
0
 /**
  * 页面分类列表
  */
 public function index()
 {
     $list_columns = array(array('name' => '名称', 'column' => 'category_name', 'class_num' => '200'));
     $orderby_arr = array(0 => array('id' => 'ASC'), 1 => array('id' => 'DESC'), 2 => array('p_order' => 'ASC'), 3 => array('p_order' => 'DESC'));
     $orderby = controller_tool::orderby($orderby_arr);
     $query_struct = array('where' => array('parent_id' => 0), 'like' => array(), 'orderby' => $orderby, 'limit' => array('per_page' => controller_tool::per_page(), 'offset' => 0));
     $categories = Mydoc_category::instance()->list_doc_categories($query_struct);
     $this->template->content = new View("site/doc_category_list");
     $this->template->content->list_columns = $list_columns;
     $this->template->content->categories = $categories;
 }
Beispiel #15
0
 /**
  * 显示商品列表
  */
 public function index()
 {
     $return_struct = array('status' => 0, 'code' => 501, 'msg' => 'Not Implemented', 'content' => array());
     try {
         //* 初始化返回数据 */
         $return_data = array('assoc' => NULL, 'count' => 0);
         //* 收集请求数据 ==根据业务逻辑定制== */
         $request_data = $this->input->get();
         $request_data['status'] = isset($request_data['status']) ? (int) $request_data['status'] : 0;
         $struct = product::get_struct($request_data);
         $query_struct_current = $struct['query'];
         $query_struct_current['where']['type'] = array(ProductService::PRODUCT_TYPE_GOODS, ProductService::PRODUCT_TYPE_CONFIGURABLE, ProductService::PRODUCT_TYPE_ASSEMBLY);
         $request_struct_current = $struct['request'];
         // 每页条目数
         controller_tool::request_per_page($query_struct_current, $request_data);
         $return_data = BLL_Product::index($query_struct_current);
         // 模板输出 分页
         $this->pagination = new Pagination(array('total_items' => $return_data['count'], 'items_per_page' => $query_struct_current['limit']['per_page']));
         $query_struct_current['limit']['page'] = $this->pagination->current_page;
         //* 如果是ajax请求缩减返回的字段 ==根据业务逻辑定制== */
         if ($this->is_ajax_request()) {
             $requestkeys = array('id', 'category_id', 'title', 'store', 'on_sale', 'price', 'sku');
             array_walk($return_data['assoc'], 'util::simplify_return_array', $requestkeys);
         }
         //* 补充&修改返回结构体 */
         $return_struct['status'] = 1;
         $return_struct['code'] = 200;
         $return_struct['msg'] = '';
         $return_struct['content'] = $return_data;
         //* 请求类型 */
         if ($this->is_ajax_request()) {
             // ajax 请求
             // json 输出
             $this->template->content = $return_struct;
         } else {
             //* html 输出 ==根据业务逻辑定制== */
             //* 模板输出 */
             $this->template->return_struct = $return_struct;
             $content = new View($this->package_name . '/' . $this->class_name . '/' . __FUNCTION__);
             //* 变量绑定 */
             $this->template->title = Kohana::config('site.name');
             $this->template->content = $content;
             //* 请求结构数据绑定 */
             $this->template->content->request_data = $request_data;
             $this->template->content->request_struct = $request_struct_current;
             $this->template->content->query_struct = $query_struct_current;
             //* 返回结构体绑定 */
             $this->template->content->return_struct = $return_struct;
         }
         // end of request type determine
     } catch (MyRuntimeException $ex) {
         $this->_ex($ex, $return_struct, $request_data);
     }
 }
Beispiel #16
0
 /**
  * 模板列表
  */
 public function index()
 {
     //调用分页
     $per_page = controller_tool::per_page();
     // 初始化默认查询条件
     $request_struct_current = array('like' => array(), 'orderby' => array('id' => 'DESC'), 'limit' => array('per_page' => $per_page, 'page' => 1));
     //分页
     $this->pagination = new Pagination(array('total_items' => Mytheme::instance()->count($request_struct_current), 'items_per_page' => $per_page));
     $request_struct['limit']['offset'] = $this->pagination->sql_offset;
     $themes = Mytheme::instance()->lists($request_struct_current);
     $this->template->content = new View("manage/theme_list", array('data' => $themes));
 }
Beispiel #17
0
 public function index()
 {
     $query_struct = array();
     $list_columns = array(array('name' => '域名/IP', 'column' => 'name', 'class_num' => '6'), array('name' => '添加扫描时间', 'column' => 'add_time', 'class_num' => '4'));
     //调用分类
     $per_page = controller_tool::per_page();
     $this->pagination = new Pagination(array('total_items' => Myscan::instance()->count($query_struct), 'items_per_page' => $per_page));
     $scan = Myscan::instance()->scans($query_struct, NULL, $per_page, $this->pagination->sql_offset);
     $this->template->content = new View("site/scan_list");
     $this->template->content->list_columns = $list_columns;
     $this->template->content->scan = $scan;
 }
Beispiel #18
0
 /**
  * site type list
  */
 public function index()
 {
     $query_struct = array();
     /**
      * 搜索
      */
     $search_arr = array('manager_id', 'user_log_type', 'date_begin', 'date_end');
     foreach ($this->input->get() as $key => $value) {
         if (in_array($key, $search_arr)) {
             if ($key == 'date_begin') {
                 $query_struct['where']["add_time >"] = $value . ' 00:00:00';
             } elseif ($key == 'date_end') {
                 $query_struct['where']["add_time <"] = $value . ' 24:00:00';
             } elseif (!empty($value)) {
                 $query_struct['where'][$key] = $value;
             }
         }
     }
     if ($this->manager_is_admin != 1) {
         //得到子用户的ID列表
         $childrens = Mymanager::instance($this->manager_id)->subs();
         $children_ids = array();
         $children_ids[] = $this->manager_id;
         foreach ($childrens as $key => $value) {
             $children_ids[] = $value['id'];
         }
         $query_struct['in']['manager_id'] = $children_ids;
     }
     //调用分页
     $per_page = controller_tool::per_page();
     $this->pagination = new Pagination(array('total_items' => Myuser_log::instance()->count($query_struct), 'items_per_page' => $per_page));
     $user_logs = Myuser_log::instance()->user_logs($query_struct, array('id' => 'DESC'), $per_page, $this->pagination->sql_offset);
     $user_log_type = Kohana::config('user_log_type.type');
     $user_log_type_status = Kohana::config('user_log_type.status');
     $managers = Mymanager::instance()->subs($this->manager_id);
     $managers[] = Mymanager::instance($this->manager_id)->get();
     foreach ($user_logs as $key => $value) {
         $user_logs[$key]['type_name'] = $user_log_type[$value['user_log_type']];
         $user_logs[$key]['status_name'] = $user_log_type_status[$value['user_log_type']][$value['status']];
         foreach ($value as $k => $v) {
             if (!is_numeric($v) && empty($v)) {
                 $user_logs[$key][$k] = '无';
             }
         }
     }
     $this->template->content = new View("manage/user_log_list");
     $this->template->content->user_logs = $user_logs;
     $this->template->content->user_log_type = $user_log_type;
     $this->template->content->today = date("Y-m-d", time());
     $this->template->content->yesterday = date("Y-m-d", time() - 24 * 3600);
     $this->template->content->managers = $managers;
 }
Beispiel #19
0
 public function index()
 {
     role::check('card_system_manage');
     $query_condition = array();
     $query_condition['beginNum'] = null;
     $query_condition['endNum'] = null;
     $query_condition['selectKey'] = null;
     $query_condition['selectValue'] = null;
     $per_page = controller_tool::per_page();
     $orderby_arr = array(0 => array('id' => 'ASC'), 1 => array('id' => 'DESC'), 2 => array('order' => 'ASC'), 3 => array('order' => 'DESC'));
     $orderby = controller_tool::orderby($orderby_arr);
     $query_struct = array('where' => array(), 'orderby' => $orderby, 'limit' => array('per_page' => $per_page, 'offset' => 0));
     if ($_GET) {
         if (!empty($_GET['beginNum']) && !empty($_GET['endNum'])) {
             $query_condition['beginNum'] = $_GET['beginNum'];
             $query_condition['endNum'] = $_GET['endNum'];
             $query_struct['where']['mgrnum >='] = $_GET['beginNum'];
             $query_struct['where']['mgrnum <='] = $_GET['endNum'];
         }
         if (isset($_GET['selectValue']) && !empty($_GET['selectValue'])) {
             $query_condition['selectKey'] = $_GET['selectKey'];
             $query_condition['selectValue'] = $_GET['selectValue'];
             if ($query_condition['selectKey'] == 'mgrNum') {
                 $query_struct['where']['mgrnum'] = $_GET['selectValue'];
             } else {
                 if ($query_condition['selectKey'] == 'serialCode') {
                     $query_struct['where']['cardserialcode'] = $_GET['selectValue'];
                 } else {
                     if ($query_condition['selectKey'] == 'issueId') {
                         $query_struct['where']['issueid'] = $_GET['selectValue'];
                     } else {
                         if ($query_condition['selectKey'] == 'openId') {
                             $query_struct['where']['openid'] = $_GET['selectValue'];
                         } else {
                             if ($query_condition['selectKey'] == 'flag') {
                                 $query_struct['where']['flag'] = $_GET['selectValue'];
                             }
                         }
                     }
                 }
             }
         }
     }
     $total = $this->cardDao->count_items_with_condition($query_struct['where']);
     $this->pagination = new Pagination(array('base_url' => url::current(), 'uri_segment' => 'page', 'total_items' => $total, 'items_per_page' => $per_page, 'style' => 'digg'));
     $query_struct['limit']['offset'] = $this->pagination->sql_offset;
     $cardList = $this->cardDao->lists($query_struct);
     $this->template->content = new View("card/card_list");
     $this->template->content->data = $cardList;
     $this->template->content->query_condition = $query_condition;
     $this->template->content->selectMap = $this->selectMap;
 }
Beispiel #20
0
 public function index()
 {
     $orderby_arr = array(0 => array('id' => 'DESC'), 1 => array('id' => 'ASC'), 2 => array('order' => 'ASC'), 3 => array('order' => 'DESC'));
     $orderby = controller_tool::orderby($orderby_arr);
     // 初始化默认查询条件
     $query_struct = array('where' => array(), 'orderby' => $orderby);
     $link = Mysite_link::instance();
     $links = $link->lists($query_struct);
     $total = $link->count($query_struct);
     $this->template->content = new View("site/link_list");
     $this->template->content->data = $links;
     $this->template->content->total = $total;
 }
Beispiel #21
0
 public function index()
 {
     $agentDao = Superplaner::instance();
     $per_page = controller_tool::per_page();
     $orderby_arr = array(0 => array('id' => 'DESC'), 1 => array('id' => 'ASC'), 2 => array('order' => 'ASC'), 3 => array('order' => 'DESC'));
     $orderby = controller_tool::orderby($orderby_arr);
     $query_struct = array('where' => array(), 'orderby' => $orderby, 'limit' => array('per_page' => $per_page, 'offset' => 0));
     $total = $agentDao->count_agents();
     $this->pagination = new Pagination(array('base_url' => url::current(), 'uri_segment' => 'page', 'total_items' => $total, 'items_per_page' => $per_page, 'style' => 'digg'));
     $query_struct['limit']['offset'] = $this->pagination->sql_offset;
     $agentList = $agentDao->lists($query_struct);
     $this->template->content = new View("superplaner/agent_list");
     $this->template->content->data = $agentList;
 }
Beispiel #22
0
 public function index()
 {
     role::check('card_system_manage');
     $per_page = controller_tool::per_page();
     $orderby_arr = array(0 => array('id' => 'DESC'), 1 => array('id' => 'ASC'), 2 => array('order' => 'ASC'), 3 => array('order' => 'DESC'));
     $orderby = controller_tool::orderby($orderby_arr);
     $query_struct = array('where' => array(), 'orderby' => $orderby, 'limit' => array('per_page' => $per_page, 'offset' => 0));
     $total = $this->moneyExchangeDao->count_items_with_condition($query_struct['where']);
     $this->pagination = new Pagination(array('base_url' => url::current(), 'uri_segment' => 'page', 'total_items' => $total, 'items_per_page' => $per_page, 'style' => 'digg'));
     $query_struct['limit']['offset'] = $this->pagination->sql_offset;
     $moneyExchangeList = $this->moneyExchangeDao->lists($query_struct);
     $this->template->content = new View("card/money_exchange_list");
     $this->template->content->data = $moneyExchangeList;
 }
Beispiel #23
0
 /**
  * 币种列表
  */
 public function index()
 {
     /* 初始化结构体*/
     $query_struct = array('where' => array(), 'orderby' => array('id' => 'DESC'));
     $this->template->content = new View("site/currency_list");
     //每页显示条数
     $per_page = controller_tool::per_page();
     $query_struct['limit']['per_page'] = $per_page;
     //调用分页
     $this->pagination = new Pagination(array('total_items' => Mycurrency::instance()->query_count($query_struct), 'items_per_page' => $per_page));
     $query_struct['limit']['offset'] = $this->pagination->sql_offset;
     //调用列表
     $this->template->content->currency_list = Mycurrency::instance()->query_assoc($query_struct);
 }
 public function index()
 {
     $settlerealtimerptDao = Superplaner_settlerealtimerpt::instance();
     $agent_type = Kohana::config('settle.agent_type');
     $isbeidan = Kohana::config('settle.isbeidan');
     $per_page = controller_tool::per_page();
     $orderby_arr = array(0 => array('id' => 'DESC'), 1 => array('id' => 'ASC'), 2 => array('order' => 'ASC'), 3 => array('order' => 'DESC'));
     $orderby = controller_tool::orderby($orderby_arr);
     $query_struct = array('where' => array(), 'orderby' => $orderby, 'limit' => array('per_page' => $per_page, 'offset' => 0));
     /**
      * 搜索
      */
     $search_arr = array('type', 'agent_type', 'isbeidan', 'date_begin', 'date_end', 'user_id', 'lastname');
     foreach ($this->input->get() as $key => $value) {
         if (in_array($key, $search_arr)) {
             if ($key == 'date_begin') {
                 $query_struct['where']["settletime >"] = $value . ' 00:00:00';
             } elseif ($key == 'date_end') {
                 $query_struct['where']["settletime <"] = $value . ' 24:00:00';
             } elseif ($key == 'isbeidan' && !empty($value)) {
                 $query_struct['where']["type"] = $value - 1;
             } elseif ($key == 'agent_type' && !empty($value)) {
                 $query_struct['where']["agent_type"] = $value - 1;
             } elseif (!empty($value)) {
                 $query_struct['where'][$key] = $value;
             }
         }
     }
     $total = $settlerealtimerptDao->count_itmes();
     $this->pagination = new Pagination(array('base_url' => url::current(), 'uri_segment' => 'page', 'total_items' => $total, 'items_per_page' => $per_page, 'style' => 'digg'));
     $query_struct['limit']['offset'] = $this->pagination->sql_offset;
     //        $dataList = Superplaner_settlerealtimerpt::instance()->lists($query_struct);
     $dataList = Superplaner_settlerealtimerpt::instance()->mylists($query_struct);
     foreach ($dataList as $key => $value) {
         $dataList[$key]['agent_type'] = $agent_type[$value['agent_type']];
         $dataList[$key]['type'] = $isbeidan[$value['type']];
         foreach ($value as $k => $v) {
             if (!is_numeric($v) && empty($v)) {
                 $dataList[$key][$k] = '无';
             }
         }
     }
     $this->template->content = new View("superplaner/settle_realtime_rpt");
     $this->template->content->data = $dataList;
     $this->template->content->agent_type = $agent_type;
     $this->template->content->isbeidan = $isbeidan;
     $this->template->content->today = date("Y-m-d", time());
     $this->template->content->yesterday = date("Y-m-d", time() - 24 * 3600);
 }
Beispiel #25
0
 public function index()
 {
     /* 初始化默认查询条件 */
     $newsletter_query_struct = array('where' => array('user_id' => 0), 'like' => array(), 'orderby' => array(), 'limit' => array('per_page' => 20, 'offset' => 0));
     /* 权限检查 得到所有可管理站点ID列表 */
     $site_id_list = role::check('newsletter');
     /* Newsletter列表模板 */
     $this->template->content = new View("user/newsletter");
     /* 搜索功能 */
     $search_arr = array('email', 'ip');
     $search_value = $this->input->get('search_value');
     $search_type = $this->input->get('search_type');
     $where_view = array();
     if ($search_arr) {
         foreach ($search_arr as $value) {
             if ($search_type == $value && strlen($search_value) > 0) {
                 $newsletter_query_struct['where'][$value] = $search_value;
                 if ($value == 'ip') {
                     $newsletter_query_struct['where'][$value] = tool::myip2long($search_value);
                 }
             }
         }
         $where_view['search_type'] = $search_type;
         $where_view['search_value'] = $search_value;
     }
     //当前切入的站点查询条件
     $site_in = site::current_query_site_ids();
     $where_view['site_id'] = '';
     $newsletter_query_struct['where']['site_id'] = $site_in;
     /* 列表排序 */
     $orderby_arr = array(0 => array('id' => 'DESC'), 1 => array('id' => 'ASC'), 2 => array('site_id' => 'ASC'), 3 => array('site_id' => 'DESC'), 4 => array('email' => 'ASC'), 5 => array('email' => 'DESC'), 6 => array('date_add' => 'ASC'), 7 => array('date_add' => 'DESC'), 8 => array('ip' => 'ASC'), 9 => array('ip' => 'DESC'), 10 => array('active' => 'ASC'), 11 => array('active' => 'DESC'));
     $orderby = controller_tool::orderby($orderby_arr);
     $newsletter_query_struct['orderby'] = $orderby;
     /* 每页显示条数 */
     $per_page = controller_tool::per_page();
     $newsletter_query_struct['limit']['per_page'] = $per_page;
     /* 调用分页 */
     $this->pagination = new Pagination(array('total_items' => Mynewsletter::instance()->query_count($newsletter_query_struct), 'items_per_page' => $per_page));
     $newsletter_query_struct['limit']['offset'] = $this->pagination->sql_offset;
     $newsletters = Mynewsletter::instance()->query_assoc($newsletter_query_struct);
     foreach ($newsletters as $key => $value) {
         $site = Mysite::instance($value['site_id'])->get();
         $newsletters[$key]['site'] = $site;
     }
     /* 调用列表 */
     $this->template->content->newsletter_list = $newsletters;
     /* 搜索信息保存 */
     $this->template->content->where = $where_view;
 }
 public function index()
 {
     $settlemonthrptdtlDao = Mysettlemonthrptdtl::instance();
     $ticket_type = Kohana::config('ticket_type.type');
     $per_page = controller_tool::per_page();
     $orderby_arr = array(0 => array('id' => 'DESC'), 1 => array('id' => 'ASC'), 2 => array('order' => 'ASC'), 3 => array('order' => 'DESC'));
     $orderby = controller_tool::orderby($orderby_arr);
     $query_struct = array('where' => array(), 'orderby' => $orderby, 'limit' => array('per_page' => $per_page, 'offset' => 0));
     /**
      * 搜索
      */
     $search_arr = array('ticket_type', 'date_begin', 'date_end', 'agentid', 'user_id', 'agentlastname', 'masterid');
     foreach ($this->input->get() as $key => $value) {
         if (in_array($key, $search_arr)) {
             if ($key == 'date_begin') {
                 $query_struct['where']["settletime >"] = $value . ' 00:00:00';
             } elseif ($key == 'date_end') {
                 $query_struct['where']["settletime <"] = $value . ' 24:00:00';
             } elseif ($key == 'agentlastname' && !empty($value)) {
                 $query_struct['where']["agent.lastname ="] = $value;
             } elseif (!empty($value)) {
                 $query_struct['where'][$key] = $value;
             }
         }
     }
     $total = $settlemonthrptdtlDao->count_itmes();
     $this->pagination = new Pagination(array('base_url' => url::current(), 'uri_segment' => 'page', 'total_items' => $total, 'items_per_page' => $per_page, 'style' => 'digg'));
     $query_struct['limit']['offset'] = $this->pagination->sql_offset;
     //        $dataList = Mysettlemonthrptdtl::instance()->lists($query_struct);
     $dataList = Mysettlemonthrptdtl::instance()->mylists($query_struct);
     foreach ($dataList as $key => $value) {
         $dataList[$key]['urlbase'] = $this->getUrlBaseByTicketType($dataList[$key]['ticket_type']);
         if ($value['ticket_type'] != 0 && $value['ticket_type'] != 99) {
             $dataList[$key]['ticket_type'] = $ticket_type[$value['ticket_type']];
         } else {
             $dataList[$key]['ticket_type'] = '';
         }
         foreach ($value as $k => $v) {
             if (!is_numeric($v) && empty($v)) {
                 $dataList[$key][$k] = '无';
             }
         }
     }
     $this->template->content = new View("distribution/settle_month_dtl_rpt");
     $this->template->content->data = $dataList;
     $this->template->content->ticket_type = $ticket_type;
     $this->template->content->today = date("Y-m-d", time());
     $this->template->content->yesterday = date("Y-m-d", time() - 24 * 3600);
 }
Beispiel #27
0
 public function index()
 {
     $per_page = controller_tool::per_page();
     //列表排序
     $orderby_arr = array(0 => array('id' => 'DESC'), 1 => array('id' => 'ASC'), 2 => array('order' => 'ASC'), 3 => array('order' => 'DESC'));
     $orderby = controller_tool::orderby($orderby_arr);
     // 初始化默认查询条件
     $query_struct = array('where' => array(), 'like' => array(), 'orderby' => $orderby, 'limit' => array('per_page' => $per_page, 'offset' => 0));
     $faq = Myfaq::instance();
     $total = $faq->count($query_struct);
     $this->pagination = new Pagination(array('base_url' => url::current(), 'uri_segment' => 'page', 'total_items' => $total, 'items_per_page' => $per_page, 'style' => 'digg'));
     $faqs = $faq->lists($query_struct);
     $this->template->content = new View("site/faq_list");
     $this->template->content->data = $faqs;
     $this->template->content->title = "site faq list";
 }
Beispiel #28
0
 public function index()
 {
     // 初始化默认查询条件
     $orderby_arr = array(0 => array('id' => 'DESC'), 1 => array('id' => 'ASC'), 2 => array('order' => 'ASC'), 3 => array('order' => 'DESC'), 4 => array('parent_id' => 'ASC'), 5 => array('parent_id' => 'DESC'), 6 => array('memo' => 'ASC'), 7 => array('memo' => 'DESC'));
     $orderby = controller_tool::orderby($orderby_arr);
     $query_struct = array('where' => array(), 'orderby' => $orderby);
     $site_menu = Mysite_menu::instance();
     $total = $site_menu->count($query_struct);
     $site_menus = $site_menu->lists($query_struct);
     $data = $site_menus;
     foreach ($site_menus as $key => $val) {
         $data[$key]['parent_name'] = Mysite_menu::instance($val['parent_id'])->get('name');
     }
     $this->template->content = new View("site/site_menu_list");
     $this->template->content->data = $data;
     $this->template->content->total = $total;
 }
Beispiel #29
0
 /**
  * 菜单列表
  */
 public function index()
 {
     $orderby_arr = array(0 => array('order' => 'DESC'), 1 => array('order' => 'ASC'));
     $orderby = controller_tool::orderby($orderby_arr);
     $this->template->content = new View("manage/menu_list");
     $menus = Mymenu::instance()->menus(0, $orderby);
     foreach ($menus as $key => $value) {
         $menus[$key]['action_name'] = Myaction::instance($value['action_id'])->get('name');
     }
     foreach ($menus as $key => $value) {
         foreach ($value as $k => $v) {
             if (!is_numeric($v) && empty($v)) {
                 $menus[$key][$k] = 'NULL';
             }
         }
     }
     $this->template->content->menus = $menus;
 }
Beispiel #30
0
 public function index()
 {
     //权限验证
     role::check('manage_payment_type');
     $this->template->content = new View("manage/payment_type_list");
     //搜索功能
     $search_arr = array('id');
     $where = array();
     $where_view = array();
     //列表排序
     $orderby_arr = array(0 => array('id' => 'DESC'), 1 => array('id' => 'ASC'), 2 => array('name' => 'ASC'), 3 => array('name' => 'DESC'), 4 => array('image_url' => 'ASC'), 5 => array('image_url' => 'DESC'), 6 => array('driver' => 'ASC'), 7 => array('driver' => 'DESC'), 8 => array('submit_url' => 'ASC'), 9 => array('submit_url' => 'DESC'));
     $orderby = controller_tool::orderby($orderby_arr);
     //每页显示条数
     $per_page = 100;
     //调用分页
     $this->pagination = new Pagination(array('total_items' => 100, 'items_per_page' => $per_page));
     //调用列表
     $this->template->content->payment_type_list = Mypayment_type::instance()->payment_types($where, $orderby, $per_page, $this->pagination->sql_offset);
 }