Commit ae46e6f0 authored by Nico Schallehn's avatar Nico Schallehn

Neue Datei für entgegennahme der POST Daten

parent a8569892
<?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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment