Beispiel #1
0
<?php

require '../../config.php';
require $engine_path . "cls/auth/session.php";
$type = "residence/mail";
if (!$act && !$id) {
    $act = "inbox";
}
if ($id && $act != "remove") {
    $act = "respond";
}
if (checkpriv('control/support', '')) {
    $_GET['support'] = 1;
} else {
    $_GET['support'] = 0;
}
if ($act == "inbox" && !$ok) {
    unset($form_ok);
}
if ($id) {
    mysql_query("update ut_messages set Status=1 where Status=0 and MessageID='{$id}' and UserID2='{$auth->user}'");
}
if (!$act) {
    $act = "select";
}
require $site_path . "up.php";
$inbox = select("select count(*) from ut_messages where UserID2={$auth->user} and Status<2 and Support<>1");
$unread = select("select count(*) from ut_messages where UserID2={$auth->user} and Status=0  and Support<>1");
$sent = select("select count(*) from ut_messages where UserID1={$auth->user} and Status=2 and Support<2");
$str = $inbox[0];
if ($unread > 0) {
Beispiel #2
0
<?php

require '../../config.php';
//$form_width=170;
require $engine_path . "cls/auth/session.php";
if (!$act) {
    $act = "select";
}
$type = "residence/treasury";
if ($user && checkpriv("control/support", "")) {
    setvar('user', $user);
} else {
    setvar('user', $auth->user);
    $user = $auth->user;
}
require $site_path . "up.php";
function getmenurow($name, $value, $money)
{
    global $gd;
    if ($value < 0) {
        $color = "red";
    } elseif ($value > 0) {
        $color = "green";
    } else {
        $color = "black";
    }
    if ($money) {
        $value = "{$value}" . "{$gd}";
    }
    return "<font class=blue>{$name}:##<font color={$color}>{$value}</b></font>";
}
Beispiel #3
0
<?php

require_once $engine_path . 'cls/ajax/xajax.inc.php';
$res = mysql_query("select UserID,isModerator from chat_users where userId={$auth->user}");
$displayChat = false;
if ($res) {
    if ($data = mysql_fetch_row($res)) {
        $displayChat = $data[0];
        //$isModerator = $data[1];
    }
}
$isModerator = checkpriv('chat/messages', '');
$content = "";
$bantime = array('600' => '10 мин', '1800' => '30 мин', '3600' => 'час', '21600' => '6 часов', '86400' => 'сутки', '432000' => '5 дней', '864000' => '10 дней', '2592000' => '30 дней');
function BanUser($userID, $time_ban)
{
    global $auth, $isModerator, $bantime, $_SESSION;
    if (!$isModerator) {
        return 0;
    }
    $objResponse = new xajaxResponse();
    mysql_query("insert into chat_settings(UserID,BanTime,AdminID) values ({$userID},unix_timestamp()+{$time_ban},'{$auth->user}')\non duplicate key update BanTime=unix_timestamp()+{$time_ban},AdminID='{$auth->user}'");
    $t2 = substr(mktime(), 0, strlen(mktime()) - 3);
    $q = select("select Login from ut_users where UserID={$userID}");
    $message = "<i>" . $q[0] . " забанен на " . $bantime[$time_ban] . "</i>";
    $message = iconv('windows-1251', 'utf-8', $message);
    mysql_query("insert into chat_messages (UserID,Message,MessageTime,PrivateUserID,MessageTime2) \nvalues({$auth->user},'{$message}',unix_timestamp(),0,'{$t2}')");
    $login = $auth->nick;
    $login = iconv('windows-1251', 'utf-8', $login);
    $str = date("H:i", mktime()) . " <a href='javascript:addUserToMessage(\"{$login}\", 0)' class=nickName" . ($privateId ? "Private" : "") . ">" . $login . "</a>: <span class=chatMessage" . ($privateId ? "Private" : "") . ">" . $message . "</span><br />";
    $objResponse->addAppend("chatContent", "innerHTML", $str);
Beispiel #4
0
if ($q1[0]) {
    $q[0] = round($q[0] * (100 + $q1[0]) / 100);
}
if ($q[0]) {
    $menu[4] = getmenurow('Спонсорские', dots($q[0]), 1);
}
$q = select("select sum(money) from fn_payments where status=0 and senderID='{$team}' and typeID=23 group by SenderID");
if ($q[0]) {
    $menu[5] = getmenurow(message(232), "-" . dots($q[0]), 1);
}
$money = $money - $q[0];
if ($summoney != $money) {
    $menu[6] = getmenurow(message(233), dots($money), 1);
}
require $site_path . "left.php";
if (checkpriv("control/support", "")) {
    $q1 = select("select sum(Money) from fn_operations where SenderID='{$team}'");
    $q2 = select("select sum(Money) from fn_operations where ReceiverID='{$team}'");
    $q3 = select("select Money from fn_accounts where AccountID='{$team}'");
    $error = $q1[0] + $q3[0] - $q2[0];
    if ($error) {
        print "<font color=red>Error: " . dots($error) . "<br></font>";
        print "<b>Outcome:</b> " . dots($q1[0]) . "<br>";
        print "<b>Income:</b> " . dots($q2[0]) . "<br>";
        print "<b>Balance:</b> " . dots($q3[0]) . "<br>";
        $q = select("select OperationID,SenderBalance from fn_operations where SenderID='{$team}' and OperationDate>unix_timestamp()-3*24*3600 order by OperationID asc limit 0,1");
        $q1 = select("select sum(Money) from fn_operations where SenderID='{$team}' and OperationID>'{$q['0']}'");
        $q2 = select("select sum(Money) from fn_operations where ReceiverID='{$team}' and OperationID>'{$q['0']}'");
        $q3 = select("select Money from fn_accounts where AccountID='{$team}'");
        $error = -$q[1] + $q1[0] + $q3[0] - $q2[0];
        if ($error) {
Beispiel #5
0
<?php

require '../../config.php';
$form_width = 170;
require $engine_path . "cls/auth/session.php";
$type = "players/transfer";
if (!$act) {
    $act = "first";
}
$_POST['priv'] = checkpriv("players/transfer", "check");
require $site_path . "up.php";
require $site_path . "left.php";
if (0 == 1) {
    print icon('green', "Трансфер временно закрыт для проведения профилактических работ. (до 10.06.06)");
} else {
    print "<center><table border=0 cellspacing=1 bgcolor=B1B1B1 cellpadding=0><tr>";
    $num = $form->numrows;
    $bgcol = "F1F4F7";
    $q = select("select u.TrStatus as TrStatus, tr_fond({$auth->team}) as fond from ut_teams t left outer join ut_users u on u.UserID=t.UserID where t.TeamID='{$auth->team}'");
    print "<td><table border=0 cellspacing=0 cellpadding=2 bgcolor=B1B1B1 height=20px><tr bgcolor=\"{$bgcol}\"  height=20px><td><img src=\"/images/icons/golden.gif\" height=15px title=\"" . message(149) . "\" width=15px border=0> </td><td><b>" . message(141) . ":</b> " . dots($q[fond]) . $gd . "</td></table>";
    print "<td><table border=0 cellspacing=0 cellpadding=2 bgcolor=B1B1B1 height=20px><tr bgcolor=\"{$bgcol}\"  height=20px><td height=15px><img src=\"/images/icons/transfer.gif\" height=15px title=\"" . message(150) . "\" width=15px border=0> </td><td><b>" . message(142) . ":</b> " . $q[TrStatus] . "</td></table>";
    print "</td><td><table border=0 cellspacing=0 cellpadding=2 bgcolor=B1B1B1 height=20px><tr bgcolor=\"{$bgcol}\"  height=20px><td><img src=\"/images/icons/player.gif\" height=15px title=\"" . message(151) . "\" width=15px border=0> </td><td> <b>" . message(143) . ":</b> " . $num . "</td></table>";
    print "</td>";
    print "</table><br>";
    print "<table border=0 cellspacing=1 bgcolor=B1B1B1 cellpadding=4><tr bgcolor={$bgcol}>";
    $q = select("select Tr_SenderPerc+Tr_LeaguesPerc as Tr_SenderPerc,Tr_ReceiverPerc+Tr_LeaguesPerc as Tr_ReceiverPerc,Tr_LegionerPerc FROM ut_leagues u");
    print "<td><b>" . message(144) . ":</b> </td>";
    print "<td>" . message(145) . ": <b><font color=EC9E10>{$q['0']}%</b></font></td>";
    print "<td>" . message(146) . ": <b><font color=green>{$q['1']}%</b></font>,";
    print " " . message(147) . ": <b><font color=green>+{$q['2']}%</font></b></td>";
    print "</table></center><br>";