private function get_report_data($time_start, $time_end) { $this->load->model('Spot_model', 'spot'); $spots = $this->spot->find_by('partner_id', current_partner()->id); $this->load->model('Ticket_model', 'ticket'); $spots = $this->ticket->count_for_spots($spots, $time_start, $time_end); // 获取门票信息 $page = $this->input->get('page'); $tickets = $this->ticket->get_tickets($spots[0]->id, $time_start, $time_end, is_numeric($page) ? $page : 1); $this->load->library('page', array('total' => empty($spots[0]->ticket_counts) ? 0 : $spots[0]->ticket_counts)); $this->layout->view('partners/reports/index', array('spots' => $spots, 'tickets' => $tickets, 'pagination' => $this->page->create(), 'time_start' => $time_start, 'time_end' => $time_end)); }
public function repassword() { if (empty($_POST)) { return $this->layout->view('partners/settings/repassword'); } $this->load->model('Partner_model', 'partner'); $result = $this->partner->repassword(current_partner()->id, $this->input->post('password_old'), $this->input->post('password_new'), $this->input->post('password_confirm')); if ($result) { $this->session->set_flashdata('message', '密码重置成功'); return redirect('partners/settings/repassword'); } else { return $this->layout->view('partners/settings/repassword', array('errors' => $this->partner->errors)); } }
<div class="header"> <div class="container"> <div class="pull-left"> <a style="color: #fff; font-size: 20px;" href="<?php echo site_url('partners'); ?> ">chinazjy.org</a> </div> <div class="pull-right"> 欢迎: <a href="<?php echo site_url('partners/settings'); ?> " title="设置"><?php echo current_partner()->name; ?> <i class="icon-cog icon-white"></i></a> - <a href="<?php echo site_url('partners/logout'); ?> ">退出<i class="icon-off icon-white"></i></a> </div> </div> </div> <div class="site"> <div class="container clearfix"> <div class="row"> <div class="span9">
<a href="<?php echo site_url('partners/settings'); ?> ">基本资料</a> </li> <li> <a href="<?php echo site_url('partners/settings/repassword'); ?> ">更改密码</a> </li> </ul> <dl class="dl-horizontal dl-just-show" style="line-height: 28px;"> <dt>id</dt> <dd><?php echo current_partner()->id; ?> </dd> <dt>账号</dt> <dd><?php echo current_partner()->name; ?> </dd> <dt>注册时间</dt> <dd><?php echo date('Y-m-d', strtotime(current_partner()->created_at)); ?> </dd> </dl>
private function get_spots() { $this->load->model('Spot_model', 'spot'); $spots = $this->spot->find_by('partner_id', current_partner()->id); return $spots; }