aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCassio de Campos <cassiopc@gmail.com>2017-07-31 11:26:53 +0000
committerCassio de Campos <cassiopc@gmail.com>2017-07-31 11:26:53 +0000
commit394858d0bce7a433d1b12d584b3d37c62629836f (patch)
tree170d5e96c4e69db1bb3cc064297f4e6b37aa7247 /src
parente3ac3a916759fcd52d316e79b4c969b7e01b1b68 (diff)
downloadboca-394858d0bce7a433d1b12d584b3d37c62629836f.tar.gz
boca-394858d0bce7a433d1b12d584b3d37c62629836f.zip
bf
Diffstat (limited to 'src')
-rw-r--r--src/fextdata.php5
-rw-r--r--src/site/getsite.php2
2 files changed, 4 insertions, 3 deletions
diff --git a/src/fextdata.php b/src/fextdata.php
index 6acffaa..cdb087c 100644
--- a/src/fextdata.php
+++ b/src/fextdata.php
@@ -287,6 +287,7 @@ function getMainXML() {
}
function importFromXML($ar,$contest,$site,$tomain=false) {
+ LOGError("importFromXML: contest $contest site $site tomain $tomain");
$data = implode("",explode("\n",$ar));
$parser = xml_parser_create();
xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 1);
@@ -463,7 +464,7 @@ function genSQLs($contest, $site, $updatetime) {
function generateSiteXML($contest,$site,$updatetime) {
$sql = genSQLs($contest, $site, $updatetime);
$c = DBConnect();
- $str = "";
+ $str = "<XML>\n";
if ($c==null) return null;
DBExec($c, "begin work");
foreach($sql as $kk => $vv) {
@@ -485,8 +486,8 @@ function generateSiteXML($contest,$site,$updatetime) {
} else {
$str .= " <" . $key . ">" . $val . "</" . $key . ">\n";
}
- $str .= "</" . $kk . ">\n";
}
+ $str .= "</" . $kk . ">\n";
}
}
$str .= "</XML>\n";
diff --git a/src/site/getsite.php b/src/site/getsite.php
index 3948d74..27d581e 100644
--- a/src/site/getsite.php
+++ b/src/site/getsite.php
@@ -32,7 +32,7 @@ if($ct["contestlocalsite"]==$ct["contestmainsite"]) {
if($fromsite != '' && is_numeric($fromsite) && $fromsite > 0) {
if(isset($_POST)) {
if(isset($_POST['xml'])) {
- $u = DBUserInfo($_SESSION["usertable"]["contestnumber"], $_SESSION["usertable"]["sitenumber"], $_SESSION["usertable"]["usernumber"],null,false);
+ $u = DBUserInfo($_SESSION["usertable"]["contestnumber"], $_SESSION["usertable"]["usersitenumber"], $_SESSION["usertable"]["usernumber"],null,false);
// $fp=fopen('/tmp/aaa',"w"); fwrite($fp,$_POST['xml']); fclose($fp);
$s = decryptData(rawurldecode($_POST['xml']),$u["userpassword"],'xml from local not ok');
// $fp=fopen('/tmp/aaa1',"w"); fwrite($fp,$s); fclose($fp);