| 1 |
lars |
1 |
<?
|
|
|
2 |
$self=basename($PHP_SELF);
|
|
|
3 |
$MySQL_Host="localhost";
|
|
|
4 |
$MySQL_User="Shop_Daemon";
|
|
|
5 |
$MySQL_Passwd="S-Jp-g";
|
|
|
6 |
$database_name="content_management";
|
|
|
7 |
|
|
|
8 |
/*$MySQL_User="willmann";
|
|
|
9 |
$MySQL_Passwd="alpha-gamma-44-z";
|
|
|
10 |
$PHP_AUTH_USER = "admin";
|
|
|
11 |
$HTTP_SERVER_VARS["HTTP_HOST"]="redaktion.mediaran.de";
|
|
|
12 |
//$HTTP_SERVER_VARS["HTTP_HOST"]="redaktion.pieper-freizeit.de";
|
|
|
13 |
$root= -1;*/
|
|
|
14 |
|
|
|
15 |
// Verbindung zum Server herstellen
|
|
|
16 |
if (!$dbh=mysql_pconnect("$MySQL_Host","$MySQL_User","$MySQL_Passwd"))
|
|
|
17 |
{
|
|
|
18 |
echo "Die Verbindung zum Datenbanksever konnte nicht hergestellt werden<br>";
|
|
|
19 |
die (mysql_errno().": ".mysql_error());
|
|
|
20 |
}
|
|
|
21 |
|
|
|
22 |
// Datenbank CMS anwählen
|
|
|
23 |
if (!$db=mysql_select_db ("$database_name"))
|
|
|
24 |
{
|
|
|
25 |
echo "Die Verbindung zur Datenbank <font color=\"#FF0000\">$database_name</font> konnte nicht hergestellt werden<br>";
|
|
|
26 |
die (mysql_errno().": ".mysql_error());
|
|
|
27 |
}
|
|
|
28 |
|
|
|
29 |
// Kundenrechte einlesen
|
|
|
30 |
// require_once "../get_rechte.php";
|
|
|
31 |
// Datenbank des Kunden auslesen
|
|
|
32 |
// require_once "../whoami.php";
|
|
|
33 |
$query="SELECT * from webs where domain='$site'";
|
|
|
34 |
$result = mysql_query ($query) or die (mysql_errno().": ".mysql_error().$query);
|
|
|
35 |
$webs=mysql_fetch_array($result);
|
|
|
36 |
|
|
|
37 |
// Falls ein remoteServer eingetragen ist Verbindung zu diesem Server herstellen
|
|
|
38 |
if ($webs[db_server])
|
|
|
39 |
{
|
|
|
40 |
if (!$remoteServer_dbh=mysql_connect($webs[db_server], $webs[db_username], $webs[db_password]))
|
|
|
41 |
{
|
|
|
42 |
echo "Die Verbindung zum Datenbanksever konnte nicht hergestellt werden<br>";
|
|
|
43 |
die (mysql_errno().": ".mysql_error());
|
|
|
44 |
}
|
|
|
45 |
}
|
|
|
46 |
|
|
|
47 |
// Shop-Datenbank anwählen
|
|
|
48 |
if (!$db=mysql_select_db ($webs[datenbank]))
|
|
|
49 |
{
|
|
|
50 |
echo "Die Verbindung zur Datenbank <font color=\"#FF0000\">$webs[datenbank]</font> konnte nicht hergestellt werden<br>";
|
|
|
51 |
die (mysql_errno().": ".mysql_error());
|
|
|
52 |
}
|
|
|
53 |
if (!$webs[bgcolor_seite]) {$webs[bgcolor_seite]="FFFFFF";}
|
|
|
54 |
if (!$webs[bgcolor_links]) {$webs[bgcolor_links]="FFFFFF";}
|
|
|
55 |
if (!$webs[bgcolor_rechts]) {$webs[bgcolor_rechts]="FFFFFF";}
|
|
|
56 |
|
|
|
57 |
// Variablen freigeben
|
|
|
58 |
unset($query);
|
|
|
59 |
unset($result);
|
|
|
60 |
|
|
|
61 |
/* function datetime2human($date)
|
|
|
62 |
{
|
|
|
63 |
$date=preg_split("/ /",$date);
|
|
|
64 |
return array
|
|
|
65 |
(
|
|
|
66 |
"Datum" => join(".",array_reverse(preg_split("/-/",$date[0]))),
|
|
|
67 |
"Zeit" => $date[1]
|
|
|
68 |
);
|
|
|
69 |
}
|
|
|
70 |
|
|
|
71 |
function date2human($date)
|
|
|
72 |
{
|
|
|
73 |
return join(".",array_reverse(preg_split("/-/",$date)));
|
|
|
74 |
}
|
|
|
75 |
|
|
|
76 |
function human2date($date)
|
|
|
77 |
{
|
|
|
78 |
return join("-",array_reverse(preg_split("/\./",$date)));
|
|
|
79 |
}
|
|
|
80 |
*/
|
|
|
81 |
//require_once "../loginTest.php";
|
|
|
82 |
?>
|