Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
2 | daniel-mar | 1 | <?php |
2 | |||
3 | include 'col.inc.php'; |
||
4 | |||
5 | if(!isset($_POST['nickname'])){ |
||
6 | echo"<style type=\"text/css\">BODY{font-family:Verdana, Arial, Helvetica, sans-serif}</style> |
||
7 | |||
8 | <h1>MOV Login</h1> |
||
9 | <form method=\"post\" action=\"index.php\"> |
||
10 | <p>Please enter your name code:</p> |
||
11 | <input name=\"nickname\" type=\"text\" id=\"nickname\"> |
||
12 | <input type=\"submit\" value=\" Login \"> |
||
13 | </form> |
||
14 | |||
15 | <p><a href=\"messages.php?show=all\" target=\"_blank\">Show only message log</a></p> |
||
16 | |||
17 | </body> |
||
18 | </html>"; |
||
19 | } |
||
20 | else{ |
||
21 | setcookie("mov_nick",$_POST['nickname'],0/*,0,"/",""*/); |
||
22 | $fileOpen=@fopen("messages.txt", "a"); |
||
23 | @fwrite($fileOpen,date("d.m.Y H:i:s")." <font color=\"".str_to_color($_POST['nickname'])."\"><b>".$_POST['nickname']."</b> <i>betritt den Raum</i></font><br>\n"); |
||
24 | fclose($fileOpen); |
||
25 | header("Location:chat.php"); |
||
26 | } |
||
27 | ?> |