summaryrefslogtreecommitdiff
path: root/www-ssl
diff options
context:
space:
mode:
authorcookie <cookie@29ba0400-6e00-0410-a75a-ca02368028f8>2006-11-10 19:37:59 +0000
committercookie <cookie@29ba0400-6e00-0410-a75a-ca02368028f8>2006-11-10 19:37:59 +0000
commite87e62d953ec5d4a79390ce28ef88fe43a816473 (patch)
tree5ee6538614a28e5aa075f620e53a36568e87d116 /www-ssl
parentf57b0c9137ab8d5278715f2cedf34eabb14ee3d5 (diff)
probleme mit leeren tabellen beseitigt
git-svn-id: svn://svn.cccv.de/engel-system@157 29ba0400-6e00-0410-a75a-ca02368028f8
Diffstat (limited to 'www-ssl')
-rwxr-xr-xwww-ssl/inc/funktion_schichtplan_Tage.php8
-rwxr-xr-xwww-ssl/nonpublic/schichtplan.1.php8
-rwxr-xr-xwww-ssl/nonpublic/schichtplan.2.php7
-rwxr-xr-xwww-ssl/nonpublic/schichtplan.php13
4 files changed, 22 insertions, 14 deletions
diff --git a/www-ssl/inc/funktion_schichtplan_Tage.php b/www-ssl/inc/funktion_schichtplan_Tage.php
index 1d44cb1e..5ac92e7e 100755
--- a/www-ssl/inc/funktion_schichtplan_Tage.php
+++ b/www-ssl/inc/funktion_schichtplan_Tage.php
@@ -50,8 +50,11 @@ $SQL = "SELECT `DateS` FROM `Shifts` ORDER BY `DateS` LIMIT 1";
$Erg = mysql_query($SQL, $con);
$Pos=0;
-do
+
+if( mysql_num_rows($Erg)>0)
{
+ do
+ {
//Startdatum einlesen und link ausgeben
$DateS = substr(mysql_result($Erg, 0 , 0), 0,10);
$VeranstaltungsTage[$Pos++] = $DateS;
@@ -77,7 +80,8 @@ do
"ORDER BY `DateS` ".
"LIMIT 1";
$Erg = mysql_query($SQL, $con);
-} while( mysql_fetch_row($Erg) > 0);
+ } while( mysql_fetch_row($Erg) > 0);
+}
$VeranstaltungsTageMax = $Pos-1;
?>
diff --git a/www-ssl/nonpublic/schichtplan.1.php b/www-ssl/nonpublic/schichtplan.1.php
index a4884a11..d733b111 100755
--- a/www-ssl/nonpublic/schichtplan.1.php
+++ b/www-ssl/nonpublic/schichtplan.1.php
@@ -13,9 +13,9 @@ function Printlink( $Datum)
echo "'>$Datum</a></li>\n";
} //function Printlink(
-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 2074e3fa..bfa1d5a4 100755
--- a/www-ssl/nonpublic/schichtplan.2.php
+++ b/www-ssl/nonpublic/schichtplan.2.php
@@ -4,15 +4,16 @@
include ("./inc/funktion_schichtplan_aray.php");
-foreach( $Room as $RoomEntry )
-{
+if( isset ($Room))
+ foreach( $Room as $RoomEntry )
+ {
if(isset($ausdatum))
echo "\t<li><a href='./schichtplan.php?ausdatum=$ausdatum&raum=". $RoomEntry["RID"]. "'>".
$RoomEntry["Name"]. "</a></li>\n";
else
echo "\t<li><a href='./schichtplan.php?raum=". $RoomEntry["RID"]. "'>".
$RoomEntry["Name"]. "</a></li>\n";
-}
+ }
echo "<br>";
if(isset($ausdatum))
echo "<li><a href='./schichtplan.php?ausdatum=$ausdatum&raum=-1'>alle</a></li>";
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"). "<br><br>\n";
-
- foreach( $Room as $RoomEntry )
- echo "\t<li><a href='./schichtplan.php?ausdatum=$ausdatum&raum=". $RoomEntry["RID"]. "'>".
- $RoomEntry["Name"]. "</a></li>\n";
+ if( isset($Room))
+ foreach( $Room as $RoomEntry )
+ echo "\t<li><a href='./schichtplan.php?ausdatum=$ausdatum&raum=". $RoomEntry["RID"]. "'>".
+ $RoomEntry["Name"]. "</a></li>\n";
echo "<br><br>";
echo Get_Text("pub_schicht_alles_1"). "<a href='./schichtplan.php?ausdatum=$ausdatum&raum=-1'> <u>".