function print_statistic_code($title, $name, $start, $end, $nullvalue = true, $scope = 'daily', $sort = 'date_desc') { global $vbphrase; print_form_header('stats', $name); print_table_header($title); print_time_row($vbphrase['start_date'], 'start', $start, false); print_time_row($vbphrase['end_date'], 'end', $end, false); if ($name != 'activity') { print_select_row($vbphrase['scope'], 'scope', array('daily' => $vbphrase['daily'], 'weekly' => $vbphrase['weekly'], 'monthly' => $vbphrase['monthly']), $scope); } else { construct_hidden_code('scope', 'daily'); } print_select_row($vbphrase['order_by'], 'sort', array( 'date_asc' => $vbphrase['date_ascending'], 'date_desc' => $vbphrase['date_descending'], 'total_asc' => $vbphrase['total_ascending'], 'total_desc' => $vbphrase['total_descending'], ), $sort); print_yes_no_row($vbphrase['include_empty_results'], 'nullvalue', $nullvalue); print_submit_row($vbphrase['go']); }
function print_diagnostic_test_result($status, $reasons = array(), $exit = 1) { // $status values = -1: indeterminate; 0: failed; 1: passed // $reasons a list of reasons why the test passed/failed // $exit values = 0: continue execution; 1: stop here global $vbphrase; print_form_header('', ''); print_table_header($vbphrase['results']); if (is_array($reasons)) { foreach ($reasons AS $reason) { print_description_row($reason); } } else if (!empty($reasons)) { print_description_row($reasons); } print_table_footer(); if ($exit == 1) { print_cp_footer(); } }
/** * Prints a setting group for use in options.php?do=options * * @param string Settings group ID * @param boolean Show advanced settings? */ function print_setting_group($dogroup, $advanced = 0) { global $settingscache, $grouptitlecache, $bgcounter, $settingphrase; if (!is_array($settingscache["{$dogroup}"])) { return; } $userContext = vB::getUserContext(); if (!empty($settingscache[$dogroup]['groupperm']) and !$userContext->hasAdminPermission($settingscache[$dogroup]['groupperm'])) { return; } $vbphrase = vB_Api::instanceInternal('phrase')->fetch(array('group_requires_admin_perm', 'edit', 'delete', 'add_setting', 'rebuild', 'rebuild_all_attachments')); print_column_style_code(array('width:45%', 'width:55%')); echo "<thead>\r\n"; $vb5_config = vB::getConfig(); $title = $settingphrase["settinggroup_{$grouptitlecache[$dogroup]}"]; if ($vb5_config['Misc']['debug'] and $userContext->hasAdminPermission('canadminsettingsall')) { $title .= '<span class="normal">' . construct_link_code($vbphrase['edit'], "options.php?" . vB::getCurrentSession()->get('sessionurl') . "do=editgroup&grouptitle={$dogroup}") . construct_link_code($vbphrase['delete'], "options.php?" . vB::getCurrentSession()->get('sessionurl') . "do=removegroup&grouptitle={$dogroup}") . construct_link_code($vbphrase['add_setting'], "options.php?" . vB::getCurrentSession()->get('sessionurl') . "do=addsetting&grouptitle={$dogroup}") . '</span>'; } print_table_header($title); echo "</thead>\r\n"; $bgcounter = 1; foreach ($settingscache["{$dogroup}"] as $settingid => $setting) { if (!empty($setting['adminperm']) and !$userContext->hasAdminPermission($setting['adminperm'])) { continue; } if (($advanced or !$setting['advanced']) and !empty($setting['varname'])) { print_setting_row($setting, $settingphrase, true, $userContext); } } }
public function print_editor($masterstyleid) { global $vbulletin, $vbphrase; $addon = $masterstyleid == -2 ? '_mobile' : ''; $header = $vbphrase["stylevar_{$this->stylevarid}_name{$addon}"] ? $vbphrase["stylevar_{$this->stylevarid}_name{$addon}"] : $this->stylevarid; $addbit = false; if ($vbulletin->GPC['dostyleid'] == -1 or $vbulletin->GPC['dostyleid'] == -2) { $header .= ' - <span class="smallfont">' . construct_link_code($vbphrase['edit'], "stylevar.php?" . $vbulletin->session->vars['sessionurl'] . "do=dfnedit&stylevarid=" . $this->stylevarid . "&dostyleid=" . $vbulletin->GPC['dostyleid']); $addbit = true; } if ($this->inherited == -1 or $this->inherited == -2) { if (!$addbit) { $header .= ' - <span class="smallfont">'; } else { $header .= ' - '; } $header .= (count($header) == 1 ? '<span class="smallfont">' : '') . construct_link_code($vbphrase['revert'], "stylevar.php?" . $vbulletin->session->vars['sessionurl'] . "do=confirmrevert&dostyleid=" . $vbulletin->GPC['dostyleid'] . "&stylevarid=" . $this->stylevarid . "&rootstyle=" . $this->inherited); } if ($addbit) { $header .= '</span>'; } print_table_header($header); if ($vbphrase["stylevar_{$this->stylevarid}_description{$addon}"]) { print_description_row($vbphrase["stylevar_{$this->stylevarid}_description{$addon}"], false, 2); } // once we have LSB change this to self:: $this->print_editor_form(); }
function print_channel_permission_rows($customword, $channelpermission = array(), $extra = '') { global $vbphrase; print_label_row("<b>{$customword}</b>", ' <input type="button" class="button" value="' . $vbphrase['all_yes'] . '" onclick="' . iif($extra != '', 'if (js_set_custom()) { ') . ' js_check_all_option(this.form, 1);' . iif($extra != '', ' }') . '" class="button" /> <input type="button" class="button" value=" ' . $vbphrase['all_no'] . ' " onclick="' . iif($extra != '', 'if (js_set_custom()) { ') . ' js_check_all_option(this.form, 0);' . iif($extra != '', ' }') . '" class="button" /> <!--<input type="submit" class="button" value="Okay" class="button" />--> ', 'tcat', 'middle'); // Load permissions require_once DIR . '/includes/class_bitfield_builder.php'; $bitvalues = array('forumpermissions', 'forumpermissions2', 'moderatorpermissions', 'createpermissions'); $permFields = vB_ChannelPermission::fetchPermFields(); $permPhrases = vB_ChannelPermission::fetchPermPhrases(); if (empty($channelpermission)) { // we need the defaults to be displayed $channelpermission = vB_ChannelPermission::instance()->fetchPermissions(1); $channelpermission = current($channelpermission); } foreach ($permFields as $permField => $type) { //Do the non-bitmap fields first. switch ($type) { case vB_ChannelPermission::TYPE_HOURS: case vB_ChannelPermission::TYPE_COUNT: $permvalue = $channelpermission[$permField]; print_input_row($vbphrase[$permPhrases[$permField]], $permField, $permvalue, true, 35, 0, '', false, 'channelPerm_' . $permField); break; case vB_ChannelPermission::TYPE_BOOL: $permvalue =& $channelpermission[$permField]; print_yes_no_row($vbphrase[$permPhrases[$permField]], $permField, $permvalue, $extra); break; } } //now do the bitmaps foreach ($permFields as $permField => $type) { if ($type == vB_ChannelPermission::TYPE_BITMAP) { if ($permField !== 'forumpermissions2') { print_table_header($vbphrase[$permPhrases[$permField]]); } foreach ($channelpermission['bitfields'][$permField] as $permBit) { if ($permBit['used']) { if (empty($permBit['phrase']) and $permField == 'moderatorpermissions') { $permBit['phrase'] = "moderator_add_edit_" . $permBit['name'] . "_title"; } if ($permField == 'moderatorpermissions' and $permBit['name'] == 'canopenclose') { $helpOptions = array('prefix' => $permField); } else { $helpOptions = array(); } print_yes_no_row(isset($vbphrase[$permBit['phrase']]) ? $vbphrase[$permBit['phrase']] : $permBit['phrase'], $permField . '[' . $permBit['name'] . ']', $permBit['set'], $extra, $helpOptions); } } } } // Legacy Hook 'admin_nperms_form' Removed // }
/** * Prints a setting group for use in options.php?do=options * * @param string Settings group ID * @param boolean Show advanced settings? */ function print_setting_group($dogroup, $advanced = 0) { global $settingscache, $grouptitlecache, $vbulletin, $vbphrase, $bgcounter, $settingphrase, $stylevar; if (!is_array($settingscache["{$dogroup}"])) { return; } print_column_style_code(array('width:45%', 'width:55%')); echo "<thead>\r\n"; print_table_header($settingphrase["settinggroup_{$grouptitlecache[$dogroup]}"] . iif($vbulletin->debug, '<span class="normal">' . construct_link_code($vbphrase['edit'], "options.php?" . $vbulletin->session->vars['sessionurl'] . "do=editgroup&grouptitle={$dogroup}") . construct_link_code($vbphrase['delete'], "options.php?" . $vbulletin->session->vars['sessionurl'] . "do=removegroup&grouptitle={$dogroup}") . construct_link_code($vbphrase['add_setting'], "options.php?" . $vbulletin->session->vars['sessionurl'] . "do=addsetting&grouptitle={$dogroup}") . '</span>')); echo "</thead>\r\n"; $bgcounter = 1; foreach ($settingscache["{$dogroup}"] as $settingid => $setting) { if (($advanced or !$setting['advanced']) and !empty($setting['varname'])) { print_setting_row($setting, $settingphrase); } } }
public function print_editor() { global $vbulletin, $vbphrase; $vb5_config =& vB::getConfig(); $header = $vbphrase["stylevar_{$this->stylevarid}_name"] ? $vbphrase["stylevar_{$this->stylevarid}_name"] : $this->stylevarid; $addbit = false; if ($vbulletin->GPC['dostyleid'] == -1) { $header .= ' - <span class="smallfont">' . construct_link_code($vbphrase['edit'], "stylevar.php?" . vB::getCurrentSession()->get('sessionurl') . "do=dfnedit&stylevarid=" . $this->stylevarid); $addbit = true; } if ($this->inherited == -1) { if (!$addbit) { $header .= ' - <span class="smallfont">'; $addbit = true; } else { $header .= ' - '; } $header .= construct_link_code($vbphrase['revert_gcpglobal'], "stylevar.php?" . vB::getCurrentSession()->get('sessionurl') . "do=confirmrevert&dostyleid=" . $vbulletin->GPC['dostyleid'] . "&stylevarid=" . $this->stylevarid . "&rootstyle=-1"); } if ($addbit) { $header .= '</span>'; } print_table_header($header); if ($vbphrase["stylevar_{$this->stylevarid}_description"]) { print_description_row($vbphrase["stylevar_{$this->stylevarid}_description"], false, 2); } if ($vb5_config['Misc']['debug']) { print_label_row($vbphrase['stylevarid'], $this->stylevarid); } // output this stylevar's inheritance level (inherited or customized) // so that we can update the stylevar list and show inherited status // immediately echo '<script type="text/javascript"> window.vBulletinStylevarInheritance = window.vBulletinStylevarInheritance ? window.vBulletinStylevarInheritance : {}; window.vBulletinStylevarInheritance["' . $this->stylevarid . '"] = ' . $this->inherited . '; </script>'; // once we have LSB change this to self:: $this->print_editor_form(); }
// ###################### Start viewing resources for specific user ######################## if ($_REQUEST['do'] == 'viewuser') { $userinfo = fetch_userinfo($vbulletin->GPC['userid']); if (!$userinfo) { print_stop_message('invalid_user_specified'); } $perms = cache_permissions($userinfo); print_form_header('', ''); print_table_header($userinfo['username'] . " <span class=\"normal\">(userid: $userinfo[userid])</span>"); foreach ($userinfo['forumpermissions'] AS $forumid => $forumperms) { print_table_header($vbulletin->forumcache["$forumid"]['title'] . " <span class=\"normal\">(forumid: $forumid)</span>"); foreach ($vbulletin->bf_ugp_forumpermissions AS $key => $val) { if (bitwise($userinfo['forumpermissions']["$forumid"], $val)) { print_label_row($bitfieldnames["$val"], '<b>' . $vbphrase['yes'] . '</b>'); } else { print_label_row($bitfieldnames["$val"], '<b>' . $vbphrase['no'] . '</b>'); } } } print_table_footer(); }
$time_before = microtime(); $db->query_write($query); $time_taken = fetch_microtime_difference($time_before); print_form_header('queries', 'doquery'); print_table_header($vbphrase['vbulletin_message']); if ($errornum = $db->errno()) { print_description_row(construct_phrase($vbphrase['an_error_occured_while_attempting_to_run_your_query'], $errornum, nl2br(htmlspecialchars_uni($db->error())))); } else { print_description_row(construct_phrase($vbphrase['affected_rows'], vb_number_format($db->affected_rows()), vb_number_format($time_taken, 4))); } print_table_footer(); } break; } } // ##################### START MODIFY ##################### if ($_REQUEST['do'] == 'modify') { print_form_header('queries', 'doquery'); print_table_header($vbphrase['execute_sql_query']); print_select_row($vbphrase['auto_query'], 'autoquery', $queryoptions, -1); print_textarea_row($vbphrase['manual_query'], 'query', '', 10, 55); print_input_row($vbphrase['results_to_show_per_page'], 'perpage', 20); print_submit_row($vbphrase['continue']); } print_cp_footer(); /*======================================================================*\ || #################################################################### || # Downloaded: 03:13, Sat Sep 7th 2013 || # CVS: $RCSfile$ - $Revision: 37230 $ || #################################################################### \*======================================================================*/
$userdm->save(); unset($userdm); } $db->query_write("\n\t\tDELETE FROM " . TABLE_PREFIX . "reputation\n\t\tWHERE reputationid = " . $vbulletin->GPC['reputationid']); define('CP_REDIRECT', "adminreputation.php?do=list&u={$repinfo['userid']}"); print_stop_message('deleted_reputation_successfully'); } // ************************************************************************************************* if ($_REQUEST['do'] == 'deletereputation') { $vbulletin->input->clean_array_gpc('r', array('reputationid' => TYPE_INT)); print_delete_confirmation('reputation', $vbulletin->GPC['reputationid'], 'adminreputation', 'killreputation'); } if ($_REQUEST['do'] == 'modify') { $reputationlevels = $db->query_read("\n\t\tSELECT *\n\t\tFROM " . TABLE_PREFIX . "reputationlevel\n\t\tORDER BY minimumreputation\n\t"); print_form_header('adminreputation', 'updateminimums'); print_table_header($vbphrase['user_reputation_manager'], 3); print_cells_row(array($vbphrase['reputation_level'], $vbphrase['minimum_reputation_level'], $vbphrase['controls']), 1); while ($reputationlevel = $db->fetch_array($reputationlevels)) { $reputationlevel['level'] = htmlspecialchars_uni($vbphrase['reputation' . $reputationlevel['reputationlevelid']]); $cell = array(); $cell[] = "{$vbphrase['user']} <b>{$reputationlevel['level']}</b>"; $cell[] = "<input type=\"text\" class=\"bginput\" tabindex=\"1\" name=\"reputation[{$reputationlevel['reputationlevelid']}]\" value=\"{$reputationlevel['minimumreputation']}\" size=\"5\" />"; $cell[] = construct_link_code($vbphrase['edit'], "adminreputation.php?" . $vbulletin->session->vars['sessionurl'] . "do=edit&reputationlevelid={$reputationlevel['reputationlevelid']}") . construct_link_code($vbphrase['delete'], "adminreputation.php?" . $vbulletin->session->vars['sessionurl'] . "do=remove&minimumreputation={$reputationlevel['minimumreputation']}"); print_cells_row($cell); } print_submit_row($vbphrase['update'], $vbphrase['reset'], 3); } print_cp_footer(); /*======================================================================*\ || #################################################################### || # Downloaded: 03:13, Sat Sep 7th 2013
if (empty($vbulletin->GPC['amount'])) { print_stop_message('please_complete_required_fields'); } if (empty($vbulletin->GPC['infractionbanid'])) { $db->query_write("INSERT INTO " . TABLE_PREFIX . "infractionban (amount) VALUES (0)"); $vbulletin->GPC['infractionbanid'] = $db->insert_id(); } $db->query_write("\n\t\tUPDATE " . TABLE_PREFIX . "infractionban\n\t\tSET amount = " . $vbulletin->GPC['amount'] . ",\n\t\t\tmethod = '" . $db->escape_string($vbulletin->GPC['method']) . "',\n\t\t\tusergroupid = " . $vbulletin->GPC['usergroupid'] . ",\n\t\t\tbanusergroupid = " . $vbulletin->GPC['banusergroupid'] . ",\n\t\t\tperiod = '" . $db->escape_string($vbulletin->GPC['period']) . "'\n\t\tWHERE infractionbanid = " . $vbulletin->GPC['infractionbanid'] . "\n\t"); define('CP_REDIRECT', 'admininfraction.php?do=modify'); print_stop_message('saved_automatic_ban_successfully'); } // ###################### Start Remove ####################### if ($_REQUEST['do'] == 'removebangroup') { print_form_header('admininfraction', 'killbangroup'); construct_hidden_code('infractionbanid', $vbulletin->GPC['infractionbanid']); print_table_header(construct_phrase($vbphrase['confirm_deletion_x'], $vbphrase['automatic_ban'])); print_description_row($vbphrase['are_you_sure_you_want_to_delete_this_automatic_ban']); print_submit_row($vbphrase['yes'], '', 2, $vbphrase['no']); } // ###################### Start Kill ####################### if ($_POST['do'] == 'killbangroup') { $db->query_write("DELETE FROM " . TABLE_PREFIX . "infractionban WHERE infractionbanid = " . $vbulletin->GPC['infractionbanid']); define('CP_REDIRECT', 'admininfraction.php?do=modify'); print_stop_message('deleted_automatic_ban_successfully'); } print_cp_footer(); /*======================================================================*\ || #################################################################### || # Downloaded: 12:39, Wed May 30th 2012 || # CVS: $RCSfile$ - $Revision: 39862 $ || ####################################################################
} if ($vbulletin->GPC['editing']) { $db->query_write("\r\n\t\t\tUPDATE " . TABLE_PREFIX . "product SET\r\n\t\t\t\ttitle = '" . $db->escape_string($vbulletin->GPC['title']) . "',\r\n\t\t\t\tdescription = '" . $db->escape_string($vbulletin->GPC['description']) . "',\r\n\t\t\t\tversion = '" . $db->escape_string($vbulletin->GPC['version']) . "',\r\n\t\t\t\turl = '" . $db->escape_string($vbulletin->GPC['url']) . "',\r\n\t\t\t\tversioncheckurl = '" . $db->escape_string($vbulletin->GPC['versioncheckurl']) . "'\r\n\t\t\tWHERE productid = '" . $db->escape_string($vbulletin->GPC['productid']) . "'\r\n\t\t"); } else { // product IDs must match #^[a-z0-9_]+$# and must be max 25 chars if (!preg_match('#^[a-z0-9_]+$#s', $vbulletin->GPC['productid']) or strlen($vbulletin->GPC['productid']) > 25) { $sugg = preg_replace('#\\s+#s', '_', strtolower($vbulletin->GPC['productid'])); $sugg = preg_replace('#[^\\w]#s', '', $sugg); $sugg = str_replace('__', '_', $sugg); $sugg = substr($sugg, 0, 25); print_stop_message('product_id_invalid', htmlspecialchars_uni($vbulletin->GPC['productid']), $sugg); } // reserve 'vb' prefix for official vBulletin products if (!$vbulletin->GPC['confirm'] and strtolower(substr($vbulletin->GPC['productid'], 0, 2)) == 'vb') { print_form_header('plugin', 'productsave'); print_table_header($vbphrase['vbulletin_message']); print_description_row(htmlspecialchars_uni($vbulletin->GPC['title']) . ' ' . htmlspecialchars_uni($vbulletin->GPC['version']) . '<dfn>' . htmlspecialchars_uni($vbulletin->GPC['description']) . '</dfn>'); print_input_row($vbphrase['vb_prefix_reserved'], 'productid', $vbulletin->GPC['productid'], true, 35, 25); construct_hidden_code('title', $vbulletin->GPC['title']); construct_hidden_code('description', $vbulletin->GPC['description']); construct_hidden_code('version', $vbulletin->GPC['version']); construct_hidden_code('confirm', 1); print_submit_row(); print_cp_footer(); // execution terminates here } /* insert query */ $db->query_write("\r\n\t\t\tINSERT INTO " . TABLE_PREFIX . "product\r\n\t\t\t\t(productid, title, description, version, active, url, versioncheckurl)\r\n\t\t\tVALUES\r\n\t\t\t\t('" . $db->escape_string($vbulletin->GPC['productid']) . "',\r\n\t\t\t\t'" . $db->escape_string($vbulletin->GPC['title']) . "',\r\n\t\t\t\t'" . $db->escape_string($vbulletin->GPC['description']) . "',\r\n\t\t\t\t'" . $db->escape_string($vbulletin->GPC['version']) . "',\r\n\t\t\t\t1,\r\n\t\t\t\t'" . $db->escape_string($vbulletin->GPC['url']) . "',\r\n\t\t\t\t'" . $db->escape_string($vbulletin->GPC['versioncheckurl']) . "')\r\n\t\t"); } // update the products datastore build_product_datastore();
echo "</td>\n</tr>\n"; if (!empty($modlist)) { print_table_footer(1, $vbphrase['total'] . ": <b>" . count($modlist) . "</b>"); } else { print_table_footer(); } } // ###################### Start Remove moderator from all forums ####################### if ($_REQUEST['do'] == 'removeall') { $modinfo = $db->query_first("\n\t\tSELECT username FROM " . TABLE_PREFIX . "moderator AS moderator\n\t\tLEFT JOIN " . TABLE_PREFIX . "user AS user USING(userid)\n\t\tWHERE moderator.userid = " . $vbulletin->GPC['userid'] . "\n\t"); if (!$modinfo) { print_stop_message('user_no_longer_moderator'); } print_form_header('moderator', 'killall', 0, 1, '', '75%'); construct_hidden_code('userid', $vbulletin->GPC['userid']); print_table_header($vbphrase['confirm_deletion']); print_description_row('<blockquote><br />' . $vbphrase['are_you_sure_you_want_to_delete_this_moderator'] . "<br /></blockquote>\n\t"); print_submit_row($vbphrase['yes'], 0, 2, $vbphrase['no']); } // ###################### Start Kill moderator from all forums ####################### if ($_POST['do'] == 'killall') { if (empty($vbulletin->GPC['userid'])) { print_stop_message('invalid_users_specified'); } $getuserid = $db->query_first("\n\t\tSELECT user.*,\n\t\tIF (user.displaygroupid = 0, user.usergroupid, user.displaygroupid) AS displaygroupid\n\t\tFROM " . TABLE_PREFIX . "moderator AS moderator\n\t\tLEFT JOIN " . TABLE_PREFIX . "user AS user USING(userid)\n\t\tWHERE moderator.userid = " . $vbulletin->GPC['userid'] . "\n\t\t\tAND forumid <> -1\n\t"); if (!$getuserid) { print_stop_message('user_no_longer_moderator'); } else { ($hook = vBulletinHook::fetch_hook('admin_moderator_killall')) ? eval($hook) : false; $db->query_write("DELETE FROM " . TABLE_PREFIX . "moderator WHERE userid = " . $vbulletin->GPC['userid'] . " AND forumid <> -1"); // if the user is in the moderators usergroup, then move them to registered users usergroup
echo "<blockquote><p> </p>"; echo "{$vbphrase['upgrade_wrong_version']}"; echo "<p> </p></blockquote>"; print_upgrade_footer(); } } // ############################################################################# // FINAL step (notice the SCRIPTCOMPLETE define) if ($vbulletin->GPC['step'] == 1) { $db->query_write("\r\n\t\tDELETE FROM " . TABLE_PREFIX . "phrase\r\n\t\tWHERE varname LIKE 'notice\\_%\\_title'\r\n\t\t\tAND fieldname = 'global'\r\n\t"); $db->query_write("\r\n\t\tALTER TABLE " . TABLE_PREFIX . "event CHANGE utc utc DECIMAL(4,2) NOT NULL DEFAULT '0.0'\r\n\t"); $rows = $db->query_first("SELECT COUNT(*) AS count FROM " . TABLE_PREFIX . "adminmessage WHERE varname = 'after_upgrade_password_check'"); if ($rows['count'] == 0) { $db->query_write("\r\n\t\t\tINSERT INTO " . TABLE_PREFIX . "adminmessage\r\n\t\t\t\t(varname, dismissable, script, action, execurl, method, dateline, status)\r\n\t\t\tVALUES\r\n\t\t\t\t('after_upgrade_password_check', 1, 'passwordcheck.php', 'check', 'passwordcheck.php?do=check', 'get', " . TIMENOW . ", 'undone')\r\n\t\t\t\r\n\t\t"); } print_form_header('', ''); print_table_header($upgrade_phrases['upgrade_373.php']['weak_password_notice']); print_description_row($upgrade_phrases['upgrade_373.php']['weak_password_description']); print_table_footer(); // tell log_upgrade_step() that the script is done define('SCRIPTCOMPLETE', true); } // ############################################################################# print_next_step(); print_upgrade_footer(); /*======================================================================*\ || #################################################################### || # Downloaded: 12:56, Sat Oct 11th 2008 || # CVS: $RCSfile$ - $Revision: 13568 $ || #################################################################### \*======================================================================*/
if ($vbulletin->GPC['extension']) { $db->query_write(fetch_query_sql($vbulletin->GPC['type'], 'attachmenttype', 'WHERE extension = \'' . $db->escape_string($vbulletin->GPC['extension']) . '\'')); build_attachment_permissions(); } else { /*insert query*/ $db->query_write("\n\t\t\tINSERT INTO " . TABLE_PREFIX . "attachmenttype\n\t\t\t(\n\t\t\t\textension,\n\t\t\t\tsize,\n\t\t\t\theight,\n\t\t\t\twidth,\n\t\t\t\tmimetype,\n\t\t\t\tcontenttypes\n\t\t\t)\n\t\t\tVALUES\n\t\t\t(\n\t\t\t\t'" . $db->escape_string($vbulletin->GPC['type']['extension']) . "',\n\t\t\t\t" . intval($vbulletin->GPC['type']['size']) . ",\n\t\t\t\t" . intval($vbulletin->GPC['type']['height']) . ",\n\t\t\t\t" . intval($vbulletin->GPC['type']['width']) . ",\n\t\t\t\t'" . $db->escape_string($vbulletin->GPC['type']['mimetype']) . "',\n\t\t\t\t'" . $db->escape_string($vbulletin->GPC['type']['contenttype']) . "'\n\t\t\t)\n\t\t"); build_attachment_permissions(); } print_stop_message('saved_attachment_type_x_successfully', $vbulletin->GPC['type']['extension']); } // ###################### Remove File Type #################### if ($_REQUEST['do'] == 'removetype') { $vbulletin->input->clean_array_gpc('r', array('extension' => TYPE_STR)); print_form_header('attachment', 'killtype', 0, 1, '', '75%'); construct_hidden_code('extension', $vbulletin->GPC['extension']); print_table_header(construct_phrase($vbphrase['confirm_deletion_of_attachment_type_x'], $vbulletin->GPC['extension'])); print_description_row("\n\t\t<blockquote><br />" . construct_phrase($vbphrase['are_you_sure_you_want_to_delete_the_attachment_type_x'], $vbulletin->GPC['extension']) . "\n\t\t<br /></blockquote>\n\t"); print_submit_row($vbphrase['yes'], 0, 2, $vbphrase['no']); } // ###################### Kill File Type #################### if ($_POST['do'] == 'killtype') { $vbulletin->input->clean_array_gpc('r', array('extension' => TYPE_STR)); $db->query_write("\n\t\tDELETE FROM " . TABLE_PREFIX . "attachmenttype\n\t\tWHERE extension = '" . $db->escape_string($vbulletin->GPC['extension']) . "'\n\t"); $db->query_write("\n\t\tDELETE FROM " . TABLE_PREFIX . "attachmentpermission\n\t\tWHERE extension = '" . $db->escape_string($vbulletin->GPC['extension']) . "'\n\t"); build_attachment_permissions(); define('CP_REDIRECT', 'attachment.php?do=types'); print_stop_message('deleted_attachment_type_successfully'); } print_cp_footer(); /*======================================================================*\ || ####################################################################
construct_hidden_code('userid', $vbulletin->GPC['userid']); construct_hidden_code('oldpermissions', $user['adminpermissions']); print_table_header(construct_phrase($vbphrase['x_y_id_z'], $vbphrase['administrator_permissions'], $user['username'], $user['userid'])); print_label_row("{$vbphrase['administrator']}: <a href=\"user.php?" . $vbulletin->session->vars['sessionurl'] . "do=edit&u=" . $vbulletin->GPC['userid'] . "\">{$user['username']}</a>", '<div align="' . $stylevar['right'] . '"><input type="button" class="button" value=" ' . $vbphrase['all_yes'] . ' " onclick="js_check_all_option(this.form, 1);" /> <input type="button" class="button" value=" ' . $vbphrase['all_no'] . ' " onclick="js_check_all_option(this.form, 0);" /></div>', 'thead'); foreach (convert_bits_to_array($user['adminpermissions'], $ADMINPERMISSIONS) as $field => $value) { print_yes_no_row($permsphrase["{$field}"] == '' ? $vbphrase['n_a'] : $permsphrase["{$field}"], "adminpermissions[{$field}]", $value); } ($hook = vBulletinHook::fetch_hook('admin_permissions_form')) ? eval($hook) : false; print_select_row($vbphrase['control_panel_style_choice'], 'cssprefs', array_merge(array('' => "({$vbphrase['default']})"), fetch_cpcss_options()), $user['cssprefs']); print_input_row($vbphrase['dismissed_news_item_ids'], 'dismissednews', $user['dismissednews']); print_submit_row(); } // ############################################################################# if ($_REQUEST['do'] == 'modify') { print_form_header('adminpermissions', 'edit'); print_table_header($vbphrase['administrator_permissions'], 3); $users = $db->query_read("\n\t\tSELECT user.username, usergroupid, membergroupids, infractiongroupids, administrator.*\n\t\tFROM " . TABLE_PREFIX . "administrator AS administrator\n\t\tINNER JOIN " . TABLE_PREFIX . "user AS user USING(userid)\n\t\tORDER BY user.username\n\t"); while ($user = $db->fetch_array($users)) { $perms = fetch_permissions(0, $user['userid'], $user); if ($perms['adminpermissions'] & $vbulletin->bf_ugp_adminpermissions['cancontrolpanel']) { print_cells_row(array("<a href=\"user.php?" . $vbulletin->session->vars['sessionurl'] . "do=edit&u={$user['userid']}\" name=\"user{$user['userid']}\"><b>{$user['username']}</b></a>", '-', construct_link_code($vbphrase['view_control_panel_log'], "adminlog.php?" . $vbulletin->session->vars['sessionurl'] . "do=view&script=&u={$user['userid']}") . construct_link_code($vbphrase['edit_permissions'], "adminpermissions.php?" . $vbulletin->session->vars['sessionurl'] . "do=edit&u={$user['userid']}")), 0, '', 0); } } print_table_footer(); } print_cp_footer(); /*======================================================================*\ || #################################################################### || # Downloaded: 12:56, Sat Oct 11th 2008 || # CVS: $RCSfile$ - $Revision: 25308 $ || ####################################################################
print_submit_row($vbphrase['ban_user'], 0, 8); } else { print_table_footer(); } } } $db->free_result($tempusers); // now query users from the specified groups that are permanently banned $permusercount = $db->query_first("\n\t\tSELECT COUNT(*) AS count\n\t\tFROM " . TABLE_PREFIX . "user AS user\n\t\tLEFT JOIN " . TABLE_PREFIX . "userban AS userban ON(userban.userid = user.userid)\n\t\tLEFT JOIN " . TABLE_PREFIX . "user AS adminuser ON(adminuser.userid = userban.adminid)\n\t\tWHERE user.usergroupid IN(" . implode(',', array_keys($querygroups)) . ")\n\t\t\tAND (userban.liftdate = 0 OR userban.liftdate = NULL)\n\t"); if ($permusercount['count']) { $havebanned = true; $pagecount = ceil($permusercount['count'] / $perpage); $permusers = $db->query_read("\n\t\t\tSELECT user.userid, user.username, user.usergroupid AS busergroupid,\n\t\t\t\tuserban.usergroupid AS ousergroupid,\n\t\t\t\tIF(userban.displaygroupid = 0, userban.usergroupid, userban.displaygroupid) AS odisplaygroupid,\n\t\t\t\tbandate, liftdate, reason,\n\t\t\t\tadminuser.userid AS adminid, adminuser.username AS adminname\n\t\t\tFROM " . TABLE_PREFIX . "user AS user\n\t\t\tLEFT JOIN " . TABLE_PREFIX . "userban AS userban ON(userban.userid = user.userid)\n\t\t\tLEFT JOIN " . TABLE_PREFIX . "user AS adminuser ON(adminuser.userid = userban.adminid)\n\t\t\tWHERE user.usergroupid IN(" . implode(',', array_keys($querygroups)) . ")\n\t\t\t\tAND (userban.liftdate = 0 OR userban.liftdate = NULL)\n\t\t\tORDER BY user.username\n\t\t\tLIMIT {$start}, {$perpage}\n\t\t"); print_form_header('banning', 'banuser'); construct_hidden_code('period', 'PERMANENT'); print_table_header("{$vbphrase['banned_users']}: {$vbphrase['permanent_ban']} <span class=\"normal\">{$vbphrase['usergroups']}: " . implode(', ', $querygroups) . '</span>', 8); if ($pagecount > 1) { $pagenav = "<strong>{$vbphrase['go_to_page']}</strong>"; for ($thispage = 1; $thispage <= $pagecount; $thispage++) { if ($thispage == $vbulletin->GPC['pagenumber']) { $pagenav .= " <strong>[{$thispage}]</strong> "; } else { $pagenav .= " <a href=\"banning.php?{$session['sessionurl']}do=modify&page={$thispage}\" class=\"normal\">{$thispage}</a> "; } } print_description_row($pagenav, false, 8, '', 'right'); } print_cells_row($headercell, 1); while ($user = $db->fetch_array($permusers)) { print_cells_row(construct_banned_user_row($user)); }
$vbulletin->input->clean_array_gpc('p', array('settingconfirm' => TYPE_UINT, 'disablesetting' => TYPE_UINT)); if ($vbulletin->GPC['settingconfirm'] == 1) { echo '<p>'; if ($vbulletin->GPC['disablesetting'] == 1) { $db->query_write("UPDATE " . TABLE_PREFIX . "setting SET value=0 WHERE varname='timeoutcontrolpanel'"); echo $upgrade_phrases['upgrade_300b5.php']['disabled_timeout_admin']; } else { echo $upgrade_phrases['upgrade_300b5.php']['timeout_admin_not_changed']; } echo '</p>'; } else { if ($vbulletin->options['timeoutcontrolpanel'] == 1) { print_form_header('upgrade_300b5', ''); construct_hidden_code('step', $vbulletin->GPC['step']); construct_hidden_code('settingconfirm', 1); print_table_header($upgrade_phrases['upgrade_300b5.php']['change_setting_value']); print_yes_no_row($upgrade_phrases['upgrade_300b5.php']['setting_info'], 'disablesetting', 0); print_submit_row($upgrade_phrases['upgrade_300b5.php']['proceed'], ''); print_cp_footer(); } else { echo "<p>{$upgrade_phrases['upgrade_300b5.php']['no_change_needed']}</p>"; } } } // ############################################################################# // FINAL step (notice the SCRIPTCOMPLETE define) if ($vbulletin->GPC['step'] == 4) { // tell log_upgrade_step() that the script is done define('SCRIPTCOMPLETE', true); } // #############################################################################
// ######################################################################## if ($_REQUEST['do'] == 'list') { $prefixsets_sql = $db->query_read("\r\n\t\tSELECT *\r\n\t\tFROM " . TABLE_PREFIX . "prefixset\r\n\t\tORDER BY displayorder\r\n\t"); $prefixsets = array(); while ($prefixset = $db->fetch_array($prefixsets_sql)) { $prefixsets["{$prefixset['prefixsetid']}"] = $prefixset; $prefixsets["{$prefixset['prefixsetid']}"]['prefixes'] = array(); } $prefixes_sql = $db->query_read("\r\n\t\tSELECT *\r\n\t\tFROM " . TABLE_PREFIX . "prefix\r\n\t\tORDER BY displayorder\r\n\t"); while ($prefix = $db->fetch_array($prefixes_sql)) { if (isset($prefixsets["{$prefix['prefixsetid']}"])) { $prefixsets["{$prefix['prefixsetid']}"]['prefixes']["{$prefix['prefixid']}"] = $prefix; } } print_form_header('prefix', 'displayorder'); print_table_header($vbphrase['thread_prefixes'], 3); ?> <script type="text/javascript"> <!-- function selectprefixes(prefixset) { var els = YAHOO.util.Dom.getElementsByClassName(prefixset); var toggle = document.getElementById(prefixset); for (var i = 0; i < els.length; i++) { els[i].checked = toggle.checked; } }
function updatetemplate_print_error_page($template_un, $error) { global $vbulletin, $vbphrase; print_form_header('template', 'updatetemplate', 0, 1, '', '75%'); construct_hidden_code('confirmerrors', 1); construct_hidden_code('title', $vbulletin->GPC['title']); construct_hidden_code('template', $template_un); construct_hidden_code('templateid', $vbulletin->GPC['templateid']); construct_hidden_code('group', $vbulletin->GPC['group']); construct_hidden_code('searchstring', $vbulletin->GPC['searchstring']); construct_hidden_code('dostyleid', $vbulletin->GPC['dostyleid']); construct_hidden_code('product', $vbulletin->GPC['product']); construct_hidden_code('savehistory', intval($vbulletin->GPC['savehistory'])); construct_hidden_code('histcomment', $vbulletin->GPC['histcomment']); print_table_header($vbphrase['vbulletin_message']); print_description_row($error); print_submit_row($vbphrase['continue'], 0, 2, $vbphrase['go_back']); print_cp_footer(); }
reset($specific); print_form_header('', ''); if ($resultcount != 1) { print_table_header($vbphrase['action_specific_topics'], 1); } foreach ($specific as $topic) { print_description_row("<a name=\"help{$topic['adminhelpid']}\">" . $helpphrase[fetch_help_phrase_short_name($topic, '_title')] . "</a>", 0, 1, 'thead'); print_description_row($helpphrase[fetch_help_phrase_short_name($topic, '_text')]); } print_table_footer(); } if (sizeof($general)) { reset($general); print_form_header('', ''); if ($resultcount != 1) { print_table_header($vbphrase['general_topics'], 1); } foreach ($general as $topic) { print_description_row("<a name=\"help{$topic['adminhelpid']}\">" . $helpphrase[fetch_help_phrase_short_name($topic, '_title')] . "</a>", 0, 1, 'thead'); print_description_row($helpphrase[fetch_help_phrase_short_name($topic, '_text')]); } print_table_footer(); } } } print_cp_footer(); /*======================================================================*\ || #################################################################### || # Downloaded: 08:19, Wed Nov 5th 2008 || # CVS: $RCSfile$ - $Revision: 13945 $ || ####################################################################
/** * Halts execution and shows the specified message * * @param string Message to display * @param mixed If specified, a redirect will be performed to the URL in this parameter * @param integer If redirect is specified, this is the time in seconds to delay before redirect * @param string If specified, will provide a specific URL for "Go Back". If empty, no button will be displayed! * @param bool If true along with redirect, 'CONTINUE' button will be used instead of automatic redirect */ function print_cp_message($text = '', $redirect = NULL, $delay = 1, $backurl = NULL, $continue = false) { global $vbulletin, $vbphrase; if ($redirect and $vbulletin->session->vars['sessionurl']) { if (strpos($redirect, '?') === false) { $redirect .= '?'; } $redirect .= '&' . $vbulletin->session->vars['sessionurl']; } if (!defined('DONE_CPHEADER')) { print_cp_header($vbphrase['vbulletin_message']); } echo '<p> </p><p> </p>'; print_form_header('', '', 0, 1, 'messageform', '65%'); print_table_header($vbphrase['vbulletin_message']); print_description_row("<blockquote><br />{$text}<br /><br /></blockquote>"); if ($redirect and $redirect !== NULL) { // redirect to the new page if ($continue) { $continueurl = str_replace('&', '&', $redirect); print_table_footer(2, construct_button_code($vbphrase['continue'], create_full_url($continueurl))); } else { print_table_footer(); $redirect_click = create_full_url($redirect); $redirect_click = str_replace('"', '', $redirect_click); echo '<p align="center" class="smallfont">' . construct_phrase($vbphrase['if_you_are_not_automatically_redirected_click_here_x'], $redirect_click) . "</p>\n"; print_cp_redirect($redirect, $delay); } } else { // end the table and halt if ($backurl === NULL) { $backurl = 'javascript:history.back(1)'; } if (strpos($backurl, 'history.back(') !== false) { //if we are attempting to run a history.back(1), check we have a history to go back to, otherwise attempt to close the window. $back_button = ' <input type="button" id="backbutton" class="button" value="' . $vbphrase['go_back'] . '" title="" tabindex="1" onclick="if (history.length) { history.back(1); } else { self.close(); }"/> <script type="text/javascript"> <!-- if (history.length < 1 || ((is_saf || is_moz) && history.length <= 1)) // safari + gecko start at 1 { document.getElementById("backbutton").parentNode.removeChild(document.getElementById("backbutton")); } //--> </script>'; } else { if ($backurl !== '') { // regular window.location=url call $backurl = create_full_url($backurl); $backurl = str_replace(array('"', "'"), '', $backurl); $back_button = '<input type="button" class="button" value="' . $vbphrase['go_back'] . '" title="" tabindex="1" onclick="window.location=\'' . $backurl . '\';"/>'; } else { $back_button = ''; } } print_table_footer(2, $back_button); } // and now terminate the script print_cp_footer(); }
{ case 'edit': window.location = "usertitle.php?<?php echo vB::getCurrentSession()->get('sessionurl_js'); ?> do=edit&usertitleid=" + usertitleid; break; case 'kill': window.location = "usertitle.php?<?php echo vB::getCurrentSession()->get('sessionurl_js'); ?> do=remove&usertitleid=" + usertitleid; break; default: return false; break; } } </script> <?php $options = array('edit' => $vbphrase['edit'], 'kill' => $vbphrase['delete']); print_form_header('usertitle', 'add'); print_table_header($vbphrase['user_title_manager_gcpuser'], 3); print_description_row('<p>' . construct_phrase($vbphrase['it_is_recommended_that_you_update_user_titles'], vB::getCurrentSession()->get('sessionurl')) . '</p>', 0, 3); print_cells_row(array($vbphrase['user_title_guser'], $vbphrase['minimum_posts'], $vbphrase['controls']), 1); foreach ($usertitles as $usertitle) { print_cells_row(array('<b>' . $usertitle['title'] . '</b>', $usertitle['minposts'], "\n\t<select name=\"u{$usertitle['usertitleid']}\" onchange=\"js_usergroup_jump({$usertitle['usertitleid']}, this);\" class=\"bginput\">\n" . construct_select_options($options) . "\t</select>\n\t<input type=\"button\" value=\"" . $vbphrase['go'] . "\" onclick=\"js_usergroup_jump({$usertitle['usertitleid']}, this.form.u{$usertitle['usertitleid']});\" />\n\t")); } print_submit_row($vbphrase['add_new_user_title_gcpuser'], 0, 3); } print_cp_footer(); /*=========================================================================*\ || ####################################################################### || # Downloaded: 15:45, Tue Sep 8th 2015 || # CVS: $RCSfile$ - $Revision: 83432 $ || ####################################################################### \*=========================================================================*/
function print_user_search_rows($email = false) { global $vbulletin, $vbphrase, $stylevar; print_label_row($vbphrase['username'], "\n\t\t<input type=\"text\" class=\"bginput\" name=\"user[username]\" tabindex=\"1\" size=\"35\"\n\t\t/><input type=\"image\" src=\"../" . $vbulletin->options['cleargifurl'] . "\" width=\"1\" height=\"1\"\n\t\t/><input type=\"submit\" class=\"button\" value=\"{$vbphrase['exact_match']}\" tabindex=\"1\" name=\"user[exact]\" />\n\t", '', 'top', 'user[username]'); if ($email) { global $iusergroupcache; $userarray = array('usergroupid' => 0, 'membergroupids' => ''); $iusergroupcache = array(); $usergroups = $vbulletin->db->query_read("SELECT usergroupid, title, (forumpermissions & " . $vbulletin->bf_ugp_forumpermissions['canview'] . ") AS CANVIEW FROM " . TABLE_PREFIX . "usergroup ORDER BY title"); while ($usergroup = $vbulletin->db->fetch_array($usergroups)) { if ($usergroup['CANVIEW']) { $userarray['membergroupids'] .= "{$usergroup['usergroupid']},"; } $iusergroupcache["{$usergroup['usergroupid']}"] = $usergroup['title']; } unset($usergroup); $vbulletin->db->free_result($usergroups); print_checkbox_row($vbphrase['all_usergroups'], 'usergroup_all', 0, -1, $vbphrase['all_usergroups'], 'check_all_usergroups(this.form, this.checked);'); print_membergroup_row($vbphrase['primary_usergroup'], 'user[usergroupid]', 2, $userarray); print_membergroup_row($vbphrase['additional_usergroups'], 'user[membergroup]', 2); print_yes_no_row($vbphrase['include_users_that_have_declined_email'], 'user[adminemail]', 0); } else { print_chooser_row($vbphrase['primary_usergroup'], 'user[usergroupid]', 'usergroup', -1, '-- ' . $vbphrase['all_usergroups'] . ' --'); print_membergroup_row($vbphrase['additional_usergroups'], 'user[membergroup]', 2); } print_description_row('<div align="' . $stylevar['right'] . '"><input type="submit" class="button" value=" ' . iif($email, $vbphrase['submit'], $vbphrase['find']) . ' " tabindex="1" /></div>'); print_input_row($vbphrase['email'], 'user[email]'); print_input_row($vbphrase['parent_email_address'], 'user[parentemail]'); print_yes_no_other_row($vbphrase['coppa_user'], 'user[coppauser]', $vbphrase['either'], -1); print_input_row($vbphrase['home_page'], 'user[homepage]'); print_input_row($vbphrase['icq_uin'], 'user[icq]'); print_input_row($vbphrase['aim_screen_name'], 'user[aim]'); print_input_row($vbphrase['yahoo_id'], 'user[yahoo]'); print_input_row($vbphrase['msn_id'], 'user[msn]'); print_input_row($vbphrase['skype_name'], 'user[skype]'); print_input_row($vbphrase['signature'], 'user[signature]'); print_input_row($vbphrase['user_title'], 'user[usertitle]'); print_input_row($vbphrase['join_date_is_after'] . '<dfn>(yyyy-mm-dd)</dfn>', 'user[joindateafter]'); print_input_row($vbphrase['join_date_is_before'] . '<dfn>(yyyy-mm-dd)</dfn>', 'user[joindatebefore]'); print_input_row($vbphrase['last_activity_is_after'] . '<dfn>(yyyy-mm-dd hh:mm:ss)</dfn>', 'user[lastactivityafter]'); print_input_row($vbphrase['last_activity_is_before'] . '<dfn>(yyyy-mm-dd hh:mm:ss)</dfn>', 'user[lastactivitybefore]'); print_input_row($vbphrase['last_post_is_after'] . '<dfn>(yyyy-mm-dd hh:mm:ss)</dfn>', 'user[lastpostafter]'); print_input_row($vbphrase['last_post_is_before'] . '<dfn>(yyyy-mm-dd hh:mm:ss)</dfn>', 'user[lastpostbefore]'); print_input_row($vbphrase['birthday_is_after'] . '<dfn>(yyyy-mm-dd)</dfn>', 'user[birthdayafter]'); print_input_row($vbphrase['birthday_is_before'] . '<dfn>(yyyy-mm-dd)</dfn>', 'user[birthdaybefore]'); print_input_row($vbphrase['posts_are_greater_than'], 'user[postslower]', '', 1, 7); print_input_row($vbphrase['posts_are_less_than'], 'user[postsupper]', '', 1, 7); print_input_row($vbphrase['reputation_is_greater_than'], 'user[reputationlower]', '', 1, 7); print_input_row($vbphrase['reputation_is_less_than'], 'user[reputationupper]', '', 1, 7); print_input_row($vbphrase['warnings_are_greater_than'], 'user[warningslower]', '', 1, 7); print_input_row($vbphrase['warnings_are_less_than'], 'user[warningsupper]', '', 1, 7); print_input_row($vbphrase['infractions_are_greater_than'], 'user[infractionslower]', '', 1, 7); print_input_row($vbphrase['infractions_are_less_than'], 'user[infractionsupper]', '', 1, 7); print_input_row($vbphrase['infraction_points_are_greater_than'], 'user[pointslower]', '', 1, 7); print_input_row($vbphrase['infraction_points_are_less_than'], 'user[pointsupper]', '', 1, 7); print_input_row($vbphrase['userid_is_greater_than'], 'user[useridlower]', '', 1, 7); print_input_row($vbphrase['userid_is_less_than'], 'user[useridupper]', '', 1, 7); print_input_row($vbphrase['registration_ip_address'], 'user[ipaddress]'); print_description_row('<div align="' . $stylevar['right'] . '"><input type="submit" class="button" value=" ' . iif($email, $vbphrase['submit'], $vbphrase['find']) . ' " tabindex="1" /></div>'); $forms = array(0 => $vbphrase['edit_your_details'], 1 => "{$vbphrase['options']}: {$vbphrase['log_in']} / {$vbphrase['privacy']}", 2 => "{$vbphrase['options']}: {$vbphrase['messaging']} / {$vbphrase['notification']}", 3 => "{$vbphrase['options']}: {$vbphrase['thread_viewing']}", 4 => "{$vbphrase['options']}: {$vbphrase['date']} / {$vbphrase['time']}", 5 => "{$vbphrase['options']}: {$vbphrase['other']}"); $currentform = -1; print_table_header($vbphrase['user_profile_fields']); $profilefields = $vbulletin->db->query_read("\n\t\tSELECT *\n\t\tFROM " . TABLE_PREFIX . "profilefield AS profilefield\n\t\tLEFT JOIN " . TABLE_PREFIX . "profilefieldcategory AS profilefieldcategory ON\n\t\t\t(profilefield.profilefieldcategoryid = profilefieldcategory.profilefieldcategoryid)\n\t\tORDER BY profilefield.form, profilefieldcategory.displayorder, profilefield.displayorder\n\t"); while ($profilefield = $vbulletin->db->fetch_array($profilefields)) { if ($profilefield['form'] != $currentform) { print_description_row(construct_phrase($vbphrase['fields_from_form_x'], $forms["{$profilefield['form']}"]), false, 2, 'optiontitle'); $currentform = $profilefield['form']; } $profilefield['def'] = 0; print_profilefield_row('profile', $profilefield); } print_description_row('<div align="' . $stylevar['right'] . '"><input type="submit" class="button" value=" ' . iif($email, $vbphrase['submit'], $vbphrase['find']) . ' " tabindex="1" /></div>'); }
userban.usergroupid AS ousergroupid, IF(userban.displaygroupid = 0, userban.usergroupid, userban.displaygroupid) AS odisplaygroupid, bandate, liftdate, reason, adminuser.userid AS adminid, adminuser.username AS adminname FROM " . TABLE_PREFIX . "user AS user LEFT JOIN " . TABLE_PREFIX . "userban AS userban ON(userban.userid = user.userid) LEFT JOIN " . TABLE_PREFIX . "user AS adminuser ON(adminuser.userid = userban.adminid) WHERE user.usergroupid IN(" . implode(',', array_keys($querygroups)) . ") AND (userban.liftdate = 0 OR userban.liftdate = NULL) ORDER BY user.username LIMIT $start, $perpage "); print_form_header('banning', 'banuser'); construct_hidden_code('period', 'PERMANENT'); print_table_header("$vbphrase[banned_users]: $vbphrase[permanent_ban] <span class=\"normal\">$vbphrase[usergroups]: " . implode(', ', $querygroups) . '</span>', 8); if ($pagecount > 1) { $pagenav = "<strong>$vbphrase[go_to_page]</strong>"; for ($thispage = 1; $thispage <= $pagecount; $thispage++) { if ($thispage == $vbulletin->GPC['pagenumber']) { $pagenav .= " <strong>[$thispage]</strong> "; } else { $pagenav .= " <a href=\"banning.php?$session[sessionurl]do=modify&page=$thispage\" class=\"normal\">$thispage</a> "; } }
/* border: dashed 1px navy; */ } div .ad:hover, div .ad_selected { color: black; /* background-color: #E1E4F2; */ background-color: gold; border: 2px dashed navy; margin: -2px 0 0 -2px; } </style> <?php echo '<script type="text/javascript" src="../clientscript/vbulletin_cpadlocator.js?v=' . SIMPLE_VERSION . '"></script>'; print_table_start(); print_table_header($vbphrase['ad_selector']); echo '<tr><td colspan="2" class="alt1" align="center"> <label for="languagegroup"><strong>' . $vbphrase['page'] . ':</strong></label> <select name="languagegroup" id="languagegroup" tabindex="1" class="bginput" title="name="languagegroup"">'; foreach ($location_options as $key => $name) { echo '<option value="' . $key . '"' . ($selected_group == $key ? 'selected="selected"' : '') . '>' . $name . "</option>\r\n"; } echo '</select> <tr><td colspan="2" class="alt1" align="center">'; foreach ($locgroups as $locgroup) { $display = $selected_group == $locgroup['key'] ? '' : 'none'; $do = $vbulletin->GPC['editloc'] ? 'edit' : 'add'; ?> <div id="group_<?php echo $locgroup['key']; ?> " style="display:<?php
$db->query_write("\n\t\t\tUPDATE " . TABLE_PREFIX . "setting\n\t\t\tSET value = " . $_languageid . "\n\t\t\tWHERE varname = 'languageid'\n\t\t"); $db->query_write("\n\t\t\tUPDATE " . TABLE_PREFIX . "user\n\t\t\tSET languageid = 0\n\t\t"); build_options(); build_language($_languageid); build_language_datastore(); define('SCRIPT_REDIRECT', true); } else { $sellanguages = array(); while ($language = $db->fetch_array($languages)) { $sellanguages[$language['languageid']] = $language['title']; } $languageids = implode(',', array_keys($sellanguages)); $db->query_write("\n\t\t\tUPDATE " . TABLE_PREFIX . "user\n\t\t\tSET languageid = 0\n\t\t\tWHERE languageid NOT IN ({$languageids})\n\t\t"); if (empty($vbulletin->GPC['languageid'])) { print_form_header('tools', 'language'); print_table_header('Select the new default language'); print_select_row('Language', 'languageid', $sellanguages, $vbulletin->options['languageid']); print_submit_row('Submit', ''); } else { $db->query_write("\n\t\t\t\tUPDATE " . TABLE_PREFIX . "setting\n\t\t\t\tSET value = " . $vbulletin->GPC['languageid'] . "\n\t\t\t\tWHERE varname = 'languageid'\n\t\t\t"); build_options(); build_language($vbulletin->GPC['languageid']); build_language_datastore(); define('SCRIPT_REDIRECT', true); } } } } } if (defined('SCRIPT_REDIRECT')) { echo '<p align="center" class="smallfont"><a href="tools.php" onclick="javascript:clearTimeout(timerID);">' . $vbphrase['processing_complete_proceed'] . '</a></p>';
/** * Prints a block of controls for editing a CSS item on css.php?do=edit * * @param string Item title * @param string Item description * @param array Item info array * @param boolean Print links edit section * @param boolean Print table break */ function print_css_row($title, $description, $item, $dolinks = false, $restarttable = true) { global $bgcounter, $css, $css_info, $color, $vbphrase, $stylevar, $vbulletin; static $item_js; ++$item_js; $color = fetch_inherited_color($css_info["{$item}"], $vbulletin->GPC['dostyleid']); $title = htmlspecialchars_uni($title); switch ($css_info["{$item}"]) { case -1: $tblhead_title = $title; $revertlink = ''; $revertctrl = ''; break; case $vbulletin->GPC['dostyleid']: $tblhead_title = "{$title} <span class=\"normal\">(" . $vbphrase['customized_in_this_style'] . ")</span>"; $revertlink = 'title=' . urlencode($title) . '&item=' . urlencode($item); $revertctrl = "<label for=\"rvcss_{$item}\">{$vbphrase['revert_this_group_of_settings']}<input type=\"checkbox\" id=\"rvcss_{$item}\" name=\"delete[css][{$item}]\" value=\"1\" tabindex=\"1\" title=\"{$vbphrase['revert']}\" /></label>"; break; default: $tblhead_title = "{$title} <span class=\"normal\">(" . construct_phrase($vbphrase['customized_in_a_parent_style_x'], $css_info["{$item}"]) . ")</span>"; $revertlink = 'title=' . urlencode($title) . '&item=' . urlencode($item); $revertctrl = ''; break; } echo "\n\n<!-- START {$title} CSS -->\n\n"; print_column_style_code(array('width: 50%', 'width: 50%')); print_table_header($tblhead_title, 2); print_label_row("\n\t<fieldset title=\"{$vbphrase['standard_css']}\">\n\t\t<legend>{$vbphrase['standard_css']}</legend>\n\t\t<table cellpadding=\"0\" cellspacing=\"2\" border=\"0\" width=\"100%\">\n\t\t<col width=\"50%\"></col>\n" . construct_css_input_row($vbphrase['background'], "['{$item}']['background']", $color, true) . construct_css_input_row($vbphrase['font_color'], "['{$item}']['color']", $color, true) . construct_css_input_row($vbphrase['font_style'], "['{$item}']['font']['style']", $color) . construct_css_input_row($vbphrase['font_size'], "['{$item}']['font']['size']", $color) . construct_css_input_row($vbphrase['font_family'], "['{$item}']['font']['family']", $color) . construct_text_align_code($vbphrase['alignment'], "['{$item}']['text-align']", $color) . "\n\t\t</table>\n\t\t</fieldset>\n\t", "\n\t\t<fieldset id=\"extra_a_{$item_js}\" title=\"{$vbphrase['extra_css']}\">\n\t\t<legend>{$vbphrase['extra_css']}</legend>\n\t\t<div align=\"center\" style=\"padding: 2px\">\n\t\t<textarea name=\"css[{$item}][EXTRA]\" rows=\"4\" cols=\"50\" class=\"{$color}\" style=\"padding: 2px; width: 90%\" tabindex=\"1\" dir=\"ltr\">" . htmlspecialchars_uni($css["{$item}"]['EXTRA']) . "</textarea>\n\t\t</div>\n\t\t</fieldset>\n\t\t" . iif($description != '', "<fieldset id=\"desc_a_{$item_js}\" title=\"{$vbphrase['description']}\" style=\"margin-bottom:4px;\">\n\t\t<legend>{$vbphrase['description']}</legend>\n\t\t<div class=\"smallfont\" style=\"margin:4px 4px 0px 4px\">\n\t\t\t<img src=\"../cpstyles/" . $vbulletin->options['cpstylefolder'] . "/cp_help.gif\" alt=\"{$title}\" align=\"{$stylevar['right']}\" style=\"padding:0px 0px 0px 2px\" />\n\t\t\t{$description}\n\t\t</div>\n\t\t</fieldset>") . "\n", 'alt2'); if (is_browser('mozilla')) { echo "<script type=\"text/javascript\">reflow_fieldset('a_{$item_js}', true);</script>\n"; } if ($dolinks) { print_description_row(' <table cellpadding="4" cellspacing="0" border="0" width="100%"> <tr> ' . construct_link_css_input_row($vbphrase['normal_link'], $item, 'N', $color) . ' ' . construct_link_css_input_row($vbphrase['visited_link'], $item, 'V', $color) . ' ' . construct_link_css_input_row($vbphrase['hover_link'], $item, 'M', $color) . ' </tr> </table> ', 0, 2, 'alt2" style="padding: 0px'); } if ($revertctrl != '') { print_description_row('<div class="smallfont" style="text-align: center">' . $revertctrl . '</div>', 0, 2, 'thead'); } print_description_row("\n\t\t<div class=\"alt1\" style=\"border:inset 1px; padding:2px 10px 2px 10px; float:{$stylevar['left']}\">" . construct_phrase($vbphrase['css_selector_x'], "<code>{$item}</code>") . "</div>\n\t\t<!--" . iif($revertlink != '', "<input type=\"button\" class=\"button\" style=\"font-weight:normal\" value=\"{$vbphrase['show_default']}\" tabindex=\"1\" onclick=\"js_show_default_item('{$revertlink}', {$dolinks});\" />") . "-->\n\t\t<input type=\"submit\" class=\"button\" style=\"font-weight:normal\" value=\" " . $vbphrase['save_css'] . " \" tabindex=\"1\" />\n\t", 0, 2, 'tfoot" align="right'); echo "\n\n<!-- END {$title} CSS -->\n\n"; if ($restarttable) { print_table_break(' '); } }
if ($changes) { build_bookmarksite_datastore(); } $_REQUEST['do'] = 'modify'; } // ######################################################################## // we want to display the bookmark list - this is the default action if ($_REQUEST['do'] == 'modify') { if (!$vbulletin->options['socialbookmarks']) { print_table_start(); print_description_row(fetch_error('social_bookmarks_disabled')); print_table_footer(2, '', '', false); } // display the form and table header print_form_header('bookmarksite', 'quickupdate'); print_table_header($vbphrase['social_bookmarking_manager'], 3); $bookmarksites_result = $db->query_read("\n\t\tSELECT * FROM " . TABLE_PREFIX . "bookmarksite AS bookmarksite\n\t\tORDER BY displayorder, title\n\t"); $bookmarksite_count = $db->num_rows($bookmarksites_result); if ($bookmarksite_count) { print_description_row('<label><input type="checkbox" id="allbox" checked="checked" />' . $vbphrase['toggle_active_status_for_all'] . '</label><input type="image" src="../' . $vbulletin->options['cleargifurl'] . '" name="normalsubmit" />', false, 3, 'thead" style="font-weight:normal; padding:0px 4px 0px 4px'); print_column_style_code(array('width:20%; white-space:nowrap', 'width:60%', "width:20%; white-space:nowrap; text-align:{$stylevar['right']}")); while ($bookmarksite = $db->fetch_array($bookmarksites_result)) { print_cells_row(array('<label class="smallfont"><input type="checkbox" name="active[' . $bookmarksite['bookmarksiteid'] . ']" value="1"' . ($bookmarksite['active'] ? ' checked="checked"' : '') . ' />' . $vbphrase['active'] . '</label> ' . '<input type="image" src="../cpstyles/' . $vbulletin->options['cpstylefolder'] . '/move_down.gif" name="displayorderswap[' . $bookmarksite['bookmarksiteid'] . ',higher]" />' . '<input type="text" name="displayorder[' . $bookmarksite['bookmarksiteid'] . ']" value="' . $bookmarksite['displayorder'] . '" class="bginput" size="4" title="' . $vbphrase['display_order'] . '" style="text-align:' . $stylevar['right'] . '" />' . '<input type="image" src="../cpstyles/' . $vbulletin->options['cpstylefolder'] . '/move_up.gif" name="displayorderswap[' . $bookmarksite['bookmarksiteid'] . ',lower]" />', '<a href="bookmarksite.php?' . $vbulletin->session->vars['sessionurl'] . 'do=edit&bookmarksiteid=' . $bookmarksite['bookmarksiteid'] . '" title="' . $vbphrase['edit'] . '">' . $bookmarksite['title'] . '</a>', construct_link_code($vbphrase['edit'], 'bookmarksite.php?' . $vbulletin->session->vars['sessionurl'] . 'do=edit&bookmarksiteid=' . $bookmarksite['bookmarksiteid']) . construct_link_code($vbphrase['delete'], 'bookmarksite.php?' . $vbulletin->session->vars['sessionurl'] . 'do=delete&bookmarksiteid=' . $bookmarksite['bookmarksiteid'])), false, '', -1); } $db->free_result($bookmarksites_result); } echo '<tr> <td class="tfoot">' . ($bookmarksite_count ? '<input type="submit" class="button" accesskey="s" value="' . $vbphrase['save'] . '" /> <input type="reset" class="button" accesskey="r" value="' . $vbphrase['reset'] . '" />' : ' ') . '</td> <td class="tfoot" align="' . $stylevar['right'] . '" colspan="2"><input type="button" class="button" value="' . $vbphrase['add_new_social_bookmarking_site'] . '" onclick="window.location=\'bookmarksite.php?' . $vbulletin->session->vars['sessionurl'] . 'do=add\';" /></td> </tr>'; print_table_footer();
$vbulletin->GPC['rgb'] = preg_split('#\\s*,\\s*#si', $vbulletin->GPC['rgb'], -1, PREG_SPLIT_NO_EMPTY); $vbulletin->GPC['hex'] = '#'; foreach ($vbulletin->GPC['rgb'] as $i => $value) { $vbulletin->GPC['hex'] .= strtoupper(str_pad(dechex($value), 2, '0', STR_PAD_LEFT)); } $vbulletin->GPC['rgb'] = implode(',', $vbulletin->GPC['rgb']); } else { if ($vbulletin->GPC['hexdec']) { if (preg_match('/#?([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/siU', $vbulletin->GPC['hex'], $matches)) { $vbulletin->GPC['rgb'] = array(); for ($i = 1; $i <= 3; $i++) { $vbulletin->GPC['rgb'][] = hexdec($matches["{$i}"]); } $vbulletin->GPC['rgb'] = implode(',', $vbulletin->GPC['rgb']); $vbulletin->GPC['hex'] = strtoupper("#{$matches['1']}{$matches['2']}{$matches['3']}"); } } } print_form_header('template', 'colorconverter'); print_table_header('Color Converter'); print_label_row('Hexadecimal Color (#xxyyzz)', "<span style=\"padding:4px; background-color:" . $vbulletin->GPC['hex'] . "\"><input type=\"text\" class=\"bginput\" name=\"hex\" value=\"" . $vbulletin->GPC['hex'] . "\" size=\"20\" maxlength=\"7\" /> <input type=\"submit\" class=\"button\" name=\"hexdec\" value=\"Hex » RGB\" /></span>"); print_label_row('RGB Color (r,g,b)', "<span style=\"padding:4px; background-color:rgb(" . $vbulletin->GPC['rgb'] . ")\"><input type=\"text\" class=\"bginput\" name=\"rgb\" value=\"" . $vbulletin->GPC['rgb'] . "\" size=\"20\" maxlength=\"11\" /> <input type=\"submit\" class=\"button\" name=\"dechex\" value=\"RGB » Hex\" /></span>"); print_table_footer(); } print_cp_footer(); /*======================================================================*\ || #################################################################### || # Downloaded: 22:41, Fri Oct 10th 2008 || # CVS: $RCSfile$ - $Revision: 27113 $ || #################################################################### \*======================================================================*/