Пример #1
0
 /**
  * table_cate function.
  *
  * @access private
  * @return void
  */
 private function table_cate()
 {
     include_once BG_PATH_MODEL . "cate.class.php";
     //载入管理帐号模型
     $_mdl_cate = new MODEL_CATE();
     $_arr_cateTable = $_mdl_cate->mdl_create_table();
     $_arr_cateIndex = $_mdl_cate->mdl_create_index();
     $this->tplData["db_alert"]["cate_table"] = array("alert" => $_arr_cateTable["alert"], "status" => substr($_arr_cateTable["alert"], 0, 1));
     $this->tplData["db_alert"]["cate_index"] = array("alert" => $_arr_cateIndex["alert"], "status" => substr($_arr_cateIndex["alert"], 0, 1));
 }
Пример #2
0
 /**
  * table_cate function.
  *
  * @access private
  * @return void
  */
 private function table_cate()
 {
     include_once BG_PATH_MODEL . "cate.class.php";
     //载入管理帐号模型
     $_mdl_cate = new MODEL_CATE();
     $_arr_cateRow = $_mdl_cate->mdl_create_table();
     if ($_arr_cateRow["alert"] != "y110105") {
         $this->obj_ajax->halt_alert($_arr_cateRow["alert"]);
     }
     $_arr_cateRow = $_mdl_cate->mdl_create_index();
     if ($_arr_cateRow["alert"] != "y110109") {
         $this->obj_ajax->halt_alert($_arr_cateRow["alert"]);
     }
 }
Пример #3
0
 /**
  * table_cate function.
  *
  * @access private
  * @return void
  */
 private function table_cate()
 {
     include_once BG_PATH_MODEL . "cate.class.php";
     //载入管理帐号模型
     $_mdl_cate = new MODEL_CATE();
     $_arr_col = $_mdl_cate->mdl_column();
     $_arr_alert = array();
     if (in_array("cate_id", $_arr_col)) {
         $_arr_alert["cate_id"] = array("CHANGE", "smallint NOT NULL AUTO_INCREMENT COMMENT 'ID'", "cate_id");
     }
     if (in_array("cate_type", $_arr_col)) {
         $_arr_alert["cate_type"] = array("CHANGE", "enum('normal','single','link') NOT NULL COMMENT '类型'", "cate_type");
     }
     if (in_array("cate_parent_id", $_arr_col)) {
         $_arr_alert["cate_parent_id"] = array("CHANGE", "smallint NOT NULL COMMENT '父栏目'", "cate_parent_id");
     }
     if (in_array("cate_ftp_port", $_arr_col)) {
         $_arr_alert["cate_ftp_port"] = array("CHANGE", "char(5) NOT NULL COMMENT 'FTP端口'", "cate_ftp_port");
     }
     if (in_array("cate_status", $_arr_col)) {
         $_arr_alert["cate_status"] = array("CHANGE", "enum('show','hide') NOT NULL COMMENT '状态'", "cate_status");
     }
     if (in_array("cate_order", $_arr_col)) {
         $_arr_alert["cate_order"] = array("CHANGE", "smallint NOT NULL COMMENT '排序'", "cate_order");
     }
     if (!in_array("cate_perpage", $_arr_col)) {
         $_arr_alert["cate_perpage"] = array("ADD", "tinyint NOT NULL COMMENT '每页文章数'");
     }
     if ($_arr_alert) {
         $_reselt = $this->obj_db->alert_table(BG_DB_TABLE . "cate", $_arr_alert);
         if (!$_reselt) {
             $this->obj_ajax->halt_alert("x110106");
         }
     }
     $_arr_cateRow = $_mdl_cate->mdl_create_index();
     if ($_arr_cateRow["alert"] != "y110109") {
         $this->obj_ajax->halt_alert($_arr_cateRow["alert"]);
     }
 }