Commit ffedb950 by Phạm Văn Đoan

cập nhật thông tin từ ngày đến ngày khi chọn tuần

parent f50902f8
...@@ -68,6 +68,18 @@ class CmsRanking extends CI_Controller ...@@ -68,6 +68,18 @@ class CmsRanking extends CI_Controller
// Ghi log // Ghi log
$this->actionlog_model->add('RANKING', 'BXH Tuần.', 'Report_views_weekly_model', 'report_views_weekly', null); $this->actionlog_model->add('RANKING', 'BXH Tuần.', 'Report_views_weekly_model', 'report_views_weekly', null);
$week_list_db = $this->report_views_weekly_model->selectSearch();
$week_list = [];
foreach ($week_list_db as $val) {
$array_w = MyHelper::getWeekDateRange($val['week'], $val['year'],'d/m');
if (isset($array_w['start_week']) && isset($array_w['end_week'])) {
$prefix = 'Tuần ' . $val['week'] . '/' . $val['year'];
$suffixe = '(' . $array_w['start_week'] . '-' . $array_w['end_week'] . ')';
$week_list[$val['week'] . '-' . $val['year']] = $prefix . ' ' . $suffixe;
}
}
$this->_data['week_list'] = $week_list;
$this->_data['functionName'] = 'BXH theo tuần'; $this->_data['functionName'] = 'BXH theo tuần';
$this->_data['action'] = 'listByDaily'; $this->_data['action'] = 'listByDaily';
$this->_data['titlePage'] = 'BXH theo tuần'; $this->_data['titlePage'] = 'BXH theo tuần';
......
...@@ -22,17 +22,11 @@ ...@@ -22,17 +22,11 @@
<?php endif; ?> <?php endif; ?>
<div class="row"> <div class="row">
<?php /*echo form_open(base_url().'backend/cmsRanking/listByWeeklyAjax'); */?> <div class="col-lg-4">
<div class="col-lg-3">
<select class="form-control" name="input-name" id="input-name"> <select class="form-control" name="input-name" id="input-name">
<?php <?php foreach ($week_list as $key => $week): ?>
$listSearch= $this->report_views_weekly_model->selectSearch(); <option value = "<?php echo $key; ?>"><?php echo $week; ?>)</option>
foreach ($listSearch as $data): <?php endforeach; ?>
?>
<option value = "<?php echo $data['week'].'-'.$data['year']; ?>">Tuần <?php echo $data['week']; ?> (Năm <?php echo $data['year']; ?>)</option>
<?php
endforeach;
?>
</select> </select>
</div> </div>
<div class="col-lg-1"> <div class="col-lg-1">
...@@ -40,7 +34,6 @@ ...@@ -40,7 +34,6 @@
<button class="btn btn-sm btn-warning"><i class="fa fa-download"></i> Export ra Excel</button> <button class="btn btn-sm btn-warning"><i class="fa fa-download"></i> Export ra Excel</button>
</a> </a>
</div> </div>
<?php /*echo form_close(); */?>
</div> </div>
<!-- /.row --> <!-- /.row -->
<div class="space-6"></div> <div class="space-6"></div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment