|
* | |
* +----------------------------------------------------------------------+
*
* $Id$
*/
//Debugging Tool
$debug = false;
/* Website URL Variable */
$site_url = "http://http://www.catharsisintl.com";
/* Database Variable */
$dbhost = 'localhost';
$dbusername = 'catharsi_databas';
$dbuserpassword = 'winuxsoft';
$default_dbname = 'catharsi_database';
//This is default Database, which created by create_db.php
/* Software Variable */
$template = "/home/catharsi/public_html/template/";
$upload_dir = "/home/catharsi/public_html/images/";
$Author = 'webbmasterdhk@yahoo.com';
$SiteAdministrator = 'admin@catharsisintl.com';
$Company = 'Catharsis International';
$Copyright_Year = '2005';
//File Variable
// 100 kb
$size_bytes = 102400;
//Error Handling
//////////////////////////////////
$MYSQL_ERRNO = '';
$MYSQL_ERROR = '';
//////////////////////////////////
$default_sort_order = 'ASC';
$records_per_page = 5;
//Page Design
$images="http://www.catharsisintl.com/images";
////////////////////////
//Connect to default database.
//If fails, return error message with reason(s).
function db_connect() {
global $dbhost, $dbusername, $dbuserpassword, $default_dbname;
//Unix requires a password
//global $dbhost, $dbusername, $default_dbname;
global $MYSQL_ERRNO, $MYSQL_ERROR;
//$link_id = mysql_connect($dbhost, $dbusername);
//This is for Windows
$link_id = mysql_connect($dbhost, $dbusername, $dbuserpassword);
//This is for Unix
if(!$link_id) {
$MYSQL_ERRNO = 0;
$MYSQL_ERROR = "Connection failed to the host $dbhost.";
return 0;
}
else if(empty($dbname) && !mysql_select_db($default_dbname)) {
$MYSQL_ERRNO = mysql_errno();
$MYSQL_ERROR = mysql_error();
return 0;
}
else return $link_id;
}
//Server Error Handling
function sql_error() {
if(empty($MYSQL_ERROR)) {
$MYSQL_ERRNO = mysql_errno();
$MYSQL_ERROR = mysql_error();
}
return "$MYSQL_ERRNO: $MYSQL_ERROR ";
}
function error_message($msg) {
//ht_header();
//echo "";
echo "";
//ht_footer();
exit;
}
?>