<?php if (!defined('IN_ANWSION')) { die; } class main extends AWS_CONTROLLER{ public function get_access_rule() { $rule_action['rule_type'] = 'white'; //黑名单,黑名单中的检查 'white'白名单,白名单以外的检查 $rule_action['actions'] = array('index', 'wangdian'); return $rule_action; } //默认行为,当没有指定具体行为时,将默认执行这个 function index_action() { include 'express.php'; if($_GET['danhao']!==null){ $danhao =$_GET['danhao']; $danhao_content=(json_decode(Express::getExpressInfo($danhao),true)); if($danhao_content['com']!==null){ $gongsi=$danhao_content['com']; $this->model('kuaidi')->add_kuaidi($danhao,$gongsi); } TPL::assign('danhao_content', $danhao_content); }else{ TPL::assign('kuaidi_list', $this->model('kuaidi')->get_kuaidi_list_all()); } TPL::assign('count', $this->model('kuaidi')->get_count_all()); TPL::output('kuaidi/index'); } function wangdian_action(){ include 'wangdian.php'; var_dump($this->$_POST()); if(($_POST['province']!==null) and ($_POST['city']!==null)){ $company=$_POST['province']; $area=$_POST['city']; $keyword=$_POST['keyword']; $express=new ExpressArea("$company-$area-$keyword",null,"$keyword"); $result=$express->query(); $data=json_decode($result,true); print_r($data); } TPL::output('kuaidi/wangdian'); } } ?>模型文件,模板文件都已经建好!
AI智能回复搜索中,请稍后...