Exemplo n.º 1
0
<html><head><title>Realm Status</title>
<style type="text/css">
td { border-top: 1px solid black }
td, th { padding: 4px }
td.r { text-align: right }

</style></head><body>
EOF;
echo '<h1>' . date('Y-m-d H:i:s') . '</h1>';
if (!DBConnect()) {
    DebugMessage('Cannot connect to db!', E_USER_ERROR);
}
ShowRealms();
ShowMemcacheStats();
ShowLogs();
ShowErrors();
echo '</body></html>';
function BnetGet()
{
    $parts = explode('-', $_GET['bnetget'], 2);
    if (count($parts) != 2) {
        echo 'Not enough parts.';
        exit;
    }
    switch ($parts[0]) {
        case 'US':
        case 'EU':
            break;
        default:
            echo 'Bad region';
            exit;
Exemplo n.º 2
0
<?php

ini_set('precision', 20);
define('ROOTDIR', dirname(__FILE__) . '/');
define('CODEDIR', ROOTDIR . 'code/');
define('TPLDIR', ROOTDIR . 'tpl/');
require ROOTDIR . '../common/shared.php';
require ROOTDIR . '../common/twitter.class.php';
require ROOTDIR . '../common/phpmailer/class.phpmailer.php';
require CODEDIR . 'queue.class.php';
require CODEDIR . 'user.class.php';
date_default_timezone_set('Europe/London');
ShowErrors(true);
require ROOTDIR . 'config.php';
if (file_exists(ROOTDIR . 'config_dev.php')) {
    require ROOTDIR . 'config_dev.php';
}
Twitter::Config($_twitter);
function &GetDB()
{
    static $_db = false;
    if ($_db === false) {
        $_db = mysql_connect('localhost', 'ta_replies', 'sdfoihsdukbsdkvhsldivhgsdlig') or die('DB gone? <!-- ' . mysql_error() . ' -->');
        mysql_select_db('twitapps_replies', $_db) or die('DB dead? <!-- ' . mysql_error() . ' -->');
        mysql_query('SET NAMES utf8', $_db);
    }
    return $_db;
}
/**
 * Output the layout header and set up the footer
 * @param string $title