コード例 #1
0
ファイル: Url.php プロジェクト: martinlindhe/core_dev
 /** @return url path excluding hostname */
 function getPath($safe = false)
 {
     if (!empty($this->params)) {
         if ($safe) {
             return $this->path . '?' . htmlspecialchars(url_query($this->params, '&', true));
         }
         return $this->path . '?' . url_query($this->params, '&');
     }
     return $this->path;
 }
コード例 #2
0
ファイル: Sites_config.php プロジェクト: lwl1989/paintmore
 public function index($page = 1)
 {
     $page = $this->input->get('page');
     $page = $page > 0 ? $page : 1;
     $conditions = array();
     $base_url = url_query($conditions, '/m-admin/sites_config');
     $pagination = $this->Site_config->pagination($base_url, $page, $conditions, 'id desc');
     //var_dump($this->db->last_query());
     //返回当最后一次列表页
     $this->session->set_userdata('back_list_page', $this->get_self_url());
     //var_dump($pagination);
     $this->assign('pagination', $pagination);
     $this->display();
 }
コード例 #3
0
ファイル: Activity.php プロジェクト: lwl1989/paintmore
 function index()
 {
     $page = $this->input->get('page');
     $page = $page > 0 ? $page : 1;
     $is_del = $this->input->get('is_del') > 0 ? 1 : 0;
     $is_sold = $this->input->get('is_sold') > 0 ? 1 : 0;
     $start = $this->input->get('started') > 0 ? 1 : 0;
     $condition = array('is_del' => $is_del, 'is_sold' => $is_sold);
     if ($start > 0) {
         $condition['start_time>'] = date('Y-m-d H:i:s', time() + 3600 * 24);
     }
     $base_url = url_query($condition, '/m-admin/activity/index');
     $pagination = $this->Activities_model->pagination($base_url, $page, $condition, 'id desc');
     $this->session->set_userdata('back_list_page', $this->get_self_url());
     $this->assign('pagination', $pagination);
     $this->display();
 }
コード例 #4
0
ファイル: Article.php プロジェクト: lwl1989/paintmore
 function gets()
 {
     $page = $this->input->get('page');
     $page = $page > 0 ? $page : 1;
     $conditions = array();
     $conditions['is_del'] = 0;
     if ($this->input->get('name')) {
         $conditions['name'] = $this->input->get('name');
     } else {
         $this->assign('name', "");
     }
     $base_url = url_query($conditions, '/article/index');
     $pagination = $this->Article_model->pagination($base_url, $page, $conditions, 'id desc');
     $this->session->set_userdata('back_list_page', $this->get_self_url());
     $this->assign('pagination', $pagination);
     $this->display();
 }
コード例 #5
0
ファイル: Place.php プロジェクト: lwl1989/paintmore
 function index()
 {
     $page = $this->input->get('page');
     $page = $page > 0 ? $page : 1;
     $conditions = array();
     $conditions['is_del'] = 0;
     if ($this->input->get('name')) {
         $conditions['name like'] = '%' . $this->input->get('name') . '%';
         $this->assign('name', $this->input->get('name'));
     } else {
         $this->assign('name', '');
     }
     $base_url = url_query($conditions, '/m-admin/lecturer/index');
     $pagination = $this->Place_model->pagination($base_url, $page, $conditions, 'id desc');
     $this->session->set_userdata('back_list_page', $this->get_self_url());
     $this->assign('pagination', $pagination);
     $this->display();
 }
コード例 #6
0
ファイル: User.php プロジェクト: lwl1989/paintmore
 public function user_by_del($page = 1)
 {
     if (intval($page) < 1) {
         exit('page error!');
     }
     $condition = array('is_del' => 1);
     $user_type = $this->input->get('user_type');
     if ($user_type) {
         $condition['user_type'] = $user_type;
     }
     $user_status = $this->input->get('user_status');
     //?user_status=stop ...  账号封停  禁言之类的
     if ($user_status) {
         $condition[$user_status] = $user_status;
     }
     $base_url = url_query($condition, '/m-site/users/index');
     $pagination = $this->User_model->pagination($base_url, $page, $condition, 'id desc');
     $this->session->set_userdata('back_list_page', $this->get_self_url());
     $this->assign('pagination', $pagination);
     $this->display();
 }
コード例 #7
0
ファイル: Order.php プロジェクト: lwl1989/paintmore
 /**
  * 获取订单列表  GET
  *
  * @return json
  */
 function gets()
 {
     $page = $this->input->get('page');
     $page = $page > 0 ? $page : 1;
     $this->load->model('order/Orders_model');
     $condition = array('is_del' => 0, 'user_id' => $this->_login_user['user_id']);
     $status = $this->input->get('status');
     if ($status) {
         $condition['status'] = $status;
     }
     $base_url = url_query($condition, '/user/order/gets/');
     $order = $this->input->get('order');
     $sort = $this->input->get('sort');
     if ($order and $sort) {
         $order = $order . ' ' . $sort;
     } else {
         $order = 'id desc';
     }
     $pagination = $this->Orders_model->pagination($base_url, $page, $condition, $order);
     $this->assign('orders', $pagination);
     $this->display();
 }
コード例 #8
0
ファイル: Comments.php プロジェクト: lwl1989/paintmore
 function index()
 {
     $page = $this->input->get('page');
     $page = $page > 0 ? $page : 1;
     $order_id = $this->input->get('order_id');
     $user_id = $this->input->get('user_id');
     $activity_id = $this->input->get('activity_id');
     $condition['is_del'] = $this->input->get('is_del') > 0 ? 1 : 0;
     if ($order_id) {
         $condition['order_id'] = $order_id;
     }
     if ($user_id) {
         $condition['user_id'] = $user_id;
     }
     if ($activity_id) {
         $condition['activity_id'] = $activity_id;
     }
     $base_url = url_query($condition, '/m-admin/comment/index');
     $pagination = $this->Comment_model->pagination($base_url, $page, $condition, 'id desc');
     $this->session->set_userdata('back_list_page', $this->get_self_url());
     $this->assign('pagination', $pagination);
     $this->display();
 }
コード例 #9
0
ファイル: Order.php プロジェクト: lwl1989/paintmore
 /**
  * 发生的退款信息
  */
 function refund()
 {
     $page = $this->input->get('page');
     $page = $page > 0 ? $page : 1;
     $this->load->model('order/Order_eligible_refund');
     $condition = array();
     $user_id = $this->input->get('user_id');
     $order_id = $this->input->get('order_id');
     $status = $this->input->get('status');
     $status = $status > 0 ? $status : 1;
     $condition['status'] = $status;
     if ($user_id) {
         $condition['user_id'] = $user_id;
     }
     if ($order_id) {
         $condition['order_id'] = $order_id;
     }
     $join_conditions = array(array('table_name' => 'users', 'condition' => 'eligible_refund.user_id=users.id', 'field' => 'username'));
     $base_url = url_query($condition, '/m-admin/order/eligible_refund');
     $pagination = $this->Order_eligible_refund->pagination_join($base_url, $page, $condition, 'eligible_refund.id desc', '*', 20, $join_conditions);
     //        echo $this->order_eligible_refund->db->last_query();
     // x$pagination = $this->order_eligible_refund->pagination($base_url, $page, $condition, 'id desc');
     $this->session->set_userdata('back_list_page', $this->get_self_url());
     $this->assign('pagination', $pagination);
     $this->display();
 }