aboutsummaryrefslogtreecommitdiffstats
path: root/toj/php/square.inc.php
diff options
context:
space:
mode:
authorpzread <netfirewall@gmail.com>2013-04-21 15:33:11 +0800
committerpzread <netfirewall@gmail.com>2013-04-21 15:33:11 +0800
commitd8ba93f32ca6bf5f412a07756b6443595c7bfda8 (patch)
tree113591dd33a88331eab038b76e05fee4cca804c7 /toj/php/square.inc.php
parent567ecd63584b5fac473e23502f0747aa1f7e97d8 (diff)
downloadtaiwan-online-judge-d8ba93f32ca6bf5f412a07756b6443595c7bfda8.tar
taiwan-online-judge-d8ba93f32ca6bf5f412a07756b6443595c7bfda8.tar.gz
taiwan-online-judge-d8ba93f32ca6bf5f412a07756b6443595c7bfda8.tar.bz2
taiwan-online-judge-d8ba93f32ca6bf5f412a07756b6443595c7bfda8.tar.lz
taiwan-online-judge-d8ba93f32ca6bf5f412a07756b6443595c7bfda8.tar.xz
taiwan-online-judge-d8ba93f32ca6bf5f412a07756b6443595c7bfda8.tar.zst
taiwan-online-judge-d8ba93f32ca6bf5f412a07756b6443595c7bfda8.zip
Use php.ini define include path. Add base personal statistic. Fix some bugs. Improve square event. Add contest sqmod
Diffstat (limited to 'toj/php/square.inc.php')
-rwxr-xr-xtoj/php/square.inc.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/toj/php/square.inc.php b/toj/php/square.inc.php
index 4a4b52f..99f0d2e 100755
--- a/toj/php/square.inc.php
+++ b/toj/php/square.inc.php
@@ -226,6 +226,20 @@ class square
}
return $ret;
}
+ public static function get_user_list($sqlc, $sqid)
+ {
+ //get problem list of square $sqid.
+ $sqlstr = 'SELECT "user"."uid", "user"."nickname" FROM "user" INNER JOIN "us_sq" ON "user"."uid"="us_sq"."uid" WHERE "us_sq"."sqid"=$1 ORDER BY "user"."uid";';
+ $sqlarr = array($sqid);
+ $sqlr = pg_query_params($sqlc, $sqlstr, $sqlarr);
+ $ret = array();
+ while($obj = pg_fetch_object($sqlr))
+ {
+ $obj->uid = intval($obj->uid);
+ array_push($ret, $obj);
+ }
+ return $ret;
+ }
}
?>