From 7fc9c8d0fb8311763163f2b99abffc610f26467e Mon Sep 17 00:00:00 2001 From: cookie Date: Tue, 15 Nov 2005 22:42:50 +0000 Subject: [PATCH] URL wird aus penterbarf uebernommen und ausgegeben git-svn-id: svn://svn.cccv.de/engel-system@55 29ba0400-6e00-0410-a75a-ca02368028f8 --- www-ssl/inc/funktion_schichtplan.php | 6 +++-- www-ssl/inc/funktion_xml_schudle.php | 36 +++++++++++++++++++--------- 2 files changed, 29 insertions(+), 13 deletions(-) diff --git a/www-ssl/inc/funktion_schichtplan.php b/www-ssl/inc/funktion_schichtplan.php index 6810f6df..55575663 100755 --- a/www-ssl/inc/funktion_schichtplan.php +++ b/www-ssl/inc/funktion_schichtplan.php @@ -59,8 +59,10 @@ function ausgabe_Feld_Inhalt( $SID, $Man ) /////////////////////////////////////////////////////////////////// // Ausgabe des Schischtnamens /////////////////////////////////////////////////////////////////// - if( isset($CCC_Start) && $SID<10000) - $Spalten.="$Man:
"; + $SQL = "SELECT `URL` FROM `Shifts` WHERE (`SID` = '$SID');"; + $Erg = mysql_query($SQL, $con); + if( mysql_result($Erg, 0, 0) != "") + $Spalten.="$Man:
"; else $Spalten.="".$Man.":
"; diff --git a/www-ssl/inc/funktion_xml_schudle.php b/www-ssl/inc/funktion_xml_schudle.php index 6d1b2974..05727127 100755 --- a/www-ssl/inc/funktion_xml_schudle.php +++ b/www-ssl/inc/funktion_xml_schudle.php @@ -15,7 +15,8 @@ function SaveSchedule() isset($_GET["DateXML"]) && isset($_GET["RIDXML"]) && isset($_GET["LenXML"]) && - isset($_GET["ManXML"]) ) + isset($_GET["ManXML"]) && + isset($_GET["URLXML"]) ) { //erzeuge von `DateE` $TimeStart = substr( $_GET["DateXML"], 11, 2) + (substr($_GET["DateXML"], 14, 2)/60); @@ -40,10 +41,16 @@ function SaveSchedule() $Erg1 = mysql_query($SQL1, $con); if( mysql_num_rows($Erg1)==0) - $SQL= "INSERT INTO `Shifts` (`SID`, `DateS`, `DateE`, `Len`, `RID`, `Man`, `FromPentabarf`) ". - "VALUES ('". $_GET["SIDXML"]. "', '". $_GET["DateXML"]. "', '". - $DateEnd. "', '". $_GET["LenXML"]. "', '". - $_GET["RIDXML"]. "', '". mysql_escape_string($_GET["ManXML"]). "', 'Y');"; + $SQL= "INSERT INTO `Shifts` (`SID`, `DateS`, `DateE`, `Len`, `RID`, `Man`, `FromPentabarf`, `URL`) ". + "VALUES ('". $_GET["SIDXML"]. "', ". + "'". $_GET["DateXML"]. "', ". + "'". $DateEnd. "', ". + "'". $_GET["LenXML"]. "', ". + "'". $_GET["RIDXML"]. "', ". + "'". mysql_escape_string($_GET["ManXML"]). "', ". + "'Y', ". + "'". $_GET["URLXML"]. "'". + ");"; else $SQL= "UPDATE `Shifts` SET ". "`DateS` = '". $_GET["DateXML"]. "', ". @@ -51,7 +58,8 @@ function SaveSchedule() "`Len` = '". $_GET["LenXML"]. "', ". "`RID` = '". $_GET["RIDXML"]. "', ". "`Man` = '". mysql_escape_string($_GET["ManXML"]). "', ". - "`FromPentabarf`= 'Y' ". + "`FromPentabarf`= 'Y', ". + "`URL`= '". $_GET["URLXML"]. "' ". "WHERE `SID` = '". $_GET["SIDXML"]. "' LIMIT 1;"; $Erg = mysql_query($SQL, $con); if( $Erg ) @@ -132,6 +140,7 @@ foreach($XMLmain->sub as $EventKey => $Event) $LenXML = substr( getXMLsubData( $Event, "DURATION"), 0, strlen(getXMLsubData( $Event, "DURATION"))-1); $RIDXML = getXMLsubData( $Event, "LOCATION"); $ManXML = getXMLsubData( $Event, "SUMMARY"); + $URLXML = getXMLsubData( $Event, "URL"); if( isset($_GET["UpdateALL"])) { @@ -140,6 +149,7 @@ foreach($XMLmain->sub as $EventKey => $Event) $_GET["LenXML"] = $LenXML; $_GET["RIDXML"] = $RIDXML; $_GET["ManXML"] = $ManXML; + $_GET["URLXML"] = $URLXML; SaveSchedule(); } @@ -156,9 +166,10 @@ foreach($XMLmain->sub as $EventKey => $Event) $RIDDB = "RID". mysql_result($Erg, 0, "RID"); $ManDB = mysql_result($Erg, 0, "Man"); + $URLDB = mysql_result($Erg, 0, "URL"); } else - $SIDDB = $TimeDB = $LenDB = $RIDDB = $ManDB= ""; + $SIDDB = $TimeDB = $LenDB = $RIDDB = $ManDB = $URLDB = ""; echo "\t\n"; echo "\t\n\t\t". @@ -169,11 +180,15 @@ foreach($XMLmain->sub as $EventKey => $Event) "\n"; echo "\t\n\t\t". "\n"; + + echo "\t\n"; + echo "\t\n"; if( !( $SIDXML==$SIDDB && $DateXML==$TimeDB && $RIDXML==$RIDDB && $LenXML==$LenDB && - $ManXML==$ManDB) ) + $ManXML==$ManDB && + $URLXML==$URLDB) ) { echo "\t\n"; $DS_KO++; @@ -185,9 +200,8 @@ foreach($XMLmain->sub as $EventKey => $Event) } echo "\t\n"; echo "\n"; - $Where.= " OR SID=$SIDXML"; - - } + $Where.= " OR SID=$SIDXML"; + } } echo "status: $DS_KO/$DS_OK nicht Aktuel.\n";