mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-20 00:12:15 +00:00
Anpassungen an CIS-Redesign.
suche.php: Sucht nun auch nach Dokumenten aus dem DMS und nach Orten. Außerdem wird die Anzahl an Suchergebnissen beschränkt.
This commit is contained in:
@@ -56,21 +56,16 @@ function ip_increment($ip = "")
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<link href="../../../skin/style.css.php" rel="stylesheet" type="text/css">
|
||||
<link href="../../../skin/flexcrollstyles.css" rel="stylesheet" type="text/css" />
|
||||
<script type="text/javascript" src="../../../include/js/flexcroll.js"></script>
|
||||
</head>
|
||||
|
||||
<body onLoad="document.regMAC.txtMAC.focus();">
|
||||
<table class="tabcontent" id="inhalt">
|
||||
<div class="flexcroll" style="outline: none;">
|
||||
<h1><?php echo $p->t("notebookregister/titelNotebookRegistration");?></h1>
|
||||
<table class="cmstable" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td class="tdwidth10"> </td>
|
||||
<td><table class="tabcontent">
|
||||
<tr>
|
||||
<td class="ContentHeader"><font class="ContentHeader"> <?php echo $p->t("notebookregister/titelNotebookRegistration");?></font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<td class="cmscontent" rowspan="3" valign="top">
|
||||
<?php
|
||||
|
||||
if (!$txtUID)
|
||||
@@ -270,11 +265,20 @@ function ip_increment($ip = "")
|
||||
}
|
||||
}
|
||||
?>
|
||||
<p><?php echo $p->t("notebookregister/notebook_absatz2");?></p></td>
|
||||
</tr>
|
||||
</table></td>
|
||||
<td class="tdwidth30"> </td>
|
||||
<p><?php echo $p->t("notebookregister/notebook_absatz2");?></p>
|
||||
</td>
|
||||
<!--<td class="menubox">
|
||||
<p><a href="content.php?content_id=">Links zu Unterpunkten</a></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="teambox" style="width: 20%;">TEAM:<br /><br /><a href="mailto:">Titelpre Vorname Nachname Titelpost</a><br />Aufgaben, Verantwortlichkeiten, Expertisen<br />T: +43 1 333 40 77-DW<br />E: <a href="mailto:">aliasadresse@technikum-wien.at</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: 20%;" valign="top"> </td>
|
||||
</tr>-->
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
+177
-17
@@ -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 '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
|
||||
"http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html>
|
||||
@@ -38,10 +43,13 @@ echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<link rel="stylesheet" href="../../../skin/tablesort.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="../../../skin/style.css.php" type="text/css">
|
||||
<script type="text/javascript" src="../../../include/js/jquery.js"></script>
|
||||
<script type="text/javascript" src="../../../include/js/jquery.js"></script>
|
||||
<script type="text/javascript" src="../../../include/js/flexcroll.js"></script>
|
||||
<link href="../../../skin/flexcrollstyles.css" rel="stylesheet" type="text/css" />
|
||||
<title>Globale Suche</title>
|
||||
</head>
|
||||
<body>';
|
||||
<body>
|
||||
<div class="flexcroll" style="outline: none;">';
|
||||
|
||||
echo '<h1>',$p->t('tools/suche'),'</h1>';
|
||||
|
||||
@@ -50,23 +58,27 @@ $search = (isset($_REQUEST['search'])?$_REQUEST['search']:'');
|
||||
echo '<form action="',$_SERVER['PHP_SELF'],'" name="searchform" method="GET">
|
||||
<input type="search" placeholder="'.$p->t('tools/suchbegriff').' ..." size="40" name="search" value="',$db->convert_html_chars($search),'" />
|
||||
<img src="../../../skin/images/search.png" onclick="document.searchform.submit()" height="15px" class="suchicon"/>
|
||||
</form>';
|
||||
</form><br>';
|
||||
|
||||
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}}
|
||||
});
|
||||
}
|
||||
);
|
||||
</script>
|
||||
<table class="tablesorter" id="personentable">
|
||||
</script>';
|
||||
if(count($bn->result)>20)
|
||||
{
|
||||
echo '<p style="color:red;">'.$p->t("tools/esWurdenMehrAlsXPersonenGefunden").'</p>';
|
||||
}
|
||||
echo '<table class="tablesorter" id="personentable">
|
||||
<thead>
|
||||
<tr class="liste">
|
||||
<tr>
|
||||
<th>',$p->t('global/titel'),'</th>
|
||||
<th>',$p->t('global/vorname'),'</th>
|
||||
<th>',$p->t('global/nachname'),'</th>
|
||||
<th>',$p->t('global/titel'),'</th>
|
||||
<th>',$p->t('global/studiengang'),'</th>
|
||||
<th>',$p->t('global/telefonnummer'),'</th>
|
||||
<th class="table-sortable:default">',$p->t('lvplan/raum'),'</th>
|
||||
<th>',$p->t('global/mail'),'</th>
|
||||
<th>',$p->t('lvplan/raum'),'</th>
|
||||
<th>',$p->t('global/mail'),'</th>
|
||||
<th>',$p->t('lvplan/lvPlan'),'</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -113,21 +131,160 @@ function searchPerson($searchItems)
|
||||
else
|
||||
$mail = $row->uid.'@'.DOMAIN;
|
||||
echo '<td><a href="mailto:',$mail,'">',$mail,'</a></td>';
|
||||
echo '<td><a href="../../../cis/private/lvplan/stpl_week.php?pers_uid='.$row->uid.($row->mitarbeiter_uid==NULL?'&type=student':'').'">'.$p->t('lvplan/lvPlan').'</a></td>';
|
||||
echo '</tr>';
|
||||
echo "\n";
|
||||
}
|
||||
echo '</tbody></table>';
|
||||
}
|
||||
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 '<h2>',$p->t('lvplan/ort'),'</h2>';
|
||||
echo '
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function()
|
||||
{
|
||||
$("#orttable").tablesorter(
|
||||
{
|
||||
sortList: [[1,0]],
|
||||
widgets: [\'zebra\'],
|
||||
headers: {8:{sorter:false}}
|
||||
});
|
||||
}
|
||||
);
|
||||
</script>
|
||||
<table class="tablesorter" id="orttable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>',$p->t('global/ort'),'</th>
|
||||
<th>',$p->t('global/bezeichnung'),'</th>
|
||||
<th>',$p->t('tools/maxPersonen'),'</th>
|
||||
<th>',$p->t('tools/telefonklappe'),'</th>';
|
||||
if ($raumres)
|
||||
echo '<th>',$p->t('tools/reservieren'),'</th>';
|
||||
echo '</tr>
|
||||
</thead>
|
||||
<tbody>';
|
||||
foreach($ort->result as $row)
|
||||
{
|
||||
echo '<tr>';
|
||||
echo '<td>',$row->planbezeichnung,' (',$row->ort_kurzbz,')</td>';
|
||||
echo '<td>',$row->bezeichnung,'</td>';
|
||||
echo '<td>',$row->max_person,'</td>';
|
||||
echo '<td>',$row->telefonklappe,'</td>';
|
||||
if ($raumres)
|
||||
echo '<td><a href="../../../cis/private/lvplan/stpl_week.php?type=ort&ort_kurzbz='.$row->ort_kurzbz.'">Reservieren</a></td>';
|
||||
//else
|
||||
// echo '<td></td>';
|
||||
echo '</tr>';
|
||||
echo "\n";
|
||||
}
|
||||
echo '</tbody></table>';
|
||||
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 '<h2>'.$p->t("tools/dokumente").'</h2>';
|
||||
echo '
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function()
|
||||
{
|
||||
$("#dmstable").tablesorter(
|
||||
{
|
||||
sortList: [[1,0]],
|
||||
widgets: [\'zebra\'],
|
||||
headers: {0:{sorter:false}}
|
||||
});
|
||||
}
|
||||
);
|
||||
</script>';
|
||||
if(count($dms->result)>40)
|
||||
{
|
||||
echo '<p style="color:red;">'.$p->t("tools/esWurdenMehrAlsXDokumenteGefunden").'</p>';
|
||||
}
|
||||
echo '<table class="tablesorter" id="dmstable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>',$p->t('global/titel'),'</th>
|
||||
<th>',$p->t('tools/aktuelleVersion'),'</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
';
|
||||
foreach($dms->result as $row)
|
||||
{
|
||||
echo '<tr>';
|
||||
if(array_key_exists($row->mimetype,$mimetypes))
|
||||
echo '<td width="20px" height="20px" style="vertical-align:middle;"><img src="../../../skin/images/'.$mimetypes[$row->mimetype].'" style="height: 20px; vertical-align:middle;"></td><td height="20px" style="vertical-align:middle;"><a href="../../../cms/dms.php?id='.$row->dms_id.'">',$row->beschreibung,'</a></td>';
|
||||
else
|
||||
echo '<td width="20px" height="20px" style="vertical-align:middle;"><img src="../../../skin/images/blank.gif" style="height: 18px; vertical-align:middle;"></td><td height="20px" style="vertical-align:middle;"><a href="../../../cms/dms.php?id='.$row->dms_id.'">',$row->beschreibung,'</a></td>';
|
||||
echo '<td style="vertical-align:middle;">',$row->version,'</td>';
|
||||
echo '</tr>';
|
||||
echo "\n";
|
||||
}
|
||||
echo '</tbody></table>';
|
||||
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 '<h2>',$p->t('tools/content'),'</h2>';
|
||||
if(count($cms->result)>20)
|
||||
{
|
||||
echo '<p style="color:red;">'.$p->t("tools/esWurdenMehrAlsXInhalteGefunden").'</p>';
|
||||
}
|
||||
echo '<ul>';
|
||||
foreach($cms->result as $row)
|
||||
{
|
||||
@@ -139,7 +296,10 @@ function searchContent($searchItems)
|
||||
echo '<br /><br /></div></li>';
|
||||
}
|
||||
echo '</ul>';
|
||||
return true;
|
||||
}
|
||||
else
|
||||
return false;
|
||||
}
|
||||
function findAndMark($content, $items)
|
||||
{
|
||||
@@ -192,5 +352,5 @@ function findAndMark($content, $items)
|
||||
return $preview;
|
||||
}
|
||||
|
||||
echo '</body></html>';
|
||||
echo '</div></body></html>';
|
||||
?>
|
||||
Reference in New Issue
Block a user