module.v100.php
来自「php 开发的内容管理系统」· PHP 代码 · 共 324 行 · 第 1/2 页
PHP
324 行
$result = $GLOBALS['xoopsDB']->queryF("ALTER TABLE ".$GLOBALS['xoopsDB']->prefix("bb_forums")." CHANGE `allow_html` `allow_html` INT(1) NOT NULL DEFAULT '1'");
if (!$result) {
$module->setErrors("Could not change field in bb_forums");
}
$result = $GLOBALS['xoopsDB']->queryF("ALTER TABLE ".$GLOBALS['xoopsDB']->prefix("bb_forums")." CHANGE `allow_sig` `allow_sig` INT(1) NOT NULL DEFAULT '1'");
if (!$result) {
$module->setErrors("Could not change field in bb_forums");
}
$result = $GLOBALS['xoopsDB']->queryF("ALTER TABLE ".$GLOBALS['xoopsDB']->prefix("bb_forums")." ADD `allow_subject_prefix` INT(1) NOT NULL DEFAULT '0' AFTER `allow_sig`");
if (!$result) {
$module->setErrors("Could not add field in bb_forums");
}
$result = $GLOBALS['xoopsDB']->queryF("ALTER TABLE ".$GLOBALS['xoopsDB']->prefix("bb_forums")." ADD `forum_order` INT(8) NOT NULL DEFAULT '0' AFTER `hot_threshold`");
if (!$result) {
$module->setErrors("Could not add field in bb_forums");
}
$result = $GLOBALS['xoopsDB']->queryF("ALTER TABLE ".$GLOBALS['xoopsDB']->prefix("bb_forums")." ADD `allow_attachments` INT(1) NOT NULL DEFAULT '1' AFTER `forum_order`");
if (!$result) {
$module->setErrors("Could not add field in bb_forums");
}
$result = $GLOBALS['xoopsDB']->queryF("ALTER TABLE ".$GLOBALS['xoopsDB']->prefix("bb_forums")." ADD `attach_maxkb` INT(10) NOT NULL DEFAULT '1000' AFTER `allow_attachments`");
if (!$result) {
$module->setErrors("Could not add field in bb_forums");
}
$result = $GLOBALS['xoopsDB']->queryF("ALTER TABLE ".$GLOBALS['xoopsDB']->prefix("bb_forums")." ADD `attach_ext` TEXT NOT NULL AFTER `attach_maxkb`");
if (!$result) {
$module->setErrors("Could not add field in bb_forums");
}
$result = $GLOBALS['xoopsDB']->queryF("ALTER TABLE ".$GLOBALS['xoopsDB']->prefix("bb_forums")." ADD `allow_polls` INT(1) NOT NULL DEFAULT '0' AFTER `attach_ext`");
if (!$result) {
$module->setErrors("Could not add field in bb_forums");
}
$result = $GLOBALS['xoopsDB']->queryF("ALTER TABLE ".$GLOBALS['xoopsDB']->prefix("bb_posts")." ADD `poster_name` varchar(255) DEFAULT NULL AFTER `uid`");
if (!$result) {
$module->setErrors("Could not add field in bb_posts");
}
$result = $GLOBALS['xoopsDB']->queryF("ALTER TABLE ".$GLOBALS['xoopsDB']->prefix("bb_posts")." CHANGE `poster_ip` `poster_ip` INT(11) NOT NULL DEFAULT '0'");
if (!$result) {
$module->setErrors("Could not change field in bb_posts");
}
$result = $GLOBALS['xoopsDB']->queryF("ALTER TABLE ".$GLOBALS['xoopsDB']->prefix("bb_posts")." DROP `nosmiley`");
if (!$result) {
$module->setErrors("Could not drop nosmiley in bb_posts");
}
$result = $GLOBALS['xoopsDB']->queryF("ALTER TABLE ".$GLOBALS['xoopsDB']->prefix("bb_posts")." CHANGE `nohtml` `dohtml` TINYINT(1) NOT NULL DEFAULT '0'");
if (!$result) {
$module->setErrors("Could not change field in bb_posts");
}
$result = $GLOBALS['xoopsDB']->queryF("ALTER TABLE ".$GLOBALS['xoopsDB']->prefix("bb_posts")." ADD `dosmiley` TINYINT(1) NOT NULL DEFAULT '1' AFTER `dohtml`");
if (!$result) {
$module->setErrors("Could not change field in bb_posts");
}
$result = $GLOBALS['xoopsDB']->queryF("ALTER TABLE ".$GLOBALS['xoopsDB']->prefix("bb_posts")." ADD `doxcode` TINYINT(1) NOT NULL DEFAULT '1' AFTER `dosmiley`");
if (!$result) {
$module->setErrors("Could not add field in bb_posts");
}
$result = $GLOBALS['xoopsDB']->queryF("ALTER TABLE ".$GLOBALS['xoopsDB']->prefix("bb_posts")." ADD `dobr` TINYINT(1) NOT NULL DEFAULT '1' AFTER `doxcode`");
if (!$result) {
$module->setErrors("OK exist just to be sure bb_posts");
}
$result = $GLOBALS['xoopsDB']->queryF("ALTER TABLE ".$GLOBALS['xoopsDB']->prefix("bb_posts")." ADD `doimage` TINYINT(1) NOT NULL DEFAULT '1' AFTER `dobr`");
if (!$result) {
$module->setErrors("OK exist just to be sure bb_posts");
}
$result = $GLOBALS['xoopsDB']->queryF("ALTER TABLE ".$GLOBALS['xoopsDB']->prefix("bb_posts")." ADD `approved` int(1) NOT NULL default '1' AFTER `attachsig`");
if (!$result) {
$module->setErrors("Could not add field in bb_posts");
}
$result = $GLOBALS['xoopsDB']->queryF("ALTER TABLE ".$GLOBALS['xoopsDB']->prefix("bb_posts")." ADD `post_karma` int(10) NOT NULL default '0' AFTER `approved`");
if (!$result) {
$module->setErrors("Could not add field in bb_posts");
}
$result = $GLOBALS['xoopsDB']->queryF("ALTER TABLE ".$GLOBALS['xoopsDB']->prefix("bb_posts")." ADD `attachment` text AFTER `post_karma`");
if (!$result) {
$module->setErrors("Could not add field in bb_posts");
}
$result = $GLOBALS['xoopsDB']->queryF("ALTER TABLE ".$GLOBALS['xoopsDB']->prefix("bb_posts")." ADD `require_reply` int(1) NOT NULL default '0' AFTER `attachment`");
if (!$result) {
$module->setErrors("Could not add field in bb_posts");
}
$result = $GLOBALS['xoopsDB']->queryF("ALTER TABLE ".$GLOBALS['xoopsDB']->prefix("bb_posts_text")." ADD `post_edit` TEXT NOT NULL AFTER `post_text`");
if (!$result) {
$module->setErrors("Could not add field in bb_posts_text");
}
$result = $GLOBALS['xoopsDB']->queryF("ALTER TABLE ".$GLOBALS['xoopsDB']->prefix("bb_topics")." ADD `topic_subject` INT(3) NOT NULL default '0' AFTER `topic_status`");
if (!$result) {
$module->setErrors("Could not add field in bb_topics");
}
$result = $GLOBALS['xoopsDB']->queryF("ALTER TABLE ".$GLOBALS['xoopsDB']->prefix("bb_topics")." ADD `topic_digest` TINYINT(1) NOT NULL default '0' AFTER `topic_sticky`");
if (!$result) {
$module->setErrors("Could not add field in bb_topics");
}
$result = $GLOBALS['xoopsDB']->queryF("ALTER TABLE ".$GLOBALS['xoopsDB']->prefix("bb_topics")." ADD `digest_time` int(10) NOT NULL default '0' AFTER `topic_digest`");
if (!$result) {
$module->setErrors("Could not add field in bb_topics");
}
$result = $GLOBALS['xoopsDB']->queryF("ALTER TABLE ".$GLOBALS['xoopsDB']->prefix("bb_topics")." ADD `approved` int(1) NOT NULL default '1' AFTER `digest_time`");
if (!$result) {
$module->setErrors("Could not add field in bb_topics");
}
$result = $GLOBALS['xoopsDB']->queryF("ALTER TABLE ".$GLOBALS['xoopsDB']->prefix("bb_topics")." ADD `poster_name` varchar(255) DEFAULT NULL AFTER `approved`");
if (!$result) {
$module->setErrors("Could not add field in bb_topics");
}
$result = $GLOBALS['xoopsDB']->queryF("ALTER TABLE ".$GLOBALS['xoopsDB']->prefix("bb_topics")." ADD `rating` double(6,4) NOT NULL default '0.0000' AFTER `poster_name`");
if (!$result) {
$module->setErrors("Could not add field in bb_topics");
}
$result = $GLOBALS['xoopsDB']->queryF("ALTER TABLE ".$GLOBALS['xoopsDB']->prefix("bb_topics")." ADD `votes` int(11) unsigned NOT NULL default '0' AFTER `rating`");
if (!$result) {
$module->setErrors("Could not add field in bb_topics");
}
$result = $GLOBALS['xoopsDB']->queryF("ALTER TABLE ".$GLOBALS['xoopsDB']->prefix("bb_topics")." ADD `topic_haspoll` tinyint(1) NOT NULL default '0' AFTER `votes`");
if (!$result) {
$module->setErrors("Could not add field in bb_topics");
}
$result = $GLOBALS['xoopsDB']->queryF("ALTER TABLE ".$GLOBALS['xoopsDB']->prefix("bb_topics")." ADD `poll_id` mediumint(8) unsigned NOT NULL default '0' AFTER `topic_haspoll`");
if (!$result) {
$module->setErrors("Could not add field in bb_topics");
}
$result = $GLOBALS['xoopsDB']->queryF("DROP TABLE ".$GLOBALS['xoopsDB']->prefix("bb_forum_access"));
if (!$result) {
$module->setErrors("Could not drop bb_forum_access");
}
$result = $GLOBALS['xoopsDB']->queryF("DROP TABLE ".$GLOBALS['xoopsDB']->prefix("bb_forum_mods"));
if (!$result) {
$module->setErrors("Could not drop bb_forum_mods");
}
return true;
}
?>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?