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
90bfc235
Commit
90bfc235
authored
Jul 15, 2016
by
Nico Schallehn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Funktion für Cronjob hinzugefügt
parent
d53773fe
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
config.php
config.php
+13
-0
No files found.
config.php
View file @
90bfc235
...
@@ -109,4 +109,17 @@ function AdminLogAdd($nachricht, $ID, $userchange)
...
@@ -109,4 +109,17 @@ function AdminLogAdd($nachricht, $ID, $userchange)
{
{
mysql_query
(
"INSERT INTO chat (`nachricht` ,`user_id` ,`userchange` ,`hideuser` ,`admin` ,`chat_time` ,`hidden` ,`privat`) VALUES ('
$nachricht
', '
$ID
', '
$userchange
', '1', '0', '"
.
time
()
.
"', '1', '0')"
);
mysql_query
(
"INSERT INTO chat (`nachricht` ,`user_id` ,`userchange` ,`hideuser` ,`admin` ,`chat_time` ,`hidden` ,`privat`) VALUES ('
$nachricht
', '
$ID
', '
$userchange
', '1', '0', '"
.
time
()
.
"', '1', '0')"
);
}
}
function
offtimeout
()
{
$result
=
mysql_query
(
"SELECT id, name FROM user WHERE refresh_time < '"
.
(
time
()
-
60
)
.
"' AND online = '1'"
);
$counter
=
0
;
while
(
$user
=
mysql_fetch_array
(
$result
))
{
mysql_query
(
"INSERT INTO chat (nachricht, user_id, hideuser, userchange, chat_time) VALUES ('<b>
{
$user
[
'name'
]
}
</b> verlässt den Chat durch <b>TimeOut</b>', '
{
$user
[
'id'
]
}
', '1', '1', '"
.
time
()
.
"')"
);
$text
.=
$user
[
'name'
]
.
" wurde Ausgelogt!
\r\n
"
;
$counter
++
;
}
mysql_query
(
"UPDATE user SET online = '0' WHERE refresh_time < '"
.
(
time
()
-
60
)
.
"' AND online = '1'"
);
return
$text
;
}
?>
?>
\ 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