Access Denied\n"; echo"You do not have access to the FAQ Manager"; include"$page_footer"; echo"\n"; exit; } ?>

Manage FAQs:

MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); while ($row = mysql_fetch_array($sql_result)) { //Create Customizeable Timestamp $date = $row["lastupdated"]; $day=substr($date,6,2); //get the day $month=substr($date,4,2); //get the month $year=substr($date,0,4); //get the year $hour=substr($date,8,2); //get the hour $minute=substr($date,10,2); //get the minute $second=substr($date,12,2); //get the sec $timestamp = strtotime("$year-$month-$day $hour:$minute:$second"); $lastupdated = gmdate("F d, Y g:i:sa", $timestamp); $applications[] = $row["AppName"]; echo"\n"; echo"\n"; echo"\n"; echo"\n"; echo"\n"; echo"\n"; } ?>
FAQ Entry Updated Active
".++$i." ".$row["title"]."$lastupdated$row[active]

New FAQ Entry

Title:
Processing your update, please wait...\n"; $title = escape_string($_POST["title"]); $index = escape_string($_POST["index"]); $alias = escape_string($_POST["alias"]); $text = escape_string($_POST["text"]); $active = escape_string($_POST["active"]); $id = escape_string($_POST["id"]); if (checkFormKey()) { $sql = "UPDATE `faq` SET `title`='$title', `index`='$index', `alias`='$alias', `text`='$text', `active`='$active' WHERE `id`='$id'"; $sql_result = mysql_query($sql, $connection) or trigger_error("
MySQL Error ".mysql_errno().": ".mysql_error()."
", E_USER_NOTICE); if ($sql_result) { echo"Your update to '$title', has been successful.
"; } } } else if ($_POST["submit"] == "Delete Entry") { echo"

Processing, please wait...

\n"; $id = escape_string($_POST["id"]); $title = escape_string($_POST["title"]); if (checkFormKey()) { $sql = "DELETE FROM `faq` WHERE `id`='$id'"; $sql_result = mysql_query($sql, $connection) or trigger_error("
MySQL Error ".mysql_errno().": ".mysql_error()."
", E_USER_NOTICE); if ($sql_result) { echo"You've successfully deleted the FAQ Entry '$title'."; include"$page_footer"; echo"\n\n"; exit; } } } // Show Edit Form $sql = "SELECT * FROM `faq` WHERE `id` = '$id' LIMIT 1"; $sql_result = mysql_query($sql, $connection) or trigger_error("
MySQL Error ".mysql_errno().": ".mysql_error()."
", E_USER_NOTICE); $row = mysql_fetch_array($sql_result); ?>

Edit FAQ Entry:

\n"; echo"Title: "; echo"Alias:
\n"; //List of Entry Index for User Convienience echo"Existing Index Reference:
\n"; echo"Index:
\n"; echo"
\n"; echo"Entry Text:

"; $active = $row["active"]; echo"Show Entry on FAQ Page: "; if ($active=="YES") { echo"Yes: No: "; } else if ($active=="NO") { echo"Yes: No: "; } else { echo"Yes: No: "; } ?>

?');" />


«« Return to FAQ Manager Adding Entry, please wait...\n"; $title = escape_string($_POST["title"]); $index = escape_string($_POST["index"]); $alias = escape_string($_POST["alias"]); $text = escape_string($_POST["text"]); $active = escape_string($_POST["active"]); $id = escape_string($_POST["id"]); if (checkFormKey()) { $sql = "INSERT INTO `faq` (`title`,`index`,`alias`, `text`, `active`) VALUES ('$title','$index','$alias', '$text', '$active')"; $sql_result = mysql_query($sql, $connection) or trigger_error("
MySQL Error ".mysql_errno().": ".mysql_error()."
", E_USER_NOTICE); if ($sql_result) { echo"The entry '$title' has been successfully added.
\n"; } } } ?>

Add FAQ Entry:

 \n"; echo"Alias:
"; //List of Entry Index for User Convienience echo"
Existing Index Reference:
\n"; echo"Index: (used for FAQ page sort order)

\n"; echo"Entry Text:

"; echo"Show Entry on FAQ Page: "; echo"Yes: / No: "; ?>



«« Return to FAQ Manager