|
|
|
@ -3,7 +3,7 @@ if (!defined('BASEPATH')) {
|
|
|
|
|
exit('No direct script access allowed');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class Amp_Loader extends CI_Controller {
|
|
|
|
|
class CT_Amp_Loader extends CI_Controller {
|
|
|
|
|
|
|
|
|
|
function __construct() {
|
|
|
|
|
parent::__construct();
|
|
|
|
@ -18,13 +18,17 @@ class Amp_Loader extends CI_Controller {
|
|
|
|
|
*/
|
|
|
|
|
public function load() {
|
|
|
|
|
$info_url = $this->input->get_post('info_url');
|
|
|
|
|
$information_detail = $this->information_model->get_by_url($info_url);
|
|
|
|
|
$webcode = $this->input->get_post('webcode');
|
|
|
|
|
if(!isset($webcode) ) {
|
|
|
|
|
$webcode="ct";
|
|
|
|
|
}
|
|
|
|
|
$information_detail = $this->information_model->ct_get_by_url($info_url, $webcode);
|
|
|
|
|
$ic_id = $information_detail->ic_id;
|
|
|
|
|
$meta_amp_status = $this->InfoMetas_model->get($ic_id, 'AMP_STATUS');
|
|
|
|
|
if ($meta_amp_status) {
|
|
|
|
|
$meta_amp_html = $this->InfoMetas_model->get($ic_id, 'AMP');
|
|
|
|
|
$include_price_html = $this->tags_analysis->replace_price_tag($meta_amp_html);
|
|
|
|
|
echo $include_price_html;
|
|
|
|
|
//$include_price_html = $this->tags_analysis->replace_price_tag($meta_amp_html);
|
|
|
|
|
echo $meta_amp_html;
|
|
|
|
|
} else {
|
|
|
|
|
header('HTTP/1.1 404 Not Found');
|
|
|
|
|
header("status: 404 Not Found");
|
|
|
|
@ -39,13 +43,13 @@ class Amp_Loader extends CI_Controller {
|
|
|
|
|
*/
|
|
|
|
|
public function test() {
|
|
|
|
|
$info_url = $this->input->get_post('info_url');
|
|
|
|
|
$information_detail = $this->information_model->get_by_url($info_url);
|
|
|
|
|
$information_detail = $this->information_model->ct_get_by_url($info_url, "ct");
|
|
|
|
|
if (empty($information_detail)) {
|
|
|
|
|
echo $info_url.'没有信息类型';
|
|
|
|
|
}
|
|
|
|
|
$ic_id = $information_detail->ic_id;
|
|
|
|
|
$meta_amp_html = $this->InfoMetas_model->get($ic_id, 'AMP');
|
|
|
|
|
$include_price_html = $this->tags_analysis->replace_price_tag($meta_amp_html);
|
|
|
|
|
echo $include_price_html;
|
|
|
|
|
//$include_price_html = $this->tags_analysis->replace_price_tag($meta_amp_html);
|
|
|
|
|
echo $meta_amp_html;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|