Ejemplo n.º 1
0
     if (idstring($_GET['id']) != $allyrow['ally_owner']) {
         //Admin can't leave
         doquery("UPDATE {{table}} SET `ally_id` = '0' , `ally_name` = '' , `ally_register_time` = '0' , `ally_rank` = '0' , `ally_rank_name` = 'Newbie' WHERE `id` = '" . idstring($_GET['id']) . "' AND `ally_id` = '" . $user['ally_id'] . "' LIMIT 1 ;", 'users');
         doquery("UPDATE {{table}} SET `ally_members` = `ally_members` - " . mysql_affected_rows() . " WHERE `id` = '" . $user['ally_id'] . "' LIMIT 1 ;", 'alliance');
     }
     //Back to alliance page
     header("Location: " . AddUniToString('./?page=network&axah=' . $_GET['axah']));
     die;
     break;
 default:
     $parse['name'] = $allyrow['ally_name'];
     $parse['tag'] = $allyrow['ally_tag'];
     $parse['www'] = addslashes($allyrow['ally_web']);
     $parse['members'] = idstring($allyrow['ally_members']);
     $parse['yourrank'] = addslashes($user['ally_rank_name']);
     $parse['internal'] = $bb->parse(addslashes($allyrow['ally_text']));
     $parse['external'] = $bb->parse(addslashes($allyrow['ally_description']));
     $parse['image'] = addslashes($allyrow['ally_image']);
     $members = $lang;
     $membersort = 'ally_register_time';
     $memberquery = doquery("SELECT \r\n\t\t\t`id`,`username`,`galaxy`,`system`,`planet`,\r\n\t\t\t`ally_register_time`,`ally_rank_name`,`total_points`,`onlinetime` \r\n\t\t\tFROM {{table}} WHERE `ally_id` = '" . $allyrow['id'] . "' ORDER BY `" . $membersort . "` ASC ;", 'users');
     $n = 0;
     while ($row = FetchArray($memberquery)) {
         $n++;
         $lastclick = time() - $row['onlinetime'];
         if (!$user['permisions'][2]) {
             $activeon = ' - ';
             $activeover = '';
         } elseif ($lastclick > 20) {
             $activeon = 'Off';
             $activeover = 'overmark';
Ejemplo n.º 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\"";