<?
include ("./include/conf.inc.php");
include ("$basepfath/inc.conf.php");
include ("$usedpfath/include/header.inc.php");
include ("$usedpfath/include/usercheck.inc.php");
if ($HTTP_GET_VARS["fu"]==1)
{
$header = new EasyTemplate ("$usedpfath/templates/usedheader.tpl");
$footer = new EasyTemplate ("$usedpfath/templates/usedfooter.tpl");
$header -> assign("TITLE","Skrupel - UsedComm");
$header -> assign("URL",$usedurl);
$header -> easy_print();
if ($create==1)
{
?>
<body bgcolor="#444444" leftmargin="0" rightmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<center>
<table valign="top" border="0" height="100%" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td valign="top">
<center>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center" style="font-size:20px; font-weight:bold; filter:DropShadow(color=black, offx=2, offy=2)">Spiele die gelöscht werden können</td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> </td>
</tr><?
if ($skrupel_admin==1)
{
$abfrage = mysql_query("SELECT * FROM skrupel_usedcommspiele");
}
else{
$abfrage = mysql_query("SELECT * FROM skrupel_usedcommspiele WHERE user_1='$login_userid'");
}
if (mysql_num_rows($abfrage) < 1)
{?>
<tr>
<td align="center" class="stil1">Keine wartenden Spiele vorhanden die gelöscht werden können.</td>
</tr><?
}
else{?>
<tr>
<td>
<center>
<table width="70%" border="0">
<tr>
<td class="stil1" width="10%"><div align="center">Spiel</div></td>
<td class="stil1" width="25%"><div align="center">Name</div></td>
<td class="stil1" width="25%"><div align="center">Details</div></td>
<td class="stil1" width="25%"><div align="center">Vollzählig</div></td>
<td class="stil1" width="15%"><div align="center">Starten</div></td>
</tr>
<tr>
<td><div align="center"></div></td>
<td> </td>
<td> </td>
<td><div align="center"></div></td>
</tr>
<?
$n=1;
while ($row = mysql_fetch_object ($abfrage))
{
$playable=$row->playable;
$spiel_id=$row->id;
$spiel_name=$row->spiel_name;
$sieg=$row->siegbedingungen;
?>
<tr>
<td><div align="center"><? echo $n; ?></div></td>
<td><div align="center"><? echo $spiel_name; ?></div></td>
<td><div align="center"><a href="javascript:launchereins('spielinfo.php?fu=1&spiel_id=<? echo $spiel_id; ?>');">Anzeigen</a></div></td>
<td><div align="center"><? if($playable ==1){ echo "<img src=\"bilder/ja.gif\">";} else { echo "<img src=\"bilder/nein.gif\">";} ?></div></td>
<td><div align="center"><a href="loeschen.php?fu=2&spiel_id=<?echo $spiel_id; ?>">Löschen</a></div></td>
</tr><?
$n++;
}
}?>
</table>
</center>
</td>
</tr>
</table>
</center>
</td>
</tr>
</table>
</center>
<SCRIPT LANGUAGE='JavaScript'>
<!-- //
function launchereins(usedurl)
{
myTarget = 'spielinfo';
myArgs = 'width=700,height=525,location=0,menubar=0,resizable=1,scrollbars=1,status=0,titlebar=1,toolbar=0,hotkeys=0,screenx=0,screeny=0,left=0,top=0,dependent=yes';
window.open( usedurl+"/", myTarget, myArgs );
}
// -->
</SCRIPT>
<?
}
$footer -> easy_print();
}
if ($HTTP_GET_VARS["fu"]==2)
{
$header = new EasyTemplate ("$usedpfath/templates/usedheader.tpl");
$footer = new EasyTemplate ("$usedpfath/templates/usedfooter.tpl");
$header -> assign("TITLE","Skrupel - UsedComm");
$header -> assign("URL",$usedurl);
$header -> easy_print();
$spiel_id=$HTTP_GET_VARS["spiel_id"];
if ($create=1)
{
?>
<body bgcolor="#444444" link="#000000" vlink="#000000" alink="#000000" leftmargin="0" rightmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<center>
<table border="0" cellspacing="0" cellpadding="4">
<tr>
<td style="font-size:20px; font-weight:bold; filter:DropShadow(color=black, offx=2, offy=2)">Spiel löschen</td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td align="center" class="stil3">Dieses Spiel wird unwiederruflich gelöscht und alle Daten gehen verloren.</td>
</tr>
<tr>
<td align="center" class="stil3">Möchtest Du fortfahren?</td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<form name="formular" method="post" action="loeschen.php?fu=3">
<td aling="center"><input type="submit" name="loeschen" value="Ja" style="width:100px;">
<input type="hidden" name="spiel_id" value="<? echo $spiel_id; ?>"><td>
</form>
</tr>
</table>
</center>
<?
}
$footer -> easy_print();
}
if ($HTTP_GET_VARS["fu"]==3)
{
$header = new EasyTemplate ("$usedpfath/templates/usedheader.tpl");
$footer = new EasyTemplate ("$usedpfath/templates/usedfooter.tpl");
$header -> assign("TITLE","Skrupel - UsedComm");
$header -> assign("URL",$usedurl);
$header -> easy_print();
$loeschen=$HTTP_POST_VARS["loeschen"];
$spiel_id=$HTTP_POST_VARS["spiel_id"];
if (($create=1) AND ($loeschen=="Ja"))
{
$loeschen = mysql_query("DELETE FROM skrupel_usedcommspiele where id = '$spiel_id'");
?>
<body text="#ffffff" bgcolor="#444444" link="#000000" vlink="#000000" alink="#000000" leftmargin="0" rightmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<center>
<table border="0" height="100%" cellspacing="0" cellpadding="0">
<tr>
<td>Das Spiel wurde gelöscht.</td>
</tr>
</table>
</center><?
}
$footer -> easy_print();
}
?>