<?php
include("variablen.php");

// Datenbank initialisieren
require "class/PM.php";
switch ($_SERVER['DOCUMENT_ROOT'])	{
  case "/var/www/8080":
    $file = "../SQL-settings_Secnote.ini.php";
    $url = "secnote.eblok.de/index.php?id=";
  break;
  case "/home/wwwdev/Schreibtisch/CLOUD/WWW":
    $file = "SQL-settings_local.ini.php";
    $url = "http://192.168.3.10/secnote/".$config['version']."/index.php?id=";
  break;
  default:
    echo "Fehlende Server-Konfiguration!<br/>"; echo $_SERVER['DOCUMENT_ROOT']."<br/>";
  exit;
}
$_SESSION['SQL'] = parse_ini_file($file);
$config['URL']= $url;

$PM = new PM("Database",".php");
unset($_SESSION['SQL']);

$PM->config($config,$message);
$PM->del_older();

$PM->class_obj->disconnect();
?>
