From c1e9a742ab8567fc7026a39ea95ae3e95400faf8 Mon Sep 17 00:00:00 2001 From: Cassio de Campos Date: Thu, 19 Oct 2017 14:04:41 +0100 Subject: new features --- src/admin/misc.php | 56 +++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 41 insertions(+), 15 deletions(-) (limited to 'src/admin/misc.php') diff --git a/src/admin/misc.php b/src/admin/misc.php index 9872f12..3e5df80 100644 --- a/src/admin/misc.php +++ b/src/admin/misc.php @@ -27,28 +27,51 @@ require 'header.php'; document.form1.confirmation.value='confirm'; } } + function conf2() { + if (confirm("Confirm updating BOCA?")) { + if (confirm("This operation will update your BOCA system. Confirm?")) { + document.form1.confirmation.value='confirm'; + } + } + }
  -   +     - +
Not implemented
\n"; +} +$privatedir = $_SESSION['locr'] . $ds . "private"; +$remotedir = $_SESSION['locr'] . $ds . "private" . $ds . "remotescores"; +$destination = $remotedir . $ds ."scores.zip"; +if(is_writable($remotedir)) { + if(($fp = @fopen($destination . ".lck",'x')) !== false) { + if($doscore) { if (($s = DBSiteInfo($_SESSION["usertable"]["contestnumber"],$_SESSION["usertable"]["usersitenumber"])) == null) ForceLoad("index.php"); - echo "
\n";
+      echo "
\n";
       echo "Building scores\n";
       $level=$s["sitescorelevel"];
       $data0 = array();
@@ -83,14 +106,17 @@ if (isset($_POST["Submit1"]) && $_POST["Submit1"] == "Transfer") {
 	@rename($fname . ".tmp",$destination);
       }
       @fclose($fp);
+    }
+    if($dotransfer) {
       echo "Processing other data\n";
-      getMainXML($_SESSION["usertable"]["contestnumber"]);
+      getMainXML($_SESSION["usertable"]["contestnumber"],10,$dotransferall);
       echo "
\n"; - @unlink($destination . ".lck"); - } else { - if(file_exists($destination . ".lck") && filemtime($destination . ".lck") < time() - 180) - @unlink($destination . ".lck"); } + @unlink($destination . ".lck"); + } else { + if(file_exists($destination . ".lck") && filemtime($destination . ".lck") < time() - 120) + @unlink($destination . ".lck"); + echo "
Transfers locked by other process - try again soon
\n"; } } ?> -- cgit v1.2.3