Changeset 749
- Timestamp:
- Feb 9, 2015 10:35:15 AM (10 years ago)
- Location:
- pro-violet-viettel/sourcecode/application/modules/admin
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
pro-violet-viettel/sourcecode/application/modules/admin/controllers/reportprovince.php
r746 r749 13 13 $this->load->helper('language'); 14 14 $this->lang->load('messages', 'message'); 15 $this->load->model('reportmodel'); 15 16 } 16 17 … … 35 36 $data['year'] = $this->input->post('year'); 36 37 } 37 $data = $this->getdays($data);38 38 $data['provinces'] = $this->reportmodel->getProvinces($data); 39 39 … … 44 44 } 45 45 46 public function getdays($data) { 47 $data['month_days'] = 1; 48 if ("" . $data['year'] . "-" . $data['month'] . "" == date("Y-m")) { 49 $data['month_days'] = date("d"); 50 } else { 51 $data['month_days'] = cal_days_in_month(CAL_GREGORIAN, $data['month'], $data['year']); // 31 52 } 53 $data['year_days'] = 1; 54 if ($data['year'] == date("Y")) { 55 $data['year_days'] = date('z') + 1; 56 } else { 57 $data['year_days'] = date("z", mktime(0, 0, 0, 12, 31, $data['year'])) + 1; 58 } 59 return $data; 60 } 46 61 47 62 48 public function export() { … … 64 50 $data['month'] = $this->uri->segment(4); 65 51 $data['year'] = $this->uri->segment(5); 66 $data = $this->getdays($data);52 67 53 $data['provinces'] = $this->reportmodel->getProvinces($data); 68 54 -
pro-violet-viettel/sourcecode/application/modules/admin/models/reportmodel.php
r747 r749 148 148 return $data; 149 149 } 150 public function exportProvince($input) 151 { 152 //$input['month']=1; 153 //$input['year']=2014; 154 $data=$this->getProvinces($input); 155 return $data; 156 } 157 public function exportPackage($input) 158 { 159 // $input['month']=1; 160 // $input['year']=2014; 161 $data=$this->getPackages($input); 162 return $data; 163 } 150 164 151 165 }
Note: See TracChangeset
for help on using the changeset viewer.