Location: PHPKode > projects > PhpMyContent > phpMyContent-0.1/typ.php3
<?
	require 'inc/config.php3';			// Variablen Deklaration
	require "$inc_path/db_connect.php3";	// Datenbank Verbindung
	require "$inc_path/auth.php3";		// Authentifizierung
	require "$inc_path/header.php3";		// HTML Header (Layout)
	require "$inc_path/user_track.php3";	// User Logging

	if ($status == 'Superuser') {
?>		<center>
		<form action="typ.php3" name="form" method="post">
		<input type="hidden" name="projekt" value="<?echo $projekt?>">
		<input type="hidden" name="bereich" value="<?echo $bereich?>">
		<input type="hidden" name="dokument" value="<?echo $dokument?>">

		<select name="typ" style="width:200 pt;background='#ffffff'" onchange="form.submit();">
				<option value="">[<?echo $label_waehlen?>]</option>
<?				$sqlquery = "	SELECT 		Typ.autoID,
								Typ.name
						FROM 		Typ
						ORDER BY 	Typ.autoID ASC";
				$db_object->query_db($content_db, $sqlquery); 
				while ($row = $db_object->getrow()) {
?>					<option value="<?echo $row[0]?>"><?echo $row[0]?>&nbsp;<?echo $db_object->unescapeChar($row[1])?></option>
<?				}
?>			</select>
		</form>

<?		if ($typ) {
			$sqlquery = "	SELECT 		Typ.autoID,
							Typ.name,
							Typ.beschreibung,
							Typ.mime
					FROM 		Typ
					WHERE 		Typ.autoID = $typ";
			$db_object->query_db($content_db, $sqlquery); 
			$row = $db_object->getrow();
?>			<form action="typ_update.php3" method=post>
			<input type="hidden" name="projekt" value="<?echo $projekt?>"> 
			<input type="hidden" name="bereich" value="<?echo $bereich?>"> 
			<input type="hidden" name="dokument" value="<?echo $dokument?>"> 
			<input type="hidden" name="typ" value="<?echo $row[0]?>"> 
			<table border=0>
			<tr>	<td>ID:</td> 
				<td><input type="text" name="typID" value="<?echo ($row[0]);?>" style="width=500pt; background='white';" size=50 ></td> 
			</tr> 
			<tr>	<td>Name:</td> 
				<td><input type="text" name="typName" value="<?echo $db_object->unescapeChar($row[1]);?>" style="width=500pt; background='white';" size=50 ></td> 
			</tr> 
			<tr>	<td>Beschreibung:</td> 
				<td><textarea name="typBeschreibung" cols=80 rows=10  style="width=500pt; background='white';"><?echo $db_object->unescapeChar($row[2]);?></textarea></td> 
			</tr> 
			<tr>	<td>Mime:</td> 
				<td><input type="text" name="typMime" value="<?echo $db_object->unescapeChar($row[3]);?>" style="width=500pt; background='white';" size=50></td> 
			</tr> 

			</table>
			<input type=submit value="<?echo $nav_speichern;?>" style="width: 500pt;"> 
			</form>

			<form action="typ_del.php3" method=post onsubmit="return confirm('<?echo $nav_warnung_loeschen?>');">
			<input type="hidden" name="projekt" value="<?echo $projekt?>"> 
			<input type="hidden" name="bereich" value="<?echo $bereich?>"> 
			<input type="hidden" name="dokument" value="<?echo $dokument?>"> 
			<input type="hidden" name="typ" value="<?echo $row[0]?>"> 
			<input type=submit value="<?echo $nav_loeschen;?>" style="width: 500pt;"> 
			</form>
<?		} else {
?>			<form action="typ_insert.php3" method=post>
			<input type="hidden" name="projekt" value="<?echo $projekt?>"> 
			<input type="hidden" name="bereich" value="<?echo $bereich?>"> 
			<input type="hidden" name="dokument" value="<?echo $dokument?>"> 
			<table border=0> 
			<tr>	<td>ID:</td> 
				<td><input type="text" name="typID" value="" style="width=500pt; background='white';" size=50 ></td> 
			</tr> 
			<tr>	<td>Name:</td> 
				<td><input type="text" name="typName" value="" style="width=500pt; background='white';" size=50 ></td> 
			</tr> 
			<tr>	<td>Beschreibung:</td> 
				<td><textarea name="typBeschreibung" cols=80 rows=10  style="width=500pt; background='white';"></textarea></td> 
			</tr> 
			<tr>	<td>Mime:</td> 
				<td><input type="text" name="typMime" value="" style="width=500pt; background='white';" size=50></td> 
			</tr> 

			</table> 
			<input type=submit value="<?echo $nav_speichern;?>" style="width: 500pt;"> 
			</form>
<?		}
?>
		</center>
<?	}
	require 'inc/db_disconnect.php3';
	require 'inc/footer.php3';

?>
Return current item: PhpMyContent