Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
PHP-Chat
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
BA_SST
PHP-Chat
Commits
d53773fe
Commit
d53773fe
authored
Jul 15, 2016
by
Nico Schallehn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cronjob für Userlogout hinzugefügt
parent
dba1a597
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
0 deletions
+25
-0
cron.php
cron.php
+25
-0
No files found.
cron.php
0 → 100644
View file @
d53773fe
<?php
include
(
"config.php"
);
$result
=
mysql_query
(
"SELECT id, name FROM user WHERE refresh_time < '"
.
(
time
()
-
60
)
.
"' AND online = '1'"
);
$text
=
offtimeout
();
$counter
=
0
;
while
(
$user
=
mysql_fetch_array
(
$result
)){
$counter
++
;}
echo
"
--------------------------------------
"
.
date
(
"H:i:s d.m.Y"
,
time
())
.
"
--------------------------------------
Alle Timeout User ausgeloggt!
--------------------------------------
"
.
$text
.
"
--------------------------------------
Es wurden "
.
$counter
.
" ausgeloggt!
--------------------------------------
Es sind schon "
.
$Useranzahl
.
" an Bord!
Es sind "
.
$Useronline
.
" Online!
--------------------------------------
\r\n
"
;
$inhalt
=
date
(
"H:i:s d.m.Y"
,
time
())
.
" - Useranzahl:"
.
$Useranzahl
.
" - Useronline:"
.
$Useronline
.
" - Userlogout:"
.
$counter
.
"
\r\n
"
;
echo
$inhalt
;
$text
=
file_get_contents
(
"log.txt"
);
$handle
=
fopen
(
"log.txt"
,
"r+"
);
fwrite
(
$handle
,
$inhalt
.
$text
);
fclose
(
$handle
);
?>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment