200_beta_2.php

来自「CMS系统」· PHP 代码 · 共 24 行

PHP
24
字号
<?php

// all downloaded should at least be able to allow view and admin
// plugin settings bitfield canview = 1, canadmin = 16
// don't update the empty plugin
$DB->query("UPDATE " . TABLE_PREFIX . "plugins SET settings = 17 WHERE settings = 0 AND pluginid != 1");

// add custom plugin columns for usergroup table
$DB->query("ALTER TABLE " . TABLE_PREFIX . "usergroups ADD custompluginviewids  VARCHAR(250) NOT NULL,
                                                       ADD custompluginadminids VARCHAR(250) NOT NULL");

// add setting column to custom plugins table
$DB->query("ALTER TABLE " . TABLE_PREFIX . "customplugins ADD settings INT( 10 ) UNSIGNED NOT NULL");

// update settings to allow viewing and admin
$DB->query("UPDATE " . TABLE_PREFIX . "customplugins SET settings = 17");

// insert the new 'News' plugin phrases
$DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES ('0', 2, 'previous_page', '&laquo; Previous Page', '', '', '', '', 0, 0, 0)");
$DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES ('0', 2, 'next_page',     'Next Page &raquo;',     '', '', '', '', 0, 0, 0)");
$DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES ('0', 2, 'page',          'Page',                  '', '', '', '', 0, 0, 0)");
$DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES ('0', 2, 'of',            'of',                    '', '', '', '', 0, 0, 0)");

?>

⌨️ 快捷键说明

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