function construct_user_ip_table($userid, $previpaddress, $depth = 2)
{
    global $vbulletin, $vbphrase;
    if (VB_AREA == 'AdminCP') {
        $userscript = 'usertools.php';
    } else {
        $userscript = 'user.php';
    }
    $depth--;
    $ips = vB_Api::instanceInternal('user')->searchIP($userid, $depth);
    $retdata = '';
    // @TODO user api currently returns only 1 IP per user.
    $result = array('ipaddress' => $ips['regip']);
    foreach ($result as $ip) {
        $retdata .= '<li>' . "<a href=\"{$userscript}?" . vB::getCurrentSession()->get('sessionurl') . "do=gethost&amp;ip={$ip['ipaddress']}\" title=\"" . $vbphrase['resolve_address'] . "\">{$ip['ipaddress']}</a> &nbsp; " . construct_link_code($vbphrase['find_more_users_with_this_ip_address'], "{$userscript}?" . vB::getCurrentSession()->get('sessionurl') . "do=doips&amp;ipaddress={$ip['ipaddress']}&amp;hash=" . CP_SESSIONHASH) . "</li>\n";
        if ($depth > 0) {
            $retdata .= construct_ip_usage_table($ip['ipaddress'], $userid, $depth);
        }
    }
    if (empty($retdata)) {
        return '';
    } else {
        return '<ul>' . $retdata . '</ul>';
    }
}
Ejemplo n.º 2
0
 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&amp;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&amp;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();
 }
Ejemplo n.º 3
0
    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&amp;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&amp;dostyleid=" . $vbulletin->GPC['dostyleid'] . "&amp;stylevarid=" . $this->stylevarid . "&amp;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();
    }
Ejemplo n.º 4
0
    print_table_break();
    print_table_header('MySQL');
    print_column_style_code(array('width:30%'));
    print_label_row(construct_link_code('Run Query', THIS_SCRIPT . '?do=mysql&amp;type=query'), 'This allows you to run alter and update queries on the database');
    print_label_row(construct_link_code('Repair Tables', THIS_SCRIPT . '?do=mysql&amp;type=repair'), 'You can select tables that need repaired here');
    print_label_row(construct_link_code('Reset Admin Access', THIS_SCRIPT . '?do=user&amp;type=access'), 'Reset admin access for a user');
    print_table_break();
    $randnumb = vbrand(0, 100000000);
    print_table_header('Other Tools');
    print_column_style_code(array('width:30%'));
    print_label_row(construct_link_code($vbulletin->options['bbactive'] ? 'Turn Off Forum' : 'Turn On Forum', THIS_SCRIPT . '?do=bbactive'), 'Your forum is <b>' . ($vbulletin->options['bbactive'] ? 'On' : 'Off') . '</b>');
    $childcount = $db->query_first("\n\t\tSELECT COUNT(*) AS count\n\t\tFROM " . TABLE_PREFIX . "forum\n\t\tWHERE childlist = ''\n\t");
    if ($childcount['count']) {
        print_label_row(construct_link_code('Rebuild', THIS_SCRIPT . '?do=childlist'), 'You have forum with empty childlists, which is not good.');
    }
    print_label_row(construct_link_code('Default Language', THIS_SCRIPT . '?do=language'), 'Reset board default language.');
    print_table_break();
    print_table_header('Time');
    print_column_style_code(array('width:30%'));
    print_label_row('System Time', $systemdate = date('r T'));
    print_label_row('Your Time', $userdate = vbdate('r T'));
    print_table_footer();
} else {
    if ($_REQUEST['do'] == 'xml') {
        switch ($vbulletin->GPC['type']) {
            case 'style':
                require_once './includes/adminfunctions_template.php';
                if (!($xml = file_read('./install/vbulletin-style.xml'))) {
                    echo '<p>Uh oh, ./install/vbulletin-style.xml doesn\'t appear to exist! Upload it and refresh the page.</p>';
                    break;
                }
Ejemplo n.º 5
0
    $db->query_write("\n\t\tDELETE FROM " . TABLE_PREFIX . "reputation\n\t\tWHERE reputationid = " . $vbulletin->GPC['reputationid']);
    define('CP_REDIRECT', "adminreputation.php?do=list&amp;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
|| # CVS: $RCSfile$ - $Revision: 40911 $
|| ####################################################################
\*======================================================================*/
Ejemplo n.º 6
0
        }
        $options['productexport'] = $vbphrase['export'];
        $options['productdelete'] = $vbphrase['uninstall'];
        $safeid = preg_replace('#[^a-z0-9_]#', '', $product['productid']);
        if (file_exists(DIR . '/includes/version_' . $safeid . '.php')) {
            include_once DIR . '/includes/version_' . $safeid . '.php';
        }
        $define_name = 'FILE_VERSION_' . strtoupper($safeid);
        if (defined($define_name) and constant($define_name) !== '') {
            $product['version'] = constant($define_name);
        }
        $i++;
        print_cells_row(array($title, htmlspecialchars_uni($product['version']), htmlspecialchars_uni($product['description']), "<div align=\"" . vB_Template_Runtime::fetchStyleVar('right') . "\">\r\n\t\t\t\t<select name=\"s{$product['productid']}\" id=\"prodsel{$i}\" onchange=\"js_page_jump({$i}, '{$product['productid']}')\" class=\"bginput\">\r\n\t\t\t\t\t" . construct_select_options($options) . "\r\n\t\t\t\t</select>&nbsp;<input type=\"button\" class=\"button\" value=\"" . $vbphrase['go'] . "\" onclick=\"js_page_jump({$i}, '{$product['productid']}');\" />\r\n\t\t\t</div>"), false, '', -2);
    }
    print_table_footer();
    echo '<p align="center">' . construct_link_code($vbphrase['add_import_product'], "plugin.php?" . $vbulletin->session->vars['sessionurl'] . "do=productadd") . '</p>';
}
// #############################################################################
if ($_REQUEST['do'] == 'productversioncheck') {
    $vbulletin->input->clean_array_gpc('r', array('productid' => TYPE_STR));
    $product = $db->query_first("\r\n\t\tSELECT *\r\n\t\tFROM " . TABLE_PREFIX . "product\r\n\t\tWHERE productid = '" . $db->escape_string($vbulletin->GPC['productid']) . "'\r\n\t");
    if (!$product or empty($product['versioncheckurl'])) {
        print_stop_message('invalid_product_specified');
    }
    $version_url = @parse_url($product['versioncheckurl']);
    if (!$version_url) {
        print_stop_message('invalid_version_check_url_specified');
    }
    if (!$version_url['port']) {
        $version_url['port'] = 80;
    }
Ejemplo n.º 7
0
                if ($forum['lastactivity'] >= $unixtoday - 86400) {
                    $onlinecolor = 'modyesterday';
                } else {
                    if ($forum['lastactivity'] >= $unixtoday - 864000) {
                        $onlinecolor = 'modlasttendays';
                    } else {
                        if ($forum['lastactivity'] >= $unixtoday - 2592000) {
                            $onlinecolor = 'modsincetendays';
                        } else {
                            $onlinecolor = 'modsincethirtydays';
                        }
                    }
                }
            }
            $lastonline = vbdate($vbulletin->options['dateformat'] . ' ' . $vbulletin->options['timeformat'], $forum['lastactivity']);
            echo "\t\t\t<li><a href=\"user.php?" . $vbulletin->session->vars['sessionurl'] . "do=edit&amp;u={$forum['userid']}\" target=\"_blank\">{$forum['username']}</a>" . "\t\t\t\t<span class=\"smallfont\">(" . construct_link_code($vbphrase['edit'], "moderator.php?" . $vbulletin->session->vars['sessionurl'] . "do=edit&moderatorid={$forum['moderatorid']}&amp;redir=showmods") . construct_link_code($vbphrase['remove'], "moderator.php?" . $vbulletin->session->vars['sessionurl'] . "do=remove&moderatorid={$forum['moderatorid']}&redir=showmods") . ")" . " - " . $vbphrase['last_online'] . " <span class=\"{$onlinecolor}\">" . $lastonline . "</span></span>\n" . "\t\t\t</li><br />\n";
        }
        echo "\t\t</ul>\n\t\t</ul>\n\t</li>\n\t</ul>\n";
    } else {
        echo $vbphrase['there_are_no_moderators'];
    }
    echo "</div>\n";
    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') {
Ejemplo n.º 8
0
    echo $vbphrase['search_in_templates'];
    ?>
" onclick="window.location='template.php?<?php 
    echo $vbulletin->session->vars['sessionurl_js'];
    ?>
do=search';" />
	</td>
</tr>
</table>
</div>
</div>
</form>
<?php 
    echo '<p align="center" class="smallfont">' . construct_link_code($vbphrase['add_new_style'], "template.php?" . $vbulletin->session->vars['sessionurl'] . "do=addstyle");
    if ($vbulletin->debug) {
        echo construct_link_code($vbphrase['rebuild_all_styles'], "template.php?" . $vbulletin->session->vars['sessionurl'] . "do=rebuild&amp;goto=template.php?" . $vbulletin->session->vars['sessionurl']);
    }
    echo "</p>\n";
    // search only
    /*
    print_form_header('template', 'modify');
    print_table_header($vbphrase['search_templates']);
    construct_hidden_code('searchset', -1);
    construct_hidden_code('titlesonly', 0);
    print_input_row($vbphrase['search_for_text'], 'searchstring', $vbulletin->GPC['searchstring']);
    print_description_row('<input type="button" value="Submit with GET" onclick="window.location = (\'template.php?do=modify&amp;searchset=-1&amp;searchstring=\' + this.form.searchstring.value)" />');
    print_submit_row($vbphrase['find']);
    */
}
// #############################################################################
// rebuilds all parent lists and id cache lists
Ejemplo n.º 9
0
Archivo: ad.php Proyecto: Kheros/MMOver
        }
    }
    $_REQUEST['do'] = 'modify';
}
// #############################################################################
// list existing ads
if ($_REQUEST['do'] == 'modify') {
    print_form_header('ad', 'quickupdate');
    print_column_style_code(array('width:100%', 'white-space:nowrap'));
    print_table_header($vbphrase['ad_manager']);
    $ad_result = $db->query("SELECT * FROM " . TABLE_PREFIX . "ad ORDER BY displayorder, title");
    $ad_count = $db->num_rows($ad_result);
    if ($ad_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, 2, 'thead" style="font-weight:normal; padding:0px 4px 0px 4px');
        while ($ad = $db->fetch_array($ad_result)) {
            print_label_row('<a href="ad.php?' . $vbulletin->session->vars['sessionurl'] . 'do=locate&amp;editloc=1&amp;ad_location=' . $ad['adlocation'] . '&amp;adid=' . $ad['adid'] . '" title="' . $vbphrase['edit_ad'] . '">' . $ad['title'] . '</a>', '<div style="white-space:nowrap">' . '<label class="smallfont"><input type="checkbox" name="active[' . $ad['adid'] . ']" value="1"' . ($ad['active'] ? ' checked="checked"' : '') . ' />' . $vbphrase['active'] . '</label> ' . '<input type="image" src="../cpstyles/' . $vbulletin->options['cpstylefolder'] . '/move_down.gif" name="displayorderswap[' . $ad['adid'] . ',higher]" />' . '<input type="text" name="displayorder[' . $ad['adid'] . ']" value="' . $ad['displayorder'] . '" class="bginput" size="4" title="' . $vbphrase['display_order'] . '" style="text-align:' . vB_Template_Runtime::fetchStyleVar('right') . '" />' . '<input type="image" src="../cpstyles/' . $vbulletin->options['cpstylefolder'] . '/move_up.gif" name="displayorderswap[' . $ad['adid'] . ',lower]" />' . construct_link_code($vbphrase['edit'], 'ad.php?' . $vbulletin->session->vars['sessionurl'] . 'do=locate&amp;editloc=1&amp;ad_location=' . $ad['adlocation'] . '&amp;adid=' . $ad['adid']) . construct_link_code($vbphrase['delete'], 'ad.php?' . $vbulletin->session->vars['sessionurl'] . 'do=delete&amp;adid=' . $ad['adid']) . '</div>');
        }
    }
    print_label_row('<input type="button" class="button" value="' . $vbphrase['add_new_ad'] . '" onclick="window.location=\'ad.php?' . $vbulletin->session->vars['sessionurl'] . 'do=locate\';" />', $ad_count ? '<div align="' . vB_Template_Runtime::fetchStyleVar('right') . '"><input type="submit" class="button" accesskey="s" value="' . $vbphrase['save'] . '" /> <input type="reset" class="button" accesskey="r" value="' . $vbphrase['reset'] . '" /></div>' : '&nbsp;', 'tfoot');
    print_table_footer();
    ?>
	<script type="text/javascript">
	<!--
	function toggle_all_active(e)
	{
		for (var i = 0; i < this.form.elements.length; i++)
		{
			if (this.form.elements[i].type == "checkbox" && this.form.elements[i].name.substr(0, 6) == "active")
			{
				this.form.elements[i].checked = this.checked;
			}
Ejemplo n.º 10
0
 function print_usergroup_row($usergroup, $options)
 {
     global $usergroupleaders, $vbphrase, $promotions, $vbulletin;
     if ($promotions["{$usergroup['usergroupid']}"]) {
         $options['promote'] .= " ({$promotions[$usergroup[usergroupid]]})";
     }
     $cell = array();
     $cell[] = "<b>{$usergroup['title']}" . iif($usergroup['canoverride'], '*') . "</b>" . iif($usergroup['ispublicgroup'], '<br /><span class="smallfont">' . $usergroup['description'] . '</span>');
     $cell[] = iif($usergroup['count'], vb_number_format($usergroup['count']), '-');
     $cell[] = iif($usergroup['secondarycount'], vb_number_format($usergroup['secondarycount']), '-');
     if ($usergroup['ispublicgroup']) {
         $cell[] = iif($usergroup['requests'], vb_number_format($usergroup['requests']), '0');
     }
     if ($usergroup['ispublicgroup']) {
         $cell_out = '<span class="smallfont">';
         if (is_array($usergroupleaders["{$usergroup['usergroupid']}"])) {
             foreach ($usergroupleaders["{$usergroup['usergroupid']}"] as $usergroupleader) {
                 $cell_out .= "<a href=\"user.php?" . $vbulletin->session->vars['sessionurl'] . "do=edit&amp;u={$usergroupleader['userid']}\"><b>{$usergroupleader['username']}</b></a>" . construct_link_code($vbphrase['delete'], "usergroup.php?" . $vbulletin->session->vars['sessionurl'] . "do=removeleader&amp;usergroupleaderid={$usergroupleader['usergroupleaderid']}") . '<br />';
             }
         }
         $cell[] = $cell_out . '</span>';
     }
     $options['edit'] .= " (id: {$usergroup['usergroupid']})";
     $cell[] = "\n\t<select name=\"u{$usergroup['usergroupid']}\" onchange=\"js_usergroup_jump({$usergroup['usergroupid']});\" class=\"bginput\">\n" . construct_select_options($options) . "\t</select><input type=\"button\" class=\"button\" value=\"" . $vbphrase['go'] . "\" onclick=\"js_usergroup_jump({$usergroup['usergroupid']});\" />\n\t";
     print_cells_row($cell);
 }
Ejemplo n.º 11
0
 $minutes = array(-1 => '*');
 for ($x = 0; $x < 60; $x++) {
     $minutes[] = $x;
 }
 if ($cron['cronid']) {
     $trans_link = "phrase.php?" . vB::getCurrentSession()->get('sessionurl') . "do=edit&fieldname=cron&t=1&varname=";
     // has varname appended
     if (!$cron['volatile'] or $vb5_config['Misc']['debug']) {
         // non volatile or in debug mode -- always editable (custom created)
         print_input_row($vbphrase['title'] . '<dfn>' . construct_link_code($vbphrase['translations'], $trans_link . $cron['titlevarname'], 1) . '</dfn>', 'title', $cron['title']);
         print_textarea_row($vbphrase['description_gcpglobal'] . '<dfn>' . construct_link_code($vbphrase['translations'], $trans_link . $cron['descvarname'], 1) . '</dfn>', 'description', $cron['description']);
         print_textarea_row($vbphrase['log_phrase'] . '<dfn>' . construct_link_code($vbphrase['translations'], $trans_link . $cron['logvarname'], 1) . '</dfn>', 'logphrase', $cron['logphrase']);
     } else {
         print_label_row($vbphrase['title'] . '<dfn>' . construct_link_code($vbphrase['translations'], $trans_link . $cron['titlevarname'], 1) . '</dfn>', htmlspecialchars_uni($cron['title']));
         print_label_row($vbphrase['description_gcpglobal'] . '<dfn>' . construct_link_code($vbphrase['translations'], $trans_link . $cron['descvarname'], 1) . '</dfn>', htmlspecialchars_uni($cron['description']));
         print_label_row($vbphrase['log_phrase'] . '<dfn>' . construct_link_code($vbphrase['translations'], $trans_link . $cron['logvarname'], 1) . '</dfn>', htmlspecialchars_uni($cron['logphrase']));
     }
 } else {
     print_input_row($vbphrase['title'], 'title');
     print_textarea_row($vbphrase['description_gcpglobal'], 'description');
     print_textarea_row($vbphrase['log_phrase'], 'logphrase');
 }
 print_select_row($vbphrase['day_of_week'], 'weekday', $weekdays, $cron['weekday']);
 print_select_row($vbphrase['day_of_month'], 'day', $days, $cron['day']);
 print_select_row($vbphrase['hour'], 'hour', $hours, $cron['hour']);
 $selects = '';
 for ($x = 0; $x < 6; $x++) {
     if ($x == 1) {
         $minutes = array(-2 => '-') + $minutes;
         unset($minutes[-1]);
     }
Ejemplo n.º 12
0
    print_cells_row(array($vbphrase['title'], $vbphrase['bb_code'], $vbphrase['html'], $vbphrase['replacement'], $vbphrase['button_image'], $vbphrase['controls']), 1, '', -5);
    while ($bbcode = $db->fetch_array($bbcodes)) {
        $class = fetch_row_bgclass();
        $altclass = iif($class == 'alt1', 'alt2', 'alt1');
        $parsed_code = $parser->do_parse($bbcode['bbcodeexample'], false, false, true, false, true);
        $cell = array("<b>{$bbcode['title']}</b>", "<div class=\"{$altclass}\" style=\"padding:2px; border:solid 1px; width:200px; height:75px; overflow:auto\"><span class=\"smallfont\">" . htmlspecialchars_uni($bbcode['bbcodeexample']) . '</span></div>', "<div class=\"{$altclass}\" style=\"padding:2px; border:solid 1px; width:200px; height:75px; overflow:auto\"><span class=\"smallfont\">" . htmlspecialchars_uni($parsed_code) . '</span></div>', '<iframe src="bbcode.php?do=previewbbcode&amp;bbcodeid=' . $bbcode['bbcodeid'] . '" style="width:200px; height:75px;"></iframe>');
        if ($bbcode['buttonimage']) {
            $src = $bbcode['buttonimage'];
            if (!preg_match('#^[a-z]+://#i', $src) and $src[0] != '/') {
                $src = "../{$src}";
            }
            $cell[] = "<img style=\"background:buttonface; border:solid 1px highlight\" src=\"{$src}\" alt=\"\" />";
        } else {
            $cell[] = $vbphrase['n_a'];
        }
        $cell[] = construct_link_code($vbphrase['edit'], "bbcode.php?" . $vbulletin->session->vars['sessionurl'] . "do=edit&amp;bbcodeid={$bbcode['bbcodeid']}") . construct_link_code($vbphrase['delete'], "bbcode.php?" . $vbulletin->session->vars['sessionurl'] . "do=remove&amp;bbcodeid={$bbcode['bbcodeid']}");
        print_cells_row($cell, 0, $class, -4);
    }
    print_submit_row($vbphrase['add_new_bb_code'], false, 6);
    if (empty($donetest)) {
        print_form_header('bbcode', 'test');
        print_table_header($vbphrase['test_your_bb_code']);
        print_textarea_row($vbphrase['enter_text_with_bb_code'], 'text', '', 15, 60);
        print_submit_row($vbphrase['go']);
    }
}
// ########################################################################
print_cp_footer();
/*======================================================================*\
|| ####################################################################
|| # Downloaded: 12:39, Wed May 30th 2012
Ejemplo n.º 13
0
function fetch_reminders_array2()
{
    // prints out all reminders for the appropriate control panel
    global $vbulletin, $permissions, $vbphrase;
    if ($permissions['adminpermissions'] & $vbulletin->bf_ugp_adminpermissions['cancontrolpanel']) {
        $condition = '';
    } else {
        $condition = 'AND allowmodcp = 1';
    }
    $reminders = $vbulletin->db->query_read("\n\t\tSELECT * FROM " . TABLE_PREFIX . "adminreminder\n\t\tWHERE duedate < " . (TIMENOW + 7 * 86400) . "\n\t\t{$condition} ORDER BY duedate\n\t");
    if ($vbulletin->db->num_rows($reminders)) {
        print_form_header(iif(VB_AREA == 'AdminCP', '../modcp/reminder', 'reminder'), 'docompleted');
        print_table_header($vbphrase['adminfunctions_getreminders2_header'], 4);
        print_cells_row(array($vbphrase['adminfunctions_getreminders2_duedate'], $vbphrase['event'], $vbphrase['edit'], $vbphrase['status']), 1, 0, -1);
        while ($reminder = $vbulletin->db->fetch_array($reminders)) {
            if ($reminder['completed'] == 0) {
                if ($reminder['duedate'] < TIMENOW) {
                    $date = '<b class="col-i">%s</b>';
                    $status = '<b>' . $vbphrase['adminfunctions_getreminders2_overdue'] . '</b>';
                    $hint = $vbphrase['adminfunctions_getreminders2_completed'];
                    $checkbox = '';
                } else {
                    $date = '%s';
                    $status = 'Pending';
                    $hint = $vbphrase['adminfunctions_getreminders2_completed'];
                    $checkbox = '';
                }
            } else {
                $date = '%s';
                $status = $vbphrase['adminfunctions_getreminders2_complete'];
                $hint = $vbphrase['adminfunctions_getreminders2_delete'];
                $checkbox = ' checked="checked" disabled="disabled"';
            }
            $cell = array();
            $cell[] = '<p class="smallfont" style="white-space:nowrap">' . sprintf($date, vbdate("M jS 'y", $reminder['duedate'])) . '</p>';
            $cell[] = '<p class="smallfont">' . $reminder['title'] . '</p>';
            //$cell[] = '<span class="smallfont">'.construct_link_code($status, $link, 0, $hint) . '</span>';
            $cell[] = '<p class="smallfont">' . construct_link_code($vbphrase['edit'], "reminder.php?" . $vbulletin->session->vars['sessionurl'] . "do=edit&amp;id[{$reminder['adminreminderid']}]=1") . '</p>';
            $cell[] = '<p class="smallfont" style="text-align:' . vB_Template_Runtime::fetchStyleVar('right') . '">' . $status . '<input type="checkbox" name="id[' . $reminder['adminreminderid'] . ']" value="1" tabindex="1"' . $checkbox . ' /></p>';
            print_cells_row($cell, 0, '', -2);
        }
        print_submit_row($vbphrase['adminfunctions_getreminders2_delcomplete'], 0, 4);
    }
    unset($reminder);
    $vbulletin->db->free_result($reminders);
}
Ejemplo n.º 14
0
        $pms = vB_Api::instanceInternal('user')->fetchUsersPms();
    } catch (vB_Exception_Api $ex) {
        print_stop_message2($ex->getMessage());
    }
    print_form_header('usertools', 'viewpmstats');
    print_table_header($vbphrase['private_message_statistics_gcpuser'], 3);
    print_cells_row(array($vbphrase['number_of_messages'], $vbphrase['number_of_users'], $vbphrase['controls']), 1);
    $groups = array();
    foreach ($pms as $pm) {
        $groups["{$pm['total']}"]++;
    }
    foreach ($groups as $key => $total) {
        $cell = array();
        $cell[] = $key . iif($vbulletin->options['pmquota'], '/' . $vbulletin->options['pmquota']);
        $cell[] = $total;
        $cell[] = construct_link_code(construct_phrase($vbphrase['list_users_with_x_messages'], $key), "usertools.php?" . vB::getCurrentSession()->get('sessionurl') . "do=pmuserstats&total={$key}");
        print_cells_row($cell);
    }
    print_table_footer();
}
// ############################# start PM stats #########################
if ($_REQUEST['do'] == 'pmuserstats') {
    $vbulletin->input->clean_array_gpc('r', array('total' => vB_Cleaner::TYPE_UINT));
    try {
        $users = vB_Api::instanceInternal('user')->fetchUsersPms(array('sortby' => array('fields' => 'user.username', 'direction' => vB_dB_Query::SORT_DESC), 'total' => $vbulletin->GPC['total']));
    } catch (vB_Exception_Api $ex) {
        print_stop_message2($ex->getMessage());
    }
    if (!count($users)) {
        print_stop_message2('no_users_matched_your_query');
    }
Ejemplo n.º 15
0
    print_form_header('', '');
    while ($rank = $db->fetch_array($ranks)) {
        if ($tempgroup != $rank['usergroupid']) {
            if (isset($tempgroup)) {
                print_table_break();
            }
            $tempgroup = $rank['usergroupid'];
            print_table_header(iif($rank['usergroupid'] == 0, $vbphrase['all_usergroups'], $rank['title']), 5, 1);
            print_cells_row(array($vbphrase['user_rank'], $vbphrase['minimum_posts'], $vbphrase['display_type'], $vbphrase['stack_rank'], $vbphrase['controls']), 1, '', -1);
        }
        $count = 0;
        $rankhtml = '';
        while ($count++ < $rank['ranklevel']) {
            if (!$rank['type']) {
                $rankhtml .= "<img src=\"../{$rank['rankimg']}\" border=\"0\" alt=\"\" />";
            } else {
                $rankhtml .= $rank['rankimg'];
            }
        }
        $cell = array($rankhtml, vb_number_format($rank['minposts']), $rank['display'] ? $vbphrase['displaygroup'] : $vbphrase['always'], $rank['stack'] ? $vbphrase['yes'] : $vbphrase['no'], construct_link_code($vbphrase['edit'], "ranks.php?" . $vbulletin->session->vars['sessionurl'] . "do=edit&rankid={$rank['rankid']}") . construct_link_code($vbphrase['delete'], "ranks.php?" . $vbulletin->session->vars['sessionurl'] . "do=remove&rankid={$rank['rankid']}"));
        print_cells_row($cell, 0, '', -1);
    }
    print_table_footer();
}
print_cp_footer();
/*======================================================================*\
|| ####################################################################
|| # Downloaded: 03:13, Sat Sep 7th 2013
|| # CVS: $RCSfile$ - $Revision: 32878 $
|| ####################################################################
\*======================================================================*/
Ejemplo n.º 16
0
/**
* Returns a help-link button for the specified script/action/option if available
*
* @param	string	Option name
* @param	string	Action / Do name (script.php?do=SOMETHING)
* @param	string	Script name (SCRIPT.php?do=something)
* @param	integer	Help type
*
* @return	string
*/
function construct_help_button($option = '', $action = NULL, $script = '', $helptype = 0)
{
    // used to make a link to the help section of the CP related to the current action
    global $helpcache, $stylevar, $vbphrase, $vbulletin;
    if ($action === NULL) {
        // matches type as well (===)
        $action = $_REQUEST['do'];
    }
    if (empty($script)) {
        $script = $vbulletin->scriptpath;
    }
    if ($strpos = strpos($script, '?')) {
        $script = basename(substr($script, 0, $strpos));
    } else {
        $script = basename($script);
    }
    if ($strpos = strpos($script, '.')) {
        $script = substr($script, 0, $strpos);
        // remove the .php part as people may have different extensions
    }
    if ($option and !isset($helpcache["{$script}"]["{$action}"]["{$option}"])) {
        if (preg_match('#^[a-z0-9_]+(\\[([a-z0-9_]+)\\])+$#si', trim($option), $matches)) {
            // parse out array notation, to just get index
            $option = $matches[2];
        }
        $option = str_replace('[]', '', $option);
    }
    if (!$option) {
        if (!isset($helpcache["{$script}"]["{$action}"])) {
            return '';
        }
    } else {
        if (!isset($helpcache["{$script}"]["{$action}"]["{$option}"])) {
            if ($vbulletin->debug and preg_match('#vbulletin.com$#', $_SERVER['HTTP_HOST'])) {
                return construct_link_code('AddHelp', "help.php?" . $vbulletin->session->vars['sessionurl'] . "do=edit&amp;option=" . urlencode($option) . '&amp;script=' . urlencode($script) . '&amp;scriptaction=' . urlencode($action));
            } else {
                return '';
            }
        }
    }
    $helplink = "js_open_help('" . urlencode($script) . "', '" . urlencode($action) . "', '" . urlencode($option) . "'); return false;";
    switch ($helptype) {
        case 1:
            return "<a class=\"helplink\" href=\"#\" onclick=\"{$helplink}\">{$vbphrase['help']} <img src=\"../cpstyles/" . $vbulletin->options['cpstylefolder'] . "/cp_help.gif\" alt=\"\" border=\"0\" title=\"{$vbphrase['click_for_help_on_these_options']}\" style=\"vertical-align:middle\" /></a>";
        default:
            return "<a class=\"helplink\" href=\"#\" onclick=\"{$helplink}\"><img src=\"../cpstyles/" . $vbulletin->options['cpstylefolder'] . "/cp_help.gif\" alt=\"\" border=\"0\" title=\"{$vbphrase['click_for_help_on_this_option']}\" /></a>";
    }
}
Ejemplo n.º 17
0
function construct_user_ip_table($userid, $previpaddress, $depth = 2)
{
    global $vbulletin, $vbphrase;
    if (VB_AREA == 'AdminCP') {
        $userscript = 'usertools.php';
    } else {
        $userscript = 'user.php';
    }
    $depth--;
    $ips = $vbulletin->db->query_read_slave("\n\t\tSELECT DISTINCT ipaddress\n\t\tFROM " . TABLE_PREFIX . "post\n\t\tWHERE userid = {$userid} AND\n\t\tipaddress <> '" . $vbulletin->db->escape_string($previpaddress) . "' AND\n\t\tipaddress <> ''\n\t\tORDER BY ipaddress\n\t");
    $retdata = '';
    while ($ip = $vbulletin->db->fetch_array($ips)) {
        $retdata .= '<li>' . "<a href=\"{$userscript}?" . $vbulletin->session->vars['sessionurl'] . "do=gethost&amp;ip={$ip['ipaddress']}\" title=\"" . $vbphrase['resolve_address'] . "\">{$ip['ipaddress']}</a> &nbsp; " . construct_link_code($vbphrase['find_more_users_with_this_ip_address'], "{$userscript}?" . $vbulletin->session->vars['sessionurl'] . "do=doips&amp;ipaddress={$ip['ipaddress']}&amp;hash=" . CP_SESSIONHASH) . "</li>\n";
        if ($depth > 0) {
            $retdata .= construct_ip_usage_table($ip['ipaddress'], $userid, $depth);
        }
    }
    if (empty($retdata)) {
        return '';
    } else {
        return '<ul>' . $retdata . '</ul>';
    }
}
Ejemplo n.º 18
0
             if ($celldata) {
                 $celldata .= "<br />\n";
             }
             $celldata .= "<b>{$output}:</b> ";
             switch ($sqlfield) {
                 case 'post_title':
                     $celldata .= construct_link_code($log["{$sqlfield}"], "../showthread.php?" . $vbulletin->session->vars['sessionurl'] . "p={$log['postid']}#{$log['postid']}", true);
                     break;
                 case 'thread_title':
                     $celldata .= construct_link_code($log["{$sqlfield}"], "../showthread.php?" . $vbulletin->session->vars['sessionurl'] . "t={$log['threadid']}", true);
                     break;
                 case 'forum_title':
                     $celldata .= construct_link_code($log["{$sqlfield}"], "../forumdisplay.php?" . $vbulletin->session->vars['sessionurl'] . "f={$log['forumid']}", true);
                     break;
                 case 'attachment_title':
                     $celldata .= construct_link_code(htmlspecialchars_uni($log["{$sqlfield}"]), "../attachment.php?" . $vbulletin->session->vars['sessionurl'] . "attachmentid={$log['attachmentid']}&amp;nocache=" . TIMENOW, true);
                     break;
                 default:
                     $handled = false;
                     ($hook = vBulletinHook::fetch_hook('admin_modlogviewer_query_linkfield')) ? eval($hook) : false;
                     if (!$handled) {
                         $celldata .= $log["{$sqlfield}"];
                     }
             }
         }
     }
     $cell[] = $celldata;
     $cell[] = '<span class="smallfont">' . iif($log['ipaddress'], "<a href=\"usertools.php?" . $vbulletin->session->vars['sessionurl'] . "do=gethost&ip={$log['ipaddress']}\">{$log['ipaddress']}</a>", '&nbsp;') . '</span>';
     print_cells_row($cell, 0, 0, -4);
 }
 print_table_footer(6, "{$firstpage} {$prevpage} &nbsp; {$nextpage} {$lastpage}");
Ejemplo n.º 19
0
/**
* Equivalent to construct_template_option(), but creates an <a> instead of an <option>
*
* @param	array	Template info array
* @param	integer	Style ID of style being shown
* @param	boolean	Indent HTML code?
* @param	boolean	Not used any more
*
* @return	string	Template <a> link
*/
function construct_template_link($template, $styleid, $doindent = false, $htmlise = false)
{
    global $LINKEXTRA, $info, $templateid, $vbulletin, $vbphrase;
    if ($doindent) {
        $indent = "\t";
    } else {
        $indent = '';
    }
    if ($styleid == -1) {
        // (debug option)
        return "{$indent}<li class=\"col-g\">{$template['title']}" . construct_link_code($vbphrase['edit'], "template.php?" . $vbulletin->session->vars['sessionurl'] . "do=edit&amp;templateid={$template['templateid']}&amp;dostyleid={$template['styleid']}{$LINKEXTRA}") . construct_link_code($vbphrase['delete'], "template.php?" . $vbulletin->session->vars['sessionurl'] . "do=delete&amp;templateid={$template['templateid']}&amp;dostyleid={$template['styleid']}{$LINKEXTRA}") . "</li>\n";
    } else {
        switch ($template['styleid']) {
            case -1:
                // template is inherited from the master set
                return "{$indent}<li class=\"col-g\">{$template['title']}" . construct_link_code($vbphrase['customize'], "template.php?" . $vbulletin->session->vars['sessionurl'] . "do=add&amp;dostyleid={$styleid}&amp;title=" . urlencode($template['title']) . "{$LINKEXTRA}") . "</li>\n";
            case $styleid:
                // template is customized for this specific style
                return "{$indent}<li class=\"col-c\">{$template['title']}" . construct_link_code($vbphrase['edit'], "template.php?" . $vbulletin->session->vars['sessionurl'] . "do=edit&amp;templateid={$template['templateid']}&amp;dostyleid={$template['styleid']}{$LINKEXTRA}") . construct_link_code($vbphrase['revert'], "template.php?" . $vbulletin->session->vars['sessionurl'] . "do=delete&amp;templateid={$template['templateid']}&amp;dostyleid={$template['styleid']}{$LINKEXTRA}") . construct_link_code($vbphrase['view_original'], "template.php?" . $vbulletin->session->vars['sessionurl'] . "do=view&amp;title=" . urlencode($template['title']), 1) . "</li>\n";
            default:
                // template is customized in a parent style - (inherited)
                return "{$indent}<li class=\"col-i\">{$template['title']}" . construct_link_code($vbphrase['customize_further'], "template.php?" . $vbulletin->session->vars['sessionurl'] . "do=add&amp;dostyleid={$styleid}&amp;templateid={$template['templateid']}{$LINKEXTRA}") . construct_link_code($vbphrase['view_original'], "template.php?" . $vbulletin->session->vars['sessionurl'] . "do=view&amp;title=" . urlencode($template['title']), 1) . "</li>\n";
        }
    }
}
Ejemplo n.º 20
0
    update_subscriptions(array('userids' => array($user['userid'])));
    define('CP_REDIRECT', "user.php?do=edit&amp;u=" . $vbulletin->GPC['userid']);
    print_stop_message('saved_access_masks_successfully');
}
// ###################### Start modify #######################
if ($_REQUEST['do'] == 'modify') {
    $vbulletin->input->clean_array_gpc('r', array('userid' => TYPE_INT, 'insertedadmin' => TYPE_INT));
    if ($vbulletin->GPC['userid']) {
        $userinfo = fetch_userinfo($vbulletin->GPC['userid']);
        if (!$userinfo) {
            print_stop_message('invalid_user_specified');
        }
        print_form_header('user', 'edit', 0, 1, 'reviewform');
        print_table_header($userinfo['username'], 2, 0, '', 'center', 0);
        construct_hidden_code('userid', $vbulletin->GPC['userid']);
        print_description_row(construct_link_code($vbphrase['view_profile'], "user.php?" . $vbulletin->session->vars['sessionurl'] . "do=edit&amp;u=" . $vbulletin->GPC['userid']) . iif($vbulletin->GPC['insertedadmin'], '<br />' . construct_link_code('<span style="color:red;"><strong>' . $vbphrase['update_or_add_administration_permissions'] . '</strong></span>', "adminpermissions.php?" . $vbulletin->session->vars['sessionurl'] . "do=edit&amp;u=" . $vbulletin->GPC['userid'])));
        print_table_footer();
    }
    print_form_header('', '');
    print_table_header($vbphrase['quick_search']);
    print_description_row("\n\t\t<ul>\n\t\t\t<li><a href=\"user.php?" . $vbulletin->session->vars['sessionurl'] . "do=find\">" . $vbphrase['show_all_users'] . "</a></li>\n\t\t\t<li><a href=\"user.php?" . $vbulletin->session->vars['sessionurl'] . "do=find&amp;orderby=posts&amp;direction=DESC&amp;limitnumber=30\">" . $vbphrase['list_top_posters'] . "</a></li>\n\t\t\t<li><a href=\"user.php?" . $vbulletin->session->vars['sessionurl'] . "do=find&amp;user[lastactivityafter]=" . (TIMENOW - 86400) . "&amp;orderby=lastactivity&amp;direction=DESC\">" . $vbphrase['list_visitors_in_the_last_24_hours'] . "</a></li>\n\t\t\t<li><a href=\"user.php?" . $vbulletin->session->vars['sessionurl'] . "do=find&amp;orderby=joindate&direction=DESC&amp;limitnumber=30\">" . $vbphrase['list_new_registrations'] . "</a></li>\n\t\t\t<li><a href=\"user.php?" . $vbulletin->session->vars['sessionurl'] . "do=moderate\">" . $vbphrase['list_users_awaiting_moderation'] . "</a></li>\n\t\t\t<li><a href=\"user.php?" . $vbulletin->session->vars['sessionurl'] . "do=find&amp;user[coppauser]=1\">" . $vbphrase['show_all_coppa_users'] . "</a></li>\n\t\t</ul>\n\t");
    print_table_footer();
    print_form_header('user', 'find');
    print_table_header($vbphrase['advanced_search']);
    print_description_row($vbphrase['if_you_leave_a_field_blank_it_will_be_ignored']);
    print_description_row('<img src="../' . $vbulletin->options['cleargifurl'] . '" alt="" width="1" height="2" />', 0, 2, 'thead');
    print_user_search_rows();
    print_table_break();
    print_table_header($vbphrase['display_options']);
    print_yes_no_row($vbphrase['display_username'], 'display[username]', 1);
    print_yes_no_row($vbphrase['display_options'], 'display[options]', 1);
Ejemplo n.º 21
0
    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&amp;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&amp;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&amp;u={$user['userid']}")), 0, '', 0);
        }
    }
    print_table_footer();
}
print_cp_footer();
/*======================================================================*\
|| ####################################################################
|| # Downloaded: 12:56, Sat Oct 11th 2008
|| # CVS: $RCSfile$ - $Revision: 25308 $
|| ####################################################################
\*======================================================================*/
Ejemplo n.º 22
0
function print_faq_admin_row($faq, $prefix = '')
{
    global $ifaqcache, $vbphrase, $vbulletin;
    $cell = array($prefix . '<b></b>' . iif(is_array($ifaqcache["{$faq['faqname']}"]), '<a href="faq.php?' . $vbulletin->session->vars['sessionurl'] . 'faq=' . urlencode($faq['faqname']) . "\" title=\"{$vbphrase['show_child_faq_entries']}\">{$faq['title']}</a>", $faq['title']) . '<b></b>', "<input type=\"text\" class=\"bginput\" size=\"4\" name=\"order[{$faq['faqname']}]\" title=\"{$vbphrase['display_order']}\" tabindex=\"1\" value=\"{$faq['displayorder']}\" />", construct_link_code($vbphrase['edit'], 'faq.php?' . $vbulletin->session->vars['sessionurl'] . 'do=edit&amp;faq=' . urlencode($faq['faqname'])) . construct_link_code($vbphrase['add_child_faq_item'], "faq.php?" . $vbulletin->session->vars['sessionurl'] . 'do=add&amp;faq=' . urlencode($faq['faqname'])) . construct_link_code($vbphrase['delete'], 'faq.php?' . $vbulletin->session->vars['sessionurl'] . 'do=delete&amp;faq=' . urlencode($faq['faqname'])));
    print_cells_row($cell);
}
Ejemplo n.º 23
0
		}

	}
	// -->
	</script>
	<?php 
    if (!$prefixsets) {
        print_description_row($vbphrase['no_prefix_sets_defined_click_create'], false, 3, '', 'center');
    } else {
        // display existing sets
        foreach ($prefixsets as $prefixset) {
            print_cells_row(array('<input id="' . $prefixset['prefixsetid'] . '" type="checkbox" onclick="selectprefixes(\'' . $prefixset['prefixsetid'] . '\')" />' . '<label for="' . $prefixset['prefixsetid'] . '">' . htmlspecialchars_uni($vbphrase["prefixset_{$prefixset['prefixsetid']}_title"]) . '</label>', '<input type="text" size="3" class="bginput" name="prefixset_order[' . $prefixset['prefixsetid'] . ']" value="' . $prefixset['displayorder'] . '" />', '<div class="normal">' . construct_link_code($vbphrase['add_prefix'], "prefix.php?do=addprefix&amp;prefixsetid={$prefixset['prefixsetid']}") . construct_link_code($vbphrase['edit'], "prefix.php?do=editset&amp;prefixsetid={$prefixset['prefixsetid']}") . construct_link_code($vbphrase['delete'], "prefix.php?do=deleteset&amp;prefixsetid={$prefixset['prefixsetid']}") . '</div>'), 1);
            if (!$prefixset['prefixes']) {
                print_description_row(construct_phrase($vbphrase['no_prefixes_defined_click_create'], $prefixset['prefixsetid']), false, 3, '', 'center');
            } else {
                foreach ($prefixset['prefixes'] as $prefix) {
                    print_cells_row(array('<label for="' . $prefixset['prefixsetid'] . '_' . $prefix['prefixid'] . '">' . '<input type="checkbox" name="prefixids[' . $prefix["prefixid"] . ']" id="' . $prefixset['prefixsetid'] . '_' . $prefix['prefixid'] . '" class="' . $prefixset['prefixsetid'] . '" />' . htmlspecialchars_uni($vbphrase["prefix_{$prefix['prefixid']}_title_plain"]) . '</label>', '<input type="text" size="3" class="bginput" name="prefix_order[' . $prefix['prefixid'] . ']" value="' . $prefix['displayorder'] . '" />', '<div class="smallfont">' . construct_link_code($vbphrase['edit'], "prefix.php?do=editprefix&amp;prefixid={$prefix['prefixid']}") . construct_link_code($vbphrase['delete'], "prefix.php?do=deleteprefix&amp;prefixid={$prefix['prefixid']}") . construct_link_code($vbphrase['edit_permissions'], "prefix.php?do=permissions&amp;prefixid={$prefix['prefixid']}") . '</div>'));
                }
            }
        }
    }
    print_cells_row(array('<input type="image" style="width: 1px; height: 1px;" src="' . $vbulletin->options['cleargifurl'] . '" />' . '<input class="button" type="submit" name="dopermissionsmultiple" value="' . $vbphrase['edit_selected_prefix_permissions'] . '" />', '<input class="button" type="submit" value="' . $vbphrase['save_display_order'] . '" />', '<input class="button" type="button" onclick="window.location = \'prefix.php?do=addset\';" value="' . $vbphrase['add_prefix_set'] . '" />'), false, 'tfoot');
    print_table_footer();
}
print_cp_footer();
/*======================================================================*\
|| ####################################################################
|| # Downloaded: 23:48, Wed Mar 24th 2010
|| # CVS: $RCSfile$ - $Revision: 32878 $
|| ####################################################################
\*======================================================================*/
Ejemplo n.º 24
0
function print_channels($permissions, $inheritance = array(), $channels = false, $indent = '	')
{
    global $vbulletin, $imodcache, $npermscache, $vbphrase;
    if ($channels === false) {
        $channels = vB_Api::instanceInternal('search')->getChannels(false, array('include_protected' => true, 'no_perm_check' => true));
    }
    foreach ($channels as $nodeid => $node) {
        // make a copy of the current permissions set up
        $perms = $permissions;
        // make a copy of the inheritance set up
        $inherit = $inheritance;
        // echo channel title and links
        if (!defined('ONLYID') or $nodeid == ONLYID) {
            echo "{$indent}<ul class=\"lsq\">\n";
            echo "{$indent}<li><b><a name=\"node{$nodeid}\" href=\"forum.php?" . vB::getCurrentSession()->get('sessionurl') . "do=edit&amp;n={$nodeid}\">{$node['htmltitle']}</a></b>";
            if ($node['parentid'] != 0) {
                echo " <b><span class=\"smallfont\">(" . construct_link_code($vbphrase['reset'], "forumpermission.php?" . vB::getCurrentSession()->get('sessionurl') . "do=quickset&amp;type=reset&amp;n={$nodeid}&amp;hash=" . CP_SESSIONHASH) . construct_link_code($vbphrase['deny_all'], "forumpermission.php?" . vB::getCurrentSession()->get('sessionurl') . "do=quickset&amp;type=deny&amp;n={$nodeid}&amp;hash=" . CP_SESSIONHASH) . ")</span></b>";
            }
            // get moderators
            if (is_array($imodcache["{$nodeid}"])) {
                echo "<span class=\"smallfont\"><br /> - <i>" . $vbphrase['moderators'] . ":";
                foreach ($imodcache["{$nodeid}"] as $moderator) {
                    // moderator username and links
                    echo " <a href=\"moderator.php?" . vB::getCurrentSession()->get('sessionurl') . "do=edit&amp;moderatorid={$moderator['moderatorid']}\">{$moderator['username']}</a>";
                }
                echo "</i></span>";
            }
            echo "{$indent}\t<ul class=\"usergroups\">\n";
        }
        $nplink = "";
        foreach ($vbulletin->usergroupcache as $usergroupid => $usergroup) {
            if ($inherit["{$usergroupid}"] == 'col-c') {
                $inherit["{$usergroupid}"] = 'col-i';
            }
            // if there is a custom permission for the current usergroup, use it
            if (isset($npermscache["{$nodeid}"]["{$usergroupid}"]) and $node['parentid'] != 0 and vB_ChannelPermission::compareDefaultChannelPermissions($nodeid, $usergroupid, $npermscache["{$nodeid}"]["{$usergroupid}"])) {
                $inherit["{$usergroupid}"] = 'col-c';
                $perms["{$usergroupid}"] = $npermscache[$nodeid][$usergroupid]['forumpermissions'];
                $nplink = 'np=' . $npermscache[$nodeid][$usergroupid]['permissionid'];
            } else {
                $nplink = "n={$nodeid}&amp;u={$usergroupid}";
            }
            // work out display style
            $liStyle = '';
            if (isset($inherit["{$usergroupid}"])) {
                $liStyle = " class=\"{$inherit[$usergroupid]}\"";
            } else {
                $liStyle = " class=\"col-g\"";
            }
            if (!($perms["{$usergroupid}"] & $vbulletin->bf_ugp_forumpermissions['canview'])) {
                $liStyle .= " style=\"list-style:circle\"";
            }
            if (!defined('ONLYID') or $nodeid == ONLYID) {
                echo "{$indent}\t<li{$liStyle}>" . construct_link_code($vbphrase['edit'], "forumpermission.php?" . vB::getCurrentSession()->get('sessionurl') . "do=edit&amp;{$nplink}") . $usergroup['title'] . "</li>\n";
            }
        }
        if (!defined('ONLYID') or $nodeid == ONLYID) {
            echo "{$indent}\t</ul><br />\n";
        }
        if (defined('ONLYID') and $nodeid == ONLYID) {
            echo "{$indent}</li>\n";
            echo "{$indent}</ul>\n";
            return;
        }
        if (!empty($node['channels'])) {
            print_channels($perms, $inherit, $node['channels'], "{$indent}\t");
        }
        if (!defined('ONLYID') or $nodeid == ONLYID) {
            echo "{$indent}</li>\n";
        }
        unset($inherit);
        if (!defined('ONLYID') or $nodeid == ONLYID) {
            echo "{$indent}</ul>\n";
        }
        if (!defined('ONLYID') and $node['parentid'] == -1) {
            echo "<hr size=\"1\" />\n";
        }
    }
}
Ejemplo n.º 25
0
                        if ($infraction['expires'] == 0) {
                            $cell[] = $vbphrase['never'];
                        } else {
                            $cell[] = '<span class="smallfont">' . vbdate($vbulletin->options['logdateformat'], $infraction['expires']) . '</span>';
                        }
                        break;
                    case 1:
                        $cell[] = $vbphrase['expired'];
                        break;
                    case 2:
                        $cell[] = $vbphrase['reversed'];
                        break;
                }
            }
            $cell[] = (!empty($infraction['postid']) and !$infraction['postdeleted']) ? construct_link_code(htmlspecialchars_uni($vbphrase['post']), "../showthread.php?" . $vbulletin->session->vars['sessionurl'] . "postid={$infraction['postid']}#post{$infraction['postid']}", true, '', true) : '&nbsp;';
            $cell[] = ($infraction['action'] != 2 ? construct_link_code($vbphrase['reverse'], "admininfraction.php?" . $vbulletin->session->vars['sessionurl'] . "do=reverse&infractionid={$infraction['infractionid']}" . $args . $vbulletin->GPC['orderby'], false, '', true) : '') . ' ' . construct_link_code($vbphrase['infraction_view'], "admininfraction.php?" . $vbulletin->session->vars['sessionurl'] . "do=details&infractionid={$infraction['infractionid']}", false, '', true) . ' ' . construct_link_code($vbphrase['delete'], "admininfraction.php?" . $vbulletin->session->vars['sessionurl'] . "do=deleteinfraction&infractionid={$infraction['infractionid']}" . $args . $vbulletin->GPC['orderby'], false, '', true);
            print_cells_row($cell);
        }
        print_table_footer(8, "{$firstpage} {$prevpage} &nbsp; {$nextpage} {$lastpage}");
    } else {
        define('CP_BACKURL', '');
        print_stop_message('no_matches_found');
    }
}
// ###################### Start add #######################
if ($_REQUEST['do'] == 'editgroup') {
    print_form_header('admininfraction', 'updategroup');
    if (!empty($vbulletin->GPC['infractiongroupid'])) {
        $infraction = $db->query_first("SELECT * FROM " . TABLE_PREFIX . "infractiongroup WHERE infractiongroupid = " . $vbulletin->GPC['infractiongroupid']);
        print_table_header(construct_phrase($vbphrase['x_y_id_z'], $vbphrase['infraction_group'], '', $vbulletin->GPC['infractiongroupid']), 2, 0);
        construct_hidden_code('infractiongroupid', $vbulletin->GPC['infractiongroupid']);
Ejemplo n.º 26
0
    $phrasetypes = fetch_phrasetypes_array();
    foreach($phrasetypes AS $fieldname => $type)
    {
    	$typeoptions["$fieldname"] = construct_phrase($vbphrase['x_phrases'], $type['title']);
    }
    */
    print_form_header('language', 'add');
    construct_hidden_code('goto', "language.php?" . $vbulletin->session->vars['sessionurl']);
    print_table_header($vbphrase['language_manager'], 4);
    print_cells_row(array($vbphrase['language'], '', '', $vbphrase['default']), 1);
    if ($vbulletin->debug) {
        print_language_row(array('languageid' => -1, 'title' => "<i>{$vbphrase['master_language']}</i>"));
    }
    $languages = fetch_languages_array();
    foreach ($languages as $_languageid => $language) {
        print_language_row($language);
    }
    print_description_row(construct_link_code($vbphrase['search_phrases'], "phrase.php?" . $vbulletin->session->vars['sessionurl'] . "do=search") . construct_link_code($vbphrase['view_quickref'], "javascript:js_open_phrase_ref(0,0);") . construct_link_code($vbphrase['rebuild_all_languages'], "language.php?" . $vbulletin->session->vars['sessionurl'] . "do=rebuild&amp;goto=language.php?" . $vbulletin->session->vars['sessionurl']), 0, 4, 'thead" style="text-align:center; font-weight:normal');
    print_table_footer(4, '
		<input type="submit" class="button" value="' . $vbphrase['add_new_language'] . '" tabindex="1" />
		<input type="button" class="button" value="' . $vbphrase['download_upload_language'] . '" tabindex="1" onclick="window.location=\'language.php?do=files\';" />
	');
    print_phrase_ref_popup_javascript();
}
print_cp_footer();
/*======================================================================*\
|| ####################################################################
|| # Downloaded: 12:56, Sat Oct 11th 2008
|| # CVS: $RCSfile$ - $Revision: 26900 $
|| ####################################################################
\*======================================================================*/
Ejemplo n.º 27
0
	function construct_banned_user_row($user)
	{
		global $vbulletin, $vbphrase;

		if ($user['liftdate'] == 0)
		{
			$user['banperiod'] = $vbphrase['permanent'];
			$user['banlift'] = $vbphrase['never'];
			$user['banremaining'] = $vbphrase['forever'];
		}
		else
		{
			$user['banlift'] = vbdate($vbulletin->options['dateformat'] . ', ~' . $vbulletin->options['timeformat'], $user['liftdate']);
			$user['banperiod'] = ceil(($user['liftdate'] - $user['bandate']) / 86400);
			if ($user['banperiod'] == 1)
			{
				$user['banperiod'] .= " $vbphrase[day]";
			}
			else
			{
				$user['banperiod'] .= " $vbphrase[days]";
			}

			$remain = $user['liftdate'] - TIMENOW;
			$remain_days = floor($remain / 86400);
			$remain_hours = ceil(($remain - ($remain_days * 86400)) / 3600);
			if ($remain_hours == 24)
			{
				$remain_days += 1;
				$remain_hours = 0;
			}

			if ($remain_days < 0)
			{
				$user['banremaining'] = "<i>$vbphrase[will_be_lifted_soon]</i>";
			}
			else
			{
				if ($remain_days == 1)
				{
					$day_word = $vbphrase['day'];
				}
				else
				{
					$day_word = $vbphrase['days'];
				}
				if ($remain_hours == 1)
				{
					$hour_word = $vbphrase['hour'];
				}
				else
				{
					$hour_word = $vbphrase['hours'];
				}
				$user['banremaining'] = "$remain_days $day_word, $remain_hours $hour_word";
			}
		}
		$cell = array("<a href=\"" . iif(($vbulletin->userinfo['permissions']['adminpermissions'] & $vbulletin->bf_ugp_adminpermissions['cancontrolpanel']), '../' . $vbulletin->config['Misc']['admincpdir'] . '/') . 'user.php?' . $vbulletin->session->vars['sessionurl'] . "do=edit&amp;u=$user[userid]\"><b>$user[username]</b></a>");
		if ($user['bandate'])
		{
			$cell[] = iif($user['adminid'], "<a href=\"" . iif(($vbulletin->userinfo['permissions']['adminpermissions'] & $vbulletin->bf_ugp_adminpermissions['cancontrolpanel']), '../' . $vbulletin->config['Misc']['admincpdir'] . '/') . 'user.php?' . $vbulletin->session->vars['sessionurl'] . "do=edit&amp;u=$user[adminid]\">$user[adminname]</a>", $vbphrase['n_a']);
			$cell[] = vbdate($vbulletin->options['dateformat'], $user['bandate']);
		}
		else
		{
			$cell[] = $vbphrase['n_a'];
			$cell[] = $vbphrase['n_a'];
		}
		$cell[] = $user['banperiod'];
		$cell[] = $user['banlift'];
		$cell[] = $user['banremaining'];
		if (($vbulletin->userinfo['permissions']['adminpermissions'] & $vbulletin->bf_ugp_adminpermissions['cancontrolpanel']) OR can_moderate(0, 'canunbanusers'))
		{
			$cell[] = construct_link_code($vbphrase['lift_ban'], 'banning.php?' . $vbulletin->session->vars['sessionurl'] . "do=liftban&amp;u=$user[userid]");
		}

		$cell[] = construct_link_code(!empty($user['reason']) ? $user['reason'] : $vbphrase['n_a'], 'banning.php?' . $vbulletin->session->vars['sessionurl'] . "do=editreason&amp;userid=" . $user['userid']);

		return $cell;
	}
Ejemplo n.º 28
0
        if (isset($prefixsets["{$prefix['prefixsetid']}"])) {
            $prefixsets["{$prefix['prefixsetid']}"]['prefixes']["{$prefix['prefixid']}"] = $prefix;
        }
    }
    print_form_header('prefix', 'displayorder');
    print_table_header($vbphrase['thread_prefixes'], 3);
    if (!$prefixsets) {
        print_description_row($vbphrase['no_prefix_sets_defined_click_create'], false, 3, '', 'center');
    } else {
        // display existing sets
        foreach ($prefixsets as $prefixset) {
            print_cells_row(array(htmlspecialchars_uni($vbphrase["prefixset_{$prefixset['prefixsetid']}_title"]), '<input type="text" size="3" class="bginput" name="prefixset_order[' . $prefixset['prefixsetid'] . ']" value="' . $prefixset['displayorder'] . '" />', '<div align="right" class="smallfont">' . construct_link_code($vbphrase['add_prefix'], "prefix.php?do=addprefix&amp;prefixsetid={$prefixset['prefixsetid']}") . construct_link_code($vbphrase['edit'], "prefix.php?do=editset&amp;prefixsetid={$prefixset['prefixsetid']}") . construct_link_code($vbphrase['delete'], "prefix.php?do=deleteset&amp;prefixsetid={$prefixset['prefixsetid']}") . '</div>'), 1);
            if (!$prefixset['prefixes']) {
                print_description_row(construct_phrase($vbphrase['no_prefixes_defined_click_create'], $prefixset['prefixsetid']), false, 3, '', 'center');
            } else {
                foreach ($prefixset['prefixes'] as $prefix) {
                    print_cells_row(array(htmlspecialchars_uni($vbphrase["prefix_{$prefix['prefixid']}_title_plain"]), '<input type="text" size="3" class="bginput" name="prefix_order[' . $prefix['prefixid'] . ']" value="' . $prefix['displayorder'] . '" />', '<div align="right" class="smallfont">' . construct_link_code($vbphrase['edit'], "prefix.php?do=editprefix&amp;prefixid={$prefix['prefixid']}") . construct_link_code($vbphrase['delete'], "prefix.php?do=deleteprefix&amp;prefixid={$prefix['prefixid']}") . '</div>'));
                }
            }
        }
    }
    print_submit_row($vbphrase['save_display_order'], false, 3);
    echo '<p align="center">' . construct_link_code($vbphrase['add_prefix_set'], 'prefix.php?do=addset') . '</p>';
}
print_cp_footer();
/*======================================================================*\
|| ####################################################################
|| # Downloaded: 12:56, Sat Oct 11th 2008
|| # CVS: $RCSfile$ - $Revision: 27175 $
|| ####################################################################
\*======================================================================*/
Ejemplo n.º 29
0
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> &nbsp; ' . '<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&amp;bookmarksiteid=' . $bookmarksite['bookmarksiteid'] . '" title="' . $vbphrase['edit'] . '">' . $bookmarksite['title'] . '</a>', construct_link_code($vbphrase['edit'], 'bookmarksite.php?' . $vbulletin->session->vars['sessionurl'] . 'do=edit&amp;bookmarksiteid=' . $bookmarksite['bookmarksiteid']) . construct_link_code($vbphrase['delete'], 'bookmarksite.php?' . $vbulletin->session->vars['sessionurl'] . 'do=delete&amp;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'] . '" />' : '&nbsp;') . '</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();
    ?>
	<script type="text/javascript">
	<!--
	function toggle_all_active(e)
	{
		for (var i = 0; i < this.form.elements.length; i++)
		{
Ejemplo n.º 30
0
        print_cells_row($cell);
    }
    print_table_break();
    $content = array();
    $largestuser = $db->query_read("\n\t\tSELECT COUNT(*) AS count, SUM(filesize) AS totalsize, user.userid, username\n\t\tFROM " . TABLE_PREFIX . "attachment AS a\n\t\tINNER JOIN " . TABLE_PREFIX . "filedata AS fd ON (a.filedataid = fd.filedataid)\n\t\tLEFT JOIN " . TABLE_PREFIX . "user AS user ON (a.userid = user.userid)\n\t\tGROUP BY a.userid\n\t\tHAVING totalsize > 0\n\t\tORDER BY totalsize DESC\n\t\tLIMIT 5\n\t");
    $position = 0;
    print_table_header($vbphrase['five_users_most_attachment_space'], 5);
    print_cells_row(array('&nbsp;', $vbphrase['username'], $vbphrase['attachments'], $vbphrase['total_size'], '&nbsp;'), 1);
    while ($thispop = $db->fetch_array($largestuser)) {
        $position++;
        $cell = array();
        $cell[] = $position . '.';
        $cell[] = "<a href=\"user.php?" . $vbulletin->session->vars['sessionurl'] . "do=edit&amp;u={$thispop['userid']}\">{$thispop['username']}</a>";
        $cell[] = vb_number_format($thispop['count']);
        $cell[] = vb_number_format($thispop['totalsize'], 1, true);
        $cell[] = '<span class="smallfont">' . construct_link_code($vbphrase['view_attachments'], "attachment.php?" . $vbulletin->session->vars['sessionurl'] . "do=search&amp;search[attachedby]=" . urlencode($thispop['username'])) . '</span>';
        print_cells_row($cell);
    }
    print_table_footer();
}
// ###################### Introduction ####################
if ($_REQUEST['do'] == 'intro') {
    print_form_header('attachment', 'search');
    print_table_header($vbphrase['quick_search']);
    print_description_row("\n\t<ul style=\"margin:0px; padding:0px; list-style:none\">\n\t\t<li><a href=\"attachment.php?" . $vbulletin->session->vars['sessionurl'] . "do=search&amp;search[orderby]=filesize&amp;search[ordering]=DESC\">" . $vbphrase['view_largest_attachments'] . "</a></li>\n\t\t<li><a href=\"attachment.php?" . $vbulletin->session->vars['sessionurl'] . "do=search&amp;search[orderby]=counter&amp;search[ordering]=DESC\">" . $vbphrase['view_most_popular_attachments'] . "</a></li>\n\t\t<li><a href=\"attachment.php?" . $vbulletin->session->vars['sessionurl'] . "do=search&amp;search[orderby]=dateline&amp;search[ordering]=DESC\">" . $vbphrase['view_newest_attachments'] . "</a></li>\n\t\t<li><a href=\"attachment.php?" . $vbulletin->session->vars['sessionurl'] . "do=search&amp;search[orderby]=dateline&amp;search[ordering]=ASC\">" . $vbphrase['view_oldest_attachments'] . "</a></li>\n\t</ul>\n\t");
    print_table_break();
    print_table_header($vbphrase['prune_attachments']);
    print_input_row($vbphrase['find_all_attachments_older_than_days'], 'prunedate', 30);
    print_submit_row($vbphrase['search'], 0);
    print_form_header('attachment', 'search');
    print_table_header($vbphrase['advanced_search']);