<html>
<head>
<title>ADMIN Bereich</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
body {
background-color: #cccccc;
}
table { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: xx-small; font-weight: bold; color: #000000; text-decoration: none}
a:active { color: #000000; text-decoration: underline}
a:hover { color: #666666; text-decoration: underline}
a:link { color: #000000; text-decoration: underline}
a:visited { color: #000000; text-decoration: underline}
-->
</style></head>
<SCRIPT LANGUAGE="JavaScript">
<!--
function validate_form() {
validity = true; // assume valid
if (!check_empty(document.form.VERFASSER.value))
{ validity = false; alert('Verfasser wurde nicht angegeben!'); }
if (!check_empty(document.form.TITEL.value))
{ validity = false; alert('Es wurde kein Titel eingegeben!'); }
if (!check_empty(document.form.NEWS.value))
{ validity = false; alert('Es wurden keine News eingetragen"'); }
return validity;
}
function check_empty(text) {
return (text.length > 0); // gibt false zurück wenn leer
}
// -->
</script>
<body>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><?PHP
$include = 1;
$needed_rang = 2;
include("protection.php");
$host = "localhost";
$log = "root";
$pass = "";
$db = "db74849";
$link = mysql_connect($host, $log, $pass);
mysql_select_db($db, $link);
mysql_query("INSERT news SET Verfasser = '$verfasser', Titel = '$titel', Datum = '$datum', News = '$news'");
$datum = date("d.m.Y");
?>
<p>News schreiben</p>
<form name="news" method="post" action="<?=$PHP_SELF?>">
<table width="100%" valign="top" border="1" cellpadding="0" cellspacing="0" bordercolor="#000000">
<tr>
<td width="24%">Verfasser:</td>
<td width="76%"><input type="text" name="VERFASSER" value="<?=$verfasser?>"></td>
</tr>
<tr>
<td>Titel:</td>
<td><input type="text" name="TITEL" value="<?=$titel?>"></td>
</tr>
<tr>
<td>News:</td>
<td><textarea name="NEWS" rows=8 cols=50 wrap=virtual value="<?=$news?>"></textarea></td>
</tr>
<tr>
<td> </td>
<td><input type="submit" name="Submit" value="Senden"></td>
</tr>
</table>
</form>
<p> </p>
</p></td>
</tr>
</table>
</body>
</html>