Ist es möglich bei der Regestrierung Pflichtfelder mit anzugeben ? Wenn das geht , in welcher Datei oder wie macht man das ? Danke an alle die da schon eine Idee hätten.
Griaßle: Hari
Hier kann eine Notiz zum Merk-Eintrag hinzugefügt werden (optional)
Geschlossen |
if ( $ch_name == false OR empty ($_POST['ort']) OR empty($_POST['email']) OR empty($_POST['alter']) OR empty($_POST['favmap']) OR empty($_POST['icq']) OR empty($_POST['koen']) OR empty($_POST['name']) OR empty($_POST['char']) OR empty($_POST['galaxie']) OR empty($_POST['cl']) OR empty($_POST['fraktion']) ) { $_POST['squad'] = ( empty ($_POST['squad']) ? '' : $_POST['squad'] ); $_POST['name'] = ( empty ($_POST['name']) ? '' : $_POST['name'] ); $_POST['icq'] = ( empty ($_POST['icq']) ? '' : $_POST['icq'] ); $_POST['favmap'] = ( empty ($_POST['favmap']) ? '' : $_POST['favmap'] ); $_POST['email'] = ( empty ($_POST['email']) ? '' : $_POST['email'] ); $_POST['alter'] = ( empty ($_POST['alter']) ? '' : $_POST['alter'] ); $_POST['ort'] = ( empty ($_POST['ort']) ? '' : $_POST['ort'] ); $_POST['koen'] = ( empty ($_POST['koen']) ? '' : $_POST['koen'] ); $_POST['char'] = ( empty ($_POST['char']) ? '' : $_POST['char'] ); $_POST['galaxie'] = ( empty ($_POST['galaxie']) ? '' : $_POST['galaxie'] ); $_POST['cl'] = ( empty ($_POST['cl']) ? '' : $_POST['cl'] ); $_POST['fraktion'] = ( empty ($_POST['fraktion']) ? '' : $_POST['fraktion'] ); if ( empty ($fehler) ) { $fehler = ''; } if ( ! empty ($_POST['squad']) ) { $fehler .= '<br /><font color="#FF0000">Fehler:</font><br />'; if (!$ch_name) { $fehler .= '- Der Name ist schon vergeben, bitte einen anderen wählen<br />'; } if ( empty ($_POST['name']) ) { $fehler .= '- Bitte deinen Namen eingeben<br />'; } if ( empty ($_POST['icq']) ) { $fehler .= '- Bitte eine ICQ Nummer eingeben<br />'; } if ( empty ($_POST['favmap']) ) { $fehler .= '- Bitte deine Fav. Map eingeben<br />'; } if ( empty ($_POST['email']) ) { $fehler .= '- Bitte eine E-Mail eingeben<br />'; } if ( empty ($_POST['alter']) ) { $fehler .= '- Bitte dein Alter eingeben<br />'; } if ( empty ($_POST['ort']) ) { $fehler .= '- Bitte einen Wohnort eingeben<br />'; } if ( empty ($_POST['char']) ) { $fehler .= '- Bitte einen Charakternamen eingeben<br />'; } if ( empty ($_POST['galaxie']) ) { $fehler .= '- Bitte deine Galaxie (Server) eingeben<br />'; } if ( empty ($_POST['cl']) ) { $fehler .= '- Bitte deinen Combatlevel eingeben<br />'; } if ( empty ($_POST['fraktion']) ) { $fehler .= '- Bitte deine Fraktion eingeben<br />'; } } else { $fehler = ''; }
<?php # Copyright by: Manuel # 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öglich'; $hmenu = $extented_forum_menu.'<a class="smalfont" href="?user">User</a><b> » </b>Keine Registrierung mö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> » </b><a class="smalfont" href="?user-regist">Registrieren</a><b> » </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 = ''; $vorname = ''; $nachname = ''; $ort = ''; $geburtstag = ''; $postleitzahl = ''; $icq = ''; $yahoo = ''; $aim =''; $stadt = ''; $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['vorname'])) { $vorname = escape($_POST['vorname'],'string'); } if (!empty($_POST['nachname'])) { $nachname = escape($_POST['nachname'],'string'); } if (!empty($_POST['stadt'])) { $stadt = escape($_POST['stadt'],'string'); } if (!empty($_POST['postleitzahl'])) { $postleitzahl = escape($_POST['postleitzahl'],'string'); } if (!empty($_POST['ort'])) { $ort = escape($_POST['ort'],'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'); } //neu yahoo, aim, staat, geschlecht, opt_mail, opt_pm, opt_pm_popup, sig 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; if ( empty($name) OR empty($vorname) OR empty($nachname) OR empty($ort) OR empty($postleitzahl) OR empty($stadt) OR empty($staat) 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> » </b><a class="smalfont" href="?user-regist">Registrieren</a><b> » </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('vorname', $vorname); $tpl->set('nachname', $nachname); $tpl->set('ort', $ort); $tpl->set('postleitzahl', $postleitzahl); $tpl->set('stadt', $stadt); $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,$vorname,$nachname,$ort,$postleitzahl,$stadt,$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> » </b><a class="smalfont" href="?user-regist">Registrieren</a><b> » </b>Step 3 von 3'.$extented_forum_menu_sufix; $design = new design ( $title , $hmenu, 1); $design->header(); $tpl->set_out ( 'NICKNAME', $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">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 class="Cdark"> <td colspan="2">Deine Real-Daten <a class="infobox" href="#INFO"><img src="include/images/icons/note.gif" border="0" /><span>Diese Daten sehen nur die Admins!</span></a></td> </tr><tr class="Cmite"> <td>Vorname</td> <td class="Cnorm"> <input name="vorname" type="text" id="vorname" value="{vorname}" maxlength="100" /> </td> </tr> <tr class="Cmite"> <td>Nachname</td> <td class="Cnorm"> <input name="nachname" type="text" id="nachname" value="{nachname}" maxlength="100" /></td> </tr><tr class="Cmite"> <td>Straße und Hausnummer</td> <td class="Cnorm"> <input name="ort" type="text" id="ort" value="{ort}" maxlength="100" /> </td> </tr> <tr class="Cmite"> <td>Postleitzahl</td> <td class="Cnorm"> <input name="postleitzahl" type="text" id="postleitzahl" value="{postleitzahl}" maxlength="100" /> </td> </tr> <tr class="Cmite"> <td>Stadt</td> <td class="Cnorm"> <input name="stadt" type="text" id="stadt" value="{stadt}" maxlength="100" /> </td> </tr><tr class="Cmite"> <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> <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ä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" /> 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></td> <td><input type="submit" value="{_lang_register}"></td> </tr> </table> </form> {EXPLODE} {_lang_hello} {NICKNAME}<br> {_lang_yourregistrationwassuccessful}!<br><br> {_lang_amailhasbeensenttoyouwithmailandpass}!<br><br> {_lang_afteryoureceivedthemail} <a href="index.php?user-2">{_lang_login2}</
<?php # Copyright by: Manuel # Support: www.ilch.de defined ('main') or die ( 'no direct access' ); $title = $allgAr['title'].' :: User :: Confirm'; $hmenu = $extented_forum_menu.'<a class="smalfont" href="?user">User</a><b> » </b>Confirm'.$extented_forum_menu_sufix; $design = new design ( $title , $hmenu, 1); $design->header(); $abgelaufen = time() - 2592000; # 30 tage $abgelaufen = date('Y-m-d H:i:s',$abgelaufen); db_query("DELETE FROM prefix_usercheck WHERE datime < '".$abgelaufen."'"); $erg = db_query("SELECT * FROM prefix_usercheck WHERE `check` = '".escape($_GET['check'], 'string')."'"); if ( db_num_rows($erg) == 1 ) { $row = db_fetch_assoc($erg); switch ( $row['ak'] ) { # confirm regist case 1 : if ( 0 == db_count_query("SELECT COUNT(*) FROM prefix_user WHERE name = BINARY '".$row['name']."'") ) { db_query("INSERT INTO prefix_user (name,pass,recht,regist,llogin,email,status,opt_mail,opt_pm,opt_pm_popup,vorname,nachname,wohnort,postleitzahl,stadt,staat,geschlecht,gebdatum,icq,msn,yahoo,aim) VALUES('".$row['name']."','".$row['pass']."',-1,'".time()."','".time()."','".$row['email']."',1,'".$row['opt_mail']."','".$row['opt_pm']."','".$row['opt_pm_popup']."','".$row['vorname']."','".$row['nachname']."','".$row['ort']."','".$row['postleitzahl']."','".$row['stadt']."','".$row['staat']."','".$row['geschlecht']."','".$row['gebdatum']."','".$row['icq']."','".$row['msn']."','".$row['yahoo']."','".$row['aim']."')"); echo $lang['confirmregist']; } else { echo $lang['confirmregistfailed']; } break; # confirm new pass case 2 : db_query("UPDATE prefix_user SET pass = '".$row['pass']."' WHERE name = BINARY '".$row['name']."'"); echo $lang['confirmpassword']; break; # confirm new email case 3 : list ($id, $muell) = explode('||', $row['check']); db_query("UPDATE prefix_user SET email = '".$row['email']."' WHERE id = ". escape($id, 'integer')); echo $lang['confirmemail']; break; # ak 4 wurde besetzt fuer joinus anfragen... case 4 : break; } db_query("DELETE FROM prefix_usercheck WHERE `check` = '".$row['check']."'"); } else { echo $lang['confirmfailure']; } $design->footer(); ?>
function check() { var email=document.form1.eemail.value, nutz=document.form1.nutz.value; var cmail="",cnutz=""; if (email!="") { if (document.form1.eemail.value.indexOf('@',0)==-1 || document.form1.eemail.value.indexOf('.',0)==-1) cmail="Die eingegebene E-Mail Adresse ist nicht korrekt!\n"; } else var cmail="Du hast keine E-Mail Adresse angegeben!\n"; if (nutz=="") var cnutz="Du hast keinen Nickname eingegeben!\n"; if (cmail!="" || cnutz!=""){ alert(cmail+cnutz) return false; } else return true; }
-- -- Tabellenstruktur für Tabelle `prefix_user` -- CREATE TABLE `prefix_user` ( `id` int(10) unsigned NOT NULL auto_increment, `name` varchar(50) collate latin1_general_ci NOT NULL default '', `pass` varchar(32) collate latin1_general_ci NOT NULL default '', `recht` int(1) NOT NULL default '0', `posts` int(5) NOT NULL default '0', `regist` int(20) default NULL, `email` varchar(100) collate latin1_general_ci NOT NULL default '', `llogin` int(20) default NULL, `spezrank` mediumint(9) NOT NULL default '0', `opt_pm` tinyint(1) NOT NULL default '0', `opt_pm_popup` tinyint(1) NOT NULL default '0', `opt_mail` tinyint(1) NOT NULL default '0', `status` tinyint(1) NOT NULL default '0', `geschlecht` tinyint(1) NOT NULL default '0', `gebdatum` date NOT NULL default '0000-00-00', `wohnort` varchar(50) collate latin1_general_ci NOT NULL default '', `homepage` varchar(100) collate latin1_general_ci NOT NULL default '', `staat` varchar(50) collate latin1_general_ci NOT NULL default '', `avatar` varchar(100) collate latin1_general_ci NOT NULL default '', `icq` varchar(20) collate latin1_general_ci NOT NULL default '', `msn` varchar(50) collate latin1_general_ci NOT NULL default '', `yahoo` varchar(50) collate latin1_general_ci NOT NULL default '', `aim` varchar(50) collate latin1_general_ci NOT NULL default '', `sig` text collate latin1_general_ci NOT NULL, `vorname` varchar(100) collate latin1_general_ci NOT NULL default '', `nachname` varchar(100) collate latin1_general_ci NOT NULL default '', `stadt` varchar(100) collate latin1_general_ci NOT NULL default '', `postleitzahl` varchar(100) collate latin1_general_ci NOT NULL default '', PRIMARY KEY (`id`) ) ENGINE=MyISAM COMMENT='powered by ilch-community.de' AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Tabellenstruktur für Tabelle `prefix_usercheck` -- CREATE TABLE `prefix_usercheck` ( `check` varchar(100) collate latin1_general_ci NOT NULL default '', `name` varchar(100) collate latin1_general_ci NOT NULL default '', `email` varchar(100) collate latin1_general_ci NOT NULL default '', `pass` varchar(100) collate latin1_general_ci NOT NULL default '', `datime` datetime NOT NULL default '0000-00-00 00:00:00', `ak` tinyint(4) NOT NULL default '0', `groupid` tinyint(4) NOT NULL default '0', `vorname` varchar(100) collate latin1_general_ci NOT NULL default '', `nachname` varchar(100) collate latin1_general_ci NOT NULL default '', `ort` varchar(50) collate latin1_general_ci NOT NULL default '', `postleitzahl` varchar(100) collate latin1_general_ci NOT NULL default '', `stadt` varchar(100) collate latin1_general_ci NOT NULL default '', `icq` varchar(20) collate latin1_general_ci NOT NULL default '', `msn` varchar(50) collate latin1_general_ci NOT NULL default '', `yahoo` varchar(50) collate latin1_general_ci NOT NULL default '', `aim` varchar(50) collate latin1_general_ci NOT NULL default '', `opt_mail` tinyint(1) NOT NULL default '0', `opt_pm` tinyint(1) NOT NULL default '0', `opt_pm_popup` tinyint(1) NOT NULL default '0', `geschlecht` tinyint(1) NOT NULL default '0', `gebdatum` date NOT NULL default '0000-00-00', `staat` varchar(50) collate latin1_general_ci NOT NULL default '', PRIMARY KEY (`check`) ) ENGINE=MyISAM COMMENT='powered by ilch-community.de'; -- --------------------------------------------------------
# 18.12.2007 - 17:08:39 Zitieren hier bitte nicht getestet also backup!!! /include/contents/user/regist.php Code: User » Keine Registrierung möglich'.$extented_forum_menu_sufix; $design = new design ( $title , $hmenu, 1); $design->header(); $tpl = new tpl ( 'user/login' ); echo ' Der Administrator hat festgelegt das man sich nicht registrieren kann '; $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.'User » Registrieren » 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 = ''; $vorname = ''; $nachname = ''; $ort = ''; $geburtstag = ''; $postleitzahl = ''; $icq = ''; $yahoo = ''; $aim =''; $stadt = ''; $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['vorname'])) { $vorname = escape($_POST['vorname'],'string'); } if (!empty($_POST['nachname'])) { $nachname = escape($_POST['nachname'],'string'); } if (!empty($_POST['stadt'])) { $stadt = escape($_POST['stadt'],'string'); } if (!empty($_POST['postleitzahl'])) { $postleitzahl = escape($_POST['postleitzahl'],'string'); } if (!empty($_POST['ort'])) { $ort = escape($_POST['ort'],'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'); } //neu yahoo, aim, staat, geschlecht, opt_mail, opt_pm, opt_pm_popup, sig 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; if ( empty($name) OR empty($vorname) OR empty($nachname) OR empty($ort) OR empty($postleitzahl) OR empty($stadt) OR empty($staat) OR empty($email) OR $name != $xname OR $ch_name == false ) { $title = $allgAr['title'].' :: Users :: Registrieren :: Step 2 von 3'; $hmenu = $extented_forum_menu.'User » Registrieren » 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('vorname', $vorname); $tpl->set('nachname', $nachname); $tpl->set('ort', $ort); $tpl->set('postleitzahl', $postleitzahl); $tpl->set('stadt', $stadt); $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,$vorname,$nachname,$ort,$postleitzahl,$stadt,$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.'User » Registrieren » Step 3 von 3'.$extented_forum_menu_sufix; $design = new design ( $title , $hmenu, 1); $design->header(); $tpl->set_out ( 'NICKNAME', $name, 4 ); } $design->footer(); break; } ?> /include/templates/user/regist.htm Code: Bitte beachten: * Die Registrierung ist völlig Kostenlos * Die Betreiber der Seite übernehmen keine Haftung. * Bitte verhalten Sie sich angemessen und mit Respekt gegenüber den anderen Community Mitgliedern. Bitte fühlt die Profilfelder so weit wie möglich aus,das man bissl was von euch erfahren. Danke Scheen
-- -- Tabellenstruktur für Tabelle ` E U R E P R E F I X _user` -- CREATE TABLE IF NOT EXISTS ` ic1 _user` ( `name` varchar(100) NOT NULL, `email` varchar(100) NOT NULL, `pass` varchar(100) NOT NULL, `vorname` varchar(100) NOT NULL, `geburtstag` date NOT NULL default '0000-00-00', `msn` varchar(40) NOT NULL, `skype` varchar(50) NOT NULL, `icq` varchar(20) NOT NULL, `opt_mail` varchar(2) NOT NULL, `opt_pm` varchar(2) NOT NULL, `opt_pm_popup` varchar(2) NOT NULL, `sig` text NOT NULL, TYPE=MyISAM COMMENT='powered by ilch.de';
<script type="text/javascript"> function checkForm() { var strFehler=''; if (document.forms[0].str.value=="") strFehler += "Strasse\n"; if (document.forms[0].hnr.value=="") strFehler += "Hausnummer\n"; if (document.forms[0].plz.value.length<5) strFehler += "Postleitzahl\n"; if (document.forms[0].ort.value.length<1) strFehler += "Ort\n"; if (strFehler.length>0) { alert("Bitte kontrollieren Sie folgende Eingaben: \n\n"+strFehler); return(false); } }
onsubmit='return checkForm()'
Geschlossen | ||
Zurück zu Kritik und Verbesserungen |