Пример #1
0
<?php

/**
 * alliance.php
 *
 * @version 2.0
 * @copyright 2009 by MadnessRed for XNova Redesigned
 */
//right a blank php file, let make an alliance page :)
//Get the language
getLang('alliance');
//Load the bbcode class
$bb = new Simple_BB_Code();
//Start the $parse
$parse = $lang;
//Firstly are they in an alliance?
if ($user['ally_id'] == 0) {
    //no
    //Are we trying to join an alliance?
    if ($_GET['mode'] == 'apply') {
        //Load the headers
        $parse['search_ally'] = $parse['apply'];
        $parse['onclick2'] = "mrbox('./?page=cerca&iframe=1&iheight=800',800)";
        $parse['header_tpl'] = parsetemplate(gettemplate('alliance/header_noally'), $parse);
        if (strlen($_GET['text']) * idstring($_GET['id']) > 0) {
            doquery("UPDATE {{table}} SET `ally_request` = '" . idstring($_GET['id']) . "', `ally_request_text` = '" . htmlentities(mysql_real_escape_string($_GET['text'])) . "', `ally_register_time` = '" . time() . "' WHERE `id` = " . $user['id'], 'users', true);
            header("Location: " . AddUniToString('./?page=network&axah=' . $_GET['axah']));
            die;
        } else {
            //They haven't submitted the form, lets give it to them.
            $parse['allyid'] = $_GET['id'];
Пример #2
0
<?php

/**
 * showmessage.php
 *
 * @version 1
 * @copyright 2009 by Anthony for XNova Redesigned
 */
$message = doquery("SELECT * FROM {{table}} WHERE `message_id` = '" . idstring($_GET['id']) . "' AND (`message_owner` = '" . $user['id'] . "' OR `message_sender` = '" . $user['id'] . "') LIMIT 1 ;", 'messages', true);
$parse = $lang;
$bb = new Simple_BB_Code();
if ($message['message_sender'] > 0) {
    $messagetext = $bb->parse(htmlentities(stripslashes($message['message_text']), ENT_QUOTES));
} else {
    $messagetext = stripslashes($message['message_text']);
}
$parse['message'] = $messagetext;
$parse['subject'] = htmlentities(stripslashes($message['message_subject']), ENT_QUOTES);
$parse['from'] = htmlentities($message['message_from'], ENT_QUOTES);
$parse['username'] = htmlentities($user['username'], ENT_QUOTES);
$parse['date'] = date("jS F H:i:s", $message['message_time']);
//Thats the basic parts, now lets get previous/next message.
$parse['num'] = $_GET['n'];
$parse['count'] = $_GET['count'];
$parse['next'] = $_GET['next'];
$parse['prev'] = $_GET['prev'];
//now the mesage id
$parse['id'] = idstring($_GET['id']);
//Now links
$parse['l_reply'] = "href=\"./?page=write&to=" . $message['message_sender'] . "&subject=RE:" . $parse['subject'] . "\" rel=\"ibox&width=785&height=490\"";
$parse['l_reply'] = "href=\"./?page=write&to=" . $message['message_sender'] . "&subject=RE:" . $parse['subject'] . "\" target=\"_self\"";