|
|
|
@ -988,21 +988,31 @@ class Information extends CI_Controller
|
|
|
|
|
$information = $this->Information_model->Detail($this->input->get('is_id'));
|
|
|
|
|
$recommand_information = $this->recommand_information($information);
|
|
|
|
|
var_dump($recommand_information);
|
|
|
|
|
$tipsRightList = [];
|
|
|
|
|
for ($i=1; $i <= 36; $i++) {
|
|
|
|
|
$key = 'List Tips Right '.$i;
|
|
|
|
|
$tips_right_first = [];
|
|
|
|
|
$tips_right_second = [];
|
|
|
|
|
$tips_right_third = [];
|
|
|
|
|
for ($i=1; $i <= 12; $i++) {
|
|
|
|
|
$key = 'List Tips Right A_'.$i;
|
|
|
|
|
if (array_key_exists($key, $recommand_information) && $recommand_information[$key]) {
|
|
|
|
|
$tipsRightList[] = $recommand_information[$key];
|
|
|
|
|
$tips_right_first[] = $recommand_information[$key];
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
for ($i=1; $i <= 12; $i++) {
|
|
|
|
|
$key = 'List Tips Right B_'.$i;
|
|
|
|
|
if (array_key_exists($key, $recommand_information) && $recommand_information[$key]) {
|
|
|
|
|
$tips_right_second[] = $recommand_information[$key];
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
for ($i=1; $i <= 12; $i++) {
|
|
|
|
|
$key = 'List Tips Right C_'.$i;
|
|
|
|
|
if (array_key_exists($key, $recommand_information) && $recommand_information[$key]) {
|
|
|
|
|
$tips_right_third[] = $recommand_information[$key];
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$firstList = array_slice($tipsRightList, 0, 12);
|
|
|
|
|
$secondList = array_slice($tipsRightList, 12, 12);
|
|
|
|
|
$thirdList = array_slice($tipsRightList, 24, 12);
|
|
|
|
|
echo 'COUNT: '.COUNT($tipsRightList);
|
|
|
|
|
echo '; 1 COUNT: '.COUNT($firstList);
|
|
|
|
|
echo '; 2 COUNT: '.COUNT($secondList);
|
|
|
|
|
echo '; 3 COUNT: '.COUNT($thirdList);
|
|
|
|
|
echo 'List Tips Right A: '.COUNT($tips_right_first);
|
|
|
|
|
echo '; List Tips Right B: '.COUNT($tips_right_second);
|
|
|
|
|
echo '; List Tips Right C: '.COUNT($tips_right_third);
|
|
|
|
|
|
|
|
|
|
$tips_right_list_content = $this->load->view(
|
|
|
|
|
'mobile_first/ah-tips-right-list',
|
|
|
|
|