diff options
Diffstat (limited to 'inc')
-rwxr-xr-x | inc/UserCVS.php | 4 | ||||
-rwxr-xr-x | inc/footer.php | 15 | ||||
-rwxr-xr-x | inc/funktion_lang.php | 3 | ||||
-rwxr-xr-x | inc/funktion_menu.php | 4 | ||||
-rwxr-xr-x | inc/funktion_schichtplan.php | 44 | ||||
-rwxr-xr-x | inc/funktion_schichtplan_beamer.php | 2 | ||||
-rwxr-xr-x | inc/header.php | 8 | ||||
-rwxr-xr-x | inc/secure.php | 4 |
8 files changed, 56 insertions, 28 deletions
diff --git a/inc/UserCVS.php b/inc/UserCVS.php index ee1cb0a0..807c8f52 100755 --- a/inc/UserCVS.php +++ b/inc/UserCVS.php @@ -1,8 +1,10 @@ <?php +if( !isset($Page["Public"])) $Page["Public"]="N"; $Page["Name"] = substr( $_SERVER['PHP_SELF'], strlen($ENGEL_ROOT) ); -$Page["CVS"] = $_SESSION['CVS'][ $Page["Name"] ]; +if( isset( $_SESSION['CVS'][ $Page["Name"] ])) + $Page["CVS"] = $_SESSION['CVS'][ $Page["Name"] ]; if( $DEBUG ) { diff --git a/inc/footer.php b/inc/footer.php index 9ab6b32c..5f4edf35 100755 --- a/inc/footer.php +++ b/inc/footer.php @@ -16,7 +16,7 @@ if( $Page["ShowTabel"]=="Y" ) <br> <p align="center"> <?PHP If (IsSet($_SESSION['oldurl'])) - echo "<a href=\"".$oldurl."\">".Get_Text(11)."</a> "; + echo "<a href=\"". $_SESSION["oldurl"]. "\">".Get_Text(11)."</a> "; ?> <a href="#top"><?PHP echo Get_Text(12); ?></a> </p> @@ -48,12 +48,19 @@ $MenueTableEnd=" include("./inc/funktion_menu.php"); include("./menu.php"); -ShowMenu( $Menu ); -echo "<br>"; -ShowMenu( $MenuAdmin ); +if( isset( $Menu)) +{ + ShowMenu( $Menu ); + echo "<br>"; +} +if( isset( $MenuAdmin)) + ShowMenu( $MenuAdmin ); echo "<br>"; +if( !isset($submenus)) + $submenus = 0; + if ($submenus >= 1 ) { $inc_name=$_SERVER['PHP_SELF']; $filenamepos=strrpos($inc_name, '/'); diff --git a/inc/funktion_lang.php b/inc/funktion_lang.php index d3a4832f..9a6dc220 100755 --- a/inc/funktion_lang.php +++ b/inc/funktion_lang.php @@ -2,7 +2,8 @@ function Get_Text ($TextID) { -if ($_SESSION['Sprache']=="") $_SESSION['Sprache']="EN"; +if( !isset($_SESSION['Sprache'])) $_SESSION['Sprache'] = "EN"; +if( $_SESSION['Sprache']=="") $_SESSION['Sprache']="EN"; GLOBAL $con; $SQL = "SELECT * FROM `Sprache` WHERE TextID=\"$TextID\" AND Sprache ='".$_SESSION['Sprache']."'"; diff --git a/inc/funktion_menu.php b/inc/funktion_menu.php index e90e99b6..d66700e8 100755 --- a/inc/funktion_menu.php +++ b/inc/funktion_menu.php @@ -19,8 +19,8 @@ function ShowMenu( $Menu ) if( $_SESSION['CVS'][$MenuFile] == "Y") echo "\t\t\t<li><a href=\"". $Entry["File"]. "\">". $Entry["Name"]. "</a></li>\n"; - - echo $Entry["Line"]; + if( isset($Entry["Line"])) + echo $Entry["Line"]; //DEBUG diff --git a/inc/funktion_schichtplan.php b/inc/funktion_schichtplan.php index fc67c813..5d32b42c 100755 --- a/inc/funktion_schichtplan.php +++ b/inc/funktion_schichtplan.php @@ -45,6 +45,7 @@ function ausgabe_Feld_Inhalt( $SID, $Man ) //form Config global $CCC_Start, $CCC_End, $DEBUG; + $Spalten = ""; /////////////////////////////////////////////////////////////////// // Schow Admin Page @@ -72,10 +73,13 @@ function ausgabe_Feld_Inhalt( $SID, $Man ) $Anzahl = mysql_num_rows($Erg); $Feld=0; + $Temp_TID_old=-1; for( $i = 0; $i < $Anzahl; $i++ ) { - $Temp_TID_old = $Temp[$Feld]["TID"]; - $Temp_UID_old = $Temp[$Feld]["UID"]; + if( isset($Temp[$Feld]["TID"])) + $Temp_TID_old = $Temp[$Feld]["TID"]; + if( isset($Temp[$Feld]["UID"])) + $Temp_UID_old = $Temp[$Feld]["UID"]; $Temp_TID = mysql_result($Erg, $i, "TID"); @@ -95,7 +99,12 @@ function ausgabe_Feld_Inhalt( $SID, $Man ) // ist es eine zu vergeben schicht? if( $Temp[$Feld]["UID"] == 0 ) - $Temp[$Feld]["free"]++; + { + if( isset($Temp[$Feld]["free"])) + $Temp[$Feld]["free"]++; + else + $Temp[$Feld]["free"]=1; + } else $Temp[$Feld]["Engel"][] = $Temp[$Feld]["UID"]; } // FOR @@ -111,8 +120,9 @@ function ausgabe_Feld_Inhalt( $SID, $Man ) $Spalten.= $EngelTypeID[ $TempValue["TID"] ]. " "; // ausgabe Eingetragener Engel - if( count($TempValue["Engel"]) > 0 ) - { + if( isset($TempValue["Engel"])) + if( count($TempValue["Engel"]) > 0 ) + { if( count($TempValue["Engel"]) == 1 ) $Spalten.= Get_Text("inc_schicht_ist"). ":<br>\n\t\t"; else @@ -123,7 +133,7 @@ function ausgabe_Feld_Inhalt( $SID, $Man ) DisplayAvatar( $TempEngelID ). "<br>\n\t\t"; $Spalten = substr( $Spalten, 0, strlen($Spalten)-7 ); - } + } // ausgabe benötigter Engel //////////////////////////// @@ -137,10 +147,12 @@ function ausgabe_Feld_Inhalt( $SID, $Man ) $SQLerlaubnis = "SELECT Name FROM `EngelType` WHERE TID = '". $TempValue["TID"]. "'"; $Ergerlaubnis = mysql_query( $SQLerlaubnis, $con); if( mysql_num_rows( $Ergerlaubnis)) - if( $_SESSION['CVS'][mysql_result( $Ergerlaubnis, 0, "Name")] == "Y" || - $_SESSION['CVS'][mysql_result( $Ergerlaubnis, 0, "Name")] == "") - if( $TempValue["free"] > 0 ) - { + //setzen wenn nicht definiert + if( !isset($_SESSION['CVS'][mysql_result( $Ergerlaubnis, 0, "Name")])) + $_SESSION['CVS'][mysql_result( $Ergerlaubnis, 0, "Name")] = "Y"; + if( $_SESSION['CVS'][mysql_result( $Ergerlaubnis, 0, "Name")] == "Y") + if( $TempValue["free"] > 0 ) + { $Spalten.= "<br>\n\t\t <a href=\"./schichtplan_add.php?SID=$SID&TID=". $TempValue["TID"]."\">"; $Spalten.= $TempValue["free"]; @@ -154,12 +166,14 @@ function ausgabe_Feld_Inhalt( $SID, $Man ) Get_Text("inc_schicht_werden"); $Spalten.= Get_Text("inc_schicht_noch_gesucht"); $Spalten.= "</a>"; - } + } } else { - if( $TempValue["free"] > 0 ) - $Spalten.= "<br>\n\t\t <h3><a>Fehlen noch: ". $TempValue["free"]. "</a></h3>"; + if( isset($TempValue["free"])) + if( $TempValue["free"] > 0 ) + $Spalten.= "<br>\n\t\t <h3><a>Fehlen noch: ". + $TempValue["free"]. "</a></h3>"; } $Spalten.= "<br>\n\t\t"; @@ -287,8 +301,8 @@ function CreateRoomShifts( $raum ) " (". mysql_result($Erg, $i, "SID"). " R$raum) (xx-xx)<br><br>"; } } - if( $ZeitZeiger <= 24 ) - $Spalten[$ZeitZeiger * $GlobalZeileProStunde].= + if( $ZeitZeiger < 24 ) + $Spalten[($ZeitZeiger * $GlobalZeileProStunde)].= "\t\t<td valign=\"top\" rowspan=\"". ((24 - $ZeitZeiger) * $GlobalZeileProStunde ). "\"> </td>\n"; diff --git a/inc/funktion_schichtplan_beamer.php b/inc/funktion_schichtplan_beamer.php index 5d41ad01..5a9e78c3 100755 --- a/inc/funktion_schichtplan_beamer.php +++ b/inc/funktion_schichtplan_beamer.php @@ -157,7 +157,7 @@ function ausgabe_Zeile( $RID, $Time, &$AnzahlEintraege ) " (`DateS` like '". gmdate("Y-m-d H", $Time). "%')) ) ORDER BY `DateS`;"; $ErgRoom = mysql_query($SQL, $con); - $Out.= "\t<td>"; + $Out= "\t<td>"; if( mysql_num_rows( $ErgRoom)>0 ) for( $i=1; $i<=mysql_num_rows( $ErgRoom); $i++ ) { diff --git a/inc/header.php b/inc/header.php index 16904ee9..64e831fd 100755 --- a/inc/header.php +++ b/inc/header.php @@ -89,9 +89,11 @@ if( $Page["ShowTabel"]=="Y" ) echo "\n\n\n"; if (IsSet($_SESSION['UID'])) { - $BACKUP_SESSION_OLDURL = $_SESSION['oldurl']; - $_SESSION['oldurl'] = $_SESSION['newurl']; - $_SESSION['newurl'] = $REQUEST_URI; + if( isset($_SESSION['oldurl'])) + $BACKUP_SESSION_OLDURL = $_SESSION['oldurl']; + if( isset($_SESSION['newurl'])) + $_SESSION['oldurl'] = $_SESSION['newurl']; + $_SESSION['newurl'] = $_SERVER["REQUEST_URI"]; } diff --git a/inc/secure.php b/inc/secure.php index 32c8f864..786c18a6 100755 --- a/inc/secure.php +++ b/inc/secure.php @@ -1,7 +1,7 @@ <?php //soll dein funktion entahlten die alle übergebenen parameter überprüft //'`'" - + foreach ($_GET as $k => $v) { $v = htmlspecialchars($v); @@ -13,6 +13,7 @@ foreach ($_GET as $k => $v) exit; } $_GET[$k] = $v; + echo "GET $k=\"$v\"<br>"; } foreach ($_POST as $k => $v) @@ -25,6 +26,7 @@ foreach ($_POST as $k => $v) exit; } $_POST[$k] = $v; + echo "POST $k=\"$v\"<br>"; } ?> |