"Pecknet_Session", "auth" => "Pecknet_Default_Auth", "perm" => "Pecknet_Perm", "user" => "Pecknet_User")); $auth->login_if($auth->auth["uid"]=="nobody"); // relogin, if this was requested... $perm->check("news"); $datestamp = date("U"); if($submitt) { $body = preprocess($body,$method); $body = ereg_replace("'", "''", $body); $topic = ereg_replace("'", "''", $topic); $insert="insert into news (name,email,image,topic,body,thread,datestamp,parent,category) values('" . $auth->auth["fullname"] . "','" . $auth->auth["email"] . "','$image','$topic','$body','0','$datestamp','0','$category')"; if(mysql_query($insert)) { $url = $sess->url("index.html"); header("Location: $url"); } else { echo mysql_errno() .": " . mysql_error() ."
"; } } else { $title = "Post News"; include "templates/main_header.inc"; $array = new http_var; $array->set("http","true"); $array->set("name",$auth->auth["fullname"]); $array->set("email",$auth->auth["email"]); $array->set("body",$body); $array->set("method",$method); $array->set("topic",$topic); $array->set("image",$image); $array->set("datestamp",date("U")); $array->set("parent",0); $array->set("category",$category); edit($array); include "templates/main_footer.inc"; } ?>