Kartenverwaltung

- Filter für Incoming
- Filter für auf nicht gedruckte Karten
- Anfangsbuchstaben Filter bei Mitarbeiter ist jetzt optional
This commit is contained in:
Andreas Österreicher
2012-08-01 13:58:39 +00:00
parent 81425130e5
commit 824aaa483a
4 changed files with 88 additions and 16 deletions
+5 -3
View File
@@ -1059,9 +1059,11 @@ class mitarbeiter extends benutzer
vorname,nachname,gebdatum,uid,personalnummer,person_id
FROM
campus.vw_mitarbeiter
WHERE
UPPER(SUBSTRING(nachname,1,1))=".$this->db_add_param($filter,FHC_STRING)."
AND aktiv='true'";
WHERE
aktiv='true'";
if($filter!='')
$qry.=" AND UPPER(SUBSTRING(nachname,1,1))=".$this->db_add_param($filter,FHC_STRING);
if($fixangestellt)
$qry.=" AND fixangestellt";
else
+51 -3
View File
@@ -346,9 +346,9 @@ class student extends benutzer
return false;
}
$qry = "SELECT * FROM tbl_student student
JOIN tbl_benutzer ON (student_uid = uid)
JOIN tbl_person USING (person_id)
$qry = "SELECT * FROM public.tbl_student
JOIN public.tbl_benutzer ON (student_uid = uid)
JOIN public.tbl_person USING (person_id)
WHERE tbl_benutzer.aktiv = 'true' AND studiengang_kz =".$this->db_add_param($studiengang_kz,FHC_INTEGER);
if($semester != null)
@@ -692,5 +692,53 @@ class student extends benutzer
}
return true;
}
/**
* Laedt alle Incoming
* @return boolean
*/
public function getIncoming()
{
$qry = "
SELECT
distinct tbl_student.*, tbl_benutzer.*, tbl_person.*
FROM
public.tbl_student
JOIN public.tbl_benutzer ON (student_uid = uid)
JOIN public.tbl_person USING (person_id)
JOIN public.tbl_prestudent USING (prestudent_id)
JOIN public.tbl_prestudentstatus USING(prestudent_id)
WHERE
tbl_benutzer.aktiv AND
tbl_prestudentstatus.status_kurzbz='Incoming'
";
if($result = $this->db_query($qry))
{
while($row = $this->db_fetch_object($result))
{
$stud = new student();
$stud->uid = $row->student_uid;
$stud->matrikelnr = $row->matrikelnr;
$stud->prestudent_id = $row->prestudent_id;
$stud->studiengang_kz = $row->studiengang_kz;
$stud->semester = $row->semester;
$stud->verband = $row->verband;
$stud->gruppe = $row->gruppe;
$stud->person_id = $row->person_id;
$stud->vorname = $row->vorname;
$stud->nachname = $row->nachname;
$stud->gebdatum = $row->gebdatum;
$this->result[] = $stud;
}
return true;
}
else
{
$this->errormsg = "Fehler bei der Abfrage aufgetreten";
return false;
}
}
}
?>
+1 -1
View File
@@ -172,7 +172,7 @@ xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:off
<draw:frame text:anchor-type="paragraph" draw:z-index="{$idx}4" draw:style-name="gr1" draw:text-style-name="P7" svg:width="5.79cm" svg:height="0.3cm" svg:x="2.7cm" svg:y="3.85cm">
<draw:text-box>
<text:p text:style-name="P7">
<text:span text:style-name="T1">Matr.-Nr.<xsl:value-of select="matrikelnummer"/></text:span>
<text:span text:style-name="T1">Matr.-Nr. <xsl:value-of select="matrikelnummer"/></text:span>
</text:p>
</draw:text-box>
</draw:frame>
+31 -9
View File
@@ -86,7 +86,10 @@ echo '<body>
<table border="0">
<tr>
<td>Studiengang:</td>
<td><select name="select_studiengang">';
<td><select name="select_studiengang">
<option value="incoming">Incoming</option>
';
foreach($studiengang->result as $stud)
{
if($stud->studiengang_kz < '10000')
@@ -107,7 +110,8 @@ echo' </select>
{
echo '<option value="'.$foto->fotostatus_kurzbz.'" '.($statusStudent==$foto->fotostatus_kurzbz?'selected':'').'>'.ucfirst($foto->fotostatus_kurzbz).'</option>';
}
echo' <option value="nichtGedruckt" '.($statusStudent=='nichtGedruckt'?'selected':'').'>Akzeptiert und nicht gedruckt</option>
echo' <option value="nichtGedrucktAkzept" '.($statusStudent=='nichtGedrucktAkzept'?'selected':'').'>Akzeptiert und nicht gedruckt</option>
<option value="nichtGedruckt" '.($statusStudent=='nichtGedruckt'?'selected':'').'>nicht gedruckt</option>
<option value="gedrucktNichtAusgegeben" '.($statusStudent=='gedrucktNichtAusgegeben'?'selected':'').'>Gedruckt nicht ausgegeben</option>
</select></td>
<td><input name="btn_submitStudent" type="submit" value="Anzeigen"></td>
@@ -124,11 +128,12 @@ echo' <option value="nichtGedruckt" '.($statusStudent=='nichtGedruckt'
<tr>
<td>Typ:</td>
<td><select name="select_typ_mitarbeiter">
<option value="intern" '.($typMitarbeiter=='intern'?'selected':'').'>Intern</option>
<option value="extern" '.($typMitarbeiter=='extern'?'selected':'').'>Extern</option>
<option value="intern" '.($typMitarbeiter=='intern'?'selected':'').'>Fixangestellte</option>
<option value="extern" '.($typMitarbeiter=='extern'?'selected':'').'>Externe mit Lehrauftrag in letzten 3 Sem.</option>
</select>
<td>Anfangsbuchstabe:</td>
<td><select name="select_buchstabe">';
<td><select name="select_buchstabe">
<option value="">*</option>';
foreach($buchstabenArray as $b)
{
echo '<option value="'.$b.'" '.($b==$buchstabe?'selected':'').'>'.$b.'</option>';
@@ -159,7 +164,10 @@ if(isset($_REQUEST['btn_submitStudent']))
$studenten = new student();
$studenten->getStudentsStudiengang($studiengang_kz, $semester);
if($studiengang_kz=='incoming')
$studenten->getIncoming();
else
$studenten->getStudentsStudiengang($studiengang_kz, $semester);
$studentenArray = $studenten->result;
// $studentenArray = $studenten->getStudents($studiengang_kz,$semester,null,null,null,'WS2011');
@@ -182,7 +190,7 @@ if(isset($_REQUEST['btn_submitStudent']))
// Wenn letzter Status nich Student ist -> nicht anzeigen
$prestudent = new prestudent();
$prestudent->getLastStatus($stud->prestudent_id);
if($prestudent->status_kurzbz == 'Student')
if($prestudent->status_kurzbz == 'Student' || ($studiengang_kz=='incoming' && $prestudent->status_kurzbz='Incoming'))
{
if($statusStudent=='gedrucktNichtAusgegeben')
{
@@ -198,7 +206,7 @@ if(isset($_REQUEST['btn_submitStudent']))
$uids.=';'.$stud->uid;
}
}
else if($statusStudent == 'nichtGedruckt')
else if($statusStudent == 'nichtGedrucktAkzept')
{
// akzeptiert und nicht gedruckt
$fotostatus = new fotostatus();
@@ -211,6 +219,20 @@ if(isset($_REQUEST['btn_submitStudent']))
echo '<tr><td>'.$stud->nachname.' '.$stud->vorname.'</td><td>'.$stud->gebdatum.'</td><td>'.$stud->matrikelnr.'</td><td>'.$stud->uid.'</td><td>'.$stud->person_id.'<input type="hidden" name="users[]" value="'.$stud->uid.'"></td></tr>';
$uids.=';'.$stud->uid;
}
}
else if($statusStudent == 'nichtGedruckt')
{
// akzeptiert und nicht gedruckt
$fotostatus = new fotostatus();
$fotostatus->getLastFotoStatus($stud->person_id);
$betriebsmittel = new betriebsmittel();
// noch nicht gedruckt
if($betriebsmittel->zutrittskartePrinted($stud->uid) == false)
{
echo '<tr><td>'.$stud->nachname.' '.$stud->vorname.' ('.$fotostatus->fotostatus_kurzbz.')</td><td>'.$stud->gebdatum.'</td><td>'.$stud->matrikelnr.'</td><td>'.$stud->uid.'</td><td>'.$stud->person_id.'<input type="hidden" name="users[]" value="'.$stud->uid.'"></td></tr>';
$uids.=';'.$stud->uid;
}
}
else
{
@@ -317,7 +339,7 @@ if(isset($_REQUEST['btn_submitMitarbeiter']))
</table>
<table>
<tr>
<td><input type="submit" value="Karten zuteilen" name="btn_kartezuteilenMitarbeiter"><input type="button" value="Karten drucken" onclick=\'window.open("../../content/zutrittskarte.php?data='.$uids.'");\'></td>
<td><input type="submit" value="Karten zuteilen" name="btn_kartezuteilenMitarbeiter">&nbsp;<input type="button" value="Karten drucken" onclick=\'window.open("../../content/zutrittskarte.php?data='.$uids.'");\'></td>
</tr>
</table>
</form>