load->model('Orders_model'); } public function index() { echo 'test index'; } // https://proxy-www.asiahighlights.com/index.php/test/ip_address public function ip_address() { echo "REMOTE_ADDR: " . $this->input->server('REMOTE_ADDR') . '
'; echo "HTTP_CLIENT_IP: " . $this->input->server('HTTP_CLIENT_IP') . '
'; echo "HTTP_X_FORWARDED_FOR: " . $this->input->server('HTTP_X_FORWARDED_FOR') . '
'; echo "HTTP_TRUE_CLIENT_IP: " . $this->input->server('HTTP_TRUE_CLIENT_IP') . '
'; echo "input->ip_address: " . $this->input->ip_address(); } // https://proxy-www.asiahighlights.com/index.php/test/country_code public function country_code() { $country_code = $this->input->post('country_code'); $country_array = explode('+', $country_code); var_dump($country_array); $country_id = $this->Orders_model->get_country_id_by_code($country_code); echo 'country_id: '.$country_id; } //根据条件获取模板所对应的页面url public function search_url(){ $this->load->model('test_model'); $template = $this->input->post('ic_template'); //构造一个页面 $html = ''; $html .= '

AH模板页面查询

'; $html .= '
'; $html .= ''; $html .= '
'; echo $html; if(!empty($template)){ $all_url = $this->test_model->get_url($template); $i = 1; foreach($all_url as $item){ echo $i.' : '.$item->ic_url.' 查看原页面'; echo '
'; $i++; } } } public function search_contents(){ $this->load->model('test_model'); $template = $this->input->post('url'); //构造一个页面 $html = ''; $html .= '

AH根据url查询所属页面

'; $html .= '
'; $html .= '输入url:'; $html .= '
'; echo $html; if(!empty($template)){ $all_url = $this->test_model->get_contents($template); $i = 1; foreach($all_url as $item){ echo $i.' : '.$item->ic_url.' 查看原页面'; echo '
'; $i++; } } } }