Просмотр файла release_fix#2/api/getguildusers.php

Размер файла: 1.11Kb
<?php
include "../connect.php";
$api_key=$_GET['ak'];
$user=$_GET['u'];
$login_test="";
$query = "SELECT * FROM users WHERE login='$user'";
$cat = mysql_query ($query);
if(!$cat) exit (mysql_error());
while(list($id,$login,$pass,$mail,$reg,$class,$m,$h,$z,$s,$mon,$gold,$pms,$lvl,$ava,$ban,$online,$exp,$guild) = mysql_fetch_row($cat))
{
$login_test="ok";
}
if($login_test=="ok")
{
if($api_key==md5($user))
{
$guild=$_GET['guild'];
$query = "SELECT*FROM guildc WHERE guild='$guild'";
$cat = mysql_query ($query);
if(!$cat) exit (mysql_error());
while(list($id,$guild,$login,$pmscvb) = mysql_fetch_row($cat))
{
$ol="";
$query3 = "SELECT * FROM users WHERE login='$login'";
$cat3 = mysql_query ($query3);
if(!$cat3) exit (mysql_error());
while(list($id4,$login4,$pass4,$mail4,$reg4,$class4,$m4,$h4,$z4,$s4,$mon4,$gold4,$pms4,$lvl4,$ava4,$ban4,$online) = mysql_fetch_row($cat3))
{
if($online=="no")
{
$ol="off";
}
else
{
$ol="on";
}
}
echo "$id,$login,$ol,";
if($pmscvb=="100")
{
echo "admin";
}
else
{
echo "user";
}
}
}
else
{
echo "key_error";
}
}
else
{
echo "auth_error";
}
?>