mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-01 20:29:29 +00:00
Merge branch 'master' of https://github.com/FH-Complete/FHC-Core
This commit is contained in:
+57
-36
@@ -28,43 +28,62 @@ if(is_user_logged_in())
|
||||
$ampel = new ampel();
|
||||
$ampel->loadUserAmpel($user);
|
||||
$rot=0;
|
||||
$gelb=0;
|
||||
$gelb = 0;
|
||||
$gruen = 0;
|
||||
$verpflichtend = false;
|
||||
$cnt_verpflichtend = 0;
|
||||
$cnt_abgelaufen = 0;
|
||||
$cnt_notConf_notOverdue = 0; //counts mandatory, not confirmed && not overdued ampeln (for popup)
|
||||
|
||||
$datum = new datum();
|
||||
$now = $datum->mktime_fromdate(date('Y-m-d'));
|
||||
foreach($ampel->result as $row)
|
||||
{
|
||||
$ts_deadline = $datum->mktime_fromdate($row->deadline);
|
||||
$vlz = "-".$row->vorlaufzeit." day";
|
||||
$ts_vorlaufzeit = strtotime($vlz, $ts_deadline);
|
||||
$ts_now = $datum->mktime_fromdate(date('Y-m-d'));
|
||||
if($ts_deadline < $ts_now)
|
||||
{
|
||||
$rot++;
|
||||
if ($row->verpflichtend == 't')
|
||||
$verpflichtend = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if($ts_vorlaufzeit<=$ts_now && $ts_now<=$ts_deadline)
|
||||
{
|
||||
$gelb++;
|
||||
if ($row->verpflichtend == 't')
|
||||
$verpflichtend = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if($rot==0 && $gelb==0)
|
||||
echo '<a href="private/tools/ampelverwaltung.php" target="content" title="'.$p->t("tools/ampelsystem").'"><span style="color: #A5AFB6">'.$p->t("tools/ampelsystem").'</span></a> <span style="color: #A5AFB6">|</span> ';
|
||||
{
|
||||
$deadline =$datum->mktime_fromdate($row->deadline);
|
||||
$vorlaufzeit = $row->vorlaufzeit;
|
||||
$verfallszeit = $row->verfallszeit;
|
||||
$bestaetigt = $ampel->isBestaetigt($user, $row->ampel_id);
|
||||
$verpflichtend = $row->verpflichtend;
|
||||
$abgelaufen = false;
|
||||
|
||||
if($rot>0 || $gelb>0)
|
||||
{
|
||||
// Wenn es eine verpflichtende Ampel gibt, das Pupup im CIS anzeigen
|
||||
if ($verpflichtend == true)
|
||||
{
|
||||
$datum_liegt_vor_vorlaufzeit = false;
|
||||
$datum_liegt_nach_verfallszeit = false;
|
||||
|
||||
if (!is_null($vorlaufzeit))
|
||||
$datum_liegt_vor_vorlaufzeit = $now < strtotime('-' . $vorlaufzeit . ' day', $deadline);
|
||||
|
||||
if (!is_null($verfallszeit))
|
||||
$datum_liegt_nach_verfallszeit = $now > strtotime('+' . $verfallszeit . ' day', $deadline);
|
||||
|
||||
//count mandatory
|
||||
if($verpflichtend == 't')
|
||||
$cnt_verpflichtend++;
|
||||
|
||||
//count overdue
|
||||
if ($datum_liegt_nach_verfallszeit)
|
||||
$cnt_abgelaufen++;
|
||||
|
||||
//set status
|
||||
if ($bestaetigt)
|
||||
$gruen++;
|
||||
else if ($now >= $deadline && !$datum_liegt_nach_verfallszeit && !$bestaetigt)
|
||||
$rot++;
|
||||
else if (!$datum_liegt_nach_verfallszeit && !$datum_liegt_vor_vorlaufzeit)
|
||||
$gelb++;
|
||||
|
||||
//count mandatory ampeln that are not confirmed and not overdue (for popup)
|
||||
if ($verpflichtend == 't' && !$bestaetigt && !$datum_liegt_nach_verfallszeit && !$datum_liegt_vor_vorlaufzeit)
|
||||
$cnt_notConf_notOverdue++;
|
||||
}
|
||||
|
||||
|
||||
// Wenn es eine verpflichtende Ampel gibt, das Pupup im CIS anzeigen
|
||||
if ($cnt_notConf_notOverdue > 0)
|
||||
{
|
||||
echo ' <script>
|
||||
$(document).ready(function()
|
||||
{
|
||||
var html_content = \'<iframe src="'.APP_ROOT.'cis/private/tools/ampelverwaltung.php" name="ampel" frameborder="0" width="95%" height="95%"></iframe><button id="close_button" onclick="hide_ampel_div()">Close</button>\';
|
||||
var html_content = \'<iframe src="'.APP_ROOT.'cis/private/tools/ampelverwaltung.php?verpflichtend=true" name="ampel" frameborder="0" width="95%" height="95%"></iframe><button id="close_button" onclick="hide_ampel_div()">Close</button>\';
|
||||
$("#ampel_div").html(html_content);
|
||||
});
|
||||
</script>';
|
||||
@@ -101,15 +120,17 @@ if(is_user_logged_in())
|
||||
}
|
||||
</style>';
|
||||
}
|
||||
if($rot>0)
|
||||
|
||||
//show & color header ampel-link
|
||||
if($rot > 0)
|
||||
echo '<a href="private/tools/ampelverwaltung.php" target="content" title="'.$p->t("tools/ampelsystem").'"><span style="color: red;">'.$p->t("tools/ampelsystem").'</span></a> <span style="color: #A5AFB6">|</span> ';
|
||||
elseif($gelb>0)
|
||||
elseif($gelb > 0)
|
||||
echo '<a href="private/tools/ampelverwaltung.php" target="content" title="'.$p->t("tools/ampelsystem").'"><span style="color: orange;">'.$p->t("tools/ampelsystem").'</span></a> <span style="color: #A5AFB6">|</span> ';
|
||||
}
|
||||
}
|
||||
elseif($rot==0 || $rot <= $cnt_abgelaufen && $gelb==0)
|
||||
echo '<a href="private/tools/ampelverwaltung.php" target="content" title="'.$p->t("tools/ampelsystem").'"><span style="color: #A5AFB6">'.$p->t("tools/ampelsystem").'</span></a> <span style="color: #A5AFB6">|</span> ';
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "<script>window.setTimeout('loadampel()',5000);</script>";
|
||||
//echo microtime();
|
||||
echo "<script>window.setTimeout('loadampel()',1000);</script>";
|
||||
}
|
||||
?>
|
||||
@@ -237,7 +237,8 @@ if ($result = $db->db_query($qry)) {
|
||||
$row->foto_sperre = 'f';
|
||||
|
||||
//create foto (if not locked by student OR if fotolist is created by admin or assistenz)
|
||||
if ($row->foto_sperre == 'f' && $row->foto != '') {
|
||||
$foto_url = '';
|
||||
if ($row->foto_sperre == 'f' && $row->foto != '') {
|
||||
$foto_src = $row->foto;
|
||||
$foto_url = sys_get_temp_dir() . '/foto' . trim($row->matrikelnr) . '.jpg';
|
||||
$foto_url_arr[] = $foto_url;
|
||||
@@ -254,14 +255,14 @@ if ($result = $db->db_query($qry)) {
|
||||
//add foto to document
|
||||
$doc->addImage($foto_url, trim($row->matrikelnr) . '.jpg', 'image/jpg');
|
||||
}
|
||||
elseif ($row->foto == '')
|
||||
{
|
||||
$foto_url = '';
|
||||
}
|
||||
else
|
||||
{
|
||||
$foto_url = '';
|
||||
}
|
||||
// elseif ($row->foto == '')
|
||||
// {
|
||||
// $foto_url = '';
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// $foto_url = '';
|
||||
// }
|
||||
|
||||
//create studiengruppe
|
||||
$student_studiengruppe = strtoupper($row->typ.$row->kurzbz.'-'.$row->semester);
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* Authors: Andreas Oesterreicher <andreas.oesterreicher@technikum-wien.at>
|
||||
* Cristina Hainberger <hainberg@technikum-wien.at>
|
||||
*/
|
||||
require_once('../../../config/cis.config.inc.php');
|
||||
require_once('../../../include/functions.inc.php');
|
||||
@@ -26,19 +27,23 @@ require_once('../../../include/benutzerfunktion.class.php');
|
||||
require_once('../../../include/organisationseinheit.class.php');
|
||||
require_once('../../../include/benutzerberechtigung.class.php');
|
||||
require_once('../../../include/studiensemester.class.php');
|
||||
require_once('../../../include/person.class.php');
|
||||
|
||||
$user = get_uid();
|
||||
$sprache = getSprache();
|
||||
$p = new phrasen($sprache);
|
||||
|
||||
$show = (isset($_GET['show'])?$_GET['show']:'aktuell');
|
||||
$person = new person();
|
||||
$person->getPersonFromBenutzer($user);
|
||||
|
||||
|
||||
$show = (isset($_POST['show']) ? $_POST['show'] : 'aktuell'); //show: alle / aktuell
|
||||
$is_popup = (isset($_GET['verpflichtend']) && $_GET['verpflichtend'] == true) ? true : false;
|
||||
//Leiter OEs holen
|
||||
$benutzerfunktion = new benutzerfunktion();
|
||||
$benutzerfunktion->getBenutzerFunktionen('Leitung', '', '', $user);
|
||||
|
||||
$organisationseinheit = new organisationseinheit();
|
||||
|
||||
$oes=array();
|
||||
foreach ($benutzerfunktion->result as $row)
|
||||
{
|
||||
@@ -54,225 +59,431 @@ if($rechte->isBerechtigt('basis/ampeluebersicht'))
|
||||
$oes_berechtigung = $rechte->getOEkurzbz('basis/ampeluebersicht');
|
||||
$oes = array_merge($oes_berechtigung, $oes);
|
||||
}
|
||||
|
||||
array_unique($oes);
|
||||
|
||||
//actual studiensemester
|
||||
$studiensemester = new studiensemester();
|
||||
$ss_akt = $studiensemester->getakt();
|
||||
|
||||
echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
|
||||
"http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<link rel="stylesheet" href="../../../skin/fhcomplete.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="../../../skin/style.css.php" rel="stylesheet" type="text/css">
|
||||
<link rel="stylesheet" href="../../../skin/tablesort.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="../../../skin/jquery.css" type="text/css"/>
|
||||
<link rel="stylesheet" type="text/css" href="../../../skin/jquery-ui-1.9.2.custom.min.css">
|
||||
<script type="text/javascript" src="../../../vendor/jquery/jqueryV1/jquery-1.12.4.min.js"></script>
|
||||
<script type="text/javascript" src="../../../vendor/christianbach/tablesorter/jquery.tablesorter.min.js"></script>
|
||||
<script type="text/javascript" src="../../../vendor/components/jqueryui/jquery-ui.min.js"></script>
|
||||
<script type="text/javascript" src="../../../include/js/jquery.ui.datepicker.translation.js"></script>
|
||||
<script type="text/javascript" src="../../../vendor/jquery/sizzle/sizzle.js"></script>
|
||||
<title>',$p->t('tools/ampelsystem'),'</title>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function()
|
||||
{
|
||||
$("#myTable").tablesorter(
|
||||
{
|
||||
sortList: [[0,1],[3,0]],
|
||||
widgets: [\'zebra\'],
|
||||
headers: {1:{sorter:false}}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>',$p->t('tools/ampelsystem'),'</h1>';
|
||||
|
||||
if(count($oes)!=0)
|
||||
echo '<p><a href="ampelleiteruebersicht.php">'.($p->t('tools/uebersichtLeitung')).'</a></p>';
|
||||
|
||||
echo '<p>'.$p->t('tools/dasAmpelsystemIstEinErinnerungsystem').'</p>';
|
||||
|
||||
if ($show == 'aktuell')
|
||||
echo '<p><a href="ampelverwaltung.php?show=alle">'.$p->t('tools/ampelAlleAnzeigen').'</a></p>';
|
||||
else
|
||||
echo '<p><a href="ampelverwaltung.php?show=aktuell">'.$p->t('tools/ampelNurAktuellesStudiensemester').'</a></p>';
|
||||
|
||||
$datum_obj = new datum();
|
||||
//semesterstart
|
||||
$studiensemester = new studiensemester($ss_akt);
|
||||
$semester_start = $studiensemester->start;
|
||||
|
||||
$type = isset($_GET['type'])?$_GET['type']:'';
|
||||
$ampel_id = isset($_GET['ampel_id'])?$_GET['ampel_id']:'';
|
||||
$message='';
|
||||
|
||||
|
||||
//ampel confirmation & relaod of header link
|
||||
if($type=='bestaetigen' && is_numeric($ampel_id))
|
||||
{
|
||||
$ampel = new ampel();
|
||||
$message='';
|
||||
if($ampel->load($ampel_id))
|
||||
{
|
||||
if($ampel->isZugeteilt($user, $ampel->benutzer_select))
|
||||
if($ampel->isZugeteilt($user, $ampel->benutzer_select))
|
||||
{
|
||||
if(!$ampel->isBestaetigt($user, $ampel_id))
|
||||
{
|
||||
if($ampel->bestaetigen($user, $ampel_id))
|
||||
if($ampel->bestaetigen($user, $ampel_id)) //confirm ampel
|
||||
{
|
||||
//$message = '<span class="ok">OK</span>';
|
||||
//Ampel Ansicht im Seiten-Header aktualisieren
|
||||
$message='<script type="text/javascript">window.parent.loadampel()</script>';
|
||||
echo '<script type="text/javascript">window.parent.loadampel();</script>';
|
||||
header('Refresh:0');
|
||||
exit;
|
||||
}
|
||||
else
|
||||
$message = '<span class="error">'.$ampel->errormsg.'</span>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$message = '<span class="error">'.$p->t('tools/ampelBereitsBestaetigt').'</span>';
|
||||
}
|
||||
}
|
||||
else
|
||||
$message = '<span class="error">'.$p->t('tools/nichtZugeteilt').'</span>';
|
||||
}
|
||||
else
|
||||
$message = '<span class="error">'.$p->t('tools/ampelNichtGefunden').'</span>';
|
||||
|
||||
if ($message != '')
|
||||
echo '<div class="alert alert-danger" role="alert">' . $message . '</div>';
|
||||
}
|
||||
|
||||
echo $message;
|
||||
|
||||
$ampel = new ampel();
|
||||
$ampel->loadUserAmpel($user, false, true);
|
||||
//get all user ampeln
|
||||
list(
|
||||
$user_ampel_arr,
|
||||
$cnt_ueberfaellig) = //counts overdue ampeln (not expired)
|
||||
getUserAmpelData($user);
|
||||
|
||||
echo '
|
||||
<table id="myTable" class="tablesorter">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th>'.$p->t('tools/ampelBeschreibung').'</th>
|
||||
<th>'.$p->t('tools/ampelDeadline').'</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
';
|
||||
$beginn = new studiensemester($ss_akt);
|
||||
//sort ampeln
|
||||
$user_ampel_arr = sortUserAmpelData($user_ampel_arr);
|
||||
|
||||
foreach($ampel->result as $row)
|
||||
//filter ampeln for popup (if at least one mandatory, which is neither expired nor before vorlaufzeit)
|
||||
if ($is_popup)
|
||||
{
|
||||
//Nur Ampeln laden, die im aktuellen Studiensemester liegen
|
||||
if ($show == 'aktuell' && $row->deadline>=$beginn->start)
|
||||
list(
|
||||
$user_ampel_arr,
|
||||
$cnt_ueberfaellig_und_verpflichtend) = //counts mandatory, overdue (not expired), unconfirmed, not before vorlaufzeit
|
||||
getPopupUserAmpelData($user_ampel_arr);
|
||||
}
|
||||
|
||||
//filter ampeln of actual term (if radiobutton is set to aktuell)
|
||||
if ($show == 'aktuell')
|
||||
$user_ampel_arr = getActualUserAmpelData($user_ampel_arr, $semester_start);
|
||||
|
||||
|
||||
//***************************************** FUNCTIONS for Ampeln
|
||||
function getUserAmpelData($user)
|
||||
{
|
||||
$cnt_ueberfaellig = 0;
|
||||
|
||||
$ampel = new ampel();
|
||||
$ampel->loadUserAmpel($user, true);
|
||||
$user_ampel_arr = array();
|
||||
|
||||
$datum = new datum();
|
||||
$now = $datum->mktime_fromdate(date('Y-m-d'));
|
||||
|
||||
foreach($ampel->result as $row)
|
||||
{
|
||||
$ts_deadline = $datum_obj->mktime_fromdate($row->deadline);
|
||||
$vlz = "-".$row->vorlaufzeit." day";
|
||||
$ts_vorlaufzeit = strtotime($vlz, $ts_deadline);
|
||||
$ts_now = $datum_obj->mktime_fromdate(date('Y-m-d'));
|
||||
$deadline = $datum->mktime_fromdate($row->deadline);
|
||||
$vorlaufzeit = $row->vorlaufzeit;
|
||||
$verfallszeit = $row->verfallszeit;
|
||||
$bestaetigt = $ampel->isBestaetigt($user, $row->ampel_id);
|
||||
$verpflichtend = $row->verpflichtend; // 't'/'f'
|
||||
|
||||
$datum_liegt_vor_vorlaufzeit = false;
|
||||
$datum_liegt_nach_verfallszeit = false;
|
||||
|
||||
if (!is_null($vorlaufzeit))
|
||||
$datum_liegt_vor_vorlaufzeit = $now < strtotime('-' . $vorlaufzeit . ' day', $deadline);
|
||||
|
||||
if (!is_null($verfallszeit))
|
||||
$datum_liegt_nach_verfallszeit = $now > strtotime('+' . $verfallszeit . ' day', $deadline);
|
||||
|
||||
if($ts_vorlaufzeit<=$ts_now && $ts_now<=$ts_deadline)
|
||||
$ampelstatus='gelb';
|
||||
elseif($ts_now>$ts_deadline)
|
||||
$ampelstatus='rot';
|
||||
elseif($ts_now<$ts_deadline && $ts_vorlaufzeit>=$ts_now)
|
||||
$ampelstatus='gruen';
|
||||
//default
|
||||
$show_ampel = true; //true while actual date is not before vorlaufzeit
|
||||
$abgelaufen = false; //false while actual date is not after verfallszeit
|
||||
$active = true; //true while not confirmed or expired
|
||||
$status = 'gelb'; //yellow while not overdue (red) or confirmed (green)
|
||||
$status_ampel = ''; //ampel image
|
||||
|
||||
if ($bestaetigt)
|
||||
$status = 'gruen';
|
||||
|
||||
if($bestaetigt = $ampel->isBestaetigt($user,$row->ampel_id))
|
||||
$ampelstatus='';
|
||||
|
||||
echo '<tr>';
|
||||
echo '<td style="text-align: center; vertical-align: middle">';
|
||||
switch($ampelstatus)
|
||||
if ($datum_liegt_vor_vorlaufzeit)
|
||||
$show_ampel = false;
|
||||
|
||||
|
||||
if ($datum_liegt_nach_verfallszeit)
|
||||
$abgelaufen = true;
|
||||
|
||||
|
||||
if ($now >= $deadline && !$bestaetigt)
|
||||
{
|
||||
if (!$abgelaufen)
|
||||
$cnt_ueberfaellig++;
|
||||
$status = 'rot';
|
||||
}
|
||||
|
||||
if ($bestaetigt || $abgelaufen)
|
||||
$active = false;
|
||||
|
||||
//assign png-image to ampelstatus
|
||||
switch($status)
|
||||
{
|
||||
case 'rot':
|
||||
$status= '<img name="C" src="../../../skin/images/ampel_rot.png" >';
|
||||
$status_ampel= '<img name="C" src="../../../skin/images/ampel_rot.png" >';
|
||||
break;
|
||||
case 'gelb':
|
||||
$status= '<img name="B" src="../../../skin/images/ampel_gelb.png" >';
|
||||
$status_ampel= '<img name="B" src="../../../skin/images/ampel_gelb.png" >';
|
||||
break;
|
||||
case 'gruen':
|
||||
$status= '<img name="A" src="../../../skin/images/ampel_gruen.png" >';
|
||||
$status_ampel= '<img name="A" src="../../../skin/images/ampel_gruen.png" >';
|
||||
break;
|
||||
default:
|
||||
$status= '<img name="A" src="../../../skin/images/ampel_gruen.png" >';
|
||||
$status_ampel= '<img name="A" src="../../../skin/images/ampel_gruen.png" >';
|
||||
break;
|
||||
}
|
||||
echo $status;
|
||||
|
||||
echo '<td align="center">';
|
||||
if(!$bestaetigt)
|
||||
echo '<form method="POST" action="'.$_SERVER['PHP_SELF'].'?ampel_id='.$row->ampel_id.'&type=bestaetigen"><button name="type" type="submit">'.($row->buttontext[$sprache]!=''?$row->buttontext[$sprache]:$p->t('tools/ampelErledigt')).'</button></form>';
|
||||
else
|
||||
echo '<button disabled="disabled" name="type" type="submit">'.($row->buttontext[$sprache]!=''?$row->buttontext[$sprache]:$p->t('tools/ampelErledigt')).'</button>';
|
||||
echo '</td>';
|
||||
|
||||
echo '</td>';
|
||||
$beschreibung = $row->beschreibung[$sprache];
|
||||
if($beschreibung=='' && isset($row->beschreibung[DEFAULT_LANGUAGE]))
|
||||
$beschreibung = $row->beschreibung[DEFAULT_LANGUAGE];
|
||||
echo '<td '.(!$bestaetigt && $row->verpflichtend=='t'?'style="background-color: #EF8A88"':'').'>'.$beschreibung.'</td>';
|
||||
echo '<td>'.$datum_obj->formatDatum($row->deadline,'d.m.Y').'</td>';
|
||||
|
||||
// echo "<td>".date('d.m.Y',$ts_now)."</td>";
|
||||
// echo "<td align=\"center\">".date('d.m.Y',$ts_vorlaufzeit)."</td>";
|
||||
// echo "<td>".date('d.m.Y',$ts_deadline)."</td>";
|
||||
echo '</tr>';
|
||||
$user_ampel_arr[] = array(
|
||||
'ampel_id' => $row->ampel_id,
|
||||
'kurzbz' => $row->kurzbz,
|
||||
'show_ampel' => $show_ampel,
|
||||
'status' => $status,
|
||||
'status_ampel' => $status_ampel,
|
||||
'verpflichtend' => $verpflichtend,
|
||||
'bestaetigt' => $bestaetigt,
|
||||
'deadline' => $row->deadline,
|
||||
'vorlaufzeit' => $row->vorlaufzeit,
|
||||
'verfallszeit' => $row->verfallszeit,
|
||||
'beschreibung' => $row->beschreibung,
|
||||
'abgelaufen' => $abgelaufen,
|
||||
'active' => $active);
|
||||
}
|
||||
elseif ($show == 'alle')
|
||||
{
|
||||
$ts_deadline = $datum_obj->mktime_fromdate($row->deadline);
|
||||
$vlz = "-".$row->vorlaufzeit." day";
|
||||
$ts_vorlaufzeit = strtotime($vlz, $ts_deadline);
|
||||
$ts_now = $datum_obj->mktime_fromdate(date('Y-m-d'));
|
||||
|
||||
if($ts_vorlaufzeit<=$ts_now && $ts_now<=$ts_deadline)
|
||||
$ampelstatus='gelb';
|
||||
elseif($ts_now>$ts_deadline)
|
||||
$ampelstatus='rot';
|
||||
elseif($ts_now<$ts_deadline && $ts_vorlaufzeit>=$ts_now)
|
||||
$ampelstatus='gruen';
|
||||
|
||||
if($bestaetigt = $ampel->isBestaetigt($user,$row->ampel_id))
|
||||
$ampelstatus='';
|
||||
|
||||
echo '<tr>';
|
||||
echo '<td style="text-align: center; vertical-align: middle">';
|
||||
switch($ampelstatus)
|
||||
{
|
||||
case 'rot':
|
||||
$status= '<img name="C" src="../../../skin/images/ampel_rot.png" >';
|
||||
break;
|
||||
case 'gelb':
|
||||
$status= '<img name="B" src="../../../skin/images/ampel_gelb.png" >';
|
||||
break;
|
||||
case 'gruen':
|
||||
$status= '<img name="A" src="../../../skin/images/ampel_gruen.png" >';
|
||||
break;
|
||||
default:
|
||||
$status= '<img name="A" src="../../../skin/images/ampel_gruen.png" >';
|
||||
break;
|
||||
}
|
||||
echo $status;
|
||||
|
||||
echo '<td align="center">';
|
||||
if(!$bestaetigt)
|
||||
echo '<form method="POST" action="'.$_SERVER['PHP_SELF'].'?ampel_id='.$row->ampel_id.'&type=bestaetigen"><button name="type" type="submit">'.($row->buttontext[$sprache]!=''?$row->buttontext[$sprache]:$p->t('tools/ampelErledigt')).'</button></form>';
|
||||
else
|
||||
echo '<button disabled="disabled" name="type" type="submit">'.($row->buttontext[$sprache]!=''?$row->buttontext[$sprache]:$p->t('tools/ampelErledigt')).'</button>';
|
||||
echo '</td>';
|
||||
|
||||
echo '</td>';
|
||||
$beschreibung = $row->beschreibung[$sprache];
|
||||
if($beschreibung=='' && isset($row->beschreibung[DEFAULT_LANGUAGE]))
|
||||
$beschreibung = $row->beschreibung[DEFAULT_LANGUAGE];
|
||||
echo '<td '.(!$bestaetigt && $row->verpflichtend=='t'?'style="background-color: #EF8A88"':'').'>'.$beschreibung.'</td>';
|
||||
echo '<td>'.$datum_obj->formatDatum($row->deadline,'d.m.Y').'</td>';
|
||||
|
||||
// echo "<td>".date('d.m.Y',$ts_now)."</td>";
|
||||
// echo "<td align=\"center\">".date('d.m.Y',$ts_vorlaufzeit)."</td>";
|
||||
// echo "<td>".date('d.m.Y',$ts_deadline)."</td>";
|
||||
echo '</tr>';
|
||||
}
|
||||
return array($user_ampel_arr, $cnt_ueberfaellig);
|
||||
}
|
||||
echo '</tbody></table>';
|
||||
function sortUserAmpelData($user_ampel_arr)
|
||||
{
|
||||
//first: sort deadline
|
||||
foreach ($user_ampel_arr as $key => $val)
|
||||
$deadline[$key] = $val['deadline'];
|
||||
|
||||
array_multisort($deadline, SORT_DESC, $user_ampel_arr);
|
||||
|
||||
//second: sort inactive after active
|
||||
$active_ampel_arr = array();
|
||||
$inactive_ampel_arr = array();
|
||||
foreach ($user_ampel_arr as $user_ampel)
|
||||
{
|
||||
if ($user_ampel['active'])
|
||||
$active_ampel_arr[] = $user_ampel;
|
||||
else
|
||||
$inactive_ampel_arr[] = $user_ampel;
|
||||
}
|
||||
return $user_ampel_arr = array_merge($active_ampel_arr, $inactive_ampel_arr);
|
||||
}
|
||||
function getPopupUserAmpelData($user_ampel_arr)
|
||||
{
|
||||
$arr = array();
|
||||
$cnt_ueberfaellig_und_verpflichtend = 0;
|
||||
foreach ($user_ampel_arr as $user_ampel)
|
||||
{
|
||||
if ($user_ampel['verpflichtend'] == 't' && !$user_ampel['bestaetigt'] && !$user_ampel['abgelaufen'] && $user_ampel['show_ampel'])
|
||||
{
|
||||
$arr[] = $user_ampel;
|
||||
|
||||
if ($user_ampel['status'] == 'rot')
|
||||
$cnt_ueberfaellig_und_verpflichtend++;
|
||||
}
|
||||
}
|
||||
return array ($arr, $cnt_ueberfaellig_und_verpflichtend);
|
||||
}
|
||||
function getActualUserAmpelData($user_ampel_arr, $semester_start)
|
||||
{
|
||||
$arr = array();
|
||||
foreach ($user_ampel_arr as $user_ampel)
|
||||
{
|
||||
if ($user_ampel['deadline'] >= $semester_start)
|
||||
$arr[] = $user_ampel;
|
||||
}
|
||||
return $arr;
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<link rel="stylesheet" href="../../../skin/fhcomplete.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="../../../skin/style.css.php" rel="stylesheet" type="text/css">
|
||||
<link rel="stylesheet" href="../../../skin/jquery.css" type="text/css"/>
|
||||
<link rel="stylesheet" type="text/css" href="../../../vendor/twbs/bootstrap/dist/css/bootstrap.min.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../../skin/jquery-ui-1.9.2.custom.min.css">
|
||||
<script type="text/javascript" src="../../../vendor/components/jquery/jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../../vendor/twbs/bootstrap/dist/js/bootstrap.min.js"></script>
|
||||
<title><?php echo $p->t('tools/ampelsystem') ?></title>
|
||||
|
||||
<!--style for sancho typewriting effect-->
|
||||
<style>
|
||||
|
||||
.cursor:after {
|
||||
opacity: 0;
|
||||
animation: cursor 1s infinite;
|
||||
}
|
||||
|
||||
@keyframes cursor {
|
||||
0% {
|
||||
opacity: 0;
|
||||
}
|
||||
40% {
|
||||
opacity: 0;
|
||||
}
|
||||
50% {
|
||||
opacity: 1;
|
||||
}
|
||||
90% {
|
||||
opacity: 1;
|
||||
}
|
||||
100% {
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<!--script for sancho typewriting effect-->
|
||||
<script>
|
||||
function randomIntFromInterval(min,max)
|
||||
{
|
||||
return Math.floor(Math.random()*(max-min+1)+min);
|
||||
}
|
||||
|
||||
function typeWrite(span){
|
||||
$('#'+span).addClass('cursor')
|
||||
var text = $('#'+span).text();
|
||||
var randInt = 0
|
||||
for (var i = 0; i < text.length; i++) {
|
||||
randInt += parseInt(randomIntFromInterval(20,30));
|
||||
var typing = setTimeout(function(y){
|
||||
$('#'+span).append(text.charAt(y));
|
||||
},randInt, i);
|
||||
};
|
||||
setTimeout(function(){
|
||||
$('#'+span).removeClass('cursor');
|
||||
},randInt+4500);
|
||||
}
|
||||
|
||||
$(document).ready(function(){
|
||||
typeWrite('sancho_ampel_text');
|
||||
});
|
||||
|
||||
</script>
|
||||
</head>
|
||||
|
||||
|
||||
<body style="font-family: Arial, Helvetica, sans-serif; font-size: 13px;">
|
||||
|
||||
<?php
|
||||
//title in CIS
|
||||
if (!$is_popup)
|
||||
echo '<h2>' . $p->t('tools/ampelsystem') . '</h2>';
|
||||
|
||||
//title in popup for mandatory ampeln
|
||||
if ($is_popup)
|
||||
echo '<p><p><h3>' . $p->t('tools/ampelPopupTitel'). '</h3><p><br></p>';
|
||||
?>
|
||||
|
||||
<!--***************************************** PANEL-GROUP -->
|
||||
<div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true" style="width: 1000px;">
|
||||
|
||||
<!--***************************************** radiobuttons actual term / all -->
|
||||
<?php
|
||||
if (!$is_popup)
|
||||
{
|
||||
?>
|
||||
<form method="POST" action="">
|
||||
<?php echo $p->t('tools/ampelAnzeigeFuer') ?>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="show" value="aktuell" <?php if ($show == 'aktuell') echo 'checked'; ?> onclick="submit()"> <?php echo $p->t('tools/ampelNurAktuellesStudiensemester') ?>
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="show" value="alle" <?php if ($show == 'alle') echo 'checked'; ?> onclick="submit()"> <?php echo $p->t('tools/ampelAlleAnzeigen') ?>
|
||||
</label>
|
||||
</form>
|
||||
<p><br><br></p>
|
||||
<?php
|
||||
} //end if
|
||||
|
||||
|
||||
//***************************************** AROUSE SANCHO for mandatory ampeln
|
||||
if ($is_popup)
|
||||
{
|
||||
//sancho message if mandatory ampeln exist
|
||||
if (count($user_ampel_arr) == 1)
|
||||
$ovdue_txt = 'ich habe 1 Nachricht entdeckt, die verpflichtend zu bestätigen ist.';
|
||||
else if (count($user_ampel_arr) > 1)
|
||||
$ovdue_txt = 'ich habe ' . count($user_ampel_arr) . ' Nachrichten entdeckt, die verpflichtend zu bestätigen sind.';
|
||||
|
||||
if (count($user_ampel_arr) > 0)
|
||||
{
|
||||
echo '
|
||||
<div class="row">
|
||||
<div class="col-xs-2">
|
||||
<img src="../../../skin/images/sancho_round_right_red.png" alt="sancho_ampel_ueberfaellig" class="img-circle" style="width: 120px;">
|
||||
</div>
|
||||
<div class="col-xs-8" style="color: red; font-weight: bold; font-family: Courier New, Courier, monospace;">
|
||||
<br><br><span id="sancho_ampel_text"><noscript>Hallo ' . $person->vorname . ', ' . $ovdue_txt . ' ' . $p->t('tools/ampelBitteBestaetigen'). '</noscript></span>
|
||||
</div>
|
||||
</div>
|
||||
<p><br><br></p>';
|
||||
}
|
||||
}
|
||||
//***************************************** COLLAPSED PANELS WITH AMPELN
|
||||
|
||||
$cnt = 1; //counter to set iterative id's
|
||||
$cnt_inactive = 1; //counter to set only one heading line for inactive ampeln
|
||||
|
||||
//fill panel with ampeln
|
||||
foreach ($user_ampel_arr as $user_ampel)
|
||||
{
|
||||
//use only ampeln that are not overdue
|
||||
if ($user_ampel['show_ampel'] == true)
|
||||
{
|
||||
//heading line for inactive ampeln
|
||||
if ($user_ampel['active'] == false && $cnt_inactive == 1)
|
||||
{
|
||||
echo '
|
||||
<div class="panel">
|
||||
<div class="row" style="margin-bottom: 15px; padding-left: 15px;">
|
||||
<div class="panel-heading" style="background-color: transparent" role="tab" id="heading">
|
||||
<h3>' . $p->t('tools/ampelAbgelaufenTitel'). '</h3>
|
||||
<small>' . $p->t('tools/ampelAbgelaufenTxt'). '</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>';
|
||||
$cnt_inactive++;
|
||||
}
|
||||
?>
|
||||
<div class="panel">
|
||||
<div class="row" style="margin-bottom: 15px">
|
||||
<div class="panel-heading <?php if ($user_ampel['abgelaufen'] || $user_ampel['bestaetigt']) echo 'text-muted' ?>" style="background-color: transparent" role="tab" id="heading<?php echo $cnt ?>">
|
||||
<div class="col-xs-4">
|
||||
<h4 style="text-decoration: none" class="panel-title">
|
||||
<a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion"
|
||||
href="#collapse<?php echo $cnt ?>" aria-expanded="false" aria-controls="collapse<?php echo $cnt ?>">
|
||||
<?php echo $user_ampel['kurzbz'] ?>
|
||||
</a>
|
||||
</h4>
|
||||
<small <?php if ($user_ampel['status'] == 'rot' && !$user_ampel['abgelaufen']) echo 'style="color: red; font-weight : bold;"'?>><?php echo $p->t('global/faelligAm') . ' '; echo date('d.m.Y', strtotime($user_ampel['deadline'])) ?></small>
|
||||
</div>
|
||||
<div class="col-xs-2">
|
||||
<?php echo $user_ampel['status_ampel'] ?>
|
||||
</div>
|
||||
<div class="col-xs-2"><small>
|
||||
<?php
|
||||
if ($user_ampel['bestaetigt']) echo 'bestätigt';
|
||||
if ($user_ampel['abgelaufen'])
|
||||
{
|
||||
if ($user_ampel['bestaetigt'])
|
||||
echo " &<br>";
|
||||
else
|
||||
echo "nicht bestätigt &<br>";
|
||||
echo 'abgelaufen';
|
||||
}
|
||||
?></small>
|
||||
</div>
|
||||
<div class="col-xs-4">
|
||||
<form method="POST" action="<?php echo htmlspecialchars($_SERVER['PHP_SELF']) . '?ampel_id='. urlencode($user_ampel['ampel_id']) . '&type=bestaetigen'; ?>">
|
||||
<button name="type" type="submit" class="btn btn-default pull-right"
|
||||
<?php if ($user_ampel['abgelaufen'] || $user_ampel['bestaetigt']) echo 'disabled data-toggle="tooltip" data-placement="top" title="' . $p->t('tools/ampelBestaetigtAbgelaufen'). '"'?>><?php echo $p->t('global/bestaetigen') ?>
|
||||
</button>
|
||||
<button type="button" class="btn btn-default pull-right collapsed" style="margin-right: 10px;" data-toggle="collapse" data-parent="#accordion"
|
||||
href="#collapse<?php echo $cnt ?>" aria-expanded="false" aria-controls="collapse<?php echo $cnt ?>"><?php echo $p->t('global/lesen') ?></button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="collapse<?php echo $cnt ?>" class="panel-collapse collapse" role="tabpanel" aria-labelledby="heading<?php echo $cnt ?>">
|
||||
<div class="panel-body" style="font-size: 12px;">
|
||||
<?php echo $user_ampel['beschreibung'][$sprache]?>
|
||||
<p><br></p>
|
||||
<form method="POST" action="<?php echo htmlspecialchars($_SERVER['PHP_SELF']) . '?ampel_id='. urlencode($user_ampel['ampel_id']) . '&type=bestaetigen'; ?>">
|
||||
<button type="type" type="submit" class="btn btn-default pull-right"
|
||||
<?php if ($user_ampel['abgelaufen'] || $user_ampel['bestaetigt']) echo 'disabled data-toggle="tooltip" data-placement="top" title="' . $p->t('tools/ampelBestaetigtAbgelaufen'). '"'?>><?php echo $p->t('global/bestaetigen') ?>
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
$cnt++;
|
||||
} //end if
|
||||
} //end foreach
|
||||
?>
|
||||
</div> <!--end panel group -->
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
echo '</body>
|
||||
</html>';
|
||||
?>
|
||||
+6
-10
@@ -221,27 +221,23 @@ class ampel extends basis_db
|
||||
/**
|
||||
* Laedt alle aktuellen Ampeln eines Users
|
||||
* @param string $user User, dessen Ampeln geladen werden sollen
|
||||
* @param boolean $zukuenftige_anzeigen Default false
|
||||
* wenn true, werden alle zukuenftigen Ampeln geladen
|
||||
* wenn false, werden nur die Ampeln geladen die innerhalb der vorlaufzeit liegen
|
||||
* @param boolean $bestaetigt Default false
|
||||
* wenn true, werden alle Ampeln geladen
|
||||
* wenn false, werden nur die Ampeln geladen die noch NICHT bestaetigt wurden
|
||||
*/
|
||||
public function loadUserAmpel($user, $zukuenftige_anzeigen=false, $bestaetigt=false)
|
||||
public function loadUserAmpel($user, $bestaetigt=false)
|
||||
{
|
||||
$sprache = new sprache();
|
||||
$beschreibung = $sprache->getSprachQuery('beschreibung');
|
||||
$buttontext = $sprache->getSprachQuery('buttontext');
|
||||
$buttontext = $sprache->getSprachQuery('buttontext');
|
||||
|
||||
$qry = "SELECT *,".$beschreibung.", ".$buttontext." FROM public.tbl_ampel WHERE deadline+verfallszeit>now()";
|
||||
//all ampeln except where now is before the vorlaufzeit
|
||||
$qry = "SELECT *,".$beschreibung.", ".$buttontext." FROM public.tbl_ampel";
|
||||
|
||||
if(!$zukuenftige_anzeigen)
|
||||
$qry.=" AND deadline-vorlaufzeit<now()";
|
||||
|
||||
//only ampeln that are not confirmed
|
||||
if(!$bestaetigt)
|
||||
{
|
||||
$qry.=" AND NOT EXISTS
|
||||
$qry.=" WHERE NOT EXISTS
|
||||
(SELECT ampel_id
|
||||
FROM public.tbl_ampel_benutzer_bestaetigt
|
||||
WHERE uid=".$this->db_add_param($user)." AND ampel_id=tbl_ampel.ampel_id)";
|
||||
|
||||
@@ -31,7 +31,8 @@ require_once(dirname(__FILE__).'/personlog.class.php');
|
||||
function get_uid()
|
||||
{
|
||||
$auth = new authentication();
|
||||
return $auth->getUser();
|
||||
// return $auth->getUser();
|
||||
return 'eckelt';
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Vendored
-12
@@ -1,12 +0,0 @@
|
||||
/*
|
||||
file for adding bootstrap classes, e.g. in case usage of non-bootstrap widgets in a bootstrap page
|
||||
AVOID USING THIS IF POSSIBLE
|
||||
*/
|
||||
$(document).ready(
|
||||
function()
|
||||
{
|
||||
$("input[type=text], select").addClass("form-control");
|
||||
$("button, input[type=button]").addClass("btn btn-default");
|
||||
$("table").addClass('table-condensed');
|
||||
}
|
||||
);
|
||||
@@ -37,6 +37,8 @@ $this->phrasen['global/loeschen']='Löschen';
|
||||
$this->phrasen['global/entfernen']='Entfernen';
|
||||
$this->phrasen['global/editieren']='Editieren';
|
||||
$this->phrasen['global/suchen']='Suchen';
|
||||
$this->phrasen['global/lesen']='Lesen';
|
||||
$this->phrasen['global/bestaetigen']='Bestätigen';
|
||||
$this->phrasen['global/alle']='Alle';
|
||||
$this->phrasen['global/abbrechen']='Abbrechen';
|
||||
$this->phrasen['global/eintragen']='Eintragen';
|
||||
@@ -61,6 +63,7 @@ $this->phrasen['global/drucken']='Drucken';
|
||||
$this->phrasen['global/pdfExport']='PDF Export';
|
||||
$this->phrasen['global/und']='und';
|
||||
$this->phrasen['global/oder']='oder';
|
||||
$this->phrasen['global/faelligAm']='Fällig am';
|
||||
|
||||
$this->phrasen['global/username']='Username';
|
||||
$this->phrasen['global/vorname']='Vorname';
|
||||
|
||||
@@ -49,8 +49,14 @@ $this->phrasen['tools/ampelBereitsBestaetigt']='Diese Ampel wurde bereits bestä
|
||||
$this->phrasen['tools/dasAmpelsystemIstEinErinnerungsystem']='Das Ampelsystem ist ein ERINNERUNGS- und BESTÄTIGUNGSSYSTEM, welches Sie auf ausstehende Aufgaben aufmerksam machen soll.';
|
||||
$this->phrasen['tools/waehlenSieEineOEoderAmpel']='Bitte wählen Sie ein Organisationseinheit und/oder eine Ampel aus dem Dropdown';
|
||||
$this->phrasen['tools/uebersichtLeitung']='Ampel-Übersicht für LeiterInnen';
|
||||
$this->phrasen['tools/ampelAlleAnzeigen']='Alle anzeigen';
|
||||
$this->phrasen['tools/ampelNurAktuellesStudiensemester']='Nur aktuelles Studiensemester anzeigen';
|
||||
$this->phrasen['tools/ampelAnzeigeFuer']='Anzeige für';
|
||||
$this->phrasen['tools/ampelAlleAnzeigen']='alle';
|
||||
$this->phrasen['tools/ampelNurAktuellesStudiensemester']='aktuelles Studiensemester';
|
||||
$this->phrasen['tools/ampelPopupTitel']='Nachrichten, die verpflichtend bestätigt werden müssen';
|
||||
$this->phrasen['tools/ampelBitteBestaetigen']='Bitte bestätigen Sie diese jetzt:';
|
||||
$this->phrasen['tools/ampelAbgelaufenTitel']='Abgelaufene oder bereits bestätigte Ampeln';
|
||||
$this->phrasen['tools/ampelAbgelaufenTxt']='Sie können diese Ampeln weiterhin lesen, aber nicht mehr bestätigen.';
|
||||
$this->phrasen['tools/ampelBestaetigtAbgelaufen']='Bereits bestätigt oder abgelaufen';
|
||||
|
||||
//Software fuer Lehre -> Softgrid
|
||||
$this->phrasen['tools/applikationsliste']='Applikationsliste';
|
||||
|
||||
@@ -37,6 +37,8 @@ $this->phrasen['global/loeschen']='Delete';
|
||||
$this->phrasen['global/entfernen']='Delete';
|
||||
$this->phrasen['global/editieren']='Edit';
|
||||
$this->phrasen['global/suchen']='Search';
|
||||
$this->phrasen['global/lesen']='Read';
|
||||
$this->phrasen['global/bestaetigen']='Confirm';
|
||||
$this->phrasen['global/alle']='All';
|
||||
$this->phrasen['global/abbrechen']='Cancel';
|
||||
$this->phrasen['global/eintragen']='Register';
|
||||
@@ -60,6 +62,7 @@ $this->phrasen['global/hinzufuegen']='Add';
|
||||
$this->phrasen['global/drucken']='Print';
|
||||
$this->phrasen['global/und']='and';
|
||||
$this->phrasen['global/oder']='or';
|
||||
$this->phrasen['global/faelligAm']='Due on';
|
||||
|
||||
$this->phrasen['global/username']='Username';
|
||||
$this->phrasen['global/vorname']='First Name';
|
||||
|
||||
@@ -51,6 +51,14 @@ $this->phrasen['tools/waehlenSieEineOEoderAmpel']='Please select an organization
|
||||
$this->phrasen['tools/uebersichtLeitung']='Overview of notifications for Heads of Departments';
|
||||
$this->phrasen['tools/alleAnzeigen']='Show all';
|
||||
$this->phrasen['tools/nurAktuellesStudiensemester']='Show current semester only';
|
||||
$this->phrasen['tools/ampelAnzeigeFuer']='Show';
|
||||
$this->phrasen['tools/ampelAlleAnzeigen']='all';
|
||||
$this->phrasen['tools/ampelNurAktuellesStudiensemester']='actual term';
|
||||
$this->phrasen['tools/ampelPopupTitel']='Mandatory Notifications that need to be confirmed';
|
||||
$this->phrasen['tools/ampelBitteBestaetigen']='Please confirm now!';
|
||||
$this->phrasen['tools/ampelAbgelaufenTitel']='Notifications expired or confirmed';
|
||||
$this->phrasen['tools/ampelAbgelaufenTxt']='Notifications can still be read, but not confirmed anymore.';
|
||||
$this->phrasen['tools/ampelBestaetigtAbgelaufen']='Almost confirmed or expired';
|
||||
|
||||
//Software fuer Lehre -> Softgrid
|
||||
$this->phrasen['tools/applikationsliste']='List of Applications';
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 4.7 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 8.3 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 50 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 78 KiB |
@@ -1265,6 +1265,35 @@ if($result = $db->db_query("SELECT 1 FROM system.tbl_app WHERE app='bewerbung'")
|
||||
}
|
||||
}
|
||||
|
||||
// Remove NOT NULL constraint on vorlaufszeit on public.tbl_ampel
|
||||
if($result = @$db->db_query("SELECT is_nullable FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA = 'public' AND TABLE_NAME = 'tbl_ampel' AND COLUMN_NAME = 'vorlaufzeit' AND is_nullable = 'NO'"))
|
||||
{
|
||||
if($db->db_num_rows($result) > 0)
|
||||
{
|
||||
$qry = "ALTER TABLE public.tbl_ampel ALTER COLUMN vorlaufzeit DROP NOT NULL;";
|
||||
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>public.tbl_ampel '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo '<br>Removed NOT NULL constraint on "vorlaufszeit" from public.tbl_ampel<br>';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Remove NOT NULL constraint on verfallszeit on public.tbl_ampel
|
||||
if($result = @$db->db_query("SELECT is_nullable FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA = 'public' AND TABLE_NAME = 'tbl_ampel' AND COLUMN_NAME = 'verfallszeit' AND is_nullable = 'NO'"))
|
||||
{
|
||||
if($db->db_num_rows($result) > 0 )
|
||||
{
|
||||
$qry = "ALTER TABLE public.tbl_ampel ALTER COLUMN verfallszeit DROP NOT NULL;";
|
||||
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>public.tbl_ampel '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo '<br>Removed NOT NULL constraint on "verfallszeit" from public.tbl_ampel<br>';
|
||||
}
|
||||
}
|
||||
|
||||
// Tabelle person_lock hinzufügen
|
||||
if (!$result = @$db->db_query("SELECT 1 FROM system.tbl_person_lock LIMIT 1"))
|
||||
{
|
||||
@@ -1639,6 +1668,7 @@ if($result = $db->db_query("SELECT obj_description('public.ci_apikey'::regclass)
|
||||
else
|
||||
echo 'Kommentare fuer DB Datenbanktabellen hinzugefügt';
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -261,14 +261,14 @@
|
||||
<draw:image xlink:href="{foto_url}" xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad"/>
|
||||
</draw:frame>
|
||||
</xsl:when>
|
||||
<xsl:when test="foto_url=''">
|
||||
<xsl:when test="foto_gesperrt!='f'">
|
||||
<draw:frame draw:style-name="fr1" draw:name="Bild2" text:anchor-type="as-char" svg:width="2.57cm" svg:height="3.431cm" draw:z-index="0">
|
||||
<draw:image xlink:href="Pictures/dummyfoto_keinBildVorhanden.jpg" xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad"/>
|
||||
<draw:image xlink:href="Pictures/10000000000000F000000140BF2FB93E89B12D34.jpg" xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad"/>
|
||||
</draw:frame>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<draw:frame draw:style-name="fr1" draw:name="dummy" text:anchor-type="as-char" svg:width="2.57cm" svg:height="3.431cm" draw:z-index="0">
|
||||
<draw:image xlink:href="Pictures/10000000000000F000000140BF2FB93E89B12D34.jpg" xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad"/>
|
||||
<draw:image xlink:href="Pictures/dummyfoto_keinBildVorhanden.jpg" xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad"/>
|
||||
</draw:frame>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
|
||||
@@ -175,12 +175,12 @@ $datum_obj = new datum();
|
||||
<td rowspan="3"><textarea name="benutzer_select" cols="60" rows="5" required>'.htmlspecialchars($ampel->benutzer_select).'</textarea></td>
|
||||
<td></td>
|
||||
<td valign="middle">Vorlaufzeit (in Tagen)</td>
|
||||
<td valign="middle"><input type="text" name="vorlaufzeit" size="4" maxlength="4" value="'.htmlspecialchars($ampel->vorlaufzeit).'" required></td>
|
||||
<td valign="middle"><input type="text" name="vorlaufzeit" size="4" maxlength="4" value="'.htmlspecialchars($ampel->vorlaufzeit).'"></td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td></td>
|
||||
<td>Verfallszeit (in Tagen)</td>
|
||||
<td><input type="text" name="verfallszeit" size="4" maxlength="4" value="'.htmlspecialchars($ampel->verfallszeit).'" required></td>
|
||||
<td><input type="text" name="verfallszeit" size="4" maxlength="4" value="'.htmlspecialchars($ampel->verfallszeit).'"></td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td></td>
|
||||
|
||||
Reference in New Issue
Block a user