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
// Ghi log
$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['action'] = 'listByDaily';
$this->_data['titlePage'] = 'BXH theo tuần';
......
......@@ -22,17 +22,11 @@
<?php endif; ?>
<div class="row">
<?php /*echo form_open(base_url().'backend/cmsRanking/listByWeeklyAjax'); */?>
<div class="col-lg-3">
<div class="col-lg-4">
<select class="form-control" name="input-name" id="input-name">
<?php
$listSearch= $this->report_views_weekly_model->selectSearch();
foreach ($listSearch as $data):
?>
<option value = "<?php echo $data['week'].'-'.$data['year']; ?>">Tuần <?php echo $data['week']; ?> (Năm <?php echo $data['year']; ?>)</option>
<?php
endforeach;
?>
<?php foreach ($week_list as $key => $week): ?>
<option value = "<?php echo $key; ?>"><?php echo $week; ?>)</option>
<?php endforeach; ?>
</select>
</div>
<div class="col-lg-1">
......@@ -40,7 +34,6 @@
<button class="btn btn-sm btn-warning"><i class="fa fa-download"></i> Export ra Excel</button>
</a>
</div>
<?php /*echo form_close(); */?>
</div>
<!-- /.row -->
<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