Public feed #723385

Zeug

public text v1 · immutable
Raw Edit
·published 2007-10-02 19:29 UTC
rendered paste body
<?php 
#   Copyright by: Manuel Staechele
#   Support: www.ilch.de


defined ('main') or die ( 'no direct access' );

if ( !isset($_GET['step']) ) { $_GET['step'] = 1; }

if ( $allgAr['forum_regist'] == 0 ) {
  # user duerfen sich nicht registrieren.
	$title = $allgAr['title'].' :: Users :: Keine registrierung m&ouml;glich';
  $hmenu  = $extented_forum_menu.'<a class="smalfont" href="?user">User</a><b> &raquo; </b>Keine Registrierung m&ouml;glich'.$extented_forum_menu_sufix;
  $design = new design ( $title , $hmenu, 1);
  $design->header();
	$tpl = new tpl ( 'user/login' );
	echo '<b> Der Administrator hat festgelegt das man sich nicht registrieren kann </b>';
	$tpl->set_out('WDLINK','?'.$allgAr['smodul'],0);
	$design->footer();
  exit ();
}

switch ( $menu->get(2) ) {
  default :
	  $title = $allgAr['title'].' :: Users :: Registrieren :: Step 1 von 3';
    $hmenu  = $extented_forum_menu.'<a class="smalfont" href="?user">User</a><b> &raquo; </b><a class="smalfont" href="?user-regist">Registrieren</a><b> &raquo; </b>Step 1 von 3'.$extented_forum_menu_sufix;
    $design = new design ( $title , $hmenu, 1 );
    $design->header();
		$tpl = new tpl ( 'user/regist' );
		$tpl->set_out('regeln', bbcode($allgAr['allg_regeln']),0);
		$design->footer();
	  break;
	
	case 2 :
	  $name = '';
    $email = '';
	$geburtstag = '';
	$icq = '';
	$yahoo = '';
	$aim ='';
	$staat = '';
	$sig = '';
	$geschlecht ='';
	$msn = '';
    if (!empty($_POST['nutz'])) {
   	  $name = escape($_POST['nutz'],'string');
    }
	  if (!empty($_POST['staat'])) {
   	  $staat = escape($_POST['staat'],'string');
    }
    if (!empty($_POST['email'])) {
  		$email = escape($_POST['email'],'string');
    }
  	if (!empty($_POST['geburtstag'])) {
   	  $geburtstag = escape($_POST['geburtstag'],'string');
    }
  	if (!empty($_POST['icq'])) {
   	  $icq = escape($_POST['icq'],'string');
    }
	  if (!empty($_POST['msn'])) {
   	  $msn = escape($_POST['msn'],'string');
    }
	  if (!empty($_POST['yahoo'])) {
   	  $yahoo = escape($_POST['yahoo'],'string');
    }
	  if (!empty($_POST['aim'])) {
   	  $aim = escape($_POST['aim'],'string');
    }
	  if (!empty($_POST['sig'])) {
   	  $sig = escape($_POST['sig'],'string');
    }	
	  if (!empty($_POST['geschlecht'])) {
   	  $geschlecht = escape($_POST['geschlecht'],'string');
    }
	  if (!empty($_POST['opt_mail'])) {
   	  $opt_mail = escape($_POST['opt_mail'],'string');
    }
	  if (!empty($_POST['opt_pm'])) {
   	  $opt_pm = escape($_POST['opt_pm'],'string');
    }
	  if (!empty($_POST['opt_pm_popup'])) {
   	  $opt_pm_popup = escape($_POST['opt_pm_popup'],'string');
    }
    
    $ch_name = false;
    $xname = escape_nickname($name);
    if (!empty($name) AND $xname == $name AND 0 == db_result(db_query("SELECT COUNT(*) FROM prefix_user WHERE name = BINARY '".$name."'"),0)) {
      $ch_name = true;
    }
    $erg = db_query('SELECT name FROM prefix_user');
    while ($row = db_fetch_assoc($erg)) if (strcasecmp($row['name'],$name) == 0) $ch_name = false;
    
    $blockedname = array('Horensohn', 'Arschloch');
      foreach ($blockedname as $bn) {
       if (strcasecmp($bn,$name) == 0) $ch_name = false;
      }
    
    if ( empty($name) OR empty($email) OR $name != $xname OR $ch_name == false ) {
      $title = $allgAr['title'].' :: Users :: Registrieren :: Step 2 von 3';
      $hmenu  = $extented_forum_menu.'<a class="smalfont" href="?user">User</a><b> &raquo; </b><a class="smalfont" href="?user-regist">Registrieren</a><b> &raquo; </b>Step 2 von 3'.$extented_forum_menu_sufix;
      $design = new design ( $title , $hmenu, 1);
	    $design->header();
		  if (empty($name) OR empty($email)) {
		    $fehler = $lang['yourdata'];
		  } elseif ($name != $xname) {
        $fehler = $lang['wrongnickname'];
      } elseif ($ch_name == false) {
		    $fehler = $lang['namealreadyinuse'];
		  }
  		$tpl = new tpl ( 'user/regist' );
  		if($geschlecht == 2){
  		$geschlecht2 = 'geschlecht2';
  		}
  		elseif ($geschlecht == 1) {
  		$geschlecht2 = 'geschlecht1';
  		}
  		elseif ($geschlecht == 0) {
  		$geschlecht2 = 'geschlecht0';
  		}
  		
  		if($opt_mail == '1'){
  		$opt_mail2 = 'opt_mail1';
  		}
  		else{
  		$opt_mail2 = 'opt_mail0';
  		}
  		
  		if($opt_pm == '1'){
  		$opt_pm2 = 'opt_pm1';
  		}
  		else{
  		$opt_pm2 = 'opt_pm0';
  		}
  		
  		if($opt_pm_popup == '1'){
  		$opt_pm_popup2 = 'opt_pm_popup1';
  		}
  		else{
  		$opt_pm_popup2 = 'opt_pm_popup0';
  		}
      $tpl->set('name', $name);
  	  $tpl->set('staat', $staat);
  	  $tpl->set('geburtstag', $geburtstag);
  	  $tpl->set('icq', $icq);
  	  $tpl->set('msn', $msn);
  	  $tpl->set('yahoo', $yahoo);
  	  $tpl->set('aim', $aim);
  	  $tpl->set($geschlecht2, 'checked="checked"');
  	  $tpl->set($opt_mail2, 'checked="checked"');
  	  $tpl->set($opt_pm2, 'checked="checked"');
  	  $tpl->set($opt_pm_popup2, 'checked="checked"');
      $tpl->set('email', $email);
	  	$tpl->set_out('FEHLER', $fehler, 1);
		  if ( $allgAr['forum_regist_user_pass'] == 1 ) {
		    $tpl->out(2);
		  }
		  $tpl->out(3);
    } else {
	  	$pass = genkey(8);
      if (!empty($_POST['pass'])) {
        $pass = escape($_POST['pass'], 'string');
      }      
      user_regist ($name,$email,$pass,$staat,$geschlecht,$geburtstag,$icq,$msn,$yahoo,$aim,$opt_mail,$opt_pm,$opt_pm_popup);

      $tpl = new tpl ('user/regist' );
  		$title = $allgAr['title'].' :: Users :: Registrieren :: Step 3 von 3';
      $hmenu  = $extented_forum_menu.'<a class="smalfont" href="?user">User</a><b> &raquo; </b><a class="smalfont" href="?user-regist">Registrieren</a><b> &raquo; </b>Step 3 von 3'.$extented_forum_menu_sufix;
      $design = new design ( $title , $hmenu, 1);
		  $design->header();
		  $tpl->set_out ( 'NAME', $name, 4 );
    }
		$design->footer();
	  break;
}
?>



<!-- REGELN -->
<form action="index.php?user-regist-2" method="POST">

{_lang_attentionplease}:
<br />
{regeln}


<br /><br /><input type="submit" value="{_lang_readandok}" name="Yes">

</form>
{EXPLODE}
<form action="index.php?user-regist-2" method="POST">
<input type="hidden" value="Gelesen und einverstanden" name="checked">
	<table width="100%" border="0" cellspacing="1" cellpadding="3" class="border">
    <tr class="Chead"> 
    <th colspan="2"><b>{_lang_REGISTER}</b></th>
  </tr><tr>
	<td colspan="2" class="Cdark">{FEHLER}</td>
	</tr><tr>
          <td class="Cmite" width="60">{_lang_nickname}</td>
					<td class="Cnorm"><input type="text" name="nutz" value="{name}" maxlength="15"></td>
        </tr>
		<tr>
          <td class="Cmite">{_lang_mail}</td>
					<td class="Cnorm"><input type="text" maxlength="100" value="{email}" name="email"></td>
        </tr>{EXPLODE}<tr>
          <td class="Cmite">{_lang_password}</td>
					<td class="Cnorm"><input type="password" name="pass"></td>
        </tr>{EXPLODE}
        <tr>
	<td colspan="2" class="Cdark">Zusätzliche Daten <a class="infobox" href="#INFO"><img src="include/images/icons/note.gif" border="0"  /><span>Diese Daten müssen nicht ausgefüllt werden!</span></a></td>
	</tr><tr class="Cmite">
          <td valign="top">Geschlecht</td>
          <td class="Cnorm"><span style=" font-size:12px">
		  <label>
          <input type="radio" name="geschlecht" value="0" {geschlecht0}/>
          K/A</label>
         <label>
          <input type="radio" name="geschlecht" value="1" {geschlecht1}/>
          m&auml;nnlich          </label>
          <label>
<input type="radio" name="geschlecht" value="2" {geschlecht2}/>
weiblich</label>
  
          </span></td>
        </tr><tr class="Cmite">
          <td>Geburtstag</td>
          <td class="Cnorm"><input name="geburtstag" type="text" id="geburtstag" value="{geburtstag}" maxlength="100" />
            &nbsp;&nbsp;&nbsp;&nbsp;Format: JJJJ-MM-TT (Jahr-Monat-Tag) </td>
        </tr><tr class="Cmite">
          <td>ICQ</td>
          <td class="Cnorm"><input name="icq" type="text" id="icq" value="{icq}" maxlength="100" />          </td>
        </tr><tr class="Cmite">
          <td>Msn</td>
          <td class="Cnorm"><input name="msn" type="text" id="msn" value="{msn}" maxlength="100" />          </td>
        </tr>
        <tr class="Cmite">
          <td>Yahoo</td>
          <td class="Cnorm"><input name="yahoo" type="text" id="yahoo" value="{yahoo}" maxlength="100" />          </td>
        </tr>
        <tr class="Cmite">
          <td>AIM</td>
          <td class="Cnorm"><input name="aim" type="text" id="aim" value="{aim}" maxlength="100" />          </td>
        </tr>
		<tr class="Cmite">
          <td>E-Mailkontakt erlauben</td>
          <td class="Cnorm"><span>
         <label>
          <input type="radio" name="opt_mail" value="1" {opt_mail1}/>Ja        </label>
          <label>
          <input type="radio" name="opt_mail" value="0" {opt_mail0}/>Nein</label>
  
          </span></td>
        </tr>
		<tr class="Cmite">
          <td>PM-Kontakt erlauben</td>
          <td class="Cnorm"><span>
         <label>
          <input type="radio" name="opt_pm" value="1" {opt_pm1}/>Ja        </label>
          <label>
          <input type="radio" name="opt_pm" value="0" {opt_pm0}/>Nein</label>
  
          </span></td>
        </tr>
		<tr class="Cmite">
          <td>Popup bei neuer PM</td>
          <td class="Cnorm"><span>
         <label>
          <input type="radio" name="opt_pm_popup" value="1" {opt_pm_popup1}/>Ja        </label>
          <label>
          <input type="radio" name="opt_pm_popup" value="0" {opt_pm_popup0}/>Nein</label>
  
          </span></td></tr><tr class="Cdark">
                    <td>Staat</td>
          <td class="Cnorm"><select style="margin-bottom:2px;" name="staat">
            <option value="Liechtenstein.gif">Liechtenstein</option>
            <option value="Albania.gif">Albania</option>
            <option value="Vatican.gif">Vatican</option>
            <option value="Yugoslavia.gif">Yugoslavia</option>
            <option value="Austria.gif">Austria</option>
            <option value="France.gif">France</option>
            <option value="Hungary.gif">Hungary</option>
            <option value="Armenia.gif">Armenia</option>
            <option value="Germany.gif" selected="selected">Germany</option>
            <option value="Sweden.gif">Sweden</option>
            <option value="Turkey.gif">Turkey</option>
            <option value="Island.gif">Island</option>
            <option value="Yemen.gif">Yemen</option>
            <option value="Netherlands.gif">Netherlands</option>
            <option value="Croatia.gif">Croatia</option>
            <option value="Romania.gif">Romania</option>
            <option value="Greenland.gif">Greenland</option>
            <option value="Greece.gif">Greece</option>
            <option value="Estonia.gif">Estonia</option>
            <option value="Canada.gif">Canada</option>
            <option value="Italy.gif">Italy</option>
            <option value="Switzerland.gif">Switzerland</option>
            <option value="Finland.gif">Finland</option>
            <option value="USA.gif">USA</option>
            <option value="Russia.gif">Russia</option>
            <option value="Latvia.gif">Latvia</option>
            <option value="Bulgaria.gif">Bulgaria</option>
            <option value="Slovenia.gif">Slovenia</option>
            <option value="Denmark.gif">Denmark</option>
            <option value="Belgium.gif">Belgium</option>
            <option value="Poland.gif">Poland</option>
            <option value="Luxembourg.gif">Luxembourg</option>
            <option value="Czech_Republic.gif">Czech Republic</option>
            <option value="Portugal.gif">Portugal</option>
            <option value="Slovak_Republic.gif">Slovak-Republic</option>
            <option value="Israel.gif">Israel</option>
            <option value="Spain.gif">Spain</option>
            <option value="Norway.gif">Norway</option>
            <option value="Great_Britain.gif">Great Britain</option>
            <option value="Ukraina.gif">Ukraina</option>
            <option value="Ireland.gif">Ireland</option>
            <option value="Monaco.gif">Monaco</option>
          </select>          </td>
        </tr><tr class="Cdark">
          <td></td>
					<td><input type="submit" value="{_lang_register}"></td>
        </tr>
      </table>
</form>
{EXPLODE}
{_lang_hello} {NAME}<br>

{_lang_yourregistrationwassuccessful}!<br><br>
{_lang_amailhasbeensenttoyouwithmailandpass}!<br><br>
{_lang_afteryoureceivedthemail} <a href="index.php?user-2">{_lang_login2}</a>