"); $pagetitle="Post New FAQ"; include("header.html"); //print("mode3=$mode
"); $dbname="wispfaq"; if(isset($wispfaqlogin)){ $sql="select email, name as postedname from users where username='$wispfaqlogin'"; unset($username); unset($postedname); include($path_to_mysql); } print("mode4=$mode
"); if(!isset($wispfaqlogin)){ $mode="noaccess"; } if($mode=="noaccess"){ print("
In order to submit new FAQs to the list, you must be a registered user. Please login, or Register
"); } ////////////////////////////// mode=new ///////////////////////////////////////////////////// if(!isset($mode)){ $mode="new"; } $dbname="wispfaq"; if($mode=="new"){ $sql="select * from categories order by title"; include($path_to_mysql); $numrows=sizeof($cat_id); $j=0; while($j<$numrows){ $selectcat.="\n"; $j++; } print("

Submit a Question and Answer:

Select Category
Submission Tips: You may include html tags in the Answer field as needed to properly format your FAQ. This includes pre/pre tags, font size tags, as well as embedded links.

You may edit your submission at any time by first searching for the FAQ. If you are logged in, then an Edit button should appear below Posted By:. Click on Edit to edit your existing FAQ.

You may post the URL of any FAQ by using the following format:


where x = the FAQ's ID number.
"); } //////////////////////////////mode=save////////////////////////////////////////////////////// if($mode=="save"){ $answer=nl2br($answer); $sql="insert into faq (catid, question, answer, postedby, email, ipaddress, active) values ($catid, '$question', '$answer', '$postedby2', '$email2', '$ipaddress', 'y')"; print("sql=$sql
"); include($path_to_mysql); print("
New FAQ has been submmitted.
"); } ///////////////////////////mode=list///////////////////////////////////////////////////////// if($mode=="list"){ $sql="select * from faq order by question"; include($path_to_mysql); $numrows=sizeof($faq_id); $j=0; print(""); while($j<$numrows){ print(" "); $j++; } Print("
"); } //////////////////////////////mode=edit/////////////////////////////////////////////////////// if($mode=="edit"){ $sql="select * from faq where faq_id=$detail and email='$email[0]'"; include($path_to_mysql); $answer=eregi_replace("
\n","\n",$answer[0]); $numrowsv=sizeof($faq_id); if($numrowsv>0){ $sql="select * from categories order by title"; include($path_to_mysql); $numrows=sizeof($cat_id); $j=0; while($j<$numrows){ $selectcat.="