Example #1
0
    print_table_footer(2, construct_button_code($vbphrase['go_back'], 'javascript:history.back(1)'));
    /*echo '<pre>';
    	print_r( $pms );
    	echo '</pre>';*/
}
/////////////////////// read
if ($_REQUEST['do'] == 'read') {
    if (empty($_REQUEST['pmtextid'])) {
        rpm_print_stop_back('Need a pmtextid.');
    }
    if (!is_numeric($_REQUEST['pmtextid'])) {
        rpm_print_stop_back('Pmtextid must be a number.');
    }
    $pm = rpm_get_pm($_REQUEST['pmtextid']);
    if (empty($pm)) {
        rpm_print_stop_back('Pmtextid ' . $_REQUEST['pmtextid'] . ' does not exist.');
    }
    $a = $db->query_first("SELECT userid FROM " . TABLE_PREFIX . "pm WHERE pmtextid = " . $_REQUEST['pmtextid']);
    $name = rpm_get_name($a['userid']);
    // show pm
    print_form_header('', '', 0, 1, 'pmlistForm');
    print_table_header('PM for: ' . $name);
    print_label_row('From', $pm['fromusername'] . ' (userid ' . $pm['fromuserid'] . ')');
    //print_label_row('To', htmlspecialchars($pm['touserarray']));
    $to = is_array(unserialize($pm['touserarray'])) ? implode(", ", array_values(unserialize($pm['touserarray']))) : null;
    $to = $to == 'Array' ? htmlspecialchars($pm['touserarray']) : $to;
    print_label_row('To', $to);
    print_label_row('Date', vbdate($vbulletin->options['dateformat'], $pm['dateline'], true) . ' ' . vbdate($vbulletin->options['timeformat'], $pm['dateline']));
    print_label_row('Title', htmlspecialchars($pm['title']));
    #### parse message
    require_once DIR . '/includes/class_bbcode.php';
Example #2
0
<?php

// ######################## SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);
// #################### PRE-CACHE TEMPLATES AND DATA ######################
$phrasegroups = array('style');
$specialtemplates = array('products');
// ########################## REQUIRE BACK-END ############################
require_once './global.php';
require_once DIR . '/includes/adminfunctions_template.php';
$this_script = 'server_info';
// ########################## SUPERADMIN CHECK ############################
if (!in_array($vbulletin->userinfo['userid'], preg_split('#\\s*,\\s*#s', $vbulletin->config['SpecialUsers']['superadministrators'], -1, PREG_SPLIT_NO_EMPTY))) {
    rpm_print_stop_back("You don't have permission to access this page.");
}
if ($_REQUEST['do'] == 'phpinfo') {
    phpinfo();
    exit;
}
print_cp_header();
/////////////////////// front page
if (empty($_REQUEST['do'])) {
    if ($_REQUEST['show'] == 'time' || empty($_REQUEST['show'])) {
        print_form_header('', '');
        print_table_header('Server Time &nbsp;<span class="normal">exec(date)</span>');
        exec('date', $date);
        print_description_row('<div align="center"><br />' . $date[0] . '<br /><br /></div>');
        print_table_footer();
    }
    if ($_REQUEST['show'] == 'uptime' || empty($_REQUEST['show'])) {
        print_form_header('', '');