app = $app; $this->parsetarget = $parsetarget; parent::__construct($app,$parsetarget); $this->ExtendsForm(); } function ExtendsForm() { $this->app->YUI->TimePicker("ftpuhrzeit"); $this->form->ReplaceFunction("project",$this,"ReplaceProjekt"); $this->app->YUI->AutoComplete("project","projektname",1); $id = $this->app->Secure->GetGET('id'); $this->app->erp->MenuEintrag("index.php?module=berichte&action=create","Berichte Neu"); if($id){ $this->app->erp->MenuEintrag("index.php?module=berichte&action=edit&id=$id","Details"); $obj = $this->app->erp->LoadModul('berichte'); if($obj){ $struktur = $this->app->DB->Select("SELECT struktur FROM berichte WHERE id = '$id' LIMIT 1"); if(!$obj->sqlok($struktur)){ $this->app->Tpl->Add('MESSAGE', '
Nicht erlaubte Abfrage
'); }else{ $this->app->erp->MenuEintrag("index.php?module=berichte&action=pdf&id=$id","als PDF anzeigen"); $this->app->erp->MenuEintrag("index.php?module=berichte&action=csv&id=$id","als CSV anzeigen"); $this->app->erp->MenuEintrag("index.php?module=berichte&action=live&id=$id", "Live"); } } } } public function Table() { //$table->Query("SELECT nummer,beschreibung, id FROM berichte"); $table = new EasyTable($this->app); $this->app->Tpl->Set('INHALT',""); $table->Query("SELECT name, id FROM berichte"); $table->DisplayNew($this->parsetarget, " "); } function ReplaceProjekt($db,$value,$fromform) { return $this->app->erp->ReplaceProjekt($db,$value,$fromform); } public function Search() { // $this->app->Tpl->Set($this->parsetarget,"suchmaske"); //$this->app->Table( //$table = new OrderTable("veranstalter"); //$table->Heading(array('Name','Homepage','Telefon')); } } ?>