diff --git a/cis/private/tools/notebook_registration.php b/cis/private/tools/notebook_registration.php index 843ee5cd7..9b5056af3 100644 --- a/cis/private/tools/notebook_registration.php +++ b/cis/private/tools/notebook_registration.php @@ -56,21 +56,16 @@ function ip_increment($ip = "") + + - +
+

t("notebookregister/titelNotebookRegistration");?>

+
- - - +

t("notebookregister/notebook_absatz2");?>

+ +
  - - - - - - - - - -
 t("notebookregister/titelNotebookRegistration");?>
 
+ -

t("notebookregister/notebook_absatz2");?>

 
+ diff --git a/cis/private/tools/suche.php b/cis/private/tools/suche.php index 26623932e..8b643a910 100755 --- a/cis/private/tools/suche.php +++ b/cis/private/tools/suche.php @@ -26,11 +26,16 @@ require_once('../../../include/phrasen.class.php'); require_once('../../../include/content.class.php'); require_once('../../../include/benutzer.class.php'); require_once('../../../include/globals.inc.php'); +require_once('../../../include/dms.class.php'); +require_once('../../../include/service.class.php'); +require_once('../../../include/ort.class.php'); +require_once('../../../include/benutzerberechtigung.class.php'); $uid = get_uid(); $db = new basis_db(); $sprache = getSprache(); $p = new phrasen($sprache); + echo ' @@ -38,10 +43,13 @@ echo ' - + + + Globale Suche -'; + +
'; echo '

',$p->t('tools/suche'),'

'; @@ -50,23 +58,27 @@ $search = (isset($_REQUEST['search'])?$_REQUEST['search']:''); echo '
-
'; +
'; if($search=='') exit; $searchItems = explode(' ',$search); -searchPerson($searchItems); -searchContent($searchItems); - +$searchPerson = searchPerson($searchItems); +$searchOrt = searchOrt($search); +$searchDms = searchDms($searchItems); +$searchContent = searchContent($searchItems); +if (!$searchPerson && !$searchOrt && !$searchDms && !$searchContent) + echo $p->t('tools/esWurdenKeineErgebnisseGefunden'); + function searchPerson($searchItems) { global $db, $p, $noalias; $bn = new benutzer(); - $bn->search($searchItems); + $bn->search($searchItems, 21); if(count($bn->result)>0) { @@ -77,23 +89,29 @@ function searchPerson($searchItems) { $("#personentable").tablesorter( { - sortList: [[2,0]], - widgets: [\'zebra\'] + sortList: [[2,0],[1,0]], + widgets: [\'zebra\'], + headers: {8:{sorter:false}} }); } ); - - + '; + if(count($bn->result)>20) + { + echo '

'.$p->t("tools/esWurdenMehrAlsXPersonenGefunden").'

'; + } + echo '
- + - - + + + @@ -113,21 +131,160 @@ function searchPerson($searchItems) else $mail = $row->uid.'@'.DOMAIN; echo ''; + echo ''; echo ''; echo "\n"; } echo '
',$p->t('global/titel'),' ',$p->t('global/vorname'),' ',$p->t('global/nachname'),' ',$p->t('global/titel'),' ',$p->t('global/studiengang'),' ',$p->t('global/telefonnummer'),'',$p->t('lvplan/raum'),'',$p->t('global/mail'),'',$p->t('lvplan/raum'),'',$p->t('global/mail'),'',$p->t('lvplan/lvPlan'),'
',$mail,''.$p->t('lvplan/lvPlan').'
'; - } + return true; + } + else + return false; +} +function searchOrt($search) +{ + global $db, $p, $noalias; + $ort = new ort(); + $ort->filter($search, true, true); + + $uid = get_uid(); + $berechtigung=new benutzerberechtigung(); + $berechtigung->getBerechtigungen($uid); + if ($berechtigung->isBerechtigt('lehre/reservierung:begrenzt', null, 'sui')) + $raumres=true; + else + $raumres=false; + + if(count($ort->result)>0) + { + echo '

',$p->t('lvplan/ort'),'

'; + echo ' + + + + + + + + '; + if ($raumres) + echo ''; + echo ' + + '; + foreach($ort->result as $row) + { + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + if ($raumres) + echo ''; + //else + // echo ''; + echo ''; + echo "\n"; + } + echo '
',$p->t('global/ort'),'',$p->t('global/bezeichnung'),'',$p->t('tools/maxPersonen'),'',$p->t('tools/telefonklappe'),'',$p->t('tools/reservieren'),'
',$row->planbezeichnung,' (',$row->ort_kurzbz,')',$row->bezeichnung,'',$row->max_person,'',$row->telefonklappe,'Reservieren
'; + return true; + } + else + return false; +} +function searchDms($searchItems) +{ + $mimetypes = array( + 'application/pdf'=>'pdf_icon.png', + 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'=>'word2007.jpg', + 'application/vnd.openxmlformats-officedocument.presentationml.presentation'=>'x-office-presentation.png', + 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'=>'excel.gif', + 'application/vnd.oasis.opendocument.text'=>'openoffice0.jpg', + 'application/msword'=>'doc_icon.png', + 'application/vnd.ms-excel'=>'xls_icon.png', + 'application/x-zip'=>'zip_icon.png', + 'application/zip'=>'zip_icon.png', + 'application/mspowerpoint'=>'ppt_icon.png', + 'image/jpeg'=>'img_icon.png', + 'image/gif'=>'img_icon.png', + 'image/png'=>'img_icon.png', + ); + $searchstring = $searchItems; + global $db, $p; + $dms = new dms(); + $dms->searchLastVersion($searchstring, 41); + + if(count($dms->result)>0) + { + echo '

'.$p->t("tools/dokumente").'

'; + echo ' + '; + if(count($dms->result)>40) + { + echo '

'.$p->t("tools/esWurdenMehrAlsXDokumenteGefunden").'

'; + } + echo ' + + + + + + + + + '; + foreach($dms->result as $row) + { + echo ''; + if(array_key_exists($row->mimetype,$mimetypes)) + echo ''; + else + echo ''; + echo ''; + echo ''; + echo "\n"; + } + echo '
',$p->t('global/titel'),'',$p->t('tools/aktuelleVersion'),'
',$row->beschreibung,'',$row->beschreibung,'',$row->version,'
'; + return true; + } + else + return false; } function searchContent($searchItems) { global $db,$p; $cms = new content(); - $cms->search($searchItems); + $cms->search($searchItems, 21); if(count($cms->result)>0) { echo '

',$p->t('tools/content'),'

'; + if(count($cms->result)>20) + { + echo '

'.$p->t("tools/esWurdenMehrAlsXInhalteGefunden").'

'; + } echo '
'; } echo ''; + return true; } + else + return false; } function findAndMark($content, $items) { @@ -192,5 +352,5 @@ function findAndMark($content, $items) return $preview; } -echo ''; +echo ''; ?> \ No newline at end of file