/** * Constructor for dbKITdirList * @param boolean $create_tables * @version 0.26 - also used by kitForm !!! */ public function __construct($create_tables = false) { parent::__construct(); $this->create_tables = $create_tables; $this->setTableName('mod_kit_dirlist'); $this->addFieldDefinition(self::field_id, "INT NOT NULL AUTO_INCREMENT", true); $this->addFieldDefinition(self::field_reference, "VARCHAR(255) NOT NULL DEFAULT ''"); $this->addFieldDefinition(self::field_file_origin, "VARCHAR(255) NOT NULL DEFAULT ''"); $this->addFieldDefinition(self::field_file, "VARCHAR(255) NOT NULL DEFAULT ''"); $this->addFieldDefinition(self::field_path, "TEXT NOT NULL DEFAULT ''"); $this->addFieldDefinition(self::field_count, "INT(11) NOT NULL DEFAULT '0'"); $this->addFieldDefinition(self::field_date, "DATETIME DEFAULT '0000-00-00 00:00:00'"); $this->addFieldDefinition(self::field_user, "VARCHAR(128) NOT NULL DEFAULT ''"); $this->addFieldDefinition(self::field_update, "TIMESTAMP"); // check field definitions $this->checkFieldDefinitions(); // set default timezone date_default_timezone_set('Europe/Berlin'); // create tables if ($this->create_tables) { if (!$this->sqlTableExists()) { if (!$this->sqlCreateTable()) { $this->setError(sprintf('[%s - %s] %s', __METHOD__, __LINE__, $this->getError())); return false; } } } return true; }
public function __construct($createTables = false) { $this->createTables = $createTables; // use another table prefix? if (file_exists(WB_PATH . '/modules/' . basename(dirname(__FILE__)) . '/config.json')) { $config = json_decode(file_get_contents(WB_PATH . '/modules/' . basename(dirname(__FILE__)) . '/config.json'), true); if (isset($config['table_prefix'])) { self::$table_prefix = $config['table_prefix']; } } parent::__construct(); $this->setTablePrefix(self::$table_prefix); $this->setTableName('mod_kit_newsletter_cfg'); $this->addFieldDefinition(self::field_id, "INT(11) NOT NULL AUTO_INCREMENT", true); $this->addFieldDefinition(self::field_name, "VARCHAR(32) NOT NULL DEFAULT ''"); $this->addFieldDefinition(self::field_type, "TINYINT UNSIGNED NOT NULL DEFAULT '" . self::type_undefined . "'"); $this->addFieldDefinition(self::field_value, "VARCHAR(255) NOT NULL DEFAULT ''", false, false, true); $this->addFieldDefinition(self::field_label, "VARCHAR(64) NOT NULL DEFAULT 'ed_str_undefined'"); $this->addFieldDefinition(self::field_description, "VARCHAR(255) NOT NULL DEFAULT 'ed_str_undefined'"); $this->addFieldDefinition(self::field_status, "TINYINT UNSIGNED NOT NULL DEFAULT '" . self::status_active . "'"); $this->addFieldDefinition(self::field_update_by, "VARCHAR(32) NOT NULL DEFAULT 'SYSTEM'"); $this->addFieldDefinition(self::field_update_when, "DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00'"); $this->setIndexFields(array(self::field_name)); $this->setAllowedHTMLtags(''); $this->checkFieldDefinitions(); // Tabelle erstellen if ($this->createTables) { if (!$this->sqlTableExists()) { if (!$this->sqlCreateTable()) { $this->setError(sprintf('[%s - %s] %s', __METHOD__, __LINE__, $this->getError())); } } } // Default Werte garantieren if ($this->sqlTableExists()) { $this->checkConfig(); } }
public function __construct() { parent::__construct(); $this->setTableName('mod_code'); $this->addFieldDefinition(self::field_section_id, "INT(11) NOT NULL DEFAULT '0'", true); $this->addFieldDefinition(self::field_page_id, "INT(11) NOT NULL DEFAULT '0'"); $this->addFieldDefinition(self::field_content, "TEXT NOT NULl DEFAULT ''"); $this->checkFieldDefinitions(); }
function __construct($create_tables = false) { $this->create_tables = $create_tables; // use another table prefix? if (file_exists(WB_PATH . '/modules/' . basename(dirname(__FILE__)) . '/config.json')) { $config = json_decode(file_get_contents(WB_PATH . '/modules/' . basename(dirname(__FILE__)) . '/config.json'), true); if (isset($config['table_prefix'])) { self::$table_prefix = $config['table_prefix']; } } parent::__construct(); $this->setTablePrefix(self::$table_prefix); $this->setTableName('mod_kit_cronjob_nl_log'); $this->addFieldDefinition(self::field_id, "INT NOT NULL AUTO_INCREMENT", true); $this->addFieldDefinition(self::field_nl_process_id, "INT(11) NOT NULL DEFAULT '-1'"); $this->addFieldDefinition(self::field_email, "VARCHAR(80) NOT NULL DEFAULT ''"); $this->addFieldDefinition(self::field_kit_id, "INT(11) NOT NULL DEFAULT '-1'"); $this->addFieldDefinition(self::field_status, "TINYINT NOT NULL DEFAULT '" . self::status_ok . "'"); $this->addFieldDefinition(self::field_error, "VARCHAR(255) NOT NULL DEFAULT ''"); $this->addFieldDefinition(self::field_timestamp, "TIMESTAMP"); // check field definitions $this->checkFieldDefinitions(); // create tables if ($this->create_tables) { if (!$this->sqlTableExists()) { if (!$this->sqlCreateTable()) { $this->setError(sprintf('[%s - %s] %s', __METHOD__, __LINE__, $this->getError())); return false; } } } return true; }
function __construct($create_tables = false) { $this->create_tables = $create_tables; // use another table prefix? if (file_exists(WB_PATH . '/modules/' . basename(dirname(__FILE__)) . '/config.json')) { $config = json_decode(file_get_contents(WB_PATH . '/modules/' . basename(dirname(__FILE__)) . '/config.json'), true); if (isset($config['table_prefix'])) { self::$table_prefix = $config['table_prefix']; } } parent::__construct(); $this->setTablePrefix(self::$table_prefix); $this->setTableName('mod_kit_newsletter_process'); $this->addFieldDefinition(self::field_id, "INT NOT NULL AUTO_INCREMENT", true); $this->addFieldDefinition(self::field_archiv_id, "INT(11) NOT NULL DEFAULT '-1'"); $this->addFieldDefinition(self::field_register_ids, "TEXT NOT NULL DEFAULT ''"); $this->addFieldDefinition(self::field_distribution_ids, "TEXT NOT NULL DEFAULT ''"); $this->addFieldDefinition(self::field_count, "INT(11) NOT NULL DEFAULT '0'"); $this->addFieldDefinition(self::field_send, "INT(11) NOT NULL DEFAULT '0'"); $this->addFieldDefinition(self::field_simulate, "TINYINT NOT NULL DEFAULT '0'"); $this->addFieldDefinition(self::field_job_created_dt, "DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00'"); $this->addFieldDefinition(self::field_job_done_dt, "DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00'"); $this->addFieldDefinition(self::field_job_process_time, "FLOAT NOT NULL DEFAULT '0'"); $this->addFieldDefinition(self::field_is_done, "TINYINT NOT NULL DEFAULT '0'"); $this->addFieldDefinition(self::field_update_when, "TIMESTAMP"); // check field definitions $this->checkFieldDefinitions(); // create tables if ($this->create_tables) { if (!$this->sqlTableExists()) { if (!$this->sqlCreateTable()) { $this->setError(sprintf('[%s - %s] %s', __METHOD__, __LINE__, $this->getError())); return false; } } } return true; }
public function __construct($create_table = false) { $this->setCreateTable($create_table); // use another table prefix? if (file_exists(LEPTON_PATH . '/modules/' . basename(dirname(__FILE__)) . '/config.json')) { $config = json_decode(file_get_contents(LEPTON_PATH . '/modules/' . basename(dirname(__FILE__)) . '/config.json'), true); if (isset($config['table_prefix'])) { self::$table_prefix = $config['table_prefix']; } } parent::__construct(); $this->setTablePrefix(self::$table_prefix); $this->setTableName('mod_kit_form_command'); $this->addFieldDefinition(self::FIELD_ID, "INT(11) NOT NULL AUTO_INCREMENT", true); $this->addFieldDefinition(self::FIELD_COMMAND, "VARCHAR(80) NOT NULL DEFAULT ''"); $this->addFieldDefinition(self::FIELD_TYPE, "INT(11) NOT NULL DEFAULT '" . self::TYPE_UNDEFINED . "'"); $this->addFieldDefinition(self::FIELD_PARAMS, "MEDIUMTEXT NOT NULL DEFAULT ''"); $this->addFieldDefinition(self::FIELD_STATUS, "TINYINT NOT NULL DEFAULT '" . self::STATUS_UNDEFINED . "'"); $this->addFieldDefinition(self::FIELD_TIMESTAMP, "TIMESTAMP"); $this->checkFieldDefinitions(); if ($this->getCreateTable()) { if (!$this->sqlTableExists()) { if (!$this->sqlCreateTable()) { $this->setError(sprintf('[%s - %s] %s', __METHOD__, __LINE__, $this->getError())); return false; } } } date_default_timezone_set(cfg_time_zone); }
public function __construct() { parent::__construct(); $this->setTableName('groups'); $this->addFieldDefinition(self::field_group_id, "INT NOT NULL AUTO_INCREMENT", true); $this->addFieldDefinition(self::field_name, "VARCHAR(255) NOT NULL DEFAULT ''"); $this->addFieldDefinition(self::field_system_permissions, "TEXT NOT NULL DEFAULT ''"); $this->addFieldDefinition(self::field_module_permissions, "TEXT NOT NULL DEFAULT ''"); $this->addFieldDefinition(self::field_template_permissions, "TEXT NOT NULL DEFAULT ''"); // check field definitions $this->checkFieldDefinitions(); // set default timezone date_default_timezone_set(CFG_TIME_ZONE); }