Гильдии "; $sql = mysql_query("SELECT * FROM `guild` ORDER by `name`"); echo "
"; while ($row = mysql_fetch_array($sql)){ $query_num = mysql_query("SELECT COUNT(*) FROM `guild_member` WHERE `guildid`='$row[guildid]'"); $gleader = "SELECT name,race FROM `characters` WHERE `guid`='$row[leaderguid]'"; $myrow = mysql_fetch_array(mysql_query($gleader)); if($myrow['race']=="1" or $myrow['race']=="3" or $myrow['race']=="4" or $myrow['race']=="7" or $myrow['race']=="11"){ $faction = "alliance"; }else{ $faction = "horde";} $num = mysql_fetch_row($query_num); echo " "; } echo "
Гильдия В гильдии Создана Guild Master Фракция Денег в банке
".$row['name']."
".$num['0']."
".$row['createdate']."
".$myrow['name']."
"; echo getGold($row['BankMoney']); echo "
"; } if (@$_GET['guid'] ) { $guild_name = "SELECT name,createdate,BankMoney,info,motd FROM `guild` WHERE `guildid`='$_GET[guid]'"; $myrow = mysql_fetch_array(mysql_query($guild_name)); echo "
Состав гильдии
"; echo " "; $sql = mysql_query("SELECT * FROM `characters`, `guild_member` WHERE `characters`.`guid`=`guild_member`.`guid` and `guildid` = '".$_GET["guid"]."' ORDER BY `rank`"); while ($row = mysql_fetch_array($sql)) { $guild = "SELECT rank,pnote,guid FROM `guild_member` WHERE `guid`='$row[guid]' ORDER BY `rank`"; $myrow = mysql_fetch_array(mysql_query($guild)); $grankquery = mysql_query("SELECT `rid`, `rname` FROM `guild_rank` WHERE `guildid` = '".$_GET["guid"]."'"); $guildranks = array(); while($results = mysql_fetch_array($grankquery)) { $guildranks[$results["rid"]] = $results["rname"]; } $rank = @$guildranks[$myrow['rank']+1]; $rank1 = $myrow['rank']+1; $data = explode(' ',$row['data']); $lvl = $data[53]; $gender = dechex($data[36]); $gender = str_pad($gender,8, 0, STR_PAD_LEFT); $gender = $gender{3}; $guid = $row['guid']; $race = $row['race']; $class = $row['class']; $info = $myrow['pnote']; echo " "; } echo "
Название гильдии: ".$myrow['name']."
Создана: ".$myrow['createdate']."
Денег в банке: ".getGold($myrow['BankMoney'])."
Информация о гильдии: "; if(empty($myrow['info'])){ echo "Отсутствует"; }else{ echo $myrow['info']; } echo "
Сообщение дня: "; if(empty($myrow['motd'])){ echo "Отсутствует"; }else{ echo $myrow['motd']; } echo "
lvl Расса Класс Имя игрока Ранг Инфо
$lvl $row[name] "; if($rank1=='1'){ echo "".@$rank.""; }elseif($rank1=='2'){ echo "".@$rank.""; }elseif($rank1=='3'){ echo "".@$rank.""; }elseif($rank1=='4'){ echo "".@$rank.""; }elseif($rank1=='5'){ echo "".@$rank.""; }else{ echo "".@$rank.""; } echo " ".$info."
"; } ?>