Daroo 1678 Files Homepage Problem!

12/17/2012 21:40 jochee#1
Guten Abend,

ich habe gerade das Homepagescript von Daroo installiert und habe nun das Problem, dass wenn ich mich regestrieren möchte, egal welche Daten ich angeben immer kommt, dass der Account bereits exestiert. Im Internet habe ich keine Lösung gefunden...

hier der Code von der register.php:
PHP Code:
<div id="content">            <div class="postui2 text-title">
                    <h2>
                    Registration
                    
                    </h2>
                
                </div>
                <div class="postui2 text-con">
                <div class="con-wrap">
<?PHP
  
  $regCoins 
0// Startcoins
  
  
$laufZeit 365//Tage autoloot,safebox
  
$calcLZ = (60*60*24)*365;
  
$expireStamp time()+$calcLZ;
  
$expireDate date("Y-m-d H:i:s",$expireStamp);
  
  if(
$serverSettings['register_on'] && (!isset($_SESSION['user_admin']) && !checkInt($_SESSION['user_admin']) && !$_SESSION['user_admin']>=0)) {
  
    if(isset(
$_POST['submit']) && $_POST['submit']=="registrieren") {
      if((
checkAnum($_POST['account']) && strlen($_POST['account'])>=&& strlen($_POST['account'])<=16) && checkAnum($_POST['pass'])  && strlen($_POST['pass'])>=&& strlen($_POST['pass2'])<=16 && !empty($_POST['pass2']) && (checkName($_POST['uname']) && strlen($_POST['uname'])>=&& strlen($_POST['uname'])<=20) && $_POST['pass']==$_POST['pass2'] && checkMail($_POST['email']) && strlen($_POST['email'])<=40 && $_POST['email']==$_POST['email2'] && (checkAnum($_POST['sicherheitsa']) && strlen($_POST['sicherheitsa'])>=&& strlen($_POST['sicherheitsa'])<=16) && checkInt($_POST['sicherheitsf']) && (checkAnum($_POST['loeschcode']) && strlen($_POST['loeschcode'])==7)) {
        
        
$sqlCmd "INSERT INTO account.account 
        (login,password,real_name,email,social_id,question1,answer1,create_time,status,coins,autoloot_expire,safebox_expire,web_aktiviert) 
        VALUES 
        ('"
.$_POST['account']."',PASSWORD('".$userpass."'),'".mysql_real_escape_string($_POST['uname'])."','".mysql_real_escape_string($_POST['email'])."','".$lcode."','".$sfNum."','".$hashSF."','".$sqlZeit."','OK','".$regCoins."','".$expireDate."','".$expireDate."','".$aktivHash."')";
        
$sqlQry mysql_query($sqlCmd,$sqlServ);
        if(
$sqlQry) {
            echo
'<p class="meldung">Account erfolgreich angelegt. Sie können sich nun anmelden.</p>';
        }
        else {
          echo
'<p class="meldung">Registrierung fehlgeschlagen: Der Account existiert bereits.</p>';
        }
        
      }
      else {
        echo
'<p class="meldung">Registrierung fehlgeschlagen: bitte alle Felder richtig angeben</p>';
      }
    }
  
?>
    <p>Alle Felder sind Pflichtfelder und müssen ausgefüllt werden.</p>
    <form action="index.php?s=register" method="POST">
      <table>
        <tr>
          <th class="topLine">Account:</th>
          <td class="tdunkel"><input type="text" name="account" maxlength="16" size="16"/> 8-16 Zeichen (nur a-Z,0-9)</td>
        </tr>
        <tr>
          <th class="topLine">Name:</th>
          <td class="thell"><input type="text" name="uname" maxlength="16" size="16"/> 3-20 Zeichen (nur a-Z,0-9)</td>
        </tr>
        <tr>
          <th class="topLine">Password:</th>
          <td class="tdunkel"><input type="password" name="pass" maxlength="16" size="16"/> 4-16 Zeichen (nur a-Z,0-9)</td>
        </tr>
        <tr>
          <th class="topLine">Password wiederholen:</th>
          <td class="thell"><input type="password" name="pass2" maxlength="16" size="16"/></td>
        </tr>
        <tr>
          <th class="topLine">E-Mail:</th>
          <td class="tdunkel"><input type="text" name="email" maxlength="50" size="25"/> max. 40 Zeichen</td>
        </tr>
        <tr>
          <th class="topLine">E-Mail wiederholen:</th>
          <td class="thell"><input type="text" name="email2" maxlength="50" size="25"/></td>
        </tr>
        <tr>
          <th class="topLine">Löschcode:</th>
          <td class="tdunkel"><input type="text" name="loeschcode" maxlength="7" size="7"/> 7 Zeichen (nur a-Z,0-9)</td>
        </tr>
        <tr>
          <th class="topLine">Sicherheitsfrage:</th>
          <td class="thell">
            <select name="sicherheitsf">
              <?PHP
                
foreach($sFrage AS $fragew => $frage) {
                  echo
'<option value="'.$fragew.'">'.$frage.'</option>';
                }
              
?>
            </select>
            <input type="text" name="sicherheitsa" maxlength="16" size="16"/> 3-16 Zeichen (nur a-Z,0-9)
          </td>
        </tr>
        <tr>
          <th class="topLine" style="text-align:center;" colspan="2"><input type="submit" name="submit" value="registrieren"/> &bull; <input type="reset" value="zurücksetzen"/></th>
        </tr>
      </table>
    </form>
  <?PHP
  
}
  else {
    echo
'<p class="meldung">Die Registration ist deaktiviert oder Sie sind bereits angemeldet. Es kann kein weiterer Account erstellt werden.</p>';
  }
?>

                </div>

  </div> 
                <div class="postui2 text-end">
             
                
                  
    </div></div>
MFG
jochee
12/17/2012 22:03 Sintiax#2
Kopier mal die index.php und die config.inc
12/17/2012 22:10 jochee#3
ok :)
index.php:
PHP Code:
<?PHP
  
if(!file_exists('./inc/config.inc.php'))
  {
    
header('Location: install.php');
  }

  if(
file_exists('install.php'))
  {
    if(isset(
$_GET['mv_install']))
    {
        
$postfix rand(1,999);
        
rename('install.php' 'install_2.php');
    }
  }
  
  
session_name("m2hp");
  
session_start();
  
  require(
"./inc/config.inc.php");
  require(
"./inc/rights.inc.php");
  require(
"./inc/functions.inc.php");

  
$sqlHp mysql_connect(SQL_HP_HOSTSQL_HP_USERSQL_HP_PASS);
  
$sqlServ mysql_connect(SQL_HOSTSQL_USERSQL_PASS);
  
  if(!
is_resource($sqlServ) OR !is_resource($sqlHp)) {
    exit(
"Es tut uns leid, es konnt keine Verbindung zum Server
    hergestellt werden."
);
  }
  require(
"./inc/head.inc.php");
  echo 
'<?xml version="1.0"?>';
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?PHP echo $serverSettings['titel_page']; ?></title>
<link href="main.css" rel="stylesheet" type="text/css">
</head>
<body>
<br />
<div class="head header">
    <div class="logo">
    <img src="img/logo.png" width="280" height="92" /></div>
</div> 
    <div class="head navigation">
        <ul>
             <li><a href="index.php" class="home">Home</a></li>
             <li><a href="index.php?s=rankings" class="ranking">Rangliste</a></li>
            <li><a href="index.php?s=register" class="register" >Registration</a></li>
              <li><a href="index.php?s=downloads" class="ranking">Downloads</a></li>
              <li><a href="http:/S/board.white-lotus.eu/" class="home">Forum</a></li>
        </ul>
    </div>
<div class="head status">
    <div class="statustext">
        <div style="float:left;">
        <?PHP
  
if(isset($_SESSION['user_admin']) && checkInt($_SESSION['user_admin']) && $_SESSION['user_admin']>=0) {
    
?>


  

      <a href="index.php?s=logout" class="sb-link"> Ausloggen</a> /
      <a href="index.php?s=charaktere" class="sb-link"> Charaktere</a> /
      <a href="index.php?s=itemshop"class="sb-link"> Itemshop</a> /
      <a href="index.php?s=spenden"class="sb-link"> Spenden</a> /
      <a href="index.php?s=passwort" class="sb-link"> Daten ändern</a>
      
      <?PHP
        
if($_SESSION['user_admin']>0) { echo' / <a href="index.php?s=admin" class="sb-link">
        Admin</a>'
; }
      
?>
    <?PHP
  
}
  else {
  
?>
        <form id="userInfo" action="index.php?s=login" method="POST">
<input type="text" name="userid" onFocus="if(this.value=='Account ID') this.value='';" onBlur="if(this.value=='') this.value='Account ID';" value="Account ID" class="txt"> 
<input type="password" name="userpass" onFocus="if(this.value=='Account ID') this.value='';" onBlur="if(this.value=='') this.value='Account ID';" value="Account ID" class="txt">

<input class="btn" type="submit" name="submit" value="LOGIN">
</form>

        </div>
          <?PHP
  
}
?>
  </div>
</div>
<br /><br />
 <div id="main">
 <img src="img/main_top.png" width="800" height="16" />
 <br />
  <div class="middle">
  <?PHP
        
          
if(isset($_GET['s']) && !empty($_GET['s']))
          {
            if(
file_exists("./pages/".$_GET['s'].".php")) 
            {
              include(
"./pages/".$_GET['s'].".php");
            }
            else {
              include(
"./pages/home.php");
            }
          } else 
          {
            include(
"./pages/home.php");
          }
        
        
?>

</div>
<center><font color="CCC"> Copyright 2011 by <?PHP echo $serverSettings['titel']; ?>, iKyroja, hen!& Daroo</font></center>
<img src="img/main_bt.png" width="800" height="16" /></div><br />


</body>
</html>
<?PHP
  mysql_close
();
?>

config.php:
PHP Code:
<?PHP
    
      DEFINE
('SQL_HOST''localhost');
      
DEFINE('SQL_USER''root');
      
DEFINE('SQL_PASS''meinpw');
      
      
DEFINE('SQL_HP_HOST''localhost');
      
DEFINE('SQL_HP_USER''root');
      
DEFINE('SQL_HP_PASS''meinpw');
      
DEFINE('SQL_HP_DB''account');
      
      
$serverSettings['titel_page']="Expendrius2 - Homepage";         // Webseiten-Titel
      
$serverSettings['titel']="Expendrius2";                           // Servername
      
$serverSettings['url']="http://5.9.73.../index.php";                     // URL zur Seite (ohne letzten "/")
      
$serverSettings['server_ip']="5.9.73....";                         // Server-IP
      
$serverSettings['register_on']=true;                              // Registration aktiviert (ja = true / nein = false)
      
$serverSettings['mail_activation']=false;                          // Mailaktivierung (ja = true / nein = false)
      
$serverSettings['page_entries']=30;                               // Eintr¦ge pro Seite
      
$serverSettings['reg_mail']='[Only registered and activated users can see links. Click Here To Register...]';                   // E-Mail-Absender bei Registration
      
$serverSettings['pass_mail']='[Only registered and activated users can see links. Click Here To Register...]';                 // E-Mail-Absender bei Passwortreset
      
$serverSettings['tombola']=true;                                    // Tombola aktiviert (ja = true / nein = false)
      
$tombolaPrice='100';                                                // Wie viel ein Ticket kostet      
      
      
require("daten.inc.php");
      
    
?>
12/18/2012 01:06 Sintiax#4
localhost , musst du durch deine IP übersetzen, hast du aber sicherlich oder?
Weil bei pw hast du mein pw stehen, da würd ich denken das du bei ip "meineip" hinschreiben würdest.
12/18/2012 13:13 jochee#5
also ich habe bei localhost auch localhost stehen ^^
12/18/2012 13:19 Apocalyptum#6
da muss deine ip rein, sowie das pw deiner serverfiles, und das pw der mysql datenbank
12/18/2012 13:31 jochee#7
wo muss das mysql pw rein und wo das serverfiles pw? :O also in welches von den beiden