<?php
include("connecting.php");

function deletefromcrew($number) {

$query[$number] = mysql_query("SELECT * FROM `pytox_community` WHERE `bruger` LIKE '{$_COOKIE[user]}' LIMIT 1");

while($slet = mysql_fetch_array($query[$number])) {

if ($_COOKIE[pass] == $slet[kode]) {

 if ($slet[admin] == 1) {

	if ($slet[exist] == 1) {

print "&nbsp;-&nbsp;<a style=\"border:0px;\" href=\"?site=Userlist&amp;choose=editusercom&amp;userid=".$number."&amp;subchoose=deletefromcrew\" title=\"Slet fra crew-listen\"><img src=\"../gfx/slet.jpg\" alt=\"Slet!\" /></a>";

	}
 }
}
}

}

?>
<table style"width:100%;"> 
 <tr> 
  <td style="width:10%;">
<img src="http://pytox.dk/pytox/sites/crew/ejer.jpg" alt="" />
  </td> 
  <td style="width:90%;">
<?php
$ejer = mysql_query("SELECT * FROM `pytox_community` WHERE `rang` LIKE 'ejer' ORDER BY `bruger` ASC") or die(mysql_error());

$all1 = $ejer;

if (mysql_num_rows($all1) > 1) {

print "<strong>Ejere (".mysql_num_rows($all1).")</strong>:<br />";

} else {

print "<strong>Ejer (".mysql_num_rows($all1).")</strong>:<br />";

}

while ($user1 = mysql_fetch_array($ejer)) {

if (mysql_num_rows($all1) == 0) {
print "Ingen";
} else {

print "<a href=\"?site=Com.users&amp;userid=".$user1[id]."\">".$user1[bruger]."</a>";

deletefromcrew($user1[id]);

print "<br />";

}
}
?>
  </td> 
  </tr> 
</table> 

<table style="width:100%;"> 
 <tr> 
  <td style="width:10%;">
<img src="http://pytox.dk/pytox/sites/crew/redaktor.jpg" alt="" />
  </td>
  <td style="width:90%;">
<?php
$redaktor = mysql_query("SELECT * FROM `pytox_community` WHERE `rang` LIKE 'redaktor' ORDER BY `bruger` ASC") or die(mysql_error());

$all2 = $redaktor;

if (mysql_num_rows($all2) > 1) {

print "<strong>Redaktøre (".mysql_num_rows($all2).")</strong>:<br />";

} else {

print "<strong>Redaktør (".mysql_num_rows($all2).")</strong>:<br />";

}

while ($user2 = mysql_fetch_array($redaktor)) {

if (mysql_num_rows($all2) == 0) {
print "Ingen";
} else {

print "<a href=\"?site=Com.users&amp;userid=".$user2[id]."\">".$user2[bruger]."</a>";

deletefromcrew($user2[id]);

print "<br />";

}
}
?>
  </td> 
 </tr> 
</table> 

<table style="width:100%;"> 
 <tr> 
  <td style="width:10%;">
<img src="http://pytox.dk/pytox/sites/crew/chef.jpg" alt="" />
  </td> 
  <td style="width:90%;"><?php
$chjour = mysql_query("SELECT * FROM `pytox_community` WHERE `rang` LIKE 'chef journalist' ORDER BY `bruger` ASC") or die(mysql_error());

$all3 = $chjour;

if (mysql_num_rows($all3) > 1) {

print "<strong>Chef journalister (".mysql_num_rows($all3).")</strong>:<br />";

} else {

print "<strong>Chef journalist (".mysql_num_rows($all3).")</strong>:<br />";

}

while ($user3 = mysql_fetch_array($chjour)) {

if (mysql_num_rows($all3) == 0) {
print "Ingen";
} else {

print "<a href=\"?site=Com.users&amp;userid=".$user3[id]."\">".$user3[bruger]."</a>";

deletefromcrew($user3[id]);

print "<br />";

}
}
?>
  </td> 
 </tr> 
</table>

<table style="width:100%;"> 
 <tr> 
  <td style="width:10%;">
<img src="http://pytox.dk/pytox/sites/crew/journalist.jpg" alt="" />
  </td> 
  <td style="width:90%;"><?php
$jour = mysql_query("SELECT * FROM `pytox_community` WHERE `rang` LIKE 'journalist' ORDER BY `bruger` ASC") or die(mysql_error());

$all4 = $jour;

if (mysql_num_rows($all4) > 1) {

print "<strong>Journalister (".mysql_num_rows($all4).")</strong>:<br />";

} else {

print "<strong>Journalist (".mysql_num_rows($all4).")</strong>:<br />";

}

while ($user4 = mysql_fetch_array($jour)) {

if (mysql_num_rows($all4) == 0) {
print "Ingen";
} else {

print "<a href=\"?site=Com.users&amp;userid=".$user4[id]."\">".$user4[bruger]."</a>";

deletefromcrew($user4[id]);

print "<br />";

}
}
?>
  </td> 
  </tr> 
</table> 
 
<table style="width:100%;"> 
  <tr> 
  <td style="width:10%;">
<img src="http://pytox.dk/pytox/sites/crew/support.jpg" alt="" />
  </td> 
  <td style="width:90%;"><?php
$sup = mysql_query("SELECT * FROM `pytox_community` WHERE `rang` LIKE 'supporter' ORDER BY `bruger` ASC") or die(mysql_error());

$all5 = $sup;

if (mysql_num_rows($all5) > 1) {

print "<strong>Supportere (".mysql_num_rows($all5).")</strong>:<br />";

} else {

print "<strong>Supporter (".mysql_num_rows($all5).")</strong>:<br />";

}

while ($user5 = mysql_fetch_array($sup)) {

if (mysql_num_rows($all5) == 0) {
print "Ingen";
} else {
print "<a href=\"?site=Com.users&amp;userid=".$user5[id]."\">".$user5[bruger]."</a>";

deletefromcrew($user5[id]);

print "<br />";

}
}
?>
  </td> 
 </tr> 
</table> 

<table style="width:100%;"> 
  <tr> 
  <td style="width:10%;">
<img src="http://pytox.dk/pytox/sites/crew/amm.jpg" alt="" />
  </td> 
  <td style="width:90%;"><?php
$supq = mysql_query("SELECT * FROM `pytox_community` WHERE `rang` LIKE 'amm' ORDER BY `bruger` ASC") or die(mysql_error());

$allq = $supq;

if (mysql_num_rows($allq) > 1) {

print "<strong>Altmulig-mænd (".mysql_num_rows($allq).")</strong>:<br />";

} else {

print "<strong>Altmulig-mand (".mysql_num_rows($allq).")</strong>:<br />";

}

while ($userq = mysql_fetch_array($supq)) {

if (mysql_num_rows($allq) == 0) {
print "Ingen";
} else {
print "<a href=\"?site=Com.users&amp;userid=".$userq[id]."\">".$userq[bruger]."</a>";

deletefromcrew($userq[id]);

print "<br />";

}
}
?>
  </td> 
 </tr> 
</table> 

<table style="width:100%;"> 
 <tr> 
  <td style="width:10%;">
<img src="http://pytox.dk/pytox/sites/crew/fotograf.jpg" alt="" />
  </td> 
  <td style="width:90%;"><?php
$foto = mysql_query("SELECT * FROM `pytox_community` WHERE `rang` LIKE 'fotograf' ORDER BY `bruger` ASC") or die(mysql_error());

$all6 = $foto;

if (mysql_num_rows($all6) > 1) {

print "<strong>Fotografer (".mysql_num_rows($all6).")</strong>:<br />";

} else {

print "<strong>Fotograf (".mysql_num_rows($all6).")</strong>:<br />";

}

while ($user6 = mysql_fetch_array($foto)) {

if (mysql_num_rows($all6) == 0) {
print "Ingen";
} else {

print "<a href=\"?site=Com.users&amp;userid=".$user6[id]."\">".$user6[bruger]."</a>";

deletefromcrew($user6[id]);

print "<br />";


}
}
?>
  </td> 
 </tr> 
</table>

<table style="width:100%;"> 
 <tr> 
  <td style="width:10%;">
<img src="http://pytox.dk/pytox/sites/crew/reklamor.jpg" alt="" />
  </td> 
  <td style="width:90%;"><?php
$reklam = mysql_query("SELECT * FROM `pytox_community` WHERE `rang` LIKE 'reklamor' ORDER BY `bruger` ASC") or die(mysql_error());

$all7 = $reklam;

if (mysql_num_rows($all7) > 1) {

print "<strong>Reklamører (".mysql_num_rows($all7).")</strong>:<br />";

} else {

print "<strong>Reklamør (".mysql_num_rows($all7).")</strong>:<br />";

}

while ($user7 = mysql_fetch_array($reklam)) {

if (mysql_num_rows($all7) == 0) {
print "Ingen";
} else {

print "<a href=\"?site=Com.users&amp;userid=".$user7[id]."\">".$user7[bruger]."</a>";

deletefromcrew($user7[id]);

print "<br />";

}
}
?>
  </td> 
 </tr> 
</table>  

<table style="width:100%;"> 
 <tr> 
  <td style="width:10%;">
<img src="http://pytox.dk/pytox/sites/crew/prove.jpg" alt="" />
  </td> 
 <td style="width:90%;">
<?php
$prove = mysql_query("SELECT * FROM `pytox_community` WHERE `rang` LIKE 'prove' ORDER BY `bruger` ASC") or die(mysql_error());

$all8 = $prove;

if (mysql_num_rows($all8) > 1) {

print "<strong>På prøve (".mysql_num_rows($all8).")</strong>:<br />";

} else {

print "<strong>På prøve (".mysql_num_rows($all8).")</strong>:<br />";

}

while ($user8 = mysql_fetch_array($prove)) {

if (mysql_num_rows($all8) == 0) {
print "Ingen";
} else {

print "<a href=\"?site=Com.users&amp;userid=".$user8[id]."\">".$user8[bruger]."</a>";

deletefromcrew($user8[id]);

print "<br />";

}
}
?>
  </td> 
 </tr> 
</table>  
<br /><br />


<strong>E</strong>j hvor sjovt, der er et job ledigt, som jeg søger - <a href="?site=Support&amp;support=crewmember">Send din jobansøgning her!</a>
