From 31e170379d567a71f1792e0bad9aea6ca3c6478a Mon Sep 17 00:00:00 2001 From: pzread Date: Tue, 9 Apr 2013 09:37:29 +0800 Subject: Fix segment fault(use deleted memory). Add square-problem manage. Check setting file exist --- toj/php/square.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'toj/php/square.php') 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()) -- cgit v1.2.3