diff options
author | pzread <netfirewall@gmail.com> | 2013-04-09 09:37:29 +0800 |
---|---|---|
committer | pzread <netfirewall@gmail.com> | 2013-04-09 09:44:11 +0800 |
commit | 31e170379d567a71f1792e0bad9aea6ca3c6478a (patch) | |
tree | 73cac5d618f466db3b5be6982824cc0e1b421f90 /toj/php/square.php | |
parent | 3c6abbe11d9f2d173020add74217af2d450a1d16 (diff) | |
download | taiwan-online-judge-31e170379d567a71f1792e0bad9aea6ca3c6478a.tar taiwan-online-judge-31e170379d567a71f1792e0bad9aea6ca3c6478a.tar.gz taiwan-online-judge-31e170379d567a71f1792e0bad9aea6ca3c6478a.tar.bz2 taiwan-online-judge-31e170379d567a71f1792e0bad9aea6ca3c6478a.tar.lz taiwan-online-judge-31e170379d567a71f1792e0bad9aea6ca3c6478a.tar.xz taiwan-online-judge-31e170379d567a71f1792e0bad9aea6ca3c6478a.tar.zst taiwan-online-judge-31e170379d567a71f1792e0bad9aea6ca3c6478a.zip |
Fix segment fault(use deleted memory). Add square-problem manage. Check setting file exist
Diffstat (limited to 'toj/php/square.php')
-rwxr-xr-x | toj/php/square.php | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/toj/php/square.php b/toj/php/square.php index ca57994..c95c584 100755 --- a/toj/php/square.php +++ b/toj/php/square.php @@ -284,6 +284,20 @@ if($action == 'get_entered_sq') echo(json_encode($ret)); } +if($action == 'get_sq_pro_list') +{ + if(!sec_is_login()) + die('Enot_login'); + if(!sec_check_level($sqlc, USER_LEVEL_SUPERADMIN)) + die('Epermission_denied'); + + $dt = json_decode($data); + if(!square::get($sqlc, $dt->sqid)) + die('Ewrong_sqid'); + + $ret = square::get_pro_list($sqlc, $dt->sqid); + echo(json_encode($ret)); +} if($action == 'add_pro_into_sq') { if(!sec_is_login()) |