mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-01 12:19:28 +00:00
Merge branch 'master' into bug-17990/personendetails_homeoffice_adresse
This commit is contained in:
@@ -675,12 +675,12 @@ if(isset($_POST['save']))
|
||||
$nachname_clean = str_replace(' ','_', $nachname_clean);
|
||||
$vorname_clean = str_replace(' ','_', $vorname_clean);
|
||||
|
||||
if (!preg_match('/^[a-z0-9-_]{3,32}$/i', $vorname_clean))
|
||||
if (!preg_match('/^[a-z0-9-_]{2,32}$/i', $vorname_clean))
|
||||
{
|
||||
$error = true;
|
||||
$errormsg = 'Im Vornamen dürfen keine Trennzeichen außer - enthalten sein!';
|
||||
}
|
||||
if (!preg_match('/^[a-z0-9-_]{4,32}$/i', $nachname_clean))
|
||||
if (!preg_match('/^[a-z0-9-_]{2,32}$/i', $nachname_clean))
|
||||
{
|
||||
$error = true;
|
||||
$errormsg = 'Im Nachnamen dürfen keine Trennzeichen außer - enthalten sein!';
|
||||
|
||||
@@ -1,189 +0,0 @@
|
||||
<?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 >
|
||||
* Rudolf Hangl < rudolf.hangl@technikum-wien.at >
|
||||
* Gerald Simane-Sequens < gerald.simane-sequens@technikum-wien.at >
|
||||
*/
|
||||
|
||||
require_once('../../config/vilesci.config.inc.php');
|
||||
require_once('../../include/basis_db.class.php');
|
||||
if (!$db = new basis_db())
|
||||
die('Es konnte keine Verbindung zum Server aufgebaut werden.');
|
||||
|
||||
include('../../include/functions.inc.php');
|
||||
|
||||
foreach ($_REQUEST as $key => $value)
|
||||
{
|
||||
$key=$value;
|
||||
}
|
||||
|
||||
$type=(isset($_REQUEST['type'])?$_REQUEST['type']:'');
|
||||
|
||||
if ($type=='new')
|
||||
{
|
||||
$sql_query="INSERT INTO lektorzuteilung (lektor_id, lehrfach_id, stg_id, semester) VALUES ($lektorid,$lehrfachid,$stgid,$semester)";
|
||||
//echo $sql_query;
|
||||
if(!($result=$db->db_query($sql_query)))
|
||||
die($db->db_last_error());
|
||||
}
|
||||
|
||||
if ($type=='del')
|
||||
{
|
||||
$sql_query="DELETE FROM lektorzuteilung WHERE id=$id";
|
||||
//echo $sql_query;
|
||||
if(!($result=$db->db_query($sql_query)))
|
||||
die($db->db_last_error());
|
||||
}
|
||||
|
||||
// Daten für Lektorenauswahl
|
||||
$sql_query="SELECT id, nachname, vornamen, uid FROM lektor ORDER BY upper(nachname), vornamen, uid";
|
||||
if(!($result_lektor=$db->db_query($sql_query)))
|
||||
die($db->db_last_error());
|
||||
|
||||
|
||||
// Daten für Lehrfachauswahl
|
||||
$sql_query="SELECT id, kurzbz, bezeichnung FROM lehrfach ORDER BY kurzbz";
|
||||
if(!($result_lehrfach=$db->db_query($sql_query)))
|
||||
die($db->db_last_error());
|
||||
|
||||
|
||||
// Daten für Studiengang
|
||||
$sql_query="SELECT id, kurzbz, bezeichnung FROM studiengang ORDER BY kurzbz";
|
||||
if(!($result_stg=$db->db_query($sql_query)))
|
||||
die($db->db_last_error());
|
||||
|
||||
// Daten für die Zuteilungen
|
||||
if (!isset($order))
|
||||
$order='upper(nachname), vornamen, uid';
|
||||
$sql_query="SELECT lektorzuteilung.id, nachname, nachname, vornamen, uid, lehrfach.kurzbz AS lfkurzbz, studiengang.kurzbz AS stgkurzbz, semester";
|
||||
$sql_query.=" FROM lektorzuteilung, lektor, lehrfach, studiengang WHERE lektorzuteilung.lektor_id=lektor.id";
|
||||
$sql_query.=" AND lektorzuteilung.lehrfach_id=lehrfach.id AND lektorzuteilung.stg_id=studiengang.id ORDER BY $order";
|
||||
//echo $sql_query;
|
||||
if(!($erg=$db->db_query($sql_query)))
|
||||
die($db->db_last_error());
|
||||
$num_rows=$db->db_num_rows($erg);
|
||||
|
||||
|
||||
|
||||
$cfgBorder=1;
|
||||
$cfgThBgcolor='#CCCCCC';
|
||||
|
||||
$cfgBgcolorOne='#F4F4F4';
|
||||
$cfgBgcolorTwo='#FEFFE6';
|
||||
|
||||
?>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>Zuteilung der Lektoren</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<!--<link rel="stylesheet" href="../../include/styles.css" type="text/css"> -->
|
||||
<LINK rel="stylesheet" href="../../skin/vilesci.css" type="text/css">
|
||||
</head>
|
||||
|
||||
<body class="background_main">
|
||||
<h2>Lektoren - Lehrfach Zuteilung</h2>
|
||||
Anzahl:
|
||||
<?php echo $num_rows; ?>
|
||||
<br>
|
||||
<br>
|
||||
<table border="<?php echo $cfgBorder;?>">
|
||||
<tr bgcolor="<?php echo $cfgThBgcolor; ?>">
|
||||
<th></th><th>Nachname</th><th>Vornamen</th>
|
||||
<th>uid</th>
|
||||
<th>Lehrfach</th>
|
||||
<th>Studiengang</th>
|
||||
<th>Semester</th></tr>
|
||||
<?php
|
||||
for ($i=0; $i<$num_rows; $i++)
|
||||
{
|
||||
$bgcolor = $cfgBgcolorOne;
|
||||
$i % 2 ? 0: $bgcolor = $cfgBgcolorTwo;
|
||||
|
||||
$row=$db->db_fetch_object ($erg, $i);
|
||||
|
||||
?>
|
||||
<tr bgcolor=<?php echo $bgcolor; ?>>
|
||||
<td><a href="lektorzuteilung_edit.php?id=<?php echo $row->id.'&type=del'; ?>" class="linkblue">Delete</a></td>
|
||||
<td><?php echo $row->nachname; ?></td>
|
||||
<td><?php echo $row->vornamen; ?></td>
|
||||
<td><A href="mailto:<?php echo $row->uid; ?>@technikum-wien.at" class="linkgreen"><?php echo $row->uid; ?></A></td>
|
||||
<td><?php echo $row->lfkurzbz; ?></td>
|
||||
<td><?php echo $row->stgkurzbz; ?></td>
|
||||
<td><?php echo $row->semester; ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
<FORM name="newpers" method="post" action="lektorzuteilung_edit.php">
|
||||
<INPUT type="hidden" name="type" value="new">
|
||||
Lektor:
|
||||
<SELECT name="lektorid">
|
||||
<?php
|
||||
// Auswahl des Lektors
|
||||
$num_rows=$db->db_num_rows($result_lektor);
|
||||
for ($i=0;$i<$num_rows;$i++)
|
||||
{
|
||||
$row=$db->db_fetch_object ($result_lektor, $i);
|
||||
echo "<option value=\"$row->id\">$row->nachname $row->vornamen - $row->uid</option>";
|
||||
}
|
||||
?>
|
||||
</SELECT>
|
||||
<BR>
|
||||
Lehrfach:
|
||||
<SELECT name="lehrfachid">
|
||||
<?php
|
||||
// Auswahl des Lehrfach
|
||||
$num_rows=$db->db_num_rows($result_lehrfach);
|
||||
for ($i=0;$i<$num_rows;$i++)
|
||||
{
|
||||
$row=$db->db_fetch_object ($result_lehrfach, $i);
|
||||
echo "<option value=\"$row->id\">$row->kurzbz - $row->bezeichnung</option>";
|
||||
}
|
||||
?>
|
||||
</SELECT>
|
||||
<BR>
|
||||
Studiengang:
|
||||
<SELECT name="stgid">
|
||||
<?php
|
||||
// Auswahl des Lektors
|
||||
$num_rows=$db->db_num_rows($result_stg);
|
||||
for ($i=0;$i<$num_rows;$i++)
|
||||
{
|
||||
$row=$db->db_fetch_object ($result_stg, $i);
|
||||
echo "<option value=\"$row->id\">$row->kurzbz - $row->bezeichnung</option>";
|
||||
}
|
||||
?>
|
||||
</SELECT>
|
||||
Semester:
|
||||
<SELECT name="semester">
|
||||
<option value="1">1</option>
|
||||
<option value="2">2</option>
|
||||
<option value="3">3</option>
|
||||
<option value="4">4</option>
|
||||
<option value="5">5</option>
|
||||
<option value="6">6</option>
|
||||
<option value="7">7</option>
|
||||
<option value="8">8</option>
|
||||
</SELECT>
|
||||
<INPUT type="submit" name="Abschicken" value="Hinzufügen">
|
||||
</FORM>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,82 +0,0 @@
|
||||
<?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 >
|
||||
* Rudolf Hangl < rudolf.hangl@technikum-wien.at >
|
||||
* Gerald Simane-Sequens < gerald.simane-sequens@technikum-wien.at >
|
||||
*/
|
||||
|
||||
require_once('../../config/vilesci.config.inc.php');
|
||||
require_once('../../include/basis_db.class.php');
|
||||
if (!$db = new basis_db())
|
||||
die('Es konnte keine Verbindung zum Server aufgebaut werden.');
|
||||
|
||||
include('../../include/functions.inc.php');
|
||||
|
||||
|
||||
if(!($erg_std=$db->db_query("SELECT * FROM stunde ORDER BY id")))
|
||||
die($db->db_last_error());
|
||||
$num_rows_std=$db->db_num_rows($erg_std);
|
||||
for ($t=1;$t<7;$t++)
|
||||
for ($i=0;$i<$num_rows_std;$i++)
|
||||
{
|
||||
$var='wunsch'.$t.'_'.$i;
|
||||
//echo $$var;
|
||||
$gewicht=$$var;
|
||||
$stunde=$i+1;
|
||||
$query="SELECT * FROM zeitwunsch WHERE lektor_id=$lkid AND stunde_id=$stunde AND tag=$t";
|
||||
if(!($erg_wunsch=$db->db_query($query)))
|
||||
die($db->db_last_error());
|
||||
$num_rows_wunsch=$db->db_num_rows($erg_wunsch);
|
||||
if ($num_rows_wunsch==0)
|
||||
{
|
||||
$query="INSERT INTO zeitwunsch (lektor_id, stunde_id, tag, gewicht) VALUES ($lkid, $stunde, $t, $gewicht)";
|
||||
if(!($erg=$db->db_query($query)))
|
||||
die($db->db_last_error());
|
||||
}
|
||||
elseif ($num_rows_wunsch==1)
|
||||
{
|
||||
$id=$db->db_result($erg_wunsch,0,"id");
|
||||
$query="UPDATE zeitwunsch SET lektor_id=$lkid, stunde_id=$stunde, tag=$t, gewicht=$gewicht WHERE id=$id";
|
||||
if(!($erg=$db->db_query($query)))
|
||||
die($db->db_last_error());
|
||||
}
|
||||
else
|
||||
die("Zuviele Eintraege fuer!");
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>Profil</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<link rel="stylesheet" href="../../include/styles.css" type="text/css">
|
||||
<META http-equiv="refresh" content="2;URL=zeitwunsch.php?lkid=<?php echo $lkid.'&vornamen='.$vornamen.'&nachname='.$nachname.'&titel='.$titel; ?>">
|
||||
</head>
|
||||
|
||||
<body class="background_main">
|
||||
<h4>Zeitwünsche von
|
||||
<?php echo $titel.' '.$vornamen.' '.$nachname; ?>
|
||||
sind aktualisiert!</h4>
|
||||
<A href="zeitwunsch.php?lkid=<?php echo $lkid.'&vornamen='.$vornamen.'&nachname='.$nachname.'&titel='.$titel; ?>"><<
|
||||
Zurück</A><br>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user