Beispiel #1
0
ini_set('display_errorss', 1);
require 'constants.php';
require CLASS_PATH . SMARTY_CON_PATH;
require 'display_functions.php';
require 'complete_functions.php';
require CLASS_PATH . 'class.mysql.connection.php';
//main db connection
$db = new mysql_connection('ripersoi.dyndns.org', 'paul_usr', 'YsvQz8SfV9', 'paul');
//$db = new mysql_connection('localhost', 'paul_usr', 'YsvQz8SfV9', 'paul');
//main smarty instance
$smarty = new smarty_connect();
$smarty->debugging_ctrl = $_SERVER['SERVER_NAME'] == 'localhost' ? 'URL' : 'NONE';
$registered = display_visitor_data();
//display the news by default
if (!isset($_GET['site'])) {
    assign_news($smarty);
    $smarty->assign('content', $smarty->fetch("news.tpl"));
} else {
    //has the user permission to visit the site?
    $perm_sites = get_permitted_sites();
    if (in_array($_GET['site'], $perm_sites)) {
        switch ($_GET['site']) {
            case 'add_admin':
                $smarty->assign('content', $smarty->fetch("add_admin.tpl"));
                break;
            case 'add_game':
                display_add_game();
                break;
            case 'add_guid':
                $smarty->assign('content', $smarty->fetch("add_guid.tpl"));
                break;
Beispiel #2
0
/**
 * Assignes: $news
 *
 * @access public
 * @return boolean true
 */
function display_news()
{
    global $smarty;
    assign_news(true);
    $smarty->assign('content', $smarty->fetch("news.tpl"));
    return true;
}