2 error_reporting(E_ALL);
7 include_once("config.php");
8 include_once("output.php"); /* html output only */
9 include_once("db.php"); /* database only */
10 include_once("functions.php"); /* the rest */
15 echo "Working on the database...please check back in a few mintues";
23 /* check if we want to start a new game */
26 $names = DB_get_all_names();
27 output_form_for_new_game($names);
29 /*check if everything is ready to set up a new game */
30 else if( myisset("PlayerA", "PlayerB","PlayerC","PlayerD" ))
32 $PlayerA = $_REQUEST["PlayerA"];
33 $PlayerB = $_REQUEST["PlayerB"];
34 $PlayerC = $_REQUEST["PlayerC"];
35 $PlayerD = $_REQUEST["PlayerD"];
37 $EmailA = DB_get_email_by_name($PlayerA);
38 $EmailB = DB_get_email_by_name($PlayerB);
39 $EmailC = DB_get_email_by_name($PlayerC);
40 $EmailD = DB_get_email_by_name($PlayerD);
42 if($EmailA=="" || $EmailB=="" || $EmailC=="" || $EmailD=="")
44 echo "couldn't find one of the names, please start a new game";
48 $useridA = DB_get_userid_by_name($PlayerA);
49 $useridB = DB_get_userid_by_name($PlayerB);
50 $useridC = DB_get_userid_by_name($PlayerC);
51 $useridD = DB_get_userid_by_name($PlayerD);
53 /* create random numbers */
54 $randomNR = create_array_of_random_numbers();
55 $randomNRstring = join(":",$randomNR);
59 if(myisset("followup") )
61 $followup= $_REQUEST["followup"];
62 mysql_query("INSERT INTO Game VALUES (NULL, NULL, '$randomNRstring', 'normal', NULL,'1','pre','$followup' ,NULL)");
65 mysql_query("INSERT INTO Game VALUES (NULL, NULL, '$randomNRstring', 'normal', NULL,'1','pre', NULL ,NULL)");
66 $game_id = mysql_insert_id();
69 $hashA = md5("AGameOfDoko".$game_id.$PlayerA.$EmailA);
70 $hashB = md5("AGameOfDoko".$game_id.$PlayerB.$EmailB);
71 $hashC = md5("AGameOfDoko".$game_id.$PlayerC.$EmailC);
72 $hashD = md5("AGameOfDoko".$game_id.$PlayerD.$EmailD);
75 mysql_query("INSERT INTO Hand VALUES (NULL,".DB_quote_smart($game_id).",".DB_quote_smart($useridA).
76 ", ".DB_quote_smart($hashA).", 'start','1',NULL,NULL,NULL,'false','false',NULL)");
77 $hand_idA = mysql_insert_id();
78 mysql_query("INSERT INTO Hand VALUES (NULL,".DB_quote_smart($game_id).",".DB_quote_smart($useridB).
79 ", ".DB_quote_smart($hashB).", 'start','2',NULL,NULL,NULL,'false','false',NULL)");
80 $hand_idB = mysql_insert_id();
81 mysql_query("INSERT INTO Hand VALUES (NULL,".DB_quote_smart($game_id).",".DB_quote_smart($useridC).
82 ", ".DB_quote_smart($hashC).", 'start','3',NULL,NULL,NULL,'false','false',NULL)");
83 $hand_idC = mysql_insert_id();
84 mysql_query("INSERT INTO Hand VALUES (NULL,".DB_quote_smart($game_id).",".DB_quote_smart($useridD).
85 ", ".DB_quote_smart($hashD).", 'start','4',NULL,NULL,NULL,'false','false',NULL)");
86 $hand_idD = mysql_insert_id();
90 mysql_query("INSERT INTO Hand_Card VALUES (NULL, '$hand_idA', '".$randomNR[$i]."', 'false')");
92 mysql_query("INSERT INTO Hand_Card VALUES (NULL, '$hand_idB', '".$randomNR[$i]."', 'false')");
94 mysql_query("INSERT INTO Hand_Card VALUES (NULL, '$hand_idC', '".$randomNR[$i]."', 'false')");
96 mysql_query("INSERT INTO Hand_Card VALUES (NULL, '$hand_idD', '".$randomNR[$i]."', 'false')");
98 /* send out email, TODO: check for error with email */
100 "you are invited to play a game of DoKo (that is to debug the program ;).\n".
101 "Place comments and bug reports here:\n".
102 "http://wiki.nubati.net/index.php?title=EmailDoko\n\n".
103 "The whole round would consist of the following players:\n".
108 "If you want to join this game, please follow this link:\n\n".
111 mymail($EmailA,"You are invited to a game of DoKo","Hello $PlayerA,\n".$message.$hashA);
112 mymail($EmailB,"You are invited to a game of DoKo","Hello $PlayerB,\n".$message.$hashB);
113 mymail($EmailC,"You are invited to a game of DoKo","Hello $PlayerC,\n".$message.$hashC);
114 mymail($EmailD,"You are invited to a game of DoKo","Hello $PlayerD,\n".$message.$hashD);
117 echo "You started a new game. The emails have been sent out!";
119 /* end set up a new game */
121 else if(myisset("me"))
123 /* handle request from one specific player,
124 * the hash is set on a per game base
127 $me = $_REQUEST["me"];
129 /* test for valid ID */
130 $myid = DB_get_userid_by_hash($me);
133 echo "Can't find you in the database, please check the url.<br />\n";
134 echo "perhaps the game has been cancled, check by login in <a href=\"$host\">here</a>.";
138 DB_update_user_timestamp($myid);
140 /* get some information from the DB */
141 $gameid = DB_get_gameid_by_hash($me);
142 $myname = DB_get_name_by_hash($me);
143 $mystatus = DB_get_status_by_hash($me);
144 $mypos = DB_get_pos_by_hash($me);
146 echo "<p class=\"gamenumber\"> Game $gameid </p>\n";
150 if(myisset("cancle"))
151 echo "<p style=\"background-color:red\";>canceling a game is not implemented at the moment, but will be soon...<br /><br /></p>";
156 check_want_to_play($me);
157 DB_set_hand_status_by_hash($me,'init');
160 if( !myisset("in","update") )
162 DB_set_hand_status_by_hash($me,'start');
163 echo "you need to answer both question";
167 if($_REQUEST["in"] == "no")
169 $message = "Hello, \n\n".
170 "the game has been canceled due to the request of one of the players.\n";
172 $userids = DB_get_all_userid_by_gameid($gameid);
173 foreach($userids as $user)
175 $To = DB_get_email_by_userid($user);
176 mymail($To,"[DoKo] game cancled",$message);
179 /* delete everything from the dB */
184 echo "thanks for joining the game... please scroll down";
185 echo "TODO: make this page nicer<br />";
186 echo "TODO: set card pref<br />";
188 $mycards = DB_get_hand($me);
190 echo "<p class=\"mycards\">your cards are: <br />\n";
191 foreach($mycards as $card)
195 check_for_sickness($me,$mycards);
197 DB_set_hand_status_by_hash($me,'check');
203 echo "checking if you selected solo or nines...<br />".
204 " if you have a wedding, please send an email to the other players. <br />".
205 " if you have poverty you need to play a normal game,sorry...<br />".
206 " Please click <a href=\"$host?me=$me\">here</a> to finish the setup.<br />";
207 if(!myisset("solo","wedding","poverty","nines") )
209 /* all these variables have a pre-selected default,
210 * so we should never get here,
211 * unless a user tries to cheat ;) */
212 echo "something went wrong...please contact the admin.";
216 /* check if this sickness needs to be handled first */
217 $gametype = DB_get_gametype_by_gameid($gameid);
218 $startplayer = DB_get_startplayer_by_gameid($gameid);
220 if( $_REQUEST["solo"]!="No")
222 DB_set_solo_by_hash($me,$_REQUEST["solo"]);
223 DB_set_sickness_by_hash($me,"solo");
224 echo "<br />Seems like you want to play a ".$_REQUEST["solo"]." solo. Got it.<br />\n";
226 if($gametype == "solo" && $startplayer<$mypos)
230 /* this solo comes first */
231 DB_set_gametype_by_gameid($gameid,"solo");
232 DB_set_startplayer_by_gameid($gameid,$mypos);
233 DB_set_solo_by_gameid($gameid,$_REQUEST["solo"]);
236 else if($_REQUEST["wedding"] == "yes")
238 /* TODO: add silent solo somewhere*/
239 echo "wedding was chosen<br />\n";
240 DB_set_sickness_by_hash($me,"wedding");
242 else if($_REQUEST["poverty"] == "yes")
244 echo "poverty was chosen<br />\n";
245 DB_set_sickness_by_hash($me,"poverty");
247 else if($_REQUEST["nines"] == "yes")
249 echo "nines was chosen<br />\n";
250 DB_set_sickness_by_hash($me,"nines");
254 DB_set_hand_status_by_hash($me,'poverty');
256 /* check all players and set game to final result, e.g. solo, wedding, povert, redeal */
260 /* here we need to check if there is a solo or some other form of sickness.
261 * If so, which one counts
262 * set that one in the Game table, delete other ones form Hand table
263 * tell people about it.
265 echo "<br />checking if someone else selected solo or nines... wedding and poverty not handled at the moment<br />".
266 " Please click <a href=\"$host?me=$me\">here</a> to finish the setup.<br />";
268 /* only set this after all poverty, etc. are handeled*/
269 DB_set_hand_status_by_hash($me,'play');
271 /* check if the game can start */
272 $userids = DB_get_all_userid_by_gameid($gameid);
274 foreach($userids as $user)
275 if(DB_get_hand_status_by_userid_and_gameid($user,$gameid)!='play')
280 DB_set_game_status_by_gameid($gameid,'play');
282 /* check what kind of game we are playing */
283 $gametype = DB_get_gametype_by_gameid($gameid);
284 $startplayer = DB_get_startplayer_by_gameid($gameid);
288 /* check for nines */
289 foreach($userids as $user)
291 if(DB_get_sickness_by_userid_and_gameid($user,$gameid) == 'nines')
295 /* gamestatus == normal, => cancel game */
296 if($nines && $gamestatus == "normal")
298 /* TODO: set game type to nines to be able to keep statistics */
300 $message = "Hello, \n\n".
301 "the game has been cancled becausee someone has five or more nines.\n";
303 $userids = DB_get_all_userid_by_gameid($gameid);
304 foreach($userids as $user)
306 $To = DB_get_email_by_userid($user);
307 mymail($To,"[DoKo] game cancled",$message);
310 /* delete everything from the dB */
318 /* check players for poverty */
319 foreach($userids as $user)
321 if(DB_get_sickness_by_userid_and_gameid($user,$gameid) == 'poverty')
324 $name = DB_get_name_by_userid($user);
325 echo "$name has a Vorbehalt. <br />";
328 /* if gamestatus == normal, set poverty or dpovert (in case two people have poverty) */
332 /* check players for wedding */
333 foreach($userids as $user)
335 if(DB_get_sickness_by_userid_and_gameid($user,$gameid) == 'wedding')
338 $name = DB_get_name_by_userid($user);
339 echo "$name has a Vorbehalt. <br />" ;
343 /* if gamestatus == normal, set wedding */
350 /* both entries here, so that the tricks are visible for both.
351 * in case of 'play' there is a break later that skips the last part
354 /* figure out what kind of game we are playing,
355 * set the global variables $TRUMP,$DIAMONDS,$HEARTS,$CLUBS,$SPADES
359 $gametype = DB_get_gametype_by_gameid($gameid);
361 if($gametype=="solo")
363 $gametype = DB_get_solo_by_gameid($gameid);
364 $GT = $gametype." ".$GT;
369 set_gametype($gametype);
371 /* get some infos about the game */
372 $gamestatus = DB_get_game_status_by_gameid($gameid);
374 /* display useful things in divs */
376 /* display local time */
377 echo "<div class=\"time\">\n Local times:<table>";
379 $users = DB_get_all_userid_by_gameid($gameid);
380 foreach($users as $user)
382 $offset = DB_get_user_timezone($user);
383 $zone = return_timezone($offset);
384 date_default_timezone_set($zone);
385 $name = DB_get_name_by_userid($user);
387 echo "<tr> <td>$name</td> <td>".date("Y-m-d H:i:s")."</td></tr>\n";
389 echo "</table>\n</div>\n";
391 if($gamestatus != 'pre')
394 /* display links to the users status page */
395 $result = mysql_query("SELECT email,password from User WHERE id='$myid'" );
396 $r = mysql_fetch_array($result,MYSQL_NUM);
397 output_link_to_user_page($r[0],$r[1]);
401 /* end display useful things*/
403 /* has the game started? No, then just wait here...*/
404 if($gamestatus == 'pre')
406 echo "you need to wait for the others... <br />";
407 break; /* not sure this works... the idea is that you can
408 * only play a card after everyone is ready to play */
411 /* display the table and the names */
412 $result = mysql_query("SELECT User.fullname as name,".
413 " Hand.position as position ".
415 "LEFT JOIN User ON User.id=Hand.user_id ".
416 "WHERE Hand.game_id='".$gameid."' ".
417 "ORDER BY position ASC");
419 echo "<div class=\"table\">\n".
420 " <img src=\"pics/table.png\" alt=\"table\" />\n";
421 while($r = mysql_fetch_array($result,MYSQL_NUM))
426 echo " <span class=\"table".($pos-1)."\">$name</span>\n";
430 /* get everything relevant to display the tricks */
431 $result = mysql_query("SELECT Hand_Card.card_id as card,".
432 " Hand.position as position,".
433 " Play.sequence as sequence, ".
437 "LEFT JOIN Play ON Trick.id=Play.trick_id ".
438 "LEFT JOIN Hand_Card ON Play.hand_card_id=Hand_Card.id ".
439 "LEFT JOIN Hand ON Hand_Card.hand_id=Hand.id ".
440 "LEFT JOIN Comment ON Play.id=Comment.play_id ".
441 "WHERE Trick.game_id='".$gameid."' ".
442 "ORDER BY Trick.id,sequence ASC");
445 $lasttrick = DB_get_max_trickid($gameid);
447 $play = array(); /* needed to calculate winner later */
449 $pos = DB_get_startplayer_by_gameid($gameid)-1;
450 $firstcard = ""; /* first card in a trick */
452 echo "\n<ul class=\"tricks\">\n";
453 echo " <li> Hello $myname! History: </li>\n";
455 while($r = mysql_fetch_array($result,MYSQL_NUM))
462 /* save card to be able to find the winner of the trick later */
467 /* first card in a trick, output some html */
468 if($trick!=$lasttrick)
470 /* start of an old trick? */
471 echo " <li onclick=\"hl('$trickNR');\"><a href=\"#\">Trick $trickNR</a>\n".
472 " <div class=\"trick\" id=\"trick".$trickNR."\">\n".
473 " <img class=\"arrow\" src=\"pics/arrow".($pos-1).".png\" alt=\"table\" />\n";
475 else if($trick==$lasttrick)
477 /* start of a last trick? */
478 echo " <li onclick=\"hl('$trickNR');\"><a href=\"#\">Current Trick</a>\n".
479 " <div class=\"trick\" id=\"trick".$trickNR."\">\n".
480 " <img class=\"arrow\" src=\"pics/arrow".($pos-1).".png\" alt=\"table\" />\n";
483 /* remember first card, so that we are able to check, what cards can be played */
488 echo " <div class=\"card".($pos-1)."\">\n";
490 /* display comments */
492 echo " <span class=\"comment\">".$comment."</span>\n";
497 echo " </div>\n"; /* end div card */
503 echo " </div>\n </li>\n"; /* end div table, end li table */
507 if($seq!=4 && $trickNR>1)
508 echo " </div>\n </li>\n"; /* end div table, end li table */
512 /* whos turn is it? */
515 $winner = get_winner($play,$gametype); /* returns the position */
517 $firstcard = ""; /* new trick, no first card */
522 if($next==5) $next=1;
525 /* my turn?, display cards as links, ask for comments*/
526 if(DB_get_pos_by_hash($me) == $next)
531 /* do we want to play a card? */
532 if(myisset("card") && $myturn)
534 $card = $_REQUEST["card"];
535 $handid = DB_get_handid_by_hash($me);
537 /* check if we have card and that we haven't played it yet*/
538 /* set played in hand_card to true where hand_id and card_id*/
539 $result = mysql_query("SELECT id FROM Hand_Card WHERE played='false' and ".
540 "hand_id='$handid' AND card_id=".DB_quote_smart($card));
541 $r = mysql_fetch_array($result,MYSQL_NUM);
546 /* mark card as played */
547 mysql_query("UPDATE Hand_Card SET played='true' WHERE hand_id='$handid' AND card_id=".
548 DB_quote_smart($card));
550 /* get trick id or start new trick */
551 $a = DB_get_current_trickid($gameid);
555 $playid = DB_play_card($trickid,$handcardid,$sequence);
557 /* check for coment */
558 if(myisset("comment"))
560 DB_insert_comment($_REQUEST["comment"],$playid,$myid);
563 /* display played card */
564 echo "<div class=\"card\">";
565 echo " you played <br />";
569 /*check if we still have cards left, else set status to gameover */
570 if(sizeof(DB_get_hand($me))==0)
572 DB_set_hand_status_by_hash($me,'gameover');
573 $mystatus='gameover';
576 /* if all players are done, set game status to game over,
577 * get the points of the last trick and send out an email
580 $userids = DB_get_all_userid_by_gameid($gameid);
583 foreach($userids as $user)
584 if(DB_get_hand_status_by_userid_and_gameid($user,$gameid)!='gameover')
589 DB_set_game_status_by_gameid($gameid,"gameover");
590 /* get score for last trick
591 * all other tricks are handled a few lines further down*/
592 $play = DB_get_cards_by_trick($trickid);
593 $winner = get_winner($play,$gametype); /* returns the position */
594 /* get points of last trick and save it */
596 foreach($play as $card)
597 $points = $points + card_value($card);
598 $winnerid = DB_get_handid_by_gameid_and_position($gameid,$winner);
600 mysql_query("INSERT INTO Score VALUES (NULL, '$gameid', '$winnerid', '$points')");
602 echo "ERROR during scoring";
604 /* email all players */
605 $result = mysql_query("SELECT fullname, SUM(score) FROM Score".
606 " LEFT JOIN Hand ON Hand.id=hand_id".
607 " LEFT JOIN User ON Hand.user_id=User.id".
608 " WHERE Hand.game_id=$gameid".
609 " GROUP BY fullname" );
610 $message = "The game is over. Thanks for playing :)\n";
611 while( $r = mysql_fetch_array($result,MYSQL_NUM))
612 $message .= " FINAL SCORE: ".$r[0]." ".$r[1]."\n";
613 $message .= "\nIf your not in the list above your score is zero...\n";
614 foreach($userids as $user)
616 $To = DB_get_email_by_userid($user);
617 mymail($To,"[DoKo] game over",$message);
622 /* email next player */
623 if(DB_get_game_status_by_gameid($gameid)=='play')
627 $play = DB_get_cards_by_trick($trickid);
628 $winner = get_winner($play,$gametype); /* returns the position */
630 /* get points of last trick and save it, last trick is handled
631 * a few lines further up */
633 foreach($play as $card)
634 $points = $points + card_value($card);
636 $winnerid = DB_get_handid_by_gameid_and_position($gameid,$winner);
638 mysql_query("INSERT INTO Score VALUES (NULL, '$gameid', '$winnerid', '$points')");
640 echo "ERROR during scoring";
643 echo "DEBUG: $winner got $points <br />";
645 /* who is the next player? */
650 $next = DB_get_pos_by_hash($me)+1;
652 if($next==5) $next=1;
654 /* email next player */
655 $next_hash = DB_get_hash_from_game_and_pos($gameid,$next);
656 $email = DB_get_email_by_hash($next_hash);
658 $message = "It's your turn now.\n".
659 "Use this link to play a card: ".$host."?me=".$next_hash."\n\n" ;
660 mymail($email,"[DoKo-debug] a card has been played",$message);
663 echo "DEBUG:<a href=\"index.php?me=".DB_get_hash_from_game_and_pos($gameid,$next).
664 "\"> next player </a> <br />\n";
670 echo "can't find that card?! <br />\n";
673 else if(myisset("card") && !$myturn )
675 echo "please wait until it's your turn! <br />\n";
678 $mycards = DB_get_hand($me);
679 $mycards = mysort($mycards,$gametype);
680 echo "<div class=\"mycards\">\n";
682 if($myturn && !myisset("card"))
684 echo "Hello ".$myname.", it's your turn! <br />\n";
685 echo "Your cards are: <br />\n";
686 echo "<form action=\"index.php?me=$me\" method=\"post\">\n";
688 /* do we have to follow suite? */
690 if(have_suit($mycards,$firstcard))
693 foreach($mycards as $card)
695 if($followsuit && !same_type($card,$firstcard))
698 display_link_card($card);
701 echo "<br />\nA short comments:<input name=\"comment\" type=\"text\" size=\"30\" maxlength=\"50\" />\n";
702 echo "<input type=\"hidden\" name=\"me\" value=\"$me\" />\n";
703 echo "<input type=\"submit\" value=\"move\" />\n";
706 else if($mystatus=='play')
708 echo "Your cards are: <br />\n";
709 foreach($mycards as $card)
714 /* check if we need to set status to 'gameover' is done during playing of the card */
715 if($mystatus=='play')
717 /* the following happens only when the gamestatus is 'gameover' */
718 /* check if game is over, display results */
719 if(DB_get_game_status_by_gameid($gameid)=='play')
721 echo "the game is over for you.. other people still need to play though";
725 echo "the game is over now...<br />\n";
727 $result = mysql_query("SELECT fullname, SUM(score) FROM Score".
728 " LEFT JOIN Hand ON Hand.id=hand_id".
729 " LEFT JOIN User ON Hand.user_id=User.id".
730 " WHERE Hand.game_id=$gameid".
731 " GROUP BY fullname" );
732 while( $r = mysql_fetch_array($result,MYSQL_NUM))
733 echo " FINAL SCORE: ".$r[0]." ".$r[1]."<br />";
735 /* suggest a new game with the same people in it, just rotated once */
736 $names = DB_get_all_names_by_gameid($gameid);
737 output_ask_for_new_game($names[1],$names[2],$names[3],$names[0],$gameid);
741 echo "error in testing the status";
745 /* user status page */
746 else if(myisset("email","password"))
748 /* test id and password, should really be done in one step */
749 $email = $_REQUEST["email"];
750 $password = $_REQUEST["password"];
752 if(strlen($password)!=32)
753 $password = md5($password);
756 $uid = DB_get_userid_by_email_and_password($email,$password);
762 $time = DB_get_user_timestamp($uid);
763 $unixtime =strtotime($time);
765 $offset = DB_get_user_timezone($uid);
766 $zone = return_timezone($offset);
767 date_default_timezone_set($zone);
769 echo "last login: ".date("r",$unixtime)."<br />";
771 DB_update_user_timestamp($uid);
773 echo "<p>these are the games you are playing in:<br />\n";
774 $result = mysql_query("SELECT Hand.hash,Hand.game_id,Game.mod_date from Hand".
775 " LEFT JOIN Game On Hand.game_id=Game.id".
776 " WHERE Hand.user_id='$uid' AND Game.status<>'gameover'" );
777 while( $r = mysql_fetch_array($result,MYSQL_NUM))
779 echo "<a href=\"".$host."?me=".$r[0]."\">game #".$r[1]." </a>";
780 if(time()-strtotime($r[2]) > 60*60*24*30)
781 echo " The game has been running for over a month. Do you want to cancel it? <a href=\"$host?cancle=1&me=".$r[0]."\">yes</a>";
787 echo "<p>and these are your games that are already done:<br />\n";
788 $result = mysql_query("SELECT hash,game_id from Hand WHERE user_id='$uid' AND status='gameover'" );
789 while( $r = mysql_fetch_array($result,MYSQL_NUM))
790 echo "<a href=\"".$host."?me=".$r[0]."\">game #".$r[1]." </a><br />";
793 $names = DB_get_all_names();
794 echo "<p>registered players:<br />\n";
795 foreach ($names as $name)
796 echo "$name <br />\n";
799 echo "<p>Want to start a new game? remember 4 names from the list above and visit ".
800 "<a href=\"".$host."?new\">this page.</a></p>";
804 echo "sorry email and password don't match <br />";
808 /* page for registration */
809 else if(myisset("register") )
813 /* new user wants to register */
814 else if(myisset("Rfullname","Remail","Rpassword","Rtimezone") )
817 if(DB_get_userid_by_name($_REQUEST["Rfullname"]))
819 echo "please chose another name<br />";
822 if(DB_get_userid_by_email($_REQUEST["Remail"]))
824 echo "this email address is already used ?!<br />";
829 $r=mysql_query("INSERT INTO User VALUES(NULL,".DB_quote_smart($_REQUEST["Rfullname"]).
830 ",".DB_quote_smart($_REQUEST["Remail"]).
831 ",".DB_quote_smart(md5($_REQUEST["Rpassword"])).
832 ",".DB_quote_smart($_REQUEST["Rtimezone"]).",NULL)");
835 echo " added you to the database";
837 echo " something went wrong";
840 /* default login page */