From 9f80afacfda4fbcede275901c9027f29afc4c100 Mon Sep 17 00:00:00 2001 From: Cassio de Campos Date: Mon, 16 Oct 2017 23:05:03 +0100 Subject: more displaying --- src/admin/transfer.php | 10 ++++++---- src/fextdata.php | 10 ++++------ 2 files changed, 10 insertions(+), 10 deletions(-) (limited to 'src') diff --git a/src/admin/transfer.php b/src/admin/transfer.php index 718c33a..20ea2e5 100644 --- a/src/admin/transfer.php +++ b/src/admin/transfer.php @@ -29,7 +29,8 @@ if(is_writable($remotedir)) { if (($s = DBSiteInfo($_SESSION["usertable"]["contestnumber"],$_SESSION["usertable"]["usersitenumber"])) == null) ForceLoad("index.php"); - + echo "
\n";
+    echo "Building scores\n"
     $level=$s["sitescorelevel"];
     $data0 = array();
     if($level>0) {
@@ -52,8 +53,9 @@ if(is_writable($remotedir)) {
     $fname = $remotedir . $ds . "score_site" . $localsite . "_" . $localsite . "_x"; // . md5($_SERVER['HTTP_HOST']);
     @file_put_contents($fname . ".tmp",base64_encode(serialize($data0)));
     @rename($fname . ".tmp",$fname . ".dat");
+    echo "Transferring scores\n";
     scoretransfer($fname . ".dat", $localsite);
-    
+    echo "Saving scores\n";
     if(@create_zip($remotedir,glob($remotedir . '/*.dat'),$fname . ".tmp") != 1) {
       LOGError("Cannot create score zip file");
       if(@create_zip($remotedir,array(),$fname . ".tmp") == 1)
@@ -62,9 +64,9 @@ if(is_writable($remotedir)) {
       @rename($fname . ".tmp",$destination);
     }
     @fclose($fp);
-    
+    echo "Processing other data\n";
     getMainXML($_SESSION["usertable"]["contestnumber"]);
-    
+    echo "
\n"; @unlink($destination . ".lck"); } else { if(file_exists($destination . ".lck") && filemtime($destination . ".lck") < time() - 180) diff --git a/src/fextdata.php b/src/fextdata.php index 6df8fbe..3eae683 100644 --- a/src/fextdata.php +++ b/src/fextdata.php @@ -264,7 +264,6 @@ function getMainXML($contest,$timeo=5) { $opts = array(); $opts['http']['timeout'] = $timeo; $context = stream_context_create($opts); - echo "
";
   echo "Connecting to ". $siteurl . "\n";
   try {
     $sess = @file_get_contents($siteurl . "index.php?getsessionid=1", 0, $context);
@@ -272,7 +271,7 @@ function getMainXML($contest,$timeo=5) {
     $sess=false;
   }
   if($sess===false) {
-    echo "timeout at connection\n
"; + echo "timeout at connection\n"; LOGError("getMainXML: timeout at get session id for $siteurl"); return false; } @@ -298,7 +297,7 @@ function getMainXML($contest,$timeo=5) { $ok=false; } if($ok===false) { - echo "timeout at authorization\n"; + echo "timeout at authorization\n"; LOGError("getMainXML: timeout at login for $siteurl"); return false; } @@ -332,7 +331,7 @@ function getMainXML($contest,$timeo=5) { $s=false; } if($s===false) { - echo "timeout at transferring\n"; + echo "timeout at transferring\n"; LOGError("getMainXML: timeout at transfer for $siteurl"); return false; } @@ -350,7 +349,7 @@ function getMainXML($contest,$timeo=5) { // LOGError("string: " . substr($s,0,50)); $s = decryptData($s,myhash (trim($sitedata[2])),'xml from main not ok'); if(strtoupper(substr($s,0,5)) != "") { - echo "Data corrupted\n"; + echo "Data corrupted\n"; return false; } echo "Importing data to local server\n"; @@ -368,7 +367,6 @@ function getMainXML($contest,$timeo=5) { echo "Transfer error (" . $ok . ")\n"; LOGError("xmltransfer: failed (" . $ok . ")"); } - echo "\n"; return false; } -- cgit v1.2.3