readd erroneously deleted folder addons/template commited as 56080f6681

This commit is contained in:
Harald Bamberger
2024-10-17 15:55:05 +02:00
parent d4494836b1
commit c80e943b3b
21 changed files with 705 additions and 0 deletions
View File
+44
View File
@@ -0,0 +1,44 @@
<?php
/* Copyright (C) 2015 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: Andreas Oesterreicher <[email protected]>
*/
/**
* Initialisierung des Addons
*/
?>
if(typeof addon =='undefined')
var addon=Array();
addon.push(
{
init: function(page, params)
{
// Diese Funktion wird nach dem Laden der Seite im CIS aufgerufen
/*
switch(page)
{
case 'cis/private/tools/zeitaufzeichnung.php':
break;
default:
break;
}
*/
}
});
@@ -0,0 +1,55 @@
<?php
/* Copyright (C) 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
*
* Authors: Andreas Österreicher <[email protected]>
*/
/**
* Diese Datei fügt zusätzliche Links im CIS Profil ein
* Dazu muss die Datei umbenannt werden in profil_array.php
*
* Dazu wird ein Array aufgebaut welches die Links enthaelt.
*
* $menu = array('MeinLink'=>array('name'=>'Name des Links','link'=>'../path/to/file.php','target'='content'));
*/
// Unterschiedliche Links für Studierende und Mitarbeiter
if($type=='student')
{
if(!$ansicht)
$menu['Notenliste']=array('name'=>$p->t('profil/leistungsbeurteilung'), 'link'=>'../lehre/notenliste.php', 'target'=>'content');
$menu['LVPlan']=array('name'=>$p->t('profil/lvplanVon').' '.$user->nachname, 'link'=>'../lvplan/stpl_week.php?pers_uid='.$user->uid.'&type=student', 'target'=>'content');
}
else
{
if(!$ansicht)
{
$menu['Zeitwunsch']=array('name'=>$p->t('profil/zeitwuensche'), 'link'=>'zeitwunsch.php?uid='.$user->uid, 'target'=>'content');
$menu['Lehrveranstaltungen']=array('name'=>$p->t('lvaliste/lehrveranstaltungen'), 'link'=>'lva_liste.php?uid='.$user->uid, 'target'=>'content');
}
if(check_lektor(get_uid()))
{
$menu['Zeitsperren']=array('name'=>$p->t('profil/zeitsperrenVon').' '.$user->nachname, 'link'=>'zeitsperre_days.php?days=30&lektor='.$user->uid, 'target'=>'content');
}
if($uid!=get_uid())
{
$menu['LVPlan']=array('name'=>$p->t('profil/lvplanVon').' '.$user->nachname, 'link'=>'../lvplan/stpl_week.php?pers_uid='.$user->uid.'&type=lektor', 'target'=>'content');
}
}
?>
View File
+90
View File
@@ -0,0 +1,90 @@
<?php
/* Copyright (C) 2013 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: Andreas Oesterreicher <[email protected]>
*/
/**
* Initialisierung des Addons
*/
?>
addon.push(
{
init: function()
{
// Diese Funktion wird nach dem Laden des FAS aufgerufen
/*
// Hinzufuegen eines zusaetzlichen Tabs bei Mitarbeitern mit einem Label darin
var tabitem = document.createElement("tab");
tabitem.setAttribute("id","addon-template-tab");
tabitem.setAttribute("label","Template");
var mitarbeitertabs = document.getElementById("mitarbeiter-tabs");
mitarbeitertabs.appendChild(tabitem);
var tabpanelitem = document.createElement("vbox");
tabpanelitem.setAttribute("id","addon-template-tabpannel-vbox");
var label = document.createElement("label");
label.setAttribute("value","Template");
tabpanelitem.appendChild(label);
var mitarbeitertabpanels=document.getElementById("mitarbeiter-tabpanels-main");
mitarbeitertabpanels.appendChild(tabpanelitem);
// zusaetzliche Funktion beim klicken des Suchen Button bei Mitarbeitern hinzufuegen
searchbutton = document.getElementById("mitarbeiter-toolbar-button-search");
searchbutton.addEventListener("command",AddonTemplateMitarbeiterSearch, true);
// Menuepunkt hinzufuegen
statistikmenue = document.getElementById("menu-statistic-popup");
var menuentry = document.createElement("menuitem");
menuentry.setAttribute("id","addons-template-mymenuentry");
menuentry.setAttribute("label","Addon Template Menu Entry");
menuentry.addEventListener("command",AddonTemplateMenuEntry, true);
statistikmenue.appendChild(menuentry);
*/
},
selectMitarbeiter: function(person_id, mitarbeiter_uid)
{
},
selectStudent: function(person_id, prestudent_id, student_uid)
{
},
selectVerband: function(item)
{
},
selectInstitut: function(institut)
{
},
selectLektor: function(lektor)
{
}
});
function AddonTemplateMitarbeiterSearch()
{
alert("AddonTemplateSearchButtonClicked");
}
function AddonTemplateMenuEntry()
{
alert("AddonTemplateMenuEntry clicked");
}
+101
View File
@@ -0,0 +1,101 @@
<?php
/* Copyright (C) 2013 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.
*
*/
/**
* FH-Complete Addon Template Datenbank Check
*
* Prueft und aktualisiert die Datenbank
*/
require_once('../../config/system.config.inc.php');
require_once('../../include/basis_db.class.php');
require_once('../../include/functions.inc.php');
require_once('../../include/benutzerberechtigung.class.php');
// Datenbank Verbindung
$db = new basis_db();
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/vilesci.css" type="text/css">
<title>Addon Datenbank Check</title>
</head>
<body>
<h1>Addon Datenbank Check</h1>';
$uid = get_uid();
$rechte = new benutzerberechtigung();
$rechte->getBerechtigungen($uid);
if(!$rechte->isBerechtigt('basis/addon', null, 'suid'))
{
exit('Sie haben keine Berechtigung für die Verwaltung von Addons');
}
echo '<h2>Aktualisierung der Datenbank</h2>';
// Code fuer die Datenbankanpassungen
/*
if(!$result = @$db->db_query("SELECT 1 FROM addon.tbl_template_items"))
{
$qry = 'CREATE TABLE addon.tbl_template_items
(
template_items_kurzbz varchar(32),
bezeichnung varchar(256)
);';
if(!$db->db_query($qry))
echo '<strong>addon.tbl_template_items: '.$db->db_last_error().'</strong><br>';
else
echo ' addon.tbl_template_items: Tabelle addon.template_items hinzugefuegt!<br>';
}
*/
echo '<br>Aktualisierung abgeschlossen<br><br>';
echo '<h2>Gegenprüfung</h2>';
// Liste der verwendeten Tabellen / Spalten des Addons
$tabellen=array(
"addon.tbl_template_items" => array("template_items_kurzbz","bezeichnung"),
);
$tabs=array_keys($tabellen);
$i=0;
foreach ($tabellen AS $attribute)
{
$sql_attr='';
foreach($attribute AS $attr)
$sql_attr.=$attr.',';
$sql_attr=substr($sql_attr, 0, -1);
if (!@$db->db_query('SELECT '.$sql_attr.' FROM '.$tabs[$i].' LIMIT 1;'))
echo '<BR><strong>'.$tabs[$i].': '.$db->db_last_error().' </strong><BR>';
else
echo $tabs[$i].': OK - ';
flush();
$i++;
}
?>
View File
+66
View File
@@ -0,0 +1,66 @@
<?php
/* Copyright (C) 2013 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.
*
*/
/**
* FH-Complete Addon Template Installation
*
* Installationsscript zur Erstinitialisierung des Addons
*/
require_once('version.php');
require_once('../../version.php');
require_once('../../config/system.config.inc.php');
require_once('../../include/functions.inc.php');
require_once('../../include/benutzerberechtigung.class.php');
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/vilesci.css" type="text/css">
<title>Addon Installation</title>
</head>
<body>
<h1>Addon Installation</h1>';
$uid = get_uid();
$rechte = new benutzerberechtigung();
$rechte->getBerechtigungen($uid);
if(!$rechte->isBerechtigt('basis/addon', null, 'suid'))
{
exit('Sie haben keine Berechtigung für die Verwaltung von Addons');
}
if($fhcomplete_version>=$fhcomplete_target_version)
{
echo 'Installiere Addon <span class="marked">'.$addon_name.'</span> Version <span class="marked">'.$addon_version.'</span><br><br>';
/**
* Fuegen Sie hier Ihre Installationsroutine hinzu
*/
echo '<a href="dbcheck.php">&gt;&gt; weiter zur Aktualisierung der Datenbank</a>';
}
else
{
echo 'Dieses Addon funktioniert erst mit FHComplete Version '.$fhcomplete_target_version;
echo 'Installation abgebrochen';
}
?>
+6
View File
@@ -0,0 +1,6 @@
In diesem Ordner können Locale-Dateien abgelegt werden.
Diese überschreiben globale Locales die unter /locale/ abgelegt sind.
In den Dateien müssen nicht alle Phrasen vorhanden sein. Es genügt, wenn nur die Phrasen vorhanden sind die überschrieben werden sollen. Alle anderen Phrasen werden aus dem Standard-Ordner übernommen.
Die Datei mit der Phrase muss jedoch den selben Namen haben wie die Ursprungsdatei in der die Phrase enthalten ist.
View File
View File
View File
@@ -0,0 +1,2 @@
In diesem Ordner können modifizierte ODT Vorlagen für die Dokumentenerstellung abgelegt werden.
Vorlagen die in diesem Ordner abgelegt werden, werden bevorzugt gegenüber jenen die unter /system/vorlage_zip abgelegt sind.
+29
View File
@@ -0,0 +1,29 @@
<?php
/* Copyright (C) 2013 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.
*
*/
// Name des Addons
$addon_name = 'Template';
// Versionsnummer des Addons
$addon_version = '0.01';
// FH-Complete Min-Version
$fhcomplete_target_version = '2.2';
?>
+44
View File
@@ -0,0 +1,44 @@
<?php
/* Copyright (C) 2013 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.
*
*/
require_once('../../../config/vilesci.config.inc.php');
require_once('../../../include/functions.inc.php');
require_once('../../../include/benutzerberechtigung.class.php');
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/vilesci.css" type="text/css">
<title>Template</title>
</head>
<body>
<h1>Template</h1>';
$uid = get_uid();
$rechte = new benutzerberechtigung();
$rechte->getBerechtigungen($uid);
if(!$rechte->isBerechtigt('basis/addon'))
{
die('Sie haben keine Berechtigung fuer diese Seite');
}
echo 'Template Addon Vilesci Integration';
?>
+44
View File
@@ -0,0 +1,44 @@
<?php
/* Copyright (C) 2015 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: Andreas Oesterreicher <[email protected]>
*/
/**
* Initialisierung des Addons
*/
?>
if(typeof addon =='undefined')
var addon=Array();
addon.push(
{
init: function(page, params)
{
// Diese Funktion wird nach dem Laden der Seite im Vilesci aufgerufen
/*
switch(page)
{
case 'vilesci/lehre/lehrveranstaltung.php':
break;
default:
break;
}
*/
}
});
+44
View File
@@ -0,0 +1,44 @@
<?php
/* Copyright (C) 2017 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: Andreas Oesterreicher <[email protected]>,
*/
/**
* Hier koennen neue Menuepunkte im Vilesci definiert werden
*/
// Hauptmenuepunkt hinzufuegen
$menu_addon = array
(
'Template'=>array
(
'name'=>'Template', 'opener'=>'true', 'hide'=>'true', 'permissions'=>array('basis/addon'), 'image'=>'../../skin/images/vilesci_addons.png',
'link'=>'left.php?categorie=Template', 'target'=>'nav',
'TemplateEntry1'=>array('name'=>'Template Entry1', 'link'=>'../addons/template/vilesci/index.php', 'target'=>'main'),
'TemplateEntry2'=>array('name'=>'Template Entry2', 'link'=>'../addons/template/vilesci/index.php', 'target'=>'main')
)
);
$menu = array_merge($menu,$menu_addon);
// Submenuepunkt hinzufuegen unter dem Hauptmenue Punkt "Admin"
$menu_addon = array
(
'TemplateSubmenu'=>array('name'=>'Template', 'link'=>'../addons/template/vilesci/index.php', 'target'=>'main','permissions'=>array('basis/addon')),
);
$menu['Admin'] = array_merge($menu['Admin'],$menu_addon);
?>
@@ -0,0 +1,69 @@
<?php
/* Copyright (C) 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
*
* Authors: Andreas Oesterreicher <[email protected]> and
*/
/**
* Benutzerdefinierte Funktion zur Generierung der UIDs
* Zur Aktivierung muss die Datei in generateuid.inc.php umbenannt werden
*/
/**
* Generiert die UID für Studierende
*
* @param $stgkzl Studiengangskuerzel
* @param $jahr Studienjahr (zB 2014)
* @param $stgtyp Studiengangstyp einstellige Ziffer
* @param $matrikelnummer Personenkennzeichen des Studierenden
*/
function generateUID($stgkzl, $jahr, $stgtyp, $matrikelnummer)
{
return $matrikelnummer;
}
/**
* Gerneriert die Mitarbeiter UID
* Format v.nachname max 20 Zeichen
* Im Fall von Doppelnamen wird vor dem Bindestrich abgeschnitten
*
* @param $vorname Vorname
* @param $nachname Nachname
* @param $lektor Boolean true wenn Lektor sonst false
*/
function generateMitarbeiterUID($vorname, $nachname, $lektor, $fixangestellt=true)
{
$bn = new benutzer();
$uid='';
// Wenn ein Bindestrich vorhanden ist (Doppelname), dort abschneiden
if(mb_strpos($nachname,'-')!==false)
$nachname = mb_substr($nachname, 0, mb_strpos($nachname,'-'));
// Nachname wird so lange verkuerzt bis eine eindeutige UID entsteht die noch nicht vergeben ist
for($nn=18;$nn!=0;$nn--)
{
$uid = mb_substr($vorname,0,1);
$uid .= mb_substr($nachname,0,$nn);
$uid = mb_str_replace(' ','',$uid);
$uid = mb_str_replace('-','',$uid);
$uid = mb_strtolower($uid);
if(!$bn->uid_exists($uid))
return $uid;
}
return false;
}
@@ -0,0 +1,39 @@
<?php
/* Copyright (C) 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
*
* Authors: Andreas Oesterreicher <[email protected]>
*/
/*
* Diese Datei überschreibt die Default-Funktionen zur Passwort Änderung
* Zur Aktivierung muss die Datei in passwort.inc.php umbenannt werden
*
* Ansonsten wird die Default Funktionalität unter /include/tw/passwort.inc.php verwendet
*/
/**
* Aendert das Passwort
* @param $passwort_alt Altes (aktuelles) Passwort
* @param $passwort_neu neues Passwort
* @param $uid - UID/Benutzername des Users
* @return true wenn erfolgreich - Fehlermeldung im Fehlerfall
*/
function change_password($passwort_alt, $passwort_neu, $uid)
{
return 'Passwort Änderung fehlgeschlagen.';
}
?>
@@ -0,0 +1,72 @@
<?php
/* Copyright (C) 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
*
* Authors: Andreas Oesterreicher <[email protected]>
*/
// Raumtyp der per Default am Infoterminal angezeigt wird
$ServiceTerminalDefaultRaumtyp='EDV';
// Liste der Raumtypen die am Infoterminal angezeigt werden
$ServiceTerminalRaumtypen=array(
array("type"=>"EDV","beschreibung"=>"&nbsp;Freie&nbsp;<br>&nbsp;PC R&auml;ume&nbsp;","img"=>""),
array("type"=>"HS","beschreibung"=>"&nbsp;Freie&nbsp;<br>&nbsp;H&ouml;rs&auml;le&nbsp;","img"=>""),
array("type"=>"SEM","beschreibung"=>"&nbsp;Freie&nbsp;<br>&nbsp;Seminarr&auml;ume&nbsp;","img"=>""),
array("type"=>"Lab","beschreibung"=>"&nbsp;Freie&nbsp;<br>&nbsp;Laborr&auml;ume&nbsp;","img"=>""),
);
/**
* Prueft ob die Karte verlaengert werden darf
* @param $uid
* @return Array mit boolean und Errormsg
*/
function ServiceTerminalCheckVerlaengerung($uid)
{
if(!check_lektor($uid))
{
$konto = new konto();
if($aktSemester= $konto->getLastStudienbeitrag($uid))
{
return array(true,'Studienbeitrag für Semester '.$aktSemester.' bezahlt');
}
else
{
return array(false,'Verlängerung der Karte ist derzeit nicht möglich da der Studienbeitrag noch nicht bezahlt wurde');
}
}
else
return array(false,'Für Mitarbeiter ist eine Kartenverlängerung nicht möglich');
}
/**
* Liefert den Text der auf die Karte gedruckt werden soll oder einer Errormsg
* @param $uid UID des Users
* @return array mit Datum/Drucktext und errorMessage
*/
function ServiceTerminalGetDrucktext($uid)
{
// hole Semester des letzten eingezahlten Studienbeitrages
$konto = new konto();
if(!$aktSemester= $konto->getLastStudienbeitrag($uid))
{
return array('datum'=>'', 'errorMessage'=>'Fehler beim Auslesen des Studienganges. Bitte wenden Sie sich an den Service Desk.');
}
return array('datum'=>'Gueltig fuer/valid for '.$aktSemester, 'errorMessage'=>'');
}
?>
View File