当前位置: 首页>>代码示例>>PHP>>正文


PHP config::del方法代码示例

本文整理汇总了PHP中config::del方法的典型用法代码示例。如果您正苦于以下问题:PHP config::del方法的具体用法?PHP config::del怎么用?PHP config::del使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在config的用法示例。


在下文中一共展示了config::del方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: update014

function update014()
{
    global $url, $smarty;
    //Checking if this Update already done
    if (CURRENT_DB_UPDATE < "014") {
        if (is_null(config::get('014updatestatus'))) {
            config::set('014updatestatus', 0);
        }
        $qry = DBFactory::getDBQuery(true);
        if (config::get('014updatestatus') < 1) {
            // Add killmail summary. time, hash, trust.
            $sql = 'CREATE TABLE IF NOT EXISTS `kb3_mails` (
  `kll_id` int(11) NOT NULL auto_increment,
  `kll_timestamp` datetime NOT NULL default "0000-00-00 00:00:00",
  `kll_external_id` int(8) default NULL,
  `kll_hash` BINARY(16) NOT NULL,
  `kll_trust` TINYINT NOT NULL DEFAULT 0,
  PRIMARY KEY  (`kll_id`),
  UNIQUE KEY `external_id` (`kll_external_id`),
  UNIQUE KEY `time_hash` (`kll_timestamp`,`kll_hash`)
) Engine=InnoDB';
            $qry->execute($sql);
        }
        killCache();
        config::set("DBUpdate", "014");
        $qry->execute("INSERT INTO kb3_config (cfg_site, cfg_key, cfg_value) SELECT cfg_site, 'DBUpdate', '014' FROM kb3_config GROUP BY cfg_site ON DUPLICATE KEY UPDATE cfg_value = '014'");
        config::del("014updatestatus");
        $smarty->assign('refresh', 1);
        $smarty->assign('content', "Update 014 completed.");
        $smarty->display('update.tpl');
        die;
    }
}
开发者ID:biow0lf,项目名称:evedev-kb,代码行数:33,代码来源:update.php

示例2: update034

/**
 * @package EDK
 */
function update034()
{
    global $url, $smarty;
    //Checking if this Update already done
    if (CURRENT_DB_UPDATE < "034") {
        if (is_null(config::get('034updatestatus'))) {
            config::set('034updatestatus', 0);
        }
        $qry = DBFactory::getDBQuery(true);
        if (config::get('034updatestatus') < 1) {
            $qry->execute("SHOW COLUMNS FROM kb3_invtypes LIKE 'radius'");
            if ($qry->recordCount()) {
                $sql = "ALTER TABLE `kb3_invtypes` DROP COLUMN `radius` ";
                $qry->execute($sql);
            }
        }
        config::set("DBUpdate", "034");
        $qry->execute("INSERT INTO kb3_config (cfg_site, cfg_key, cfg_value) SELECT cfg_site, 'DBUpdate', '034' FROM kb3_config GROUP BY cfg_site ON DUPLICATE KEY UPDATE cfg_value = '034'");
        config::del("034updatestatus");
        $smarty->assign('refresh', 1);
        $smarty->assign('content', "Update 034 completed.");
        $smarty->display('update.tpl');
        die;
    }
}
开发者ID:biow0lf,项目名称:evedev-kb,代码行数:28,代码来源:update.php

示例3: update022

function update022()
{
    global $url, $smarty;
    //Checking if this Update already done
    if (CURRENT_DB_UPDATE < "022") {
        if (is_null(config::get('022updatestatus'))) {
            config::set('022updatestatus', 0);
        }
        $qry = DBFactory::getDBQuery(true);
        if (config::get('022updatestatus') < 1) {
            $qry->execute("DELETE FROM `kb3_ships` WHERE `shp_externalid` = 0 AND `shp_name` NOT LIKE '%Unknown%'");
            $qry->execute("DELETE FROM `kb3_ships` WHERE `shp_id` IN (206, 497, 348, 349,352, 354, 606)");
            config::set('022updatestatus', 1);
            $smarty->assign('refresh', 1);
            $smarty->assign('content', "22. Delete unused and duplicated ships from ships table.");
            $smarty->display('update.tpl');
            die;
        }
        if (config::get('022updatestatus') < 2) {
            // Add timestamp column to kb3_inv_detail
            $qry->execute("SHOW INDEX FROM `kb3_ships`");
            $indextexists = false;
            while ($testresult = $qry->getRow()) {
                if ($testresult['Column_name'] == 'shp_externalid') {
                    $indextexists = true;
                }
            }
            if (!$indextexists) {
                $qry->execute("ALTER TABLE `kb3_ships` ADD UNIQUE `shp_externalid` ( `shp_externalid` ) ");
                config::set('022updatestatus', 2);
                $smarty->assign('refresh', 1);
                $smarty->assign('content', "22. Ships table added unique index for external IDs.");
                $smarty->display('update.tpl');
                die;
            }
        }
        if (config::get('022updatestatus') < 3) {
            //not too happy about this one but it does force the ships to use *my* IDs, as it would be if i dumped it - FRK
            $qry->execute("INSERT IGNORE INTO `kb3_ships` (`shp_id` ,`shp_name` ,`shp_class` ,`shp_externalid` ,`shp_rce_id` ,`shp_baseprice` ,`shp_techlevel` ,`shp_isfaction`) VALUES (704 , 'Guristas Shuttle', '11', '21628', '1', '10000000', '1', '1');");
            $qry->execute("INSERT IGNORE INTO `kb3_ships` (`shp_id` ,`shp_name` ,`shp_class` ,`shp_externalid` ,`shp_rce_id` ,`shp_baseprice` ,`shp_techlevel` ,`shp_isfaction`) VALUES (705 , 'Civilian Gallente Shuttle', '11', '27303', '8', '0', '1', '0');");
            config::set('022updatestatus', 3);
            $smarty->assign('refresh', 1);
            $smarty->assign('content', "22. Insert missing shuttles.");
            $smarty->display('update.tpl');
            die;
        }
        killCache();
        config::set("DBUpdate", "022");
        $qry->execute("INSERT INTO kb3_config (cfg_site, cfg_key, cfg_value) SELECT cfg_site, 'DBUpdate', '022' FROM kb3_config GROUP BY cfg_site ON DUPLICATE KEY UPDATE cfg_value = '022'");
        config::del("022updatestatus");
        $smarty->assign('refresh', 1);
        $smarty->assign('content', "Update 022 completed.");
        $smarty->display('update.tpl');
        die;
    }
}
开发者ID:biow0lf,项目名称:evedev-kb,代码行数:56,代码来源:update.php

示例4: update021

function update021()
{
    global $url, $smarty;
    //Checking if this Update already done
    if (CURRENT_DB_UPDATE < "021") {
        $qry = DBFactory::getDBQuery(true);
        if (is_null(config::get('021updatestatus'))) {
            config::set('021updatestatus', 0);
        }
        if (config::get('021updatestatus') < 1) {
            // Add timestamp column to kb3_inv_detail
            $qry->execute("SHOW COLUMNS FROM kb3_ships LIKE 'shp_isfaction'");
            if (!$qry->recordCount()) {
                $qry->execute("ALTER TABLE `kb3_ships` ADD `shp_isfaction` TINYINT(1) DEFAULT '0' AFTER `shp_techlevel`;");
                config::set('021updatestatus', 1);
                $smarty->assign('refresh', 1);
                $smarty->assign('content', "21. kb3_ships shp_isfaction column added");
                $smarty->display('update.tpl');
                die;
            }
        }
        if (config::get('021updatestatus') < 3) {
            $qry->execute("UPDATE kb3_ships SET shp_isfaction = '1' WHERE shp_externalid = 3628;");
            $qry->execute("UPDATE kb3_ships SET shp_isfaction = '1' WHERE shp_externalid = 17715;");
            $qry->execute("UPDATE kb3_ships SET shp_isfaction = '1' WHERE shp_externalid = 17718;");
            $qry->execute("UPDATE kb3_ships SET shp_isfaction = '1' WHERE shp_externalid = 17720;");
            $qry->execute("UPDATE kb3_ships SET shp_isfaction = '1' WHERE shp_externalid = 17722;");
            $qry->execute("UPDATE kb3_ships SET shp_isfaction = '1' WHERE shp_externalid = 17736;");
            $qry->execute("UPDATE kb3_ships SET shp_isfaction = '1' WHERE shp_externalid = 17738;");
            $qry->execute("UPDATE kb3_ships SET shp_isfaction = '1' WHERE shp_externalid = 17740;");
            $qry->execute("UPDATE kb3_ships SET shp_isfaction = '1' WHERE shp_externalid = 17918;");
            $qry->execute("UPDATE kb3_ships SET shp_isfaction = '1' WHERE shp_externalid = 17920;");
            $qry->execute("UPDATE kb3_ships SET shp_isfaction = '1' WHERE shp_externalid = 17922;");
            $qry->execute("UPDATE kb3_ships SET shp_isfaction = '1' WHERE shp_externalid = 17924;");
            $qry->execute("UPDATE kb3_ships SET shp_isfaction = '1' WHERE shp_externalid = 17926;");
            $qry->execute("UPDATE kb3_ships SET shp_isfaction = '1' WHERE shp_externalid = 17928;");
            $qry->execute("UPDATE kb3_ships SET shp_isfaction = '1' WHERE shp_externalid = 17930;");
            $qry->execute("UPDATE kb3_ships SET shp_isfaction = '1' WHERE shp_externalid = 17932;");
            $qry->execute("UPDATE kb3_ships SET shp_isfaction = '1' WHERE shp_externalid = 32207;");
            config::set('021updatestatus', 3);
            $smarty->assign('refresh', 1);
            $smarty->assign('content', "21. faction tags added");
            $smarty->display('update.tpl');
            die;
        }
        killCache();
        config::set("DBUpdate", "021");
        $qry->execute("INSERT INTO kb3_config (cfg_site, cfg_key, cfg_value) SELECT cfg_site, 'DBUpdate', '021' FROM kb3_config GROUP BY cfg_site ON DUPLICATE KEY UPDATE cfg_value = '021'");
        config::del("021updatestatus");
        $smarty->assign('refresh', 1);
        $smarty->assign('content', "Update 021 completed.");
        $smarty->display('update.tpl');
        die;
    }
}
开发者ID:biow0lf,项目名称:evedev-kb,代码行数:55,代码来源:update.php

示例5: update039

/**
 * @package EDK
 */
function update039()
{
    global $url, $smarty;
    //Checking if this Update already done
    if (CURRENT_DB_UPDATE < "039") {
        if (is_null(config::get('039updatestatus'))) {
            config::set('039updatestatus', 0);
        }
        $qry = DBFactory::getDBQuery(true);
        if (config::get('039updatestatus') < 1) {
            $qry->execute("UPDATE kb3_inv_detail SET ind_shp_id = 11194 WHERE ind_shp_id = 206");
            // Kitsune
            $qry->execute("UPDATE kb3_inv_detail SET ind_shp_id = 22428 WHERE ind_shp_id = 348");
            // Redeemer
            $qry->execute("UPDATE kb3_inv_detail SET ind_shp_id = 22430 WHERE ind_shp_id = 349");
            // Sin
            $qry->execute("UPDATE kb3_inv_detail SET ind_shp_id = 22436 WHERE ind_shp_id = 352");
            // Widow
            $qry->execute("UPDATE kb3_inv_detail SET ind_shp_id = 22440 WHERE ind_shp_id = 354");
            // Panther
            config::set('039updatestatus', 1);
            $smarty->assign('refresh', 1);
            $smarty->assign('content', "39. Update kb3_inv_detail.");
            $smarty->display('update.tpl');
            die;
        }
        if (config::get('039updatestatus') < 2) {
            $qry->execute("UPDATE kb3_kills SET kll_ship_id = 11194 WHERE kll_ship_id = 206");
            // Kitsune
            $qry->execute("UPDATE kb3_kills SET kll_ship_id = 22428 WHERE kll_ship_id = 348");
            // Redeemer
            $qry->execute("UPDATE kb3_kills SET kll_ship_id = 22430 WHERE kll_ship_id = 349");
            // Sin
            $qry->execute("UPDATE kb3_kills SET kll_ship_id = 22436 WHERE kll_ship_id = 352");
            // Widow
            $qry->execute("UPDATE kb3_kills SET kll_ship_id = 22440 WHERE kll_ship_id = 354");
            // Panther
            config::set('039updatestatus', 2);
            $smarty->assign('refresh', 1);
            $smarty->assign('content', "39. Update kb3_kills.");
            $smarty->display('update.tpl');
            die;
        }
        killCache();
        config::set("DBUpdate", "039");
        $qry->execute("INSERT INTO kb3_config (cfg_site, cfg_key, cfg_value) SELECT cfg_site, 'DBUpdate', '039' FROM kb3_config GROUP BY cfg_site ON DUPLICATE KEY UPDATE cfg_value = '039'");
        config::del("039updatestatus");
        $smarty->assign('refresh', 1);
        $smarty->assign('content', "Update 039 completed.");
        $smarty->display('update.tpl');
        die;
    }
}
开发者ID:biow0lf,项目名称:evedev-kb,代码行数:56,代码来源:update.php

示例6: update042

/**
 * @package EDK
 */
function update042()
{
    global $url, $smarty;
    //Checking if this Update already done
    if (CURRENT_DB_UPDATE < "042") {
        if (is_null(config::get('042updatestatus'))) {
            config::set('042updatestatus', 0);
        }
        $qry = DBFactory::getDBQuery(true);
        if (config::get('042updatestatus') < 1) {
            $qry->execute("ALTER TABLE kb3_alliances ADD COLUMN all_active TINYINT(1) NOT NULL DEFAULT 1 AFTER all_start_date");
            $qry->execute("ALTER TABLE kb3_alliances DROP INDEX all_name");
            $qry->execute("ALTER TABLE kb3_alliances ADD UNIQUE all_name_active ( all_name, all_active )");
            config::set('042updatestatus', 1);
            $smarty->assign('refresh', 1);
            $smarty->assign('content', "42. Add Active column to alliances.");
            $smarty->display('update.tpl');
            die;
        }
        if (config::get('042updatestatus') < 2) {
            $qry->execute("ALTER TABLE kb3_corps ADD COLUMN crp_active TINYINT(1) NOT NULL DEFAULT 1 AFTER crp_startdate");
            $qry->execute("ALTER TABLE kb3_corps DROP INDEX crp_name");
            $qry->execute("ALTER TABLE kb3_corps ADD UNIQUE crp_name_active ( crp_name, crp_active )");
            config::set('042updatestatus', 2);
            $smarty->assign('refresh', 1);
            $smarty->assign('content', "42. Add Active column to corps.");
            $smarty->display('update.tpl');
            die;
        }
        if (config::get('042updatestatus') < 3) {
            $qry->execute("ALTER TABLE kb3_pilots ADD COLUMN plt_active TINYINT(1) NOT NULL DEFAULT 1 AFTER plt_lpoints");
            $qry->execute("ALTER TABLE kb3_pilots DROP INDEX plt_name");
            $qry->execute("ALTER TABLE kb3_pilots ADD UNIQUE plt_name_active ( plt_name, plt_active )");
            config::set('042updatestatus', 3);
            $smarty->assign('refresh', 1);
            $smarty->assign('content', "42. Add Active column to pilots.");
            $smarty->display('update.tpl');
            die;
        }
        config::set("DBUpdate", "042");
        $qry->execute("INSERT INTO kb3_config (cfg_site, cfg_key, cfg_value) SELECT cfg_site, 'DBUpdate', '042' FROM kb3_config GROUP BY cfg_site ON DUPLICATE KEY UPDATE cfg_value = '042'");
        config::del("042updatestatus");
        $smarty->assign('refresh', 1);
        $smarty->assign('content', "Update 042 completed.");
        $smarty->display('update.tpl');
        die;
    }
}
开发者ID:biow0lf,项目名称:evedev-kb,代码行数:51,代码来源:update.php

示例7: update029

/**
 * @package EDK
 */
function update029()
{
    global $url, $smarty;
    //Checking if this Update already done
    if (CURRENT_DB_UPDATE < "029") {
        $qry = DBFactory::getDBQuery(true);
        $qry2 = DBFactory::getDBQuery(true);
        $newrows = array();
        $sql = 'SELECT cfg_site FROM kb3_config GROUP BY cfg_site';
        $qry->execute($sql);
        while ($row = $qry->getRow()) {
            $qry2->execute("SELECT cfg_value FROM kb3_config WHERE cfg_site = '" . $row['cfg_site'] . "' AND cfg_key = 'cfg_pilotid'");
            if ($row2 = $qry2->getRow()) {
                if (is_null($row2['cfg_value']) || is_numeric($row2['cfg_value'])) {
                    $newrows[] = '"' . $row['cfg_site'] . '", "cfg_pilotid", "' . serialize(array((int) $row['cfg_value'])) . '"';
                }
            } else {
                $newrows[] = '"' . $row['cfg_site'] . '", "cfg_pilotid", "' . serialize(array()) . '"';
            }
            $qry2->execute("SELECT cfg_value FROM kb3_config WHERE cfg_site = '" . $row['cfg_site'] . "' AND cfg_key = 'cfg_corpid'");
            if ($row2 = $qry2->getRow()) {
                if (is_null($row2['cfg_value']) || is_numeric($row2['cfg_value'])) {
                    $newrows[] = '"' . $row['cfg_site'] . '", "cfg_corpid", "' . serialize(array((int) $row['cfg_value'])) . '"';
                }
            } else {
                $newrows[] = '"' . $row['cfg_site'] . '", "cfg_corpid", "' . serialize(array()) . '"';
            }
            $qry2->execute("SELECT cfg_value FROM kb3_config WHERE cfg_site = '" . $row['cfg_site'] . "' AND cfg_key = 'cfg_allianceid'");
            if ($row2 = $qry2->getRow()) {
                if (is_null($row2['cfg_value']) || is_numeric($row2['cfg_value'])) {
                    $newrows[] = '"' . $row['cfg_site'] . '", "cfg_allianceid", "' . serialize(array((int) $row['cfg_value'])) . '"';
                }
            } else {
                $newrows[] = '"' . $row['cfg_site'] . '", "cfg_allianceid", "' . serialize(array()) . '"';
            }
        }
        if ($newrows) {
            $qry->execute('REPLACE INTO kb3_config (cfg_site, cfg_key, cfg_value) VALUES' . '(' . join('), (', $newrows) . ')');
        }
        config::set("DBUpdate", "029");
        $qry->execute("INSERT INTO kb3_config (cfg_site, cfg_key, cfg_value) SELECT cfg_site, 'DBUpdate', '029' FROM kb3_config GROUP BY cfg_site ON DUPLICATE KEY UPDATE cfg_value = '029'");
        config::del("029updatestatus");
        $smarty->assign('refresh', 1);
        $smarty->assign('content', "Update 029 completed.");
        $smarty->display('update.tpl');
        die;
    }
}
开发者ID:biow0lf,项目名称:evedev-kb,代码行数:51,代码来源:update.php

示例8: update030

/**
 * @package EDK
 */
function update030()
{
    global $url, $smarty;
    //Checking if this Update already done
    if (CURRENT_DB_UPDATE < "030") {
        $qry = DBFactory::getDBQuery(true);
        $newrows = array();
        $sql = 'ALTER TABLE kb3_eveunits MODIFY COLUMN displayName CHAR(25) DEFAULT NULL';
        $qry->execute($sql);
        config::set("DBUpdate", "030");
        $qry->execute("INSERT INTO kb3_config (cfg_site, cfg_key, cfg_value) SELECT cfg_site, 'DBUpdate', '030' FROM kb3_config GROUP BY cfg_site ON DUPLICATE KEY UPDATE cfg_value = '030'");
        config::del("030updatestatus");
        $smarty->assign('refresh', 1);
        $smarty->assign('content', "Update 030 completed.");
        $smarty->display('update.tpl');
        die;
    }
}
开发者ID:biow0lf,项目名称:evedev-kb,代码行数:21,代码来源:update.php

示例9: update038

/**
 * @package EDK
 */
function update038()
{
    global $url, $smarty;
    //Checking if this Update already done
    if (CURRENT_DB_UPDATE < "038") {
        $qry = DBFactory::getDBQuery(true);
        $sql = 'ALTER TABLE `kb3_dgmtypeattributes` CHANGE `typeID` `typeID` INT( 11 ) NOT NULL DEFAULT \'0\';';
        $qry->execute($sql);
        $qry->execute("SHOW COLUMNS FROM kb3_moons LIKE 'moo_id'");
        if (!$qry->recordCount()) {
            $sql = 'ALTER TABLE `kb3_moons` CHANGE `itemID` `moo_id` INT( 11 ) NOT NULL ,
					CHANGE `itemName` `moo_name` VARCHAR( 127 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;';
            $qry->execute($sql);
        }
        config::set("DBUpdate", "038");
        $qry->execute("INSERT INTO kb3_config (cfg_site, cfg_key, cfg_value) SELECT cfg_site, 'DBUpdate', '038' FROM kb3_config GROUP BY cfg_site ON DUPLICATE KEY UPDATE cfg_value = '038'");
        config::del("038updatestatus");
        $smarty->assign('refresh', 1);
        $smarty->assign('content', "Update 038 completed.");
        $smarty->display('update.tpl');
        die;
    }
}
开发者ID:biow0lf,项目名称:evedev-kb,代码行数:26,代码来源:update.php

示例10: update036

/**
 * @package EDK
 */
function update036()
{
    global $url, $smarty;
    //Checking if this Update already done
    if (CURRENT_DB_UPDATE < "036") {
        $qry = DBFactory::getDBQuery(true);
        $sql = 'CREATE TABLE IF NOT EXISTS `kb3_stations` (
				`sta_id` int(10) NOT NULL,
				`sta_sys_id` int(10) NOT NULL,
				`sta_con_id` int(10) NOT NULL,
				`sta_reg_id` int(10) NOT NULL,
				`sta_name` varchar(100) NOT NULL
				) Engine=MyISAM DEFAULT CHARSET=utf8 COLLATE utf8_general_ci;';
        $qry->execute($sql);
        config::set("DBUpdate", "036");
        $qry->execute("INSERT INTO kb3_config (cfg_site, cfg_key, cfg_value) SELECT cfg_site, 'DBUpdate', '036' FROM kb3_config GROUP BY cfg_site ON DUPLICATE KEY UPDATE cfg_value = '036'");
        config::del("036updatestatus");
        $smarty->assign('refresh', 1);
        $smarty->assign('content', "Update 036 completed.");
        $smarty->display('update.tpl');
        die;
    }
}
开发者ID:biow0lf,项目名称:evedev-kb,代码行数:26,代码来源:update.php

示例11: update041

/**
 * @package EDK
 */
function update041()
{
    global $url, $smarty;
    //Checking if this Update already done
    if (CURRENT_DB_UPDATE < "041") {
        if (is_null(config::get('041updatestatus'))) {
            config::set('041updatestatus', 0);
        }
        $qry = DBFactory::getDBQuery(true);
        if (config::get('041updatestatus') < 1) {
            $qry->execute("ALTER TABLE kb3_kills ADD COLUMN kll_td_plt_id INT(3) NULL DEFAULT NULL\r\t\t\t\tAFTER kll_fb_plt_id");
            $qry->execute("delete from kb3_config where cfg_key in ('style_name','kd_showbox')");
            config::set('041updatestatus', 1);
            $smarty->assign('refresh', 1);
            $smarty->assign('content', "41. Update kb3_kills.");
            $smarty->display('update.tpl');
            die;
        }
        if (config::get('041updatestatus') < 2) {
            //set top damage party, don't rely on ind_order = 0
            $qry->execute("update kb3_kills\n\t\t\t\tjoin (select ind_kll_id, ind_plt_id from kb3_inv_detail\n\t\t\t\t\tgroup by ind_kll_id\n\t\t\t\t\torder by ind_dmgdone desc\n\t\t\t\t) as inv\n\t\t\t\ton kb3_kills.kll_id = inv.ind_kll_id\n\t\t\t\tset kll_td_plt_id = inv.ind_plt_id");
            config::set('041updatestatus', 2);
            $smarty->assign('refresh', 1);
            $smarty->assign('content', "41. Record Final Blow party in kb3_kills.");
            $smarty->display('update.tpl');
            die;
        }
        //killCache();
        config::set("DBUpdate", "041");
        $qry->execute("INSERT INTO kb3_config (cfg_site, cfg_key, cfg_value) SELECT cfg_site, 'DBUpdate', '041' FROM kb3_config GROUP BY cfg_site ON DUPLICATE KEY UPDATE cfg_value = '041'");
        config::del("041updatestatus");
        $smarty->assign('refresh', 1);
        $smarty->assign('content', "Update 041 completed.");
        $smarty->display('update.tpl');
        die;
    }
}
开发者ID:biow0lf,项目名称:evedev-kb,代码行数:40,代码来源:update.php

示例12: update028

/**
 * @package EDK
 */
function update028()
{
    global $url, $smarty;
    //Checking if this Update already done
    if (CURRENT_DB_UPDATE < "028") {
        $qry = DBFactory::getDBQuery(true);
        // create table
        $sql = 'CREATE TABLE IF NOT EXISTS `kb3_moons` (
  `itemID` int(11) NOT NULL,
  `itemName` varchar(127) NOT NULL,
  PRIMARY KEY (`itemID`),
  KEY `itemName` (`itemName`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;';
        $qry->execute($sql);
        config::set("DBUpdate", "028");
        $qry->execute("INSERT INTO kb3_config (cfg_site, cfg_key, cfg_value) SELECT cfg_site, 'DBUpdate', '028' FROM kb3_config GROUP BY cfg_site ON DUPLICATE KEY UPDATE cfg_value = '028'");
        config::del("028updatestatus");
        $smarty->assign('url', '?package=CCPDB');
        $smarty->assign('refresh', 1);
        $smarty->assign('content', "Update 028 completed.");
        $smarty->display('update.tpl');
        die;
    }
}
开发者ID:biow0lf,项目名称:evedev-kb,代码行数:27,代码来源:update.php

示例13: update031

/**
 * @package EDK
 */
function update031()
{
    global $url, $smarty;
    //Checking if this Update already done
    if (CURRENT_DB_UPDATE < "031") {
        if (is_null(config::get('031updatestatus'))) {
            config::set('031updatestatus', 0);
        }
        $qry = DBFactory::getDBQuery(true);
        if (config::get('031updatestatus') < 1) {
            // create table
            $sql = 'CREATE TABLE IF NOT EXISTS kb3_feeds (
						feed_id INT(11) AUTO_INCREMENT NOT NULL,
						feed_url text NOT NULL,
						feed_lastkill INT(11) NOT NULL,
						feed_updated datetime DEFAULT "0000-00-00 00:00:00",
						feed_kbsite VARCHAR( 16 ) NOT NULL,
						feed_flags TINYINT NOT NULL,
						PRIMARY KEY (feed_id))';
            $qry->execute($sql);
            // get a list of keys for each site to migrate
            $sql = "SELECT * FROM kb3_config where cfg_key = 'fetch_idfeeds'";
            $qry->execute($sql);
            $qry2 = DBFactory::getDBQuery(true);
            while ($ret = $qry->getRow()) {
                $feed_kbsite = $ret['cfg_site'];
                $feeddata = unserialize($ret['cfg_value']);
                foreach ($feeddata as $feed) {
                    $feedurl = $qry2->escape($feed['url']);
                    $lastkill = (int) $feed['lastkill'];
                    $trusted = (int) $feed['trusted'];
                    if (trim($feedurl) == '') {
                        // empty feed - skip
                        continue;
                    }
                    $feed_flags = FEED_ACTIVE;
                    if ($trusted) {
                        $feed_flags |= FEED_TRUSTED;
                    }
                    $qry2->execute("SELECT feed_id, feed_lastkill, feed_flags FROM kb3_feeds WHERE feed_url = '{$feedurl}' AND feed_kbsite = '{$feed_kbsite}'");
                    if ($qry2->recordCount()) {
                        // OK url already in DB - probably best thing to do is force a full fetch i.e. lastkill = 0:
                        // We don't know at this point what the end-users intention
                        $sql = "UPDATE kb3_feeds SET feed_lastkill=0 WHERE feed_url = '{$feedurl}' AND feed_kbsite='{$feed_kbsite}' )";
                        $qry2->execute($sql);
                    } else {
                        $sql = "INSERT INTO kb3_feeds( feed_url, feed_lastkill, feed_kbsite, feed_flags ) VALUES ( '{$feedurl}', {$lastkill}, '{$feed_kbsite}', '{$feed_flags}' )";
                        $qry2->execute($sql);
                    }
                }
                // remove legacy config items
                $sql = "DELETE FROM kb3_config where cfg_site = '{$feed_kbsite}' AND ( cfg_key = 'fetch_idfeeds' )";
                $qry2->execute($sql);
            }
        }
        config::set("DBUpdate", "031");
        $qry->execute("INSERT INTO kb3_config (cfg_site, cfg_key, cfg_value) SELECT cfg_site, 'DBUpdate', '031' FROM kb3_config GROUP BY cfg_site ON DUPLICATE KEY UPDATE cfg_value = '031'");
        config::del("031updatestatus");
        $smarty->assign('refresh', 1);
        $smarty->assign('content', "Update 031 completed.");
        $smarty->display('update.tpl');
        die;
    }
}
开发者ID:biow0lf,项目名称:evedev-kb,代码行数:67,代码来源:update.php

示例14: update035


//.........这里部分代码省略.........
            $qry->execute("UPDATE `kb3_items_destroyed` SET `itd_itl_id` = '-1' WHERE `itd_itl_id` = 9");
            config::set('035updatestatus', 26);
            $smarty->assign('refresh', 1);
            $smarty->assign('content', "Slot Update (26 of 35)");
            $smarty->display('update.tpl');
            die;
        }
        // dropped items
        if (config::get('035updatestatus') < 27) {
            $qry->execute("UPDATE `kb3_items_dropped` SET `itd_itl_id` = '92' WHERE `itd_itl_id` = 5");
            config::set('035updatestatus', 27);
            $smarty->assign('refresh', 1);
            $smarty->assign('content', "Slot Update (27 of 35)");
            $smarty->display('update.tpl');
            die;
        }
        if (config::get('035updatestatus') < 28) {
            $qry->execute("UPDATE `kb3_items_dropped` SET `itd_itl_id` = '27' WHERE `itd_itl_id` = 1");
            config::set('035updatestatus', 28);
            $smarty->assign('refresh', 1);
            $smarty->assign('content', "Slot Update (28 of 35)");
            $smarty->display('update.tpl');
            die;
        }
        if (config::get('035updatestatus') < 29) {
            $qry->execute("UPDATE `kb3_items_dropped` SET `itd_itl_id` = '19' WHERE `itd_itl_id` = 2");
            config::set('035updatestatus', 29);
            $smarty->assign('refresh', 1);
            $smarty->assign('content', "Slot Update (29 of 35)");
            $smarty->display('update.tpl');
            die;
        }
        if (config::get('035updatestatus') < 30) {
            $qry->execute("UPDATE `kb3_items_dropped` SET `itd_itl_id` = '11' WHERE `itd_itl_id` = 3");
            config::set('035updatestatus', 30);
            $smarty->assign('refresh', 1);
            $smarty->assign('content', "Slot Update (30 of 35)");
            $smarty->display('update.tpl');
            die;
        }
        if (config::get('035updatestatus') < 31) {
            $qry->execute("UPDATE `kb3_items_dropped` SET `itd_itl_id` = '5' WHERE `itd_itl_id` = 4");
            config::set('035updatestatus', 31);
            $smarty->assign('refresh', 1);
            $smarty->assign('content', "Slot Update (31 of 35)");
            $smarty->display('update.tpl');
            die;
        }
        if (config::get('035updatestatus') < 32) {
            $qry->execute("UPDATE `kb3_items_dropped` SET `itd_itl_id` = '87' WHERE `itd_itl_id` = 6");
            config::set('035updatestatus', 32);
            $smarty->assign('refresh', 1);
            $smarty->assign('content', "Slot Update (32 of 35)");
            $smarty->display('update.tpl');
            die;
        }
        if (config::get('035updatestatus') < 33) {
            $qry->execute("UPDATE `kb3_items_dropped` SET `itd_itl_id` = '89' WHERE `itd_itl_id` = 8");
            config::set('035updatestatus', 33);
            $smarty->assign('refresh', 1);
            $smarty->assign('content', "Slot Update (33 of 35)");
            $smarty->display('update.tpl');
            die;
        }
        if (config::get('035updatestatus') < 34) {
            $qry->execute("UPDATE `kb3_items_dropped` SET `itd_itl_id` = '125' WHERE `itd_itl_id` = 7");
            config::set('035updatestatus', 34);
            $smarty->assign('refresh', 1);
            $smarty->assign('content', "Slot Update (34 of 35)");
            $smarty->display('update.tpl');
            die;
        }
        if (config::get('035updatestatus') < 35) {
            $qry->execute("UPDATE `kb3_items_dropped` SET `itd_itl_id` = '-1' WHERE `itd_itl_id` = 9");
            config::set('035updatestatus', 35);
            $smarty->assign('refresh', 1);
            $smarty->assign('content', "Slot Update (35 of 35)");
            $smarty->display('update.tpl');
            die;
        }
        if (config::get('035updatestatus') < 36) {
            $qry->execute("SELECT max(kll_id) as max FROM kb3_kills");
            $ret = $qry->getRow();
            $maxid = $qry->escape($ret['max']);
            config::set('035killid', $maxid);
            config::set('035updatestatus', 36);
            $smarty->assign('refresh', 1);
            $smarty->assign('content', "Setting Max Kill ID before conversion");
            $smarty->display('update.tpl');
            die;
        }
        config::set("DBUpdate", "035");
        $qry->execute("INSERT INTO kb3_config (cfg_site, cfg_key, cfg_value) SELECT cfg_site, 'DBUpdate', '035' FROM kb3_config GROUP BY cfg_site ON DUPLICATE KEY UPDATE cfg_value = '035'");
        config::del("035updatestatus");
        $smarty->assign('refresh', 1);
        $smarty->assign('content', "Update 035 completed.");
        $smarty->display('update.tpl');
        die;
    }
}
开发者ID:biow0lf,项目名称:evedev-kb,代码行数:101,代码来源:update.php

示例15: update033

/**
 * @package EDK
 */
function update033()
{
    global $url, $smarty;
    //Checking if this Update already done
    if (CURRENT_DB_UPDATE < "033") {
        if (is_null(config::get('033updatestatus'))) {
            config::set('033updatestatus', 0);
        }
        $qry = DBFactory::getDBQuery(true);
        if (config::get('033updatestatus') < 1) {
            $qry->execute("SHOW COLUMNS FROM kb3_corps LIKE 'crp_short_name'");
            if (!$qry->recordCount()) {
                $sql = "ALTER TABLE `kb3_corps` ADD `crp_short_name` CHAR(5) NULL ";
                $qry->execute($sql);
            }
            $qry->execute("SHOW COLUMNS FROM kb3_corps LIKE 'crp_ceo_id'");
            if (!$qry->recordCount()) {
                $sql = "ALTER TABLE `kb3_corps` ADD `crp_ceo_id` INT(11) UNSIGNED NULL ";
                $qry->execute($sql);
            }
            $qry->execute("SHOW COLUMNS FROM kb3_corps LIKE 'crp_station_id'");
            if (!$qry->recordCount()) {
                $sql = "ALTER TABLE `kb3_corps` ADD `crp_station_id` INT(11) UNSIGNED NULL ";
                $qry->execute($sql);
            }
            $qry->execute("SHOW COLUMNS FROM kb3_corps LIKE 'crp_description'");
            if (!$qry->recordCount()) {
                $sql = "ALTER TABLE `kb3_corps` ADD `crp_description` TEXT";
                $qry->execute($sql);
            }
            $qry->execute("SHOW COLUMNS FROM kb3_corps LIKE 'crp_url'");
            if (!$qry->recordCount()) {
                $sql = "ALTER TABLE `kb3_corps` ADD `crp_url` VARCHAR(255)";
                $qry->execute($sql);
            }
            $qry->execute("SHOW COLUMNS FROM kb3_corps LIKE 'crp_taxrate'");
            if (!$qry->recordCount()) {
                $sql = "ALTER TABLE `kb3_corps` ADD `crp_taxrate` SMALLINT";
                $qry->execute($sql);
            }
            $qry->execute("SHOW COLUMNS FROM kb3_corps LIKE 'crp_membercount'");
            if (!$qry->recordCount()) {
                $sql = "ALTER TABLE `kb3_corps` ADD `crp_membercount` INT(11) UNSIGNED NULL";
                $qry->execute($sql);
            }
            $qry->execute("SHOW COLUMNS FROM kb3_corps LIKE 'crp_shares'");
            if (!$qry->recordCount()) {
                $sql = "ALTER TABLE `kb3_corps` ADD `crp_shares` INT(11) UNSIGNED NULL";
                $qry->execute($sql);
            }
            $qry->execute("SHOW COLUMNS FROM kb3_corps LIKE 'crp_startdate'");
            if (!$qry->recordCount()) {
                $sql = "ALTER TABLE `kb3_corps` ADD `crp_startdate` DATETIME NULL";
                $qry->execute($sql);
            }
        }
        config::set("DBUpdate", "033");
        $qry->execute("INSERT INTO kb3_config (cfg_site, cfg_key, cfg_value) SELECT cfg_site, 'DBUpdate', '033' FROM kb3_config GROUP BY cfg_site ON DUPLICATE KEY UPDATE cfg_value = '033'");
        config::del("033updatestatus");
        $smarty->assign('refresh', 1);
        $smarty->assign('content', "Update 033 completed.");
        $smarty->display('update.tpl');
        die;
    }
}
开发者ID:biow0lf,项目名称:evedev-kb,代码行数:68,代码来源:update.php


注:本文中的config::del方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。