bootstrapping
parent
a537f4bf73
commit
e050c0dc7f
@ -1,191 +1,167 @@
|
||||
<?php
|
||||
require_once ('../bootstrap.php');
|
||||
|
||||
$title = "Räume";
|
||||
$header = "Verwaltung der Räume";
|
||||
include ("../../../camp2011/includes/header.php");
|
||||
include("../../../camp2011/includes/funktion_db.php");
|
||||
|
||||
function runSQL( $SQL)
|
||||
{
|
||||
global $con;
|
||||
// hier muesste das SQL ausgefuehrt werden...
|
||||
$Erg = mysql_query($SQL, $con);
|
||||
if ($Erg)
|
||||
{
|
||||
echo "Änderung wurde gesichert...<br />";
|
||||
echo "[$SQL]<br />";
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "Fehler beim speichern... bitte noch ein mal probieren :)";
|
||||
echo "<br /><br />".mysql_error( $con ). "<br />";
|
||||
echo "[$SQL]<br />";
|
||||
return 0;
|
||||
}
|
||||
include ("includes/header.php");
|
||||
include ("includes/funktion_db.php");
|
||||
|
||||
function runSQL($SQL) {
|
||||
global $con;
|
||||
// hier muesste das SQL ausgefuehrt werden...
|
||||
$Erg = mysql_query($SQL, $con);
|
||||
if ($Erg) {
|
||||
echo "Änderung wurde gesichert...<br />";
|
||||
echo "[$SQL]<br />";
|
||||
return 1;
|
||||
} else {
|
||||
echo "Fehler beim speichern... bitte noch ein mal probieren :)";
|
||||
echo "<br /><br />" . mysql_error($con) . "<br />";
|
||||
echo "[$SQL]<br />";
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
function runSQL_log( $SQL, $commed)
|
||||
{
|
||||
global $con;
|
||||
// hier muesste das SQL ausgefuehrt werden...
|
||||
$Erg = db_query($SQL, $commed);
|
||||
if ($Erg)
|
||||
{
|
||||
echo "Änderung wurde gesichert...<br />";
|
||||
echo "[$SQL]<br />";
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "Fehler beim speichern... bitte noch ein mal probieren :)";
|
||||
echo "<br /><br />".mysql_error( $con ). "<br />";
|
||||
echo "[$SQL]<br />";
|
||||
return 0;
|
||||
}
|
||||
function runSQL_log($SQL, $commed) {
|
||||
global $con;
|
||||
// hier muesste das SQL ausgefuehrt werden...
|
||||
$Erg = db_query($SQL, $commed);
|
||||
if ($Erg) {
|
||||
echo "Änderung wurde gesichert...<br />";
|
||||
echo "[$SQL]<br />";
|
||||
return 1;
|
||||
} else {
|
||||
echo "Fehler beim speichern... bitte noch ein mal probieren :)";
|
||||
echo "<br /><br />" . mysql_error($con) . "<br />";
|
||||
echo "[$SQL]<br />";
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
$Sql = "SELECT * FROM `EngelType` ORDER BY `NAME`";
|
||||
$Erg = mysql_query($Sql, $con);
|
||||
|
||||
if( !IsSet($_GET["action"]) )
|
||||
{
|
||||
echo "Hallo ".$_SESSION['Nick'].
|
||||
",<br />\nhier hast du die Möglichkeit, neue Engeltypen für die Schichtpläne einzutragen ".
|
||||
"oder vorhandene abzuändern:<br /><br />\n";
|
||||
|
||||
echo "<a href=\"./EngelType.php?action=new\">- Neuen EngelType eintragen</a><br />\n";
|
||||
|
||||
echo "<table width=\"100%\" class=\"border\" cellpadding=\"2\" cellspacing=\"1\">\n";
|
||||
echo "<tr class=\"contenttopic\">\n";
|
||||
|
||||
for( $i = 1; $i < mysql_num_fields($Erg); $i++ )
|
||||
{
|
||||
echo "\t<td>". mysql_field_name($Erg, $i). "</td>";
|
||||
}
|
||||
echo "\t<td>Ändern</td>";
|
||||
echo "</tr>";
|
||||
|
||||
for( $t = 0; $t < mysql_num_rows($Erg); $t++ )
|
||||
{
|
||||
echo "\t<tr class=\"content\">\n";
|
||||
for ($j = 1; $j < mysql_num_fields($Erg); $j++)
|
||||
{
|
||||
echo "\t\t<td>".mysql_result($Erg, $t, $j)."</td>\n";
|
||||
}
|
||||
echo "\t\t<td><a href=\"./EngelType.php?action=change&TID=".mysql_result($Erg, $t, "TID")."\">###</a></td>\n";
|
||||
echo "\t</tr>\n";
|
||||
} // ende Auflistung Raeume
|
||||
echo "</table>";
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
switch ($_GET["action"]) {
|
||||
|
||||
case 'new':
|
||||
echo "Neuen EngelType einrichten: <br />";
|
||||
echo "<form action=\"./EngelType.php\" method=\"GET\">\n";
|
||||
echo "<table>\n";
|
||||
|
||||
for( $Uj = 1; $Uj < mysql_num_fields($Erg); $Uj++ )
|
||||
{
|
||||
echo "<td>".mysql_field_name($Erg, $Uj)."</td>".
|
||||
"<td><input type=\"text\" size=\"40\" name=\"".mysql_field_name($Erg, $Uj)."\"></td></tr>\n";
|
||||
}
|
||||
echo "</table>\n";
|
||||
echo "<input type=\"hidden\" name=\"action\" value=\"newsave\">\n";
|
||||
echo "<input type=\"submit\" value=\"sichern...\">\n";
|
||||
echo "</form>";
|
||||
break;
|
||||
|
||||
case 'newsave':
|
||||
$vars = $_GET;
|
||||
$count = count($vars) - 1;
|
||||
$vars = array_splice($vars, 0, $count);
|
||||
$Keys="";
|
||||
$Values="";
|
||||
foreach($vars as $key => $value){
|
||||
$Keys .= ", `$key`";
|
||||
$Values .= ", '$value'";
|
||||
}
|
||||
|
||||
if( runSQL_log( "INSERT INTO `EngelType` (". substr($Keys, 2). ") VALUES (". substr($Values, 2). ")",
|
||||
"save new EngelType") )
|
||||
{
|
||||
SetHeaderGo2Back();
|
||||
|
||||
$SQL2 = "SELECT * FROM `EngelType` WHERE `Name`='". $_GET["Name"]. "'";
|
||||
$ERG = mysql_query($SQL2, $con);
|
||||
|
||||
if( mysql_num_rows($ERG) == 1)
|
||||
runSQL_log( "ALTER TABLE `Room` ADD `DEFAULT_EID_". mysql_result( $ERG, 0, 0).
|
||||
"` INT DEFAULT '0' NOT NULL;",
|
||||
"add new EngelType in Romm Table");
|
||||
}
|
||||
break;
|
||||
|
||||
case 'change':
|
||||
if (! IsSet($_GET["TID"]))
|
||||
echo "Fehlerhafter Aufruf!";
|
||||
else
|
||||
{
|
||||
echo "Raum abändern:\n";
|
||||
echo "Hier kannst du eintragen, den EngelType ändern.";
|
||||
echo "<form action=\"./EngelType.php\" method=\"GET\">\n";
|
||||
echo "<table>\n";
|
||||
|
||||
$SQL2 = "SELECT * FROM `EngelType` WHERE `TID`='". $_GET["TID"]. "'";
|
||||
$ERG = mysql_query($SQL2, $con);
|
||||
|
||||
for ($Uj = 1; $Uj < mysql_num_fields($ERG); $Uj++)
|
||||
echo "<tr><td>". mysql_field_name($ERG, $Uj). "</td>".
|
||||
"<td><input type=\"text\" size=\"40\" name=\"e". mysql_field_name($ERG, $Uj). "\" ".
|
||||
"value=\"". mysql_result($ERG, 0, $Uj). "\"></td></tr>\n";
|
||||
|
||||
echo "</table>\n";
|
||||
echo "<input type=\"hidden\" name=\"eTID\" value=\"". $_GET["TID"]. "\">\n";
|
||||
echo "<input type=\"hidden\" name=\"action\" value=\"changesave\">\n";
|
||||
echo "<input type=\"submit\" value=\"sichern...\">\n";
|
||||
echo "</form>";
|
||||
echo "<form action=\"./EngelType.php\" method=\"GET\">\n";
|
||||
echo "<input type=\"hidden\" name=\"TID\" value=\"". $_GET["TID"]. "\">\n";
|
||||
echo "<input type=\"hidden\" name=\"action\" value=\"delete\">\n";
|
||||
echo "<input type=\"submit\" value=\"Löschen...\">";
|
||||
echo "</form>";
|
||||
}
|
||||
break;
|
||||
|
||||
case 'changesave':
|
||||
$vars = $_GET;
|
||||
$count = count($vars) - 2;
|
||||
$vars = array_splice($vars, 0, $count);
|
||||
$keys="";
|
||||
$sql="";
|
||||
foreach($vars as $key => $value)
|
||||
{
|
||||
$keys = substr( $key, 1);
|
||||
$sql .= ", `". $keys. "`='". $value. "'";
|
||||
}
|
||||
runSQL_log( "UPDATE `EngelType` SET ". substr($sql, 2). " WHERE `TID`='". $_GET["eTID"]. "'",
|
||||
"Save Change EngelType");
|
||||
SetHeaderGo2Back();
|
||||
break;
|
||||
|
||||
case 'delete':
|
||||
if (IsSet($_GET["TID"]))
|
||||
{
|
||||
if( runSQL_log( "DELETE FROM `EngelType` WHERE `TID`='". $_GET["TID"]. "'", "delete EngelType"))
|
||||
runSQL_log( "ALTER TABLE `Room` DROP `DEFAULT_EID_". $_GET["TID"]. "`;",
|
||||
"delete EngelType in Room Table");
|
||||
}
|
||||
else
|
||||
echo "Fehlerhafter Aufruf";
|
||||
SetHeaderGo2Back();
|
||||
break;
|
||||
}
|
||||
if (!IsSet ($_GET["action"])) {
|
||||
echo "Hallo " . $_SESSION['Nick'] .
|
||||
",<br />\nhier hast du die Möglichkeit, neue Engeltypen für die Schichtpläne einzutragen " .
|
||||
"oder vorhandene abzuändern:<br /><br />\n";
|
||||
|
||||
echo "<a href=\"./EngelType.php?action=new\">- Neuen EngelType eintragen</a><br />\n";
|
||||
|
||||
echo "<table width=\"100%\" class=\"border\" cellpadding=\"2\" cellspacing=\"1\">\n";
|
||||
echo "<tr class=\"contenttopic\">\n";
|
||||
|
||||
for ($i = 1; $i < mysql_num_fields($Erg); $i++) {
|
||||
echo "\t<td>" . mysql_field_name($Erg, $i) . "</td>";
|
||||
}
|
||||
echo "\t<td>Ändern</td>";
|
||||
echo "</tr>";
|
||||
|
||||
for ($t = 0; $t < mysql_num_rows($Erg); $t++) {
|
||||
echo "\t<tr class=\"content\">\n";
|
||||
for ($j = 1; $j < mysql_num_fields($Erg); $j++) {
|
||||
echo "\t\t<td>" . mysql_result($Erg, $t, $j) . "</td>\n";
|
||||
}
|
||||
echo "\t\t<td><a href=\"./EngelType.php?action=change&TID=" . mysql_result($Erg, $t, "TID") . "\">###</a></td>\n";
|
||||
echo "\t</tr>\n";
|
||||
} // ende Auflistung Raeume
|
||||
echo "</table>";
|
||||
} else {
|
||||
|
||||
switch ($_GET["action"]) {
|
||||
|
||||
case 'new' :
|
||||
echo "Neuen EngelType einrichten: <br />";
|
||||
echo "<form action=\"./EngelType.php\" method=\"GET\">\n";
|
||||
echo "<table>\n";
|
||||
|
||||
for ($Uj = 1; $Uj < mysql_num_fields($Erg); $Uj++) {
|
||||
echo "<td>" . mysql_field_name($Erg, $Uj) . "</td>" .
|
||||
"<td><input type=\"text\" size=\"40\" name=\"" . mysql_field_name($Erg, $Uj) . "\"></td></tr>\n";
|
||||
}
|
||||
echo "</table>\n";
|
||||
echo "<input type=\"hidden\" name=\"action\" value=\"newsave\">\n";
|
||||
echo "<input type=\"submit\" value=\"sichern...\">\n";
|
||||
echo "</form>";
|
||||
break;
|
||||
|
||||
case 'newsave' :
|
||||
$vars = $_GET;
|
||||
$count = count($vars) - 1;
|
||||
$vars = array_splice($vars, 0, $count);
|
||||
$Keys = "";
|
||||
$Values = "";
|
||||
foreach ($vars as $key => $value) {
|
||||
$Keys .= ", `$key`";
|
||||
$Values .= ", '$value'";
|
||||
}
|
||||
|
||||
if (runSQL_log("INSERT INTO `EngelType` (" . substr($Keys, 2) . ") VALUES (" . substr($Values, 2) . ")", "save new EngelType")) {
|
||||
SetHeaderGo2Back();
|
||||
|
||||
$SQL2 = "SELECT * FROM `EngelType` WHERE `Name`='" . $_GET["Name"] . "'";
|
||||
$ERG = mysql_query($SQL2, $con);
|
||||
|
||||
if (mysql_num_rows($ERG) == 1)
|
||||
runSQL_log("ALTER TABLE `Room` ADD `DEFAULT_EID_" . mysql_result($ERG, 0, 0) .
|
||||
"` INT DEFAULT '0' NOT NULL;", "add new EngelType in Romm Table");
|
||||
}
|
||||
break;
|
||||
|
||||
case 'change' :
|
||||
if (!IsSet ($_GET["TID"]))
|
||||
echo "Fehlerhafter Aufruf!";
|
||||
else {
|
||||
echo "Raum abändern:\n";
|
||||
echo "Hier kannst du eintragen, den EngelType ändern.";
|
||||
echo "<form action=\"./EngelType.php\" method=\"GET\">\n";
|
||||
echo "<table>\n";
|
||||
|
||||
$SQL2 = "SELECT * FROM `EngelType` WHERE `TID`='" . $_GET["TID"] . "'";
|
||||
$ERG = mysql_query($SQL2, $con);
|
||||
|
||||
for ($Uj = 1; $Uj < mysql_num_fields($ERG); $Uj++)
|
||||
echo "<tr><td>" . mysql_field_name($ERG, $Uj) . "</td>" .
|
||||
"<td><input type=\"text\" size=\"40\" name=\"e" . mysql_field_name($ERG, $Uj) . "\" " .
|
||||
"value=\"" . mysql_result($ERG, 0, $Uj) . "\"></td></tr>\n";
|
||||
|
||||
echo "</table>\n";
|
||||
echo "<input type=\"hidden\" name=\"eTID\" value=\"" . $_GET["TID"] . "\">\n";
|
||||
echo "<input type=\"hidden\" name=\"action\" value=\"changesave\">\n";
|
||||
echo "<input type=\"submit\" value=\"sichern...\">\n";
|
||||
echo "</form>";
|
||||
echo "<form action=\"./EngelType.php\" method=\"GET\">\n";
|
||||
echo "<input type=\"hidden\" name=\"TID\" value=\"" . $_GET["TID"] . "\">\n";
|
||||
echo "<input type=\"hidden\" name=\"action\" value=\"delete\">\n";
|
||||
echo "<input type=\"submit\" value=\"Löschen...\">";
|
||||
echo "</form>";
|
||||
}
|
||||
break;
|
||||
|
||||
case 'changesave' :
|
||||
$vars = $_GET;
|
||||
$count = count($vars) - 2;
|
||||
$vars = array_splice($vars, 0, $count);
|
||||
$keys = "";
|
||||
$sql = "";
|
||||
foreach ($vars as $key => $value) {
|
||||
$keys = substr($key, 1);
|
||||
$sql .= ", `" . $keys . "`='" . $value . "'";
|
||||
}
|
||||
runSQL_log("UPDATE `EngelType` SET " . substr($sql, 2) . " WHERE `TID`='" . $_GET["eTID"] . "'", "Save Change EngelType");
|
||||
SetHeaderGo2Back();
|
||||
break;
|
||||
|
||||
case 'delete' :
|
||||
if (IsSet ($_GET["TID"])) {
|
||||
if (runSQL_log("DELETE FROM `EngelType` WHERE `TID`='" . $_GET["TID"] . "'", "delete EngelType"))
|
||||
runSQL_log("ALTER TABLE `Room` DROP `DEFAULT_EID_" . $_GET["TID"] . "`;", "delete EngelType in Room Table");
|
||||
} else
|
||||
echo "Fehlerhafter Aufruf";
|
||||
SetHeaderGo2Back();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
include ("../../../camp2011/includes/footer.php");
|
||||
include ("includes/footer.php");
|
||||
?>
|
||||
|
@ -1,70 +1,69 @@
|
||||
<?php
|
||||
require_once ('../bootstrap.php');
|
||||
|
||||
$title = "Engelsystem - DECT";
|
||||
$header = "DECT send call";
|
||||
include ("../../../camp2011/includes/header.php");
|
||||
include ("includes/header.php");
|
||||
|
||||
include ("../../../camp2011/includes/config_IAX.php");
|
||||
include ("config/config_IAX.php");
|
||||
//include ("../../../camp2011/includes/funktion_modem.php");
|
||||
include ("../../../camp2011/includes/funktion_cron.php");
|
||||
|
||||
if( !isset($_GET["dial"])) $_GET["dial"] = "";
|
||||
if( !isset($_GET["custum"])) $_GET["custum"] = "";
|
||||
|
||||
if( $_GET["dial"]=="dial")
|
||||
{
|
||||
if( $_GET["DECT"]=="")
|
||||
$Number = $_GET["custum"];
|
||||
else
|
||||
$Number = $_GET["DECT"];
|
||||
|
||||
if( strlen( $_GET["timeh"])== 1)
|
||||
$_GET["timeh"] = "0". $_GET["timeh"];
|
||||
|
||||
if( strlen( $_GET["timem"])== 1)
|
||||
$_GET["timem"] = "0". $_GET["timem"];
|
||||
|
||||
// SetWackeup( $Number, $_GET["timeh"], $_GET["timem"]);
|
||||
DialNumberIAX($Number, $_GET["timeh"], $_GET["timem"],0);
|
||||
|
||||
$_GET["custum"] = $Number;
|
||||
include ("includes/funktion_cron.php");
|
||||
|
||||
if (!isset ($_GET["dial"]))
|
||||
$_GET["dial"] = "";
|
||||
if (!isset ($_GET["custum"]))
|
||||
$_GET["custum"] = "";
|
||||
|
||||
if ($_GET["dial"] == "dial") {
|
||||
if ($_GET["DECT"] == "")
|
||||
$Number = $_GET["custum"];
|
||||
else
|
||||
$Number = $_GET["DECT"];
|
||||
|
||||
if (strlen($_GET["timeh"]) == 1)
|
||||
$_GET["timeh"] = "0" . $_GET["timeh"];
|
||||
|
||||
if (strlen($_GET["timem"]) == 1)
|
||||
$_GET["timem"] = "0" . $_GET["timem"];
|
||||
|
||||
// SetWackeup( $Number, $_GET["timeh"], $_GET["timem"]);
|
||||
DialNumberIAX($Number, $_GET["timeh"], $_GET["timem"], 0);
|
||||
|
||||
$_GET["custum"] = $Number;
|
||||
}
|
||||
|
||||
echo "<form action=\"./dect.php\" method=\"GET\">\n";
|
||||
echo "<table>\n";
|
||||
|
||||
echo "<tr><th>Number</th><th>h:m</th><th></th></tr>\n";
|
||||
|
||||
echo "<tr><td>\n";
|
||||
// Listet alle Nicks auf
|
||||
echo "<select name=\"DECT\">\n";
|
||||
echo "\t<option value=\"\">costum</option>\n";
|
||||
|
||||
$usql = "SELECT * FROM `User` WHERE NOT `DECT`='' ORDER BY `Nick`";
|
||||
$uErg = mysql_query($usql, $con);
|
||||
$urowcount = mysql_num_rows($uErg);
|
||||
for ($k = 0; $k < $urowcount; $k++) {
|
||||
echo "\t<option value=\"" . mysql_result($uErg, $k, "DECT") . "\">" .
|
||||
mysql_result($uErg, $k, "Nick") .
|
||||
" (" . mysql_result($uErg, $k, "DECT") . ")" .
|
||||
"</option>\n";
|
||||
}
|
||||
echo "</select>\n";
|
||||
|
||||
echo "<input type=\"text\" name=\"custum\" size=\"4\" maxlength=\"4\" value=\"" . $_GET["custum"] . "\">\n";
|
||||
echo "</td>\n";
|
||||
|
||||
echo "<td><input type=\"text\" name=\"timeh\" size=\"2\" maxlength=\"2\" value=\"" . gmdate("H", time() + 90 + 3600) . "\">:";
|
||||
echo "<input type=\"text\" name=\"timem\" size=\"2\" maxlength=\"2\" value=\"" . gmdate("i", time() + 90 + 3600) . "\"></td>\n";
|
||||
echo "<td><input type=\"submit\" name=\"dial\" value=\"dial\"></td>\n";
|
||||
echo "</tr>";
|
||||
echo "</table>\n";
|
||||
|
||||
echo "</form>";
|
||||
|
||||
echo "<form action=\"./dect.php\" method=\"GET\">\n";
|
||||
echo "<table>\n";
|
||||
|
||||
echo "<tr><th>Number</th><th>h:m</th><th></th></tr>\n";
|
||||
|
||||
echo "<tr><td>\n";
|
||||
// Listet alle Nicks auf
|
||||
echo "<select name=\"DECT\">\n";
|
||||
echo "\t<option value=\"\">costum</option>\n";
|
||||
|
||||
$usql="SELECT * FROM `User` WHERE NOT `DECT`='' ORDER BY `Nick`";
|
||||
$uErg = mysql_query($usql, $con);
|
||||
$urowcount = mysql_num_rows($uErg);
|
||||
for ($k=0; $k<$urowcount; $k++)
|
||||
{
|
||||
echo "\t<option value=\"".mysql_result($uErg, $k, "DECT")."\">".
|
||||
mysql_result($uErg, $k, "Nick").
|
||||
" (". mysql_result($uErg, $k, "DECT"). ")".
|
||||
"</option>\n";
|
||||
}
|
||||
echo "</select>\n";
|
||||
|
||||
echo "<input type=\"text\" name=\"custum\" size=\"4\" maxlength=\"4\" value=\"". $_GET["custum"]. "\">\n";
|
||||
echo "</td>\n";
|
||||
|
||||
echo "<td><input type=\"text\" name=\"timeh\" size=\"2\" maxlength=\"2\" value=\"". gmdate("H", time()+90+3600). "\">:";
|
||||
echo "<input type=\"text\" name=\"timem\" size=\"2\" maxlength=\"2\" value=\"". gmdate("i", time()+90+3600). "\"></td>\n";
|
||||
echo "<td><input type=\"submit\" name=\"dial\" value=\"dial\"></td>\n";
|
||||
echo "</tr>";
|
||||
echo "</table>\n";
|
||||
|
||||
echo "</form>";
|
||||
|
||||
|
||||
include ("../../../camp2011/includes/footer.php");
|
||||
include ("includes/footer.php");
|
||||
?>
|
||||
|
||||
|
@ -1,7 +1,8 @@
|
||||
<?php
|
||||
include ("../../../camp2011/includes/header.php");
|
||||
require_once ('../bootstrap.php');
|
||||
|
||||
include ("includes/header.php");
|
||||
|
||||
include ("../../../camp2011/includes/footer.php");
|
||||
include ("includes/footer.php");
|
||||
?>
|
||||
|
||||
|
@ -1,49 +1,49 @@
|
||||
<?php
|
||||
require_once ('../bootstrap.php');
|
||||
|
||||
$title = "User-Liste";
|
||||
$header = "Editieren der Engelliste";
|
||||
include ("../../../camp2011/includes/header.php");
|
||||
include ("../../../camp2011/includes/funktion_db_list.php");
|
||||
|
||||
if (!IsSet($_GET["enterGID"]))
|
||||
{
|
||||
// Userliste, keine UID uebergeben...
|
||||
|
||||
$SQL = "SELECT * FROM `UserGroups` ORDER BY `Name` ASC";
|
||||
$Erg = mysql_query($SQL, $con);
|
||||
echo mysql_error($con);
|
||||
|
||||
// anzahl zeilen
|
||||
$Zeilen = mysql_num_rows($Erg);
|
||||
|
||||
echo "<table class=\"border\" cellpadding=\"2\" cellspacing=\"1\">\n";
|
||||
echo "<tr class=\"contenttopic\">\n";
|
||||
echo "\t<td>Groupname</td>\n";
|
||||
echo "\t<td>Link</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
for ($n = 0 ; $n < $Zeilen ; $n++) {
|
||||
echo "<tr class=\"content\">\n";
|
||||
echo "\t<td>".mysql_result($Erg, $n, "Name")."</td>\n";
|
||||
|
||||
echo "<td><a href=\"./userChangeSecure.php?enterUID=".
|
||||
mysql_result($Erg, $n, "UID")."&Type=Secure\">change</a></td>\n";
|
||||
echo "</tr>\n";
|
||||
}
|
||||
|
||||
// new form
|
||||
echo "<tr class=\"content\">\n";
|
||||
echo "\t<form action=\"userSaveSecure.php?new=newGroup\" method=\"POST\">\n";
|
||||
echo "\t\t<td><input name=\"GroupName\" type=\"text\" value=\"--new group--\"></td>\n";
|
||||
echo "\t\t<td><input type=\"submit\" name=\"Send\" value=\"Save\"></td>\n";
|
||||
echo "\t</form>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "\t</table>\n";
|
||||
// Ende Userliste
|
||||
}
|
||||
|
||||
include ("../../../camp2011/includes/footer.php");
|
||||
include ("includes/header.php");
|
||||
include ("includes/funktion_db_list.php");
|
||||
|
||||
if (!IsSet ($_GET["enterGID"])) {
|
||||
// Userliste, keine UID uebergeben...
|
||||
|
||||
$SQL = "SELECT * FROM `UserGroups` ORDER BY `Name` ASC";
|
||||
$Erg = mysql_query($SQL, $con);
|
||||
echo mysql_error($con);
|
||||
|
||||
// anzahl zeilen
|
||||
$Zeilen = mysql_num_rows($Erg);
|
||||
|
||||
echo "<table class=\"border\" cellpadding=\"2\" cellspacing=\"1\">\n";
|
||||
echo "<tr class=\"contenttopic\">\n";
|
||||
echo "\t<td>Groupname</td>\n";
|
||||
echo "\t<td>Link</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
for ($n = 0; $n < $Zeilen; $n++) {
|
||||
echo "<tr class=\"content\">\n";
|
||||
echo "\t<td>" . mysql_result($Erg, $n, "Name") . "</td>\n";
|
||||
|
||||
echo "<td><a href=\"./userChangeSecure.php?enterUID=" .
|
||||
mysql_result($Erg, $n, "UID") . "&Type=Secure\">change</a></td>\n";
|
||||
echo "</tr>\n";
|
||||
}
|
||||
|
||||
// new form
|
||||
echo "<tr class=\"content\">\n";
|
||||
echo "\t<form action=\"userSaveSecure.php?new=newGroup\" method=\"POST\">\n";
|
||||
echo "\t\t<td><input name=\"GroupName\" type=\"text\" value=\"--new group--\"></td>\n";
|
||||
echo "\t\t<td><input type=\"submit\" name=\"Send\" value=\"Save\"></td>\n";
|
||||
echo "\t</form>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "\t</table>\n";
|
||||
// Ende Userliste
|
||||
}
|
||||
|
||||
include ("includes/footer.php");
|
||||
?>
|
||||
|
||||
|
||||
|
@ -1,199 +1,180 @@
|
||||
<?php
|
||||
require_once ('../bootstrap.php');
|
||||
|
||||
$title = "Räume";
|
||||
$header = "Verwaltung der Räume";
|
||||
include ("../../../camp2011/includes/header.php");
|
||||
include ("../../../camp2011/includes/funktion_schichtplan_aray.php");
|
||||
include ("includes/header.php");
|
||||
include ("funktion_schichtplan_aray.php");
|
||||
|
||||
$Sql = "SELECT * FROM `Room` ORDER BY `Number`, `Name`";
|
||||
$Erg = mysql_query($Sql, $con);
|
||||
|
||||
if( !IsSet($_GET["action"]) )
|
||||
{
|
||||
echo "Hallo ".$_SESSION['Nick'].
|
||||
",<br />\nhier hast du die Möglichkeit, neue Räume für die Schichtpläne einzutragen ".
|
||||
"oder vorhandene abzuändern:<br /><br />\n";
|
||||
|
||||
echo "<a href=\"./room.php?action=new\">- Neuen Raum/Ort eintragen</a><br />\n";
|
||||
|
||||
echo "<table width=\"100%\" class=\"border\" cellpadding=\"2\" cellspacing=\"1\">\n";
|
||||
echo "<tr class=\"contenttopic\">\n";
|
||||
|
||||
for( $i = 1; $i < mysql_num_fields($Erg); $i++ )
|
||||
{
|
||||
if( substr( mysql_field_name($Erg, $i), 0, 12) == "DEFAULT_EID_")
|
||||
echo "\t<td> Anzahl ". $EngelTypeID[substr( mysql_field_name($Erg, $i), 12)]. "</td>";
|
||||
else
|
||||
echo "\t<td>". mysql_field_name($Erg, $i)."</td>";
|
||||
}
|
||||
echo "\t<td>Ändern</td>";
|
||||
echo "</tr>";
|
||||
|
||||
for( $t = 0; $t < mysql_num_rows($Erg); $t++ )
|
||||
{
|
||||
echo "\t<tr class=\"content\">\n";
|
||||
for ($j = 1; $j < mysql_num_fields($Erg); $j++)
|
||||
{
|
||||
echo "\t\t<td>".mysql_result($Erg, $t, $j)."</td>\n";
|
||||
}
|
||||
echo "\t\t<td><a href=\"./room.php?action=change&RID=".mysql_result($Erg, $t, "RID")."\">###</a></td>\n";
|
||||
echo "\t</tr>\n";
|
||||
} // ende Auflistung Raeume
|
||||
echo "</table>";
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
UnSet($SQL);
|
||||
|
||||
switch ($_GET["action"]) {
|
||||
|
||||
case 'new':
|
||||
echo "Neuen Raum einrichten: <br />";
|
||||
echo "<form action=\"./room.php\" method=\"GET\">\n";
|
||||
echo "<table>\n";
|
||||
|
||||
for( $Uj = 1; $Uj < mysql_num_fields($Erg); $Uj++ )
|
||||
{
|
||||
if( (mysql_field_name($Erg, $Uj) == "show") || (mysql_field_name($Erg, $Uj) == "FromPentabarf") )
|
||||
{
|
||||
echo "<tr><td>". mysql_field_name($Erg, $Uj). "</td>".
|
||||
"<td>".
|
||||
"<input type=\"radio\" name=\"". mysql_field_name($Erg, $Uj). "\" value=\"Y\">Yes".
|
||||
"<input type=\"radio\" name=\"". mysql_field_name($Erg, $Uj). "\" value=\"N\">No".
|
||||
"</td></tr>\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
//sonderfall fuer Default Engel
|
||||
if( substr( mysql_field_name($Erg, $Uj), 0, 12) == "DEFAULT_EID_")
|
||||
$FeldName = "Anzahl ". $EngelTypeID[substr( mysql_field_name($Erg, $Uj), 12)];
|
||||
else
|
||||
$FeldName = mysql_field_name($Erg, $Uj);
|
||||
|
||||
echo "<td>$FeldName</td>".
|
||||
"<td><input type=\"text\" size=\"40\" name=\"".mysql_field_name($Erg, $Uj)."\">";
|
||||
echo "</td></tr>\n";
|
||||
}
|
||||
}
|
||||
echo "</table>\n";
|
||||
echo "<input type=\"hidden\" name=\"action\" value=\"newsave\">\n";
|
||||
echo "<input type=\"submit\" value=\"sichern...\">\n";
|
||||
echo "</form>";
|
||||
break;
|
||||
|
||||
case 'newsave':
|
||||
$vars = $_GET;
|
||||
$count = count($vars) - 1;
|
||||
$vars = array_splice($vars, 0, $count);
|
||||
$Keys = "";
|
||||
$Values = "";
|
||||
foreach($vars as $key => $value)
|
||||
{
|
||||
$Keys .= ", `$key`";
|
||||
$Values .= ", '$value'";
|
||||
}
|
||||
$SQL = "INSERT INTO `Room` (". substr( $Keys, 2). ") VALUES (". substr( $Values, 2). ")";
|
||||
SetHeaderGo2Back();
|
||||
break;
|
||||
|
||||
case 'change':
|
||||
if (! IsSet($_GET["RID"]))
|
||||
echo "Fehlerhafter Aufruf!";
|
||||
else
|
||||
{
|
||||
$SQL2 = "SELECT * FROM `Room` WHERE `RID`='". $_GET["RID"]. "'";
|
||||
$ERG = mysql_query($SQL2, $con);
|
||||
|
||||
if( mysql_num_rows( $ERG)>0)
|
||||
{
|
||||
echo "Raum abändern:\n";
|
||||
echo "Hier kannst du eintragen, welche und wieviele Engel für den Raum zur Verf?gung stehen müssen.";
|
||||
echo "<form action=\"./room.php\" method=\"GET\">\n";
|
||||
echo "<table>\n";
|
||||
|
||||
for ($Uj = 1; $Uj < mysql_num_fields($ERG); $Uj++)
|
||||
{
|
||||
if( (mysql_field_name($ERG, $Uj) == "show") || (mysql_field_name($ERG, $Uj) == "FromPentabarf") )
|
||||
{
|
||||
echo "<tr><td>". mysql_field_name($Erg, $Uj). "</td>".
|
||||
"<td>".
|
||||
"<input type=\"radio\" name=\"e". mysql_field_name($ERG, $Uj).
|
||||
"\" value=\"Y\"". (mysql_result($ERG, 0, $Uj)=='Y'? " checked":""). ">Yes".
|
||||
"<input type=\"radio\" name=\"e". mysql_field_name($ERG, $Uj).
|
||||
"\" value=\"N\"". (mysql_result($ERG, 0, $Uj)=='N'? " checked":""). ">No".
|
||||
"</td></tr>\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
if( substr( mysql_field_name($ERG, $Uj), 0, 12) == "DEFAULT_EID_")
|
||||
//sonderfall fuer Default Engel
|
||||
$FeldName = "Anzahl ". $EngelTypeID[substr( mysql_field_name($ERG, $Uj), 12)];
|
||||
else
|
||||
$FeldName = mysql_field_name($ERG, $Uj);
|
||||
echo "<tr><td>$FeldName</td>".
|
||||
"<td><input type=\"text\" size=\"40\" name=\"e".mysql_field_name($ERG, $Uj)."\" ".
|
||||
"value=\"".mysql_result($ERG, 0, $Uj)."\">".
|
||||
"</td></tr>\n";
|
||||
}
|
||||
}
|
||||
echo "</table>\n";
|
||||
echo "<input type=\"hidden\" name=\"eRID\" value=\"". $_GET["RID"]. "\">\n";
|
||||
echo "<input type=\"hidden\" name=\"action\" value=\"changesave\">\n";
|
||||
echo "<input type=\"submit\" value=\"sichern...\">\n";
|
||||
echo "</form>";
|
||||
echo "<form action=\"./room.php\" method=\"GET\">\n";
|
||||
echo "<input type=\"hidden\" name=\"RID\" value=\"". $_GET["RID"]. "\">\n";
|
||||
echo "<input type=\"hidden\" name=\"action\" value=\"delete\">\n";
|
||||
echo "<input type=\"submit\" value=\"Löschen...\">";
|
||||
echo "</form>";
|
||||
}
|
||||
else
|
||||
echo "FEHLER: Room ID ". $_GET["RID"]. " nicht gefunden";
|
||||
}
|
||||
break;
|
||||
|
||||
case 'changesave':
|
||||
$sql="";
|
||||
$vars = $_GET;
|
||||
$count = count($vars) - 2;
|
||||
$vars = array_splice($vars, 0, $count);
|
||||
foreach($vars as $key => $value)
|
||||
{
|
||||
$keys = substr($key,1);
|
||||
$sql .= ", `".$keys."`='".$value."' ";
|
||||
}
|
||||
$SQL = "UPDATE `Room` SET ". substr($sql, 2). " WHERE `RID`='". $_GET["eRID"]. "'";
|
||||
SetHeaderGo2Back();
|
||||
break;
|
||||
|
||||
case 'delete':
|
||||
if (IsSet($_GET["RID"])) {
|
||||
$SQL="DELETE FROM `Room` WHERE `RID`='". $_GET["RID"]. "'";
|
||||
} else {
|
||||
echo "Fehlerhafter Aufruf";
|
||||
}
|
||||
SetHeaderGo2Back();
|
||||
break;
|
||||
|
||||
} //switch
|
||||
|
||||
|
||||
// Update ???
|
||||
|
||||
if (IsSet($SQL)){
|
||||
// echo $SQL;
|
||||
// hier muesste das SQL ausgefuehrt werden...
|
||||
$Erg = db_query($SQL, "exec SQL");
|
||||
if ($Erg == 1)
|
||||
echo "Änderung wurde gesichert...<br />";
|
||||
else
|
||||
{
|
||||
echo "Fehler beim speichern... bitte noch ein mal probieren :)";
|
||||
echo "<br /><br />".mysql_error( $con ). "<br />($SQL)<br />";
|
||||
}
|
||||
} // Ende Update
|
||||
if (!IsSet ($_GET["action"])) {
|
||||
echo "Hallo " . $_SESSION['Nick'] .
|
||||
",<br />\nhier hast du die Möglichkeit, neue Räume für die Schichtpläne einzutragen " .
|
||||
"oder vorhandene abzuändern:<br /><br />\n";
|
||||
|
||||
echo "<a href=\"./room.php?action=new\">- Neuen Raum/Ort eintragen</a><br />\n";
|
||||
|
||||
echo "<table width=\"100%\" class=\"border\" cellpadding=\"2\" cellspacing=\"1\">\n";
|
||||
echo "<tr class=\"contenttopic\">\n";
|
||||
|
||||
for ($i = 1; $i < mysql_num_fields($Erg); $i++) {
|
||||
if (substr(mysql_field_name($Erg, $i), 0, 12) == "DEFAULT_EID_")
|
||||
echo "\t<td> Anzahl " . $EngelTypeID[substr(mysql_field_name($Erg, $i), 12)] . "</td>";
|
||||
else
|
||||
echo "\t<td>" . mysql_field_name($Erg, $i) . "</td>";
|
||||
}
|
||||
echo "\t<td>Ändern</td>";
|
||||
echo "</tr>";
|
||||
|
||||
for ($t = 0; $t < mysql_num_rows($Erg); $t++) {
|
||||
echo "\t<tr class=\"content\">\n";
|
||||
for ($j = 1; $j < mysql_num_fields($Erg); $j++) {
|
||||
echo "\t\t<td>" . mysql_result($Erg, $t, $j) . "</td>\n";
|
||||
}
|
||||
echo "\t\t<td><a href=\"./room.php?action=change&RID=" . mysql_result($Erg, $t, "RID") . "\">###</a></td>\n";
|
||||
echo "\t</tr>\n";
|
||||
} // ende Auflistung Raeume
|
||||
echo "</table>";
|
||||
} else {
|
||||
|
||||
UnSet ($SQL);
|
||||
|
||||
switch ($_GET["action"]) {
|
||||
|
||||
case 'new' :
|
||||
echo "Neuen Raum einrichten: <br />";
|
||||
echo "<form action=\"./room.php\" method=\"GET\">\n";
|
||||
echo "<table>\n";
|
||||
|
||||
for ($Uj = 1; $Uj < mysql_num_fields($Erg); $Uj++) {
|
||||
if ((mysql_field_name($Erg, $Uj) == "show") || (mysql_field_name($Erg, $Uj) == "FromPentabarf")) {
|
||||
echo "<tr><td>" . mysql_field_name($Erg, $Uj) . "</td>" .
|
||||
"<td>" .
|
||||
"<input type=\"radio\" name=\"" . mysql_field_name($Erg, $Uj) . "\" value=\"Y\">Yes" .
|
||||
"<input type=\"radio\" name=\"" . mysql_field_name($Erg, $Uj) . "\" value=\"N\">No" .
|
||||
"</td></tr>\n";
|
||||
} else {
|
||||
//sonderfall fuer Default Engel
|
||||
if (substr(mysql_field_name($Erg, $Uj), 0, 12) == "DEFAULT_EID_")
|
||||
$FeldName = "Anzahl " . $EngelTypeID[substr(mysql_field_name($Erg, $Uj), 12)];
|
||||
else
|
||||
$FeldName = mysql_field_name($Erg, $Uj);
|
||||
|
||||
echo "<td>$FeldName</td>" .
|
||||
"<td><input type=\"text\" size=\"40\" name=\"" . mysql_field_name($Erg, $Uj) . "\">";
|
||||
echo "</td></tr>\n";
|
||||
}
|
||||
}
|
||||
echo "</table>\n";
|
||||
echo "<input type=\"hidden\" name=\"action\" value=\"newsave\">\n";
|
||||
echo "<input type=\"submit\" value=\"sichern...\">\n";
|
||||
echo "</form>";
|
||||
break;
|
||||
|
||||
case 'newsave' :
|
||||
$vars = $_GET;
|
||||
$count = count($vars) - 1;
|
||||
$vars = array_splice($vars, 0, $count);
|
||||
$Keys = "";
|
||||
$Values = "";
|
||||
foreach ($vars as $key => $value) {
|
||||
$Keys .= ", `$key`";
|
||||
$Values .= ", '$value'";
|
||||
}
|
||||
$SQL = "INSERT INTO `Room` (" . substr($Keys, 2) . ") VALUES (" . substr($Values, 2) . ")";
|
||||
SetHeaderGo2Back();
|
||||
break;
|
||||
|
||||
case 'change' :
|
||||
if (!IsSet ($_GET["RID"]))
|
||||
echo "Fehlerhafter Aufruf!";
|
||||
else {
|
||||
$SQL2 = "SELECT * FROM `Room` WHERE `RID`='" . $_GET["RID"] . "'";
|
||||
$ERG = mysql_query($SQL2, $con);
|
||||
|
||||
if (mysql_num_rows($ERG) > 0) {
|
||||
echo "Raum abändern:\n";
|
||||
echo "Hier kannst du eintragen, welche und wieviele Engel für den Raum zur Verf?gung stehen müssen.";
|
||||
echo "<form action=\"./room.php\" method=\"GET\">\n";
|
||||
echo "<table>\n";
|
||||
|
||||
for ($Uj = 1; $Uj < mysql_num_fields($ERG); $Uj++) {
|
||||
if ((mysql_field_name($ERG, $Uj) == "show") || (mysql_field_name($ERG, $Uj) == "FromPentabarf")) {
|
||||
echo "<tr><td>" . mysql_field_name($Erg, $Uj) . "</td>" .
|
||||
"<td>" .
|
||||
"<input type=\"radio\" name=\"e" . mysql_field_name($ERG, $Uj) .
|
||||
"\" value=\"Y\"" . (mysql_result($ERG, 0, $Uj) == 'Y' ? " checked" : "") . ">Yes" .
|
||||
"<input type=\"radio\" name=\"e" . mysql_field_name($ERG, $Uj) .
|
||||
"\" value=\"N\"" . (mysql_result($ERG, 0, $Uj) == 'N' ? " checked" : "") . ">No" .
|
||||
"</td></tr>\n";
|
||||
} else {
|
||||
if (substr(mysql_field_name($ERG, $Uj), 0, 12) == "DEFAULT_EID_")
|
||||
//sonderfall fuer Default Engel
|
||||
$FeldName = "Anzahl " . $EngelTypeID[substr(mysql_field_name($ERG, $Uj), 12)];
|
||||
else
|
||||
$FeldName = mysql_field_name($ERG, $Uj);
|
||||
echo "<tr><td>$FeldName</td>" .
|
||||
"<td><input type=\"text\" size=\"40\" name=\"e" . mysql_field_name($ERG, $Uj) . "\" " .
|
||||
"value=\"" . mysql_result($ERG, 0, $Uj) . "\">" .
|
||||
"</td></tr>\n";
|
||||
}
|
||||
}
|
||||
echo "</table>\n";
|
||||
echo "<input type=\"hidden\" name=\"eRID\" value=\"" . $_GET["RID"] . "\">\n";
|
||||
echo "<input type=\"hidden\" name=\"action\" value=\"changesave\">\n";
|
||||
echo "<input type=\"submit\" value=\"sichern...\">\n";
|
||||
echo "</form>";
|
||||
echo "<form action=\"./room.php\" method=\"GET\">\n";
|
||||
echo "<input type=\"hidden\" name=\"RID\" value=\"" . $_GET["RID"] . "\">\n";
|
||||
echo "<input type=\"hidden\" name=\"action\" value=\"delete\">\n";
|
||||
echo "<input type=\"submit\" value=\"Löschen...\">";
|
||||
echo "</form>";
|
||||
} else
|
||||
echo "FEHLER: Room ID " . $_GET["RID"] . " nicht gefunden";
|
||||
}
|
||||
break;
|
||||
|
||||
case 'changesave' :
|
||||
$sql = "";
|
||||
$vars = $_GET;
|
||||
$count = count($vars) - 2;
|
||||
$vars = array_splice($vars, 0, $count);
|
||||
foreach ($vars as $key => $value) {
|
||||
$keys = substr($key, 1);
|
||||
$sql .= ", `" . $keys . "`='" . $value . "' ";
|
||||
}
|
||||
$SQL = "UPDATE `Room` SET " . substr($sql, 2) . " WHERE `RID`='" . $_GET["eRID"] . "'";
|
||||
SetHeaderGo2Back();
|
||||
break;
|
||||
|
||||
case 'delete' :
|
||||
if (IsSet ($_GET["RID"])) {
|
||||
$SQL = "DELETE FROM `Room` WHERE `RID`='" . $_GET["RID"] . "'";
|
||||
} else {
|
||||
echo "Fehlerhafter Aufruf";
|
||||
}
|
||||
SetHeaderGo2Back();
|
||||
break;
|
||||
|
||||
} //switch
|
||||
|
||||
// Update ???
|
||||
|
||||
if (IsSet ($SQL)) {
|
||||
// echo $SQL;
|
||||
// hier muesste das SQL ausgefuehrt werden...
|
||||
$Erg = db_query($SQL, "exec SQL");
|
||||
if ($Erg == 1)
|
||||
echo "Änderung wurde gesichert...<br />";
|
||||
else {
|
||||
echo "Fehler beim speichern... bitte noch ein mal probieren :)";
|
||||
echo "<br /><br />" . mysql_error($con) . "<br />($SQL)<br />";
|
||||
}
|
||||
} // Ende Update
|
||||
|
||||
} //IF IsSet($action)
|
||||
|
||||
include ("../../../camp2011/includes/footer.php");
|
||||
include ("includes/footer.php");
|
||||
?>
|
||||
|
@ -1,122 +1,110 @@
|
||||
<?php
|
||||
require_once ('../bootstrap.php');
|
||||
|
||||
$title = "Sprache";
|
||||
$header = "Liste der existierenden Sprcheinträge";
|
||||
include ("../../../camp2011/includes/header.php");
|
||||
|
||||
|
||||
if( !isset( $_GET["TextID"] ) )
|
||||
{
|
||||
echo Get_Text("Hello").$_SESSION['Nick'].", <br />\n";
|
||||
echo Get_Text("pub_sprache_text1")."<br /><br />\n";
|
||||
|
||||
echo "<a href=\"?ShowEntry=y\">". Get_Text("pub_sprache_ShowEntry"). "</a>";
|
||||
// ausgabe Tabellenueberschift
|
||||
$SQL_Sprachen = "SELECT `Sprache` FROM `Sprache` GROUP BY `Sprache`;";
|
||||
$erg_Sprachen = mysql_query($SQL_Sprachen, $con);
|
||||
echo mysql_error($con);
|
||||
|
||||
for( $i=0; $i<mysql_num_rows( $erg_Sprachen ); $i++ )
|
||||
$Sprachen[mysql_result( $erg_Sprachen, $i, "Sprache" )] = $i;
|
||||
|
||||
echo "\t<table border=\"0\" class=\"border\" cellpadding=\"2\" cellspacing=\"1\">\n\t\t<tr>";
|
||||
echo "\t\t<td class=\"contenttopic\"><b>". Get_Text("pub_sprache_TextID"). "</b></td>";
|
||||
foreach( $Sprachen as $Name => $Value )
|
||||
echo "<td class=\"contenttopic\"><b>".
|
||||
Get_Text("pub_sprache_Sprache"). " ". $Name.
|
||||
"</b></td>";
|
||||
echo "\t\t<td class=\"contenttopic\"><b>". Get_Text("pub_sprache_Edit"). "</b></td>";
|
||||
echo "\t\t</tr>";
|
||||
|
||||
|
||||
if( isset($_GET["ShowEntry"]))
|
||||
{
|
||||
// ausgabe eintraege
|
||||
$SQL = "SELECT * FROM `Sprache` ORDER BY `TextID`;";
|
||||
$erg = mysql_query($SQL, $con);
|
||||
echo mysql_error($con);
|
||||
|
||||
$TextID_Old = mysql_result( $erg, 0, "TextID" );
|
||||
for( $i=0; $i<mysql_num_rows( $erg ); $i++ )
|
||||
{
|
||||
$TextID_New = mysql_result( $erg, $i, "TextID" );
|
||||
if( $TextID_Old != $TextID_New )
|
||||
{
|
||||
echo "<form action=\"sprache.php\">";
|
||||
echo "<tr class=\"content\">\n";
|
||||
echo "\t\t<td>$TextID_Old ".
|
||||
"<input name=\"TextID\" type=\"hidden\" value=\"$TextID_Old\"> </td>\n";
|
||||
|
||||
foreach( $Sprachen as $Name => $Value )
|
||||
{
|
||||
$Value = html_entity_decode( $Value, ENT_QUOTES);
|
||||
echo "\t\t<td><textarea name=\"$Name\" cols=\"22\" rows=\"8\">$Value</textarea></td>\n";
|
||||
$Sprachen[ $Name ] = "";
|
||||
}
|
||||
|
||||
echo "\t\t<td><input type=\"submit\" value=\"Save\"></td>\n";
|
||||
echo "</tr>";
|
||||
echo "</form>\n";
|
||||
$TextID_Old = $TextID_New;
|
||||
}
|
||||
$Sprachen[ mysql_result( $erg, $i, "Sprache" ) ] = mysql_result( $erg, $i, "Text" );
|
||||
} /*FOR*/
|
||||
}
|
||||
|
||||
//fuer neu eintraege
|
||||
echo "<form action=\"sprache.php\">";
|
||||
echo "<tr class=\"content\">\n";
|
||||
echo "\t\t<td><input name=\"TextID\" type=\"text\" size=\"40\" value=\"new\"> </td>\n";
|
||||
|
||||
foreach( $Sprachen as $Name => $Value )
|
||||
echo "\t\t<td><textarea name=\"$Name\" cols=\"22\" rows=\"8\">$Name Text</textarea></td>\n";
|
||||
|
||||
echo "\t\t<td><input type=\"submit\" value=\"Save\"></td>\n";
|
||||
echo "</tr>";
|
||||
echo "</form>\n";
|
||||
|
||||
|
||||
echo "</table>\n";
|
||||
include ("includes/header.php");
|
||||
|
||||
if (!isset ($_GET["TextID"])) {
|
||||
echo Get_Text("Hello") . $_SESSION['Nick'] . ", <br />\n";
|
||||
echo Get_Text("pub_sprache_text1") . "<br /><br />\n";
|
||||
|
||||
echo "<a href=\"?ShowEntry=y\">" . Get_Text("pub_sprache_ShowEntry") . "</a>";
|
||||
// ausgabe Tabellenueberschift
|
||||
$SQL_Sprachen = "SELECT `Sprache` FROM `Sprache` GROUP BY `Sprache`;";
|
||||
$erg_Sprachen = mysql_query($SQL_Sprachen, $con);
|
||||
echo mysql_error($con);
|
||||
|
||||
for ($i = 0; $i < mysql_num_rows($erg_Sprachen); $i++)
|
||||
$Sprachen[mysql_result($erg_Sprachen, $i, "Sprache")] = $i;
|
||||
|
||||
echo "\t<table border=\"0\" class=\"border\" cellpadding=\"2\" cellspacing=\"1\">\n\t\t<tr>";
|
||||
echo "\t\t<td class=\"contenttopic\"><b>" . Get_Text("pub_sprache_TextID") . "</b></td>";
|
||||
foreach ($Sprachen as $Name => $Value)
|
||||
echo "<td class=\"contenttopic\"><b>" .
|
||||
Get_Text("pub_sprache_Sprache") . " " . $Name .
|
||||
"</b></td>";
|
||||
echo "\t\t<td class=\"contenttopic\"><b>" . Get_Text("pub_sprache_Edit") . "</b></td>";
|
||||
echo "\t\t</tr>";
|
||||
|
||||
if (isset ($_GET["ShowEntry"])) {
|
||||
// ausgabe eintraege
|
||||
$SQL = "SELECT * FROM `Sprache` ORDER BY `TextID`;";
|
||||
$erg = mysql_query($SQL, $con);
|
||||
echo mysql_error($con);
|
||||
|
||||
$TextID_Old = mysql_result($erg, 0, "TextID");
|
||||
for ($i = 0; $i < mysql_num_rows($erg); $i++) {
|
||||
$TextID_New = mysql_result($erg, $i, "TextID");
|
||||
if ($TextID_Old != $TextID_New) {
|
||||
echo "<form action=\"sprache.php\">";
|
||||
echo "<tr class=\"content\">\n";
|
||||
echo "\t\t<td>$TextID_Old " .
|
||||
"<input name=\"TextID\" type=\"hidden\" value=\"$TextID_Old\"> </td>\n";
|
||||
|
||||
foreach ($Sprachen as $Name => $Value) {
|
||||
$Value = html_entity_decode($Value, ENT_QUOTES);
|
||||
echo "\t\t<td><textarea name=\"$Name\" cols=\"22\" rows=\"8\">$Value</textarea></td>\n";
|
||||
$Sprachen[$Name] = "";
|
||||
}
|
||||
|
||||
echo "\t\t<td><input type=\"submit\" value=\"Save\"></td>\n";
|
||||
echo "</tr>";
|
||||
echo "</form>\n";
|
||||
$TextID_Old = $TextID_New;
|
||||
}
|
||||
$Sprachen[mysql_result($erg, $i, "Sprache")] = mysql_result($erg, $i, "Text");
|
||||
} /*FOR*/
|
||||
}
|
||||
|
||||
//fuer neu eintraege
|
||||
echo "<form action=\"sprache.php\">";
|
||||
echo "<tr class=\"content\">\n";
|
||||
echo "\t\t<td><input name=\"TextID\" type=\"text\" size=\"40\" value=\"new\"> </td>\n";
|
||||
|
||||
foreach ($Sprachen as $Name => $Value)
|
||||
echo "\t\t<td><textarea name=\"$Name\" cols=\"22\" rows=\"8\">$Name Text</textarea></td>\n";
|
||||
|
||||
echo "\t\t<td><input type=\"submit\" value=\"Save\"></td>\n";
|
||||
echo "</tr>";
|
||||
echo "</form>\n";
|
||||
|
||||
echo "</table>\n";
|
||||
} /*if( !isset( $TextID ) )*/
|
||||
else
|
||||
{
|
||||
echo "edit: ". $_GET["TextID"]. "<br /><br />";
|
||||
foreach ($_GET as $k => $v) {
|
||||
if( $k != "TextID" )
|
||||
{
|
||||
$sql_test = "SELECT * FROM `Sprache` ".
|
||||
"WHERE `TextID`='". $_GET["TextID"]. "' AND `Sprache`='$k'";
|
||||
$erg_test = mysql_query($sql_test, $con);
|
||||
|
||||
if( mysql_num_rows($erg_test)==0 )
|
||||
{
|
||||
$sql_save = "INSERT INTO `Sprache` (`TextID`, `Sprache`, `Text`) ".
|
||||
"VALUES ('". $_GET["TextID"]. "', '$k', '$v')";
|
||||
echo $sql_save."<br />";
|
||||
$Erg = mysql_query($sql_save, $con);
|
||||
if ($Erg == 1)
|
||||
echo "\t $k Save: OK<br />\n";
|
||||
else
|
||||
echo "\t $k Save: KO<br />\n";
|
||||
}
|
||||
else if( mysql_result($erg_test, 0, "Text")!=$v )
|
||||
{
|
||||
$sql_save = "UPDATE `Sprache` SET `Text`='$v' ".
|
||||
"WHERE `TextID`='". $_GET["TextID"]. "' AND `Sprache`='$k' ";
|
||||
echo $sql_save."<br />";
|
||||
$Erg = mysql_query($sql_save, $con);
|
||||
if ($Erg == 1)
|
||||
echo "\t $k Update: OK<br />\n";
|
||||
else
|
||||
echo "\t $k Update: KO<br />\n";
|
||||
}
|
||||
else
|
||||
echo "\t $k no changes<br />\n";
|
||||
}
|
||||
}
|
||||
|
||||
else {
|
||||
echo "edit: " . $_GET["TextID"] . "<br /><br />";
|
||||
foreach ($_GET as $k => $v) {
|
||||
if ($k != "TextID") {
|
||||
$sql_test = "SELECT * FROM `Sprache` " .
|
||||
"WHERE `TextID`='" . $_GET["TextID"] . "' AND `Sprache`='$k'";
|
||||
$erg_test = mysql_query($sql_test, $con);
|
||||
|
||||
if (mysql_num_rows($erg_test) == 0) {
|
||||
$sql_save = "INSERT INTO `Sprache` (`TextID`, `Sprache`, `Text`) " .
|
||||
"VALUES ('" . $_GET["TextID"] . "', '$k', '$v')";
|
||||
echo $sql_save . "<br />";
|
||||
$Erg = mysql_query($sql_save, $con);
|
||||
if ($Erg == 1)
|
||||
echo "\t $k Save: OK<br />\n";
|
||||
else
|
||||
echo "\t $k Save: KO<br />\n";
|
||||
} else
|
||||
if (mysql_result($erg_test, 0, "Text") != $v) {
|
||||
$sql_save = "UPDATE `Sprache` SET `Text`='$v' " .
|
||||
"WHERE `TextID`='" . $_GET["TextID"] . "' AND `Sprache`='$k' ";
|
||||
echo $sql_save . "<br />";
|
||||
$Erg = mysql_query($sql_save, $con);
|
||||
if ($Erg == 1)
|
||||
echo "\t $k Update: OK<br />\n";
|
||||
else
|
||||
echo "\t $k Update: KO<br />\n";
|
||||
} else
|
||||
echo "\t $k no changes<br />\n";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
include ("../../../camp2011/includes/footer.php");
|
||||
include ("includes/footer.php");
|
||||
?>
|
||||
|
||||
|
@ -1,54 +1,53 @@
|
||||
<?php
|
||||
require_once ('../bootstrap.php');
|
||||
|
||||
$title = "Engel Arrived";
|
||||
$header = "Engel was arrived";
|
||||
include ("../../../camp2011/includes/header.php");
|
||||
include ("../../../camp2011/includes/funktion_db_list.php");
|
||||
|
||||
|
||||
If (IsSet($_GET["arrived"])) {
|
||||
|
||||
$SQL="UPDATE `User` SET `Gekommen`='1' WHERE `UID`='". $_GET["arrived"]. "' limit 1";
|
||||
$Erg = db_query($SQL, "Set User as Gekommen");
|
||||
if ($Erg == 1) {
|
||||
echo "<h2>". Get_Text("pri_userArrived_WriteOK"). " \"". UID2Nick($_GET["arrived"]). "\"</h2>";
|
||||
} else {
|
||||
echo "<h1>". Get_Text("pri_userArrived_WriteError"). " \"". UID2Nick($_GET["arrived"]). "\"</h1>";
|
||||
}
|
||||
include ("includes/header.php");
|
||||
include ("includes/funktion_db_list.php");
|
||||
|
||||
If (IsSet ($_GET["arrived"])) {
|
||||
|
||||
$SQL = "UPDATE `User` SET `Gekommen`='1' WHERE `UID`='" . $_GET["arrived"] . "' limit 1";
|
||||
$Erg = db_query($SQL, "Set User as Gekommen");
|
||||
if ($Erg == 1) {
|
||||
echo "<h2>" . Get_Text("pri_userArrived_WriteOK") . " \"" . UID2Nick($_GET["arrived"]) . "\"</h2>";
|
||||
} else {
|
||||
echo "<h1>" . Get_Text("pri_userArrived_WriteError") . " \"" . UID2Nick($_GET["arrived"]) . "\"</h1>";
|
||||
}
|
||||
}
|
||||
|
||||
echo Get_Text("pri_userArrived_Text1"). "<br />";
|
||||
echo Get_Text("pri_userArrived_Text2"). "<br /><br />";
|
||||
echo Get_Text("pri_userArrived_Text1") . "<br />";
|
||||
echo Get_Text("pri_userArrived_Text2") . "<br /><br />";
|
||||
|
||||
echo Get_Text("pri_userArrived_TableToppic");
|
||||
$SQL = "SELECT * FROM `User` ORDER BY `Nick` ASC";
|
||||
$SQL = "SELECT * FROM `User` ORDER BY `Nick` ASC";
|
||||
$Erg = mysql_query($SQL, $con);
|
||||
|
||||
$rowcount = mysql_num_rows($Erg);
|
||||
|
||||
echo "<table width=\"100%\" class=\"border\" cellpadding=\"2\" cellspacing=\"1\">\n";
|
||||
echo "\t<tr class=\"contenttopic\">\n";
|
||||
echo "\t\t<td>". Get_Text("pri_userArrived_TableTD_Nick"). "</td>\n";
|
||||
echo "\t\t<td>". Get_Text("pri_userArrived_TableTD_ArrivedShow"). "</td>\n";
|
||||
echo "\t\t<td>". Get_Text("pri_userArrived_TableTD_ArrivedSet"). "</td>\n";
|
||||
echo "\t\t<td>" . Get_Text("pri_userArrived_TableTD_Nick") . "</td>\n";
|
||||
echo "\t\t<td>" . Get_Text("pri_userArrived_TableTD_ArrivedShow") . "</td>\n";
|
||||
echo "\t\t<td>" . Get_Text("pri_userArrived_TableTD_ArrivedSet") . "</td>\n";
|
||||
echo "\t</td>\n";
|
||||
|
||||
for ($i=0; $i<$rowcount; $i++){
|
||||
echo "\t<tr class=\"content\">\n";
|
||||
$eUID=mysql_result($Erg, $i, "UID");
|
||||
echo "\t\t<td>".UID2Nick($eUID)."</td>\n";
|
||||
echo "\t\t<td>".mysql_result($Erg, $i, "Gekommen")."</td>\n";
|
||||
|
||||
if (mysql_result($Erg, $i, "Gekommen") =="1")
|
||||
{
|
||||
echo "\t\t<td>". Get_Text("pri_userArrived_TableEntry_Arrived"). "</td>";
|
||||
} else {
|
||||
echo "\t\t<td><a href=\"./userArrived.php?arrived=$eUID\">". Get_Text("pri_userArrived_TableEntry_Set"). "</a></td>";
|
||||
}
|
||||
echo "\t</tr>\n";
|
||||
for ($i = 0; $i < $rowcount; $i++) {
|
||||
echo "\t<tr class=\"content\">\n";
|
||||
$eUID = mysql_result($Erg, $i, "UID");
|
||||
echo "\t\t<td>" . UID2Nick($eUID) . "</td>\n";
|
||||
echo "\t\t<td>" . mysql_result($Erg, $i, "Gekommen") . "</td>\n";
|
||||
|
||||
if (mysql_result($Erg, $i, "Gekommen") == "1") {
|
||||
echo "\t\t<td>" . Get_Text("pri_userArrived_TableEntry_Arrived") . "</td>";
|
||||
} else {
|
||||
echo "\t\t<td><a href=\"./userArrived.php?arrived=$eUID\">" . Get_Text("pri_userArrived_TableEntry_Set") . "</a></td>";
|
||||
}
|
||||
echo "\t</tr>\n";
|
||||
}
|
||||
echo "</table>";
|
||||
|
||||
include ("../../../camp2011/includes/footer.php");
|
||||
include ("includes/footer.php");
|
||||
?>
|
||||
|
||||
|
@ -1,137 +1,133 @@
|
||||
<?php
|
||||
require_once ('../bootstrap.php');
|
||||
|
||||
$title = "User-Liste";
|
||||
$header = "Editieren der Engelliste";
|
||||
include ("../../../camp2011/includes/header.php");
|
||||
include ("../../../camp2011/includes/funktion_db_list.php");
|
||||
|
||||
if (IsSet($_GET["enterUID"]))
|
||||
{
|
||||
// UserID wurde mit uebergeben --> Aendern...
|
||||
|
||||
echo "Hallo,<br />".
|
||||
"hier kannst du den Eintrag ändern. Unter dem Punkt 'Gekommen' ".
|
||||
"wird der Engel als anwesend markiert, ein Ja bei Aktiv bedeutet, ".
|
||||
"dass der Engel aktiv war und damit ein Anspruch auf ein T-Shirt hat. ".
|
||||
"Wenn T-Shirt ein 'Ja' enthält, bedeutet dies, dass der Engel ".
|
||||
"bereits sein T-Shirt erhalten hat.<br /><br />\n";
|
||||
|
||||
echo "<form action=\"./userSaveNormal.php?action=change\" method=\"POST\">\n";
|
||||
echo "<table border=\"0\">\n";
|
||||
echo "<input type=\"hidden\" name=\"Type\" value=\"Normal\">\n";
|
||||
|
||||
$SQL = "SELECT * FROM `User` WHERE `UID`='". $_GET["enterUID"]. "'";
|
||||
$Erg = mysql_query($SQL, $con);
|
||||
|
||||
if (mysql_num_rows($Erg) != 1)
|
||||
echo "<tr><td>Sorry, der Engel (UID=". $_GET["enterUID"].
|
||||
") wurde in der Liste nicht gefunden.</td></tr>";
|
||||
else
|
||||
{
|
||||
echo "<tr><td>\n";
|
||||
echo "<table>\n";
|
||||
echo " <tr><td>Nick</td><td>".
|
||||
"<input type=\"text\" size=\"40\" name=\"eNick\" value=\"".
|
||||
mysql_result($Erg, 0, "Nick")."\"></td></tr>\n";
|
||||
echo " <tr><td>lastLogIn</td><td>".
|
||||
"<input type=\"text\" size=\"20\" name=\"elastLogIn\" value=\"".
|
||||
mysql_result($Erg, 0, "lastLogIn"). "\" disabled></td></tr>\n";
|
||||
echo " <tr><td>Name</td><td>".
|
||||
"<input type=\"text\" size=\"40\" name=\"eName\" value=\"".
|
||||
mysql_result($Erg, 0, "Name")."\"></td></tr>\n";
|
||||
echo " <tr><td>Vorname</td><td>".
|
||||
"<input type=\"text\" size=\"40\" name=\"eVorname\" value=\"".
|
||||
mysql_result($Erg, 0, "Vorname")."\"></td></tr>\n";
|
||||
echo " <tr><td>Alter</td><td>".
|
||||
"<input type=\"text\" size=\"5\" name=\"eAlter\" value=\"".
|
||||
mysql_result($Erg, 0, "Alter")."\"></td></tr>\n";
|
||||
echo " <tr><td>Telefon</td><td>".
|
||||
"<input type=\"text\" size=\"40\" name=\"eTelefon\" value=\"".
|
||||
mysql_result($Erg, 0, "Telefon")."\"></td></tr>\n";
|
||||
echo " <tr><td>Handy</td><td>".
|
||||
"<input type=\"text\" size=\"40\" name=\"eHandy\" value=\"".
|
||||
mysql_result($Erg, 0, "Handy")."\"></td></tr>\n";
|
||||
echo " <tr><td>DECT</td><td>".
|
||||
"<input type=\"text\" size=\"4\" name=\"eDECT\" value=\"".
|
||||
mysql_result($Erg, 0, "DECT")."\"></td></tr>\n";
|
||||
echo " <tr><td>email</td><td>".
|
||||
"<input type=\"text\" size=\"40\" name=\"eemail\" value=\"".
|
||||
mysql_result($Erg, 0, "email")."\"></td></tr>\n";
|
||||
echo " <tr><td>ICQ</td><td>".
|
||||
"<input type=\"text\" size=\"40\" name=\"eICQ\" value=\"".
|
||||
mysql_result($Erg, 0, "ICQ")."\"></td></tr>\n";
|
||||
echo " <tr><td>jabber</td><td>".
|
||||
"<input type=\"text\" size=\"40\" name=\"ejabber\" value=\"".
|
||||
mysql_result($Erg, 0, "jabber")."\"></td></tr>\n";
|
||||
echo " <tr><td>Size</td><td>".
|
||||
"<input type=\"text\" size=\"5\" name=\"eSize\" value=\"".
|
||||
mysql_result($Erg, 0, "Size")."\"></td></tr>\n";
|
||||
echo " <tr><td>Passwort</td><td>".
|
||||
"<a href=\"./userSaveNormal.php?action=newpw&eUID="
|
||||
.mysql_result($Erg, 0, "UID")."\">neues Kennwort setzen</a></td></tr>\n";
|
||||
|
||||
// Gekommen?
|
||||
echo " <tr><td>Gekommen</td><td>\n";
|
||||
echo " <input type=\"radio\" name=\"eGekommen\" value=\"0\"";
|
||||
if (mysql_result($Erg, 0, "Gekommen")=='0')
|
||||
echo " checked";
|
||||
echo ">No \n";
|
||||
echo " <input type=\"radio\" name=\"eGekommen\" value=\"1\"";
|
||||
if (mysql_result($Erg, 0, "Gekommen")=='1')
|
||||
echo " checked";
|
||||
echo ">Yes \n";
|
||||
echo "</td></tr>\n";
|
||||
|
||||
// Aktiv?
|
||||
echo " <tr><td>Aktiv</td><td>\n";
|
||||
echo " <input type=\"radio\" name=\"eAktiv\" value=\"0\"";
|
||||
if (mysql_result($Erg, 0, "Aktiv")=='0')
|
||||
echo " checked";
|
||||
echo ">No \n";
|
||||
echo " <input type=\"radio\" name=\"eAktiv\" value=\"1\"";
|
||||
if (mysql_result($Erg, 0, "Aktiv")=='1')
|
||||
echo " checked";
|
||||
echo ">Yes \n";
|
||||
echo "</td></tr>\n";
|
||||
|
||||
// T-Shirt bekommen?
|
||||
echo " <tr><td>T-Shirt</td><td>\n";
|
||||
echo " <input type=\"radio\" name=\"eTshirt\" value=\"0\"";
|
||||
if (mysql_result($Erg, 0, "Tshirt")=='0')
|
||||
echo " checked";
|
||||
echo ">No \n";
|
||||
echo " <input type=\"radio\" name=\"eTshirt\" value=\"1\"";
|
||||
if (mysql_result($Erg, 0, "Tshirt")=='1')
|
||||
echo " checked";
|
||||
echo ">Yes \n";
|
||||
echo "</td></tr>\n";
|
||||
|
||||
echo " <tr><td>Hometown</td><td>".
|
||||
"<input type=\"text\" size=\"40\" name=\"Hometown\" value=\"".
|
||||
mysql_result($Erg, 0, "Hometown")."\"></td></tr>\n";
|
||||
|
||||
echo "</table>\n</td><td valign=\"top\">". displayavatar($_GET["enterUID"], FALSE). "</td></tr>";
|
||||
}
|
||||
|
||||
echo "</td></tr>\n";
|
||||
echo "</table>\n<br />\n";
|
||||
echo "<input type=\"hidden\" name=\"enterUID\" value=\"". $_GET["enterUID"]. "\">\n";
|
||||
echo "<input type=\"submit\" value=\"sichern...\">\n";
|
||||
echo "</form>";
|
||||
|
||||
echo "<form action=\"./userSaveNormal.php?action=delete\" method=\"POST\">\n";
|
||||
echo "<input type=\"hidden\" name=\"enterUID\" value=\"". $_GET["enterUID"]. "\">\n";
|
||||
echo "<input type=\"submit\" value=\"löschen...\">\n";
|
||||
echo "</form>";
|
||||
|
||||
|
||||
echo "<hr>";
|
||||
funktion_db_element_list_2row(
|
||||
"Freeloader Shifts",
|
||||
"SELECT `Remove_Time`, `Length`, `Comment` FROM `ShiftFreeloader` WHERE UID=". $_GET["enterUID"]);
|
||||
include ("includes/header.php");
|
||||
include ("includes/funktion_db_list.php");
|
||||
|
||||
if (IsSet ($_GET["enterUID"])) {
|
||||
// UserID wurde mit uebergeben --> Aendern...
|
||||
|
||||
echo "Hallo,<br />" .
|
||||
"hier kannst du den Eintrag ändern. Unter dem Punkt 'Gekommen' " .
|
||||
"wird der Engel als anwesend markiert, ein Ja bei Aktiv bedeutet, " .
|
||||
"dass der Engel aktiv war und damit ein Anspruch auf ein T-Shirt hat. " .
|
||||
"Wenn T-Shirt ein 'Ja' enthält, bedeutet dies, dass der Engel " .
|
||||
"bereits sein T-Shirt erhalten hat.<br /><br />\n";
|
||||
|
||||
echo "<form action=\"./userSaveNormal.php?action=change\" method=\"POST\">\n";
|
||||
echo "<table border=\"0\">\n";
|
||||
echo "<input type=\"hidden\" name=\"Type\" value=\"Normal\">\n";
|
||||
|
||||
$SQL = "SELECT * FROM `User` WHERE `UID`='" . $_GET["enterUID"] . "'";
|
||||
$Erg = mysql_query($SQL, $con);
|
||||
|
||||
if (mysql_num_rows($Erg) != 1)
|
||||
echo "<tr><td>Sorry, der Engel (UID=" . $_GET["enterUID"] .
|
||||
") wurde in der Liste nicht gefunden.</td></tr>";
|
||||
else {
|
||||
echo "<tr><td>\n";
|
||||
echo "<table>\n";
|
||||
echo " <tr><td>Nick</td><td>" .
|
||||
"<input type=\"text\" size=\"40\" name=\"eNick\" value=\"" .
|
||||
mysql_result($Erg, 0, "Nick") . "\"></td></tr>\n";
|
||||
echo " <tr><td>lastLogIn</td><td>" .
|
||||
"<input type=\"text\" size=\"20\" name=\"elastLogIn\" value=\"" .
|
||||
mysql_result($Erg, 0, "lastLogIn") . "\" disabled></td></tr>\n";
|
||||
echo " <tr><td>Name</td><td>" .
|
||||
"<input type=\"text\" size=\"40\" name=\"eName\" value=\"" .
|
||||
mysql_result($Erg, 0, "Name") . "\"></td></tr>\n";
|
||||
echo " <tr><td>Vorname</td><td>" .
|
||||
"<input type=\"text\" size=\"40\" name=\"eVorname\" value=\"" .
|
||||
mysql_result($Erg, 0, "Vorname") . "\"></td></tr>\n";
|
||||
echo " <tr><td>Alter</td><td>" .
|
||||
"<input type=\"text\" size=\"5\" name=\"eAlter\" value=\"" .
|
||||
mysql_result($Erg, 0, "Alter") . "\"></td></tr>\n";
|
||||
echo " <tr><td>Telefon</td><td>" .
|
||||
"<input type=\"text\" size=\"40\" name=\"eTelefon\" value=\"" .
|
||||
mysql_result($Erg, 0, "Telefon") . "\"></td></tr>\n";
|
||||
echo " <tr><td>Handy</td><td>" .
|
||||
"<input type=\"text\" size=\"40\" name=\"eHandy\" value=\"" .
|
||||
mysql_result($Erg, 0, "Handy") . "\"></td></tr>\n";
|
||||
echo " <tr><td>DECT</td><td>" .
|
||||
"<input type=\"text\" size=\"4\" name=\"eDECT\" value=\"" .
|
||||
mysql_result($Erg, 0, "DECT") . "\"></td></tr>\n";
|
||||
echo " <tr><td>email</td><td>" .
|
||||
"<input type=\"text\" size=\"40\" name=\"eemail\" value=\"" .
|
||||
mysql_result($Erg, 0, "email") . "\"></td></tr>\n";
|
||||
echo " <tr><td>ICQ</td><td>" .
|
||||
"<input type=\"text\" size=\"40\" name=\"eICQ\" value=\"" .
|
||||
mysql_result($Erg, 0, "ICQ") . "\"></td></tr>\n";
|
||||
echo " <tr><td>jabber</td><td>" .
|
||||
"<input type=\"text\" size=\"40\" name=\"ejabber\" value=\"" .
|
||||
mysql_result($Erg, 0, "jabber") . "\"></td></tr>\n";
|
||||
echo " <tr><td>Size</td><td>" .
|
||||
"<input type=\"text\" size=\"5\" name=\"eSize\" value=\"" .
|
||||
mysql_result($Erg, 0, "Size") . "\"></td></tr>\n";
|
||||
echo " <tr><td>Passwort</td><td>" .
|
||||
"<a href=\"./userSaveNormal.php?action=newpw&eUID=" .
|
||||
mysql_result($Erg, 0, "UID") . "\">neues Kennwort setzen</a></td></tr>\n";
|
||||
|
||||
// Gekommen?
|
||||
echo " <tr><td>Gekommen</td><td>\n";
|
||||
echo " <input type=\"radio\" name=\"eGekommen\" value=\"0\"";
|
||||
if (mysql_result($Erg, 0, "Gekommen") == '0')
|
||||
echo " checked";
|
||||
echo ">No \n";
|
||||
echo " <input type=\"radio\" name=\"eGekommen\" value=\"1\"";
|
||||
if (mysql_result($Erg, 0, "Gekommen") == '1')
|
||||
echo " checked";
|
||||
echo ">Yes \n";
|
||||
echo "</td></tr>\n";
|
||||
|
||||
// Aktiv?
|
||||
echo " <tr><td>Aktiv</td><td>\n";
|
||||
echo " <input type=\"radio\" name=\"eAktiv\" value=\"0\"";
|
||||
if (mysql_result($Erg, 0, "Aktiv") == '0')
|
||||
echo " checked";
|
||||
echo ">No \n";
|
||||
echo " <input type=\"radio\" name=\"eAktiv\" value=\"1\"";
|
||||
if (mysql_result($Erg, 0, "Aktiv") == '1')
|
||||
echo " checked";
|
||||
echo ">Yes \n";
|
||||
echo "</td></tr>\n";
|
||||
|
||||
// T-Shirt bekommen?
|
||||
echo " <tr><td>T-Shirt</td><td>\n";
|
||||
echo " <input type=\"radio\" name=\"eTshirt\" value=\"0\"";
|
||||
if (mysql_result($Erg, 0, "Tshirt") == '0')
|
||||
echo " checked";
|
||||
echo ">No \n";
|
||||
echo " <input type=\"radio\" name=\"eTshirt\" value=\"1\"";
|
||||
if (mysql_result($Erg, 0, "Tshirt") == '1')
|
||||
echo " checked";
|
||||
echo ">Yes \n";
|
||||
echo "</td></tr>\n";
|
||||
|
||||
echo " <tr><td>Hometown</td><td>" .
|
||||
"<input type=\"text\" size=\"40\" name=\"Hometown\" value=\"" .
|
||||
mysql_result($Erg, 0, "Hometown") . "\"></td></tr>\n";
|
||||
|
||||
echo "</table>\n</td><td valign=\"top\">" . displayavatar($_GET["enterUID"], FALSE) . "</td></tr>";
|
||||
}
|
||||
|
||||
echo "</td></tr>\n";
|
||||
echo "</table>\n<br />\n";
|
||||
echo "<input type=\"hidden\" name=\"enterUID\" value=\"" . $_GET["enterUID"] . "\">\n";
|
||||
echo "<input type=\"submit\" value=\"sichern...\">\n";
|
||||
echo "</form>";
|
||||
|
||||
echo "<form action=\"./userSaveNormal.php?action=delete\" method=\"POST\">\n";
|
||||
echo "<input type=\"hidden\" name=\"enterUID\" value=\"" . $_GET["enterUID"] . "\">\n";
|
||||
echo "<input type=\"submit\" value=\"löschen...\">\n";
|
||||
echo "</form>";
|
||||
|
||||
echo "<hr>";
|
||||
funktion_db_element_list_2row("Freeloader Shifts", "SELECT `Remove_Time`, `Length`, `Comment` FROM `ShiftFreeloader` WHERE UID=" . $_GET["enterUID"]);
|
||||
}
|
||||
|
||||
include ("../../../camp2011/includes/footer.php");
|
||||
include ("includes/footer.php");
|
||||
?>
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue