diff options
| author | cassio <cassiopc@gmail.com> | 2015-09-09 13:22:56 +0000 |
|---|---|---|
| committer | cassio <cassiopc@gmail.com> | 2015-09-09 13:22:56 +0000 |
| commit | 0275d9a10cafd301239dc09d1400973a5e44ed98 (patch) | |
| tree | afdb635d0c9127e5bb973331fd9a6affc805f492 /src/globals.php | |
| parent | 64143437a294aa4e0e94d60e79ba3ac677c40e5b (diff) | |
| download | boca-0275d9a10cafd301239dc09d1400973a5e44ed98.tar.gz boca-0275d9a10cafd301239dc09d1400973a5e44ed98.zip | |
minor fixes
Diffstat (limited to 'src/globals.php')
| -rwxr-xr-x | src/globals.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/globals.php b/src/globals.php index 0f034ce..5ece1e8 100755 --- a/src/globals.php +++ b/src/globals.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 15/aug/2014 by cassio@ime.usp.br +// Last modified 07/sep/2015 by cassio@ime.usp.br require_once('db.php'); define("dbcompat_1_4_1",true); @@ -205,13 +205,13 @@ function IntrusionNotify($where) { // verifica se a sessao esta aberta e ok function ValidSession() { if (!isset($_SESSION["usertable"])) return(FALSE); + if ($_SESSION["usertable"]["usersession"] == session_id() || $_SESSION["usertable"]["usersessionextra"] == session_id()) return(TRUE); + if(($_SESSION["usertable"]["userip"] == getIP() && $_SESSION["usertable"]["usermultilogin"] == 't') || + $_SESSION["usertable"]["usertype"] == 'score') return(TRUE); $_SESSION["usertable"] = DBUserInfo($_SESSION["usertable"]["contestnumber"], $_SESSION["usertable"]["usersitenumber"], $_SESSION["usertable"]["usernumber"]); - if ($_SESSION["usertable"]["usersession"] != session_id() && - ($_SESSION["usertable"]["usermultilogin"] != 't' || - $_SESSION["usertable"]["usertype"] != 'score')) - return(FALSE); + if ($_SESSION["usertable"]["usersession"] != session_id() && $_SESSION["usertable"]["usersessionextra"] != session_id()) return(FALSE); return(TRUE); } // grava erro no arquivo de log |