mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-18 23:42:17 +00:00
Merge branch 'master' into feature-3778/PunkteübertragReihungstestpunkteFAS
This commit is contained in:
@@ -3,6 +3,7 @@ $this->load->view('templates/FHC-Header',
|
||||
array(
|
||||
'title' => 'FH-Complete',
|
||||
'jquery' => true,
|
||||
'jqueryui' => true,
|
||||
'bootstrap' => true,
|
||||
'fontawesome' => true,
|
||||
'sbadmintemplate' => true,
|
||||
|
||||
@@ -20,6 +20,8 @@
|
||||
* Rudolf Hangl < rudolf.hangl@technikum-wien.at >
|
||||
* Gerald Simane-Sequens < gerald.simane-sequens@technikum-wien.at >
|
||||
*/
|
||||
session_start();
|
||||
|
||||
require_once('../../config/cis.config.inc.php');
|
||||
require_once('../../include/wochenplan.class.php');
|
||||
require_once('../../include/benutzerberechtigung.class.php');
|
||||
|
||||
@@ -791,6 +791,8 @@ function writeAnmeldungen(data)
|
||||
var liste = "<ul id='sortable'>";
|
||||
var count = 0;
|
||||
var studiensemester = $("#filter_studiensemester option:selected").val();
|
||||
var listenLinks = "<a href='./pruefungsanmeldungen_liste.pdf.php?termin_id="+terminId+"&lehrveranstaltung_id="+lehrveranstaltung_id+"&studiensemester="+studiensemester+"' target='_blank'><?php echo $p->t('pruefung/listeDrucken'); ?></a><br>"
|
||||
+ "<a href='./pruefungsanmeldungen_liste_ohne_namen.php?termin_id="+terminId+"&lehrveranstaltung_id="+lehrveranstaltung_id+"&studiensemester="+studiensemester+"' target='_blank'><?php echo $p->t('pruefung/listeOhneNamenDrucken'); ?></a>";
|
||||
data.result.anmeldungen.forEach(function(d){
|
||||
count++;
|
||||
var vorname = d.student.vorname !== "null" ? d.student.vorname : "";
|
||||
@@ -825,7 +827,7 @@ function writeAnmeldungen(data)
|
||||
$("#reihungSpeichernButton").html("<input type='button' value='<?php echo $p->t('pruefung/reihungSpeichern'); ?>' onclick='saveReihung(\""+terminId+"\", \""+lehrveranstaltung_id+"\");'><input type='button' value='<?php echo $p->t('pruefung/alleBestaetigen'); ?>' onclick='alleBestaetigen(\""+terminId+"\", \""+lehrveranstaltung_id+"\");'>");
|
||||
$("#lvdaten").html(lv_bezeichnung+" ("+prf_termin+")");
|
||||
$("#anmeldeDaten").html(liste);
|
||||
$("#listeDrucken").html("<a href='./pruefungsanmeldungen_liste.pdf.php?termin_id="+terminId+"&lehrveranstaltung_id="+lehrveranstaltung_id+"&studiensemester="+studiensemester+"' target='_blank'><?php echo $p->t('pruefung/listeDrucken'); ?></a>");
|
||||
$("#listeDrucken").html(listenLinks);
|
||||
if(ort_kurzbz !== null)
|
||||
{
|
||||
$("#raumLink").html("<span><?php echo $p->t('pruefung/pruefungsraum'); ?></span>"+ort_kurzbz);
|
||||
|
||||
@@ -35,6 +35,7 @@ require_once('../../../../include/datum.class.php');
|
||||
require_once('../../../../include/phrasen.class.php');
|
||||
require_once('../../../../include/globals.inc.php');
|
||||
require_once('../../../../include/sprache.class.php');
|
||||
require_once('../../../../include/studiengang.class.php');
|
||||
|
||||
$sprache = getSprache();
|
||||
$lang = new sprache();
|
||||
@@ -230,6 +231,7 @@ $rechte->getBerechtigungen($uid);
|
||||
<th><?php echo $p->t('global/vorname'); ?></th>
|
||||
<th><?php echo $p->t('global/nachname'); ?></th>
|
||||
<th><?php echo $p->t('pruefung/matrikelnummer'); ?></th>
|
||||
<th><?php echo $p->t('pruefung/studiengangAbkuerzung'); ?></th>
|
||||
<th><?php echo $p->t('global/datum'); ?></th>
|
||||
<th><?php echo $p->t('benotungstool/note'); ?></th>
|
||||
<th><?php echo $p->t('global/anmerkung'); ?></th>
|
||||
@@ -242,6 +244,7 @@ $rechte->getBerechtigungen($uid);
|
||||
foreach($anmeldungen as $anmeldung)
|
||||
{
|
||||
$student = new student($anmeldung->uid);
|
||||
$studiengang = new studiengang($student->studiengang_kz);
|
||||
$prfTermin = new pruefungstermin($anmeldung->pruefungstermin_id);
|
||||
|
||||
if($einzeln)
|
||||
@@ -262,6 +265,7 @@ $rechte->getBerechtigungen($uid);
|
||||
echo '<td>'.$student->vorname.'</td>';
|
||||
echo '<td>'.$student->nachname.'</td>';
|
||||
echo '<td>'.$student->matr_nr.'</td>';
|
||||
echo '<td>'.$studiengang->kurzbzlang.'</td>';
|
||||
echo '<td>'.$date.'</td>';
|
||||
echo '<td></td>';
|
||||
echo '<td></td>';
|
||||
|
||||
@@ -0,0 +1,302 @@
|
||||
<?php
|
||||
/*
|
||||
* Copyright 2014 fhcomplete.org
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301, USA.
|
||||
*
|
||||
*
|
||||
* Authors: Stefan Puraner <puraner@technikum-wien.at>
|
||||
*/
|
||||
|
||||
require_once('../../../../config/cis.config.inc.php');
|
||||
require_once('../../../../include/functions.inc.php');
|
||||
require_once('../../../../include/benutzerberechtigung.class.php');
|
||||
require_once('../../../../include/pruefungsanmeldung.class.php');
|
||||
require_once('../../../../include/pruefungCis.class.php');
|
||||
require_once('../../../../include/pruefungstermin.class.php');
|
||||
require_once('../../../../include/studiensemester.class.php');
|
||||
require_once('../../../../include/lehrveranstaltung.class.php');
|
||||
require_once('../../../../include/mitarbeiter.class.php');
|
||||
require_once('../../../../include/student.class.php');
|
||||
require_once('../../../../include/datum.class.php');
|
||||
require_once('../../../../include/phrasen.class.php');
|
||||
require_once('../../../../include/globals.inc.php');
|
||||
require_once('../../../../include/sprache.class.php');
|
||||
require_once('../../../../include/studiengang.class.php');
|
||||
|
||||
$sprache = getSprache();
|
||||
$lang = new sprache();
|
||||
$lang->load($sprache);
|
||||
$p = new phrasen($sprache);
|
||||
|
||||
$uid = get_uid();
|
||||
$rechte = new benutzerberechtigung();
|
||||
$rechte->getBerechtigungen($uid);
|
||||
?><!DOCTYPE html>
|
||||
<html moznomarginboxes="">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<script type="text/javascript" src="../../../../vendor/components/jquery/jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../../../vendor/components/jqueryui/jquery-ui.min.js"></script>
|
||||
<style type="text/css">
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
}
|
||||
|
||||
#page {
|
||||
width: 210mm;
|
||||
min-height: 297mm;
|
||||
padding: 20mm;
|
||||
margin: 10mm auto;
|
||||
border: 1px #ffffff solid;
|
||||
border-radius: 5px;
|
||||
background: white;
|
||||
box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
|
||||
font-family: Arial, Helvetica;
|
||||
}
|
||||
|
||||
#subpage {
|
||||
padding: 10mm;
|
||||
border: 1px white solid;
|
||||
height: 256mm;
|
||||
outline: 20mm;
|
||||
}
|
||||
|
||||
#liste {
|
||||
border: 1px solid black;
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
margin-top: 5mm;
|
||||
font-size: 11pt;
|
||||
}
|
||||
|
||||
h1 {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.bold {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
td {
|
||||
border: 1px solid black;
|
||||
padding: 1mm;
|
||||
}
|
||||
|
||||
th {
|
||||
border: 1px solid black;
|
||||
}
|
||||
|
||||
thead > tr {
|
||||
background-color: white !important;
|
||||
}
|
||||
|
||||
tr:nth-child(odd){
|
||||
background-color: lightgrey;
|
||||
}
|
||||
|
||||
span {
|
||||
line-height: 16pt;
|
||||
font-size: 12pt;
|
||||
}
|
||||
|
||||
@page {
|
||||
size: A4;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
@media print
|
||||
{
|
||||
html, body {
|
||||
width: 210mm;
|
||||
height: 250mm;
|
||||
}
|
||||
#page {
|
||||
margin: 0;
|
||||
border: initial;
|
||||
border-radius: initial;
|
||||
width: initial;
|
||||
min-height: initial;
|
||||
box-shadow: initial;
|
||||
background: initial;
|
||||
page-break-after: auto;
|
||||
}
|
||||
|
||||
/*
|
||||
* Workaround um beim Drucken jede zweite Zeile der Tabelle
|
||||
* grau darzustellen. Standardmäßig werden von Browsern keine
|
||||
* Hintergrundfarben gedruckt.
|
||||
*/
|
||||
tr:nth-child(odd) > td{
|
||||
box-shadow: inset 0 0 0 1000px lightgrey;
|
||||
}
|
||||
|
||||
//Veranlasst Chrome Hintergrundfarben zu drucken
|
||||
body{
|
||||
-webkit-print-color-adjust:exact;
|
||||
background-color: #FFFFFF;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
//Anweisungen nur für Firefox
|
||||
@-moz-document url-prefix() {
|
||||
html, body {
|
||||
height: 280mm;
|
||||
}
|
||||
}
|
||||
@-moz-document url-prefix() {
|
||||
#page {
|
||||
padding: 15mm 25mm 25mm 15mm !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
$(document).ready(function()
|
||||
{
|
||||
window.print();
|
||||
});
|
||||
</script>
|
||||
<div id="page">
|
||||
<div id="subpage">
|
||||
<h1><?php echo $p->t('pruefung/anmeldungsliste'); ?></h1>
|
||||
<?php
|
||||
if(empty($pruefung->result) && !$rechte->isBerechtigt('lehre/pruefungsanmeldungAdmin'))
|
||||
die('Sie haben keine Berechtigung für diese Seite');
|
||||
|
||||
$termin_id = filter_input(INPUT_GET,"termin_id");
|
||||
$lehrveranstaltung_id = filter_input(INPUT_GET,"lehrveranstaltung_id");
|
||||
$studiensemester = filter_input(INPUT_GET, "studiensemester");
|
||||
|
||||
if(is_null($lehrveranstaltung_id))
|
||||
{
|
||||
die($p->t('pruefung/fehlenderParam_lvid'));
|
||||
}
|
||||
else if(is_null($termin_id))
|
||||
{
|
||||
die($p->t('pruefung/fehlenderParam_terminid'));
|
||||
}
|
||||
else if(is_null($studiensemester))
|
||||
{
|
||||
die($p->t('pruefung/fehlenderParam_studiensemester'));
|
||||
}
|
||||
else
|
||||
{
|
||||
$datum = new datum();
|
||||
$stdsem = new studiensemester($studiensemester);
|
||||
$pruefungsanmeldung = new pruefungsanmeldung();
|
||||
$anmeldungen = $pruefungsanmeldung->getAnmeldungenByTermin($termin_id, $lehrveranstaltung_id, $studiensemester, "bestaetigt");
|
||||
$lehrveranstaltung = new lehrveranstaltung($lehrveranstaltung_id);
|
||||
$einzeln = FALSE;
|
||||
if(!empty($anmeldungen))
|
||||
{
|
||||
$pruefung = new pruefungCis($anmeldungen[0]->pruefung_id);
|
||||
$pruefungstermin = new pruefungstermin($anmeldungen[0]->pruefungstermin_id);
|
||||
$mitarbeiter = new mitarbeiter($pruefung->mitarbeiter_uid);
|
||||
if($pruefung->einzeln)
|
||||
{
|
||||
$einzeln = TRUE;
|
||||
$pruefungsintervall = $pruefung->pruefungsintervall;
|
||||
}
|
||||
|
||||
?>
|
||||
<span class="bold"><?php echo $p->t('global/lehrveranstaltung'); ?>: </span><span><?=$lehrveranstaltung->bezeichnung?></span><br/>
|
||||
<span class="bold"><?php echo $p->t('global/studiensemester'); ?>: </span><span><?=$stdsem->bezeichnung?></span><br/>
|
||||
<span class="bold"><?php echo $p->t('pruefung/pruefer'); ?>: </span><span><?=$mitarbeiter->getFullName(FALSE)?></span><br/>
|
||||
<table id="liste">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th><?php echo $p->t('pruefung/matrikelnummer'); ?></th>
|
||||
<th><?php echo $p->t('pruefung/studiengangAbkuerzung'); ?></th>
|
||||
<th><?php echo $p->t('global/datum'); ?></th>
|
||||
<th><?php echo $p->t('benotungstool/note'); ?></th>
|
||||
<th><?php echo $p->t('global/anmerkung'); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$count = 0;
|
||||
/*@var $anmeldung pruefungsanmeldung */
|
||||
foreach($anmeldungen as $anmeldung)
|
||||
{
|
||||
$student = new student($anmeldung->uid);
|
||||
$studiengang = new studiengang($student->studiengang_kz);
|
||||
$prfTermin = new pruefungstermin($anmeldung->pruefungstermin_id);
|
||||
|
||||
if($einzeln)
|
||||
{
|
||||
$date = $datum->formatDatum($prfTermin->von, "Y-m-d H:i:s");
|
||||
$date = strtotime($date);
|
||||
$date = $date+(60*$pruefungsintervall*($anmeldung->reihung-1));
|
||||
$date = $datum->formatDatum($prfTermin->von,"d.m.Y").' - '.date("H:i",$date);
|
||||
$count++;
|
||||
}
|
||||
else
|
||||
{
|
||||
$date = $datum->formatDatum($prfTermin->von,"d.m.Y - H:i");
|
||||
$count++;
|
||||
}
|
||||
echo '<tr>';
|
||||
echo '<td>'.$count.'</td>';
|
||||
echo '<td>'.$student->matr_nr.'</td>';
|
||||
echo '<td>'.$studiengang->kurzbzlang.'</td>';
|
||||
echo '<td>'.$date.'</td>';
|
||||
echo '<td></td>';
|
||||
echo '<td></td>';
|
||||
echo '</tr>';
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
<?php
|
||||
}
|
||||
else
|
||||
{
|
||||
?>
|
||||
|
||||
<span><?php echo $p->t('pruefung/keineBestaetigtenAnmeldungenVorhanden'); ?></span><br/>
|
||||
|
||||
<?php
|
||||
exit;
|
||||
}
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
<br>
|
||||
<table width="100%" id="liste">
|
||||
<tr>
|
||||
<td width="26%"><?php echo $p->t('pruefung/derLektor'); ?></td>
|
||||
<td width="37%"><?php echo $mitarbeiter->getFullName(FALSE); ?></td>
|
||||
<td width="37%"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo $p->t('pruefung/dieKommission'); ?></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
+277
-190
@@ -1,190 +1,277 @@
|
||||
<?php
|
||||
/* Copyright (C) 2006 fhcomplete.org
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* Authors: Christian Paminger <christian.paminger@technikum-wien.at>,
|
||||
* Andreas Oesterreicher <andreas.oesterreicher@technikum-wien.at> and
|
||||
* Rudolf Hangl <rudolf.hangl@technikum-wien.at>.
|
||||
*/
|
||||
|
||||
require_once('../../../config/cis.config.inc.php');
|
||||
require_once('../../../include/functions.inc.php');
|
||||
require_once('../../../include/studiensemester.class.php');
|
||||
require_once('../../../include/konto.class.php');
|
||||
require_once('../../../include/person.class.php');
|
||||
require_once('../../../include/benutzer.class.php');
|
||||
require_once('../../../include/datum.class.php');
|
||||
require_once('../../../include/studiengang.class.php');
|
||||
require_once('../../../include/phrasen.class.php');
|
||||
require_once('../../../include/benutzerberechtigung.class.php');
|
||||
|
||||
$sprache = getSprache();
|
||||
$p = new phrasen($sprache);
|
||||
$uid=get_uid();
|
||||
|
||||
if(isset($_GET['uid']))
|
||||
{
|
||||
// Administratoren duerfen die UID als Parameter uebergeben um die Zahlungen
|
||||
// von anderen Personen anzuzeigen
|
||||
|
||||
$rechte = new benutzerberechtigung();
|
||||
$rechte->getBerechtigungen($uid);
|
||||
if($rechte->isBerechtigt('admin'))
|
||||
{
|
||||
$uid = $_GET['uid'];
|
||||
$getParam = "&uid=" . $uid;
|
||||
}
|
||||
else
|
||||
$getParam = "";
|
||||
}
|
||||
else
|
||||
$getParam='';
|
||||
|
||||
$datum_obj = new datum();
|
||||
|
||||
echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>'.$p->t('tools/zahlungen').'</title>
|
||||
<link href="../../../skin/style.css.php" rel="stylesheet" type="text/css">
|
||||
<link rel="stylesheet" href="../../../skin/tablesort.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>
|
||||
</head>
|
||||
<style>
|
||||
table.tablesorter
|
||||
{
|
||||
width: auto;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function()
|
||||
{
|
||||
$("#t1").tablesorter(
|
||||
{
|
||||
sortList: [[0,0],[1,0]],
|
||||
widgets: ["zebra"]
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<body>';
|
||||
|
||||
$studiengang = new studiengang();
|
||||
$studiengang->getAll(null,null);
|
||||
|
||||
$stg_arr = array();
|
||||
foreach ($studiengang->result as $row)
|
||||
$stg_arr[$row->studiengang_kz]=$row->kuerzel;
|
||||
|
||||
$benutzer = new benutzer();
|
||||
if(!$benutzer->load($uid))
|
||||
die('Benutzer wurde nicht gefunden');
|
||||
|
||||
echo '<h1>'.$p->t('tools/zahlungen').' - '.$benutzer->vorname.' '.$benutzer->nachname.'</h1>';
|
||||
|
||||
$konto = new konto();
|
||||
$konto->getBuchungstyp();
|
||||
$buchungstyp = array();
|
||||
|
||||
foreach ($konto->result as $row)
|
||||
$buchungstyp[$row->buchungstyp_kurzbz]=$row->beschreibung;
|
||||
|
||||
$konto = new konto();
|
||||
$konto->getBuchungen($benutzer->person_id);
|
||||
if(count($konto->result)>0)
|
||||
{
|
||||
echo '<br><br><table class="tablesorter" id="t1"><thead>';
|
||||
echo '<tr>';
|
||||
echo '
|
||||
<th>'.$p->t('global/datum').'</th>
|
||||
<th>'.$p->t('tools/zahlungstyp').'</th>
|
||||
<th>'.$p->t('lvplan/stg').'</th>
|
||||
<th>'.$p->t('global/studiensemester').'</th>
|
||||
<th>'.$p->t('tools/buchungstext').'</th>
|
||||
<th>'.$p->t('tools/betrag').'</th>
|
||||
<th>'.$p->t('tools/zahlungsbestaetigung').'</th>';
|
||||
echo '</tr></thead><tbody>';
|
||||
|
||||
foreach ($konto->result as $row)
|
||||
{
|
||||
$i=0; //Zaehler fuer Anzahl Gegenbuchungen
|
||||
$buchungsnummern='';
|
||||
|
||||
if(!isset($row['parent']))
|
||||
continue;
|
||||
$betrag = $row['parent']->betrag;
|
||||
|
||||
|
||||
if(isset($row['childs']))
|
||||
{
|
||||
foreach ($row['childs'] as $key => $row_child)
|
||||
{
|
||||
$betrag += $row_child->betrag;
|
||||
$betrag = round($betrag, 2);
|
||||
$buchungsnummern .= ';'.$row['childs'][$key]->buchungsnr;
|
||||
$i = $key; //Zaehler auf letzten Gegenbuchungseintrag setzen
|
||||
}
|
||||
}
|
||||
else
|
||||
$buchungsnummern = $row['parent']->buchungsnr;
|
||||
|
||||
if($betrag<0)
|
||||
$style='style="background-color: #FF8888;"';
|
||||
elseif($betrag>0)
|
||||
$style='style="background-color: #88DD88;"';
|
||||
else
|
||||
$style='';
|
||||
|
||||
echo "<tr>";
|
||||
echo '<td '.$style.'>'.date('d.m.Y',$datum_obj->mktime_fromdate(isset($row['childs'][$i])?$row['childs'][$i]->buchungsdatum:$row['parent']->buchungsdatum)).'</td>';
|
||||
echo '<td '.$style.'>'.$buchungstyp[$row['parent']->buchungstyp_kurzbz].'</td>';
|
||||
echo '<td '.$style.'>'.$stg_arr[$row['parent']->studiengang_kz].'</td>';
|
||||
echo '<td '.$style.'>'.$row['parent']->studiensemester_kurzbz.'</td>';
|
||||
|
||||
echo '<td '.$style.'>'.$row['parent']->buchungstext.'</td>';
|
||||
echo '<td align="right" '.$style.'>'.($betrag<0?'-':($betrag>0?'+':'')).sprintf('%.2f',abs($row['parent']->betrag)).' €</td>';
|
||||
echo '<td align="center" '.$style.'>';
|
||||
if($betrag>=0 && $row['parent']->betrag<=0)
|
||||
echo '<a href="../pdfExport.php?xml=konto.rdf.php&xsl=Zahlung&uid='.$uid.'&buchungsnummern='.$buchungsnummern.'" title="'.$p->t('tools/bestaetigungDrucken').'"><img src="../../../skin/images/pdfpic.gif" alt="'.$p->t('tools/bestaetigungDrucken').'"></a>';
|
||||
elseif($row['parent']->betrag>0)
|
||||
{
|
||||
//Auszahlung
|
||||
}
|
||||
else
|
||||
{
|
||||
echo '<a onclick="window.open(';
|
||||
echo "'zahlungen_details.php?buchungsnr=".$row['parent']->buchungsnr.$getParam."','Zahlungsdetails','height=500,width=550,left=0,top=0,hotkeys=0,resizable=yes,status=no,scrollbars=no,toolbar=no,location=no,menubar=no,dependent=yes');return false;";
|
||||
echo '" href="#">'.$p->t('tools/offen').'</a> ('.sprintf('%.2f',$betrag*-1).' €)';
|
||||
|
||||
echo '</td>';
|
||||
}
|
||||
echo '</tr>';
|
||||
}
|
||||
echo '</tbody></table>';
|
||||
}
|
||||
else
|
||||
{
|
||||
echo $p->t('tools/keineZahlungenVorhanden');
|
||||
}
|
||||
echo '</td></tr></table';
|
||||
|
||||
echo '</body></html>';
|
||||
?>
|
||||
<?php
|
||||
/* Copyright (C) 2006 fhcomplete.org
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* Authors: Christian Paminger <christian.paminger@technikum-wien.at>,
|
||||
* Andreas Oesterreicher <andreas.oesterreicher@technikum-wien.at> and
|
||||
* Rudolf Hangl <rudolf.hangl@technikum-wien.at>.
|
||||
*/
|
||||
|
||||
require_once('../../../config/cis.config.inc.php');
|
||||
require_once('../../../include/functions.inc.php');
|
||||
require_once('../../../include/studiensemester.class.php');
|
||||
require_once('../../../include/konto.class.php');
|
||||
require_once('../../../include/person.class.php');
|
||||
require_once('../../../include/benutzer.class.php');
|
||||
require_once('../../../include/datum.class.php');
|
||||
require_once('../../../include/studiengang.class.php');
|
||||
require_once('../../../include/phrasen.class.php');
|
||||
require_once('../../../include/benutzerberechtigung.class.php');
|
||||
|
||||
$sprache = getSprache();
|
||||
$p = new phrasen($sprache);
|
||||
$uid=get_uid();
|
||||
|
||||
if(isset($_GET['uid']))
|
||||
{
|
||||
// Administratoren duerfen die UID als Parameter uebergeben um die Zahlungen
|
||||
// von anderen Personen anzuzeigen
|
||||
|
||||
$rechte = new benutzerberechtigung();
|
||||
$rechte->getBerechtigungen($uid);
|
||||
if($rechte->isBerechtigt('admin'))
|
||||
{
|
||||
$uid = $_GET['uid'];
|
||||
$getParam = "&uid=" . $uid;
|
||||
}
|
||||
else
|
||||
$getParam = "";
|
||||
}
|
||||
else
|
||||
$getParam='';
|
||||
|
||||
$datum_obj = new datum();
|
||||
|
||||
echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>'.$p->t('tools/zahlungen').'</title>
|
||||
<link href="../../../skin/style.css.php" rel="stylesheet" type="text/css">
|
||||
<link rel="stylesheet" href="../../../skin/tablesort.css" type="text/css"/>';
|
||||
|
||||
include('../../../include/meta/jquery.php');
|
||||
include('../../../include/meta/jquery-tablesorter.php');
|
||||
|
||||
echo ' <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>
|
||||
</head>
|
||||
<style>
|
||||
table.tablesorter
|
||||
{
|
||||
width: auto;
|
||||
}
|
||||
table.tablesorter tbody td
|
||||
{
|
||||
padding: 1px 3px;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
// Parser für Datum DD.MM.YYYY
|
||||
$.tablesorter.addParser({
|
||||
id: "customDate",
|
||||
is: function(s) {
|
||||
//return false;
|
||||
//use the above line if you don\'t want table sorter to auto detected this parser
|
||||
// match dd.mm.yyyy e.g. 01.01.2001 as regex
|
||||
return /\d{1,2}.\d{1,2}.\d{1,4}/.test(s);
|
||||
},
|
||||
// replace regex-wildcards and return new date
|
||||
format: function(s) {
|
||||
s = s.replace(/\-/g," ");
|
||||
s = s.replace(/:/g," ");
|
||||
s = s.replace(/\./g," ");
|
||||
s = s.split(" ");
|
||||
return $.tablesorter.formatFloat(new Date(s[2], s[1]-1, s[0]).getTime());
|
||||
},
|
||||
type: "numeric"
|
||||
});
|
||||
// Parser für Betrag
|
||||
$.tablesorter.addParser({
|
||||
id: "customCurrancy",
|
||||
is: function(s) {
|
||||
//return false;
|
||||
//use the above line if you don\'t want table sorter to auto detected this parser
|
||||
// match dd.mm.yyyy e.g. 01.01.2001 as regex
|
||||
//alert(/€\s\d*.*/.test(s))
|
||||
return /€\s\d*.*/.test(s);
|
||||
},
|
||||
// replace regex-wildcards and return new date
|
||||
format: function(s) {
|
||||
s = s.replace(/\-/g," ");
|
||||
s = s.replace(/:/g," ");
|
||||
s = s.replace(/\./g," ");
|
||||
s = s.split(" ");
|
||||
return $.tablesorter.formatFloat(s[1]);
|
||||
},
|
||||
type: "numeric"
|
||||
});
|
||||
// Parser für Studiensemester
|
||||
$.tablesorter.addParser({
|
||||
// set a unique id
|
||||
id: "studiensemester",
|
||||
is: function(s) {
|
||||
// return false so this parser is not auto detected
|
||||
return false;
|
||||
},
|
||||
format: function(s) {
|
||||
// format data for normalization
|
||||
var result = s.substr(2) + s.substr(0, 2);
|
||||
return result;
|
||||
},
|
||||
// set type, either numeric or text
|
||||
type: "text"
|
||||
});
|
||||
// For correct sorting of Umlauts
|
||||
$.tablesorter.characterEquivalents = {
|
||||
"a" : "\u00e1\u00e0\u00e2\u00e3\u00e4\u0105\u00e5", // áàâãäąå
|
||||
"A" : "\u00c1\u00c0\u00c2\u00c3\u00c4\u0104\u00c5", // ÁÀÂÃÄĄÅ
|
||||
"c" : "\u00e7\u0107\u010d", // çćč
|
||||
"C" : "\u00c7\u0106\u010c", // ÇĆČ
|
||||
"e" : "\u00e9\u00e8\u00ea\u00eb\u011b\u0119", // éèêëěę
|
||||
"E" : "\u00c9\u00c8\u00ca\u00cb\u011a\u0118", // ÉÈÊËĚĘ
|
||||
"i" : "\u00ed\u00ec\u0130\u00ee\u00ef\u0131", // íìİîïı
|
||||
"I" : "\u00cd\u00cc\u0130\u00ce\u00cf", // ÍÌİÎÏ
|
||||
"o" : "\u00f3\u00f2\u00f4\u00f5\u00f6\u014d", // óòôõöō
|
||||
"O" : "\u00d3\u00d2\u00d4\u00d5\u00d6\u014c", // ÓÒÔÕÖŌ
|
||||
"ss": "\u00df", // ß (s sharp)
|
||||
"SS": "\u1e9e", // ẞ (Capital sharp s)
|
||||
"u" : "\u00fa\u00f9\u00fb\u00fc\u016f", // úùûüů
|
||||
"U" : "\u00da\u00d9\u00db\u00dc\u016e" // ÚÙÛÜŮ
|
||||
};
|
||||
$(document).ready(function()
|
||||
{
|
||||
$("#t1").tablesorter(
|
||||
{
|
||||
// Adding Function for sorting images by title
|
||||
textExtraction:function(s)
|
||||
{
|
||||
if($(s).find(\'img\').length == 0) return $(s).text();
|
||||
return $(s).find(\'img\').attr(\'title\');
|
||||
},
|
||||
sortList: [[0,1],[1,1]],
|
||||
widgets: ["zebra"],
|
||||
sortLocaleCompare : true,
|
||||
headers: { 0: { sorter: "customDate"}, 3: { sorter: "studiensemester"}, 5: { sorter: "customCurrancy"}, 6: { sorter: false}}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<body>';
|
||||
|
||||
$studiengang = new studiengang();
|
||||
$studiengang->getAll(null,null);
|
||||
|
||||
$stg_arr = array();
|
||||
foreach ($studiengang->result as $row)
|
||||
$stg_arr[$row->studiengang_kz]=$row->kuerzel;
|
||||
|
||||
$benutzer = new benutzer();
|
||||
if(!$benutzer->load($uid))
|
||||
die('Benutzer wurde nicht gefunden');
|
||||
|
||||
echo '<h1>'.$p->t('tools/zahlungen').' - '.$benutzer->vorname.' '.$benutzer->nachname.'</h1>';
|
||||
|
||||
$konto = new konto();
|
||||
$konto->getBuchungstyp();
|
||||
$buchungstyp = array();
|
||||
|
||||
foreach ($konto->result as $row)
|
||||
$buchungstyp[$row->buchungstyp_kurzbz]=$row->beschreibung;
|
||||
|
||||
$konto = new konto();
|
||||
$konto->getBuchungen($benutzer->person_id);
|
||||
if(count($konto->result)>0)
|
||||
{
|
||||
echo '<br><br><table class="tablesorter" id="t1"><thead>';
|
||||
echo '<tr>';
|
||||
echo '
|
||||
<th>'.$p->t('global/datum').'</th>
|
||||
<th>'.$p->t('tools/zahlungstyp').'</th>
|
||||
<th>'.$p->t('lvplan/stg').'</th>
|
||||
<th>'.$p->t('global/studiensemester').'</th>
|
||||
<th>'.$p->t('tools/buchungstext').'</th>
|
||||
<th>'.$p->t('tools/betrag').'</th>
|
||||
<th>'.$p->t('tools/zahlungsbestaetigung').'</th>';
|
||||
echo '</tr></thead><tbody>';
|
||||
|
||||
foreach ($konto->result as $row)
|
||||
{
|
||||
$i=0; //Zaehler fuer Anzahl Gegenbuchungen
|
||||
$buchungsnummern='';
|
||||
|
||||
if(!isset($row['parent']))
|
||||
continue;
|
||||
$betrag = $row['parent']->betrag;
|
||||
|
||||
|
||||
if(isset($row['childs']))
|
||||
{
|
||||
foreach ($row['childs'] as $key => $row_child)
|
||||
{
|
||||
$betrag += $row_child->betrag;
|
||||
$betrag = round($betrag, 2);
|
||||
$buchungsnummern .= ';'.$row['childs'][$key]->buchungsnr;
|
||||
$i = $key; //Zaehler auf letzten Gegenbuchungseintrag setzen
|
||||
}
|
||||
}
|
||||
else
|
||||
$buchungsnummern = $row['parent']->buchungsnr;
|
||||
|
||||
if($betrag<0)
|
||||
$style='style="background-color: #FF8888;"';
|
||||
elseif($betrag>0)
|
||||
$style='style="background-color: #88DD88;"';
|
||||
else
|
||||
$style='';
|
||||
|
||||
echo "<tr>";
|
||||
echo '<td '.$style.'>'.date('d.m.Y',$datum_obj->mktime_fromdate(isset($row['childs'][$i])?$row['childs'][$i]->buchungsdatum:$row['parent']->buchungsdatum)).'</td>';
|
||||
echo '<td '.$style.'>'.$buchungstyp[$row['parent']->buchungstyp_kurzbz].'</td>';
|
||||
echo '<td '.$style.'>'.$stg_arr[$row['parent']->studiengang_kz].'</td>';
|
||||
echo '<td '.$style.'>'.$row['parent']->studiensemester_kurzbz.'</td>';
|
||||
|
||||
echo '<td '.$style.'>'.$row['parent']->buchungstext.'</td>';
|
||||
echo '<td align="right" '.$style.'>€ '.($betrag<0?'-':($betrag>0?'+':'')).sprintf('%.2f',abs($row['parent']->betrag)).'</td>';
|
||||
echo '<td align="center" '.$style.'>';
|
||||
if($betrag>=0 && $row['parent']->betrag<=0)
|
||||
{
|
||||
echo '<a href="../pdfExport.php?xml=konto.rdf.php&xsl=Zahlung&uid='.$uid.'&buchungsnummern='.$buchungsnummern.'" title="'.$p->t('tools/bestaetigungDrucken').'"><img src="../../../skin/images/pdfpic.gif" alt="'.$p->t('tools/bestaetigungDrucken').'"></a>';
|
||||
}
|
||||
elseif($row['parent']->betrag>0)
|
||||
{
|
||||
//Auszahlung
|
||||
}
|
||||
else
|
||||
{
|
||||
echo '<a onclick="window.open(';
|
||||
echo "'zahlungen_details.php?buchungsnr=".$row['parent']->buchungsnr.$getParam."','Zahlungsdetails','height=500,width=550,left=0,top=0,hotkeys=0,resizable=yes,status=no,scrollbars=no,toolbar=no,location=no,menubar=no,dependent=yes');return false;";
|
||||
echo '" href="#">'.$p->t('tools/offen').'</a>(€ '.sprintf('%.2f',$betrag*-1).')';
|
||||
|
||||
echo '</td>';
|
||||
}
|
||||
echo '</tr>';
|
||||
}
|
||||
echo '</tbody></table>';
|
||||
}
|
||||
else
|
||||
{
|
||||
echo $p->t('tools/keineZahlungenVorhanden');
|
||||
}
|
||||
echo '</td></tr></table';
|
||||
|
||||
echo '</body></html>';
|
||||
?>
|
||||
|
||||
@@ -0,0 +1,221 @@
|
||||
<?php
|
||||
/* Copyright (C) 2011 FH Technikum Wien
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* Authors: Christian Paminger <christian.paminger@technikum-wien.at>,
|
||||
* Andreas Oesterreicher <andreas.oesterreicher@technikum-wien.at> and
|
||||
* Karl Burkhart <karl.burkhart@technikum-wien.at>.
|
||||
*/
|
||||
/**
|
||||
* Zeigt eine Übersichtsliste für alle Content-Einträge an
|
||||
*/
|
||||
require_once('../config/cis.config.inc.php');
|
||||
require_once('../config/global.config.inc.php');
|
||||
require_once('../include/content.class.php');
|
||||
require_once('../include/template.class.php');
|
||||
require_once('../include/functions.inc.php');
|
||||
require_once('../include/phrasen.class.php');
|
||||
|
||||
$db = new basis_db();
|
||||
|
||||
echo '<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<link href="../skin/style.css.php" rel="stylesheet" type="text/css">';
|
||||
|
||||
include('../include/meta/jquery.php');
|
||||
include('../include/meta/jquery-tablesorter.php');
|
||||
|
||||
echo ' </head>
|
||||
<script type="text/javascript">
|
||||
// For correct sorting of Umlauts
|
||||
$.tablesorter.characterEquivalents = {
|
||||
"a" : "\u00e1\u00e0\u00e2\u00e3\u00e4\u0105\u00e5", // áàâãäąå
|
||||
"A" : "\u00c1\u00c0\u00c2\u00c3\u00c4\u0104\u00c5", // ÁÀÂÃÄĄÅ
|
||||
"c" : "\u00e7\u0107\u010d", // çćč
|
||||
"C" : "\u00c7\u0106\u010c", // ÇĆČ
|
||||
"e" : "\u00e9\u00e8\u00ea\u00eb\u011b\u0119", // éèêëěę
|
||||
"E" : "\u00c9\u00c8\u00ca\u00cb\u011a\u0118", // ÉÈÊËĚĘ
|
||||
"i" : "\u00ed\u00ec\u0130\u00ee\u00ef\u0131", // íìİîïı
|
||||
"I" : "\u00cd\u00cc\u0130\u00ce\u00cf", // ÍÌİÎÏ
|
||||
"o" : "\u00f3\u00f2\u00f4\u00f5\u00f6\u014d", // óòôõöō
|
||||
"O" : "\u00d3\u00d2\u00d4\u00d5\u00d6\u014c", // ÓÒÔÕÖŌ
|
||||
"ss": "\u00df", // ß (s sharp)
|
||||
"SS": "\u1e9e", // ẞ (Capital sharp s)
|
||||
"u" : "\u00fa\u00f9\u00fb\u00fc\u016f", // úùûüů
|
||||
"U" : "\u00da\u00d9\u00db\u00dc\u016e" // ÚÙÛÜŮ
|
||||
};
|
||||
$.tablesorter.addParser({
|
||||
id: "customDate",
|
||||
is: function(s) {
|
||||
//return false;
|
||||
//use the above line if you don\'t want table sorter to auto detected this parser
|
||||
//else use the below line.
|
||||
//attention: doesn\'t check for invalid stuff
|
||||
//2009-77-77 77:77:77.0 would also be matched
|
||||
//if that doesn\'t suit you alter the regex to be more restrictive
|
||||
//return /\d{1,4}-\d{1,2}-\d{1,2} \d{1,2}:\d{1,2}:\d{1,2}\.\d+/.test(s);
|
||||
return /\d{1,4}-\d{1,2}-\d{1,2} \d{1,2}:\d{1,2}:\d{1,2} .*/.test(s);
|
||||
},
|
||||
format: function(s) {
|
||||
s = s.replace(/\-/g," ");
|
||||
s = s.replace(/:/g," ");
|
||||
s = s.replace(/\./g," ");
|
||||
s = s.split(" ");
|
||||
return $.tablesorter.formatFloat(new Date(s[0], s[1]-1, s[2], s[3], s[4], s[5]).getTime());
|
||||
},
|
||||
type: "numeric"
|
||||
});
|
||||
$(document).ready(function()
|
||||
{
|
||||
$("#t1").tablesorter(
|
||||
{
|
||||
sortList: [[1,0],[0,1]],
|
||||
widgets: ["zebra", "filter", "stickyHeaders"],
|
||||
headers: { 5: { sorter: "customDate"}, 10: { sorter: "customDate"}},
|
||||
sortLocaleCompare : true
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<style>
|
||||
table.tablesorter tbody td
|
||||
{
|
||||
padding: 5px;
|
||||
}
|
||||
</style>
|
||||
<body>
|
||||
<div style="padding: 10px">
|
||||
<h1>Content-Übersicht</h1>';
|
||||
echo '<br><br><table class="tablesorter" id="t1"><thead>';
|
||||
echo '<tr>';
|
||||
echo ' <th>Content ID</th>
|
||||
<th>Titel</th>
|
||||
<th>Art</th>
|
||||
<th>OE</th>
|
||||
<th>Content-Aktiv</th>
|
||||
<th>Eingefügt</th>
|
||||
<th>Aktualisiert</th>
|
||||
<th>Verwendet in</th>
|
||||
<th>Sprache</th>
|
||||
<th>Version</th>
|
||||
<th>Eingefügt</th>
|
||||
<th>Aktualisiert</th>
|
||||
<th>Version sichtbar</th>';
|
||||
echo '</tr></thead><tbody>';
|
||||
|
||||
$qry = "
|
||||
SELECT
|
||||
content.content_id,
|
||||
tbl_contentsprache.titel,
|
||||
content.template_kurzbz,
|
||||
content.oe_kurzbz,
|
||||
content.aktiv,
|
||||
content.insertamum||' von '||content.insertvon AS content_eingefuegt,
|
||||
content.updateamum||' von '||content.updatevon AS content_aktualisiert,
|
||||
(
|
||||
SELECT ARRAY_TO_STRING(array_agg(verwendung), '<br>') AS verwendung_in
|
||||
FROM (
|
||||
SELECT
|
||||
'Infoscreen ID'||infoscreen_id AS art
|
||||
FROM campus.tbl_infoscreen_content
|
||||
WHERE content_id=content.content_id
|
||||
|
||||
UNION
|
||||
|
||||
SELECT
|
||||
'Software ID'||software_id AS art
|
||||
FROM addon.tbl_software
|
||||
WHERE content_id=content.content_id
|
||||
|
||||
UNION
|
||||
|
||||
SELECT
|
||||
'Ort '||ort_kurzbz AS art
|
||||
FROM public.tbl_ort
|
||||
WHERE content_id=content.content_id
|
||||
|
||||
UNION
|
||||
|
||||
SELECT
|
||||
'Service ID'||service_id AS art
|
||||
FROM public.tbl_service
|
||||
WHERE content_id=content.content_id
|
||||
|
||||
UNION
|
||||
|
||||
SELECT
|
||||
'Statistik '||statistik_kurzbz AS art
|
||||
FROM public.tbl_statistik
|
||||
WHERE content_id=content.content_id
|
||||
|
||||
UNION
|
||||
|
||||
SELECT
|
||||
'Gebiet '||tbl_gebiet.bezeichnung||' in Studiengang '||tbl_ablauf.studiengang_kz AS art
|
||||
FROM testtool.tbl_ablauf_vorgaben
|
||||
JOIN testtool.tbl_ablauf USING (ablauf_vorgaben_id)
|
||||
JOIN testtool.tbl_gebiet USING (gebiet_id)
|
||||
WHERE content_id=content.content_id
|
||||
|
||||
UNION
|
||||
|
||||
SELECT
|
||||
'Verlinkung von '||content_id AS art
|
||||
FROM campus.tbl_contentsprache
|
||||
WHERE content::text LIKE '%content.php?content_id='||content.content_id||'%'
|
||||
/*WHERE content::text ~* '[\w\d\s]*content\.php\?content_id=1245[\w\d\s]*'*/
|
||||
) verwendung
|
||||
) AS verwendung_in,
|
||||
tbl_contentsprache.sprache,
|
||||
tbl_contentsprache.version,
|
||||
tbl_contentsprache.insertamum||' von '||tbl_contentsprache.insertvon AS contentsprache_eingefuegt,
|
||||
tbl_contentsprache.updateamum||' von '||tbl_contentsprache.updatevon AS contentsprache_aktualisiert,
|
||||
tbl_contentsprache.sichtbar
|
||||
FROM campus.tbl_content content
|
||||
JOIN campus.tbl_contentsprache USING (content_id)
|
||||
WHERE version=campus.get_highest_content_version (content.content_id)
|
||||
AND template_kurzbz NOT IN ('news')
|
||||
/*ORDER BY content_id ASC, sprache DESC, version DESC
|
||||
LIMIT 200*/";
|
||||
|
||||
if($db->db_query($qry))
|
||||
{
|
||||
while ($row = $db->db_fetch_object())
|
||||
{
|
||||
echo ' <tr>
|
||||
<td>'.$row->content_id.'</td>
|
||||
<td>'.$row->titel.'</td>
|
||||
<td>'.$row->template_kurzbz.'</td>
|
||||
<td>'.$row->oe_kurzbz.'</td>
|
||||
<td>'.($row->aktiv == 't' ? 'Ja':'Nein').'</td>
|
||||
<td>'.$row->content_eingefuegt.'</td>
|
||||
<td>'.$row->content_aktualisiert.'</td>
|
||||
<td>'.$row->verwendung_in.'</td>
|
||||
<td>'.$row->sprache.'</td>
|
||||
<td>'.$row->version.'</td>
|
||||
<td>'.$row->contentsprache_eingefuegt.'</td>
|
||||
<td>'.$row->contentsprache_aktualisiert.'</td>
|
||||
<td>'.($row->sichtbar == 't' ? 'Ja':'Nein').'</td>
|
||||
|
||||
</tr>';
|
||||
}
|
||||
}
|
||||
echo '</tbody></table>';
|
||||
echo ' </div></body>
|
||||
</html>';
|
||||
|
||||
|
||||
?>
|
||||
+1
-2
@@ -436,11 +436,10 @@ function getStgContent($studiengang_kz, $semester, $sprache)
|
||||
if(CIS_EXT_MENU)
|
||||
{
|
||||
$xml.='<cis_ext_menu>
|
||||
<lehrziele_name><![CDATA['.$p->t('global/lehrziele').']]></lehrziele_name>
|
||||
<download_name><![CDATA['.$p->t('global/allgemeinerdownload').']]></download_name>
|
||||
<newsgroup_name><![CDATA['.$p->t('global/newsgroups').']]></newsgroup_name>
|
||||
<kurzbz><![CDATA['.strtolower($studiengang->kuerzel).']]></kurzbz>
|
||||
<kurzbzlang><![CDATA['.strtolower($studiengang->kurzbzlang).']]></kurzbzlang>
|
||||
<stg_kz><![CDATA['. $studiengang_kz.']]></stg_kz>
|
||||
</cis_ext_menu>';
|
||||
}
|
||||
|
||||
|
||||
@@ -746,13 +746,13 @@ class dms extends basis_db
|
||||
JOIN campus.tbl_dms_version USING(dms_id)
|
||||
JOIN campus.tbl_dms_kategorie USING (kategorie_kurzbz)";
|
||||
// Wenn erstes Zeichen # ist, dieses wegkürzen und checken ob der Rest numerisch ist. Dann nach eindeutiger ID suchen
|
||||
if (substr($suchstring, 0, 1) == '#')
|
||||
/*if (substr($suchstring, 0, 1) == '#')
|
||||
{
|
||||
$suchstring = substr($suchstring, 1);
|
||||
if (is_numeric($suchstring))
|
||||
$qry .= " WHERE tbl_dms.dms_id = ".$this->db_add_param($suchstring, FHC_INTEGER);
|
||||
}
|
||||
else
|
||||
else*/
|
||||
{
|
||||
$qry .= " WHERE lower(name) like lower('%".$this->db_escape($suchstring)."%')
|
||||
OR lower(tbl_dms_version.beschreibung) like lower('%".$this->db_escape($suchstring)."%')
|
||||
|
||||
@@ -859,6 +859,8 @@ class dokument extends basis_db
|
||||
$stg_obj->kuerzel = $row->kuerzel;
|
||||
$stg_obj->bezeichnung = $row->bezeichnung;
|
||||
$stg_obj->studiengang_kz = $row->studiengang_kz;
|
||||
$stg_obj->english = $row->english;
|
||||
$stg_obj->stufe = $row->stufe;
|
||||
|
||||
$this->result[] = $stg_obj;
|
||||
}
|
||||
|
||||
@@ -649,6 +649,11 @@ class gruppe extends basis_db
|
||||
*/
|
||||
public function searchGruppen($searchItems, $aktiv = true, $limit = null)
|
||||
{
|
||||
if (!is_array($searchItems))
|
||||
{
|
||||
$this->errormsg = '$searchItems muss ein Array sein';
|
||||
return false;
|
||||
}
|
||||
$qry = "SELECT
|
||||
*
|
||||
FROM
|
||||
|
||||
@@ -53,6 +53,7 @@ $this->phrasen['pruefung/bestaetigt'] = 'bestätigt';
|
||||
$this->phrasen['pruefung/statusAenderungVon'] = 'Satusänderung von';
|
||||
$this->phrasen['pruefung/reihungSpeichern'] = 'Reihung speichern';
|
||||
$this->phrasen['pruefung/listeDrucken'] = 'Liste drucken';
|
||||
$this->phrasen['pruefung/listeOhneNamenDrucken'] = 'Liste ohne Namen drucken';
|
||||
$this->phrasen['pruefung/pruefungsraum'] = 'Prüfungsraum: ';
|
||||
$this->phrasen['pruefung/pruefungsort'] = 'Prüfungsort ';
|
||||
$this->phrasen['pruefung/imBuero'] = ' im Büro';
|
||||
@@ -109,7 +110,8 @@ $this->phrasen['pruefung/keineLehreinheitenVorhanden'] = 'Keine Lehreinheiten vo
|
||||
$this->phrasen['pruefung/keineAnmeldungenVorhanden'] = 'Keine Anmeldungen vorhanden.';
|
||||
$this->phrasen['pruefung/derLektor'] = 'Lektor';
|
||||
$this->phrasen['pruefung/dieKommission'] = 'Kommission';
|
||||
$this->phrasen['pruefung/matrikelnummer'] = 'Personenkennzeichen';
|
||||
$this->phrasen['pruefung/matrikelnummer'] = 'Matrikelnummer';
|
||||
$this->phrasen['pruefung/studiengangAbkuerzung'] = 'Stg.';
|
||||
|
||||
// anmeldungen Verwalten
|
||||
$this->phrasen['pruefung/anmeldungenVerwaltenTitle'] = 'Prüfungsanmeldung Verwaltung';
|
||||
|
||||
@@ -53,6 +53,7 @@ $this->phrasen['pruefung/bestaetigt'] = 'bestätigt';
|
||||
$this->phrasen['pruefung/statusAenderungVon'] = 'Satusänderung von';
|
||||
$this->phrasen['pruefung/reihungSpeichern'] = 'Reihung speichern';
|
||||
$this->phrasen['pruefung/listeDrucken'] = 'Liste drucken';
|
||||
$this->phrasen['pruefung/listeOhneNamenDrucken'] = 'Liste ohne Namen drucken';
|
||||
$this->phrasen['pruefung/pruefungsraum'] = 'Prüfungsraum: ';
|
||||
$this->phrasen['pruefung/pruefungsort'] = 'Prüfungsort ';
|
||||
$this->phrasen['pruefung/imBuero'] = ' im Büro';
|
||||
@@ -109,7 +110,8 @@ $this->phrasen['pruefung/keineLehreinheitenVorhanden'] = 'Keine Lehreinheiten vo
|
||||
$this->phrasen['pruefung/keineAnmeldungenVorhanden'] = 'Keine Anmeldungen vorhanden.';
|
||||
$this->phrasen['pruefung/derLektor'] = 'Lektor';
|
||||
$this->phrasen['pruefung/dieKommission'] = 'Kommission';
|
||||
$this->phrasen['pruefung/matrikelnummer'] = 'Personenkennzeichen';
|
||||
$this->phrasen['pruefung/matrikelnummer'] = 'Matrikelnummer';
|
||||
$this->phrasen['pruefung/studiengangAbkuerzung'] = 'Stg.';
|
||||
|
||||
// anmeldungen Verwalten
|
||||
$this->phrasen['pruefung/anmeldungenVerwaltenTitle'] = 'Prüfungsanmeldung Verwaltung';
|
||||
|
||||
@@ -162,11 +162,9 @@ xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
</xsl:template>
|
||||
<xsl:template match="cis_ext_menu">
|
||||
<xsl:variable name="kurzbz" select="kurzbz"></xsl:variable>
|
||||
<xsl:variable name="kurzbzlang" select="kurzbzlang"></xsl:variable>
|
||||
<td class="menubox">
|
||||
<p><xsl:text> </xsl:text><a href="../documents/{kurzbz}/lehrziele/" class="Item" target="_blank"><xsl:value-of select="lehrziele_name" /></a></p>
|
||||
<p><xsl:text> </xsl:text><a href="../documents/{kurzbz}/download/" class="Item" target="_blank"><xsl:value-of select="download_name" /></a></p>
|
||||
<p><xsl:text> </xsl:text><a href="news://news.technikum-wien.at/{kurzbzlang}" class="Item" target="_blank"><xsl:value-of select="newsgroup_name" /></a></p>
|
||||
<xsl:variable name="stg_kz" select="stg_kz"></xsl:variable>
|
||||
<td class="menubox">
|
||||
<p><xsl:text> </xsl:text><a href="https://moodle.technikum-wien.at/course/view.php?idnumber=dl{$stg_kz}" class="Item" target="_blank"><xsl:value-of select="download_name" /></a></p>
|
||||
</td>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet >
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -48,6 +48,15 @@ if ($studiengang_kz != '')
|
||||
$oe_studiengang = '';
|
||||
}
|
||||
|
||||
if (isset($_GET['searchItems']) && trim($_GET['searchItems']) != '')
|
||||
{
|
||||
$searchItems = explode(' ', trim($_GET['searchItems']));
|
||||
}
|
||||
else
|
||||
{
|
||||
$searchItems = array();
|
||||
}
|
||||
|
||||
if (isset($_GET['sem']))
|
||||
|
||||
$sem=$_GET['sem'];
|
||||
@@ -73,12 +82,12 @@ if(!$rechte->isBerechtigt('lehre/gruppe', null, 's'))
|
||||
<title>Gruppe-Verwaltung</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<link rel="stylesheet" href="../../skin/vilesci.css" type="text/css">
|
||||
|
||||
<?php
|
||||
|
||||
<?php
|
||||
include('../../include/meta/jquery.php');
|
||||
include('../../include/meta/jquery-tablesorter.php');
|
||||
?>
|
||||
|
||||
|
||||
<script language="JavaScript" type="text/javascript">
|
||||
function conf_del()
|
||||
{
|
||||
@@ -105,7 +114,7 @@ if(!$rechte->isBerechtigt('lehre/gruppe', null, 's'))
|
||||
$( "#domain_text" ).toggle();
|
||||
$('#gesperrt').prop('disabled', function(i, v) { return !v; });
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
</script>
|
||||
<style>
|
||||
@@ -146,28 +155,28 @@ else if (isset($_POST['type']) && $_POST['type']=='save')
|
||||
else if (isset($_GET['type']) && $_GET['type']=='delete')
|
||||
{
|
||||
printDropDown();
|
||||
|
||||
|
||||
if($rechte->isBerechtigt('lehre/gruppe', $oe_studiengang, 'suid'))
|
||||
{
|
||||
$e=new gruppe();
|
||||
if(!$e->delete($_GET['einheit_id']))
|
||||
echo $e->errormsg;
|
||||
}
|
||||
else
|
||||
else
|
||||
echo '<span class="error">'.$rechte->errormsg.'</span>';
|
||||
|
||||
|
||||
getUebersicht();
|
||||
}
|
||||
else
|
||||
{
|
||||
printDropDown();
|
||||
if ($studiengang_kz != '')
|
||||
if ($studiengang_kz != '' || count($searchItems) > 0)
|
||||
getUebersicht();
|
||||
}
|
||||
|
||||
function printDropDown()
|
||||
{
|
||||
global $rechte, $studiengang_kz;
|
||||
global $rechte, $studiengang_kz, $searchItems;
|
||||
//Studiengang Drop Down anzeigen
|
||||
$types = new studiengang();
|
||||
$types->getAllTypes();
|
||||
@@ -199,23 +208,26 @@ function printDropDown()
|
||||
}
|
||||
}
|
||||
|
||||
echo '</SELECT><input type="submit" value="Anzeigen" />';
|
||||
echo '</SELECT>';
|
||||
echo '<br>oder</br>';
|
||||
echo 'Suche: <input name="searchItems" type="text" size="50" value="'.implode(' ',$searchItems).'"/>';
|
||||
echo '<input type="submit" value="Anzeigen" />';
|
||||
echo '</form>';
|
||||
}
|
||||
function doSave()
|
||||
{
|
||||
global $rechte;
|
||||
|
||||
|
||||
$studiengang = new studiengang($_POST['studiengang_kz']);
|
||||
if ($studiengang->oe_kurzbz != '')
|
||||
$oe_studiengang = $studiengang->oe_kurzbz;
|
||||
else
|
||||
$oe_studiengang = '';
|
||||
|
||||
|
||||
if($rechte->isBerechtigt('lehre/gruppe', $oe_studiengang, 'sui'))
|
||||
{
|
||||
$e = new gruppe();
|
||||
|
||||
|
||||
if ($_POST['new']=='true')
|
||||
{
|
||||
$e->new = true;
|
||||
@@ -228,7 +240,7 @@ function doSave()
|
||||
$e->load($_POST['kurzbz']);
|
||||
$e->new = false;
|
||||
}
|
||||
|
||||
|
||||
$e->updateamum = date('Y-m-d H:i:s');
|
||||
$e->updatevon = get_uid();
|
||||
$e->bezeichnung = $_POST['bezeichnung'];
|
||||
@@ -245,7 +257,7 @@ function doSave()
|
||||
$e->aufnahmegruppe = isset($_POST['aufnahmegruppe']);
|
||||
$e->sort = $_POST['sort'];
|
||||
$e->content_visible = isset($_POST['content_visible']);
|
||||
|
||||
|
||||
if(!$e->save())
|
||||
echo $e->errormsg;
|
||||
}
|
||||
@@ -319,7 +331,7 @@ function doEdit($kurzbz,$new=false)
|
||||
$selected = 'selected="selected"';
|
||||
else
|
||||
$selected='';
|
||||
|
||||
|
||||
echo '<option value="'.$studiengang->studiengang_kz.'" '.$selected.'>'.$db->convert_html_chars($studiengang->kuerzel.' - '.$studiengang->bezeichnung).'</option>';
|
||||
$typ = $studiengang->typ;
|
||||
}
|
||||
@@ -408,13 +420,20 @@ function doEdit($kurzbz,$new=false)
|
||||
|
||||
function getUebersicht()
|
||||
{
|
||||
global $studiengang_kz, $semester, $rechte;
|
||||
global $studiengang_kz, $semester, $rechte, $searchItems;
|
||||
if (!$db = new basis_db())
|
||||
die('Es konnte keine Verbindung zum Server aufgebaut werden.');
|
||||
|
||||
$gruppe=new gruppe();
|
||||
// Array mit allen Einheiten holen
|
||||
$gruppe->getgruppe($studiengang_kz,$semester);
|
||||
// Wenn $searchstring gesetz ist, nach gruppe suchen, sonst gruppe mit $studiengang_kz un $semester laden
|
||||
if (count($searchItems) > 0)
|
||||
{
|
||||
$gruppe->searchGruppen($searchItems, null, null);
|
||||
}
|
||||
else
|
||||
{
|
||||
$gruppe->getgruppe($studiengang_kz,$semester);
|
||||
}
|
||||
|
||||
echo '<h3>Übersicht</h3>';
|
||||
echo '<button type="button" class="resetsaved" title="Reset Filter">Reset Filter</button>';
|
||||
@@ -468,13 +487,13 @@ function getUebersicht()
|
||||
// src="../../skin/images/'.($row->projektarbeit=='t'?'true.png':'false.png').'"
|
||||
//echo "<td>".$gruppe->countStudenten($e->gruppe_kurzbz)."</td>"; Auskommentiert, da sonst die Ladezeit der Seite zu lange ist
|
||||
echo "<td style='padding-right: 5px'><a href='einheit_det.php?kurzbz=$e->gruppe_kurzbz'>Personen</a></td>";
|
||||
|
||||
|
||||
if($rechte->isBerechtigt('lehre/gruppe', $oe_studiengang, 'su'))
|
||||
echo "<td style='padding-right: 5px'><a href=\"einheit_menu.php?edit=1&kurzbz=$e->gruppe_kurzbz\">Edit</a></td>";
|
||||
|
||||
|
||||
if($rechte->isBerechtigt('lehre/gruppe', $oe_studiengang, 'suid'))
|
||||
echo "<td><a href=\"einheit_menu.php?einheit_id=$e->gruppe_kurzbz&studiengang_kz=$e->studiengang_kz&type=delete\" onclick='return conf_del()'>Delete</a></td>";
|
||||
|
||||
|
||||
echo "</tr>\n";
|
||||
}
|
||||
|
||||
@@ -483,4 +502,4 @@ function getUebersicht()
|
||||
|
||||
?>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
||||
@@ -1,379 +1,409 @@
|
||||
<?php
|
||||
/* Copyright (C) 2011 FH Technikum-Wien
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* Authors: Andreas Oesterreicher < andreas.oesterreicher@technikum-wien.at >
|
||||
*/
|
||||
/**
|
||||
* Seite zur Wartung der Infoscreens
|
||||
*/
|
||||
require_once('../../config/vilesci.config.inc.php');
|
||||
require_once('../../include/infoscreen.class.php');
|
||||
require_once('../../include/benutzerberechtigung.class.php');
|
||||
require_once('../../include/datum.class.php');
|
||||
require_once('../../include/content.class.php');
|
||||
|
||||
if (!$db = new basis_db())
|
||||
die('Es konnte keine Verbindung zum Server aufgebaut werden.');
|
||||
|
||||
$user = get_uid();
|
||||
|
||||
$rechte = new benutzerberechtigung();
|
||||
$rechte->getBerechtigungen($user);
|
||||
|
||||
if(!$rechte->isBerechtigt('basis/infoscreen'))
|
||||
die($rechte->errormsg);
|
||||
|
||||
$datum_obj = new datum();
|
||||
?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>Infoscreen - Details</title>
|
||||
<link rel="stylesheet" href="../../skin/tablesort.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="../../skin/fhcomplete.css" type="text/css">
|
||||
<link rel="stylesheet" href="../../skin/vilesci.css" type="text/css">
|
||||
<link rel="stylesheet" href="../../skin/jquery-ui-1.9.2.custom.min.css" type="text/css">
|
||||
<link rel="stylesheet" href="../../vendor/fgelinas/timepicker/jquery.ui.timepicker.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>
|
||||
<?php
|
||||
/* Copyright (C) 2011 FH Technikum-Wien
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* Authors: Andreas Oesterreicher < andreas.oesterreicher@technikum-wien.at >
|
||||
*/
|
||||
/**
|
||||
* Seite zur Wartung der Infoscreens
|
||||
*/
|
||||
require_once('../../config/vilesci.config.inc.php');
|
||||
require_once('../../include/infoscreen.class.php');
|
||||
require_once('../../include/benutzerberechtigung.class.php');
|
||||
require_once('../../include/datum.class.php');
|
||||
require_once('../../include/content.class.php');
|
||||
|
||||
if (!$db = new basis_db())
|
||||
die('Es konnte keine Verbindung zum Server aufgebaut werden.');
|
||||
|
||||
$user = get_uid();
|
||||
|
||||
$rechte = new benutzerberechtigung();
|
||||
$rechte->getBerechtigungen($user);
|
||||
|
||||
if(!$rechte->isBerechtigt('basis/infoscreen'))
|
||||
die($rechte->errormsg);
|
||||
|
||||
$datum_obj = new datum();
|
||||
?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>Infoscreen - Details</title>
|
||||
<link rel="stylesheet" href="../../skin/tablesort.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="../../skin/fhcomplete.css" type="text/css">
|
||||
<link rel="stylesheet" href="../../skin/vilesci.css" type="text/css">
|
||||
|
||||
<?php
|
||||
include('../../include/meta/jquery.php');
|
||||
include('../../include/meta/jquery-tablesorter.php');
|
||||
?>
|
||||
|
||||
<link rel="stylesheet" href="../../skin/jquery-ui-1.9.2.custom.min.css" type="text/css">
|
||||
<link rel="stylesheet" href="../../vendor/fgelinas/timepicker/jquery.ui.timepicker.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="../../include/js/jquery.ui.datepicker.translation.js"></script>
|
||||
<script type="text/javascript" src="../../vendor/jquery/sizzle/sizzle.js"></script>
|
||||
<script type="text/javascript" src="../../include/js/tablesort/table.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="../../vendor/fgelinas/timepicker/jquery.ui.timepicker.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function()
|
||||
{
|
||||
$("#myTable").tablesorter(
|
||||
{
|
||||
// Adding Function for sorting images by title
|
||||
textExtraction:function(s)
|
||||
{
|
||||
if($(s).find('img').length == 0) return $(s).text();
|
||||
return $(s).find('img').attr('title');
|
||||
},
|
||||
sortList: [[0,0],[5,0]],
|
||||
widgets: ['zebra']
|
||||
});
|
||||
|
||||
$( ".datepicker_datum" ).datepicker({
|
||||
changeMonth: true,
|
||||
changeYear: true,
|
||||
dateFormat: "dd.mm.yy",
|
||||
showButtonPanel: true,
|
||||
currentText: "Today",
|
||||
closeText: "Close",
|
||||
});
|
||||
|
||||
$( ".timepicker" ).timepicker({
|
||||
showPeriodLabels: false,
|
||||
hourText: "Hour",
|
||||
minuteText: "Minute",
|
||||
rows: 4,
|
||||
});
|
||||
|
||||
/*
|
||||
$("#refreshzeit").timepicker(
|
||||
{
|
||||
showPeriodLabels: false,
|
||||
showHours: false,
|
||||
minuteText: "",
|
||||
minutes: {starts: 20, ends: 300, interval: 20},
|
||||
rows: 5,
|
||||
});*/
|
||||
}
|
||||
);
|
||||
function checkValue()
|
||||
{
|
||||
var zeit = document.getElementById("refreshzeit").value;
|
||||
if (!isNaN(zeit))
|
||||
{
|
||||
if(zeit > 32767)
|
||||
{
|
||||
alert("Maximalwert für Refreshzeit ist 32767");
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
alert("Wert für Refreshzeit ist ungültig");
|
||||
return false;
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
.ui-timepicker-table table td a
|
||||
{
|
||||
padding:0.2em 0.3em 0.2em 0.3em;
|
||||
width: 2em;
|
||||
}
|
||||
.ui-widget
|
||||
{
|
||||
font-size: 0.9em;
|
||||
}
|
||||
.ui-widget button
|
||||
{
|
||||
font-size: 0.9em;
|
||||
}
|
||||
.ui-timepicker-table table
|
||||
{
|
||||
font-size: 0.9em;
|
||||
}
|
||||
.ui-widget-content .ui-priority-secondary
|
||||
{
|
||||
opacity: 1;
|
||||
}
|
||||
.ui-widget-content .ui-priority-primary
|
||||
{
|
||||
font-weight: normal;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<?php
|
||||
$action = (isset($_GET['action'])?$_GET['action']:'show');
|
||||
$infoscreen_id = (isset($_GET['infoscreen_id'])?$_GET['infoscreen_id']:'');
|
||||
$infoscreen = new infoscreen();
|
||||
|
||||
if($infoscreen_id=='')
|
||||
exit;
|
||||
|
||||
if(!$infoscreen->load($infoscreen_id))
|
||||
die($infoscreen->errormsg);
|
||||
|
||||
echo '<h2>Details von Infoscreen ',$infoscreen_id,' - ',$infoscreen->bezeichnung.' - ',$infoscreen->beschreibung.'</h2>';
|
||||
|
||||
echo '
|
||||
<div style="text-align:right">
|
||||
<a href="infoscreen_details.php?action=new&infoscreen_id=',$infoscreen_id,'" target="detail_infoscreen">Neuen Eintrag hinzufügen</a>
|
||||
</div>';
|
||||
|
||||
if($action=='save')
|
||||
{
|
||||
if(!$rechte->isBerechtigt('basis/infoscreen', null, 'sui'))
|
||||
die($rechte->errormsg);
|
||||
$my_infoscreen_id = $_POST['infoscreen_id'];
|
||||
$infoscreen_content_id = $_POST['infoscreen_content_id'];
|
||||
$content_id = $_POST['content_id'];
|
||||
$gueltigvon = $_POST['gueltigvondatum'].' '.$_POST['gueltigvonzeit'];
|
||||
$gueltigbis = $_POST['gueltigbisdatum'].' '.$_POST['gueltigbiszeit'];
|
||||
$refreshzeit = $_POST['refreshzeit'];
|
||||
$exklusiv = (isset ($_POST['exklusiv'])?true:false);
|
||||
|
||||
$infoscreen = new infoscreen();
|
||||
if($infoscreen_content_id!='')
|
||||
{
|
||||
$infoscreen->loadContent($infoscreen_content_id);
|
||||
$infoscreen->new = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$infoscreen->new = true;
|
||||
$infoscreen->insertamum = date('Y-m-d H:i:s');
|
||||
$infoscreen->insertvon = $user;
|
||||
}
|
||||
|
||||
$infoscreen->content_id = $content_id;
|
||||
$infoscreen->gueltigvon = $datum_obj->formatDatum($gueltigvon,'Y-m-d H:i:s');
|
||||
$infoscreen->gueltigbis = $datum_obj->formatDatum($gueltigbis,'Y-m-d H:i:s');
|
||||
$infoscreen->refreshzeit = $refreshzeit;
|
||||
$infoscreen->updateamum = date('Y-m-d H:i:s');
|
||||
$infoscreen->updatevon = $user;
|
||||
$infoscreen->exklusiv = $exklusiv;
|
||||
|
||||
$infoscreen_ids=explode(',',$my_infoscreen_id);
|
||||
if (count($infoscreen_ids)>1)
|
||||
{
|
||||
$infoscreen->new = true;
|
||||
$infoscreen->insertamum = date('Y-m-d H:i:s');
|
||||
$infoscreen->insertvon = $user;
|
||||
}
|
||||
|
||||
$doppelt = false;
|
||||
foreach($infoscreen_ids as $is_id)
|
||||
{
|
||||
$infoscreen->infoscreen_id = $is_id;
|
||||
|
||||
if ($doppelt==false)
|
||||
{
|
||||
if ($is_id==$infoscreen_id && $infoscreen_content_id!='')
|
||||
{
|
||||
$doppelt=true;
|
||||
$infoscreen->new = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
$doppelt=false;
|
||||
|
||||
if(!$infoscreen->saveContent())
|
||||
echo '<span class="error">Fehler bei Infoscreen '.$is_id.': '.$db->convert_html_chars($infoscreen->errormsg).'</span><br>';
|
||||
else
|
||||
echo '<span class="ok">Daten erfolgreich gespeichert für Infoscreen '.$is_id.'</span><br>';
|
||||
|
||||
$infoscreen->new = true;
|
||||
}
|
||||
}
|
||||
if($action=='delete')
|
||||
{
|
||||
if(!$rechte->isBerechtigt('basis/infoscreen', null, 'suid'))
|
||||
die('Sie haben keine Berechtigung fuer diese Seite');
|
||||
$infoscreen = new infoscreen();
|
||||
$infoscreen_content_id = (isset($_REQUEST['infoscreen_content_id'])?$_REQUEST['infoscreen_content_id']:'');
|
||||
if(!$infoscreen->deleteContent($infoscreen_content_id))
|
||||
echo '<span class="error">',$db->convert_html_chars($infoscreen->errormsg),'</span>';
|
||||
}
|
||||
//Formular fuer neu/update
|
||||
if($action=='new' || $action=='update')
|
||||
{
|
||||
$infoscreen_content_id = (isset($_REQUEST['infoscreen_content_id'])?$_REQUEST['infoscreen_content_id']:'');
|
||||
$infoscreen = new infoscreen();
|
||||
if($action=='new')
|
||||
{
|
||||
echo '<h3>Neu</h3>';
|
||||
}
|
||||
else
|
||||
{
|
||||
echo '<h3>Bearbeiten von ID ',$infoscreen_content_id,'</h3>';
|
||||
if(!$infoscreen->loadContent($infoscreen_content_id))
|
||||
die('Fehler: '.$infoscreen->errormsg);
|
||||
}
|
||||
echo '
|
||||
<form action="',$_SERVER['PHP_SELF'],'?action=save&infoscreen_id=',$infoscreen_id,'" method="POST">
|
||||
<input type="hidden" name="infoscreen_content_id" value="',$db->convert_html_chars($infoscreen->infoscreen_content_id),'">
|
||||
<table>
|
||||
<tr>
|
||||
<td>InfoscreenID(s)</td>
|
||||
<td><input type="text" size="15" name="infoscreen_id" value="',($action=='new'?$infoscreen_id:$db->convert_html_chars($infoscreen->infoscreen_id)),'" /> (Kommagetrennt für mehrere, keine ID für alle Infoscreens)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Content ID</td>
|
||||
<td><input type="text" size="5" name="content_id" value="',$db->convert_html_chars($infoscreen->content_id),'" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Gültig von</td>
|
||||
<td>
|
||||
<input class="datepicker_datum" type="text" id="gueltigvondatum" size="10" name="gueltigvondatum" placeholder= "dd.mm.yyyy"value="',$db->convert_html_chars($datum_obj->formatDatum($infoscreen->gueltigvon,'d.m.Y')),'" />
|
||||
<input class="timepicker" type="text" id="gueltigvonzeit" size="6" name="gueltigvonzeit" placeholder= "hh:mm" value="',$db->convert_html_chars($datum_obj->formatDatum($infoscreen->gueltigvon,'H:i')),'" />
|
||||
<input type="button" value="Jetzt" onclick="document.getElementById(\'gueltigvondatum\').value=\''.date('d.m.Y').'\';document.getElementById(\'gueltigvonzeit\').value=\''.date('H:i').'\';" />
|
||||
<input type="button" value="Leeren" onclick="document.getElementById(\'gueltigvondatum\').value=\'\';document.getElementById(\'gueltigvonzeit\').value=\'\';" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Gültig bis</td>
|
||||
<td>
|
||||
<input class="datepicker_datum" type="text" id="gueltigbisdatum" size="10" name="gueltigbisdatum" placeholder= "dd.mm.yyyy"value="',$db->convert_html_chars($datum_obj->formatDatum($infoscreen->gueltigbis,'d.m.Y')),'" />
|
||||
<input class="timepicker" type="text" id="gueltigbiszeit" size="6" name="gueltigbiszeit" placeholder= "hh:mm" value="',$db->convert_html_chars($datum_obj->formatDatum($infoscreen->gueltigbis,'H:i')),'" />
|
||||
<input type="button" value="Jetzt" onclick="document.getElementById(\'gueltigbisdatum\').value=\''.date('d.m.Y').'\';document.getElementById(\'gueltigbiszeit\').value=\''.date('H:i').'\'" />
|
||||
<input type="button" value="Leeren" onclick="document.getElementById(\'gueltigbisdatum\').value=\'\';document.getElementById(\'gueltigbiszeit\').value=\'\';" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Refreshzeit</td>
|
||||
<td><input id="refreshzeit" type="text" size="18" name="refreshzeit" value="',$db->convert_html_chars($infoscreen->refreshzeit),'"/> Zeit, wie lange die Seite angezeigt wird (in Sekunden)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Exklusiv</td>
|
||||
<td><input id="exklusiv" type="checkbox" name="exklusiv" '.($infoscreen->exklusiv===true?'checked':'').'/> Exklusiveinträge haben Vorrang vor normalen Einträgen</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td><input type="submit" value="Speichern" onclick="return checkValue();"/></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>';
|
||||
}
|
||||
|
||||
if(!$infoscreen->getScreenContent($infoscreen_id, false, false))
|
||||
die('Fehler:'.$infoscreen->errormsg);
|
||||
echo '<table class="tablesorter" id="myTable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Status</th>
|
||||
<th>ID</th>
|
||||
<th>InfoscreenID</th>
|
||||
<th>ContentID</th>
|
||||
<th>Titel</th>
|
||||
<th>Gültig von</th>
|
||||
<th>Gültig bis</th>
|
||||
<th>Refreshzeit</th>
|
||||
<th>Exklusiv</th>
|
||||
<th colspan="2">Aktion</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>';
|
||||
|
||||
$jetzt = time();
|
||||
$aktiv=false;
|
||||
$zukunft=false;
|
||||
$exklusiv = false;
|
||||
|
||||
//Wenn mindestens ein Content als Exklusiv markiert ist, wird dieser vorrangig behandelt
|
||||
foreach($infoscreen->result as $row)
|
||||
{
|
||||
$gueltigvon=$datum_obj->mktime_fromtimestamp($row->gueltigvon);
|
||||
$gueltigbis=$datum_obj->mktime_fromtimestamp($row->gueltigbis);
|
||||
|
||||
if($row->exklusiv==true && (($gueltigvon<=$jetzt) || ($gueltigvon=='')) && (($gueltigbis>=$jetzt) || ($gueltigbis=='')))
|
||||
$exklusiv = true;
|
||||
}
|
||||
foreach($infoscreen->result as $row)
|
||||
{
|
||||
$passiv=false;
|
||||
$content = new content();
|
||||
$content->getContent($row->content_id, 'German');
|
||||
$gueltigvon=$datum_obj->mktime_fromtimestamp($row->gueltigvon);
|
||||
$gueltigbis=$datum_obj->mktime_fromtimestamp($row->gueltigbis);
|
||||
|
||||
if ((($gueltigvon<=$jetzt) || ($gueltigvon=='')) && (($gueltigbis>=$jetzt) || ($gueltigbis=='')) && ($exklusiv==false && $row->exklusiv==false))
|
||||
$aktiv=true;
|
||||
elseif (($exklusiv==true && $row->exklusiv==true) && (($gueltigvon<=$jetzt) || ($gueltigvon=='')) && (($gueltigbis>=$jetzt) || ($gueltigbis=='')))
|
||||
$aktiv=true;
|
||||
else
|
||||
{
|
||||
$aktiv=false;
|
||||
}
|
||||
|
||||
if ($aktiv==false && ($gueltigvon>=$jetzt))
|
||||
$zukunft=true;
|
||||
elseif ((($gueltigvon<=$jetzt) || ($gueltigvon=='')) && (($gueltigbis>=$jetzt) || ($gueltigbis=='')) && ($exklusiv==true && $row->exklusiv==false))
|
||||
$passiv=true;
|
||||
else
|
||||
$zukunft=false;
|
||||
|
||||
echo '<tr '.($aktiv==true || $passiv==true?'':'style="color:grey"').'>';
|
||||
echo '<td width="10px" align="center">'.($aktiv==false?($zukunft==true || $passiv==true?'<img title="2" src="../../skin/images/ampel_gelb.png" alt="ampel_gelb">':'<img title="3" src="../../skin/images/ampel_rot.png" alt="ampel_rot">'):'<img title="1" src="../../skin/images/ampel_gruen.png" alt="ampel_gruen">').'</td>';
|
||||
echo '<td>',$db->convert_html_chars($row->infoscreen_content_id),'</td>';
|
||||
echo '<td>',$db->convert_html_chars($row->infoscreen_id),'</td>';
|
||||
echo '<td>',$db->convert_html_chars($row->content_id),'</td>';
|
||||
echo '<td>',$db->convert_html_chars($content->titel),'</td>';
|
||||
echo '<td name="'.$datum_obj->formatDatum($row->gueltigvon,'Y-m-d H:i').'" '.($zukunft==true?'style="color:black"':''). '>',$db->convert_html_chars($datum_obj->formatDatum($row->gueltigvon,'d.m.Y H:i')),'</td>';
|
||||
echo '<td name="'.$datum_obj->formatDatum($row->gueltigbis,'Y-m-d H:i').'">',$db->convert_html_chars($datum_obj->formatDatum($row->gueltigbis,'d.m.Y H:i')),'</td>';
|
||||
echo '<td>',$db->convert_html_chars($row->refreshzeit),'</td>';
|
||||
echo '<td>'.($row->exklusiv===true?'<b>Exklusiv</b>':'').'</td>';
|
||||
echo '<td><a href="infoscreen_details.php?action=update&infoscreen_id=',$db->convert_html_chars($infoscreen_id),'&infoscreen_content_id=',$db->convert_html_chars($row->infoscreen_content_id),'">bearbeiten</a>';
|
||||
echo '<td><a href="infoscreen_details.php?action=delete&infoscreen_id=',$db->convert_html_chars($infoscreen_id),'&infoscreen_content_id=',$db->convert_html_chars($row->infoscreen_content_id),'">entfernen</a>';
|
||||
echo '</tr>';
|
||||
}
|
||||
echo '</tbody>
|
||||
</table>';
|
||||
|
||||
?>
|
||||
</body>
|
||||
</html>
|
||||
<!-- <script type="text/javascript" src="../../vendor/jquery/sizzle/sizzle.js"></script>-->
|
||||
<!-- <script type="text/javascript" src="../../include/js/tablesort/table.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="../../vendor/fgelinas/timepicker/jquery.ui.timepicker.js"></script>
|
||||
<script type="text/javascript">
|
||||
$.tablesorter.addParser({
|
||||
id: "customDate",
|
||||
is: function(s) {
|
||||
//return false;
|
||||
//use the above line if you don't want table sorter to auto detected this parser
|
||||
//else use the below line.
|
||||
//attention: doesn't check for invalid stuff
|
||||
//2009-77-77 77:77:77.0 would also be matched
|
||||
//if that doesn't suit you alter the regex to be more restrictive
|
||||
//return /\d{1,4}-\d{1,2}-\d{1,2} \d{1,2}:\d{1,2}:\d{1,2}\.\d+/.test(s);
|
||||
return /\d{1,2}.\d{1,2}.\d{1,4} \d{1,2}:\d{1,2}/.test(s);
|
||||
},
|
||||
format: function(s) {
|
||||
s = s.replace(/\-/g," ");
|
||||
s = s.replace(/:/g," ");
|
||||
s = s.replace(/\./g," ");
|
||||
s = s.split(" ");
|
||||
return $.tablesorter.formatFloat(new Date(s[2], s[1]-1, s[0], s[3], s[4]).getTime());
|
||||
},
|
||||
type: "numeric"
|
||||
});
|
||||
$(document).ready(function()
|
||||
{
|
||||
$("#myTable").tablesorter(
|
||||
{
|
||||
// Adding Function for sorting images by title
|
||||
textExtraction:function(s)
|
||||
{
|
||||
if($(s).find('img').length == 0) return $(s).text();
|
||||
return $(s).find('img').attr('title');
|
||||
},
|
||||
sortList: [[0,0],[5,0]],
|
||||
widgets: ['zebra', 'filter', 'stickyHeaders'],
|
||||
headers: { 9: { filter: false, sorter: false }, 5: { sorter: "customDate"}, 6: { sorter: "customDate"}}
|
||||
|
||||
|
||||
});
|
||||
|
||||
$( ".datepicker_datum" ).datepicker({
|
||||
changeMonth: true,
|
||||
changeYear: true,
|
||||
dateFormat: "dd.mm.yy",
|
||||
showButtonPanel: true,
|
||||
currentText: "Today",
|
||||
closeText: "Close",
|
||||
});
|
||||
|
||||
$( ".timepicker" ).timepicker({
|
||||
showPeriodLabels: false,
|
||||
hourText: "Hour",
|
||||
minuteText: "Minute",
|
||||
rows: 4,
|
||||
});
|
||||
|
||||
/*
|
||||
$("#refreshzeit").timepicker(
|
||||
{
|
||||
showPeriodLabels: false,
|
||||
showHours: false,
|
||||
minuteText: "",
|
||||
minutes: {starts: 20, ends: 300, interval: 20},
|
||||
rows: 5,
|
||||
});*/
|
||||
}
|
||||
);
|
||||
function checkValue()
|
||||
{
|
||||
var zeit = document.getElementById("refreshzeit").value;
|
||||
if (!isNaN(zeit))
|
||||
{
|
||||
if(zeit > 32767)
|
||||
{
|
||||
alert("Maximalwert für Refreshzeit ist 32767");
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
alert("Wert für Refreshzeit ist ungültig");
|
||||
return false;
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
.ui-timepicker-table table td a
|
||||
{
|
||||
padding:0.2em 0.3em 0.2em 0.3em;
|
||||
width: 2em;
|
||||
}
|
||||
.ui-widget
|
||||
{
|
||||
font-size: 0.9em;
|
||||
}
|
||||
.ui-widget button
|
||||
{
|
||||
font-size: 0.9em;
|
||||
}
|
||||
.ui-timepicker-table table
|
||||
{
|
||||
font-size: 0.9em;
|
||||
}
|
||||
.ui-widget-content .ui-priority-secondary
|
||||
{
|
||||
opacity: 1;
|
||||
}
|
||||
.ui-widget-content .ui-priority-primary
|
||||
{
|
||||
font-weight: normal;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<?php
|
||||
$action = (isset($_GET['action'])?$_GET['action']:'show');
|
||||
$infoscreen_id = (isset($_GET['infoscreen_id'])?$_GET['infoscreen_id']:'');
|
||||
$infoscreen = new infoscreen();
|
||||
|
||||
if($infoscreen_id=='')
|
||||
exit;
|
||||
|
||||
if(!$infoscreen->load($infoscreen_id))
|
||||
die($infoscreen->errormsg);
|
||||
|
||||
echo '<h2>Details von Infoscreen ',$infoscreen_id,' - ',$infoscreen->bezeichnung.' - ',$infoscreen->beschreibung.'</h2>';
|
||||
|
||||
echo '
|
||||
<div style="text-align:right">
|
||||
<a href="infoscreen_details.php?action=new&infoscreen_id=',$infoscreen_id,'" target="detail_infoscreen">Neuen Eintrag hinzufügen</a>
|
||||
</div>';
|
||||
|
||||
if($action=='save')
|
||||
{
|
||||
if(!$rechte->isBerechtigt('basis/infoscreen', null, 'sui'))
|
||||
die($rechte->errormsg);
|
||||
$my_infoscreen_id = $_POST['infoscreen_id'];
|
||||
$infoscreen_content_id = $_POST['infoscreen_content_id'];
|
||||
$content_id = $_POST['content_id'];
|
||||
$gueltigvon = $_POST['gueltigvondatum'].' '.$_POST['gueltigvonzeit'];
|
||||
$gueltigbis = $_POST['gueltigbisdatum'].' '.$_POST['gueltigbiszeit'];
|
||||
$refreshzeit = $_POST['refreshzeit'];
|
||||
$exklusiv = (isset ($_POST['exklusiv'])?true:false);
|
||||
|
||||
$infoscreen = new infoscreen();
|
||||
if($infoscreen_content_id!='')
|
||||
{
|
||||
$infoscreen->loadContent($infoscreen_content_id);
|
||||
$infoscreen->new = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$infoscreen->new = true;
|
||||
$infoscreen->insertamum = date('Y-m-d H:i:s');
|
||||
$infoscreen->insertvon = $user;
|
||||
}
|
||||
|
||||
$infoscreen->content_id = $content_id;
|
||||
$infoscreen->gueltigvon = $datum_obj->formatDatum($gueltigvon,'Y-m-d H:i:s');
|
||||
$infoscreen->gueltigbis = $datum_obj->formatDatum($gueltigbis,'Y-m-d H:i:s');
|
||||
$infoscreen->refreshzeit = $refreshzeit;
|
||||
$infoscreen->updateamum = date('Y-m-d H:i:s');
|
||||
$infoscreen->updatevon = $user;
|
||||
$infoscreen->exklusiv = $exklusiv;
|
||||
|
||||
$infoscreen_ids=explode(',',$my_infoscreen_id);
|
||||
if (count($infoscreen_ids)>1)
|
||||
{
|
||||
$infoscreen->new = true;
|
||||
$infoscreen->insertamum = date('Y-m-d H:i:s');
|
||||
$infoscreen->insertvon = $user;
|
||||
}
|
||||
|
||||
$doppelt = false;
|
||||
foreach($infoscreen_ids as $is_id)
|
||||
{
|
||||
$infoscreen->infoscreen_id = $is_id;
|
||||
|
||||
if ($doppelt==false)
|
||||
{
|
||||
if ($is_id==$infoscreen_id && $infoscreen_content_id!='')
|
||||
{
|
||||
$doppelt=true;
|
||||
$infoscreen->new = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
$doppelt=false;
|
||||
|
||||
if(!$infoscreen->saveContent())
|
||||
echo '<span class="error">Fehler bei Infoscreen '.$is_id.': '.$db->convert_html_chars($infoscreen->errormsg).'</span><br>';
|
||||
else
|
||||
echo '<span class="ok">Daten erfolgreich gespeichert für Infoscreen '.$is_id.'</span><br>';
|
||||
|
||||
$infoscreen->new = true;
|
||||
}
|
||||
}
|
||||
if($action=='delete')
|
||||
{
|
||||
if(!$rechte->isBerechtigt('basis/infoscreen', null, 'suid'))
|
||||
die('Sie haben keine Berechtigung fuer diese Seite');
|
||||
$infoscreen = new infoscreen();
|
||||
$infoscreen_content_id = (isset($_REQUEST['infoscreen_content_id'])?$_REQUEST['infoscreen_content_id']:'');
|
||||
if(!$infoscreen->deleteContent($infoscreen_content_id))
|
||||
echo '<span class="error">',$db->convert_html_chars($infoscreen->errormsg),'</span>';
|
||||
}
|
||||
//Formular fuer neu/update
|
||||
if($action=='new' || $action=='update')
|
||||
{
|
||||
$infoscreen_content_id = (isset($_REQUEST['infoscreen_content_id'])?$_REQUEST['infoscreen_content_id']:'');
|
||||
$infoscreen = new infoscreen();
|
||||
if($action=='new')
|
||||
{
|
||||
echo '<h3>Neu</h3>';
|
||||
}
|
||||
else
|
||||
{
|
||||
echo '<h3>Bearbeiten von ID ',$infoscreen_content_id,'</h3>';
|
||||
if(!$infoscreen->loadContent($infoscreen_content_id))
|
||||
die('Fehler: '.$infoscreen->errormsg);
|
||||
}
|
||||
echo '
|
||||
<form action="',$_SERVER['PHP_SELF'],'?action=save&infoscreen_id=',$infoscreen_id,'" method="POST">
|
||||
<input type="hidden" name="infoscreen_content_id" value="',$db->convert_html_chars($infoscreen->infoscreen_content_id),'">
|
||||
<table>
|
||||
<tr>
|
||||
<td>InfoscreenID(s)</td>
|
||||
<td><input type="text" size="15" name="infoscreen_id" value="',($action=='new'?$infoscreen_id:$db->convert_html_chars($infoscreen->infoscreen_id)),'" /> (Kommagetrennt für mehrere, keine ID für alle Infoscreens)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Content ID</td>
|
||||
<td><input type="text" size="5" name="content_id" value="',$db->convert_html_chars($infoscreen->content_id),'" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Gültig von</td>
|
||||
<td>
|
||||
<input class="datepicker_datum" type="text" id="gueltigvondatum" size="10" name="gueltigvondatum" placeholder= "dd.mm.yyyy"value="',$db->convert_html_chars($datum_obj->formatDatum($infoscreen->gueltigvon,'d.m.Y')),'" />
|
||||
<input class="timepicker" type="text" id="gueltigvonzeit" size="6" name="gueltigvonzeit" placeholder= "hh:mm" value="',$db->convert_html_chars($datum_obj->formatDatum($infoscreen->gueltigvon,'H:i')),'" />
|
||||
<input type="button" value="Jetzt" onclick="document.getElementById(\'gueltigvondatum\').value=\''.date('d.m.Y').'\';document.getElementById(\'gueltigvonzeit\').value=\''.date('H:i').'\';" />
|
||||
<input type="button" value="Leeren" onclick="document.getElementById(\'gueltigvondatum\').value=\'\';document.getElementById(\'gueltigvonzeit\').value=\'\';" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Gültig bis</td>
|
||||
<td>
|
||||
<input class="datepicker_datum" type="text" id="gueltigbisdatum" size="10" name="gueltigbisdatum" placeholder= "dd.mm.yyyy"value="',$db->convert_html_chars($datum_obj->formatDatum($infoscreen->gueltigbis,'d.m.Y')),'" />
|
||||
<input class="timepicker" type="text" id="gueltigbiszeit" size="6" name="gueltigbiszeit" placeholder= "hh:mm" value="',$db->convert_html_chars($datum_obj->formatDatum($infoscreen->gueltigbis,'H:i')),'" />
|
||||
<input type="button" value="Jetzt" onclick="document.getElementById(\'gueltigbisdatum\').value=\''.date('d.m.Y').'\';document.getElementById(\'gueltigbiszeit\').value=\''.date('H:i').'\'" />
|
||||
<input type="button" value="Leeren" onclick="document.getElementById(\'gueltigbisdatum\').value=\'\';document.getElementById(\'gueltigbiszeit\').value=\'\';" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Refreshzeit</td>
|
||||
<td><input id="refreshzeit" type="text" size="18" name="refreshzeit" value="',$db->convert_html_chars($infoscreen->refreshzeit),'"/> Zeit, wie lange die Seite angezeigt wird (in Sekunden)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Exklusiv</td>
|
||||
<td><input id="exklusiv" type="checkbox" name="exklusiv" '.($infoscreen->exklusiv===true?'checked':'').'/> Exklusiveinträge haben Vorrang vor normalen Einträgen</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td><input type="submit" value="Speichern" onclick="return checkValue();"/></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>';
|
||||
}
|
||||
|
||||
if(!$infoscreen->getScreenContent($infoscreen_id, false, false))
|
||||
die('Fehler:'.$infoscreen->errormsg);
|
||||
echo '<table class="tablesorter" id="myTable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Status</th>
|
||||
<th>ID</th>
|
||||
<th>InfoscreenID</th>
|
||||
<th>ContentID</th>
|
||||
<th>Titel</th>
|
||||
<th>Gültig von</th>
|
||||
<th>Gültig bis</th>
|
||||
<th>Refreshzeit</th>
|
||||
<th>Exklusiv</th>
|
||||
<th colspan="2">Aktion</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>';
|
||||
|
||||
$jetzt = time();
|
||||
$aktiv=false;
|
||||
$zukunft=false;
|
||||
$exklusiv = false;
|
||||
|
||||
//Wenn mindestens ein Content als Exklusiv markiert ist, wird dieser vorrangig behandelt
|
||||
foreach($infoscreen->result as $row)
|
||||
{
|
||||
$gueltigvon=$datum_obj->mktime_fromtimestamp($row->gueltigvon);
|
||||
$gueltigbis=$datum_obj->mktime_fromtimestamp($row->gueltigbis);
|
||||
|
||||
if($row->exklusiv==true && (($gueltigvon<=$jetzt) || ($gueltigvon=='')) && (($gueltigbis>=$jetzt) || ($gueltigbis=='')))
|
||||
$exklusiv = true;
|
||||
}
|
||||
foreach($infoscreen->result as $row)
|
||||
{
|
||||
$passiv=false;
|
||||
$content = new content();
|
||||
$content->getContent($row->content_id, 'German');
|
||||
$gueltigvon=$datum_obj->mktime_fromtimestamp($row->gueltigvon);
|
||||
$gueltigbis=$datum_obj->mktime_fromtimestamp($row->gueltigbis);
|
||||
|
||||
if ((($gueltigvon<=$jetzt) || ($gueltigvon=='')) && (($gueltigbis>=$jetzt) || ($gueltigbis=='')) && ($exklusiv==false && $row->exklusiv==false))
|
||||
$aktiv=true;
|
||||
elseif (($exklusiv==true && $row->exklusiv==true) && (($gueltigvon<=$jetzt) || ($gueltigvon=='')) && (($gueltigbis>=$jetzt) || ($gueltigbis=='')))
|
||||
$aktiv=true;
|
||||
else
|
||||
{
|
||||
$aktiv=false;
|
||||
}
|
||||
|
||||
if ($aktiv==false && ($gueltigvon>=$jetzt))
|
||||
$zukunft=true;
|
||||
elseif ((($gueltigvon<=$jetzt) || ($gueltigvon=='')) && (($gueltigbis>=$jetzt) || ($gueltigbis=='')) && ($exklusiv==true && $row->exklusiv==false))
|
||||
$passiv=true;
|
||||
else
|
||||
$zukunft=false;
|
||||
|
||||
echo '<tr '.($aktiv==true || $passiv==true?'':'style="color:grey"').'>';
|
||||
echo '<td width="10px" align="center">'.($aktiv==false?($zukunft==true || $passiv==true?'<img title="2" src="../../skin/images/ampel_gelb.png" alt="ampel_gelb">':'<img title="3" src="../../skin/images/ampel_rot.png" alt="ampel_rot">'):'<img title="1" src="../../skin/images/ampel_gruen.png" alt="ampel_gruen">').'</td>';
|
||||
echo '<td>',$db->convert_html_chars($row->infoscreen_content_id),'</td>';
|
||||
echo '<td>',$db->convert_html_chars($row->infoscreen_id),'</td>';
|
||||
echo '<td>',$db->convert_html_chars($row->content_id),'</td>';
|
||||
echo '<td>',$db->convert_html_chars($content->titel),'</td>';
|
||||
echo '<td name="'.$datum_obj->formatDatum($row->gueltigvon,'Y-m-d H:i').'" '.($zukunft==true?'style="color:black"':''). '>',$db->convert_html_chars($datum_obj->formatDatum($row->gueltigvon,'d.m.Y H:i')),'</td>';
|
||||
echo '<td name="'.$datum_obj->formatDatum($row->gueltigbis,'Y-m-d H:i').'">',$db->convert_html_chars($datum_obj->formatDatum($row->gueltigbis,'d.m.Y H:i')),'</td>';
|
||||
echo '<td>',$db->convert_html_chars($row->refreshzeit),'</td>';
|
||||
echo '<td>'.($row->exklusiv===true?'<b>Exklusiv</b>':'').'</td>';
|
||||
echo '<td><a href="infoscreen_details.php?action=update&infoscreen_id=',$db->convert_html_chars($infoscreen_id),'&infoscreen_content_id=',$db->convert_html_chars($row->infoscreen_content_id),'">bearbeiten</a>';
|
||||
echo '<td><a href="infoscreen_details.php?action=delete&infoscreen_id=',$db->convert_html_chars($infoscreen_id),'&infoscreen_content_id=',$db->convert_html_chars($row->infoscreen_content_id),'">entfernen</a>';
|
||||
echo '</tr>';
|
||||
}
|
||||
echo '</tbody>
|
||||
</table>';
|
||||
|
||||
?>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user