<?php
// check if classes are valid
$strKlasse = '';
function __autoload($strKlasse)
{ try { if(!preg_match('=^[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*$=m',$strKlasse))
{ throw new Exception("Class '$strKlasse' is not valid."); }
$strIncludeFile = 'classes/'.$strKlasse. '.class.php';
if (!file_exists($strIncludeFile))
{ throw new Exception("Include file <i>$strIncludeFile</i> not found.<br>"); }
require_once($strIncludeFile);
if(!class_exists($strKlasse))
{ throw new Exception("Include file <i>$strIncludeFile</i>
contains no class '$strKlasse'.<br>"); }
return true; }
catch(Exception $e)
{ die($e->getMessage()); }
}
// set class instance for error handling
$processlogin = new ServerLoginData();
$action = '';
$delid = '';
$action = $_POST['action'];
$delid = $_POST['delid'];
// determine action based on POST
if(isset($action)
&& $action == 'dodelete'
&& is_numeric($delid)) {
// set variable for specific submission action and class instance
$storedata = new ServerActiveRecord($id = 0,$delid,$user=NULL,$pw=NULL,
$account=NULL,$ipaddress=NULL,$datum=NULL);
$storedata->prepareData();
$storedata->store();
} else {
echo $processlogin->get_error();
}
?>