summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcookie <cookie@29ba0400-6e00-0410-a75a-ca02368028f8>2006-08-31 04:40:50 +0000
committercookie <cookie@29ba0400-6e00-0410-a75a-ca02368028f8>2006-08-31 04:40:50 +0000
commit6dd3e7e17ec151ea523f5b99cf0bd30dc441b030 (patch)
tree7c736da78673e0c0a6984d479a50f44ec077b104
parent4892750720e136074598c609985c590577f24480 (diff)
pentabarf xcal url jetzt zentral configurierbar
daten aus pentabarf werden jetzt mit fopen geholt git-svn-id: svn://svn.cccv.de/engel-system@147 29ba0400-6e00-0410-a75a-ca02368028f8
-rwxr-xr-xdefault-conf/www-ssl/inc/config.php13
-rwxr-xr-xwww-ssl/admin/dbUpdateFromXLS.php48
2 files changed, 36 insertions, 25 deletions
diff --git a/default-conf/www-ssl/inc/config.php b/default-conf/www-ssl/inc/config.php
index cef402f9..21f9c847 100755
--- a/default-conf/www-ssl/inc/config.php
+++ b/default-conf/www-ssl/inc/config.php
@@ -1,6 +1,6 @@
<?PHP
// Adresse des Webservers
-$url = "https://172.16.16.40/";
+$url = "https://engelsystem.url/";
// Startverzeichnis des Engelhome
$ENGEL_ROOT = "/engel/";
@@ -25,8 +25,8 @@ $crypt_system="md5";
$DEBUG = 0;
// SSL Cert-KEY
-$show_SSLCERT = "MD5:<br>AF:32:B9:BE:3F:AE:53:78:1E:1B:6E:82:48:E0:DB:94<br>\n".
- "SHA1:<br>B8:07:E8:A4:F3:1A:EF:03:81:C2:44:0C:50:25:3D:1A:A0:E4:AA:76";
+$show_SSLCERT = "MD5:<br>FF:FF:FF:FF:FF:FF:FF:FF:FF:FF:FF:FF:FF:FF:FF:FF<br>\n".
+ "SHA1:<br>FF:FF:FF:FF:FF:FF:FF:FF:FF:FF:FF:FF:FF:FF:FF:FF:FF:FF:FF:FF";
//globale const. fuer schischtplan
$GlobalZeileProStunde = 4;
@@ -34,11 +34,10 @@ $GlobalZeileProStunde = 4;
//ist ein modem angeschlossen
$ModemEnable = false;
-//soll das xcal-file von penterbarf
-//$DataGetMeth="wget";
-$DataGetMeth="lynx";
-
//Tempdir
$Tempdir="/tmp";
+//Pentabarf ConferenzDI für UpdateDB
+$PentabarXCALurl="https://pentabarf.cccv.de/xcal/conference/<ConfereneceID>";
+
?>
diff --git a/www-ssl/admin/dbUpdateFromXLS.php b/www-ssl/admin/dbUpdateFromXLS.php
index 80cf5419..8afe11b8 100755
--- a/www-ssl/admin/dbUpdateFromXLS.php
+++ b/www-ssl/admin/dbUpdateFromXLS.php
@@ -43,36 +43,48 @@ CreateRoomArrays();
F I L E
##############################################################################################*/
echo "\n\n<br>\n<h1>XML File:</h1>\n";
-if( isset($_POST["PentabarfUser"]) && isset($_POST["PentabarfPasswd"]) && isset($_POST["PentabarfURL"]))
+if( isset($_POST["PentabarfUser"]) && isset($_POST["password"]) && isset($_POST["PentabarfURL"]))
{
- echo "Update XML-File from Pentabarf..";
+ echo "Update XCAL-File from Pentabarf..";
- if( $DataGetMeth=="wget")
- $Command = "wget --http-user=". $_POST["PentabarfUser"]. " --http-passwd=".$_POST["PentabarfPasswd"]. " ".
- $_POST["PentabarfURL"].
- " --output-file=$Tempdir/engelXMLwgetLog --output-document=$Tempdir/engelXML".
- " --no-check-certificate";
- elseif( $DataGetMeth=="lynx")
- $Command = "lynx -auth=". $_POST["PentabarfUser"]. ":".$_POST["PentabarfPasswd"]. " -dump ".
- $_POST["PentabarfURL"]. " > $Tempdir/engelXML";
- echo system( $Command, $Status);
-
- if( $Status==0)
- echo "OK.<br>";
+ //user uns password in url einbauen
+ $StartURL = strpos( $_POST["PentabarfURL"], "://") + 3;
+ $FileNameIn = substr( $_POST["PentabarfURL"], 0, $StartURL).
+ $_POST["PentabarfUser"]. ":".
+ $_POST["password"]. "@".
+ substr( $_POST["PentabarfURL"], $StartURL);
+
+ if( ($fileIn = fopen( $FileNameIn, "r")) != FALSE)
+ {
+ if( ($fileOut = fopen( "$Tempdir/engelXML", "w")) != FALSE)
+ {
+ $Zeilen = 0;
+ while (!feof($fileIn))
+ {
+ $Zeilen++;
+ fputs( $fileOut, fgets( $fileIn));
+ }
+ fclose( $fileOut);
+ echo "<br>Es wurden $Zeilen Zeilen eingelesen<br>";
+ }
+ else
+ echo "<h2>fail: File '$Tempdir/engelXML' not writeable!</h2>";
+ fclose( $fileIn);
+ }
else
- echo "fail ($Status)($Command).<br>";
+ echo "<h2>fail: File '". $_POST["PentabarfURL"]. "' not readable!</h2>";
}
else
{
echo "<form action=\"dbUpdateFromXLS.php\" method=\"post\">\n";
echo "<table border=\"0\">\n";
- echo "\t<tr><td>XML-File:</td>".
+ echo "\t<tr><td>XCAL-File:</td>".
"<td><input name=\"PentabarfURL\" type=\"text\" size=\"100\" maxlength=\"1000\" ".
- "value=\"https://pentabarf.cccv.de/~sven/xcal/conference/7\"></td></tr>\n";
+ "value=\"$PentabarXCALurl\"></td></tr>\n";
echo "\t<tr><td>Username:</td>".
"<td><input name=\"PentabarfUser\" type=\"text\" size=\"30\" maxlength=\"30\"></td></tr>\n";
echo "\t<tr><td>Password:</td>".
- "<td><input name=\"PentabarfPasswd\" type=\"password\" size=\"30\" maxlength=\"30\"></td></tr>\n";
+ "<td><input name=\"password\" type=\"password\" size=\"30\" maxlength=\"30\"></td></tr>\n";
echo "\t<tr><td></td><td><input type=\"submit\" name=\"FileUpload\" value=\"upload\"></td></tr>\n";
echo "</table>\n";
echo "</form>\n";