queries->getPeopleAll(); $this->horizontallyGroupedTables($query, '', '', 'people', 5); } // returns the pages title function getTitle() { $title = $this->getNavigationTitle('people'); if ($this->auth->isRoot()) { $url = "editor.php?type=person"; $string = $this->getLocalized('string_new'); $title .= ' ' . $this->getTitleEditLink($url, $string); } return $title; } } // person details class IpdPerson extends IpdPage { // the id of the displayed person var $id; // the persons data as returned by the database var $data; // constructor function IpdPerson($id) { IpdPage::IpdPage(); $this->id = $id; // get a db-query for fetching the structure with the given id $query = $this->queries->getPeople($id); $this->data = $this->db->querySingleObject($query); $this->editable = $this->structureIsEditable('person', $this->id, -1); if ($this->data->showTheses) $this->registerSubNav($this->getLocalized('studien_theses'), '#theses'); if ($this->data->showTeach) $this->registerSubNav($this->getLocalized('string_teach'), '#teach'); if ($this->data->showPub && $this->data->showPublications) $this->registerSubNav($this->getLocalized('string_pub'), '#pub'); if ($this->data->showProj) $this->registerSubNav($this->getLocalized('string_proj'), '#project'); } // returns the pages title function getTitle() { $string = $this->data->titel . ' ' . $this->data->vorname . ' ' . $this->data->name; if ($this->editable) $string .= ' ' . $this->getTitleEditorLink($this->data->type, $this->data->id); return $string; } function bodyOpen() { IpdPage::bodyOpen(); print ""; // portrait if($this->data->img) { print " "; } $personenArtCutoff = 6; $span = 0; if ($this->data->art < $personenArtCutoff) { print ""; $span += 2; } print ""; $span += 2; print "
photo
"; print "
" . $this->component->blank(20, 1) . ""; $this->printAddress(); print "" . $this->component->blank(20, 1) . ""; $this->printContact(); print "" . $this->component->blank(20, 1) . "
"; // private website if (eregi("^http", $this->data->weburl)) print "

" . $this->getLocalized('privSite') . ": " . $this->data->weburl . "

\n"; // consultation hours if (($this->data->art < $personenArtCutoff) && ($this->data->sprechzeiten)) print "

" . $this->getLocalized('consultation_hours') . ": " . $this->data->sprechzeiten . "

\n"; print "
"; // working area if($this->data->arbgebiet) { print "

" . $this->getLocalized('working_area') . "

\n"; print $this->data->arbgebiet . "\n"; } # print "[" . $this->data->showTheses . "]
"; // advised theses if ($this->data->showTheses) { print ""; $query = $this->queries->getThesesByAdvisor($this->id); $this->verticallyGroupedTables($query, 'advised_theses', '', 'theses_1'); // working on theses $query = $this->queries->getThesesByRealizer($this->id); $this->verticallyGroupedTables($query, 'working_theses', '', 'theses_1'); } // teaching if ($this->data->showTeach) { print ""; // $query = $this->queries->getCoursesByPeople($this->id, time() - 60*60*24*183); $query = $this->queries->getCoursesByPeople($this->id, time() - 60*60*24*7*4); $this->verticallyGroupedTables($query, 'people_teaches', '', 'teaching'); } // publications if ($this->data->showPub && $this->data->showPublications) { print ""; $query = $this->queries->getPublicationsByPeople($this->id); $pubs = new ContentPublications($this); $pubs->overview($query, 'pub_all', '', 'publications'); } // projects if ($this->data->showProj) { print ""; $query = $this->queries->getProjectsByPeople($this->id); $this->horizontallyGroupedTables($query, 'people_projects', '', 'projects', 0); } // software $query = $this->queries->getSoftwareByPeople($this->id); $this->teaserTables($query, 'people_software', '', 'software'); if ($this->data->footer) { print "
"; print $this->data->footer; } } function printAddress() { $this->tableOpenPad(2); $this->singleHeadTr($this->getLocalized("address")); if($this->data->institution) $this->singleTr($this->data->institution); $f = $this->getLocalizedField('strasse2'); if($this->data->raum) $this->singleTr($this->getLocalized("string_room") . ' ' . $this->data->raum . ', ' . $this->data->$f); else $this->singleTr($this->data->$f); if($this->data->strasse) $this->singleTr($this->data->strasse); if($this->data->plz || $this->data->ort) $this->singleTr($this->data->plz . ' ' . $this->data->ort); $f = $this->getLocalizedField('land'); if($this->data->$f) $this->singleTr($this->data->$f); $this->tableClose(); } function printContact() { $this->tableOpenPad(2); $this->singleHeadTr($this->getLocalized("contact")); if (ereg("[0-9]+", $this->data->tel)) $this->singleTr($this->getLocalized('string_tel') . ': ' . $this->data->tel); if($this->data->mail) { $out = "Email: component->get('document_root') . "render.php/" . str_replace(array("@","."), array(";",","), $this->data->mail) . "\" alt=\"e-mail addr\"" . " style=\"margin-bottom:1px;vertical-align:text-bottom\" />"; if($this->data->pgp) $out .= " [PGP]"; $this->singleTr($out); } if($this->data->icq) $this->singleTr('ICQ: ' . $this->data->icq . ' Jon_status'); if($this->data->msn) $this->singleTr('MSN: ' . $this->data->msn); if($this->data->yahoo) $this->singleTr('Yahoo: ' . $this->data->yahoo); if($this->data->jabber) $this->singleTr('Jabber-ID: ' . $this->data->jabber); $this->tableClose(); } } // create and print page if(isset($_GET['id'])) $page = new IPDPerson($_GET['id']); else $page = new IPDPeople(); $page->dump(); ?>