Просмотр файла bands/viewband.php

Размер файла: 2.02Kb
<?php
include "./../ini3.php";
include "./../includes/header2.php";


$id=cyr(htmlspecialchars(stripslashes(trim($id))));
$pass=cyr(htmlspecialchars(stripslashes(trim($pass))));
$band=cyr(htmlspecialchars(stripslashes(trim(urldecode($band)))));

if(!empty($id)) 
{
$q = mysql_query("select id,login,pass from users where id='".$id."';"); 
}
else
{
die ($lang['empty_login']."</body></html>");
}

if(empty($band) && $mode!="new") 
{
die($lang['bands_band_not_chosen']."<br/><anchor>".$lang['back']."<prev/></anchor></body></html>"); 
}


$data = mysql_fetch_array($q);

$id=$data['id'];
$login=$data['login'];
$band=$data['band'];

if(md5($pass)!=$data['pass'])
{
die ($lang['empty_login']."</body></html>");
}

$band_q=mysql_query("select * from bands where name='".$band."';");
$band_array=mysql_fetch_array($band_q);
$name=$band_array['name'];
$boss=$band_array['boss'];
$members=$band_array['members'];
$blvl=$band_array['blvl'];
$osob=$band_array['osobnyak'];

$band_members = explode(".", $members);
$count_members=count($band_members);
switch($mode){
default:



$band_members = explode(".", $members);
$count_members=count($band_members);
print "<b>".$lang['bands_bandname']."</b>: $name<br/>";

$db=mysql_fetch_array(mysql_query("select id from users where login='".$boss."';"));
$dbid=$db['id'];


print "<b>".$lang['bands_boss']."</b>: <a href=\"./../userview.php?id=$id&amp;pass=$pass&amp;dbid=$dbid\"><b>$boss</b></a><br/>";
print "<b>Уровень банды</b>: $blvl<br/>";
print "<b>".$lang['bands_members']."($count_members)</b>:<br/>";
if($band=="")print "<a href=\"viewband.php?id=$id&amp;pass=$pass&amp;mode=new&amp;clans=$clans\">Вступить в банду</a><br/>";
for($i=0;$i<$count_members;$i++)
{
print $band_members[$i].","; 
}
print "<br/>";

mysql_query("update users set last='".time()."',city='0' where id='".$id."';");
break;
}

print "&gt;&gt;<a href=\"./../game.php?id=$id&amp;pass=$pass\">".$lang['menu']."</a><br/></body></html>";

mysql_close();
?>