📄 d6rctofinal.php
字号:
<?php
// Upgrade Discuz! Board from 6.0.0RC1 to 6.0.0 final
error_reporting(E_ERROR | E_WARNING | E_PARSE);
@set_magic_quotes_runtime(0);
@set_time_limit(1000);
define('IN_DISCUZ', TRUE);
define('DISCUZ_ROOT', './');
$version_old = 'Discuz! 6.0.0 RC1';
$version_new = 'Discuz! 6.0.0 正式版';
$timestamp = time();
@include(DISCUZ_ROOT."./config.inc.php");
@include(DISCUZ_ROOT."./include/db_mysql.class.php");
header("Content-Type: text/html; charset=$charset");
showheader();
if(empty($dbcharset) && in_array(strtolower($charset), array('gbk', 'big5', 'utf-8'))) {
$dbcharset = str_replace('-', '', $charset);
}
if(PHP_VERSION < '4.1.0') {
$_GET = &$HTTP_GET_VARS;
$_POST = &$HTTP_POST_VARS;
$_COOKIE = &$HTTP_COOKIE_VARS;
$_SERVER = &$HTTP_SERVER_VARS;
$_ENV = &$HTTP_ENV_VARS;
$_FILES = &$HTTP_POST_FILES;
}
$action = ($_POST['action']) ? $_POST['action'] : $_GET['action'];
$step = $_GET['step'];
$start = isset($_GET['start']) ? intval($_GET['start']) : 0;
$upgrade1 = <<<EOT
REPLACE INTO cdb_settings (variable, value) VALUES ('baidusitemap', '1');
REPLACE INTO cdb_settings (variable, value) VALUES ('baidusitemap_life', '12');
REPLACE INTO cdb_settings (variable, value) VALUES ('google', '');
UPDATE cdb_stylevars SET variable='stypeid', substitute='1' WHERE variable='smdir';
CREATE TABLE IF NOT EXISTS cdb_videotags (
tagname char(10) NOT NULL DEFAULT '',
vid char(16) NOT NULL DEFAULT '',
tid mediumint(8) unsigned NOT NULL DEFAULT '0',
UNIQUE KEY tagname (tagname,vid),
KEY tid (tid)
) TYPE=MyISAM;
EOT;
$upgradetable = array(
array('typevars', 'ADD', 'required', "TINYINT( 1 ) NOT NULL DEFAULT '0' AFTER available"),
array('typevars', 'ADD', 'unchangeable', " TINYINT( 1 ) NOT NULL DEFAULT '0' AFTER required"),
array('typevars', 'ADD', 'search', " TINYINT( 1 ) NOT NULL DEFAULT '0' AFTER `unchangeable`"),
array('threadtypes', 'ADD', 'modelid', "SMALLINT( 6 ) UNSIGNED NOT NULL DEFAULT '0' DEFAULT '0' AFTER `special`"),
array('threadtypes', 'ADD', 'expiration', "TINYINT( 1 ) NOT NULL DEFAULT '0' AFTER modelid"),
array('typeoptionvars', 'ADD', 'expiration', "INT( 10 ) UNSIGNED NOT NULL DEFAULT '0' AFTER `optionid`"),
array('searchindex', 'ADD', 'threadtypeid', "SMALLINT( 6 ) UNSIGNED NOT NULL DEFAULT '0' AFTER `threads`"),
array('searchindex', 'MODIFY', 'searchstring', "searchstring TEXT NOT NULL"),
array('forumfields', 'ADD', 'tradetypes', "TEXT NOT NULL"),
array('forumfields', 'ADD', 'typemodels', "MEDIUMTEXT NOT NULL"),
array('promotions', 'MODIFY', 'uid', "uid MEDIUMINT( 8 ) UNSIGNED NOT NULL DEFAULT '0'"),
array('smilies', 'MODIFY', 'displayorder', "displayorder TINYINT( 3 ) NOT NULL DEFAULT '0'"),
array('smilies', 'ADD', 'typeid', "SMALLINT( 6 ) UNSIGNED NOT NULL AFTER id"),
array('caches', 'MODIFY', 'data', "data MEDIUMTEXT NOT NULL"),
array('usergroups', 'ADD', 'allowpostvideo', "TINYINT (1) DEFAULT '0' NOT NULL AFTER allowpostactivity"),
array('usergroups', 'MODIFY', 'tradestick', "TINYINT(1) UNSIGNED NOT NULL DEFAULT '0'"),
array('videos', 'MODIFY', 'vid', "VARCHAR(16) NOT NULL DEFAULT ''"),
array('videotags', 'ADD', 'tid', "MEDIUMINT(8) UNSIGNED DEFAULT '0' NOT NULL AFTER vid"),
array('videotags', 'INDEX', '', "ADD INDEX tid (tid)"),
array('tradelog', 'MODIFY', 'orderid', "varchar(32) NOT NULL"),
array('tradelog', 'MODIFY', 'tradeno', "varchar(32) NOT NULL"),
array('tradelog', 'MODIFY', 'subject', "varchar(100) NOT NULL"),
array('tradelog', 'MODIFY', 'locus', "varchar(100) NOT NULL"),
array('tradelog', 'MODIFY', 'seller', "varchar(15) NOT NULL"),
array('tradelog', 'MODIFY', 'selleraccount', "varchar(50) NOT NULL"),
array('tradelog', 'MODIFY', 'buyer', "varchar(15) NOT NULL"),
array('tradelog', 'MODIFY', 'buyercontact', "varchar(50) NOT NULL"),
array('tradelog', 'MODIFY', 'buyermsg', "varchar(200) default NULL"),
array('tradelog', 'MODIFY', 'buyername', "varchar(50) NOT NULL"),
array('tradelog', 'MODIFY', 'buyerzip', " varchar(10) NOT NULL"),
array('tradelog', 'MODIFY', 'buyerphone', "varchar(20) NOT NULL"),
array('tradelog', 'MODIFY', 'buyermobile', "varchar(20) NOT NULL"),
array('tradelog', 'ADD', 'message', "text NOT NULL"),
array('forums', 'MODIFY', 'allowpostspecial', "SMALLINT( 6 ) UNSIGNED NOT NULL DEFAULT '0'"),
);
$upgrade3 = <<<EOT
DROP TABLE IF EXISTS cdb_typemodels;
CREATE TABLE cdb_typemodels (
id smallint(6) unsigned NOT NULL auto_increment,
`name` varchar(20) NOT NULL,
displayorder tinyint(3) NOT NULL default '0',
`type` tinyint(1) NOT NULL default '0',
options mediumtext NOT NULL,
customoptions mediumtext NOT NULL,
PRIMARY KEY (id)
) TYPE=MyISAM;
INSERT INTO cdb_typemodels (id, name, displayorder, type, options, customoptions) VALUES (1, '房屋交易信息', 0, 1, '7 10 13 65 66 68', '');
INSERT INTO cdb_typemodels (id, name, displayorder, type, options, customoptions) VALUES (2, '车票交易信息', 0, 1, '55 56 58 67 7 13 68', '');
INSERT INTO cdb_typemodels (id, name, displayorder, type, options, customoptions) VALUES (3, '兴趣交友信息', 0, 1, '8 9 31', '');
INSERT INTO cdb_typemodels (id, name, displayorder, type, options, customoptions) VALUES (4, '公司招聘信息', 0, 1, '34 48 54 51 47 46 44 45 52 53', '');
ALTER TABLE cdb_typemodels AUTO_INCREMENT=101;
REPLACE INTO cdb_typeoptions VALUES (7, 1, 0, '姓名', '', 'name', 'text', '');
REPLACE INTO cdb_typeoptions VALUES (9, 1, 0, '年龄', '', 'age', 'number', '');
REPLACE INTO cdb_typeoptions VALUES (10, 1, 0, '地址', '', 'address', 'text', '');
REPLACE INTO cdb_typeoptions VALUES (11, 1, 0, 'QQ', '', 'qq', 'number', '');
REPLACE INTO cdb_typeoptions VALUES (12, 1, 0, '邮箱', '', 'mail', 'email', '');
REPLACE INTO cdb_typeoptions VALUES (13, 1, 0, '电话', '', 'phone', 'text', '');
REPLACE INTO cdb_typeoptions VALUES (14, 5, 0, '培训费用', '', 'teach_pay', 'text', '');
REPLACE INTO cdb_typeoptions VALUES (15, 5, 0, '培训时间', '', 'teach_time', 'text', '');
REPLACE INTO cdb_typeoptions VALUES (20, 2, 0, '楼层', '', 'floor', 'number', '');
REPLACE INTO cdb_typeoptions VALUES (21, 2, 0, '交通状况', '', 'traf', 'textarea', '');
REPLACE INTO cdb_typeoptions VALUES (22, 2, 0, '地图', '', 'images', 'image', '');
REPLACE INTO cdb_typeoptions VALUES (24, 2, 0, '价格', '', 'price', 'text', '');
REPLACE INTO cdb_typeoptions VALUES (26, 5, 0, '培训名称', '', 'teach_name', 'text', '');
REPLACE INTO cdb_typeoptions VALUES (28, 3, 0, '身高', '', 'heighth', 'number', '');
REPLACE INTO cdb_typeoptions VALUES (29, 3, 0, '体重', '', 'weighth', 'number', '');
REPLACE INTO cdb_typeoptions VALUES (33, 1, 0, '照片', '', 'photo', 'image', '');
REPLACE INTO cdb_typeoptions VALUES (35, 5, 0, '服务方式', '', 'service_type', 'text', '');
REPLACE INTO cdb_typeoptions VALUES (36, 5, 0, '服务时间', '', 'service_time', 'text', '');
REPLACE INTO cdb_typeoptions VALUES (37, 5, 0, '服务费用', '', 'service_pay', 'text', '');
REPLACE INTO cdb_typeoptions VALUES (39, 6, 0, '网址', '', 'site_url', 'url', '');
REPLACE INTO cdb_typeoptions VALUES (40, 6, 0, '电子邮件', '', 'site_mail', 'email', '');
REPLACE INTO cdb_typeoptions VALUES (42, 6, 0, '网站名称', '', 'site_name', 'text', '');
REPLACE INTO cdb_typeoptions VALUES (46, 4, 0, '职位', '', 'recr_intend', 'text', '');
REPLACE INTO cdb_typeoptions VALUES (47, 4, 0, '工作地点', '', 'recr_palce', 'text', '');
REPLACE INTO cdb_typeoptions VALUES (49, 4, 0, '有效期至', '', 'recr_end', 'calendar', '');
REPLACE INTO cdb_typeoptions VALUES (51, 4, 0, '公司名称', '', 'recr_com', 'text', '');
REPLACE INTO cdb_typeoptions VALUES (52, 4, 0, '年龄要求', '', 'recr_age', 'text', '');
REPLACE INTO cdb_typeoptions VALUES (54, 4, 0, '专业', '', 'recr_abli', 'text', '');
REPLACE INTO cdb_typeoptions VALUES (55, 5, 0, '始发', '', 'leaves', 'text', '');
REPLACE INTO cdb_typeoptions VALUES (56, 5, 0, '终点', '', 'boundfor', 'text', '');
REPLACE INTO cdb_typeoptions VALUES (57, 6, 0, 'Alexa排名', '', 'site_top', 'number', '');
REPLACE INTO cdb_typeoptions VALUES (58, 5, 0, '车次/航班', '', 'train_no', 'text', '');
REPLACE INTO cdb_typeoptions VALUES (59, 5, 0, '数量', '', 'trade_num', 'number', '');
REPLACE INTO cdb_typeoptions VALUES (60, 5, 0, '价格', '', 'trade_price', 'text', '');
REPLACE INTO cdb_typeoptions VALUES (61, 5, 0, '有效期至', '', 'trade_end', 'calendar', '');
REPLACE INTO cdb_typeoptions VALUES (63, 1, 0, '详细描述', '', 'detail_content', 'textarea', '');
REPLACE INTO cdb_typeoptions VALUES (64, 1, 0, '籍贯', '', 'born_place', 'text', '');
REPLACE INTO cdb_typeoptions VALUES (65, 2, 0, '租金', '', 'money', 'text', '');
REPLACE INTO cdb_typeoptions VALUES (66, 2, 0, '面积', '', 'acreage', 'text', '');
REPLACE INTO cdb_typeoptions VALUES (67, 5, 0, '发车时间', '', 'time', 'calendar', 'N;');
REPLACE INTO cdb_typeoptions VALUES (68, 1, 0, '所在地', '', 'now_place', 'text', '');
DROP TABLE IF EXISTS cdb_imagetypes;
CREATE TABLE cdb_imagetypes (
typeid smallint(6) unsigned NOT NULL auto_increment,
name char(20) NOT NULL,
type enum('smiley', 'icon', 'avatar') NOT NULL DEFAULT 'smiley',
displayorder tinyint(3) NOT NULL default '0',
directory char(100) NOT NULL,
PRIMARY KEY (typeid)
) TYPE=MyISAM;
INSERT INTO cdb_imagetypes VALUES (1, '默认表情', 'smiley', 1, 'default');
UPDATE cdb_smilies SET typeid=1 WHERE type='smiley';
EOT;
$upgrade4 = <<<EOT
EOT;
$upgrade6 = <<<EOT
EOT;
$upgrade7 = <<<EOT
INSERT INTO cdb_bbcodes VALUES ({bbcodeid,1}, '0', 'sup', 'bb_sup.gif', '<sup>{1}</sup>', 'X[sup]2[/sup]', '上标', 1, '请输入上标文字:', '1');
INSERT INTO cdb_bbcodes VALUES ({bbcodeid,2}, '0', 'sub', 'bb_sub.gif', '<sub>{1}</sub>', 'X[sub]2[/sub]', '下标', 1, '请输入下标文字:', '1');
INSERT INTO cdb_templates (templateid, name, directory, copyright) VALUES ({templateid,1}, '喝彩奥运', './templates/Beijing2008', '康盛创想(北京)科技有限公司');
INSERT INTO cdb_templates (templateid, name, directory, copyright) VALUES ({templateid,2}, '深邃永恒', './templates/Overcast', '康盛创想(北京)科技有限公司');
INSERT INTO cdb_templates (templateid, name, directory, copyright) VALUES ({templateid,3}, '粉妆精灵', './templates/PinkDresser', '康盛创想(北京)科技有限公司');
INSERT INTO cdb_styles (styleid, name, available, templateid) VALUES ({styleid,1}, '喝彩奥运', 1, {templateid,1});
INSERT INTO cdb_stylevars (styleid, variable, substitute) VALUES
({styleid,1}, 'available', ''),
({styleid,1}, 'bgcolor', '#FFF'),
({styleid,1}, 'altbg1', '#FFF'),
({styleid,1}, 'altbg2', '#F7F7F3'),
({styleid,1}, 'link', '#262626'),
({styleid,1}, 'bordercolor', '#C1C1C1'),
({styleid,1}, 'headercolor', '#FFF forumbox_head.gif'),
({styleid,1}, 'headertext', '#D00'),
({styleid,1}, 'catcolor', '#F90 cat_bg.gif'),
({styleid,1}, 'tabletext', '#535353'),
({styleid,1}, 'text', '#535353'),
({styleid,1}, 'borderwidth', '1px'),
({styleid,1}, 'tablespace', '1px'),
({styleid,1}, 'fontsize', '12px'),
({styleid,1}, 'msgfontsize', '14px'),
({styleid,1}, 'msgbigsize', '16px'),
({styleid,1}, 'msgsmallsize', '12px'),
({styleid,1}, 'font', 'Arial,Helvetica,sans-serif'),
({styleid,1}, 'smfontsize', '11px'),
({styleid,1}, 'smfont', 'Arial,Helvetica,sans-serif'),
({styleid,1}, 'boardimg', 'logo.gif'),
({styleid,1}, 'imgdir', './images/Beijing2008'),
({styleid,1}, 'maintablewidth', '98%'),
({styleid,1}, 'bgborder', '#C1C1C1'),
({styleid,1}, 'catborder', '#E2E2E2'),
({styleid,1}, 'inputborder', '#D7D7D7'),
({styleid,1}, 'lighttext', '#535353'),
({styleid,1}, 'headermenu', '#FFF menu_bg.gif'),
({styleid,1}, 'headermenutext', '#54564C'),
({styleid,1}, 'framebgcolor', ''),
({styleid,1}, 'noticebg', ''),
({styleid,1}, 'commonboxborder', '#F0F0ED'),
({styleid,1}, 'tablebg', '#FFF'),
({styleid,1}, 'highlightlink', '#535353'),
({styleid,1}, 'commonboxbg', '#F5F5F0'),
({styleid,1}, 'boxspace', '8px'),
({styleid,1}, 'portalboxbgcode', '#FFF portalbox_bg.gif'),
({styleid,1}, 'noticeborder', ''),
({styleid,1}, 'noticetext', '#DD0000'),
({styleid,1}, 'stypeid', '1');
INSERT INTO cdb_styles (styleid, name, available, templateid) VALUES ({styleid,2}, '深邃永恒', 1, {templateid,2});
INSERT INTO cdb_stylevars (styleid, variable, substitute) VALUES
({styleid,2}, 'available', ''),
({styleid,2}, 'bgcolor', '#222D2D'),
({styleid,2}, 'altbg1', '#3E4F4F'),
({styleid,2}, 'altbg2', '#384747'),
({styleid,2}, 'link', '#CEEBEB'),
({styleid,2}, 'bordercolor', '#1B2424'),
({styleid,2}, 'headercolor', '#1B2424'),
({styleid,2}, 'headertext', '#94B3C5'),
({styleid,2}, 'catcolor', '#293838'),
({styleid,2}, 'tabletext', '#CEEBEB'),
({styleid,2}, 'text', '#999'),
({styleid,2}, 'borderwidth', '6px'),
({styleid,2}, 'tablespace', '0'),
({styleid,2}, 'fontsize', '12px'),
({styleid,2}, 'msgfontsize', '14px'),
({styleid,2}, 'msgbigsize', '16px'),
({styleid,2}, 'msgsmallsize', '12px'),
({styleid,2}, 'font', 'Arial'),
({styleid,2}, 'smfontsize', '11px'),
({styleid,2}, 'smfont', 'Arial,sans-serif'),
({styleid,2}, 'boardimg', 'logo.gif'),
({styleid,2}, 'imgdir', './images/Overcast'),
({styleid,2}, 'maintablewidth', '98%'),
({styleid,2}, 'bgborder', '#384747'),
({styleid,2}, 'catborder', '#1B2424'),
({styleid,2}, 'inputborder', '#EEE'),
({styleid,2}, 'lighttext', '#74898E'),
({styleid,2}, 'headermenu', '#3E4F4F'),
({styleid,2}, 'headermenutext', '#CEEBEB'),
({styleid,2}, 'framebgcolor', '#222D2D'),
({styleid,2}, 'noticebg', '#3E4F4F'),
({styleid,2}, 'commonboxborder', '#384747'),
({styleid,2}, 'tablebg', '#3E4F4F'),
({styleid,2}, 'highlightlink', '#9CB2A0'),
({styleid,2}, 'commonboxbg', '#384747'),
({styleid,2}, 'boxspace', '6px'),
({styleid,2}, 'portalboxbgcode', '#293838'),
({styleid,2}, 'noticeborder', '#384747'),
({styleid,2}, 'noticetext', '#C7E001'),
({styleid,2}, 'stypeid', '1');
INSERT INTO cdb_styles (styleid, name, available, templateid) VALUES ({styleid,3}, '粉妆精灵', 1, {templateid,3});
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -