URL wird aus penterbarf uebernommen und ausgegeben

git-svn-id: svn://svn.cccv.de/engel-system@55 29ba0400-6e00-0410-a75a-ca02368028f8
This commit is contained in:
cookie 2005-11-15 22:42:50 +00:00
parent a515546b5a
commit 7fc9c8d0fb
2 changed files with 29 additions and 13 deletions

View File

@ -59,8 +59,10 @@ function ausgabe_Feld_Inhalt( $SID, $Man )
/////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////
// Ausgabe des Schischtnamens // Ausgabe des Schischtnamens
/////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////
if( isset($CCC_Start) && $SID<10000) $SQL = "SELECT `URL` FROM `Shifts` WHERE (`SID` = '$SID');";
$Spalten.="<a href=\"$CCC_Start$SID$CCC_End\" target=\"_black\"><u>$Man:</u></a><br>"; $Erg = mysql_query($SQL, $con);
if( mysql_result($Erg, 0, 0) != "")
$Spalten.="<a href=\"". mysql_result($Erg, 0, 0). "\" target=\"_black\"><u>$Man:</u></a><br>";
else else
$Spalten.="<u>".$Man.":</u><br>"; $Spalten.="<u>".$Man.":</u><br>";

View File

@ -15,7 +15,8 @@ function SaveSchedule()
isset($_GET["DateXML"]) && isset($_GET["DateXML"]) &&
isset($_GET["RIDXML"]) && isset($_GET["RIDXML"]) &&
isset($_GET["LenXML"]) && isset($_GET["LenXML"]) &&
isset($_GET["ManXML"]) ) isset($_GET["ManXML"]) &&
isset($_GET["URLXML"]) )
{ {
//erzeuge von `DateE` //erzeuge von `DateE`
$TimeStart = substr( $_GET["DateXML"], 11, 2) + (substr($_GET["DateXML"], 14, 2)/60); $TimeStart = substr( $_GET["DateXML"], 11, 2) + (substr($_GET["DateXML"], 14, 2)/60);
@ -40,10 +41,16 @@ function SaveSchedule()
$Erg1 = mysql_query($SQL1, $con); $Erg1 = mysql_query($SQL1, $con);
if( mysql_num_rows($Erg1)==0) if( mysql_num_rows($Erg1)==0)
$SQL= "INSERT INTO `Shifts` (`SID`, `DateS`, `DateE`, `Len`, `RID`, `Man`, `FromPentabarf`) ". $SQL= "INSERT INTO `Shifts` (`SID`, `DateS`, `DateE`, `Len`, `RID`, `Man`, `FromPentabarf`, `URL`) ".
"VALUES ('". $_GET["SIDXML"]. "', '". $_GET["DateXML"]. "', '". "VALUES ('". $_GET["SIDXML"]. "', ".
$DateEnd. "', '". $_GET["LenXML"]. "', '". "'". $_GET["DateXML"]. "', ".
$_GET["RIDXML"]. "', '". mysql_escape_string($_GET["ManXML"]). "', 'Y');"; "'". $DateEnd. "', ".
"'". $_GET["LenXML"]. "', ".
"'". $_GET["RIDXML"]. "', ".
"'". mysql_escape_string($_GET["ManXML"]). "', ".
"'Y', ".
"'". $_GET["URLXML"]. "'".
");";
else else
$SQL= "UPDATE `Shifts` SET ". $SQL= "UPDATE `Shifts` SET ".
"`DateS` = '". $_GET["DateXML"]. "', ". "`DateS` = '". $_GET["DateXML"]. "', ".
@ -51,7 +58,8 @@ function SaveSchedule()
"`Len` = '". $_GET["LenXML"]. "', ". "`Len` = '". $_GET["LenXML"]. "', ".
"`RID` = '". $_GET["RIDXML"]. "', ". "`RID` = '". $_GET["RIDXML"]. "', ".
"`Man` = '". mysql_escape_string($_GET["ManXML"]). "', ". "`Man` = '". mysql_escape_string($_GET["ManXML"]). "', ".
"`FromPentabarf`= 'Y' ". "`FromPentabarf`= 'Y', ".
"`URL`= '". $_GET["URLXML"]. "' ".
"WHERE `SID` = '". $_GET["SIDXML"]. "' LIMIT 1;"; "WHERE `SID` = '". $_GET["SIDXML"]. "' LIMIT 1;";
$Erg = mysql_query($SQL, $con); $Erg = mysql_query($SQL, $con);
if( $Erg ) if( $Erg )
@ -132,6 +140,7 @@ foreach($XMLmain->sub as $EventKey => $Event)
$LenXML = substr( getXMLsubData( $Event, "DURATION"), 0, strlen(getXMLsubData( $Event, "DURATION"))-1); $LenXML = substr( getXMLsubData( $Event, "DURATION"), 0, strlen(getXMLsubData( $Event, "DURATION"))-1);
$RIDXML = getXMLsubData( $Event, "LOCATION"); $RIDXML = getXMLsubData( $Event, "LOCATION");
$ManXML = getXMLsubData( $Event, "SUMMARY"); $ManXML = getXMLsubData( $Event, "SUMMARY");
$URLXML = getXMLsubData( $Event, "URL");
if( isset($_GET["UpdateALL"])) if( isset($_GET["UpdateALL"]))
{ {
@ -140,6 +149,7 @@ foreach($XMLmain->sub as $EventKey => $Event)
$_GET["LenXML"] = $LenXML; $_GET["LenXML"] = $LenXML;
$_GET["RIDXML"] = $RIDXML; $_GET["RIDXML"] = $RIDXML;
$_GET["ManXML"] = $ManXML; $_GET["ManXML"] = $ManXML;
$_GET["URLXML"] = $URLXML;
SaveSchedule(); SaveSchedule();
} }
@ -156,9 +166,10 @@ foreach($XMLmain->sub as $EventKey => $Event)
$RIDDB = "RID". mysql_result($Erg, 0, "RID"); $RIDDB = "RID". mysql_result($Erg, 0, "RID");
$ManDB = mysql_result($Erg, 0, "Man"); $ManDB = mysql_result($Erg, 0, "Man");
$URLDB = mysql_result($Erg, 0, "URL");
} }
else else
$SIDDB = $TimeDB = $LenDB = $RIDDB = $ManDB= ""; $SIDDB = $TimeDB = $LenDB = $RIDDB = $ManDB = $URLDB = "";
echo "\t<td><input name=\"SIDXML\" type=\"text\" value=\"$SIDXML\" size=\"2\" eadonly></td>\n"; echo "\t<td><input name=\"SIDXML\" type=\"text\" value=\"$SIDXML\" size=\"2\" eadonly></td>\n";
echo "\t<td><input name=\"DateXML\" type=\"text\" value=\"$DateXML\" size=\"17\" readonly>\n\t\t". echo "\t<td><input name=\"DateXML\" type=\"text\" value=\"$DateXML\" size=\"17\" readonly>\n\t\t".
@ -169,11 +180,15 @@ foreach($XMLmain->sub as $EventKey => $Event)
"<input name=\"LenDB\" type=\"text\" value=\"$LenDB\" size=\"1\"readonly></td>\n"; "<input name=\"LenDB\" type=\"text\" value=\"$LenDB\" size=\"1\"readonly></td>\n";
echo "\t<td><input name=\"ManXML\" type=\"text\" value=\"$ManXML\" size=\"40\"readonly>\n\t\t". echo "\t<td><input name=\"ManXML\" type=\"text\" value=\"$ManXML\" size=\"40\"readonly>\n\t\t".
"<input name=\"ManDB\" type=\"text\" value=\"$ManDB\" size=\"40\"readonly></td>\n"; "<input name=\"ManDB\" type=\"text\" value=\"$ManDB\" size=\"40\"readonly></td>\n";
echo "\t<td><input name=\"URLXML\" type=\"hidden\" value=\"$URLXML\"></td>\n";
echo "\t<td><input name=\"URLDB\" type=\"hidden\" value=\"$URLDB\"></td>\n";
if( !( $SIDXML==$SIDDB && if( !( $SIDXML==$SIDDB &&
$DateXML==$TimeDB && $DateXML==$TimeDB &&
$RIDXML==$RIDDB && $RIDXML==$RIDDB &&
$LenXML==$LenDB && $LenXML==$LenDB &&
$ManXML==$ManDB) ) $ManXML==$ManDB &&
$URLXML==$URLDB) )
{ {
echo "\t<td><input type=\"submit\" name=\"ScheduleUpdate\" value=\"update\"></td>\n"; echo "\t<td><input type=\"submit\" name=\"ScheduleUpdate\" value=\"update\"></td>\n";
$DS_KO++; $DS_KO++;
@ -186,7 +201,6 @@ foreach($XMLmain->sub as $EventKey => $Event)
echo "\t</tr>\n"; echo "\t</tr>\n";
echo "</form>\n"; echo "</form>\n";
$Where.= " OR SID=$SIDXML"; $Where.= " OR SID=$SIDXML";
} }
} }
echo "<tr><td colspan=\"6\">status: $DS_KO/$DS_OK nicht Aktuel.</td></tr>\n"; echo "<tr><td colspan=\"6\">status: $DS_KO/$DS_OK nicht Aktuel.</td></tr>\n";