aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/fcontest.php2
-rw-r--r--src/fextdata.php7
2 files changed, 5 insertions, 4 deletions
diff --git a/src/fcontest.php b/src/fcontest.php
index f441c33..5c14277 100644
--- a/src/fcontest.php
+++ b/src/fcontest.php
@@ -1309,7 +1309,7 @@ function DBNewUser($param, $c=null) {
MSGError("DBNewUser param error: site $site does not exist");
return false;
}
- if($pass != myhash("") && $type != "admin" && $changepass != "t") $pass='!'.$pass;
+ if($pass != myhash("") && $type != "admin" && $changepass != "t" && substr($pass,0,1) != "!") $pass='!'.$pass;
$r = DBExec($c, "select * from usertable where username='$username' and usernumber!=$user and ".
"usersitenumber=$site and contestnumber=$contest", "DBNewUser(get user)");
$n = DBnlines ($r);
diff --git a/src/fextdata.php b/src/fextdata.php
index 25ef1f0..2b2d007 100644
--- a/src/fextdata.php
+++ b/src/fextdata.php
@@ -702,10 +702,11 @@ function genSQLs($contest, $site, $updatetime, $mainsite=1) {
//"problemcolor, " .
"updatetime" .
" from problemtable where contestnumber=$contest and fake='f' and updatetime >= $updatetime";
- }
+ $sql['usertable']="select * from usertable where contestnumber=$contest and usersitenumber!=$site and updatetime >= $updatetime";
+ } else
+ $sql['usertable']="select * from usertable where contestnumber=$contest and usersitenumber=$site and updatetime >= $updatetime";
$sql['sitetimetable']="select * from sitetimetable where contestnumber=$contest and sitenumber=$site and updatetime >= $updatetime";
- $sql['usertable']="select * from usertable where contestnumber=$contest and (usersitenumber=$site or usersitenumber=$mainsite) and updatetime >= $updatetime";
- $sql['clartable']="select * from clartable where contestnumber=$contest and clarsitenumber=$site and updatetime >= $updatetime";
+ $sql['clartable']="select * from clartable where contestnumber=$contest and updatetime >= $updatetime";
$sql['runtable']="select * from runtable where contestnumber=$contest and runsitenumber=$site and updatetime >= $updatetime";
$sql['tasktable']="select * from tasktable where contestnumber=$contest and sitenumber=$site and updatetime >= $updatetime";
return $sql;