ilch Forum » Ilch Clan 1.1 » Fehlersuche und Probleme » Neue User können sich registrieren

Geschlossen
  1. #1
    User Pic
    HeaddyDaddy Mitglied
    Registriert seit
    22.03.2011
    Beiträge
    62
    Beitragswertungen
    1 Beitragspunkte
    Hallo Community,

    ich habe mir das exhanced JoinUs-Modul heruntergeladen >Link< und nach meinen Vorstellungen angepasst.

    Nun habe ich aber das Problem, das sich neue User mit einem JoinUs direkt für die Seite registrieren.
    Diese User werden direkt als Trial Member angelegt und haben vollen Zugang zur Homepage.

    Jetzt gibt es in den Konfigurationen ja unter Forum die Einstellungen die dieses Problem beheben sollten.
    Mit dem original JoinUs greifen diese Einstellungen auch, ich denke aber das ich beim basteln an dem erweitereten JoinUs irgend eine wichtige Abfrage rausgenommen habe.

    Hier mein Quellcode:

    joinus.php
    <?php
    #   Copyright by: Manuel Staechele
    #   Support: www.ilch.de
    defined ('main') or die ( 'no direct access' );
    //-----------------------------------------------------------|
    
    $title = $allgAr['title'].' :: Joinus';
    $hmenu = 'Joinus';
    $design = new design ( $title , $hmenu );
    $design->header();
    
    if ( 0 == db_count_query("SELECT COUNT(*) FROM prefix_groups WHERE show_joinus = 1") ) {
    	echo $lang['noteamthere'];
    	$design->footer();
    	exit ();
    }
    
    $skill_ar = array (
      1 => $lang['verybad'],
      2 => $lang['bad'],
    	3 => $lang['middle'],
    	4 => $lang['good'],
    	5 => $lang['verygood'],
    );
    
    $far = array (
    		'name',
    		'realname',
    		'age',
    		'hometown',
    		'geschl',
    		'mail',
    		'bestcod',
    		'bestmap',
    		'rules',
    		'ground',
    	);
    $x = 0;
    foreach ($far as $v) {
    	if (!empty($_POST[$v])) {
    		$$v = escape($_POST[$v], 'string');
    		$x++;
    	} else {
    		$$v = '';
    	}
    }
    
    $xname = escape_nickname($name);
    $ch_name = false;
    if (loggedin()) {
      $ch_name = true;
    } elseif (isset($_POST['sub']) AND $name == $xname AND !empty($name)
       AND 0 == db_result(db_query("SELECT COUNT(*) FROM prefix_user WHERE name = BINARY '".$name."'"),0)) {
      $ch_name = true;
    }
    
    if (count($far) <> $x OR $ch_name == false) {
    	$tpl = new tpl ( 'joinus.htm' );
    	$squad = dblistee ($squad, "SELECT id,name FROM prefix_groups WHERE show_joinus = 1 ORDER BY pos");
      if (loggedin()) { $name = $_SESSION['authname']; }
      foreach($far as $v) {
    		if ($x > 0 AND empty($_POST[$v])) {
    			echo 'Es fehlt: '.$lang[$v].'<br />';
    		}
    		$tpl->set ($v, $$v);
    	}
      if ($x > 0 AND $name != $xname) {
        echo $lang['wrongnickname'].'<br />';
      } elseif ($x > 0 AND $ch_name == false) {
        echo $lang['namealreadyinuse'].'<br />';
      }
      $name = $xname;
      $tpl->set('readonly', (loggedin()?' readonly': ''));
    	$tpl->out(0);
    } else { # eintragen
      
      $name = $xname;
    	$userreg = $lang['no'];
      if (!loggedin()) {
        $x = user_regist ($name,$mail,genkey(8));
        $userreg = $lang['yes'];
      }
    
      db_query("INSERT INTO prefix_usercheck (`check`,name,datime,ak) VALUES ('".genkey(8)."','".$name."',NOW(),4)");
    
      $squad = escape($squad, 'integer');
    	$abf   = "SELECT `mod1`, `mod2`, `mod4`, name FROM prefix_groups WHERE id = 1";
    	$erg   = db_query($abf);
    	$row   = db_fetch_assoc($erg);
      $rulz  = (isset($_POST['rules'])?$_POST['rules']:$lang['no']);
      $cod4 = (isset($_POST['cod4'])?$_POST['cod4']:$lang['no']);
      $cod5 = (isset($_POST['cod5'])?$_POST['cod5']:$lang['no']);
      $cod6 = (isset($_POST['cod6'])?$_POST['cod6']:$lang['no']);
      $cod7 = (isset($_POST['cod7'])?$_POST['cod7']:$lang['no']);
      $cod8 = (isset($_POST['cod8'])?$_POST['cod8']:$lang['no']);
      $sniper = (isset($_POST['sniper'])?$_POST['sniper']:$lang['no']);
      $ar = (isset($_POST['ar'])?$_POST['ar']:$lang['no']);
      $smg = (isset($_POST['smg'])?$_POST['smg']:$lang['no']);
      $lmg = (isset($_POST['lmg'])?$_POST['lmg']:$lang['no']);
      $sg = (isset($_POST['sg'])?$_POST['sg']:$lang['no']);
      $allr = (isset($_POST['allr'])?$_POST['allr']:$lang['no']);
      $so = (isset($_POST['so'])?$_POST['so']:$lang['no']);
      $yes = (isset($_POST['yes'])?$_POST['yes']:$lang['no']);
      
      # bitte in der richtigen reihenfolge angeben, sonst das nicht gehen tun, kann.
      $mailtxt = sprintf ($lang['joinusprivmsg'],
        $name,
        $realname,
    	$age,
    	$hometown,
    	$geschl,
    	$mail,
        $cod4,
    	$cod5,
    	$cod6,
    	$cod7,
    	$cod8,
    	$bestcod,
    	$bestmap,
    	$sniper,
    	$ar,
    	$smg,
    	$lmg,
    	$sg,
    	$allr,
    	$so,
    	$yes,
    	$rulz,
    	$ground
      );
      
      # pm an den leader  
    	sendpm ($_SESSION['authid'], $row['mod1'], 'Joinus Anfrage',$mailtxt, -1);
      # Wenn Co Leader != Leader
    	if ($row['mod2'] != $row['mod1']){
    		sendpm ($_SESSION['authid'], $row['mod2'], 'Joinus Anfrage',$mailtxt, -1);
    	}
    	if ($row['mod4'] != $row['mod1'] AND $row['mod2'] != $row['mod4']){
    		sendpm ($_SESSION['authid'], $row['mod4'], 'Joinus Anfrage',$mailtxt, -1);
    	}
    	
    	if (!loggedin() AND $allgAr['forum_regist'] <> 0) {
    		echo $lang['amailhasbeensenttoyouwithmailandpass'].'<br /><br />';
      }
      echo sprintf($lang['leaderofxalert'], $row['name']);
    }
    $design->footer();
    ?>


    joinus.html
    <?php
    #   Copyright by: Manuel Staechele
    #   Support: www.ilch.de
    defined ('main') or die ( 'no direct access' );
    //-----------------------------------------------------------|
    
    $title = $allgAr['title'].' :: Joinus';
    $hmenu = 'Joinus';
    $design = new design ( $title , $hmenu );
    $design->header();
    
    if ( 0 == db_count_query("SELECT COUNT(*) FROM prefix_groups WHERE show_joinus = 1") ) {
    	echo $lang['noteamthere'];
    	$design->footer();
    	exit ();
    }
    
    $skill_ar = array (
      1 => $lang['verybad'],
      2 => $lang['bad'],
    	3 => $lang['middle'],
    	4 => $lang['good'],
    	5 => $lang['verygood'],
    );
    
    $far = array (
    		'name',
    		'realname',
    		'age',
    		'hometown',
    		'geschl',
    		'mail',
    		'bestcod',
    		'bestmap',
    		'rules',
    		'ground',
    	);
    $x = 0;
    foreach ($far as $v) {
    	if (!empty($_POST[$v])) {
    		$$v = escape($_POST[$v], 'string');
    		$x++;
    	} else {
    		$$v = '';
    	}
    }
    
    $xname = escape_nickname($name);
    $ch_name = false;
    if (loggedin()) {
      $ch_name = true;
    } elseif (isset($_POST['sub']) AND $name == $xname AND !empty($name)
       AND 0 == db_result(db_query("SELECT COUNT(*) FROM prefix_user WHERE name = BINARY '".$name."'"),0)) {
      $ch_name = true;
    }
    
    if (count($far) <> $x OR $ch_name == false) {
    	$tpl = new tpl ( 'joinus.htm' );
    	$squad = dblistee ($squad, "SELECT id,name FROM prefix_groups WHERE show_joinus = 1 ORDER BY pos");
      if (loggedin()) { $name = $_SESSION['authname']; }
      foreach($far as $v) {
    		if ($x > 0 AND empty($_POST[$v])) {
    			echo 'Es fehlt: '.$lang[$v].'<br />';
    		}
    		$tpl->set ($v, $$v);
    	}
      if ($x > 0 AND $name != $xname) {
        echo $lang['wrongnickname'].'<br />';
      } elseif ($x > 0 AND $ch_name == false) {
        echo $lang['namealreadyinuse'].'<br />';
      }
      $name = $xname;
      $tpl->set('readonly', (loggedin()?' readonly': ''));
    	$tpl->out(0);
    } else { # eintragen
      
      $name = $xname;
    	$userreg = $lang['no'];
      if (!loggedin()) {
        $x = user_regist ($name,$mail,genkey(8));
        $userreg = $lang['yes'];
      }
    
      db_query("INSERT INTO prefix_usercheck (`check`,name,datime,ak) VALUES ('".genkey(8)."','".$name."',NOW(),4)");
    
      $squad = escape($squad, 'integer');
    	$abf   = "SELECT `mod1`, `mod2`, `mod4`, name FROM prefix_groups WHERE id = 1";
    	$erg   = db_query($abf);
    	$row   = db_fetch_assoc($erg);
      $rulz  = (isset($_POST['rules'])?$_POST['rules']:$lang['no']);
      $cod4 = (isset($_POST['cod4'])?$_POST['cod4']:$lang['no']);
      $cod5 = (isset($_POST['cod5'])?$_POST['cod5']:$lang['no']);
      $cod6 = (isset($_POST['cod6'])?$_POST['cod6']:$lang['no']);
      $cod7 = (isset($_POST['cod7'])?$_POST['cod7']:$lang['no']);
      $cod8 = (isset($_POST['cod8'])?$_POST['cod8']:$lang['no']);
      $sniper = (isset($_POST['sniper'])?$_POST['sniper']:$lang['no']);
      $ar = (isset($_POST['ar'])?$_POST['ar']:$lang['no']);
      $smg = (isset($_POST['smg'])?$_POST['smg']:$lang['no']);
      $lmg = (isset($_POST['lmg'])?$_POST['lmg']:$lang['no']);
      $sg = (isset($_POST['sg'])?$_POST['sg']:$lang['no']);
      $allr = (isset($_POST['allr'])?$_POST['allr']:$lang['no']);
      $so = (isset($_POST['so'])?$_POST['so']:$lang['no']);
      $yes = (isset($_POST['yes'])?$_POST['yes']:$lang['no']);
      
      # bitte in der richtigen reihenfolge angeben, sonst das nicht gehen tun, kann.
      $mailtxt = sprintf ($lang['joinusprivmsg'],
        $name,
        $realname,
    	$age,
    	$hometown,
    	$geschl,
    	$mail,
        $cod4,
    	$cod5,
    	$cod6,
    	$cod7,
    	$cod8,
    	$bestcod,
    	$bestmap,
    	$sniper,
    	$ar,
    	$smg,
    	$lmg,
    	$sg,
    	$allr,
    	$so,
    	$yes,
    	$rulz,
    	$ground
      );
      
      # pm an den leader  
    	sendpm ($_SESSION['authid'], $row['mod1'], 'Joinus Anfrage',$mailtxt, -1);
      # Wenn Co Leader != Leader
    	if ($row['mod2'] != $row['mod1']){
    		sendpm ($_SESSION['authid'], $row['mod2'], 'Joinus Anfrage',$mailtxt, -1);
    	}
    	if ($row['mod4'] != $row['mod1'] AND $row['mod2'] != $row['mod4']){
    		sendpm ($_SESSION['authid'], $row['mod4'], 'Joinus Anfrage',$mailtxt, -1);
    	}
    	
    	if (!loggedin() AND $allgAr['forum_regist'] <> 0) {
    		echo $lang['amailhasbeensenttoyouwithmailandpass'].'<br /><br />';
      }
      echo sprintf($lang['leaderofxalert'], $row['name']);
    }
    $design->footer();
    ?>


    Für eine schnelle Antwort wäre ich sehr dankbar.

    Mit freundlichen Grüßen

    HeaddyDaddy

    betroffene Homepage: team-silence.cwsurf.de
    0 Mitglieder finden den Beitrag gut.
Geschlossen

Zurück zu Fehlersuche und Probleme

Optionen: Bei einer Antwort zu diesem Thema eine eMail erhalten