diff options
-rwxr-xr-x | www-ssl/admin/dbUpdateFromXLS.php | 36 | ||||
-rwxr-xr-x | www-ssl/inc/config.php | 4 | ||||
-rwxr-xr-x | www-ssl/inc/funktion_xml_schudle.php | 6 |
3 files changed, 27 insertions, 19 deletions
diff --git a/www-ssl/admin/dbUpdateFromXLS.php b/www-ssl/admin/dbUpdateFromXLS.php index 11ce6911..de342945 100755 --- a/www-ssl/admin/dbUpdateFromXLS.php +++ b/www-ssl/admin/dbUpdateFromXLS.php @@ -10,9 +10,9 @@ include ("./inc/funktion_xml.php"); /////////// $ShowDataStrukture = 0; $EnableRoomFunctions = 1; -$EnableRooms = 0; -$EnableRoomsDB = 0; -$EnableSchudleFunctions = 0; +$EnableRooms = 1; +$EnableRoomsDB = 1; +$EnableSchudleFunctions = 1; $EnableSchudle = 1; $EnableSchudleDB = 0; @@ -20,21 +20,25 @@ $EnableSchudleDB = 0; /*############################################################################################## erstellt Arrays der Reume ##############################################################################################*/ -$sql = "SELECT `RID`, `Name` FROM `Room` ". - "WHERE `Show`='Y'". - "ORDER BY `Number`, `Name`;"; -$Erg = mysql_query($sql, $con); -$rowcount = mysql_num_rows($Erg); - -for ($i=0; $i<$rowcount; $i++) +function CreateRoomArrays() { - $Room[$i]["RID"] = mysql_result($Erg, $i, "RID"); - $Room[$i]["Name"] = mysql_result($Erg, $i, "Name"); - $RoomID[ mysql_result($Erg, $i, "RID") ] = mysql_result($Erg, $i, "Name"); - $RoomName[ mysql_result($Erg, $i, "Name") ] = mysql_result($Erg, $i, "RID"); + global $Room, $RoomID, $RoomName, $con; + + $sql = "SELECT `RID`, `Name` FROM `Room` ". + "WHERE `Show`='Y'". + "ORDER BY `Number`, `Name`;"; + $Erg = mysql_query($sql, $con); + $rowcount = mysql_num_rows($Erg); + + for ($i=0; $i<$rowcount; $i++) + { + $Room[$i]["RID"] = mysql_result($Erg, $i, "RID"); + $Room[$i]["Name"] = mysql_result($Erg, $i, "Name"); + $RoomID[ mysql_result($Erg, $i, "RID") ] = mysql_result($Erg, $i, "Name"); + $RoomName[ mysql_result($Erg, $i, "Name") ] = mysql_result($Erg, $i, "RID"); + } } - - +CreateRoomArrays(); /*############################################################################################## F I L E diff --git a/www-ssl/inc/config.php b/www-ssl/inc/config.php index 101319ff..c0587d57 100755 --- a/www-ssl/inc/config.php +++ b/www-ssl/inc/config.php @@ -36,7 +36,7 @@ $GlobalZeileProStunde = 4; $ModemEnable = false; //soll das xcal-file von penterbarf -$DataGetMeth="wget"; -//$DataGetMeth="lynx"; +//$DataGetMeth="wget"; +$DataGetMeth="lynx"; ?> diff --git a/www-ssl/inc/funktion_xml_schudle.php b/www-ssl/inc/funktion_xml_schudle.php index c9f68501..6d1b2974 100755 --- a/www-ssl/inc/funktion_xml_schudle.php +++ b/www-ssl/inc/funktion_xml_schudle.php @@ -150,7 +150,11 @@ foreach($XMLmain->sub as $EventKey => $Event) $SIDDB = mysql_result($Erg, 0, "SID"); $TimeDB = mysql_result($Erg, 0, "DateS"); $LenDB = mysql_result($Erg, 0, "Len"); - $RIDDB = $RoomID[mysql_result($Erg, 0, "RID")]; + if( isset($RoomID[mysql_result($Erg, 0, "RID")])) + $RIDDB = $RoomID[mysql_result($Erg, 0, "RID")]; + else + $RIDDB = "RID". mysql_result($Erg, 0, "RID"); + $ManDB = mysql_result($Erg, 0, "Man"); } else |