diff options
Diffstat (limited to 'src/site')
| -rw-r--r-- | src/site/getsite.php | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/site/getsite.php b/src/site/getsite.php index 9cf4905..5e4b621 100644 --- a/src/site/getsite.php +++ b/src/site/getsite.php @@ -39,12 +39,14 @@ if($ct["contestlocalsite"]==$ct["contestmainsite"]) { // $fp=fopen('/tmp/aaa',"w"); fwrite($fp,$_POST['xml']); fclose($fp); $s = decryptData(rawurldecode($_POST['xml']),myhash($_SESSION["usertable"]["userpassword"])); // $fp=fopen('/tmp/aaa1',"w"); fwrite($fp,$s); fclose($fp); - - - if(importSiteFromXML($s,$_SESSION["usertable"]["contestnumber"],$fromsite)) - echo "<!-- <OK> -->"; - else - echo "<!-- <NOTOK> -->"; + if(strtoupper(substr($s,0,5)) != "<XML>") { + echo "<!-- <ERROR8> ".session_id() . " " . session_id() . " -->\n"; + } else { + if(importFromXML($s,$_SESSION["usertable"]["contestnumber"],$fromsite,true)) + echo "<!-- <OK> -->"; + else + echo "<!-- <NOTOK> -->"; + } } if(isset($_POST['updatetime']) && is_numeric($_POST['updatetime'])) { $xml = generateSiteXML($_SESSION["usertable"]["contestnumber"],$fromsite,$_POST['updatetime']); |