<?php
/*
*(c) 2003 christoph althammer hide@address.com
* http://www.milpa.de
*
* GNU GENERAL PUBLIC LICENSE
* die deutsche Übersetzung der GPL ist zu finden auf www.suse.org.
*
* auth: c. althammer
* date: 2003-03-03
* mod : Core Class & Sample App (will not work, just sample code!!!)
*
*/
/* start your app like this:
*
* $Application = new Main();
*
*
*/
class Main extends Core {
/* put your code here - complete object orientated php application development */
function Main(){
/*
* YOU ARE NOT ALLOWED TO MODIFY COPYRIGHT INFORMATION
* OR REMOVE THE FOLOWWING LINES WHEN USING APPLICATION FRAMEWORK 1.4
* APPLICATION WILL GENERATE FINGERPRINTS WHICH COULD BE TRACED WITH EVERY CRAWLER *
*/
new Comment("PAGE CREATED BY AFW 1.4 copyright2003 http://www.milpa.de");
$Info = new Debug;
$Debug->Info();
/* END COPYRIGHT INFORMATION */
$this->Init();
/*
*
* your core code
*
*
* */
return true;
}
function Init(){
/* intitalize your app */
$Config = new Config;
$this->MyVar = $Config->MyVarDefaultValue;
$this->PostedVar = $Config->Post("PostedVarName"); // fetch (trys POST, GET and SESSION on a Var) get (trys only GET)
$this->DataSampleStructure = new Sample;
$this->DatabaseObject = new DbOperation($this->DataSampleStructure);
$this->DatabaseObject->Select("WHERE dummy='value'");
$this->DatabaseObject->Delete("WHERE ".$this->DataSampleStructure->PrimaryKey." ='value'");
/* look up more funcs in dboperation.class.php */
return true;
}
} // EOC
class Core {
function Working(){
new GUIMsg("AFW V1.4 halted");
$this->Conf = new Conf;
new Debug("MainModule WELCOME");
$this->Header();
echo"Status: Anwendungsupdate läuft.";
$this->Footer();
die;
}
function GUIMsg($Msg=""){
new Debug("MainModule GUIMsg");
if (empty($Msg)) new Error("GUIMSg called without Message");
$this->Header();
new GUIBox("guimsg.templ.php",$this);
$this->Footer();
return true;
}
function ServerInfo(){
new GUIWindowStatus("Server Info");
new Debug("MainModule ServerInfo");
phpinfo();
return true;
}
function Header(){
if ($this->Header == false) {
new Template("header.templ.php",$this);
$this->Header = true;
}
return true;
}
function Footer(){
if ($this->Footer == false) {
new Template("footer.templ.php",$this);
$this->Footer = true;
}
return true;
}
}
?>