<?php
session_start();
if($_SESSION["xcadmin"] == TRUE) {
include('ini/includes.php');
echo "Sie sind eingeloggt als <b>$_GET[name]</b> | <a href=\"logout.php\">Logout</a>";
//////////////////////////////////////////
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Adminbereich 1.0</title>
<style type="text/css">
<!--
.style1 {color: #FF0000}
.style2 {color: #000000}
body,td,th {
font-family: Verdana, Arial, Helvetica, sans-serif, Japan;
font-size: 10px;
}
a:link {
color: #999999;
text-decoration: none;
}
a:visited {
color: #999999;
text-decoration: none;
}
a:hover {
color: #FF0000;
text-decoration: none;
}
a:active {
color: #FF0000;
text-decoration: none;
}
-->
</style>
</head>
<body>
<div id="content">
<div align="center">
<center>
<table width="532" height="102" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="12" background="bilder/top.gif"><?php include('ini/menu.php'); ?></td>
</tr>
<tr>
<td height="82" background="bilder/bottom.gif"><p>
<center><table width=526 align="center" height="56">
<font face="Geneva,Verdana,Arial,Helvetica,Geneva" style="font-size:9px;">
<form action="check.php" method="post">
</center>
<td width="518" height="38"><p align="left"><br>
<br>
<?php ////content /// ?>
<?php
if($do=="delite") {
echo "Willst du den Eintrag wirklich löschen?<BR>";
echo "<form action=\"gb_action.php?name=$_Get[name]&do=delite&did=$did&action=ja\" method=post>";
echo "<input type=submit class=\"button\" name=\"action\" value=\"ja\"> <input type=submit class=\"button\" name=\"action\" value=\"nein\">";
echo "</form>";
}
if($do=="delite" AND $_Get[action]=="ja")
{
$delete="DELETE FROM xc_gbook WHERE `ID`='$did'";
if(mysql_query($delete,$conn)) { echo "Der Eintrag wurde erfolgreich gelöscht!"; } else { echo "Der Eintrag konnte nicht gelöscht werden!<BR>"; }
}
if($do=="edit") {
$select="SELECT * FROM xc_gbook WHERE `ID`='$did'";
$select=mysql_query($select,$conn);
if(mysql_num_rows($select)!=1) { echo "Fehler, der Eintrag konnte nicht gefunden werden!"; } else {
$ergebnis=mysql_fetch_array($select);?>
<form name="gb_edit" method="post" action="gb_action.php?name=<? echo $name; ?>&do=edit&did=<?php echo $did; ?>">
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="content">
<tr align="left" valign="top">
<th width="18%" scope="col">Name:</th>
<th width="82%" scope="col"><input name="name" type="text" value="<?php echo $ergebnis[name]; ?>" size="30"></th>
</tr>
<tr align="left" valign="top">
<th scope="row">e-Mail:</th>
<td><input name="mail" type="text" value="<?php echo $ergebnis[mail]; ?>" size="30"></td>
</tr>
<tr align="left" valign="top">
<th scope="row">Homepage:</th>
<td><input name="url" type="text" id="url" value="<?php echo $ergebnis[url]; ?>" size="30"></td>
</tr>
<tr align="left" valign="top">
<th scope="row">Text:</th>
<td><textarea name="text" cols="40" rows="6"><?php echo $ergebnis[text]; ?></textarea>
</td>
</tr>
<tr align="left" valign="top">
<th scope="row"> </th>
<td><input type="submit" name="Submit" value="Bearbeiten"></td>
</tr>
</table>
</form>
<?
}
}
if($do=="edit" AND $_Get[action]=="ja") { }
?>
<?php ///content ende /// ?>
</table>
<center>
<div align="center"></div></center></font></td>
</tr>
<tr>
<td height="12" background="bilder/rof.gif">
<p align="center"><font color="#008000">Powered by <a href="http://www.x-coder.net">X-Coder</a></font></p>
</td>
</tr>
</table>
</center>
</div>
<div align="center"><br>
</div>
</body>
</html>
<?php
////////////////////////////////////////
} else {
echo "Sie sind nicht eingeloggt.";
}
?>