mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-01 12:19:28 +00:00
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
include('../config.inc.php');
|
||||
include('../../include/functions.inc.php');
|
||||
include('../../config.inc.php');
|
||||
include('../../../include/functions.inc.php');
|
||||
|
||||
if (isset($REMOTE_USER))
|
||||
$uid=$REMOTE_USER;
|
||||
@@ -9,29 +9,29 @@
|
||||
|
||||
// Verbindung aufbauen
|
||||
$conn=pg_pconnect(CONN_STRING) or die ("Unable to connect to SQL-Server");
|
||||
$sql_query="SELECT uid, nachname, vornamen FROM tbl_person WHERE uid LIKE '$uid'";
|
||||
$sql_query="SET search_path TO campus;SELECT uid, nachname, vorname FROM vw_benutzer WHERE uid LIKE '$uid'";
|
||||
unset($uid);
|
||||
$result=@pg_exec($conn, $sql_query);
|
||||
$result=pg_query($conn, $sql_query);
|
||||
if(!$result)
|
||||
echo "User not found!";
|
||||
else
|
||||
{
|
||||
$uid=pg_result($result,0,'"uid"');
|
||||
$nachname=pg_result($result,0,'"nachname"');
|
||||
$vornamen=pg_result($result,0,'"vornamen"');
|
||||
$vornamen=pg_result($result,0,'"vorname"');
|
||||
}
|
||||
$sql_query="SELECT studiengang_kz, kurzbz, kurzbzlang, bezeichnung FROM tbl_studiengang ORDER BY kurzbz";
|
||||
$result_stg=pg_exec($conn, $sql_query);
|
||||
$sql_query="SELECT studiengang_kz, kurzbz, kurzbzlang, bezeichnung FROM public.tbl_studiengang ORDER BY kurzbz";
|
||||
$result_stg=pg_query($conn, $sql_query);
|
||||
if(!$result_stg)
|
||||
die ("Studiengang not found!");
|
||||
$num_rows_stg=pg_numrows($result_stg);
|
||||
$sql_query="SELECT ort_kurzbz FROM tbl_ort WHERE aktiv AND lehre ORDER BY ort_kurzbz";
|
||||
$result_ort=pg_exec($conn, $sql_query);
|
||||
$sql_query="SELECT ort_kurzbz FROM public.tbl_ort WHERE aktiv AND lehre ORDER BY ort_kurzbz";
|
||||
$result_ort=pg_query($conn, $sql_query);
|
||||
if(!$result_ort)
|
||||
die("ort not found!");
|
||||
$num_rows_ort=pg_numrows($result_ort);
|
||||
$sql_query="SELECT uid, kurzbz FROM vw_lektor ORDER BY kurzbz";
|
||||
$result_lektor=pg_exec($conn, $sql_query);
|
||||
$result_lektor=pg_query($conn, $sql_query);
|
||||
if(!$result_lektor)
|
||||
die("lektor not found!");
|
||||
$num_rows_lektor=pg_numrows($result_lektor);
|
||||
@@ -47,7 +47,7 @@ function MM_jumpMenu(targ,selObj,restore){ //v3.0
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
<link href="../../skin/cis.css" rel="stylesheet" type="text/css">
|
||||
<link href="../../../skin/cis.css" rel="stylesheet" type="text/css">
|
||||
</head>
|
||||
|
||||
<BODY>
|
||||
|
||||
@@ -30,8 +30,8 @@ if (isset($_GET[ver]))
|
||||
$ver=$_GET[ver];
|
||||
if (isset($_GET[grp]))
|
||||
$grp=$_GET[grp];
|
||||
if (isset($_GET[einheit_kurzbz]))
|
||||
$einheit_kurzbz=$_GET[einheit_kurzbz];
|
||||
if (isset($_GET[gruppe_kurzbz]))
|
||||
$gruppe_kurzbz=$_GET[gruppe_kurzbz];
|
||||
|
||||
if (!$conn = @pg_pconnect(CONN_STRING))
|
||||
die('Es konnte keine Verbindung zum Server aufgebaut werden.');
|
||||
@@ -54,7 +54,7 @@ else
|
||||
//if ($grp!='0')
|
||||
// $sql_query.=" AND (gruppe='$grp' OR gruppe IS NULL OR gruppe='0')";
|
||||
}
|
||||
$sql_query.=' ORDER BY unr ASC, stg_kurzbz, vw_stundenplan.semester, verband, gruppe, einheit_kurzbz, uid LIMIT 100';
|
||||
$sql_query.=' ORDER BY unr ASC, stg_kurzbz, vw_stundenplan.semester, verband, gruppe, gruppe_kurzbz, uid LIMIT 100';
|
||||
//echo $sql_query.'<BR>';
|
||||
$erg_stpl=pg_exec($conn, $sql_query);
|
||||
$num_rows_stpl=pg_numrows($erg_stpl);
|
||||
@@ -104,7 +104,7 @@ for ($i=0; $i<$num_rows_stpl; $i++)
|
||||
$semester=pg_result($erg_stpl,$i,"semester");
|
||||
$verband=pg_result($erg_stpl,$i,"verband");
|
||||
$gruppe=pg_result($erg_stpl,$i,"gruppe");
|
||||
$einheit_kurzbz=pg_result($erg_stpl,$i,"einheit_kurzbz");
|
||||
$gruppe_kurzbz=pg_result($erg_stpl,$i,"gruppe_kurzbz");
|
||||
?>
|
||||
<tr class="<?php echo 'liste'.$i%2; ?>">
|
||||
<td><?php echo $unr; ?></td>
|
||||
@@ -114,8 +114,8 @@ for ($i=0; $i<$num_rows_stpl; $i++)
|
||||
<td><?php echo $bezeichnung; ?></td>
|
||||
<td><A href="mailto:<?php echo strtolower($stgkurzbz).$semester.strtolower($verband).$gruppe; ?>@technikum-wien.at">
|
||||
<?php echo $stgkurzbz.'-'.$semester.$verband.$gruppe; ?></A></td>
|
||||
<td><A href="mailto:<?php echo strtolower($einheit_kurzbz); ?>@technikum-wien.at">
|
||||
<?php echo $einheit_kurzbz; ?></A></td>
|
||||
<td><A href="mailto:<?php echo strtolower($gruppe_kurzbz); ?>@technikum-wien.at">
|
||||
<?php echo $gruppe_kurzbz; ?></A></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ $stg_kz=(isset($_GET['stg_kz'])?$_GET['stg_kz']:'');
|
||||
$sem=(isset($_GET['sem'])?$_GET['sem']:'');
|
||||
$ver=(isset($_GET['ver'])?$_GET['ver']:'');
|
||||
$grp=(isset($_GET['grp'])?$_GET['grp']:'');
|
||||
$einheit_kurzbz=(isset($_GET['einheit'])?$_GET['einheit']:'');
|
||||
$gruppe_kurzbz=(isset($_GET['einheit'])?$_GET['einheit']:'');
|
||||
$begin=$_GET['begin'];
|
||||
$ende=$_GET['ende'];
|
||||
$format=$_GET['format'];
|
||||
@@ -151,7 +151,7 @@ $stdplan=new stundenplan($type,$conn);
|
||||
$stdplan->crlf=$crlf;
|
||||
|
||||
// Zusaetzliche Daten laden
|
||||
if (! $stdplan->load_data($type,$pers_uid,$ort_kurzbz,$stg_kz,$sem,$ver,$grp,$einheit_kurzbz) )
|
||||
if (! $stdplan->load_data($type,$pers_uid,$ort_kurzbz,$stg_kz,$sem,$ver,$grp,$gruppe_kurzbz) )
|
||||
{
|
||||
writeCISlog('STOP');
|
||||
die($stdplan->errormsg);
|
||||
@@ -161,8 +161,8 @@ if (! $stdplan->load_data($type,$pers_uid,$ort_kurzbz,$stg_kz,$sem,$ver,$grp,$ei
|
||||
if ($format=='HTML')
|
||||
{
|
||||
if ($type=='verband' || $type=='einheit')
|
||||
if (count($einheit_kurzbz)>0)
|
||||
echo '<H1>Lehrverband: '.$einheit_kurzbz.'</H1>';
|
||||
if (count($gruppe_kurzbz)>0)
|
||||
echo '<H1>Lehrverband: '.$gruppe_kurzbz.'</H1>';
|
||||
else
|
||||
echo '<H1>Lehrverband: '.$stdplan->stg_kurzbzlang.'-'.$sem.$ver.$grp.'</H1>';
|
||||
if ($type=='ort')
|
||||
|
||||
@@ -42,9 +42,9 @@
|
||||
//$ort_kurzbz='EDV6.08';
|
||||
//$datum=1102260015;
|
||||
|
||||
include_once('../config.inc.php');
|
||||
include_once('../../include/functions.inc.php');
|
||||
include_once('../../include/stundenplan.class.php');
|
||||
include_once('../../config.inc.php');
|
||||
include_once('../../../include/functions.inc.php');
|
||||
include_once('../../../include/stundenplan.class.php');
|
||||
|
||||
// Test Einstellungen
|
||||
//if (!isset($REMOTE_USER))
|
||||
@@ -53,7 +53,6 @@ include_once('../../include/stundenplan.class.php');
|
||||
$uid=get_uid();
|
||||
|
||||
|
||||
writeCISlog('START');
|
||||
// Deutsche Umgebung
|
||||
//$loc_de=setlocale(LC_ALL, 'de_AT@euro', 'de_AT','de_DE@euro', 'de_DE');
|
||||
//setlocale(LC_ALL, $loc_de);
|
||||
@@ -106,12 +105,12 @@ else if (isset($_GET['grp']))
|
||||
else
|
||||
$grp=null;
|
||||
|
||||
if (isset($_POST['einheit_kurzbz']))
|
||||
$einheit_kurzbz=$_POST['einheit_kurzbz'];
|
||||
else if (isset($_GET['einheit_kurzbz']))
|
||||
$einheit_kurzbz=$_GET['einheit_kurzbz'];
|
||||
if (isset($_POST['gruppe_kurzbz']))
|
||||
$gruppe_kurzbz=$_POST['gruppe_kurzbz'];
|
||||
else if (isset($_GET['gruppe_kurzbz']))
|
||||
$gruppe_kurzbz=$_GET['gruppe_kurzbz'];
|
||||
else
|
||||
$einheit_kurzbz=null;
|
||||
$gruppe_kurzbz=null;
|
||||
|
||||
if (isset($_POST['user_uid']))
|
||||
$user_uid=$_POST['user_uid'];
|
||||
@@ -125,14 +124,12 @@ if (isset($_POST['titel']))
|
||||
// Verbindungsaufbau
|
||||
if (!$conn = @pg_pconnect(CONN_STRING))
|
||||
{
|
||||
writeCISlog('STOP');
|
||||
die("Es konnte keine Verbindung zum Server aufgebaut werden.");
|
||||
die("Es konnte keine Verbindung zum Server aufgebaut werden.");
|
||||
}
|
||||
|
||||
// Datums Format
|
||||
if(!$erg_std=pg_query($conn, "SET datestyle TO ISO;"))
|
||||
{
|
||||
writeCISlog('STOP');
|
||||
die(pg_last_error($conn));
|
||||
}
|
||||
|
||||
@@ -143,8 +140,7 @@ elseif ($uid=check_lektor(get_uid(), $conn))
|
||||
$user='lektor';
|
||||
else
|
||||
{
|
||||
writeCISlog('STOP');
|
||||
die("Cannot set usertype!");
|
||||
die("Cannot set usertype!");
|
||||
}
|
||||
|
||||
// User bestimmen
|
||||
@@ -157,7 +153,6 @@ if (isset($reserve) && $uid==$user_uid)
|
||||
{
|
||||
if(!$erg_std=pg_query($conn, "SELECT * FROM tbl_stunde ORDER BY stunde"))
|
||||
{
|
||||
writeCISlog('STOP');
|
||||
die(pg_last_error($conn));
|
||||
}
|
||||
$num_rows_std=pg_numrows($erg_std);
|
||||
@@ -177,7 +172,7 @@ if (isset($reserve) && $uid==$user_uid)
|
||||
$query="INSERT INTO tbl_reservierung
|
||||
(datum, uid, ort_kurzbz, stunde, beschreibung, titel, studiengang_kz )
|
||||
VALUES
|
||||
('$datum_res', '$user_uid', '$ort_kurzbz', $stunde, '$beschreibung', '$titel', 0)"; // semester, verband, gruppe, einheit_kurzbz,
|
||||
('$datum_res', '$user_uid', '$ort_kurzbz', $stunde, '$beschreibung', '$titel', 0)"; // semester, verband, gruppe, gruppe_kurzbz,
|
||||
//echo $query;
|
||||
if(!($erg=pg_exec($conn, $query)))
|
||||
echo pg_last_error($conn);
|
||||
@@ -197,33 +192,29 @@ $stdplan->user=$user;
|
||||
$stdplan->user_uid=$uid;
|
||||
|
||||
// Zusaetzliche Daten laden
|
||||
if (! $stdplan->load_data($type,$pers_uid,$ort_kurzbz,$stg_kz,$sem,$ver,$grp,$einheit_kurzbz) )
|
||||
if (! $stdplan->load_data($type,$pers_uid,$ort_kurzbz,$stg_kz,$sem,$ver,$grp,$gruppe_kurzbz) )
|
||||
{
|
||||
writeCISlog('STOP');
|
||||
die($stdplan->errormsg);
|
||||
}
|
||||
//echo 'Datum:'.$datum.'<BR>';
|
||||
// Stundenplan einer Woche laden
|
||||
if (! $stdplan->load_week($datum))
|
||||
{
|
||||
writeCISlog('STOP');
|
||||
die($stdplan->errormsg);
|
||||
}
|
||||
|
||||
// Kopfbereich drucken
|
||||
if (! $stdplan->draw_header())
|
||||
{
|
||||
writeCISlog('STOP');
|
||||
die($stdplan->errormsg);
|
||||
}
|
||||
//echo '<P align="center" style="font-size:xx-large;text-decoration:blink;color:#FF0000;">
|
||||
// Achtung! Stundenplan-Update l?uft!!!</P>';
|
||||
// Achtung! Stundenplan-Update laeuft!!!</P>';
|
||||
// Stundenplan der Woche drucken
|
||||
$stdplan->draw_week($uid);
|
||||
|
||||
if (isset($count))
|
||||
echo "Es wurden $count Stunden reserviert!<BR>";
|
||||
writeCISlog('STOP');
|
||||
?>
|
||||
<HR>
|
||||
<P>Fehler und Feedback bitte an <A href="mailto:lvplan@technikum-wien.at">LV-Koordinationsstelle</A>.</P>
|
||||
|
||||
Reference in New Issue
Block a user