Example #1
0
 /**
  * table_custom function.
  *
  * @access private
  * @return void
  */
 private function table_custom()
 {
     include_once BG_PATH_MODEL . "custom.class.php";
     //载入管理帐号模型
     $_mdl_custom = new MODEL_CUSTOM();
     $_arr_customTable = $_mdl_custom->mdl_create_table();
     $this->tplData["db_alert"]["custom_table"] = array("alert" => $_arr_customTable["alert"], "status" => substr($_arr_customTable["alert"], 0, 1));
 }
Example #2
0
 private function table_custom()
 {
     include_once BG_PATH_MODEL . "custom.class.php";
     //载入管理帐号模型
     $_mdl_custom = new MODEL_CUSTOM();
     $_arr_customRow = $_mdl_custom->mdl_create_table();
     if ($_arr_customRow["alert"] != "y200105") {
         $this->obj_ajax->halt_alert($_arr_customRow["alert"]);
     }
 }
Example #3
0
 private function table_custom()
 {
     include_once BG_PATH_MODEL . "custom.class.php";
     //载入管理帐号模型
     $_mdl_custom = new MODEL_CUSTOM();
     $_arr_customRow = $_mdl_custom->mdl_create_table();
     if ($_arr_customRow["alert"] != "y200105") {
         $this->obj_ajax->halt_alert($_arr_customRow["alert"]);
     }
     $_arr_col = $_mdl_custom->mdl_column();
     $_arr_alert = array();
     if (!in_array("custom_order", $_arr_col)) {
         $_arr_alert["custom_order"] = array("ADD", "smallint NOT NULL COMMENT '排序'");
     }
     if (!in_array("custom_parent_id", $_arr_col)) {
         $_arr_alert["custom_parent_id"] = array("ADD", "smallint NOT NULL COMMENT '父字段'");
     }
     if (in_array("custom_type", $_arr_col)) {
         $_arr_alert["custom_type"] = array("CHANGE", "enum('article','cate') NOT NULL COMMENT '对象'", "custom_target");
     }
     if (!in_array("custom_opt", $_arr_col)) {
         $_arr_alert["custom_opt"] = array("ADD", "varchar(900) NOT NULL COMMENT '选项'");
     }
     if ($_arr_alert) {
         $_reselt = $this->obj_db->alert_table(BG_DB_TABLE . "custom", $_arr_alert);
         if (!$_reselt) {
             $this->obj_ajax->halt_alert("x200106");
         }
     }
     $_arr_col = $_mdl_custom->mdl_column();
     $_arr_alert = array();
     if (!in_array("custom_type", $_arr_col)) {
         $_arr_alert["custom_type"] = array("ADD", "enum('int','decimal','varchar','text','enum') NOT NULL COMMENT '类型'");
     }
     if ($_arr_alert) {
         $_reselt = $this->obj_db->alert_table(BG_DB_TABLE . "custom", $_arr_alert);
         if (!$_reselt) {
             $this->obj_ajax->halt_alert("x200106");
         }
     }
 }