From e87e62d953ec5d4a79390ce28ef88fe43a816473 Mon Sep 17 00:00:00 2001 From: cookie Date: Fri, 10 Nov 2006 19:37:59 +0000 Subject: probleme mit leeren tabellen beseitigt git-svn-id: svn://svn.cccv.de/engel-system@157 29ba0400-6e00-0410-a75a-ca02368028f8 --- www-ssl/nonpublic/schichtplan.php | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'www-ssl/nonpublic/schichtplan.php') diff --git a/www-ssl/nonpublic/schichtplan.php b/www-ssl/nonpublic/schichtplan.php index b9a24cfd..a9e2d50e 100755 --- a/www-ssl/nonpublic/schichtplan.php +++ b/www-ssl/nonpublic/schichtplan.php @@ -51,7 +51,10 @@ if( !isset($ausdatum) ) $sql = "SELECT `DateS` FROM `Shifts` ORDER BY `DateS` ASC LIMIT 0, 1"; $Erg = mysql_query($sql, $con); } - $ausdatum = substr(mysql_result($Erg,0,"DateS"),0,10); + if( mysql_num_rows( $Erg ) > 0 ) + $ausdatum = substr(mysql_result($Erg,0,"DateS"),0,10); + else + $ausdatum = gmdate("Y-m-d", time()+3600); } @@ -61,10 +64,10 @@ if ( !isset($raum) ) { // Ausgabe wenn kein Raum Ausgewählt: echo Get_Text("pub_schicht_auswahl_raeume"). "

\n"; - - foreach( $Room as $RoomEntry ) - echo "\t
  • ". - $RoomEntry["Name"]. "
  • \n"; + if( isset($Room)) + foreach( $Room as $RoomEntry ) + echo "\t
  • ". + $RoomEntry["Name"]. "
  • \n"; echo "

    "; echo Get_Text("pub_schicht_alles_1"). " ". -- cgit v1.2.3-70-g09d2