All pastes #741193 Raw Edit

Jemand

public text v1 · immutable
·published 2007-10-18 14:50 UTC
rendered paste body
<?php

include 'head.php';
include 'sql.php';

$noadmin = 'Failed! No Administrators Aviable!';
$nogm = 'Failed! No GameMasters Aviable!';
$notestgm = 'Failed! No Test-Gm\'\s Aviable!';
$nomod = 'Failed! No Moderators Aviable!';

  $abfrage = "SELECT login, gm FROM accounts WHERE gm ='az'";
  $ergebnis = mysql_query($abfrage);
  while($row = mysql_fetch_object($ergebnis))
    {
	print 'Admin ';
	echo $row->login;
	print '<br>';
    }
	print '<br><br>';
	
			$abfrage2 = "SELECT login, gm FROM accounts WHERE gm ='3'";
  $ergebnis2 = mysql_query($abfrage2);
  while($row = mysql_fetch_object($ergebnis2))
  
	if (mysql_num_rows($ergebnis2) == 0) {
		print $nogm;
	} else {
	print 'GameMaster ';
	echo $row->login;
	print '<br>';
				}
	print '<br><br>';
	
			$abfrage3 = "SELECT login, gm FROM accounts WHERE gm ='tf'";
  $ergebnis3 = mysql_query($abfrage3);
  while($row = mysql_fetch_object($ergebnis3))
	
	if (mysql_num_rows($ergebnis3) == 0) {
		print $notestm;
	} else {

	print 'Test-GM ';
	echo $row->login;
	print '<br>';
				}
print '<br><br>';
	
			$abfrage4 = "SELECT login, gm FROM accounts WHERE gm ='1'";
  $ergebnis4 = mysql_query($abfrage4);
  while($row = mysql_fetch_object($ergebnis4))
	
	if (mysql_num_rows($ergebnis4) == 0) {
		print $nomod;
	} else {
	print 'Moderator ';
	echo $row->login;
	print '<br>';
				}
	
	
	
	
	include 'foot.php';
  ?>