<?php
///////////////////////////////////////////////////////////////////////////////////////
// PHPizabi 0.848b C1 [ALICIA]                               http://www.phpizabi.net //
///////////////////////////////////////////////////////////////////////////////////////
// Please read the license.txt file before using / modifying this software           //
// Original author:         Claude Desjardins, R - feedback@realitymedias.com        //
// Last modification date:  August 13th 2006                                         //
// Version:                 PHPizabi 0.848b C1                                       //
//                                                                                   //
// (C) 2005, 2006 Real!ty Medias / PHPizabi - All rights reserved                    //
///////////////////////////////////////////////////////////////////////////////////////

	/* Check Structure Availability */
	if (!defined("CORE_STRAP")) die("Out of structure call");
	
	$tpl = new template;
	$tpl -> Load("write");
	
	if (isset($_POST["Submit"]) && me("is_administrator")) {
		
		myQ("
			INSERT INTO `[x]help`
			(`origin`,`title`,`body`,`username`)
			VALUES
			('{$_POST["origin"]}','{$_POST["title"]}','{$_POST["body"]}','".me("username")."')
		");
		
		$tpl -> Zone("saved", "show");
		$tpl -> AssignArray(array("new.id" => mysql_insert_id()));

	}
	
	$tpl -> AssignArray(array("origin" => $_GET["origin"]));
	
	$tpl -> CleanZones();
	$tpl -> Flush();

?>