X-Git-Url: https://git.nubati.net/cgi-bin/gitweb.cgi?p=e-DoKo.git;a=blobdiff_plain;f=include%2Fuser.php;h=5142918fbb9188dd564831c82d377cf6577a8d45;hp=65544f56fc020999d9b0c29d576d9c9dbc8515ab;hb=a83ac7d982fa4f9d49ac3e6dedac8b489f2f7baa;hpb=5116d22ed84db0f15a7f583bcbe243ee2cd606e1 diff --git a/include/user.php b/include/user.php index 65544f5..5142918 100644 --- a/include/user.php +++ b/include/user.php @@ -1,5 +1,5 @@ +/* Copyright 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2016 Arun Persaud * * This file is part of e-DoKo. * @@ -67,7 +67,8 @@ if(myisset('forgot')) /* create temporary password, use the fist 8 letters of a md5 hash */ $TIME = (string) time(); /* to avoid collisions */ - $hash = md5('Anewpassword'.$email.$TIME); + $rndstring = sha1(rand()); /* add some randomness */ + $hash = md5('Anewpassword'.$email.$TIME.$rndstring); $newpw = substr($hash,1,8); $message = sprintf( _("Someone (hopefully you) requested a new password.\n". @@ -204,8 +205,8 @@ else /* create output */ $sessionoutput .= $gameoutput; - $gameoutput = " " - .$gamefrequence."\n"; + $gameoutput = " " + .$gamefrequence."\n"; } else { /* new session */ @@ -218,13 +219,13 @@ else { $output_active .= "
  • "; if($gamestatus == 'pre') - $output_active .= ''; + $class= 'class="gamestatuspre gameid"'; else if($gamestatus == 'play') - $output_active .= ''; + $class= 'class="gamestatusplay gameid"'; else - $output_active .= ''; - $output_active .= "". - DB_format_gameid($gameid).'   '; + $class= 'class="gamestatusover gameid"'; + $output_active .= "". + DB_format_gameid($gameid).'   '; @@ -314,11 +315,14 @@ else if($count<10) echo '

    '._('You can start new games using the link in the top right corner!')."

    \n"; - /* display last 5 users that have signed up to e-DoKo */ + /* display last 5 users that have signed up to e-DoKo within the 45 days */ $names = DB_get_names_of_new_logins(5); - echo '

    '._('New Players').":

    \n

    \n"; - echo implode(", ",$names).",...\n"; - echo "

    \n"; + if ($names) + { + echo '

    '._('New Player(s)').":

    \n

    \n"; + echo implode(", ",$names).",...\n"; + echo "

    \n"; + }; /* display last 5 users that logged on */ echo '

    '._('Players last logged in').":

    \n

    \n"; @@ -328,7 +332,7 @@ else for($i=0;$i<7;$i++) { echo '\n"; } echo "

    \n";