mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-07 05:49:27 +00:00
This commit is contained in:
@@ -23,6 +23,7 @@
|
||||
// * @brief Uebersicht der Zeitsperren fuer Lektorengruppen
|
||||
|
||||
require_once('../../config.inc.php');
|
||||
require_once('../../../include/globals.inc.php');
|
||||
require_once('../../../include/functions.inc.php');
|
||||
require_once('../../../include/person.class.php');
|
||||
require_once('../../../include/benutzer.class.php');
|
||||
@@ -43,7 +44,7 @@
|
||||
else
|
||||
$fix=null;
|
||||
if ($fix=='false') $fix=false;
|
||||
if ($fix=='true') $fix=true;
|
||||
if ($fix=='true' || $fix=='1') $fix=true;
|
||||
|
||||
if(isset($_GET['funktion']))
|
||||
$funktion=$_GET['funktion'];
|
||||
@@ -62,6 +63,13 @@
|
||||
else
|
||||
$studiensemester=null;
|
||||
|
||||
// Link fuer den Export
|
||||
$export_link='zeitsperre_export.php?';
|
||||
if ($fix==true)
|
||||
$export_link.='fix=true';
|
||||
//&lektor=$lektor&funktion=$funktion";
|
||||
|
||||
|
||||
|
||||
if (!$conn = pg_pconnect(CONN_STRING))
|
||||
die("Es konnte keine Verbindung zum Server aufgebaut werden.");
|
||||
@@ -107,6 +115,7 @@
|
||||
</H2>
|
||||
|
||||
<H3>Zeitsperren von <?php echo $datum_beginn.' bis '.$datum_ende; ?></H3>
|
||||
<a href="<?php echo $export_link; ?>">Excel</a>
|
||||
<TABLE id="zeitsperren">
|
||||
<TR>
|
||||
<?php
|
||||
@@ -116,7 +125,7 @@
|
||||
$tag=date('d',$ts);
|
||||
$wt=date('w',$ts);
|
||||
$monat=date('M',$ts);
|
||||
if ($wt==0)
|
||||
if ($wt==0 || $wt==6)
|
||||
$class='feiertag';
|
||||
else
|
||||
$class='';
|
||||
@@ -136,9 +145,14 @@
|
||||
{
|
||||
$tag=date('d',$ts);
|
||||
$monat=date('M',$ts);
|
||||
$wt=date('w',$ts);
|
||||
if ($wt==0 || $wt==6)
|
||||
$class='feiertag';
|
||||
else
|
||||
$class='';
|
||||
$grund=$zs->getTyp($ts);
|
||||
$erbk=$zs->getErreichbarkeit($ts);
|
||||
echo "<td>$grund<br>$erbk</td>";
|
||||
echo "<td class='$class'>$grund<br>$erbk</td>";
|
||||
}
|
||||
echo '</TR>';
|
||||
}
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
// * @brief Uebersicht der Zeitsperren fuer Lektorengruppen
|
||||
|
||||
require_once('../../config.inc.php');
|
||||
require_once('../../../include/globals.inc.php');
|
||||
require_once('../../../include/functions.inc.php');
|
||||
require_once('../../../include/person.class.php');
|
||||
require_once('../../../include/benutzer.class.php');
|
||||
@@ -75,11 +76,11 @@
|
||||
$tag=date('d',$ts);
|
||||
$wt=date('w',$ts);
|
||||
$monat=date('M',$ts);
|
||||
if ($wt==0)
|
||||
if ($wt==0 || $wt==6)
|
||||
$class='feiertag';
|
||||
else
|
||||
$class='';
|
||||
echo "<th class='$class'><div align=\"center\">$monat<br>$tag</div></th>";
|
||||
echo "<th class='$class'><div align=\"center\">$tagbez[$wt]<BR>$monat<br>$tag</div></th>";
|
||||
}
|
||||
?>
|
||||
</TR>
|
||||
@@ -95,9 +96,14 @@
|
||||
{
|
||||
$tag=date('d',$ts);
|
||||
$monat=date('M',$ts);
|
||||
$wt=date('w',$ts);
|
||||
if ($wt==0 || $wt==6)
|
||||
$class='feiertag';
|
||||
else
|
||||
$class='';
|
||||
$grund=$zs->getTyp($ts);
|
||||
$erbk=$zs->getErreichbarkeit($ts);
|
||||
echo "<td>$grund<br>$erbk</td>";
|
||||
echo "<td class='$class'>$grund<br>$erbk</td>";
|
||||
}
|
||||
echo '</TR>';
|
||||
}
|
||||
|
||||
@@ -0,0 +1,133 @@
|
||||
<?php
|
||||
/* Copyright (C) 2006 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
|
||||
* Rudolf Hangl <rudolf.hangl@technikum-wien.at>.
|
||||
*/
|
||||
// **
|
||||
// * @brief Uebersicht der Zeitsperren fuer Lektorengruppen
|
||||
|
||||
require_once('../../config.inc.php');
|
||||
require_once('../../../include/globals.inc.php');
|
||||
require_once('../../../include/functions.inc.php');
|
||||
require_once('../../../include/person.class.php');
|
||||
require_once('../../../include/benutzer.class.php');
|
||||
require_once('../../../include/mitarbeiter.class.php');
|
||||
require_once('../../../include/studiensemester.class.php');
|
||||
require_once('../../../include/zeitsperre.class.php');
|
||||
require_once('../../../include/datum.class.php');
|
||||
|
||||
$crlf=crlf();
|
||||
$trenn="\t";
|
||||
|
||||
$uid = get_uid();
|
||||
|
||||
if(isset($_GET['lektor']))
|
||||
$lektor=$_GET['lektor'];
|
||||
else
|
||||
$lektor=null;
|
||||
if ($lektor=='true' || $lektor=='1') $lektor=true;
|
||||
if ($lektor=='false' || $lektor=='') $lektor=false;
|
||||
|
||||
if(isset($_GET['fix']))
|
||||
$fix=$_GET['fix'];
|
||||
else
|
||||
$fix=null;
|
||||
if ($fix=='true' || $fix=='1') $fix=true;
|
||||
if ($fix=='false' || $fix=='') $fix=false;
|
||||
|
||||
if(isset($_GET['funktion']))
|
||||
$funktion=$_GET['funktion'];
|
||||
else
|
||||
$funktion=null;
|
||||
if ($funktion=='true' || $funktion=='1') $funktion=true;
|
||||
if ($funktion=='false' || $funktion=='') $funktion=false;
|
||||
|
||||
$stge=array();
|
||||
if(isset($_GET['stg_kz']))
|
||||
{
|
||||
$stg_kz=$_GET['stg_kz'];
|
||||
$stge[]=$stg_kz;
|
||||
}
|
||||
|
||||
if(isset($_GET['studiensemester']))
|
||||
$studiensemester=$_GET['studiensemester'];
|
||||
else
|
||||
$studiensemester=null;
|
||||
|
||||
|
||||
if (!$conn = pg_pconnect(CONN_STRING))
|
||||
die("Es konnte keine Verbindung zum Server aufgebaut werden.");
|
||||
|
||||
$datum_obj = new datum();
|
||||
|
||||
// Studiensemester setzen
|
||||
$ss=new studiensemester($conn,$studiensemester);
|
||||
if ($studiensemester==null)
|
||||
$studiensemester=$ss->getAktTillNext();
|
||||
$datum_beginn='2007-07-01';//$ss->start;
|
||||
$datum_ende='2007-09-01';//$ss->ende;
|
||||
$ts_beginn=$datum_obj->mktime_fromdate($datum_beginn);
|
||||
$ts_ende=$datum_obj->mktime_fromdate($datum_ende);
|
||||
|
||||
// Lektoren holen
|
||||
$ma=new mitarbeiter($conn);
|
||||
//if (!is_null($funktion))
|
||||
// $mitarbeiter=$ma->getMitarbeiterStg(true,null,$stge,$funktion);
|
||||
//else
|
||||
$mitarbeiter=$ma->getMitarbeiter(null,true);//($lektor,$fix);
|
||||
|
||||
//EXPORT
|
||||
header("Content-type: application/vnd.ms-excel");
|
||||
header('Content-Disposition: attachment; filename="Zeitsperren.csv"');
|
||||
header("Expires: 0");
|
||||
header("Cache-Control: must-revalidate, post-check=0,pre-check=0");
|
||||
header("Pragma: public");
|
||||
|
||||
echo '"Datum"'.$trenn;
|
||||
for ($ts=$ts_beginn;$ts<$ts_ende; $ts+=$datum_obj->ts_day)
|
||||
{
|
||||
$tag=date('d',$ts);
|
||||
$wt=date('w',$ts);
|
||||
$monat=date('M',$ts);
|
||||
if ($wt==0 || $wt==6)
|
||||
$class='feiertag';
|
||||
else
|
||||
$class='';
|
||||
echo '"'.$tagbez[$wt].' '.$tag.'.'.$monat.'"'.$trenn;
|
||||
}
|
||||
$zs=new zeitsperre($conn);
|
||||
foreach ($mitarbeiter as $ma)
|
||||
{
|
||||
$zs->getzeitsperren($ma->uid, false);
|
||||
echo $crlf.'"'.$ma->nachname.' '.$ma->vorname.'"'.$trenn;
|
||||
for ($ts=$ts_beginn;$ts<$ts_ende; $ts+=$datum_obj->ts_day)
|
||||
{
|
||||
$tag=date('d',$ts);
|
||||
$monat=date('M',$ts);
|
||||
$wt=date('w',$ts);
|
||||
if ($wt==0 || $wt==6)
|
||||
$class='feiertag';
|
||||
else
|
||||
$class='';
|
||||
$grund=$zs->getTyp($ts);
|
||||
$erbk=$zs->getErreichbarkeit($ts);
|
||||
echo '"'.$grund.' - '.$erbk.'"'.$trenn;
|
||||
}
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user