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

📄 200.php

📁 CMS系统
💻 PHP
字号:
<?php

// insert new phrases
$DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES ('0', 10, 'forgot_password',        'Forgot your password?',                         '', '', '', '', 0, 0, 0)");
$DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES ('0', 12, 'pwd_reset',              'Reset My Password',                         '', '', '', '', 0, 0, 0)");
$DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES ('0', 12, 'email_not_found',        'No account could be found that matched the entered email address:',                         '', '', '', '', 0, 0, 0)");
$DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES ('0', 12, 'email_subject',          'Your new Password',                         '', '', '', '', 0, 0, 0)");
$DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES ('0', 12, 'email_message',          'Here is your new password: ',                         '', '', '', '', 0, 0, 0)");
$DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES ('0', 12, 'password_reset_success', 'Your password was reset successfully. An email will arrive shortly with your new login details.',                         '', '', '', '', 0, 0, 0)");

// alter a few columns
$DB->query("ALTER TABLE " . TABLE_PREFIX . "usergroups CHANGE pluginviewids         pluginviewids         TEXT NOT NULL,
                                                       CHANGE pluginsubmitids       pluginsubmitids       TEXT NOT NULL,
                                                       CHANGE plugindownloadids     plugindownloadids     TEXT NOT NULL,
                                                       CHANGE plugincommentids      plugincommentids      TEXT NOT NULL,
                                                       CHANGE pluginadminids        pluginadminids        TEXT NOT NULL,
                                                       CHANGE custompluginviewids   custompluginviewids   TEXT NOT NULL,
                                                       CHANGE custompluginadminids  custompluginadminids  TEXT NOT NULL");

// disable forum integration
$DB->query("UPDATE " . TABLE_PREFIX . "usersystems SET activated = '0'");
$DB->query("UPDATE " . TABLE_PREFIX . "usersystems SET activated = '1' WHERE name = 'Subdreamer'");


// fix usergroup plugin permissions for plugin view and plugin admin for four usergroups:
// first get the plugins
$getplugins = $DB->query("SELECT pluginid FROM " . TABLE_PREFIX . "plugins WHERE pluginid != 1");
$getcustomplugins = $DB->query("SELECT custompluginid FROM " . TABLE_PREFIX . "customplugins");

// now empty out the database fields
$DB->query("UPDATE " . TABLE_PREFIX . "usergroups SET pluginviewids        = '',
                                                      pluginadminids       = '',
                                                      custompluginviewids  = '',
                                                      custompluginadminids = ''
                                                WHERE usergroupid in (1,2,3,4)");

// now build an array of the pluginids
while($plugin = $DB->fetch_array($getplugins))
{
  if(empty($pluginviewids) AND empty($pluginadminids))
  {
    $pluginviewids  = $plugin[pluginid];
    $pluginadminids = $plugin[pluginid];
  }
  else
  {
    $pluginviewids  .= ',' . $plugin[pluginid];
    $pluginadminids .= ',' . $plugin[pluginid];
  }
}

// now build an array of the custompluginids
while($customplugin = $DB->fetch_array($getcustomplugins))
{
  if(empty($custompluginviewids) AND empty($custompluginadminids))
  {
    $custompluginviewids  = $customplugin[custompluginid];
    $custompluginadminids = $customplugin[custompluginid];
  }
  else
  {
    $custompluginviewids  .= ',' . $customplugin[custompluginid];
    $custompluginadminids .= ',' . $customplugin[custompluginid];
  }
}

// now update the database for all usergroups except the admin
$DB->query("UPDATE " . TABLE_PREFIX . "usergroups SET pluginviewids        = '$pluginviewids',
                                                      custompluginviewids  = '$custompluginviewids'
                                                WHERE usergroupid in (2,3,4)");

// now update the databse for the admin usergroup
$DB->query("UPDATE " . TABLE_PREFIX . "usergroups SET pluginviewids        = '$pluginviewids',
                                                      pluginadminids       = '$pluginadminids',
                                                      custompluginviewids  = '$custompluginviewids',
                                                      custompluginadminids = '$custompluginadminids'
                                                WHERE usergroupid          = 1");

?>

⌨️ 快捷键说明

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