<?php
// Copyright Cnet com
/***************************************************************************
* environment.inc
*
* Wed November 17 18:04:58 2004
* Copyright 2004 Maurice Courtois
* maurice@phmarket.com
****************************************************************************/
/*
/*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Library General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
// Environment variable for CM_Sql package.
// You can use this var anywhere you want
// You absolutely need this var to use any function in SQL.inc.
$db = "Sogelem"; // Default database to connect to.
global $db;
$host = 'localhost'; // This is a local maner to connect to the MySQL Server you can also use IP Adress or host name
global $host;
// FOR DATABASES MAINTENANCE
$temp_directory = "/tmp"; //the user nobody must have write acces
global $temp_directory;
$temp_path = "/tmp";
global $temp_path;
$archives_directory = "/home/backup"; //the user nobody must have write acces
global $archives_directory;
$path_to_mysql_script="/usr/bin"; //ne surtout pas metre de / a la fin, PERL access to mysql
global $path_to_mysql_script;
//END FOR DATABASES MAINTENANCE
function error($num_err, $path)
{
// Error message
$error_array[0] = "";
$error_array[1] = "Could not connect to the database, Check the username and password and try again";
$error_array[2] = "Table not found";
$error_array[3] = "Error when processing query, Make sure you have typed the field correctly.";
$error_array[4] = "Could not select the database, probably the database doesn't exist.";
ob_end_clean(); // You also absolutely need to use the ob_start(); in your script.
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
<meta name="robots" content="no index, no follow">
<meta name="revisit-after" content="15 Days">
<meta name="author" content="Cnet Com">
<meta name="copyright" content="Cnet com.">
<meta name="date-creation-yyyymmdd" content="20041115">
<meta name="date-revision-yyyymmdd" content="20041115">
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>CM SQL --- Error</title>
<style type="text/css"><!--
body { color: #000000; background-color: #FFFFFF; }
.small_bold
{
font-family: Verdana, Arial, sans-serif;
font-size: 14px;
font-weight: bold;
}
p, address {margin-left: 3em;}
.small {font-size: smaller;}
-->
</style>
</head>
<body>
<?php
printf("<h1>An error as occured</h1><br>\n");
printf("<p><span class='small_bold'>Error number : %s</span><br>\n", $num_err);
printf("%s\n<br>", $error_array[$num_err]);
printf("Location : http://%s%s</p>\n<br>", $_SERVER["SERVER_NAME"], $path);
?>
<hr></hr>
CM SQL
<br>
<span class="small">Copyright @ 2004</span>
<a href="http://www.cm-technology.com/cnetcom">Cnet com</a>
<br>
</body>
</html>
<?php
exit();
}
?>
|