Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
gameauth
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sucssite
gameauth
Commits
7e672023
Commit
7e672023
authored
9 years ago
by
Stuart John Watson
Browse files
Options
Downloads
Patches
Plain Diff
Commiting to get help with an error on line 90 of controll
parent
c4bdc85b
No related branches found
Branches containing commit
No related tags found
1 merge request
!1
Major Rebuild: AJAX and working game info
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
controll.php
+4
-4
4 additions, 4 deletions
controll.php
gameauth.db
+0
-0
0 additions, 0 deletions
gameauth.db
with
4 additions
and
4 deletions
controll.php
+
4
−
4
View file @
7e672023
...
...
@@ -86,8 +86,8 @@ if ($renew){
//Check if they are still in the database
if
(
in_array
(
$sessionid
,
$sessions
)){
//If they are update the ip & time
$
oldLevel
=
$db
->
query
(
"SELECT level FROM gamers WHERE sessionid='
$sessionid
'"
);
$
authd
=
$query
->
fetchArray
()[
0
];
$
query
=
$db
->
query
(
"SELECT level FROM gamers WHERE sessionid='
$sessionid
'"
);
$
oldLevel
=
$query
->
fetchArray
()[
0
];
$query
=
$db
->
query
(
"SELECT username FROM gamers WHERE sessionid='
$sessionid
'"
);
$authdUser
=
$query
->
fetchArray
()[
0
];
...
...
@@ -95,7 +95,7 @@ if ($renew){
$db
->
exec
(
"DELETE FROM gamers WHERE username='
$authdUser
'"
);
$time
=
time
();
$db
->
exec
(
"INSERT INTO gamers (username,sessionid,IP,level,lastseen) VALUES ('
$authdUser
','
$sessionid
','
$cip
','
$oldLevel
','
$time
')"
);
$accessLevel
=
"AS_BEFORE"
$accessLevel
=
"AS_BEFORE"
;
}
else
{
//Otherwise return a timeout error
$accessLevel
=
"NO_LOGIN"
;
...
...
@@ -170,7 +170,7 @@ if ($_POST["username"] == "logout"){
//If the user is logged in succesfully iterate get the online uses (into a 1d array)
$onlineUsers
;
if
(
$accessLevel
==
"GAME_ACCESS"
){
if
(
$accessLevel
==
"GAME_ACCESS"
||
(
$accessLevel
==
"AS_BEFORE"
&&
$oldLevel
==
"GAME_ACCESS"
)
){
$onlineUsers
=
[];
$loggedInUsers
=
$db
->
query
(
"SELECT username FROM gamers"
);
while
(
$res
=
$loggedInUsers
->
fetchArray
(
SQLITE3_ASSOC
)){
...
...
This diff is collapsed.
Click to expand it.
gameauth.db
+
0
−
0
View file @
7e672023
No preview for this file type
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment