Login

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • pls post some more details.
      <?PHP

      phpinfo ();

      ?>

      make php file with this inside, call it with the browser and tell me your version and the gameversion pls.
      may also your provider and the mysql version
      how have you installed the game, did you tryed to reinstall it?
    • -- Server Info --
      Server Infos: Apache
      PHP-Version: 5.4.45 (litespeed)
      JSON Verfügbar: Ja
      BCMath Verfügbar: Ja
      cURL Verfügbar: Ja
      SafeMode: Nein
      MemoryLimit: 256
      MMySQL-Client-Version: 10.1.26-MariaDB
      MySQL-Server-Version: 10.1.26-MariaDB
      ErrorLog: includes/error.log (1695, Aktiv)
      Timezone(PHP/CONF/USER): 0 / 2 / 2
      Suhosin: Nein

      -- Game --
      Game Version: 2Moons 1.7.2676
      Browser: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36
      Its with import datbase not installIts a repack i had it from long long time from old 2moons.de
    • the problem is the inputname email
      this is wrong. i think it was e-mail instead. im not sure, but i remeber that error.

      have a look into includes/pages/login/ShowLoginPage.class.php
      there is a function inside wich is named login.
      in this function must be something like HTTP::_GP(' email or username.
      this must be the same as the inputname in the login.
      at the moment it is email and this is and this is not the same as in the php file.
    • This problem was before my first post where we did found the error and fix it , and yest there all

      HTML Source Code

      1. function show()
      2. {
      3. if (empty($_POST)) {
      4. HTTP::redirectTo('index.php');
      5. }
      6. $username = HTTP::_GP('username', '', UTF8_SUPPORT);
      7. $password = HTTP::_GP('password', '', true);
      8. if(checkIP()){
      9. HTTP::redirectTo('index.php');
      10. }
    • PHP Source Code

      1. <?php
      2. /**
      3. * 2Moons
      4. * Copyright (C) 2012 Jan
      5. *
      6. * This program is free software: you can redistribute it and/or modify
      7. * it under the terms of the GNU General Public License as published by
      8. * the Free Software Foundation, either version 3 of the License, or
      9. * (at your option) any later version.
      10. *
      11. * This program is distributed in the hope that it will be useful,
      12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
      13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
      14. * GNU General Public License for more details.
      15. *
      16. * You should have received a copy of the GNU General Public License
      17. * along with this program. If not, see <http://www.gnu.org/licenses/>.
      18. *
      19. * @package 2Moons
      20. * @author Jan <info@2moons.cc>
      21. * @copyright 2006 Perberos <ugamela@perberos.com.ar> (UGamela)
      22. * @copyright 2008 Chlorel (XNova)
      23. * @copyright 2012 Jan <info@2moons.cc> (2Moons)
      24. * @license http://www.gnu.org/licenses/gpl.html GNU GPLv3 License
      25. * @version 2.0.$Revision: 2242 $ (2012-11-31)
      26. * @info $Id: ShowLoginPage.class.php 2532 2013-01-04 16:57:58Z slaver7 $
      27. * @link http://2moons.cc/
      28. */
      29. class ShowLoginPage extends AbstractPage
      30. {
      31. public static $requireModule = 0;
      32. function __construct()
      33. {
      34. parent::__construct();
      35. }
      36. function getUserIP() {
      37. if( array_key_exists('HTTP_X_FORWARDED_FOR', $_SERVER) && !empty($_SERVER['HTTP_X_FORWARDED_FOR']) ) {
      38. if (strpos($_SERVER['HTTP_X_FORWARDED_FOR'], ',')>0) {
      39. $addr = explode(",",$_SERVER['HTTP_X_FORWARDED_FOR']);
      40. return trim($addr[0]);
      41. } else {
      42. return $_SERVER['HTTP_X_FORWARDED_FOR'];
      43. }
      44. }
      45. else {
      46. return $_SERVER['REMOTE_ADDR'];
      47. }
      48. }
      49. function show()
      50. {
      51. if (empty($_POST)) {
      52. HTTP::redirectTo('index.php');
      53. }
      54. $username = HTTP::_GP('username', '', UTF8_SUPPORT);
      55. $password = HTTP::_GP('password', '', true);
      56. if(checkIP()){
      57. HTTP::redirectTo('index.php');
      58. }
      59. $loginData = $GLOBALS['DATABASE']->getFirstRow("SELECT id, password, username FROM ".USERS." WHERE universe = ".$GLOBALS['UNI']." AND username = '".$GLOBALS['DATABASE']->escape($username)."';");
      60. if (isset($loginData))
      61. {
      62. $hashedPassword = md5($password);
      63. if($loginData['password'] != $hashedPassword)
      64. {
      65. // Fallback pre 1.7
      66. if($loginData['password'] == md5($password)) {
      67. $GLOBALS['DATABASE']->query("UPDATE ".USERS." SET password = '".$hashedPassword."' WHERE id = ".$loginData['id'].";");
      68. } else {
      69. HTTP::redirectTo('index.php?code=1');
      70. }
      71. }
      72. $GLOBALS['DATABASE']->query("UPDATE ".USERS." SET peacefull_last_update = '".TIMESTAMP."' WHERE id = ".$loginData['id'].";");
      73. $GLOBALS['DATABASE']->query("DELETE from uni1_fleets_alarm WHERE fleet_target_owner = ".$loginData['id'].";");
      74. $ipCheck = $GLOBALS['DATABASE']->query("SELECT COUNT(checkID) as id FROM uni1_ipcheck WHERE id = ".$loginData['id']." AND ip = '".$this->getUserIP()."';");
      75. $ipCheck = $GLOBALS['DATABASE']->fetch_array($ipCheck);
      76. if($ipCheck['id'] == 0){
      77. $GLOBALS['DATABASE']->query("INSERT INTO uni1_ipcheck VALUES ('".$GLOBALS['DATABASE']->GetInsertID()."','".$loginData['id']."','".$loginData['username']."','".$this->getUserIP()."', ".TIMESTAMP.", '1');");
      78. }
      79. $ipCheck = $GLOBALS['DATABASE']->query("SELECT COUNT(checkID) as id FROM uni1_ipcheck WHERE id != ".$loginData['id']." AND ip = '".$this->getUserIP()."';");
      80. $ipCheck = $GLOBALS['DATABASE']->fetch_array($ipCheck);
      81. if($ipCheck['id'] > 0 && $loginData['id'] != 1){
      82. $GLOBALS['DATABASE']->query("UPDATE ".USERS." SET multi_spotted = '1' WHERE id = ".$loginData['id'].";");
      83. }
      84. Session::create($loginData['id']);
      85. $GLOBALS['DATABASE']->query("DELETE FROM uni1_login_tries WHERE ip = '".$this->getUserIP()."';");
      86. HTTP::redirectTo('game.php?page=overview');
      87. }
      88. else
      89. {
      90. //not ok, lets log
      91. $exist = $GLOBALS['DATABASE']->uniquequery("SELECT `id`,`login_tries` from uni1_login_tries where ip = '".$_SERVER['REMOTE_ADDR']."' ");
      92. if(!empty($exist) && !empty($exist['id'])){
      93. //he already did it once, lets upgrade
      94. if($exist['login_tries'] + 1 > 90){
      95. //ban the fucker
      96. $GLOBALS['DATABASE']->query("INSERT INTO uni1_bannedip(`ip`) value('".$_SERVER['REMOTE_ADDR']."')");
      97. }else{
      98. //don't ban now, increase
      99. $GLOBALS['DATABASE']->query("Update uni1_login_tries set login_tries = login_tries + 1 where id = ".$exist['id']." ;");
      100. }
      101. }else{
      102. $GLOBALS['DATABASE']->query("INSERT INTO uni1_login_tries(`ip`,`login_tries`) value('".$_SERVER['REMOTE_ADDR']."',1)");
      103. }
      104. Session::redirectCode(1);
      105. }
      106. }
      107. }
      Display All
    • change

      PHP Source Code

      1. $email = HTTP::_GP('email', '', UTF8_SUPPORT);
      and

      PHP Source Code

      1. $loginData = $GLOBALS['DATABASE']->getFirstRow("SELECT id, password, username FROM ".USERS." WHERE universe = ".$GLOBALS['UNI']." AND email = '".$GLOBALS['DATABASE']->escape($email)."';");
      sry updated. was a little mistake in
    • change

      PHP Source Code

      1. $username = HTTP::_GP('email', '', UTF8_SUPPORT);
      and


      PHP Source Code

      1. $loginData = $GLOBALS['DATABASE']->getFirstRow("SELECT id, password, username FROM ".USERS." WHERE universe = ".$GLOBALS['UNI']." AND username = '".$GLOBALS['DATABASE']->escape($username)."';");
      like that you can log in with username and password