Merge branch 'master' of github.com:hainatravel/information-system

master
赵鹏 11 months ago
commit e49c754b5c

@ -47,8 +47,8 @@ class infofix extends CI_Controller
// 链接 // 链接
$sub_url = mb_stripos($info->ic_url, $key) !== false ? $info->ic_url : ''; $sub_url = mb_stripos($info->ic_url, $key) !== false ? $info->ic_url : '';
if ($sub_url) { if ($sub_url) {
$sub_url = str_replace($key,'@@@'.$key.'@@@',$sub_url); $sub_url = str_replace($key, '@@@' . $key . '@@@', $sub_url);
$sub_url = explode('@@@',$sub_url); $sub_url = explode('@@@', $sub_url);
} }
$limitStr = 100; $limitStr = 100;
@ -58,8 +58,8 @@ class infofix extends CI_Controller
$sub_content = array(); $sub_content = array();
while ($pos_content) { while ($pos_content) {
$_str = '[...' . mb_substr($info->ic_content, $pos_content - $limitStr, mb_strlen($key) + $limitStr * 2) . '...]'; $_str = '[...' . mb_substr($info->ic_content, $pos_content - $limitStr, mb_strlen($key) + $limitStr * 2) . '...]';
$_str = str_replace($key,'@@@'.$key.'@@@',$_str); $_str = str_replace($key, '@@@' . $key . '@@@', $_str);
$_str = explode('@@@',$_str); $_str = explode('@@@', $_str);
array_push($sub_content, $_str); array_push($sub_content, $_str);
$pos_content = mb_stripos($info->ic_content, $key, $pos_content + mb_strlen($key)); $pos_content = mb_stripos($info->ic_content, $key, $pos_content + mb_strlen($key));
} }
@ -72,8 +72,8 @@ class infofix extends CI_Controller
$pos_content2 = mb_stripos($info->amp_json, $key); $pos_content2 = mb_stripos($info->amp_json, $key);
while ($pos_content2) { while ($pos_content2) {
$_str = '[...' . mb_substr($info->amp_json, $pos_content2 - $limitStr, mb_strlen($key) + $limitStr * 2) . '...]'; $_str = '[...' . mb_substr($info->amp_json, $pos_content2 - $limitStr, mb_strlen($key) + $limitStr * 2) . '...]';
$_str = str_replace($key,'@@@'.$key.'@@@',$_str); $_str = str_replace($key, '@@@' . $key . '@@@', $_str);
$_str = explode('@@@',$_str); $_str = explode('@@@', $_str);
array_push($sub_content2, $_str); array_push($sub_content2, $_str);
$pos_content2 = mb_stripos($info->amp_json, $key, $pos_content2 + mb_strlen($key)); $pos_content2 = mb_stripos($info->amp_json, $key, $pos_content2 + mb_strlen($key));
} }
@ -86,8 +86,8 @@ class infofix extends CI_Controller
$pos_content3 = mb_stripos($info->amp_body, $key); $pos_content3 = mb_stripos($info->amp_body, $key);
while ($pos_content3) { while ($pos_content3) {
$_str = '[...' . mb_substr($info->amp_body, $pos_content3 - $limitStr, mb_strlen($key) + $limitStr * 2) . '...]'; $_str = '[...' . mb_substr($info->amp_body, $pos_content3 - $limitStr, mb_strlen($key) + $limitStr * 2) . '...]';
$_str = str_replace($key,'@@@'.$key.'@@@',$_str); $_str = str_replace($key, '@@@' . $key . '@@@', $_str);
$_str = explode('@@@',$_str); $_str = explode('@@@', $_str);
array_push($sub_content3, $_str); array_push($sub_content3, $_str);
$pos_content3 = mb_stripos($info->amp_body, $key, $pos_content3 + mb_strlen($key)); $pos_content3 = mb_stripos($info->amp_body, $key, $pos_content3 + mb_strlen($key));
} }
@ -186,5 +186,39 @@ class infofix extends CI_Controller
} }
/**
* 无条件获取内容
* @param mixed $ic_id
* @return void
*/
function get_by_icid($ic_id)
{
$ic = $this->infoContents_model->get_ic_contents2($ic_id);
$json = $this->infoMetas_model->get($ic_id, 'AMP_JSON');
if ($ic) {
echo json_encode(
array(
'state' => 0,
'ic_content' => $ic->ic_content,
'json' => $json
)
);
} else {
echo json_encode(
array(
'state' => -1,
'msg' => 'not content by ' . $ic_id
)
);
}
}
function update_by_icid()
{
$ic_id = $this->input->get_post('ic_id');
$ic_content = $this->input->get_post('ic_content');
$this->infoContents_model->force_update($ic_id, $ic_content);
}
} }
//end of infofix //end of infofix

@ -39,7 +39,7 @@
<div class="selectionMemo"> <div class="selectionMemo">
US$179 US$179
</div> </div>
<div id='vip_khomloy_left' class="dynamic-label" style="font-size: 18px;">93 left</div> <div id='vip_khomloy_left' class="dynamic-label" style="font-size: 18px;">65 left</div>
</label> </label>
</div> </div>
<div class="optionLable" id="ticket_type_standard_khomloy"> <div class="optionLable" id="ticket_type_standard_khomloy">
@ -49,7 +49,7 @@
<div class="selectionMemo"> <div class="selectionMemo">
US$139 US$139
</div> </div>
<div id='standard_khomloy_left' class="dynamic-label" style="font-size: 18px;">Sold out</div> <div id='standard_khomloy_left' class="dynamic-label" style="font-size: 18px;">57 left</div>
</label> </label>
</div> </div>
@ -430,7 +430,7 @@
premium_khomloy_input.disabled = true; premium_khomloy_input.disabled = true;
vip_khomloy_input.disabled = false; vip_khomloy_input.disabled = false;
standard_khomloy_input.disabled = true; standard_khomloy_input.disabled = false;
ticket_date_november15th.addEventListener('click', function () { ticket_date_november15th.addEventListener('click', function () {
premium_khomloy_left.innerText ='Sold out' premium_khomloy_left.innerText ='Sold out'
@ -444,7 +444,7 @@
vip_khomloy_input.checked = true; vip_khomloy_input.checked = true;
currentTicketPrice = parseInt(vip_khomloy_input.getAttribute('data-price')); currentTicketPrice = parseInt(vip_khomloy_input.getAttribute('data-price'));
adultNumberValue = parseInt(adultNumberNode.value); adultNumberValue = parseInt(adultNumberNode.value);
calcTotalPrice(dataPrice, adultNumberValue); calcTotalPrice(currentTicketPrice, adultNumberValue);
}); });
ticket_date_november16th.addEventListener('click', function () { ticket_date_november16th.addEventListener('click', function () {
@ -459,7 +459,7 @@
premium_khomloy_input.checked = true; premium_khomloy_input.checked = true;
currentTicketPrice = parseInt(premium_khomloy_input.getAttribute('data-price')); currentTicketPrice = parseInt(premium_khomloy_input.getAttribute('data-price'));
adultNumberValue = parseInt(adultNumberNode.value); adultNumberValue = parseInt(adultNumberNode.value);
calcTotalPrice(dataPrice, adultNumberValue); calcTotalPrice(currentTicketPrice, adultNumberValue);
}); });
}); });

Loading…
Cancel
Save