📄 114.php
字号:
<?php
// fix up and optimize tables
$DB->query("ALTER TABLE categories CHANGE categoryid categoryid INT( 10 ) UNSIGNED NOT NULL AUTO_INCREMENT,
CHANGE designid designid INT( 10 ) UNSIGNED DEFAULT '0' NOT NULL,
CHANGE menuitem menuitem TINYINT( 1 ) DEFAULT '1' NOT NULL,
CHANGE membersonly membersonly TINYINT( 1 ) DEFAULT '0' NOT NULL,
CHANGE displayorder displayorder INT( 10 ) UNSIGNED DEFAULT '0' NOT NULL");
$DB->query("ALTER TABLE comments CHANGE commentid commentid INT( 10 ) UNSIGNED NOT NULL AUTO_INCREMENT,
CHANGE pluginid pluginid INT( 10 ) UNSIGNED DEFAULT '0' NOT NULL,
CHANGE objectid objectid INT( 10 ) UNSIGNED DEFAULT '0' NOT NULL,
CHANGE date date INT( 10 ) UNSIGNED DEFAULT '0' NOT NULL");
$DB->query("ALTER TABLE customplugins CHANGE custompluginid custompluginid INT( 10 ) UNSIGNED NOT NULL AUTO_INCREMENT");
$DB->query("ALTER TABLE designs CHANGE designid designid INT( 10 ) UNSIGNED NOT NULL AUTO_INCREMENT,
CHANGE skinid skinid INT( 10 ) UNSIGNED DEFAULT '0' NOT NULL,
CHANGE maxplugins maxplugins INT( 10 ) UNSIGNED DEFAULT '0' NOT NULL");
$DB->query("ALTER TABLE mainsettings CHANGE settingid settingid INT( 10 ) UNSIGNED NOT NULL AUTO_INCREMENT");
$DB->query("ALTER TABLE p2_news CHANGE articleid articleid INT( 10 ) UNSIGNED NOT NULL AUTO_INCREMENT,
CHANGE categoryid categoryid INT( 10 ) UNSIGNED DEFAULT '0' NOT NULL,
CHANGE date date INT( 10 ) UNSIGNED DEFAULT '0' NOT NULL");
$DB->query("ALTER TABLE p2_settings CHANGE categoryid categoryid INT( 10 ) UNSIGNED DEFAULT '0' NOT NULL,
CHANGE maxarticles maxarticles INT( 10 ) UNSIGNED DEFAULT '10' NOT NULL");
$DB->query("ALTER TABLE p4_guestbook CHANGE messageid messageid INT( 10 ) UNSIGNED NOT NULL AUTO_INCREMENT");
$DB->query("ALTER TABLE p7_chatterbox CHANGE commentid commentid INT( 10 ) UNSIGNED NOT NULL AUTO_INCREMENT,
CHANGE categoryid categoryid INT( 10 ) UNSIGNED DEFAULT '0' NOT NULL");
$DB->query("ALTER TABLE p16_links CHANGE linkid linkid INT( 10 ) UNSIGNED NOT NULL AUTO_INCREMENT,
CHANGE sectionid sectionid INT( 10 ) UNSIGNED DEFAULT '0' NOT NULL,
CHANGE url url TEXT NOT NULL");
$DB->query("ALTER TABLE p16_sections CHANGE sectionid sectionid INT( 10 ) UNSIGNED NOT NULL AUTO_INCREMENT,
CHANGE parentid parentid INT( 10 ) UNSIGNED DEFAULT '0' NOT NULL");
$DB->query("ALTER TABLE p17_images CHANGE imageid imageid INT( 10 ) UNSIGNED NOT NULL AUTO_INCREMENT,
CHANGE sectionid sectionid INT( 10 ) UNSIGNED DEFAULT '0' NOT NULL,
CHANGE filename filename VARCHAR( 32 ) NOT NULL");
$DB->query("ALTER TABLE p17_sections CHANGE sectionid sectionid INT( 10 ) UNSIGNED NOT NULL AUTO_INCREMENT,
CHANGE parentid parentid INT( 10 ) UNSIGNED DEFAULT '0' NOT NULL");
$DB->query("ALTER TABLE pagesort CHANGE categoryid categoryid INT( 10 ) UNSIGNED DEFAULT '0' NOT NULL,
CHANGE displayorder displayorder INT( 10 ) UNSIGNED DEFAULT '0' NOT NULL");
$DB->query("ALTER TABLE plugins CHANGE pluginid pluginid INT( 10 ) UNSIGNED DEFAULT '0' NOT NULL,
CHANGE authorlink authorlink INT( 10 ) UNSIGNED DEFAULT '0' NOT NULL");
$DB->query("ALTER TABLE pluginsettings CHANGE settingid settingid INT( 10 ) UNSIGNED NOT NULL AUTO_INCREMENT,
CHANGE pluginid pluginid INT( 10 ) UNSIGNED DEFAULT '0' NOT NULL,
CHANGE displayorder displayorder INT( 10 ) UNSIGNED DEFAULT '0' NOT NULL");
$DB->query("ALTER TABLE skins CHANGE skinid skinid INT( 10 ) UNSIGNED NOT NULL AUTO_INCREMENT ,
CHANGE activated activated TINYINT( 1 ) DEFAULT '0' NOT NULL ,
CHANGE numdesigns numdesigns INT( 10 ) UNSIGNED DEFAULT '0' NOT NULL ,
CHANGE authorname authorname VARCHAR( 64 ) NOT NULL ,
CHANGE authorlink authorlink INT( 10 ) UNSIGNED DEFAULT '0' NOT NULL");
$DB->query("ALTER TABLE smilies CHANGE smilieid smilieid INT( 10 ) UNSIGNED NOT NULL AUTO_INCREMENT,
CHANGE title title VARCHAR( 100 ) NOT NULL,
CHANGE text text VARCHAR( 10 ) NOT NULL,
CHANGE image image VARCHAR( 100 ) NOT NULL");
$DB->query("ALTER TABLE userprivileges CHANGE privilegeid privilegeid INT( 10 ) UNSIGNED NOT NULL AUTO_INCREMENT,
CHANGE username username VARCHAR( 64 ) NOT NULL,
CHANGE privilegetype privilegetype VARCHAR( 64 ) NOT NULL,
CHANGE usersystem usersystem VARCHAR( 64 ) NOT NULL");
$DB->query("ALTER TABLE users CHANGE username username VARCHAR( 64 ) NOT NULL,
CHANGE email email VARCHAR( 64 ) NOT NULL");
$DB->query("ALTER TABLE usersystems CHANGE name name VARCHAR( 64 ) NOT NULL,
CHANGE dbname dbname VARCHAR( 64 ) NOT NULL,
CHANGE queryfile queryfile VARCHAR( 64 ) NOT NULL");
// Latest News Category Targeting Option
$DB->query("INSERT INTO pluginsettings VALUES ('0', 3, 'Options', 'Latest News Category Targeting', 'Only display the latest news of the category which the latest news plugin resides in.', 'yesno', '0', '5') ");
// Locale time setting
$DB->query("INSERT INTO mainsettings VALUES (21, 'Site Settings', 'text', 'Locale Time', 'Convert the dates and times to a different language by entering your locale time format:', 'en_US') ");
// Logo Link setting
$DB->query("INSERT INTO " . TABLE_PREFIX . "mainsettings VALUES (22, 'Site Settings', 'text', 'Logo Link', 'Have your logo link to the specified url:', '') ");
// new image settings
$DB->query("INSERT INTO pluginsettings VALUES ('0', 17, 'Options', 'Allow Image Submission', 'Allow submission of images?', 'yesno', '0', '7') ");
$DB->query("INSERT INTO pluginsettings VALUES ('0', 17, 'Options', 'Guest Images', 'Allow guests to submit images?', 'yesno', '0', '8') ");
$DB->query("INSERT INTO pluginsettings VALUES ('0', 17, 'Options', 'Image Notification', 'This email address will receive an email message when a new image is submitted:', 'text', '', '9') ");
// custom plugins should hold more info update
$DB->query("ALTER TABLE customplugins CHANGE plugin plugin MEDIUMTEXT NOT NULL");
// languages
$DB->query("CREATE TABLE phrases (
phraseid INT(10) NOT NULL AUTO_INCREMENT,
pluginid INT(10) NOT NULL DEFAULT '0',
varname VARCHAR(64) NOT NULL DEFAULT '',
defaultphrase TEXT NOT NULL,
customphrase TEXT NOT NULL,
font VARCHAR(32) NOT NULL DEFAULT '',
color VARCHAR(32) NOT NULL DEFAULT '',
size VARCHAR(32) NOT NULL DEFAULT '',
bold TINYINT(1) NOT NULL DEFAULT '0',
italic TINYINT(1) NOT NULL DEFAULT '0',
underline TINYINT(1) NOT NULL DEFAULT '0',
KEY (phraseid)
) " );
$DB->query("INSERT INTO phrases VALUES ('0', 1, 'enter_comment_name', 'Please fill out the name field.', '', '', '', '', 1, 0, 0)");
$DB->query("INSERT INTO phrases VALUES ('0', 1, 'enter_comment', 'Please fill out the comment field.', '', '', '', '', 1, 0, 0)");
$DB->query("INSERT INTO phrases VALUES ('0', 1, 'repeat_comment', 'Repeat comment not posted.', '', '', '', '', 1, 0, 0)");
$DB->query("INSERT INTO phrases VALUES ('0', 1, 'users_name', 'User\'s Name:', '', '', '', '', 0, 0, 0)");
$DB->query("INSERT INTO phrases VALUES ('0', 1, 'your_name', 'Your Name:', '', '', '', '', 0, 0, 0)");
$DB->query("INSERT INTO phrases VALUES ('0', 1, 'comment', 'Comment:', '', '', '', '', 0, 0, 0)");
$DB->query("INSERT INTO phrases VALUES ('0', 1, 'update_comment', 'Update Comment', '', '', '', '', 0, 0, 0)");
$DB->query("INSERT INTO phrases VALUES ('0', 1, 'post_comment', 'Post Comment', '', '', '', '', 0, 0, 0)");
$DB->query("INSERT INTO phrases VALUES ('0', 1, 'comments', 'Comments:', '', '', '', '', 0, 0, 0)");
$DB->query("INSERT INTO phrases VALUES ('0', 1, 'edit', 'Edit', '', '', '', '', 0, 0, 0)");
$DB->query("INSERT INTO phrases VALUES ('0', 1, 'delete', 'Delete', '', '', '', '', 0, 0, 0)");
$DB->query("INSERT INTO phrases VALUES ('0', 1, 'login_post_comments', 'You must be logged in to post comments.', '', '', '', '', 1, 0, 0)");
$DB->query("INSERT INTO phrases VALUES ('0', 1, 'view_comments', 'View Comments', '', '', '', '', 0, 0, 0)");
$DB->query("INSERT INTO phrases VALUES ('0', 1, 'login_view_page', 'Sorry, you must be logged in to view this page!', '', '', '', '', 0, 0, 0)");
$DB->query("INSERT INTO phrases VALUES ('0', 1, 'wrong_password', 'Wrong Password', '', '', '', '', 1, 0, 0)");
$DB->query("INSERT INTO phrases VALUES ('0', 1, 'wrong_username', 'Wrong Username', '', '', '', '', 1, 0, 0)");
$DB->query("INSERT INTO phrases VALUES ('0', 1, 'please_enter_username', 'Please enter a username.', '', '', '', '', 1, 0, 0)");
$DB->query("INSERT INTO phrases VALUES ('0', 1, 'session_error', 'Couldn\'t start session', '', '', '', '', 1, 0, 0)");
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -