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
ae46e6f0
Commit
ae46e6f0
authored
Jul 18, 2016
by
Nico Schallehn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Neue Datei für entgegennahme der POST Daten
parent
a8569892
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
0 deletions
+40
-0
send.php
send.php
+40
-0
No files found.
send.php
0 → 100644
View file @
ae46e6f0
<?php
$result
=
mysql_query
(
"SELECT * FROM user WHERE id = '
{
$_SESSION
[
'chatuserid'
]
}
'"
);
$users
=
mysql_fetch_array
(
$result
);
var_dump
(
$_POST
);
if
(
!
isset
(
$_SESSION
[
'chatuserid'
])
OR
$users
[
'online'
]
==
0
)
echo
"Erst einloggen..."
;
else
{
if
(
isset
(
$_POST
[
'chatok'
]))
{
if
(
$_POST
[
'text'
]
!=
""
)
{
if
(
substr
(
trim
(
$_POST
[
'text'
]),
0
,
3
)
==
"/p "
)
$privat
=
$_SESSION
[
'chatuserid'
];
else
$privat
=
""
;
if
(
substr
(
trim
(
$_POST
[
'text'
]),
0
,
3
)
==
"/p "
)
{
$end
=
strpos
(
$_POST
[
'text'
],
":"
);
$id
=
UsernametoID
(
substr
(
$_POST
[
'text'
],
3
,
$end
-
3
));
}
else
$id
=
0
;
$nachricht
=
nachrichtausgabe
(
0
,
0
,
$id
,
$users
[
'name'
],
time
(),
ChatNachricht
(
$_POST
[
'text'
],
0
,
0
),
"0"
);
echo
"<script>parent.chat.add('
$nachricht
');</script>"
;
}
}
if
(
isset
(
$_POST
[
'modok'
])
AND
$users
[
'admin'
]
>=
1
)
{
if
(
$_POST
[
'text'
]
!=
""
)
{
$nachricht
=
nachrichtausgabe
(
0
,
1
,
0
,
$users
[
'name'
],
time
(),
ChatNachricht
(
$_POST
[
'text'
],
1
,
0
),
""
);
echo
"<script>parent.chat.add('
$nachricht
');</script>"
;
}
}
if
(
isset
(
$_POST
[
'adminok'
])
AND
$users
[
'admin'
]
>=
2
)
{
if
(
$_POST
[
'text'
]
!=
""
)
{
$nachricht
=
nachrichtausgabe
(
0
,
2
,
0
,
$users
[
'name'
],
time
(),
ChatNachricht
(
$_POST
[
'text'
],
2
,
0
),
""
);
echo
"<script>parent.chat.add('
$nachricht
');</script>"
;
}
}
if
(
isset
(
$_POST
[
'specialok'
])
AND
$users
[
'admin'
]
>=
3
)
{
if
(
$_POST
[
'text'
]
!=
""
)
{
$nachricht
=
nachrichtausgabe
(
0
,
3
,
0
,
$users
[
'name'
],
time
(),
ChatNachricht
(
$_POST
[
'text'
],
3
,
0
),
""
);
echo
"<script>parent.chat.add('
$nachricht
');</script>"
;
}
}
}
?>
\ 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