- Joined
- May 18, 2008
- Messages
- 1,943
- Reaction score
- 446
ГМ Лсит On/off php script
Ако вашия код за ГМ е 32 Просто променете
ако вие 8 променете така
Enjoy!
Code:
<?
include("config.php");
$query=mssql_query("SELECT * FROM Character WHERE CtlCode=32");
while($gm=mssql_fetch_array($query)){
$stat="";
$gmname=$gm['Name'];
$gmacc=$gm['AccountID'];
$query2=mssql_query("SELECT ConnectStat FROM MEMB_STAT WHERE memb___id='$gmacc'");
$query3=mssql_query("SELECT GameIDC FROM AccountCharacter WHERE Id='$gmacc'");
$query3=mssql_result($query3, 0, 0);
$rquery2=mssql_num_rows($query2);
if($rquery2<1) { $query2 = '0'; }
else{ $query2=mssql_result($query2, 0, 0); }
if($query2=='1'){
if($query3==$gmname){
$stat = '<font color=green><strong>[ON]</strong></font>';
}
}
if($query2=='0'){
$stat = '<font color=red><strong>[OFF]</strong></font>';
}
if($query2=='1' AND $query3 <> $gmname){
$stat = '<font color=red><strong>[OFF]</strong></font>';
}
echo "$gmname $stat";
echo "<br>";
}
?>
Ако вашия код за ГМ е 32 Просто променете
Code:
[COLOR="SeaGreen"]$query=mssql_query[/COLOR][COLOR="Red"] ("SELECT * FROM Character WHERE CtlCode=32")[/COLOR];
ако вие 8 променете така
Code:
[COLOR="SeaGreen"]$query=mssql_query[/COLOR] [COLOR="Red"]("SELECT * FROM Character WHERE CtlCode=8")[/COLOR];
Enjoy!
Last edited: