mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-19 16:02:15 +00:00
buttons über klasse
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
require_once('../config.inc.php');
|
||||
require_once('../../include/functions.inc.php');
|
||||
if (!$conn = @pg_pconnect(CONN_STRING))
|
||||
if (!$conn = @pg_pconnect(CONN_STRING))
|
||||
die('Es konnte keine Verbindung zum Server aufgebaut werden.');
|
||||
|
||||
if(isset($_GET['uid']) && isset($_GET['del']))
|
||||
@@ -12,20 +12,20 @@
|
||||
// echo "Fehler beim löschen: möglicherweise besteht noch eine Referenz zu einer anderen Tabelle<br>";
|
||||
echo 'Loeschen noch nicht implementiert';
|
||||
}
|
||||
|
||||
|
||||
if(isset($_GET['fix']) && isset($_GET['uid']))
|
||||
{
|
||||
$sql_query = "UPDATE public.tbl_mitarbeiter SET fixangestellt=". ($_GET['fix']=='t'?'false':'true') ." WHERE mitarbeiter_uid='".addslashes($_GET['uid'])."'";
|
||||
//echo $sql_query;
|
||||
pg_query($conn,$sql_query);
|
||||
pg_query($conn,$sql_query);
|
||||
}
|
||||
|
||||
|
||||
if(isset($_GET['lek']) && isset($_GET['uid']))
|
||||
{
|
||||
$sql_query = "UPDATE public.tbl_mitarbeiter SET lektor=". ($_GET['lek']=='t'?'false':'true') ." WHERE mitarbeiter_uid='".addslashes($_GET['uid'])."'";
|
||||
//echo $sql_query;
|
||||
pg_query($conn,$sql_query);
|
||||
}
|
||||
}
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
@@ -50,9 +50,9 @@ function confdel()
|
||||
$qry = "SELECT * FROM campus.vw_mitarbeiter";
|
||||
if(isset($order))
|
||||
$qry .= " ORDER BY $order";
|
||||
else
|
||||
else
|
||||
$qry .= " ORDER BY nachname, vorname";
|
||||
|
||||
|
||||
if($result = pg_query($conn, $qry))
|
||||
{
|
||||
echo "<table class='liste'>";
|
||||
@@ -65,36 +65,36 @@ function confdel()
|
||||
echo "<td nowrap>".$row->uid."<a name='anker1'></a></td>";
|
||||
else
|
||||
echo "<td nowrap>".$row->uid."</td>";
|
||||
|
||||
|
||||
echo "<td nowrap>".$row->titelpre."</td>";
|
||||
echo "<td nowrap>".$row->vorname."</td>";
|
||||
echo "<td nowrap>".$row->nachname."</td>";
|
||||
echo "<td nowrap><a href='lektor_uebersicht.php?uid=".$row->uid."&fix=".$row->fixangestellt . (isset($order)?'&order='.$order:'') ."'><img src='../../skin/images/".($row->fixangestellt=='t'?'true':'false').".gif'></a></td>";
|
||||
echo "<td nowrap><a href='lektor_uebersicht.php?uid=".$row->uid."&lek=".$row->lektor . (isset($order)?'&order='.$order:'') ."'><img src='../../skin/images/".($row->lektor=='t'?'true':'false').".gif'></a></td>";
|
||||
|
||||
|
||||
echo "<td nowrap>".$row->ort_kurzbz."</td>";
|
||||
echo "<td nowrap>".$row->standort_kurzbz."</td>";
|
||||
echo "<td nowrap>".$row->telefonklappe."</td>";
|
||||
//echo "<td nowrap><a href='#' onClick='javascript:document.form1.uid=".$lektoren[$i]->uid.";document.form1.fix=".$lektoren[$i]->fixangestellt .";document.form1.order=". (isset($order)?$order:'') .";'><img src='../../skin/images/".$lektoren[$i]->fixangestellt.".gif'></a></td>";
|
||||
//echo "<td nowrap><a href='#' onClick='javascript:document.form1.uid=".$lektoren[$i]->uid.";document.form1.fix=".$lektoren[$i]->fixangestellt .";document.form1.order=". (isset($order)?$order:'') .";'lek=".$lektoren[$i]->lektor . (isset($order)?'&order='.$order:'') ."'><img src='../../skin/images/".$lektoren[$i]->lektor.".gif'></a></td>";
|
||||
|
||||
$email=$row->uid.'@technikum-wien.at';
|
||||
|
||||
$email=$row->uid.'@technikum-wien.at';
|
||||
echo "<td nowrap><a href='mailto:$email'>$email</a></td>";
|
||||
echo "<td nowrap><a href='lektor_edit.php?id=".$row->uid."' class='linkblue'>Edit</a></td>";
|
||||
echo "<td nowrap>";
|
||||
echo "<td nowrap class='button'><a href='lektor_edit.php?id=".$row->uid."'>Edit</a></td>";
|
||||
echo "<td nowrap class='button'>";
|
||||
if ($row->lektor)
|
||||
{
|
||||
echo "<a href='zeitwunsch.php?uid=".$row->uid."&vorname=".rawurlencode($row->vorname)."&nachname=".rawurlencode($row->nachname)."&titel=".rawurlencode($row->titelpre)." class='linkblue'>Zeitwunsch</a>";
|
||||
}
|
||||
echo "</td>";
|
||||
echo "<td nowrap><a href='lektor_uebersicht.php?del=1&uid=".$row->uid."' class='linkblue' onClick='javascript: return confdel();'>Delete</a></td>";
|
||||
echo "<td nowrap class='button'><a href='lektor_uebersicht.php?del=1&uid=".$row->uid."' onClick='javascript: return confdel();'>Delete</a></td>";
|
||||
echo "</tr>";
|
||||
}
|
||||
echo "</table>";
|
||||
}
|
||||
else
|
||||
else
|
||||
echo "Fehler beim laden der Mitarbeiter: ".pg_errormessage($conn);
|
||||
|
||||
|
||||
if(isset($_GET['fix']) || isset($_GET['lek'])) //Zum Anker hüpfen
|
||||
{
|
||||
echo "<script language='JavaScript'>this.location.hash='#anker1'</script>";
|
||||
|
||||
Reference in New Issue
Block a user