');
REPLACE INTO uc_settings (k, v) VALUES ('mailauth_username', 'username@21cn.com');
REPLACE INTO uc_settings (k, v) VALUES ('mailauth_password', 'password');
REPLACE INTO uc_settings (k, v) VALUES ('maildelimiter', '0');
REPLACE INTO uc_settings (k, v) VALUES ('mailusername', '1');
REPLACE INTO uc_settings (k, v) VALUES ('mailsilent', '1');
REPLACE INTO uc_settings (k, v) VALUES ('pmlimit1day','100');
REPLACE INTO uc_settings (k, v) VALUES ('pmfloodctrl','15');
REPLACE INTO uc_settings (k, v) VALUES ('pmcenter','1');
REPLACE INTO uc_settings (k, v) VALUES ('sendpmseccode','1');
REPLACE INTO uc_settings (k, v) VALUES ('pmsendregdays','0');
EOT;
if(file_exists($lock_file) && $action != 'upgsecques') {
showheader();
showerror('升级被锁定,应该是已经升级过了,如果已经恢复数据请手动删除
'.str_replace(UC_ROOT, '', $lock_file).'
之后再来刷新页面');
showfooter();
}
if(!$action) {
showheader();
?>
本程序用于升级 UCenter 1.0 到 UCenter 1.5
运行本升级程序之前,请确认已经上传 UCenter 1.5 的全部文件和目录
强烈建议您升级之前备份数据库资料
connect(UC_DBHOST, UC_DBUSER, UC_DBPW, UC_DBNAME, UC_DBCHARSET); runquery($sql); dir_clear(UC_ROOT.'./data/view'); dir_clear(UC_ROOT.'./data/cache'); if(is_dir(UC_ROOT.'./plugin/setting')) { dir_clear(UC_ROOT.'./plugin/setting'); @unlink(UC_ROOT.'./plugin/setting/index.htm'); @rmdir(UC_ROOT.'./plugin/setting'); } //note 升级uc_applications.viewprourl $db->query("UPDATE ".UC_DBTABLEPRE."applications SET viewprourl='/space.php?uid=%s'"); $query = $db->query("SELECT * FROM ".UC_DBTABLEPRE."applications"); while($app = $db->fetch_array($query)) { if(authcode($app['authkey'], 'DECODE', UC_MYKEY)) continue; $authkey = authcode($app['authkey'], 'ENCODE', UC_MYKEY); $appid = $app['appid']; $db->query("UPDATE ".UC_DBTABLEPRE."applications SET authkey='$authkey' WHERE appid='$appid'"); } header("Location: upgrade2.php?action=pm&forward=".urlencode($forward)); } elseif($action == 'pm') { showheader(); echo "