        <?php
		if ($logged){
		if (!empty($_GET["edit"]))
		{
			$edit = $_GET["edit"];
			$boxcontent = pg_fetch_row(pg_query("SELECT box FROM boxes WHERE id='$edit'"));
			printf ("
			<form action='docs/editbox.php?id=$edit' method='post'>
            box <br />
			<textarea type='text' name='box' rows='18' cols='50' size='1024' length='1024' value='box'>".$boxcontent[0]."</textarea><BR>
            <input type='submit' name='submit' value='submit'>
            <input type='reset' name='clear' value='clear'>
			</form>
			<br />
			<a href='?a=news'>back</a>
			");
		}
		else {
			printf ("
			<form action='docs/addbox.php' method='post'>
            box <br />
			<textarea type='text' name='box' rows='18' cols='50' size='1024' length='1024' value='box'></textarea><BR>
            <input type='submit' name='submit' value='submit'>
            <input type='reset' name='clear' value='clear'>
			</form>
			<br />
			<a href='?a=news'>back</a>
			");
			}
		}
		else {
			printf ("550");
		}
		?>