xpath('/TopNavigation/Entry', array("Entry")); $headnavigation->setContent("HEADNAVI", $headnavipoints); $headnavi = $headnavigation->vorlage; $valid = false; foreach ( $headnavipoints as $headnavipoint ) if ( $headnavipoint['Key'] == $task ) $valid = true; if (!$valid) exit; if ( $act !== '' ) $content_tpl_file = 'templates/content.' . $task . '.' . $act .'.tpl'; else $content_tpl_file = 'templates/content.' . $task . '.tpl'; switch($task){ case "callforpapers": case "submission": case "programme": case "ccc": switch($act){ case "3": $ralph = create_email_image('Ralph Traphöner', 'Ralph.Traphoener@empolis.com'); $load = new Template($content_tpl_file); $load->setContent('MAIL', $ralph); $content = $load->vorlage; break; case "1": $load = new Template($content_tpl_file); $gotmail = ""; if($_POST['subscribeMail']){ $gotmail = subscribe($_POST['subscribeMail']); } $load->setContent('SUCCESS', $gotmail); $content = $load->vorlage; break; case "9": $load = new Template($content_tpl_file); $sentmail = ""; if($_POST['replyMail'] && $_POST['message']){ $mail = $_POST['replyMail']; $sub = utf8_decode($_POST['subject']); $msg = utf8_decode($_POST['message']); $sentmail = contact('ccc-org2008@uni-trier.de', $mail, $sub, $msg); } $load->setContent('CONTACT_EMAIL', create_email_image('ccc-org2008@uni-trier.de', 'or via: ccc-org2008@uni-trier.de')); $load->setContent('SUCCESS', $sentmail); $content = $load->vorlage; break; case "11": $ccc = create_email_image('ccc-org2008@uni-trier.de', 'ccc-org2008@uni-trier.de'); $load = new Template($content_tpl_file); $load->setContent('MAIL', $ccc); $content = $load->vorlage; break; default: $load = new Template($content_tpl_file); $content = $load->vorlage; } break; case "industryday": case "workshops": $load = new Template($content_tpl_file); $content = $load->vorlage; break; case "people": $peoplexml = new XmlProxy('xml/people.xml'); $peoplegroups = $peoplexml->xpath('/data/peoples/group', array("group", "person")); $groups_string = ''; foreach ( $peoplegroups as $group ) { $group_template = new Template('templates/element.peoplegroup.tpl'); $group_template->setContent('Title', $group['title']); foreach ( $group['person'] as $key => $person ) if ( isset($person['email']) ) $group['person'][$key]['email'] = '
E-Mail:

'; else $group['person'][$key]['email'] = ''; $group_template->setContent('PEOPLE', $group['person']); $groups_string .= $group_template->vorlage; } $load = new Template('templates/content.people.tpl'); $load->setContent('Peoples', $groups_string); $content = $load->vorlage; break; case "welcome": $load = new Template($content_tpl_file); switch($act) { case '4': $load = new Template($content_tpl_file); $sentmail = ""; if($_POST['replyMail'] && $_POST['message']){ $mail = $_POST['replyMail']; $sub = utf8_decode($_POST['subject']); $msg = utf8_decode($_POST['message']); $sentmail = contact('eccbr2008@uni-trier.de', $mail, $sub, $msg); } $load->setContent('CONTACT_EMAIL', create_email_image('eccbr2008@uni-trier.de', 'or via: eccbr2008@uni-trier.de')); $load->setContent('SUCCESS', $sentmail); $content = $load->vorlage; break; case '2':/* $gotmail = ""; if($_POST['subscribeMail']){ $gotmail = subscribe($_POST['subscribeMail']); } $load->setContent('SUCCESS', $gotmail);*/break; case '': $xmloutput = new XmlProxy('xml/welcome.xml'); $newsboxes = $xmloutput->xpath('/data/content/newsbox', array("Newsbox")); $load->setContent('NEWS', $newsboxes); default: } $content = $load->vorlage; break; default: exit; } $xmloutput = new XmlProxy('xml/subnavigation.' . $task . '.xml'); $xmloutput = $xmloutput->xpath('/SubNavigation/Entry', array("Entry")); foreach($xmloutput as $key => $value) $xmloutput[$key]['Task'] = $task; $sidebarnavigation->setContent("SIDENAVI", $xmloutput); $leftnavi = $sidebarnavigation->vorlage; $webmaster = create_email_image('Webmaster', 'wi2webadmin@wi2.uni-trier.de'); $default_template->setContent('WEBMASTER_EMAIL', $webmaster); $default_template->setContent("CONTENT", $content); $default_template->setContent("TOP_NAVIGATION", $headnavi); $default_template->setContent("LEFT_NAVIGATION", $leftnavi); echo $default_template->vorlage; ?>