Commit 23eca6d8 authored by Nico Schallehn's avatar Nico Schallehn

neuer TODO

parent d428fe4f
...@@ -35,13 +35,13 @@ function ChatNachricht($text, $admin, $userchange ){ ...@@ -35,13 +35,13 @@ function ChatNachricht($text, $admin, $userchange ){
//mysql_query("UPDATE user SET chat = '".mysql_insert_id()."' WHERE id = '{$_SESSION['chatuserid']}'"); //mysql_query("UPDATE user SET chat = '".mysql_insert_id()."' WHERE id = '{$_SESSION['chatuserid']}'");
if (preg_match("/James/i",$text)) if (preg_match("/James/i",$text))
{ {
$time = time(); $time = time()+1;
if (preg_match("/wie/i",$text) AND preg_match("/geht/i",$text)) mysql_query("INSERT INTO chat (user_id, nachricht, admin, chat_time) VALUES ('1', 'Mir geht es gut und dir ".IDtoUsername($_SESSION['chatuserid'])."?', '$admin', '$time')"); if (preg_match("/wie/i",$text) AND preg_match("/geht/i",$text)) mysql_query("INSERT INTO chat (user_id, nachricht, admin, chat_time) VALUES ('1', 'Mir geht es gut und dir ".IDtoUsername($_SESSION['chatuserid'])."?', '$admin', '$time')");
else if(preg_match("/danke/i",$text)) mysql_query("INSERT INTO chat (user_id, nachricht, admin, chat_time) VALUES ('1', 'Bitte ".IDtoUsername($_SESSION['chatuserid'])."!', '$admin', '$time')"); else if(preg_match("/danke/i",$text)) mysql_query("INSERT INTO chat (user_id, nachricht, admin, chat_time) VALUES ('1', 'Bitte ".IDtoUsername($_SESSION['chatuserid'])."!', '$admin', '$time')");
else if(preg_match("/Bye/i",$text) OR preg_match("/cucu/i",$text) OR preg_match("/ciao/i",$text)) mysql_query("INSERT INTO chat (user_id, nachricht, admin, chat_time) VALUES ('1', 'Bis Bald ".IDtoUsername($_SESSION['chatuserid'])."!', '$admin', '$time')"); else if(preg_match("/Bye/i",$text) OR preg_match("/cucu/i",$text) OR preg_match("/ciao/i",$text)) mysql_query("INSERT INTO chat (user_id, nachricht, admin, chat_time) VALUES ('1', 'Bis Bald ".IDtoUsername($_SESSION['chatuserid'])."!', '$admin', '$time')");
else if(preg_match("/wie/i",$text) AND preg_match("/spät/i",$text) OR preg_match("/zeit/i",$text) OR preg_match("/uhr/i",$text)) mysql_query("INSERT INTO chat (user_id, nachricht, admin, chat_time) VALUES ('1', 'Nach meiner Uhr ist es gerade ".date("H:i")." und ".date("s")." Sekunden!', '$admin', '$time')"); else if(preg_match("/wie/i",$text) AND preg_match("/spät/i",$text) OR preg_match("/zeit/i",$text) OR preg_match("/uhr/i",$text)) mysql_query("INSERT INTO chat (user_id, nachricht, admin, chat_time) VALUES ('1', 'Nach meiner Uhr ist es gerade ".date("H:i")." und ".date("s")." Sekunden!', '$admin', '$time')");
else if(preg_match("/Moin/i",$text) OR preg_match("/Hi/i",$text) OR preg_match("/Hallo/i",$text) OR preg_match("/morgen/i",$text)) mysql_query("INSERT INTO chat (user_id, nachricht, admin, chat_time) VALUES ('1', 'Hallo ".IDtoUsername($_SESSION['chatuserid'])."', '$admin', '$time')"); else if(preg_match("/Moin/i",$text) OR preg_match("/Hi/i",$text) OR preg_match("/Hallo/i",$text) OR preg_match("/morgen/i",$text)) mysql_query("INSERT INTO chat (user_id, nachricht, admin, chat_time) VALUES ('1', 'Hallo ".IDtoUsername($_SESSION['chatuserid'])."', '$admin', '$time')");
else if(preg_match("/Aufgaben/i",$text) OR preg_match("/TODO/i",$text)) mysql_query("INSERT INTO chat (user_id, nachricht, admin, chat_time) VALUES ('1', 'Folgende Sachen habe ich mir notiert: <ul><li>Autoscrolling abschaltbar</li><li>Adminmenü überarbeiten (angefangen)</li><li>Passwörter verschlüsselt speichern</li> <li>Private nachrichten bug beheben</li><li>nach timeout Weiterleitung auf Startseite</li><li>Mich selbst überarbeiten</li><li>übersicht über Chatbefehle einbauen</li></ul>', '$admin', '$time')"); else if(preg_match("/Aufgaben/i",$text) OR preg_match("/TODO/i",$text)) mysql_query("INSERT INTO chat (user_id, nachricht, admin, chat_time) VALUES ('1', 'Folgende Sachen habe ich mir notiert: <ul><li>Autoscrolling abschaltbar</li><li>Adminmenü überarbeiten (angefangen)</li><li>Passwörter verschlüsselt speichern</li> <li>Private nachrichten bug beheben</li><li>nach timeout Weiterleitung auf Startseite</li><li>Mich selbst überarbeiten</li><li>übersicht über Chatbefehle einbauen (zum Beispiel ein Befehel zum Anzeigen aller Komandos)</li></ul>', '$admin', '$time')");
else mysql_query("INSERT INTO chat (user_id, nachricht, admin, chat_time) VALUES ('1', 'Zu Befehl!', '$admin', '$time')"); else mysql_query("INSERT INTO chat (user_id, nachricht, admin, chat_time) VALUES ('1', 'Zu Befehl!', '$admin', '$time')");
} }
return $text; return $text;
......
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