uses('tpl'); $app->tpl->newTemplate("form.tpl.htm"); $app->tpl->setInclude('content_tpl','templates/form_list.htm'); function getinfo($file,$form_file,$bgcolor) { global $conf,$app; $module_name = $file; include($conf["rootpath"]."/web/".$file."/form/$form_file"); return array( 'name' => $form["name"], 'title' => $form["title"], 'description' => $form["description"], 'module_name' => $module_name, 'bgcolor' => $bgcolor); //unset($form); } // lese Module aus $bgcolor = "#FFFFFF"; $modules_list = array(); $handle = @opendir($conf["rootpath"]."/web"); while ($file = @readdir ($handle)) { if ($file != "." && $file != "..") { if(@is_dir($conf["rootpath"]."/web/".$file)) { if(is_file($conf["rootpath"]."/web/".$file."/lib/module.conf.php") and $file != 'login') { if(@is_dir($conf["rootpath"]."/web/".$file."/form")) { $handle2 = opendir($conf["rootpath"]."/web/".$file."/form"); while ($form_file = @readdir ($handle2)) { if (substr($form_file,0,1) != ".") { //echo $conf["rootpath"]."/web/".$file."/form/$form_file
"; //include_once($conf["rootpath"]."/web/".$file."/form/$form_file"); // Farbwechsel $bgcolor = ($bgcolor == "#FFFFFF")?"#EEEEEE":"#FFFFFF"; $modules_list[] = getinfo($file,$form_file,$bgcolor); } } } } } } } $app->tpl->setLoop('records',$modules_list); // loading language file $lng_file = "lib/lang/".$_SESSION["s"]["language"]."_form_list.lng"; include($lng_file); $app->tpl->setVar($wb); $app->tpl_defaults(); $app->tpl->pparse(); ?>