/*
+-------------------------------------------------------------------+
| S H O U T B O X (v1.0) |
| P a r t II |
| |
| Copyright Gerd Tentler http://www.gerd-tentler.de |
| Created: Jun. 1, 2004 Last modified: Jul. 21, 2005 |
+-------------------------------------------------------------------+
| This program may be used and hosted free of charge by anyone for |
| personal purpose as long as this copyright notice remains intact. |
| |
| Obtain permission before selling the code for this program or |
| hosting this software on a commercial website or redistributing |
| this software over the Internet or in any other medium. In all |
| cases copyright must remain intact. |
+-------------------------------------------------------------------+
*/
error_reporting(E_WARNING);
//========================================================================================================
// Cookies
//========================================================================================================
if(isset($Name)) {
$shouter = $Name;
setcookie('shouter', $shouter);
}
if(isset($EMail)) {
$shouter_mail = $EMail;
setcookie('shouter_mail', $shouter_mail);
}
//========================================================================================================
// Includes
//========================================================================================================
include('config.inc.php');
include('smilies.inc');
//========================================================================================================
// Functions
//========================================================================================================
function db_connect() {
global $db_name, $db_server, $db_user, $db_pass;
$status = true;
if(!@mysql_connect($db_server, $db_user, $db_pass)) {
echo '' . mysql_errno() . ': ' . mysql_error() . '
';
$status = false;
}
else if(!@mysql_select_db($db_name)) {
echo '' . mysql_errno() . ': ' . mysql_error() . '
';
$status = false;
}
return $status;
}
function timeStamp($ts) {
return substr($ts, 0, 4) . '-' . substr($ts, 4, 2) . '-' . substr($ts, 6, 2) . ' ' . substr($ts, 8, 2) . ':' . substr($ts, 10, 2) . ':' . substr($ts, 12);
}
//========================================================================================================
// Main
//========================================================================================================
if(db_connect()) {
$error = '';
header('Cache-control: private, no-cache, must-revalidate');
header('Expires: Sat, 01 Jan 2000 00:00:00 GMT');
header('Date: Sat, 01 Jan 2000 00:00:00 GMT');
header('Pragma: no-cache');
?>
if($error) echo "$error "; ?>
|