⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 upgrade1.php

📁 Discuz论坛功能、使用、二次开发的详细介绍说明。
💻 PHP
字号:
<?php

/*
	[UCenter] (C)2001-2008 Comsenz Inc.
	This is NOT a freeware, use is subject to license terms

	$Id: upgrade1.php 12117 2008-01-11 06:25:08Z heyond $
*/

define("IN_UC", TRUE);
define('UC_ROOT', substr(__FILE__, 0, -12));

$version_old = 'UCenter 1.0 Beta';
$version_new = 'UCenter 1.0';

require UC_ROOT.'./data/config.inc.php';
require UC_ROOT.'./lib/db.class.php';

error_reporting(7);
@set_magic_quotes_runtime(0);

$action = getgpc('action');

$sql = <<<EOT

DROP TABLE if exists uc_admins;
CREATE TABLE uc_admins (
  uid mediumint(8) unsigned NOT NULL  auto_increment,
  username char(15) NOT NULL ,
  allowadminsetting tinyint(1) NOT NULL  DEFAULT '0',
  allowadminapp tinyint(1) NOT NULL  DEFAULT '0',
  allowadminuser tinyint(1) NOT NULL  DEFAULT '0',
  allowadminbadword tinyint(1) NOT NULL  DEFAULT '0',
  allowadmintag tinyint(1) NOT NULL  DEFAULT '0',
  allowadminpm tinyint(1) NOT NULL  DEFAULT '0',
  allowadmincredits tinyint(1) NOT NULL  DEFAULT '0',
  allowadmindomain tinyint(1) NOT NULL  DEFAULT '0',
  allowadmindb tinyint(1) NOT NULL  DEFAULT '0',
  allowadminnote tinyint(1) NOT NULL  DEFAULT '0',
  allowadmincache tinyint(1) NOT NULL  DEFAULT '0',
  allowadminlog tinyint(1) NOT NULL  DEFAULT '0',
  PRIMARY KEY (uid) ,
  UNIQUE KEY username (username)
)Type=MyISAM;

ALTER TABLE uc_applications
  change type type char(16) NOT NULL  after appid,
  add column recvnote tinyint(1) NULL  DEFAULT '0' after synlogin,
  change extra extra mediumtext NOT NULL  after recvnote,
  add column tagtemplates mediumtext NOT NULL  after extra, COMMENT='';
  
ALTER TABLE uc_friends
  add index uid (uid),
  add index friendid (friendid);

drop table if exists uc_failedlogins;
CREATE TABLE uc_failedlogins (
  ip char(15) NOT NULL ,
  count tinyint(1) unsigned NOT NULL  DEFAULT '0',
  lastupdate int(10) unsigned NOT NULL  DEFAULT '0',
  PRIMARY KEY (ip)
)Type=MyISAM;

ALTER TABLE uc_feeds
  change title_template title_template text NOT NULL  after hash_data,
  change title_data title_data text NOT NULL  after title_template, COMMENT='';

DROP TABLE if exists uc_mergemembers;
CREATE TABLE uc_mergemembers (
  appid smallint(6) unsigned NOT NULL ,
  username char(15) NOT NULL ,
  PRIMARY KEY (appid,username)
)Type=MyISAM;

ALTER TABLE uc_notelist
  add column closed tinyint(4) NOT NULL  DEFAULT '0' after operation,
  change totalnum totalnum smallint(6) unsigned NOT NULL  DEFAULT '0' after closed,
  add column succeednum smallint(6) unsigned NOT NULL  DEFAULT '0' after totalnum,
  add column getdata mediumtext NOT NULL  after succeednum,
  add column postdata mediumtext NOT NULL  after getdata,
  add column dateline int(10) unsigned NOT NULL  DEFAULT '0' after postdata,
  add column pri tinyint(3) NOT NULL  DEFAULT '0' after dateline,
  drop column args;

DROP TABLE if exists uc_protectedmembers;
CREATE TABLE uc_protectedmembers (
  uid mediumint(8) unsigned NOT NULL  DEFAULT '0',
  username char(15) NOT NULL ,
  appid tinyint(1) unsigned NOT NULL  DEFAULT '0',
  dateline int(10) unsigned NOT NULL  DEFAULT '0',
  admin char(10) NOT NULL  DEFAULT '0',
  UNIQUE KEY username (username,appid)
)Type=MyISAM;

DROP TABLE if exists uc_vars;
CREATE TABLE uc_vars (
  name char(32) NOT NULL ,
  value char(255) NOT NULL ,
  PRIMARY KEY (name)
)Type=HEAP;

ALTER TABLE uc_badwords ADD UNIQUE find (find);
ALTER TABLE uc_notelist ADD KEY closed (closed,pri,noteid);
UPDATE uc_pms SET related=0;
REPLACE INTO uc_settings(k,v) VALUES ('dateformat','y-n-j');

EOT;

if(!$action) {

	showheader();

?>

	<p>鏈

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -