sRealname; // Set Page Title $page_title = $title; if ($title) $title = " - $title"; // banner ad include(BASE."include/banner.php"); $banner_ad = banner_display(); // Display Header include(BASE."include/header.php"); // Display Sidebar echo "
| \n"; apidb_sidebar(); echo " | \n"; echo "\n";
echo html_frame_start($page_title, '100%');
// Display Status Messages
dumpmsgbuffer();
}
/*
* output the common apidb footer
*/
function apidb_footer()
{
echo html_frame_end();
//Close Sidebar and Content Well
echo " |
$message
\n"; apidb_footer(); } /** * redirect to $url */ function redirect($url) { header("Location: ".$url); exit; } /** * redirect back to referrer, or else to the main page */ function redirectref($url = null) { if(!$url) $url = $_SERVER['HTTP_REFERER']; if(!$url) $url = apidb_fullurl(); redirect($url); } /** * format a date as required for HTTP by RFC 2068 sec 3.3.1 */ function fHttpDate($iDate) { return gmdate("D, d M Y H:i:s",$iDate)." GMT"; } /** * parse all the date formats required by HTTP 1.1 into PHP time values */ function pHttpDate($sDate) { $iDate = strtotime($sDate); if ($iDate != -1) return $iDate; /* the RFC also requires asctime() format... */ $aTs = strptime($sDate,"%a %b %e %H:%M:%S %Y"); $iDate = gmmktime($aTs[2],$aTs[1],$aTs[0],$aTs[4],$aTs[3],$aTs[5],0); return $iDate; } /** * msgs will be displayed on the Next page view of the same user */ function addmsg($text, $color = "black") { global $hAppdbLink; if($color) $text = " $text \n"; $text = addslashes($text); $sQuery = "INSERT INTO sessionMessages VALUES (null, null, '".session_id()."', '$text')"; if (!mysql_query($sQuery,$hAppdbLink)) { echo "An error has occurred in addmsg(): ".mysql_error($hAppdbLink); echo $text; } } /** * output msg_buffer and clear it. */ function dumpmsgbuffer() { $result = query_appdb("SELECT * FROM sessionMessages WHERE sessionId = '".session_id()."'"); if(!$result) return; while($r = mysql_fetch_object($result)) { echo html_frame_start("","300","",5); echo "