示例#1
0
 function __construct()
 {
     parent::__construct();
     if (!empty($_GET['code'])) {
         $this->code = trim($_GET['code']);
     }
     if (!empty($_GET['msg'])) {
         $this->message = urldecode($_GET['msg']);
     }
     flash("offer");
 }
示例#2
0
 function __construct()
 {
     parent::__construct();
     $this->model = new PbModel();
     $this->allowed_search = array("info" => "news", "offer" => "offer", "product" => "product", "yellow_page" => "company");
     if (isset($_GET['module'])) {
         $this->module = trim(strtolower($_GET['module']));
     }
     $this->option = $this->module;
     if (!empty($this->module) && !in_array($this->module, $this->allowed_search)) {
         flash();
     }
     $search_word = !empty($_GET['q']) ? htmlspecialchars(trim($_GET['q']), ENT_QUOTES) : '';
     switch ($this->module) {
         case "company":
             $this->condition[] = 'status=1';
             if (!empty($search_word)) {
                 $this->condition[] = "name LIKE '%{$search_word}%'";
             }
             $this->extra = ",name AS title,description AS content";
             break;
         case "offer":
             $condition[] = 'status=1';
             if (!empty($search_word)) {
                 $this->condition[] = "title LIKE '%{$search_word}%'";
             }
             $this->option = "offer";
             $this->module = "trade";
             break;
         case "product":
             $condition[] = 'status=1';
             if (!empty($search_word)) {
                 $this->condition[] = "name LIKE '%{$search_word}%'";
             }
             $this->extra = ",name AS title";
             break;
         default:
             $condition[] = 'status=1';
             if (!empty($search_word)) {
                 $this->condition[] = "title LIKE '%{$search_word}%'";
             }
             break;
     }
     $search_controller = new PbController();
     $this->model_name = htmlspecialchars($this->module, ENT_QUOTES);
     $this->model_name = strtolower($search_controller->pluralize(ucwords($this->model_name)));
     $this->view->setTemplateDir(PHPB2B_ROOT . "templates/wap/3g" . DS, 'wap');
     $this->view->setCompileDir(DATA_PATH . "templates_c" . DS . $this->lang . DS . "wap" . DS . "3g" . DS);
 }
示例#3
0
 function __construct()
 {
     parent::__construct();
     $this->loadModel("industry");
 }
示例#4
0
 function __construct()
 {
     parent::__construct();
     $this->loadModel("expo");
 }
 function __construct($file = null)
 {
     parent::__construct();
     $this->loadCache($file);
 }
示例#6
0
 function __construct()
 {
     parent::__construct();
 }
示例#7
0
 function __construct()
 {
     parent::__construct();
     $this->loadModel("product");
 }