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 */
25 output_form_for_new_game();
27 /*check if everything is ready to set up a new game */
28 else if( myisset("PlayerA", "PlayerB","PlayerC","PlayerD" ))
30 $PlayerA = $_REQUEST["PlayerA"];
31 $PlayerB = $_REQUEST["PlayerB"];
32 $PlayerC = $_REQUEST["PlayerC"];
33 $PlayerD = $_REQUEST["PlayerD"];
35 $EmailA = DB_get_email_by_name($PlayerA);
36 $EmailB = DB_get_email_by_name($PlayerB);
37 $EmailC = DB_get_email_by_name($PlayerC);
38 $EmailD = DB_get_email_by_name($PlayerD);
40 if($EmailA=="" || $EmailB=="" || $EmailC=="" || $EmailD=="")
42 echo "couldn't find one of the names, please start a new game";
46 $useridA = DB_get_userid_by_name($PlayerA);
47 $useridB = DB_get_userid_by_name($PlayerB);
48 $useridC = DB_get_userid_by_name($PlayerC);
49 $useridD = DB_get_userid_by_name($PlayerD);
51 /* create random numbers */
52 $randomNR = create_array_of_random_numbers();
53 $randomNRstring = join(":",$randomNR);
57 if(myisset("followup") )
59 $followup= $_REQUEST["followup"];
60 mysql_query("INSERT INTO Game VALUES (NULL, NULL, '$randomNRstring', 'normal', NULL,'1','pre','$followup' ,NULL)");
63 mysql_query("INSERT INTO Game VALUES (NULL, NULL, '$randomNRstring', 'normal', NULL,'1','pre', NULL ,NULL)");
64 $game_id = mysql_insert_id();
67 $hashA = md5("AGameOfDoko".$game_id.$PlayerA.$EmailA);
68 $hashB = md5("AGameOfDoko".$game_id.$PlayerB.$EmailB);
69 $hashC = md5("AGameOfDoko".$game_id.$PlayerC.$EmailC);
70 $hashD = md5("AGameOfDoko".$game_id.$PlayerD.$EmailD);
73 mysql_query("INSERT INTO Hand VALUES (NULL,".DB_quote_smart($game_id).",".DB_quote_smart($useridA).
74 ", ".DB_quote_smart($hashA).", 'start','1',NULL,NULL,NULL,'false','false',NULL)");
75 $hand_idA = mysql_insert_id();
76 mysql_query("INSERT INTO Hand VALUES (NULL,".DB_quote_smart($game_id).",".DB_quote_smart($useridB).
77 ", ".DB_quote_smart($hashB).", 'start','2',NULL,NULL,NULL,'false','false',NULL)");
78 $hand_idB = mysql_insert_id();
79 mysql_query("INSERT INTO Hand VALUES (NULL,".DB_quote_smart($game_id).",".DB_quote_smart($useridC).
80 ", ".DB_quote_smart($hashC).", 'start','3',NULL,NULL,NULL,'false','false',NULL)");
81 $hand_idC = mysql_insert_id();
82 mysql_query("INSERT INTO Hand VALUES (NULL,".DB_quote_smart($game_id).",".DB_quote_smart($useridD).
83 ", ".DB_quote_smart($hashD).", 'start','4',NULL,NULL,NULL,'false','false',NULL)");
84 $hand_idD = mysql_insert_id();
88 mysql_query("INSERT INTO Hand_Card VALUES (NULL, '$hand_idA', '".$randomNR[$i]."', 'false')");
90 mysql_query("INSERT INTO Hand_Card VALUES (NULL, '$hand_idB', '".$randomNR[$i]."', 'false')");
92 mysql_query("INSERT INTO Hand_Card VALUES (NULL, '$hand_idC', '".$randomNR[$i]."', 'false')");
94 mysql_query("INSERT INTO Hand_Card VALUES (NULL, '$hand_idD', '".$randomNR[$i]."', 'false')");
96 /* send out email, TODO: check for error with email */
98 "you are invited to play a game of DoKo (that is to debug the program ;).\n".
99 "Place comments and bug reports here:\n".
100 "http://wiki.nubati.net/index.php?title=EmailDoko\n\n".
101 "The whole round would consist of the following players:\n".
106 "If you want to join this game, please follow this link:\n\n".
109 mymail($EmailA,"You are invited to a game of DoKo","Hello $PlayerA,\n".$message.$hashA);
110 mymail($EmailB,"You are invited to a game of DoKo","Hello $PlayerB,\n".$message.$hashB);
111 mymail($EmailC,"You are invited to a game of DoKo","Hello $PlayerC,\n".$message.$hashC);
112 mymail($EmailD,"You are invited to a game of DoKo","Hello $PlayerD,\n".$message.$hashD);
115 echo "You started a new game. The emails have been sent out!";
117 /* end set up a new game */
119 else if(myisset("me"))
121 /* handle request from one specific player,
122 * the hash is set on a per game base
125 $me = $_REQUEST["me"];
127 /* test for valid ID */
128 $myid = DB_get_userid_by_hash($me);
131 echo "Can't find you in the database, please check the url.<br />\n";
132 echo "perhaps the game has been cancled, check by login in <a href=\"$host\">here</a>.";
136 DB_update_user_timestamp($myid);
138 /* get some information from the DB */
139 $gameid = DB_get_gameid_by_hash($me);
140 $myname = DB_get_name_by_hash($me);
141 $mystatus = DB_get_status_by_hash($me);
142 $mypos = DB_get_pos_by_hash($me);
144 echo "<p class=\"gamenumber\"> Game $gameid </p>\n";
148 if(myisset("cancle"))
149 echo "<p style=\"background-color:red\";>canceling a game is not implemented at the moment, but will be soon...<br /><br /></p>";
154 check_want_to_play($me);
155 DB_set_hand_status_by_hash($me,'init');
158 if( !myisset("in","update") )
160 DB_set_hand_status_by_hash($me,'start');
161 echo "you need to answer both question";
165 if($_REQUEST["in"] == "no")
167 $message = "Hello, \n\n".
168 "the game has been canceled due to the request of one of the players.\n";
170 $userids = DB_get_all_userid_by_gameid($gameid);
171 foreach($userids as $user)
173 $To = DB_get_email_by_userid($user);
174 mymail($To,"[DoKo] game cancled",$message);
177 /* delete everything from the dB */
182 echo "thanks for joining the game... please scroll down";
183 echo "TODO: make this page nicer<br />";
184 echo "TODO: set card pref<br />";
186 $mycards = DB_get_hand($me);
188 echo "<p class=\"mycards\">your cards are: <br />\n";
189 foreach($mycards as $card)
193 check_for_sickness($me,$mycards);
195 DB_set_hand_status_by_hash($me,'check');
201 echo "checking if you selected solo or nines...<br />".
202 " if you have a wedding, please send an email to the other players. <br />".
203 " if you have poverty you need to play a normal game,sorry...<br />".
204 " Please click <a href=\"$host?me=$me\">here</a> to finish the setup.<br />";
205 if(!myisset("solo","wedding","poverty","nines") )
207 /* all these variables have a pre-selected default,
208 * so we should never get here,
209 * unless a user tries to cheat ;) */
210 echo "something went wrong...please contact the admin.";
214 /* check if this sickness needs to be handled first */
215 $gametype = DB_get_gametype_by_gameid($gameid);
216 $startplayer = DB_get_startplayer_by_gameid($gameid);
218 if( $_REQUEST["solo"]!="No")
220 DB_set_solo_by_hash($me,$_REQUEST["solo"]);
221 DB_set_sickness_by_hash($me,"solo");
222 echo "<br />Seems like you want to play a ".$_REQUEST["solo"]." solo. Got it.<br />\n";
224 if($gametype == "solo" && $startplayer<$mypos)
228 /* this solo comes first */
229 DB_set_gametype_by_gameid($gameid,"solo");
230 DB_set_startplayer_by_gameid($gameid,$mypos);
231 DB_set_solo_by_gameid($gameid,$_REQUEST["solo"]);
234 else if($_REQUEST["wedding"] == "yes")
236 /* TODO: add silent solo somewhere*/
237 echo "wedding was chosen<br />\n";
238 DB_set_sickness_by_hash($me,"wedding");
240 else if($_REQUEST["poverty"] == "yes")
242 echo "poverty was chosen<br />\n";
243 DB_set_sickness_by_hash($me,"poverty");
245 else if($_REQUEST["nines"] == "yes")
247 echo "nines was chosen<br />\n";
248 DB_set_sickness_by_hash($me,"nines");
252 DB_set_hand_status_by_hash($me,'poverty');
254 /* check all players and set game to final result, e.g. solo, wedding, povert, redeal */
258 /* here we need to check if there is a solo or some other form of sickness.
259 * If so, which one counts
260 * set that one in the Game table, delete other ones form Hand table
261 * tell people about it.
263 echo "<br />checking if someone else selected solo or nines... wedding and poverty not handled at the moment<br />".
264 " Please click <a href=\"$host?me=$me\">here</a> to finish the setup.<br />";
266 /* only set this after all poverty, etc. are handeled*/
267 DB_set_hand_status_by_hash($me,'play');
269 /* check if the game can start */
270 $userids = DB_get_all_userid_by_gameid($gameid);
272 foreach($userids as $user)
273 if(DB_get_hand_status_by_userid_and_gameid($user,$gameid)!='play')
278 DB_set_game_status_by_gameid($gameid,'play');
280 /* check what kind of game we are playing */
281 $gametype = DB_get_gametype_by_gameid($gameid);
282 $startplayer = DB_get_startplayer_by_gameid($gameid);
286 /* check for nines */
287 foreach($userids as $user)
289 if(DB_get_sickness_by_userid_and_gameid($user,$gameid) == 'nines')
293 /* gamestatus == normal, => cancel game */
294 if($nines && $gamestatus == "normal")
296 /* TODO: set game type to nines to be able to keep statistics */
298 $message = "Hello, \n\n".
299 "the game has been cancled becausee someone has five or more nines.\n";
301 $userids = DB_get_all_userid_by_gameid($gameid);
302 foreach($userids as $user)
304 $To = DB_get_email_by_userid($user);
305 mymail($To,"[DoKo] game cancled",$message);
308 /* delete everything from the dB */
316 /* check players for poverty */
317 foreach($userids as $user)
319 if(DB_get_sickness_by_userid_and_gameid($user,$gameid) == 'poverty')
322 $name = DB_get_name_by_userid($user);
323 echo "$name has a Vorbehalt. <br />";
326 /* if gamestatus == normal, set poverty or dpovert (in case two people have poverty) */
330 /* check players for wedding */
331 foreach($userids as $user)
333 if(DB_get_sickness_by_userid_and_gameid($user,$gameid) == 'wedding')
336 $name = DB_get_name_by_userid($user);
337 echo "$name has a Vorbehalt. <br />" ;
341 /* if gamestatus == normal, set wedding */
348 /* both entries here, so that the tricks are visible for both.
349 * in case of 'play' there is a break later that skips the last part
352 /* figure out what kind of game we are playing,
353 * set the global variables $TRUMP,$DIAMONDS,$HEARTS,$CLUBS,$SPADES
357 $gametype = DB_get_gametype_by_gameid($gameid);
359 if($gametype=="solo")
361 $gametype = DB_get_solo_by_gameid($gameid);
362 $GT = $gametype." ".$GT;
367 set_gametype($gametype);
369 /* get some infos about the game */
370 $gamestatus = DB_get_game_status_by_gameid($gameid);
372 /* display useful things in divs */
374 /* display local time */
375 echo "<div class=\"time\">\n Local times:<table>";
377 $users = DB_get_all_userid_by_gameid($gameid);
378 foreach($users as $user)
380 $offset = DB_get_user_timezone($user);
381 $zone = return_timezone($offset);
382 date_default_timezone_set($zone);
383 $name = DB_get_name_by_userid($user);
385 echo "<tr> <td>$name</td> <td>".date("Y-m-d H:i:s")."</td></tr>\n";
387 echo "</table>\n</div>\n";
389 if($gamestatus != 'pre')
392 /* display links to the users status page */
393 $result = mysql_query("SELECT email,password from User WHERE id='$myid'" );
394 $r = mysql_fetch_array($result,MYSQL_NUM);
395 output_link_to_user_page($r[0],$r[1]);
399 /* end display useful things*/
401 /* has the game started? No, then just wait here...*/
402 if($gamestatus == 'pre')
404 echo "you need to wait for the others... <br />";
405 break; /* not sure this works... the idea is that you can
406 * only play a card after everyone is ready to play */
409 /* display the table and the names */
410 $result = mysql_query("SELECT User.fullname as name,".
411 " Hand.position as position ".
413 "LEFT JOIN User ON User.id=Hand.user_id ".
414 "WHERE Hand.game_id='".$gameid."' ".
415 "ORDER BY position ASC");
417 echo "<div class=\"table\">\n".
418 " <img src=\"pics/table.png\" alt=\"table\" />\n";
419 while($r = mysql_fetch_array($result,MYSQL_NUM))
424 echo " <span class=\"table".($pos-1)."\">$name</span>\n";
428 /* get everything relevant to display the tricks */
429 $result = mysql_query("SELECT Hand_Card.card_id as card,".
430 " Hand.position as position,".
431 " Play.sequence as sequence, ".
435 "LEFT JOIN Play ON Trick.id=Play.trick_id ".
436 "LEFT JOIN Hand_Card ON Play.hand_card_id=Hand_Card.id ".
437 "LEFT JOIN Hand ON Hand_Card.hand_id=Hand.id ".
438 "LEFT JOIN Comment ON Play.id=Comment.play_id ".
439 "WHERE Trick.game_id='".$gameid."' ".
440 "ORDER BY Trick.id,sequence ASC");
443 $lasttrick = DB_get_max_trickid($gameid);
445 $play = array(); /* needed to calculate winner later */
447 $pos = DB_get_startplayer_by_gameid($gameid)-1;
448 $firstcard = ""; /* first card in a trick */
450 echo "\n<ul class=\"tricks\">\n";
451 echo " <li> Hello $myname! History: </li>\n";
453 while($r = mysql_fetch_array($result,MYSQL_NUM))
460 /* save card to be able to find the winner of the trick later */
465 /* first card in a trick, output some html */
466 if($trick!=$lasttrick)
468 /* start of an old trick? */
469 echo " <li onclick=\"hl('$trickNR');\"><a href=\"#\">Trick $trickNR</a>\n".
470 " <div class=\"trick\" id=\"trick".$trickNR."\">\n".
471 " <img class=\"arrow\" src=\"pics/arrow".($pos-1).".png\" alt=\"table\" />\n";
473 else if($trick==$lasttrick)
475 /* start of a last trick? */
476 echo " <li onclick=\"hl('$trickNR');\"><a href=\"#\">Current Trick</a>\n".
477 " <div class=\"trick\" id=\"trick".$trickNR."\">\n".
478 " <img class=\"arrow\" src=\"pics/arrow".($pos-1).".png\" alt=\"table\" />\n";
481 /* remember first card, so that we are able to check, what cards can be played */
486 echo " <div class=\"card".($pos-1)."\">\n";
488 /* display comments */
490 echo " <span class=\"comment\">".$comment."</span>\n";
495 echo " </div>\n"; /* end div card */
501 echo " </div>\n </li>\n"; /* end div table, end li table */
505 if($seq!=4 && $trickNR>1)
506 echo " </div>\n </li>\n"; /* end div table, end li table */
510 /* whos turn is it? */
513 $winner = get_winner($play,$gametype); /* returns the position */
515 $firstcard = ""; /* new trick, no first card */
520 if($next==5) $next=1;
523 /* my turn?, display cards as links, ask for comments*/
524 if(DB_get_pos_by_hash($me) == $next)
529 /* do we want to play a card? */
530 if(myisset("card") && $myturn)
532 $card = $_REQUEST["card"];
533 $handid = DB_get_handid_by_hash($me);
535 /* check if we have card and that we haven't played it yet*/
536 /* set played in hand_card to true where hand_id and card_id*/
537 $result = mysql_query("SELECT id FROM Hand_Card WHERE played='false' and ".
538 "hand_id='$handid' AND card_id=".DB_quote_smart($card));
539 $r = mysql_fetch_array($result,MYSQL_NUM);
544 /* mark card as played */
545 mysql_query("UPDATE Hand_Card SET played='true' WHERE hand_id='$handid' AND card_id=".
546 DB_quote_smart($card));
548 /* get trick id or start new trick */
549 $a = DB_get_current_trickid($gameid);
553 $playid = DB_play_card($trickid,$handcardid,$sequence);
555 /* check for coment */
556 if(myisset("comment"))
558 DB_insert_comment($_REQUEST["comment"],$playid,$myid);
561 /* display played card */
562 echo "<div class=\"card\">";
563 echo " you played <br />";
567 /*check if we still have cards left, else set status to gameover */
568 if(sizeof(DB_get_hand($me))==0)
570 DB_set_hand_status_by_hash($me,'gameover');
571 $mystatus='gameover';
574 /* if all players are done, set game status to game over,
575 * get the points of the last trick and send out an email
578 $userids = DB_get_all_userid_by_gameid($gameid);
581 foreach($userids as $user)
582 if(DB_get_hand_status_by_userid_and_gameid($user,$gameid)!='gameover')
587 DB_set_game_status_by_gameid($gameid,"gameover");
588 /* get score for last trick
589 * all other tricks are handled a few lines further down*/
590 $play = DB_get_cards_by_trick($trickid);
591 $winner = get_winner($play,$gametype); /* returns the position */
592 /* get points of last trick and save it */
594 foreach($play as $card)
595 $points = $points + card_value($card);
596 $winnerid = DB_get_handid_by_gameid_and_position($gameid,$winner);
598 mysql_query("INSERT INTO Score VALUES (NULL, '$gameid', '$winnerid', '$points')");
600 echo "ERROR during scoring";
602 /* email all players */
603 $result = mysql_query("SELECT fullname, SUM(score) FROM Score".
604 " LEFT JOIN Hand ON Hand.id=hand_id".
605 " LEFT JOIN User ON Hand.user_id=User.id".
606 " WHERE Hand.game_id=$gameid".
607 " GROUP BY fullname" );
608 $message = "The game is over. Thanks for playing :)\n";
609 while( $r = mysql_fetch_array($result,MYSQL_NUM))
610 $message .= " FINAL SCORE: ".$r[0]." ".$r[1]."\n";
611 $message .= "\nIf your not in the list above your score is zero...\n";
612 foreach($userids as $user)
614 $To = DB_get_email_by_userid($user);
615 mymail($To,"[DoKo] game over",$message);
620 /* email next player */
621 if(DB_get_game_status_by_gameid($gameid)=='play')
625 $play = DB_get_cards_by_trick($trickid);
626 $winner = get_winner($play,$gametype); /* returns the position */
628 /* get points of last trick and save it, last trick is handled
629 * a few lines further up */
631 foreach($play as $card)
632 $points = $points + card_value($card);
634 $winnerid = DB_get_handid_by_gameid_and_position($gameid,$winner);
636 mysql_query("INSERT INTO Score VALUES (NULL, '$gameid', '$winnerid', '$points')");
638 echo "ERROR during scoring";
641 echo "DEBUG: $winner got $points <br />";
643 /* who is the next player? */
648 $next = DB_get_pos_by_hash($me)+1;
650 if($next==5) $next=1;
652 /* email next player */
653 $next_hash = DB_get_hash_from_game_and_pos($gameid,$next);
654 $email = DB_get_email_by_hash($next_hash);
656 $message = "It's your turn now.\n".
657 "Use this link to play a card: ".$host."?me=".$next_hash."\n\n" ;
658 mymail($email,"[DoKo-debug] a card has been played",$message);
661 echo "DEBUG:<a href=\"index.php?me=".DB_get_hash_from_game_and_pos($gameid,$next).
662 "\"> next player </a> <br />\n";
668 echo "can't find that card?! <br />\n";
671 else if(myisset("card") && !$myturn )
673 echo "please wait until it's your turn! <br />\n";
676 $mycards = DB_get_hand($me);
677 $mycards = mysort($mycards,$gametype);
678 echo "<div class=\"mycards\">\n";
680 if($myturn && !myisset("card"))
682 echo "Hello ".$myname.", it's your turn! <br />\n";
683 echo "Your cards are: <br />\n";
684 echo "<form action=\"index.php?me=$me\" method=\"post\">\n";
686 /* do we have to follow suite? */
688 if(have_suit($mycards,$firstcard))
691 foreach($mycards as $card)
693 if($followsuit && !same_type($card,$firstcard))
696 display_link_card($card);
699 echo "<br />\nA short comments:<input name=\"comment\" type=\"text\" size=\"30\" maxlength=\"50\" />\n";
700 echo "<input type=\"hidden\" name=\"me\" value=\"$me\" />\n";
701 echo "<input type=\"submit\" value=\"move\" />\n";
704 else if($mystatus=='play')
706 echo "Your cards are: <br />\n";
707 foreach($mycards as $card)
712 /* check if we need to set status to 'gameover' is done during playing of the card */
713 if($mystatus=='play')
715 /* the following happens only when the gamestatus is 'gameover' */
716 /* check if game is over, display results */
717 if(DB_get_game_status_by_gameid($gameid)=='play')
719 echo "the game is over for you.. other people still need to play though";
723 echo "the game is over now...<br />\n";
725 $result = mysql_query("SELECT fullname, SUM(score) FROM Score".
726 " LEFT JOIN Hand ON Hand.id=hand_id".
727 " LEFT JOIN User ON Hand.user_id=User.id".
728 " WHERE Hand.game_id=$gameid".
729 " GROUP BY fullname" );
730 while( $r = mysql_fetch_array($result,MYSQL_NUM))
731 echo " FINAL SCORE: ".$r[0]." ".$r[1]."<br />";
733 /* suggest a new game with the same people in it, just rotated once */
734 $names = DB_get_all_names_by_gameid($gameid);
735 output_ask_for_new_game($names[1],$names[2],$names[3],$names[0],$gameid);
739 echo "error in testing the status";
743 /* user status page */
744 else if(myisset("email","password"))
746 /* test id and password, should really be done in one step */
747 $email = $_REQUEST["email"];
748 $password = $_REQUEST["password"];
750 if(strlen($password)!=32)
751 $password = md5($password);
754 $uid = DB_get_userid_by_email_and_password($email,$password);
760 $time = DB_get_user_timestamp($uid);
761 $unixtime =strtotime($time);
763 $offset = DB_get_user_timezone($uid);
764 $zone = return_timezone($offset);
765 date_default_timezone_set($zone);
767 echo "last login: ".date("r",$unixtime)."<br />";
769 DB_update_user_timestamp($uid);
771 echo "<p>these are the games you are playing in:<br />\n";
772 $result = mysql_query("SELECT Hand.hash,Hand.game_id,Game.mod_date from Hand".
773 " LEFT JOIN Game On Hand.game_id=Game.id".
774 " WHERE Hand.user_id='$uid' AND Game.status<>'gameover'" );
775 while( $r = mysql_fetch_array($result,MYSQL_NUM))
777 echo "<a href=\"".$host."?me=".$r[0]."\">game #".$r[1]." </a>";
778 if(time()-strtotime($r[2]) > 60*60*24*30)
779 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>";
785 echo "<p>and these are your games that are already done:<br />\n";
786 $result = mysql_query("SELECT hash,game_id from Hand WHERE user_id='$uid' AND status='gameover'" );
787 while( $r = mysql_fetch_array($result,MYSQL_NUM))
788 echo "<a href=\"".$host."?me=".$r[0]."\">game #".$r[1]." </a><br />";
791 $names = DB_get_all_names();
792 echo "<p>registered players:<br />\n";
793 foreach ($names as $name)
794 echo "$name <br />\n";
797 echo "<p>Want to start a new game? remember 4 names from the list above and visit ".
798 "<a href=\"".$host."?new\">this page.</a></p>";
802 echo "sorry email and password don't match <br />";
806 /* page for registration */
807 else if(myisset("register") )
811 /* new user wants to register */
812 else if(myisset("Rfullname","Remail","Rpassword","Rtimezone") )
815 if(DB_get_userid_by_name($_REQUEST["Rfullname"]))
817 echo "please chose another name<br />";
820 if(DB_get_userid_by_email($_REQUEST["Remail"]))
822 echo "this email address is already used ?!<br />";
827 $r=mysql_query("INSERT INTO User VALUES(NULL,".DB_quote_smart($_REQUEST["Rfullname"]).
828 ",".DB_quote_smart($_REQUEST["Remail"]).
829 ",".DB_quote_smart(md5($_REQUEST["Rpassword"])).
830 ",".DB_quote_smart($_REQUEST["Rtimezone"]).",NULL)");
833 echo " added you to the database";
835 echo " something went wrong";
838 /* default login page */