diff --git a/www-ssl/admin/news.php b/www-ssl/admin/news.php index f25eab93..b6d9dc69 100644 --- a/www-ssl/admin/news.php +++ b/www-ssl/admin/news.php @@ -1,9 +1,10 @@ diff --git a/www-ssl/css/base.css b/www-ssl/css/base.css index b6017ad2..0fe3e5a9 100644 --- a/www-ssl/css/base.css +++ b/www-ssl/css/base.css @@ -33,7 +33,7 @@ footer p { margin: 0 5%; } -td { +td, dt, dd { padding: 4px; } diff --git a/www-ssl/makeuser.php b/www-ssl/makeuser.php index 785de1e8..a67f4bd5 100644 --- a/www-ssl/makeuser.php +++ b/www-ssl/makeuser.php @@ -1,181 +1,214 @@ 0) - $error = Get_Text("makeuser_error_nick1") . $_POST["Nick"] . Get_Text("makeuser_error_nick3"); - elseif(strlen($_POST["email"]) <= 6 && strstr($_POST["email"], "@") == FALSE && strstr($_POST["email"], ".") == false) - $error = Get_Text("makeuser_error_mail"); - elseif(!is_numeric($_POST["Alter"])) - $error = Get_Text("makeuser_error_Alter"); - elseif($_POST["Passwort"] != $_POST["Passwort2"]) - $error = Get_Text("makeuser_error_password1"); - elseif(strlen($_POST["Passwort"]) < 6) - $error = Get_Text("makeuser_error_password2"); - else { - $_POST["Passwort"] = PassCrypt($_POST["Passwort"]); - unset($_POST["Passwort2"]); + // user vorhanden? + $SQLans = "SELECT UID FROM `User` WHERE `Nick`='" . $_POST["Nick"] . "'"; + $Ergans = mysql_query($SQLans, $con); - $SQL = "INSERT INTO `User` (". - "`Nick` , ". "`Name` , ". - "`Vorname`, ". "`Alter` , ". - "`Telefon`, ". "`DECT`, ". - "`Handy`, ". "`email`, ". - "`ICQ`, ". "`jabber`, ". - "`Size`, ". "`Passwort`, ". - "`Art` , ". "`kommentar`, ". - "`Hometown`,". "`CreateDate` ) ". - "VALUES ( ". - "'". $_POST["Nick"]. "', ". "'". $_POST["Name"]. "', ". - "'". $_POST["Vorname"]. "', ". "'". $_POST["Alter"]. "', ". - "'". $_POST["Telefon"]. "', ". "'". $_POST["DECT"]. "', ". - "'". $_POST["Handy"]. "', ". "'". $_POST["email"]. "', ". - "'". $_POST["ICQ"]. "', ". "'". $_POST["jabber"]. "', ". - "'". $_POST["Size"]. "', ". "'". $_POST["Passwort"]. "', ". - "'". $_POST["Art"]. "', ". "'". $_POST["kommentar"]. "', ". - "'". $_POST["Hometown"]. "',". "NOW());"; - $Erg = mysql_query($SQL, $con); + if (strlen($_POST["Nick"]) < 2) + $error = Get_Text("makeuser_error_nick1") . $_POST["Nick"] . Get_Text("makeuser_error_nick2"); + elseif (mysql_num_rows($Ergans) > 0) $error = Get_Text("makeuser_error_nick1") . $_POST["Nick"] . Get_Text("makeuser_error_nick3"); + elseif (strlen($_POST["email"]) <= 6 && strstr($_POST["email"], "@") == FALSE && strstr($_POST["email"], ".") == false) $error = Get_Text("makeuser_error_mail"); + elseif (!is_numeric($_POST["Alter"])) $error = Get_Text("makeuser_error_Alter"); + elseif ($_POST["Passwort"] != $_POST["Passwort2"]) $error = Get_Text("makeuser_error_password1"); + elseif (strlen($_POST["Passwort"]) < 6) $error = Get_Text("makeuser_error_password2"); + else { + $_POST["Passwort"] = PassCrypt($_POST["Passwort"]); + unset ($_POST["Passwort2"]); - if ($Erg != 1) { - echo Get_Text("makeuser_error_write1") . "
\n"; - $error = mysql_error($con); - } else { - echo "

" . Get_Text("makeuser_writeOK") . "\n"; + $SQL = "INSERT INTO `User` (" . + "`Nick` , " . "`Name` , " . + "`Vorname`, " . "`Alter` , " . + "`Telefon`, " . "`DECT`, " . + "`Handy`, " . "`email`, " . + "`ICQ`, " . "`jabber`, " . + "`Size`, " . "`Passwort`, " . + "`Art` , " . "`kommentar`, " . + "`Hometown`," . "`CreateDate` ) " . + "VALUES ( " . + "'" . $_POST["Nick"] . "', " . "'" . $_POST["Name"] . "', " . + "'" . $_POST["Vorname"] . "', " . "'" . $_POST["Alter"] . "', " . + "'" . $_POST["Telefon"] . "', " . "'" . $_POST["DECT"] . "', " . + "'" . $_POST["Handy"] . "', " . "'" . $_POST["email"] . "', " . + "'" . $_POST["ICQ"] . "', " . "'" . $_POST["jabber"] . "', " . + "'" . $_POST["Size"] . "', " . "'" . $_POST["Passwort"] . "', " . + "'" . $_POST["Art"] . "', " . "'" . $_POST["kommentar"] . "', " . + "'" . $_POST["Hometown"] . "'," . "NOW());"; + $Erg = mysql_query($SQL, $con); - $SQL2 = "SELECT `UID` FROM `User` WHERE `Nick`='" . $_POST["Nick"] . "';"; - $Erg2 = mysql_query($SQL2, $con); - $Data = mysql_fetch_array($Erg2); + if ($Erg != 1) { + echo Get_Text("makeuser_error_write1") . "
\n"; + $error = mysql_error($con); + } else { + echo "

" . Get_Text("makeuser_writeOK") . "\n"; - $SQL3 = "INSERT INTO `UserCVS` (`UID`) VALUES ('" . $Data["UID"] . "');"; - $Erg3 = mysql_query($SQL3, $con); + $SQL2 = "SELECT `UID` FROM `User` WHERE `Nick`='" . $_POST["Nick"] . "';"; + $Erg2 = mysql_query($SQL2, $con); + $Data = mysql_fetch_array($Erg2); - if ($Erg3 != 1) { - echo "

". Get_Text("makeuser_error_write2"). "
\n"; - $error = mysql_error($con); - } else { - echo Get_Text("makeuser_writeOK2") . "
\n"; - echo "

" . Get_Text("makeuser_writeOK3") . "

\n"; - } + $SQL3 = "INSERT INTO `UserCVS` (`UID`) VALUES ('" . $Data["UID"] . "');"; + $Erg3 = mysql_query($SQL3, $con); - echo Get_Text("makeuser_writeOK4") . "

\n

\n"; - $success = "any"; + if ($Erg3 != 1) { + echo "

" . Get_Text("makeuser_error_write2") . "
\n"; + $error = mysql_error($con); + } else { + echo Get_Text("makeuser_writeOK2") . "
\n"; + echo "

" . Get_Text("makeuser_writeOK3") . "

\n"; + } - if (isset($SubscribeMailinglist)) { - if ($_POST["subscribe-mailinglist"] == "") { - $headers = "From: " . $_POST["email"] . "\r\n" . - "X-Mailer: PHP/" . phpversion(); - mail($SubscribeMailinglist, "subject", "message", $headers); - } - } - } - } + echo Get_Text("makeuser_writeOK4") . "

\n

\n"; + $success = "any"; - if(isset($error)) - echo "

\n" . $error . "\n

\n\n"; - } else { - // init vars - $_POST["Nick"] = ""; - $_POST["Name"] = ""; - $_POST["Vorname"] = ""; - $_POST["Alter"] = ""; - $_POST["Telefon"] = ""; - $_POST["DECT"] = ""; - $_POST["Handy"] = ""; - $_POST["email"] = ""; - $_POST["subscribe-mailinglist"] = ""; - $_POST["ICQ"] = ""; - $_POST["jabber"] = ""; - $_POST["Size"] = "L"; - $_POST["Art"] = ""; - $_POST["kommentar"] = ""; - $_POST["Hometown"] = ""; - } + if (isset ($SubscribeMailinglist)) { + if ($_POST["subscribe-mailinglist"] == "") { + $headers = "From: " . $_POST["email"] . "\r\n" . + "X-Mailer: PHP/" . phpversion(); + mail($SubscribeMailinglist, "subject", "message", $headers); + } + } + } + } - if($success == "none") { - echo "

" . Get_Text("makeuser_text0") . "

\n"; - echo "

" . Get_Text("makeuser_text1") . "

\n"; - echo "
\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; + if (isset ($error)) + echo "

\n" . $error . "\n

\n\n"; +} else { + // init vars + $_POST["Nick"] = ""; + $_POST["Name"] = ""; + $_POST["Vorname"] = ""; + $_POST["Alter"] = ""; + $_POST["Telefon"] = ""; + $_POST["DECT"] = ""; + $_POST["Handy"] = ""; + $_POST["email"] = ""; + $_POST["subscribe-mailinglist"] = ""; + $_POST["ICQ"] = ""; + $_POST["jabber"] = ""; + $_POST["Size"] = "L"; + $_POST["Art"] = ""; + $_POST["kommentar"] = ""; + $_POST["Hometown"] = ""; +} - if(isset($SubscribeMailinglist)) - echo "\n"; +if ($success == "none") { + echo "

" . Get_Text("makeuser_text0") . "

\n"; + echo "

" . Get_Text("makeuser_text1") . "

\n"; + echo "\n"; + echo "
" . Get_Text("makeuser_Nickname") . "*
" . Get_Text("makeuser_Nachname") . "
". Get_Text("makeuser_Vorname") . "
". Get_Text("makeuser_Alter") . "
". Get_Text("makeuser_Telefon"). "
". Get_Text("makeuser_DECT"). "\n"; - echo "
". Get_Text("makeuser_Handy"). "
". Get_Text("makeuser_E-Mail"). "*
". Get_Text("makeuser_subscribe-mailinglist"). "($SubscribeMailinglist)
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - $Sql = "SELECT * FROM `EngelType` ORDER BY `NAME`"; - $Erg = mysql_query($Sql, $con); + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
" . Get_Text("makeuser_Nickname") . "*
" . Get_Text("makeuser_Nachname") . "
" . Get_Text("makeuser_Vorname") . "
" . Get_Text("makeuser_Alter") . "
" . Get_Text("makeuser_Telefon") . "
" . Get_Text("makeuser_DECT") . "\n"; + echo "
" . Get_Text("makeuser_Handy") . "
" . Get_Text("makeuser_E-Mail") . "*
ICQ
jabber
". Get_Text("makeuser_T-Shirt"). " Grösse*\n"; - echo "\n"; - echo "
". Get_Text("makeuser_Engelart"). "\n"; - echo "
" . Get_Text("makeuser_subscribe-mailinglist") . "($SubscribeMailinglist)
ICQ
jabber
" . Get_Text("makeuser_T-Shirt") . " Grösse*\n"; + echo "\n"; + echo "
" . Get_Text("makeuser_Engelart") . "\n"; + echo "\n"; - echo "
". Get_Text("makeuser_text2"). "
". Get_Text("makeuser_Hometown"). "
". Get_Text("makeuser_Passwort"). "*
". Get_Text("makeuser_Passwort2"). "*
 
\n"; - echo "
\n"; - Print_Text("makeuser_text3"); - } + echo ">$Name\n"; + } - include "../includes/footer.php"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "" . Get_Text("makeuser_text2") . "\n"; + echo "\n"; + echo "\n"; + echo "" . Get_Text("makeuser_Hometown") . "\n"; + echo "" . Get_Text("makeuser_Passwort") . "*\n"; + echo "" . Get_Text("makeuser_Passwort2") . "*\n"; + echo " \n"; + echo "\n"; + echo "\n"; + Print_Text("makeuser_text3"); +} + +include "includes/footer.php"; ?> diff --git a/www-ssl/nonpublic/auth.php b/www-ssl/nonpublic/auth.php index 2bd6f86f..7d58988c 100644 --- a/www-ssl/nonpublic/auth.php +++ b/www-ssl/nonpublic/auth.php @@ -1,32 +1,43 @@ 'success', 'rights' => $CVS); - echo json_encode($msg); - } else - echo json_encode(array('status' => 'failed')); - } else - echo json_encode(array('status' => 'failed')); - } else - echo json_encode(array('status' => 'failed')); + // get CVS import Data + $SQL = "SELECT * FROM `UserCVS` WHERE `UID`='" . $UID . "'"; + $Erg_CVS = mysql_query($SQL, $con); + $CVS = mysql_fetch_array($Erg_CVS); + + $msg = array ( + 'status' => 'success', + 'rights' => $CVS + ); + echo json_encode($msg); + } else + echo json_encode(array ( + 'status' => 'failed' + )); + } else + echo json_encode(array ( + 'status' => 'failed' + )); +} else + echo json_encode(array ( + 'status' => 'failed' + )); ?> diff --git a/www-ssl/nonpublic/einstellungen.php b/www-ssl/nonpublic/einstellungen.php index 6ddb093a..81dda869 100644 --- a/www-ssl/nonpublic/einstellungen.php +++ b/www-ssl/nonpublic/einstellungen.php @@ -1,12 +1,14 @@ \n\n"; - Print_Text(13); +$title = "Himmel"; +$header = "Deine persönlichen Einstellungen"; +include "includes/header.php"; +include "includes/crypt.php"; + +if (!isset ($_POST["action"])) { + echo Get_Text("Hallo") . $_SESSION['Nick'] . ",
\n\n"; + Print_Text(13); ?>
@@ -69,7 +71,9 @@ @@ -83,7 +87,9 @@ if($_SESSION['CVS']["Change T_Shirt Size"] == "Y") { "> @@ -147,7 +153,11 @@ if($_SESSION['CVS']["Change T_Shirt Size"] == "Y") { @@ -155,224 +165,211 @@ if($_SESSION['CVS']["Change T_Shirt Size"] == "Y") { \n
\n
\n\n"; - echo Get_Text('pub_einstellungen_PictureUpload') . "
"; - echo "
\n"; - echo "\n"; - echo "\n"; - echo "(max ". get_cfg_var("post_max_size"). "Byte)
\n"; - echo "\n"; - echo "
\n"; - } - switch( GetPicturShow( $_SESSION['UID'])) { - case 'Y': - echo Get_Text('pub_einstellungen_PictureShow'). "
"; - echo displayPictur($_SESSION['UID'], 0); - echo "
\n"; - echo "\n"; - echo "\n"; - echo "
\n"; - break; - case 'N': - echo Get_Text('pub_einstellungen_PictureNoShow'). "
"; - echo displayPictur($_SESSION['UID'], 0); - echo "
\n"; - echo "\n"; - echo "\n"; - echo "
\n"; - echo "
\n
\n
\n\n"; - case '': - echo "
\n
\n
\n\n"; - echo Get_Text(22). "
"; - echo "\n
\n"; - echo "\n"; - echo "\n"; - echo "\n\n\n"; - echo "\n"; - echo "\n\n"; - echo "
". Get_Text(23). "
\n"; - echo "\n"; + echo "\n"; + echo "(max " . get_cfg_var("post_max_size") . "Byte)
\n"; + echo "\n"; + echo "\n"; + } - echo "  \n"; - echo "\n"; - echo "
\n"; - echo "\n"; - echo "\n"; - break; - } //CASE + switch (GetPicturShow($_SESSION['UID'])) { + case 'Y' : + echo Get_Text('pub_einstellungen_PictureShow') . "
"; + echo displayPictur($_SESSION['UID'], 0); + echo "
\n"; + echo "\n"; + echo "\n"; + echo "
\n"; + break; + case 'N' : + echo Get_Text('pub_einstellungen_PictureNoShow') . "
"; + echo displayPictur($_SESSION['UID'], 0); + echo "
\n"; + echo "\n"; + echo "\n"; + echo "
\n"; + echo "
\n
\n
\n\n"; + case '' : + echo "
\n
\n
\n\n"; + echo Get_Text(22) . "
"; + echo "\n
\n"; + echo "\n"; + echo "\n"; + echo "\n\n\n"; + echo "\n"; + echo "\n\n"; + echo "
" . Get_Text(23) . "
\n"; + echo "  \n"; + echo "\n"; + echo "
\n"; + echo "\n"; + echo "
\n"; + break; + } //CASE - if ($Erg==1) { - Print_Text(28); - } else { - Print_Text(29); - } - } else { - Print_Text(30); - } - } else { - Print_Text(31); - } - break; +} else { + switch ($_POST["action"]) { + case 'set' : + if ($_POST["new1"] == $_POST["new2"]) { + Print_Text(25); + $sql = "SELECT * FROM `User` WHERE `UID`='" . $_SESSION['UID'] . "'"; + $Erg = mysql_query($sql, $con); - case 'colour': + if (PassCrypt($_POST["old"]) == mysql_result($Erg, 0, "Passwort")) { + Print_Text(26); + Print_Text(27); + $usql = "UPDATE `User` SET `Passwort`='" . PassCrypt($_POST["new1"]) . "' WHERE `UID`='" . $_SESSION['UID'] . "' LIMIT 1"; + $Erg = mysql_query($usql, $con); - $chsql="UPDATE `User` SET ". - "`color`= '". $_POST["colourid"]. "', ". - "`Menu`= '". $_POST["eMenu"]. "' ". - "WHERE `UID`='". $_SESSION['UID']. "' LIMIT 1"; - $Erg = mysql_query($chsql, $con); - echo mysql_error($con); - $_SESSION['color']=$_POST["colourid"]; - $_SESSION['Menu']=$_POST["eMenu"]; - if ($Erg==1) { - Print_Text(32); - } else { - Print_Text(29); - } - break; + if ($Erg == 1) { + Print_Text(28); + } else { + Print_Text(29); + } + } else { + Print_Text(30); + } + } else { + Print_Text(31); + } + break; -case 'sprache': + case 'colour' : - $chsql="UPDATE `User` SET `Sprache` = '". $_POST["language"]. "' WHERE `UID`='". $_SESSION['UID']. "' LIMIT 1"; - $Erg = mysql_query($chsql, $con); - $_SESSION['Sprache']=$_POST["language"]; - if ($Erg==1) { - Print_Text(33); - } else { - Print_Text(29); - } - break; + $chsql = "UPDATE `User` SET " . + "`color`= '" . $_POST["colourid"] . "', " . + "`Menu`= '" . $_POST["eMenu"] . "' " . + "WHERE `UID`='" . $_SESSION['UID'] . "' LIMIT 1"; + $Erg = mysql_query($chsql, $con); + echo mysql_error($con); + $_SESSION['color'] = $_POST["colourid"]; + $_SESSION['Menu'] = $_POST["eMenu"]; + if ($Erg == 1) { + Print_Text(32); + } else { + Print_Text(29); + } + break; -case 'avatar': - $chsql="UPDATE `User` SET `Avatar`='". $_POST["eAvatar"]. "' WHERE `UID`='". $_SESSION['UID']. "' LIMIT 1"; - $Erg = mysql_query($chsql, $con); - $_SESSION['Avatar']=$_POST["eAvatar"]; - if ($Erg==1) - Print_Text(34); - else - Print_Text(29); - break; + case 'sprache' : -case 'setUserData': - if( $_SESSION['CVS'][ "Change T_Shirt Size" ] == "Y" ) - { - $chsql= "UPDATE `User` SET ". - "`Nick`='". $_POST["eNick"]. "', `Name`='". $_POST["eName"]. "', ". - "`Vorname`='". $_POST["eVorname"]. "', `Alter`='". $_POST["eAlter"]. "', ". - "`Telefon`='". $_POST["eTelefon"]. "', `Handy`='". $_POST["eHandy"]. "', ". - "`DECT`='". $_POST["eDECT"]. "', `email`='". $_POST["eemail"]. "', ". - "`ICQ`='". $_POST["eICQ"]. "', `jabber`='". $_POST["ejabber"]."', ". - "`Hometown`='". $_POST["Hometown"]. "', `Size`='". $_POST["Sizeid"]. "' ". - "WHERE `UID`='". $_SESSION['UID']. "' LIMIT 1;"; - } - else - { - $chsql= "UPDATE `User` SET ". - "`Nick`='". $_POST["eNick"]. "', `Name`='". $_POST["eName"]. "', ". - "`Vorname`='". $_POST["eVorname"]. "', `Alter`='". $_POST["eAlter"]. "', ". - "`Telefon`='". $_POST["eTelefon"]. "', `Handy`='". $_POST["eHandy"]. "', ". - "`DECT`='". $_POST["eDECT"]. "', `email`='". $_POST["eemail"]. "', ". - "`ICQ`='". $_POST["eICQ"]. "', `jabber`='". $_POST["ejabber"]."', ". - "`Hometown`='". $_POST["Hometown"]. "' ". - "WHERE `UID`='". $_SESSION['UID']. "' LIMIT 1;"; - } - $Erg = mysql_query($chsql, $con); + $chsql = "UPDATE `User` SET `Sprache` = '" . $_POST["language"] . "' WHERE `UID`='" . $_SESSION['UID'] . "' LIMIT 1"; + $Erg = mysql_query($chsql, $con); + $_SESSION['Sprache'] = $_POST["language"]; + if ($Erg == 1) { + Print_Text(33); + } else { + Print_Text(29); + } + break; - if ($Erg==1) - { - $_SESSION['Nick'] = $_POST["eNick"]; - $_SESSION['Name'] = $_POST["eName"]; - $_SESSION['Vorname'] = $_POST["eVorname"]; - $_SESSION['Alter'] = $_POST["eAlter"]; - $_SESSION['Telefon'] = $_POST["eTelefon"]; - $_SESSION['Handy'] = $_POST["eHandy"]; - $_SESSION['DECT'] = $_POST["eDECT"]; - $_SESSION['email'] = $_POST["eemail"]; - $_SESSION['ICQ'] = $_POST["eICQ"]; - $_SESSION['jabber'] = $_POST["ejabber"]; - $_SESSION['Hometown'] = $_POST["Hometown"]; - if( $_SESSION['CVS'][ "Change T_Shirt Size" ] == "Y" ) - { - $_SESSION['Size']=$_POST["Sizeid"]; - } - else if( $_SESSION['Size'] != $_POST["Sizeid"]) - { - array_push($error_messages, "einstellungen.php, change t-shirt size not allowed\n"); - } + case 'avatar' : + $chsql = "UPDATE `User` SET `Avatar`='" . $_POST["eAvatar"] . "' WHERE `UID`='" . $_SESSION['UID'] . "' LIMIT 1"; + $Erg = mysql_query($chsql, $con); + $_SESSION['Avatar'] = $_POST["eAvatar"]; + if ($Erg == 1) + Print_Text(34); + else + Print_Text(29); + break; - - Print_Text("pub_einstellungen_UserDateSaved"); - } - else - { - Print_Text(29); - echo mysql_error( $con); - } - break; + case 'setUserData' : + if ($_SESSION['CVS']["Change T_Shirt Size"] == "Y") { + $chsql = "UPDATE `User` SET " . + "`Nick`='" . $_POST["eNick"] . "', `Name`='" . $_POST["eName"] . "', " . + "`Vorname`='" . $_POST["eVorname"] . "', `Alter`='" . $_POST["eAlter"] . "', " . + "`Telefon`='" . $_POST["eTelefon"] . "', `Handy`='" . $_POST["eHandy"] . "', " . + "`DECT`='" . $_POST["eDECT"] . "', `email`='" . $_POST["eemail"] . "', " . + "`ICQ`='" . $_POST["eICQ"] . "', `jabber`='" . $_POST["ejabber"] . "', " . + "`Hometown`='" . $_POST["Hometown"] . "', `Size`='" . $_POST["Sizeid"] . "' " . + "WHERE `UID`='" . $_SESSION['UID'] . "' LIMIT 1;"; + } else { + $chsql = "UPDATE `User` SET " . + "`Nick`='" . $_POST["eNick"] . "', `Name`='" . $_POST["eName"] . "', " . + "`Vorname`='" . $_POST["eVorname"] . "', `Alter`='" . $_POST["eAlter"] . "', " . + "`Telefon`='" . $_POST["eTelefon"] . "', `Handy`='" . $_POST["eHandy"] . "', " . + "`DECT`='" . $_POST["eDECT"] . "', `email`='" . $_POST["eemail"] . "', " . + "`ICQ`='" . $_POST["eICQ"] . "', `jabber`='" . $_POST["ejabber"] . "', " . + "`Hometown`='" . $_POST["Hometown"] . "' " . + "WHERE `UID`='" . $_SESSION['UID'] . "' LIMIT 1;"; + } + $Erg = mysql_query($chsql, $con); -case 'sendPicture': - if( $_FILES["file"]["size"] > 0) - { - if( ($_FILES["file"]["type"] == "image/jpeg") || - ($_FILES["file"]["type"] == "image/png") || - ($_FILES["file"]["type"] == "image/gif") ) - { - $data = addslashes(fread(fopen($_FILES["file"]["tmp_name"], "r"), filesize($_FILES["file"]["tmp_name"]))); + if ($Erg == 1) { + $_SESSION['Nick'] = $_POST["eNick"]; + $_SESSION['Name'] = $_POST["eName"]; + $_SESSION['Vorname'] = $_POST["eVorname"]; + $_SESSION['Alter'] = $_POST["eAlter"]; + $_SESSION['Telefon'] = $_POST["eTelefon"]; + $_SESSION['Handy'] = $_POST["eHandy"]; + $_SESSION['DECT'] = $_POST["eDECT"]; + $_SESSION['email'] = $_POST["eemail"]; + $_SESSION['ICQ'] = $_POST["eICQ"]; + $_SESSION['jabber'] = $_POST["ejabber"]; + $_SESSION['Hometown'] = $_POST["Hometown"]; + if ($_SESSION['CVS']["Change T_Shirt Size"] == "Y") { + $_SESSION['Size'] = $_POST["Sizeid"]; + } else + if ($_SESSION['Size'] != $_POST["Sizeid"]) { + array_push($error_messages, "einstellungen.php, change t-shirt size not allowed\n"); + } - if( GetPicturShow( $_SESSION['UID']) == "") - $SQL = "INSERT INTO `UserPicture` ". - "( `UID`,`Bild`, `ContentType`, `show`) ". - "VALUES ('". $_SESSION['UID']. "', '$data', '". $_FILES["file"]["type"]. "', 'N')"; - else - $SQL = "UPDATE `UserPicture` SET ". - "`Bild`='$data', ". - "`ContentType`='". $_FILES["file"]["type"]. "', ". - "`show`='N' ". - "WHERE `UID`='". $_SESSION['UID']. "'"; - - $res = mysql_query( $SQL, $con); - if( $res) - Print_Text("pub_einstellungen_send_OK"); - else - Print_Text("pub_einstellungen_send_KO"); - - echo "
('" . $_FILES["file"]["name"] . "', MIME-Type: " . $_FILES["file"]["type"]. ", " . $_FILES["file"]["size"]. " Byte)
"; - } - else - Print_Text("pub_einstellungen_send_KO"); - } - else - Print_Text("pub_einstellungen_send_KO"); - break; + Print_Text("pub_einstellungen_UserDateSaved"); + } else { + Print_Text(29); + echo mysql_error($con); + } + break; -case 'delPicture': - $chsql="DELETE FROM `UserPicture` WHERE `UID`='". $_SESSION['UID']. "' LIMIT 1"; - $Erg = mysql_query($chsql, $con); - if ($Erg==1) - Print_Text("pub_einstellungen_del_OK"); - else - Print_Text("pub_einstellungen_del_KO"); - Break; + case 'sendPicture' : + if ($_FILES["file"]["size"] > 0) { + if (($_FILES["file"]["type"] == "image/jpeg") || ($_FILES["file"]["type"] == "image/png") || ($_FILES["file"]["type"] == "image/gif")) { + $data = addslashes(fread(fopen($_FILES["file"]["tmp_name"], "r"), filesize($_FILES["file"]["tmp_name"]))); + + if (GetPicturShow($_SESSION['UID']) == "") + $SQL = "INSERT INTO `UserPicture` " . + "( `UID`,`Bild`, `ContentType`, `show`) " . + "VALUES ('" . $_SESSION['UID'] . "', '$data', '" . $_FILES["file"]["type"] . "', 'N')"; + else + $SQL = "UPDATE `UserPicture` SET " . + "`Bild`='$data', " . + "`ContentType`='" . $_FILES["file"]["type"] . "', " . + "`show`='N' " . + "WHERE `UID`='" . $_SESSION['UID'] . "'"; + + $res = mysql_query($SQL, $con); + if ($res) + Print_Text("pub_einstellungen_send_OK"); + else + Print_Text("pub_einstellungen_send_KO"); + + echo "
('" . $_FILES["file"]["name"] . "', MIME-Type: " . $_FILES["file"]["type"] . ", " . $_FILES["file"]["size"] . " Byte)
"; + } else + Print_Text("pub_einstellungen_send_KO"); + } else + Print_Text("pub_einstellungen_send_KO"); + break; + + case 'delPicture' : + $chsql = "DELETE FROM `UserPicture` WHERE `UID`='" . $_SESSION['UID'] . "' LIMIT 1"; + $Erg = mysql_query($chsql, $con); + if ($Erg == 1) + Print_Text("pub_einstellungen_del_OK"); + else + Print_Text("pub_einstellungen_del_KO"); + Break; + } } -} -include ("../../../camp2011/includes/footer.php"); +include ("includes/footer.php"); ?> diff --git a/www-ssl/nonpublic/engelbesprechung.php b/www-ssl/nonpublic/engelbesprechung.php index 0f2892b7..7ff684d4 100644 --- a/www-ssl/nonpublic/engelbesprechung.php +++ b/www-ssl/nonpublic/engelbesprechung.php @@ -1,27 +1,29 @@ " . mysql_result($Erg, $n, "Betreff") . ""; +// anzahl zeilen +$Zeilen = mysql_num_rows($Erg); - // Show Admin Page - if($_SESSION['CVS']["admin/news.php"] == "Y") - echo " [edit]"; +for ($n = 0; $n < $Zeilen; $n++) { + if (mysql_result($Erg, $n, "Treffen") == "1") { + echo "

" . mysql_result($Erg, $n, "Betreff") . ""; - echo "
   ".mysql_result($Erg, $n, "Datum").", "; - echo UID2Nick(mysql_result($Erg, $n, "UID"))."

\n"; - echo "

".nl2br(mysql_result($Erg, $n, "Text"))."

\n"; - } - } + // Show Admin Page + if ($_SESSION['CVS']["admin/news.php"] == "Y") + echo " [edit]"; - include ("../../../camp2011/includes/footer.php"); + echo "
   " . mysql_result($Erg, $n, "Datum") . ", "; + echo UID2Nick(mysql_result($Erg, $n, "UID")) . "

\n"; + echo "

" . nl2br(mysql_result($Erg, $n, "Text")) . "

\n"; + } +} + +include ("includes/footer.php"); ?> diff --git a/www-ssl/nonpublic/faq.php b/www-ssl/nonpublic/faq.php index 7f768282..fcc17158 100644 --- a/www-ssl/nonpublic/faq.php +++ b/www-ssl/nonpublic/faq.php @@ -1,11 +1,13 @@

@@ -14,56 +16,58 @@ ">
".Get_Text(37)."

\n".nl2br($_POST["frage"])."

\n".Get_Text(38)."
\n"; + echo "" . Get_Text(37) . "

\n" . nl2br($_POST["frage"]) . "

\n" . Get_Text(38) . "
\n"; -$SQL = "INSERT INTO `Questions` VALUES ('', '".$_SESSION['UID']."', '". $_POST["frage"]. "', '', '')"; -$Erg = mysql_query($SQL, $con); + $SQL = "INSERT INTO `Questions` VALUES ('', '" . $_SESSION['UID'] . "', '" . $_POST["frage"] . "', '', '')"; + $Erg = mysql_query($SQL, $con); } // Bisherige Anfragen: -echo "
\n".Get_Text(39)."
\n"; +echo "
\n" . Get_Text(39) . "
\n"; echo "
\n"; -echo "
".Get_Text(40)."
\n"; +echo "
" . Get_Text(40) . "
\n"; -$SQL = "SELECT * FROM `Questions` WHERE `UID` = ". $_SESSION['UID']. " AND `AID`='0' ORDER BY 'QID' DESC"; +$SQL = "SELECT * FROM `Questions` WHERE `UID` = " . $_SESSION['UID'] . " AND `AID`='0' ORDER BY 'QID' DESC"; $Erg = mysql_query($SQL, $con); // anzahl zeilen -$Zeilen = mysql_num_rows($Erg); +$Zeilen = mysql_num_rows($Erg); -if ($Zeilen==0){ - Print_Text(41); +if ($Zeilen == 0) { + Print_Text(41); } else { - for ($n = 0 ; $n < $Zeilen ; $n++) { - echo "

".nl2br(mysql_result($Erg, $n, "Question"))."
\n"; -// Es gibt ja noch keine Antwort: -// echo "

".nl2br(mysql_result($Erg, $n, "Answer"))."

\n"; - echo "\n
---
"; - } + for ($n = 0; $n < $Zeilen; $n++) { + echo "

" . nl2br(mysql_result($Erg, $n, "Question")) . "
\n"; + // Es gibt ja noch keine Antwort: + // echo "

".nl2br(mysql_result($Erg, $n, "Answer"))."

\n"; + echo "\n
---
"; + } } echo "
\n"; -echo "
".Get_Text(42)."
\n"; -$SQL = "SELECT * FROM `Questions` WHERE `UID`='".$_SESSION['UID']."' and `AID`<>'0' ORDER BY 'QID' DESC"; +echo "
" . Get_Text(42) . "
\n"; +$SQL = "SELECT * FROM `Questions` WHERE `UID`='" . $_SESSION['UID'] . "' and `AID`<>'0' ORDER BY 'QID' DESC"; $Erg = mysql_query($SQL, $con); // anzahl zeilen -$Zeilen = mysql_num_rows($Erg); +$Zeilen = mysql_num_rows($Erg); -if ($Zeilen==0){ - Print_Text(41); +if ($Zeilen == 0) { + Print_Text(41); } else { - for ($n = 0 ; $n < $Zeilen ; $n++) { - echo "

".nl2br(mysql_result($Erg, $n, "Question"))."
\n"; - echo "

".nl2br(mysql_result($Erg, $n, "Answer")). - "@". UID2Nick(mysql_result($Erg, $n, "AID"))."\n"; - echo "\n
---
"; - } + for ($n = 0; $n < $Zeilen; $n++) { + echo "

" . nl2br(mysql_result($Erg, $n, "Question")) . "
\n"; + echo "

" . nl2br(mysql_result($Erg, $n, "Answer")) . + "@" . UID2Nick(mysql_result($Erg, $n, "AID")) . "\n"; + echo "\n
---
"; + } } -include ("../../../camp2011/includes/footer.php"); +include ("includes/footer.php"); ?> diff --git a/www-ssl/nonpublic/messages.php b/www-ssl/nonpublic/messages.php index c85bf669..4868136d 100644 --- a/www-ssl/nonpublic/messages.php +++ b/www-ssl/nonpublic/messages.php @@ -1,122 +1,124 @@ \n"; - echo Get_Text("pub_messages_text1"). "

\n"; +if (!isset ($_GET["action"])) + $_GET["action"] = "start"; - //show exist Messages - $SQL = "SELECT * FROM `Messages` WHERE `SUID`='" . $_SESSION["UID"] . "' OR `RUID`='" . $_SESSION["UID"] . "'"; - $erg = mysql_query($SQL, $con); +switch ($_GET["action"]) { + case "start" : + echo Get_Text("Hello") . $_SESSION['Nick'] . ",
\n"; + echo Get_Text("pub_messages_text1") . "

\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; + //show exist Messages + $SQL = "SELECT * FROM `Messages` WHERE `SUID`='" . $_SESSION["UID"] . "' OR `RUID`='" . $_SESSION["UID"] . "'"; + $erg = mysql_query($SQL, $con); - for($i = 0; $i < mysql_num_rows($erg); $i++) { - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo ""; - case "SendMsg": - echo Get_Text("pub_messages_Send1") . "...
\n"; + echo "
". Get_Text("pub_messages_Datum"). "". Get_Text("pub_messages_Von"). "". Get_Text("pub_messages_An"). "". Get_Text("pub_messages_Text"). "
" . mysql_result($erg, $i, "Datum") . "" . UID2Nick(mysql_result($erg, $i, "SUID")) . "" . UID2Nick(mysql_result($erg, $i, "RUID")) . "" . mysql_result($erg, $i, "Text") . ""; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; - if(mysql_result($erg, $i, "RUID") == $_SESSION["UID"]) { - echo "" . Get_Text("pub_messages_DelMsg") . ""; + for ($i = 0; $i < mysql_num_rows($erg); $i++) { + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; - echo "\n"; - } + if (mysql_result($erg, $i, "isRead") == "N") + echo "" . Get_Text("pub_messages_MarkRead") . ""; + } else { + if (mysql_result($erg, $i, "isRead") == "N") + echo Get_Text("pub_messages_NotRead"); + } - // send Messeges - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; + echo "\n"; + echo "\n"; + } - // Listet alle Nicks auf - echo "\n"; + echo "\n"; + echo "\n"; - $usql="SELECT * FROM `User` WHERE (`UID`!='". $_SESSION["UID"] ."') ORDER BY `Nick`"; - $uErg = mysql_query($usql, $con); - $urowcount = mysql_num_rows($uErg); + // Listet alle Nicks auf + echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo ""; + for ($k = 0; $k < $urowcount; $k++) { + echo "\n"; + } - echo "
" . Get_Text("pub_messages_Datum") . "" . Get_Text("pub_messages_Von") . "" . Get_Text("pub_messages_An") . "" . Get_Text("pub_messages_Text") . "
" . mysql_result($erg, $i, "Datum") . "" . UID2Nick(mysql_result($erg, $i, "SUID")) . "" . UID2Nick(mysql_result($erg, $i, "RUID")) . "" . mysql_result($erg, $i, "Text") . ""; - if(mysql_result($erg, $i, "isRead") == "N") - echo "" . Get_Text("pub_messages_MarkRead") . ""; - } else { - if(mysql_result($erg, $i, "isRead") == "N") - echo Get_Text("pub_messages_NotRead"); - } + if (mysql_result($erg, $i, "RUID") == $_SESSION["UID"]) { + echo "" . Get_Text("pub_messages_DelMsg") . ""; - echo "
\n"; - break; + echo "
\n"; + break; - $SQL = "INSERT INTO `Messages` ( `Datum` , `SUID` , `RUID` , `Text` ) VALUES (". - "'" . gmdate("Y-m-j H:i:s", time()) . "', ". - "'" . $_SESSION["UID"]. "', ". - "'" . $_POST["RUID"]."', ". - "'" . $_POST["Text"]. "');"; + case "SendMsg" : + echo Get_Text("pub_messages_Send1") . "...
\n"; - $Erg = mysql_query($SQL, $con); + $SQL = "INSERT INTO `Messages` ( `Datum` , `SUID` , `RUID` , `Text` ) VALUES (" . + "'" . gmdate("Y-m-j H:i:s", time()) . "', " . + "'" . $_SESSION["UID"] . "', " . + "'" . $_POST["RUID"] . "', " . + "'" . $_POST["Text"] . "');"; - if($Erg == 1) - echo Get_Text("pub_messages_Send_OK") . "\n"; - else - echo Get_Text("pub_messages_Send_Error") . "...\n(". mysql_error($con). ")"; - break; + $Erg = mysql_query($SQL, $con); - case "MarkRead": - $SQL = "UPDATE `Messages` SET `isRead` = 'Y' ". - "WHERE `Datum` = '". $_GET["Datum"]. "' AND `RUID`='". $_SESSION["UID"]. "' ". - "LIMIT 1 ;"; - $Erg = mysql_query($SQL, $con); + if ($Erg == 1) + echo Get_Text("pub_messages_Send_OK") . "\n"; + else + echo Get_Text("pub_messages_Send_Error") . "...\n(" . mysql_error($con) . ")"; + break; - if ($Erg == 1) - echo Get_Text("pub_messages_MarkRead_OK"). "\n"; - else - echo Get_Text("pub_messages_MarkRead_KO"). "...\n(". mysql_error($con). ")"; - break; + case "MarkRead" : + $SQL = "UPDATE `Messages` SET `isRead` = 'Y' " . + "WHERE `Datum` = '" . $_GET["Datum"] . "' AND `RUID`='" . $_SESSION["UID"] . "' " . + "LIMIT 1 ;"; + $Erg = mysql_query($SQL, $con); - case "DelMsg": - $SQL = "DELETE FROM `Messages` ". - "WHERE `Datum` = '". $_GET["Datum"]. "' AND `RUID` ='". $_SESSION["UID"]. "' ". - "LIMIT 1;"; - $Erg = mysql_query($SQL, $con); + if ($Erg == 1) + echo Get_Text("pub_messages_MarkRead_OK") . "\n"; + else + echo Get_Text("pub_messages_MarkRead_KO") . "...\n(" . mysql_error($con) . ")"; + break; - if ($Erg == 1) - echo Get_Text("pub_messages_DelMsg_OK"). "\n"; - else - echo Get_Text("pub_messages_DelMsg_KO"). "...\n(". mysql_error($con). ")"; - break; + case "DelMsg" : + $SQL = "DELETE FROM `Messages` " . + "WHERE `Datum` = '" . $_GET["Datum"] . "' AND `RUID` ='" . $_SESSION["UID"] . "' " . + "LIMIT 1;"; + $Erg = mysql_query($SQL, $con); - default: - echo Get_Text("pub_messages_NoCommand"); - } + if ($Erg == 1) + echo Get_Text("pub_messages_DelMsg_OK") . "\n"; + else + echo Get_Text("pub_messages_DelMsg_KO") . "...\n(" . mysql_error($con) . ")"; + break; - include "../../../camp2011/includes/footer.php"; + default : + echo Get_Text("pub_messages_NoCommand"); +} + +include "includes/footer.php"; ?> diff --git a/www-ssl/nonpublic/myschichtplan.php b/www-ssl/nonpublic/myschichtplan.php index 6bbabbb6..5d7b5da3 100644 --- a/www-ssl/nonpublic/myschichtplan.php +++ b/www-ssl/nonpublic/myschichtplan.php @@ -1,58 +1,61 @@ \n"; - echo Get_Text("pub_mywake_beschreibung1")."
\n"; - echo Get_Text("pub_mywake_beschreibung2")."

\n"; - echo Get_Text("pub_mywake_beschreibung3").($LETZTES_AUSTRAGEN). - Get_Text("pub_mywake_beschreibung4")."

\n"; +$title = "Himmel"; +$header = "Mein Schichtplan"; - $USER_ID = $_SESSION['UID']; +include ("includes/header.php"); +include ("includes/funktionen.php"); +include ("includes/funktion_schichtplan.php"); +include ("includes/funktion_schichtplan_aray.php"); - if( $_SESSION['CVS'][ "admin/schichtplan.php" ] == "Y" ) { - if( !isset( $_GET["UIDs"]) ) - $_GET["UIDs"] = $_SESSION['UID']; - else - $USER_ID = $_GET["UIDs"]; +if (!isset ($_GET["action"])) { + echo Get_Text("Hello") . $_SESSION['Nick'] . ",
\n"; + echo Get_Text("pub_mywake_beschreibung1") . "
\n"; + echo Get_Text("pub_mywake_beschreibung2") . "

\n"; + echo Get_Text("pub_mywake_beschreibung3") . ($LETZTES_AUSTRAGEN) . + Get_Text("pub_mywake_beschreibung4") . "

\n"; - echo "

"; + $USER_ID = $_SESSION['UID']; - echo "Liste von \n"; - echo " anzeigen.\n"; - echo mysql_error($con); - - echo "\n"; + $usql = "SELECT * FROM `User` ORDER BY `Nick`"; + $uErg = mysql_query($usql, $con); + $urowcount = mysql_num_rows($uErg); - echo "
"; - } - - $SQL = "SELECT *, `ShiftEntry`.`Comment`, `ShiftEntry`.`TID` FROM `Shifts` ". - "INNER JOIN `ShiftEntry` ". - "ON `Shifts`.`SID`=`ShiftEntry`.`SID` ". - "WHERE `ShiftEntry`.`UID`='$USER_ID' ". - "ORDER BY `DateS`"; - $erg = mysql_query($SQL, $con); + for ($k = 0; $k < $urowcount; $k++) { + echo "\n"; + } - ?> + echo " anzeigen.\n"; + echo mysql_error($con); + + echo "\n"; + + echo ""; + } + + $SQL = "SELECT *, `ShiftEntry`.`Comment`, `ShiftEntry`.`TID` FROM `Shifts` " . + "INNER JOIN `ShiftEntry` " . + "ON `Shifts`.`SID`=`ShiftEntry`.`SID` " . + "WHERE `ShiftEntry`.`UID`='$USER_ID' " . + "ORDER BY `DateS`"; + $erg = mysql_query($SQL, $con); +?> @@ -65,119 +68,111 @@ "; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - - // bis $LETZTES_AUSTRAGEN (aus dem config-file) soll es moeglich sein, seine Schichten - //// selber noch austragen zu koennen... - $schichtdate = mysql_result( $erg, $i, "DateS" ); - ereg( "^([0-9]{4})-([0-9]{2})-([0-9]{2}) ([0-9]{2}):([0-9]{2}):([0-9]{2})", $schichtdate, $res ); - $info["year"] = $res[1]; - $info["month"] = $res[2]; - $info["day"] = $res[3]; - $info["hour"] = $res[4]; - $info["min"] = $res[5]; - $info["sec"] = $res[6]; - $schichtdatum = (mktime($info["hour"],$info["min"],$info["sec"],$info["month"],$info["day"],$info["year"])); - $lastAustragen = $LETZTES_AUSTRAGEN*3600; - $nowdate = time(); - // wenn Schichtbeginn > jetziges Datum + $LETZTES_AUSTRAGEN - Stunden soll ein Austragen - // noch möglich sein - if( $schichtdatum > ($lastAustragen + $nowdate) ) - echo "\n"; - else - echo "\n"; - - echo "\n"; - } -echo "
". substr(mysql_result( $erg, $i, "DateS" ), 0, 10). "". substr(mysql_result( $erg, $i, "DateS" ), 11). "". mysql_result( $erg, $i, "Len" ). " h". mysql_result( $erg, $i, "Man" ). "". $RoomID[mysql_result( $erg, $i, "RID" )]. "
\n". - "(". TID2Type(mysql_result( $erg, $i, "TID" )).Get_Text("inc_schicht_engel"). ")". - "
\n". 
-         mysql_result( $erg, $i, "Comment" ). 
-         "\n
\n"; - echo "
# vi #
". - Get_Text("pub_mywake_austragen")."". Get_Text("pub_mywake_austragen_n_c"). "
\n\n"; + for ($i = 0; $i < mysql_num_rows($erg); $i++) { + echo ""; -if( $_SESSION['CVS'][ "nonpublic/myschichtplan_ical.php" ] == "Y" ) -{ - echo "
". Get_Text("pub_myschichtplan_ical"). "\n"; + echo "" . substr(mysql_result($erg, $i, "DateS"), 0, 10) . "\n"; + echo "" . substr(mysql_result($erg, $i, "DateS"), 11) . "\n"; + echo "" . mysql_result($erg, $i, "Len") . " h\n"; + echo "" . mysql_result($erg, $i, "Man") . "\n"; + echo "" . $RoomID[mysql_result($erg, $i, "RID")] . "
\n" . + "(" . TID2Type(mysql_result($erg, $i, "TID")) . Get_Text("inc_schicht_engel") . ")" . + "\n"; + echo "
\n" .
+		mysql_result($erg, $i, "Comment") .
+		"\n
\n"; + echo "
# vi #\n"; + + // bis $LETZTES_AUSTRAGEN (aus dem config-file) soll es moeglich sein, seine Schichten + //// selber noch austragen zu koennen... + $schichtdate = mysql_result($erg, $i, "DateS"); + ereg("^([0-9]{4})-([0-9]{2})-([0-9]{2}) ([0-9]{2}):([0-9]{2}):([0-9]{2})", $schichtdate, $res); + $info["year"] = $res[1]; + $info["month"] = $res[2]; + $info["day"] = $res[3]; + $info["hour"] = $res[4]; + $info["min"] = $res[5]; + $info["sec"] = $res[6]; + $schichtdatum = (mktime($info["hour"], $info["min"], $info["sec"], $info["month"], $info["day"], $info["year"])); + $lastAustragen = $LETZTES_AUSTRAGEN * 3600; + $nowdate = time(); + // wenn Schichtbeginn > jetziges Datum + $LETZTES_AUSTRAGEN - Stunden soll ein Austragen + // noch m�glich sein + if ($schichtdatum > ($lastAustragen + $nowdate)) + echo " " . + Get_Text("pub_mywake_austragen") . "\n"; + else + echo "" . Get_Text("pub_mywake_austragen_n_c") . "\n"; + + echo "\n"; + } + echo "\n\n"; + + if ($_SESSION['CVS']["nonpublic/myschichtplan_ical.php"] == "Y") { + echo "
" . Get_Text("pub_myschichtplan_ical") . "\n"; + } + +} else { + If ($_GET["action"] == "austragen") { + echo Get_Text("pub_mywake_delate1") . "
\n"; + + $sql = "SELECT * FROM `Shifts` WHERE (`SID` = '" . $_GET["SID"] . "')"; + $Erg = mysql_query($sql, $con); + + $schichtdate = mysql_result($Erg, 0, "DateS"); + ereg("^([0-9]{4})-([0-9]{2})-([0-9]{2}) ([0-9]{2}):([0-9]{2}):([0-9]{2})", $schichtdate, $res); + $info["year"] = $res[1]; + $info["month"] = $res[2]; + $info["day"] = $res[3]; + $info["hour"] = $res[4]; + $info["min"] = $res[5]; + $info["sec"] = $res[6]; + $schichtdatum = (mktime($info["hour"], $info["min"], $info["sec"], $info["month"], $info["day"], $info["year"])); + $lastAustragen = $LETZTES_AUSTRAGEN * 3600; + $nowdate = time(); + // wenn Schichtbeginn > jetziges Datum + $LETZTES_AUSTRAGEN - Stunden soll ein Austragen + // noch m�glich sein + if ($schichtdatum > ($lastAustragen + $nowdate)) { + $sql2 = "UPDATE `ShiftEntry` " . + "SET `UID` = '0', `Comment` = NULL " . + "WHERE `SID` = '" . $_GET["SID"] . "' AND `UID` = '" . $_SESSION['UID'] . "' LIMIT 1;"; + $Erg2 = mysql_query($sql2, $con); + if ($Erg2 == 1) + echo Get_Text("pub_mywake_add_ok") . "\n"; + else + echo Get_Text("pub_mywake_add_ko") . "\n"; + } else + echo Get_Text("pub_mywake_after") . "\n"; + } + elseif ($_GET["action"] == "edit") { + echo Get_Text("pub_myshift_Edit_Text1") . "\n"; + + $sql = "SELECT * FROM `ShiftEntry` WHERE "; + $sql .= "(`SID`='" . $_GET["SID"] . "' AND `UID`='" . $_SESSION['UID'] . "')"; + $Erg = mysql_query($sql, $con); + + echo "
\n"; + echo "

\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "
"; + } + elseif ($_GET["action"] == "editSave") { + echo Get_Text("pub_myshift_EditSave_Text1") . "
\n"; + $sql = "UPDATE `ShiftEntry` " . + "SET `Comment` = '" . $_GET["newtext"] . "' " . + "WHERE `SID`='" . $_GET["SID"] . "' AND `UID`='" . $_SESSION['UID'] . "' LIMIT 1;"; + $Erg = mysql_query($sql, $con); + if ($Erg == 1) + echo " ..." . Get_Text("pub_myshift_EditSave_OK") . "\n"; + else + echo " ..." . Get_Text("pub_myshift_EditSave_KO") . "\n"; + SetHeaderGo2Back(); + } } - -} -else -{ - If( $_GET["action"] == "austragen" ) - { - echo Get_Text("pub_mywake_delate1")."
\n"; - - $sql = "SELECT * FROM `Shifts` WHERE (`SID` = '". $_GET["SID"]. "')"; - $Erg = mysql_query($sql, $con); - - $schichtdate = mysql_result( $Erg, 0, "DateS" ); - ereg( "^([0-9]{4})-([0-9]{2})-([0-9]{2}) ([0-9]{2}):([0-9]{2}):([0-9]{2})", $schichtdate, $res ); - $info["year"] = $res[1]; - $info["month"] = $res[2]; - $info["day"] = $res[3]; - $info["hour"] = $res[4]; - $info["min"] = $res[5]; - $info["sec"] = $res[6]; - $schichtdatum = (mktime($info["hour"],$info["min"],$info["sec"],$info["month"],$info["day"],$info["year"])); - $lastAustragen = $LETZTES_AUSTRAGEN*3600; - $nowdate = time(); - // wenn Schichtbeginn > jetziges Datum + $LETZTES_AUSTRAGEN - Stunden soll ein Austragen - // noch möglich sein - if( $schichtdatum > ($lastAustragen + $nowdate) ) - { - $sql2 = "UPDATE `ShiftEntry` ". - "SET `UID` = '0', `Comment` = NULL ". - "WHERE `SID` = '". $_GET["SID"]. "' AND `UID` = '". $_SESSION['UID']. "' LIMIT 1;"; - $Erg2 = mysql_query($sql2, $con); - if ($Erg2 == 1) - echo Get_Text("pub_mywake_add_ok"). "\n"; - else - echo Get_Text("pub_mywake_add_ko"). "\n"; - } - else - echo Get_Text("pub_mywake_after"). "\n"; - } - elseif( $_GET["action"] == "edit" ) - { - echo Get_Text("pub_myshift_Edit_Text1"). "\n"; - - $sql = "SELECT * FROM `ShiftEntry` WHERE "; - $sql.= "(`SID`='". $_GET["SID"]. "' AND `UID`='". $_SESSION['UID']. "')"; - $Erg = mysql_query($sql, $con); - - echo "
\n"; - echo "

\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
"; - } - elseif( $_GET["action"] == "editSave" ) - { - echo Get_Text("pub_myshift_EditSave_Text1"). "
\n"; - $sql = "UPDATE `ShiftEntry` ". - "SET `Comment` = '". $_GET["newtext"]. "' ". - "WHERE `SID`='". $_GET["SID"]. "' AND `UID`='". $_SESSION['UID']. "' LIMIT 1;"; - $Erg = mysql_query($sql, $con); - if ($Erg == 1) - echo " ...". Get_Text("pub_myshift_EditSave_OK"). "\n"; - else - echo " ...". Get_Text("pub_myshift_EditSave_KO"). "\n"; - SetHeaderGo2Back(); - } -} -include ("../../../camp2011/includes/footer.php"); +include ("includes/footer.php"); ?> diff --git a/www-ssl/nonpublic/myschichtplan_ical.php b/www-ssl/nonpublic/myschichtplan_ical.php index 928f0c86..ff74fef0 100644 --- a/www-ssl/nonpublic/myschichtplan_ical.php +++ b/www-ssl/nonpublic/myschichtplan_ical.php @@ -1,52 +1,51 @@ diff --git a/www-ssl/nonpublic/news_comments.php b/www-ssl/nonpublic/news_comments.php index b90d5a82..db95ec8c 100644 --- a/www-ssl/nonpublic/news_comments.php +++ b/www-ssl/nonpublic/news_comments.php @@ -1,26 +1,28 @@
"; - SetHeaderGo2Back(); - } - } + if ($Erg == 1) { + echo "Eintrag wurde gespeichert

"; + SetHeaderGo2Back(); + } + } - $SQL = "SELECT * FROM `news_comments` WHERE `Refid`='". $_GET["nid"]. "' ORDER BY 'ID'"; - $Erg = mysql_query($SQL, $con); - echo mysql_error( $con); + $SQL = "SELECT * FROM `news_comments` WHERE `Refid`='" . $_GET["nid"] . "' ORDER BY 'ID'"; + $Erg = mysql_query($SQL, $con); + echo mysql_error($con); - // anzahl zeilen - $news_rows = mysql_num_rows($Erg); + // anzahl zeilen + $news_rows = mysql_num_rows($Erg); ?> @@ -33,26 +35,27 @@ if(isset($_GET["nid"])) { "; - echo "\t\t"; - echo "\t\t"; - echo ""; - echo "\t"; - echo "\t\t"; - echo ""; -} -echo "
"; - echo mysql_result($Erg, $n, "Datum"); - echo "\t\t"; - echo UID2Nick(mysql_result($Erg, $n, "UID")); - // avatar anzeigen? - echo DisplayAvatar (mysql_result($Erg, $n, "UID")); - echo "\t\t
"; - echo nl2br(mysql_result($Erg, $n, "Text"))."\n"; - echo "\t\t
"; + for ($n = 0; $n < $news_rows; $n++) { + echo "\t"; + echo "\t\t"; + echo mysql_result($Erg, $n, "Datum"); + echo "\t\t"; + echo "\t\t"; + echo UID2Nick(mysql_result($Erg, $n, "UID")); + // avatar anzeigen? + echo DisplayAvatar(mysql_result($Erg, $n, "UID")); + echo "\t\t"; + echo ""; + echo "\t"; + echo "\t\t"; + echo nl2br(mysql_result($Erg, $n, "Text")) . "\n"; + echo "\t\t"; + echo ""; + } + + echo ""; ?>
@@ -75,11 +78,9 @@ echo ""; diff --git a/www-ssl/nonpublic/schichtplan.1.php b/www-ssl/nonpublic/schichtplan.1.php index 1ed4d32f..9c99c6ca 100644 --- a/www-ssl/nonpublic/schichtplan.1.php +++ b/www-ssl/nonpublic/schichtplan.1.php @@ -1,21 +1,20 @@

 Tage

$Datum\n"; +include ("includes/funktion_schichtplan_aray.php"); + +function Printlink($Datum) { + GLOBAL $raum; + echo "\t
  • $Datum
  • \n"; } //function Printlink( -if( isset ($VeranstaltungsTage)) - foreach( $VeranstaltungsTage as $k => $v) - Printlink( $v); - - +if (isset ($VeranstaltungsTage)) + foreach ($VeranstaltungsTage as $k => $v) + Printlink($v); ?> diff --git a/www-ssl/nonpublic/schichtplan.2.php b/www-ssl/nonpublic/schichtplan.2.php index d0193178..92443e13 100644 --- a/www-ssl/nonpublic/schichtplan.2.php +++ b/www-ssl/nonpublic/schichtplan.2.php @@ -1,22 +1,22 @@

     Raumübersicht

    ". - $RoomEntry["Name"]. "\n"; - else - echo "\t
  • ". - $RoomEntry["Name"]. "
  • \n"; - } +if (isset ($Room)) + foreach ($Room as $RoomEntry) { + if (isset ($ausdatum)) + echo "\t
  • " . + $RoomEntry["Name"] . "
  • \n"; + else + echo "\t
  • " . + $RoomEntry["Name"] . "
  • \n"; + } echo "
    "; -if(isset($ausdatum)) - echo "
  • alle
  • "; +if (isset ($ausdatum)) + echo "
  • alle
  • "; else - echo "
  • alle
  • "; + echo "
  • alle
  • "; ?> diff --git a/www-ssl/nonpublic/schichtplan.php b/www-ssl/nonpublic/schichtplan.php index e8f8f02a..766d6996 100644 --- a/www-ssl/nonpublic/schichtplan.php +++ b/www-ssl/nonpublic/schichtplan.php @@ -1,200 +1,178 @@ $v) { - if(substr($k, 0, 5) == "raum_") { - $raum = $raum. ";". $v; - } - } - } - } +if (isset ($_GET["ausdatum"])) + $ausdatum = $_GET["ausdatum"]; +if (isset ($_GET["raum"])) { + $raum = $_GET["raum"]; - include ("../../../camp2011/includes/header.php"); - include ("../../../camp2011/includes/funktionen.php"); - include ("../../../camp2011/includes/funktion_schichtplan.php"); - include ("../../../camp2011/includes/funktion_schichtplan_aray.php"); + if ($raum == -1 && isset ($_GET["show"])) { + $raum = ""; + foreach ($_GET as $k => $v) { + if (substr($k, 0, 5) == "raum_") { + $raum = $raum . ";" . $v; + } + } + } +} - echo Get_Text("Hello").$_SESSION['Nick'].",
    ". - Get_Text("pub_schicht_beschreibung"). "

    "; +include ("includes/header.php"); +include ("includes/funktionen.php"); +include ("includes/funktion_schichtplan.php"); +include ("includes/funktion_schichtplan_aray.php"); - function ShowSwitchDay() { - global $VeranstaltungsTage, $VeranstaltungsTageMax, $ausdatum, $raum; +echo Get_Text("Hello") . $_SESSION['Nick'] . ",
    " . +Get_Text("pub_schicht_beschreibung") . "

    "; - echo "\n\n\n"; +function ShowSwitchDay() { + global $VeranstaltungsTage, $VeranstaltungsTageMax, $ausdatum, $raum; - if( isset($VeranstaltungsTage)) - foreach( $VeranstaltungsTage as $k => $v) - if( $ausdatum == $v) - { - if( $k > 0) - echo "\t\t\t\n"; - if( $k < $VeranstaltungsTageMax) - echo "\t\t\t\n"; - } - echo "\n\n
    ". - "". $VeranstaltungsTage[$k-1]. "". - "". $VeranstaltungsTage[$k+1]. "
    "; + echo "\n\n\n"; + + if (isset ($VeranstaltungsTage)) + foreach ($VeranstaltungsTage as $k => $v) + if ($ausdatum == $v) { + if ($k > 0) + echo "\t\t\t\n"; + if ($k < $VeranstaltungsTageMax) + echo "\t\t\t\n"; + } + echo "\n\n
    " . + "" . $VeranstaltungsTage[$k -1] . "" . + "" . $VeranstaltungsTage[$k +1] . "
    "; } // wenn kein Datum gesetzt ist (die Seite zum ersten mal aufgerufen wird), // das Datum auf den ersten Tag setzen... -if( !isset($ausdatum) ) -{ - $sql = "SELECT `DateS` FROM `Shifts` WHERE `DateS` like '". gmdate("Y-m-d", time()+$gmdateOffset). "%' ORDER BY `DateS`"; -// $sql = "SELECT `DateS` FROM `Shifts` WHERE `DateS` like '2004-12-29%' ORDER BY `DateS`"; - $Erg = mysql_query($sql, $con); - if( mysql_num_rows( $Erg ) == 0 ) - { - $sql = "SELECT `DateS` FROM `Shifts` ORDER BY `DateS` ASC LIMIT 0, 1"; - $Erg = mysql_query($sql, $con); - } - if( mysql_num_rows( $Erg ) > 0 ) - $ausdatum = substr(mysql_result($Erg,0,"DateS"),0,10); - else - $ausdatum = gmdate("Y-m-d", time()+$gmdateOffset); +if (!isset ($ausdatum)) { + $sql = "SELECT `DateS` FROM `Shifts` WHERE `DateS` like '" . gmdate("Y-m-d", time() + $gmdateOffset) . "%' ORDER BY `DateS`"; + // $sql = "SELECT `DateS` FROM `Shifts` WHERE `DateS` like '2004-12-29%' ORDER BY `DateS`"; + $Erg = mysql_query($sql, $con); + if (mysql_num_rows($Erg) == 0) { + $sql = "SELECT `DateS` FROM `Shifts` ORDER BY `DateS` ASC LIMIT 0, 1"; + $Erg = mysql_query($sql, $con); + } + if (mysql_num_rows($Erg) > 0) + $ausdatum = substr(mysql_result($Erg, 0, "DateS"), 0, 10); + else + $ausdatum = gmdate("Y-m-d", time() + $gmdateOffset); } +if (!isset ($raum)) { + // Ausgabe wenn kein Raum Ausgew�hlt: + echo Get_Text("pub_schicht_auswahl_raeume") . "

    \n"; + if (isset ($Room)) { + echo "
    \n"; + foreach ($Room as $RoomEntry) { + echo "\t
  • "; + echo "" . $RoomEntry["Name"] . ""; + echo "
  • \n"; + } + echo ""; + echo ""; + echo "\n"; + echo "
    \n"; + } -if ( !isset($raum) ) -{ - // Ausgabe wenn kein Raum Ausgewählt: - echo Get_Text("pub_schicht_auswahl_raeume"). "

    \n"; + echo "

    "; + echo Get_Text("pub_schicht_alles_1") . " " . + Get_Text("pub_schicht_alles_2") . " " . Get_Text("pub_schicht_alles_3"); + echo "\n

    \n\n"; + echo "
    \n\n"; + echo Get_Text("pub_schicht_EmptyShifts") . "\n"; - if( isset($Room)) - { - echo "
    \n"; - foreach( $Room as $RoomEntry ) - { - echo "\t
  • "; - echo "". $RoomEntry["Name"]. ""; - echo "
  • \n"; - } - echo ""; - echo ""; - echo "\n"; - echo "
    \n"; - } + // zeit die naesten freien schichten + showEmptyShifts(); +} else { // Wenn einraum Ausgew�hlt ist: + if ($raum == -1) + echo Get_Text("pub_schicht_Anzeige_1") . $ausdatum . ":

    "; + elseif (substr($raum, 0, 1) == ";") echo Get_Text("pub_schicht_Anzeige_1") . $ausdatum . ":

    "; + else + echo Get_Text("pub_schicht_Anzeige_1") . $ausdatum . + Get_Text("pub_schicht_Anzeige_2") . $RoomID[$raum] . "

    "; - echo "

    "; - echo Get_Text("pub_schicht_alles_1"). " ". - Get_Text("pub_schicht_alles_2"). " ".Get_Text("pub_schicht_alles_3"); - echo "\n

    \n\n"; - echo "
    \n\n"; - echo Get_Text("pub_schicht_EmptyShifts"). "\n"; - - - // zeit die naesten freien schichten - showEmptyShifts(); -} -else -{ // Wenn einraum Ausgewählt ist: - if( $raum == -1 ) - echo Get_Text("pub_schicht_Anzeige_1").$ausdatum.":

    "; - elseif( substr( $raum, 0, 1) == ";" ) - echo Get_Text("pub_schicht_Anzeige_1").$ausdatum.":

    "; - else - echo Get_Text("pub_schicht_Anzeige_1"). $ausdatum. - Get_Text("pub_schicht_Anzeige_2"). $RoomID[$raum]. "

    "; + ShowSwitchDay(); - ShowSwitchDay(); + echo "\n\n\n"; + echo "\t\n"; + echo "\t\t\n"; - echo "\n\n
    start
    \n"; - echo "\t\n"; - echo "\t\t\n"; + //Ausgabe Spalten �berschrift + if ($raum == -1) { + if (isset ($Room)) + foreach ($Room as $RoomEntry) + if (SummRoomShifts($RoomEntry["RID"]) > 0) + echo "\t\t\n"; + } + elseif (substr($raum, 0, 1) == ";") { + $words = preg_split("/;/", $raum); + foreach ($words as $word) { + if (strlen(trim($word)) > 0) + echo "\t\t\n"; + } + } else + echo "\t\t\n"; + echo "\t\n"; - //Ausgabe Spalten überschrift - if( $raum == -1 ) - { - if( isset($Room)) - foreach( $Room as $RoomEntry ) - if (SummRoomShifts($RoomEntry["RID"]) > 0) - echo "\t\t\n"; - } - elseif( substr( $raum, 0, 1) == ";" ) - { - $words = preg_split("/;/", $raum); - foreach ($words as $word) - { - if( strlen(trim($word)) > 0) - echo "\t\t\n"; - } - } - else - echo "\t\t\n"; - echo "\t\n"; - - //Zeit Ausgeben - for( $i = 0; $i < 24; $i++ ) - for( $j = 0; $j < $GlobalZeileProStunde; $j++) - { - $Spalten[$i * $GlobalZeileProStunde + $j] = - "\t\n\t\t"; + //Zeit Ausgeben + for ($i = 0; $i < 24; $i++) + for ($j = 0; $j < $GlobalZeileProStunde; $j++) { + $Spalten[$i * $GlobalZeileProStunde + $j] = "\t\n\t\t"; - //Stunde: - $SpaltenTemp=""; - $SpaltenTemp.= ($i<10)? "0$i:": "$i:"; + //Stunde: + $SpaltenTemp = ""; + $SpaltenTemp .= ($i < 10) ? "0$i:" : "$i:"; - //Minute - $TempMinuten = (($j*60) / $GlobalZeileProStunde); - $SpaltenTemp.= ($TempMinuten<10)? "0$TempMinuten": "$TempMinuten"; - - //aktuelle stunde markieren - if( ($j==0) && ($i == gmdate("H", time()+$gmdateOffset)) && (gmdate("Y-m-d", time()+ $gmdateOffset) == $ausdatum) ) - $SpaltenTemp = "

    $SpaltenTemp

    "; - - $SpaltenTemp = "\n"; - $Spalten[$i * $GlobalZeileProStunde + $j].= $SpaltenTemp; - } - - if( $raum == -1 ) - { - if( isset($Room)) - foreach( $Room as $RoomEntry ) - if (SummRoomShifts($RoomEntry["RID"]) > 0) - CreateRoomShifts( $RoomEntry["RID"] ); - } - elseif( substr( $raum, 0, 1) == ";" ) - { - if( isset($Room)) - { - $words = preg_split("/;/", $raum); - foreach ($words as $word) - { - if( strlen(trim($word)) > 0) - if (SummRoomShifts($word) > 0) - CreateRoomShifts( $word ); - } - } - } - else - CreateRoomShifts( $raum ); - - //Ausageb Zeilen - for ($i = 0; $i < (24 * $GlobalZeileProStunde); $i++) - { - echo $Spalten[$i]."\t\n"; - } + //Minute + $TempMinuten = (($j * 60) / $GlobalZeileProStunde); + $SpaltenTemp .= ($TempMinuten < 10) ? "0$TempMinuten" : "$TempMinuten"; - echo "
    start" . $RoomEntry["Name"] . "" . $RoomID[trim($word)] . "" . $RoomID[$raum] . "
    ". $RoomEntry["Name"]. "". $RoomID[trim($word)]. "". $RoomID[$raum]. "
    $SpaltenTemp
    \n"; - - ShowSwitchDay(); + //aktuelle stunde markieren + if (($j == 0) && ($i == gmdate("H", time() + $gmdateOffset)) && (gmdate("Y-m-d", time() + $gmdateOffset) == $ausdatum)) + $SpaltenTemp = "

    $SpaltenTemp

    "; -}//if (isset($raum)) + $SpaltenTemp = "$SpaltenTemp\n"; + $Spalten[$i * $GlobalZeileProStunde + $j] .= $SpaltenTemp; + } -echo "@"; + if ($raum == -1) { + if (isset ($Room)) + foreach ($Room as $RoomEntry) + if (SummRoomShifts($RoomEntry["RID"]) > 0) + CreateRoomShifts($RoomEntry["RID"]); + } + elseif (substr($raum, 0, 1) == ";") { + if (isset ($Room)) { + $words = preg_split("/;/", $raum); + foreach ($words as $word) { + if (strlen(trim($word)) > 0) + if (SummRoomShifts($word) > 0) + CreateRoomShifts($word); + } + } + } else + CreateRoomShifts($raum); -include ("../../../camp2011/includes/footer.php"); + //Ausageb Zeilen + for ($i = 0; $i < (24 * $GlobalZeileProStunde); $i++) { + echo $Spalten[$i] . "\t\n"; + } + + echo "\n"; + + ShowSwitchDay(); + +} //if (isset($raum)) + +echo "@"; + +include ("includes/footer.php"); ?> diff --git a/www-ssl/nonpublic/schichtplan_add.php b/www-ssl/nonpublic/schichtplan_add.php index 621cd97e..1bbcdc4b 100644 --- a/www-ssl/nonpublic/schichtplan_add.php +++ b/www-ssl/nonpublic/schichtplan_add.php @@ -1,111 +1,114 @@ = '$beginSchicht') and ". - " (`Shifts`.`DateS` < '$endSchicht'))". - " OR ". - " ((`Shifts`.`DateE` > '$beginSchicht') and ". - " (`Shifts`.`DateE` <= '$endSchicht')) ". - ") and ". - "(`ShiftEntry`.`UID` = '". $_SESSION['UID']. "'));"; - $bErg = mysql_query($SSQL, $con); + // datum der einzutragenden Schicht heraussuhen... + $ShiftSQL = "SELECT `DateS`, `DateE` FROM `Shifts` WHERE `SID`='" . $_POST["SID"] . ".'"; + $ShiftErg = mysql_query($ShiftSQL, $con); + $beginSchicht = mysql_result($ShiftErg, 0, "DateS"); + $endSchicht = mysql_result($ShiftErg, 0, "DateE"); - if(mysql_num_rows($bErg) != 0) - echo Get_Text("pub_schichtplan_add_AllreadyinShift"); - else { - // ermitteln der noch gesuchten - $SQL3 = "SELECT * FROM `ShiftEntry`". - " WHERE ((`SID` = '". $_POST["SID"]. "') AND (`TID` = '". $_POST["TID"]. "') AND (`UID` = '0'));"; - $Erg3 = mysql_query($SQL3, $con); + // wenn keien rechte definiert sind + if (!isset ($_SESSION['CVS'][$TID2Name[$_POST["TID"]]])) + $_SESSION['CVS'][$TID2Name[$_POST["TID"]]] = "Y"; - if(mysql_num_rows($Erg3) <= 0) - echo Get_Text("pub_schichtplan_add_ToManyYousers"); - else { - //write shift - $SQL = "UPDATE `ShiftEntry` SET ". - "`UID` = '". $_SESSION['UID']. "', ". - "`Comment` = '". $_POST["newtext"]. "' ". - "WHERE ( (`SID` = '". $_POST["SID"]. "') and ". - "(`TID` = '". $_POST["TID"]. "') and ". - "(`UID` = '0')) LIMIT 1;"; - $Erg = mysql_query($SQL, $con); + if ($_SESSION['CVS'][$TID2Name[$_POST["TID"]]] == "Y") { + // Ueberpruefung, ob der Engel bereits fuer eine Schicht zu dieser Zeit eingetragen ist + $SSQL = "SELECT * FROM `Shifts`" . + " INNER JOIN `ShiftEntry` ON `ShiftEntry`.`SID` = `Shifts`.`SID`" . + " WHERE ((" . + " ((`Shifts`.`DateS` >= '$beginSchicht') and " . + " (`Shifts`.`DateS` < '$endSchicht'))" . + " OR " . + " ((`Shifts`.`DateE` > '$beginSchicht') and " . + " (`Shifts`.`DateE` <= '$endSchicht')) " . + ") and " . + "(`ShiftEntry`.`UID` = '" . $_SESSION['UID'] . "'));"; + $bErg = mysql_query($SSQL, $con); - if($Erg != 1) - echo Get_Text("pub_schichtplan_add_Error"); - else - echo Get_Text("pub_schichtplan_add_WriteOK"); - } - } - } else { - echo "

    :-(

    "; - array_push($error_messages, "Hack atteck\n"); - } - } elseif (isset($_GET["SID"]) && isset($_GET["TID"])) { - //wenn keine Rechte definiert sind - if( !isset($_SESSION['CVS'][ $TID2Name[$_GET["TID"]] ])) - $_SESSION['CVS'][ $TID2Name[$_GET["TID"]] ] = "Y"; + if (mysql_num_rows($bErg) != 0) + echo Get_Text("pub_schichtplan_add_AllreadyinShift"); + else { + // ermitteln der noch gesuchten + $SQL3 = "SELECT * FROM `ShiftEntry`" . + " WHERE ((`SID` = '" . $_POST["SID"] . "') AND (`TID` = '" . $_POST["TID"] . "') AND (`UID` = '0'));"; + $Erg3 = mysql_query($SQL3, $con); - if( $_SESSION['CVS'][ $TID2Name[$_GET["TID"]] ] == "Y") { - echo Get_Text("pub_schichtplan_add_Text1"). "

    \n\n". - "
    \n". - "\n"; + if (mysql_num_rows($Erg3) <= 0) + echo Get_Text("pub_schichtplan_add_ToManyYousers"); + else { + //write shift + $SQL = "UPDATE `ShiftEntry` SET " . + "`UID` = '" . $_SESSION['UID'] . "', " . + "`Comment` = '" . $_POST["newtext"] . "' " . + "WHERE ( (`SID` = '" . $_POST["SID"] . "') and " . + "(`TID` = '" . $_POST["TID"] . "') and " . + "(`UID` = '0')) LIMIT 1;"; + $Erg = mysql_query($SQL, $con); - $SQL = "SELECT * FROM `Shifts` WHERE "; - $SQL .="(`SID` = '". $_GET["SID"]. "')"; - $Erg = mysql_query($SQL, $con); + if ($Erg != 1) + echo Get_Text("pub_schichtplan_add_Error"); + else + echo Get_Text("pub_schichtplan_add_WriteOK"); + } + } + } else { + echo "

    :-(

    "; + array_push($error_messages, "Hack atteck\n"); + } +} +elseif (isset ($_GET["SID"]) && isset ($_GET["TID"])) { + //wenn keine Rechte definiert sind + if (!isset ($_SESSION['CVS'][$TID2Name[$_GET["TID"]]])) + $_SESSION['CVS'][$TID2Name[$_GET["TID"]]] = "Y"; - echo "\n"; + if ($_SESSION['CVS'][$TID2Name[$_GET["TID"]]] == "Y") { + echo Get_Text("pub_schichtplan_add_Text1") . "

    \n\n" . + "\n" . + "
    ". Get_Text("pub_schichtplan_add_Date"). ": ". - mysql_result($Erg, 0, "DateS"). "
    \n"; - echo "\n"; + $SQL = "SELECT * FROM `Shifts` WHERE "; + $SQL .= "(`SID` = '" . $_GET["SID"] . "')"; + $Erg = mysql_query($SQL, $con); - echo "\n"; + echo "\n"; - echo "\n"; + echo "\n"; - echo "\n"; + echo "\n"; - echo "\n \n"; + echo "\n"; - echo "\n". - "\n". - "
    ". Get_Text("pub_schichtplan_add_Place"). ": ". - $RoomID[ mysql_result($Erg, 0, "RID") ]. "
    ". Get_Text("pub_schichtplan_add_Job"). ": ". - $EngelTypeID[$_GET["TID"]]. "
    " . Get_Text("pub_schichtplan_add_Date") . ": " . + mysql_result($Erg, 0, "DateS") . "
    ". Get_Text("pub_schichtplan_add_Len"). ": ". - mysql_result($Erg, 0, "Len"). "h
    " . Get_Text("pub_schichtplan_add_Place") . ": " . + $RoomID[mysql_result($Erg, 0, "RID")] . "
    ". Get_Text("pub_schichtplan_add_TextFor"). ": ". - mysql_result($Erg, 0, "Man"). "
    " . Get_Text("pub_schichtplan_add_Job") . ": " . + $EngelTypeID[$_GET["TID"]] . "
    ". Get_Text("pub_schichtplan_add_Comment"). ":". - "
    " . Get_Text("pub_schichtplan_add_Len") . ": " . + mysql_result($Erg, 0, "Len") . "h
     
    \n". - "\n". - "\n". - "
    "; - } else { - echo "

    :-(

    "; - array_push($error_messages, "Hack atteck\n"); - } - } + echo "" . Get_Text("pub_schichtplan_add_TextFor") . ": " . + mysql_result($Erg, 0, "Man") . "\n"; - include "../../../camp2011/includes/footer.php"; + echo "" . Get_Text("pub_schichtplan_add_Comment") . ":\n " . + " \n"; + + echo " \n" . + " \n" . + "\n" . + "\n" . + "\n" . + ""; + } else { + echo "

    :-(

    "; + array_push($error_messages, "Hack atteck\n"); + } +} + +include "includes/footer.php"; ?> diff --git a/www-ssl/nonpublic/schichtplan_beamer.php b/www-ssl/nonpublic/schichtplan_beamer.php index 2e4e78c2..269660e1 100644 --- a/www-ssl/nonpublic/schichtplan_beamer.php +++ b/www-ssl/nonpublic/schichtplan_beamer.php @@ -1,9 +1,11 @@ @@ -16,7 +18,9 @@ \n"; + + +echo "\n"; echo "@@ -25,27 +29,27 @@ echo "\n"; -echo "\n" . - "\n". - "\n". - "\n". - "\n". - "\n"; +echo "\n" . +"\n" . +"\n" . +"\n" . +"\n" . +"\n"; -foreach($Room as $RoomEntry) { - // var-init - $AnzahlEintraege = 0; - - $Out = ausgabe_Zeile($RoomEntry["RID"], $Time - 3600, $AnzahlEintraege); - $Out .= ausgabe_Zeile($RoomEntry["RID"], $Time, $AnzahlEintraege); - $Out .= ausgabe_Zeile($RoomEntry["RID"], $Time + 3600, $AnzahlEintraege); +foreach ($Room as $RoomEntry) { + // var-init + $AnzahlEintraege = 0; - if($AnzahlEintraege == 0) - $Out = ""; - else - $Out = "\n\n" . $Out . "\n"; - - echo $Out; + $Out = ausgabe_Zeile($RoomEntry["RID"], $Time -3600, $AnzahlEintraege); + $Out .= ausgabe_Zeile($RoomEntry["RID"], $Time, $AnzahlEintraege); + $Out .= ausgabe_Zeile($RoomEntry["RID"], $Time +3600, $AnzahlEintraege); + + if ($AnzahlEintraege == 0) + $Out = ""; + else + $Out = "\n\n" . $Out . "\n"; + + echo $Out; } ?> diff --git a/www-ssl/nonpublic/waeckliste.php b/www-ssl/nonpublic/waeckliste.php index bb9a0668..d98dd455 100644 --- a/www-ssl/nonpublic/waeckliste.php +++ b/www-ssl/nonpublic/waeckliste.php @@ -1,8 +1,10 @@

    \n" . Get_Text("pub_waeckliste_Text1"); ?>

    @@ -15,12 +17,14 @@ @@ -29,10 +33,14 @@
    ". gmdate("d.m.y", $Time) ."". gmdate("H", $Time - 3600) . ":00". gmdate("H", $Time + 0) . ":00". gmdate("H", $Time + 3600) .":00
    " . gmdate("d.m.y", $Time) . "" . gmdate("H", $Time -3600) . ":00" . gmdate("H", $Time +0) . ":00" . gmdate("H", $Time +3600) . ":00
    _" . $RoomEntry["Name"] . "_
    _" . $RoomEntry["Name"] . "_
    diff --git a/www-ssl/nonpublic/wecken.php b/www-ssl/nonpublic/wecken.php index 164a4bb0..0d44b48d 100644 --- a/www-ssl/nonpublic/wecken.php +++ b/www-ssl/nonpublic/wecken.php @@ -1,32 +1,34 @@ " . Get_Text("Hello") . $_SESSION['Nick'] . ",
    " . Get_Text("pub_wake_beschreibung") . "

    \n\n"; - echo Get_Text("pub_wake_beschreibung2"); +if (isset ($_GET["eintragen"])) { + if ($_GET["eintragen"] == "loeschen") { + $SQL = "DELETE FROM `Wecken` WHERE `UID`='" . $_SESSION['UID'] . "' AND `ID`='" . $_GET["weckID"] . "' LIMIT 1"; + $Erg = mysql_query($SQL, $con); + if ($Erg == 1) + Print_Text(4); + } +} + +echo "

    " . Get_Text("Hello") . $_SESSION['Nick'] . ",
    " . Get_Text("pub_wake_beschreibung") . "

    \n\n"; +echo Get_Text("pub_wake_beschreibung2"); ?> @@ -38,12 +40,13 @@ @@ -52,7 +55,8 @@
    " . Get_Text("pub_wake_del"); ?>


    @@ -77,5 +81,6 @@ " />