diff options
| author | cassiopc <cassiopc@gmail.com> | 2013-10-28 10:48:47 +0000 |
|---|---|---|
| committer | cassiopc <cassiopc@gmail.com> | 2013-10-28 10:48:47 +0000 |
| commit | d753a1aaf9cb31d3e9d48bfe97ea3900e55b5b03 (patch) | |
| tree | 703201fc9e560db4ed095d4b7e722c02382e4363 /src/fextdata.php | |
| parent | b5a167f70dc84391c6a4aaafeff044b80b65dad6 (diff) | |
| download | boca-d753a1aaf9cb31d3e9d48bfe97ea3900e55b5b03.tar.gz boca-d753a1aaf9cb31d3e9d48bfe97ea3900e55b5b03.zip | |
allow config of main url to accept user/password
Diffstat (limited to 'src/fextdata.php')
| -rw-r--r-- | src/fextdata.php | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/fextdata.php b/src/fextdata.php index 37e0c9f..d0a272b 100644 --- a/src/fextdata.php +++ b/src/fextdata.php @@ -15,7 +15,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. //////////////////////////////////////////////////////////////////////////////// -// Last modified 02/sep/2013 by cassio@ime.usp.br +// Last modified 28/oct/2013 by cassio@ime.usp.br function scoretransfer($putname, $localsite) { $ds = DIRECTORY_SEPARATOR; @@ -24,6 +24,17 @@ function scoretransfer($putname, $localsite) { if(!is_readable($privatedir . $ds . 'remotescores' . $ds . "otherservers")) return; $localfile = "score_site" . $localsite . "_" . $localsite . "_x.dat"; $remotesite = @file($privatedir . $ds . 'remotescores' . $ds . "otherservers"); + + $contest=$_SESSION["usertable"]["contestnumber"]; + if($contest != '' && ($ct = DBContestInfo($contest)) != null) { + if(trim($ct['contestmainsiteurl']) != '') { + $tmp = explode(' ',$ct['contestmainsiteurl']); + if(count($tmp) == 3) { + $remotesite[count($remotesite)] = $ct['contestmainsiteurl']; + } + } + } + for($i = 0; $i < count($remotesite); $i++) { $sitedata = explode(' ', $remotesite[$i]); if(count($sitedata) < 3) continue; |