<?php
/*
 ########################################################################
#                                                                        #
#           Version 4       /                        /   /               #
#          -----------__---/__---__------__----__---/---/-               #
#           | /| /  /___) /   ) (_ `   /   ) /___) /   /                 #
#          _|/_|/__(___ _(___/_(__)___/___/_(___ _/___/___               #
#                       Free Content / Management System                 #
#                                   /                                    #
#                                                                        #
#                                                                        #
#   Copyright 2005-2006 by webspell.org                                  #
#                                                                        #
#   visit webSPELL.org, webspell.info to get webSPELL for free           #
#   - Script runs under the GNU GENERAL PUBLIC LICENSE                   #
#   - It's NOT allowed to remove this copyright-tag                      #
#   -- http://www.fsf.org/licensing/licenses/gpl.html                    #
#                                                                        #
#   Code based on WebSPELL Clanpackage (Michael Gruber - webspell.at),   #
#   Far Development by Development Team - webspell.org                   #
#                                                                        #
#   visit webspell.org                                                   #
#                                                                        #
 ########################################################################
*/

if(!ispageadmin($userID) OR substr(basename($_SERVER[REQUEST_URI]),0,15) != "admincenter.php") die('Access denied.');
if($_POST['submit'] != "") {
	$about = $_POST['about'];
	
    if(mysql_num_rows(safe_query("SELECT * FROM ".PREFIX."about")))
	    safe_query("UPDATE ".PREFIX."about SET about='".mysql_escape_string($about)."'");
	else safe_query("INSERT INTO ".PREFIX."about (about) values( '".mysql_escape_string($about)."') ");
  redirect("admincenter.php?site=about","Successfully updated.");
}
else {
	echo'<h2>about us</h2>';
	$ergebnis=safe_query("SELECT * FROM ".PREFIX."about");
	$ds=mysql_fetch_array($ergebnis);
	
	echo'<form method="post" action="admincenter.php?site=about">
	     <table cellpadding="0" cellspacing="3">
		     <td>
			   about us: you can use HTML-tags<br>
			   <textarea name="about" cols="100" rows="30" class="form_off" onFocus="this.className=\'form_on\'" onBlur="this.className=\'form_off\'">'.$ds[about].'</textarea>
			 </td>
		   </tr>
		   <tr><td><input type="submit" name="submit" value="update"></td></tr>
		 </table>
		 </form>';
}
?>
