ich habe das Joinus-Formular meinen Vorstellungen entsprechend angepasst. Es funktioniert nun auch schon fast komplett, allerdings gibt es einen kleinen Fehler.
Und zwar wird die Bewerbung per IGM an den Leader (=mich) versendet. Die Daten stimmen nun auch alle, außer ein Punkt:

Und zwar betrifft es den Punkt "Ausrichtung" in dem die Zahl 38 steht, obwohl diese garnicht einfügbar ist. Es kann nur zwischen "Defensiv", "Offensiv" und "Beides" ausgewählt werden.
Hier mein Formular:
/include/contents/joinus.php
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 | <?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 (); } $far = array ( 'name' , 'rules' , 'ingame' , 'mail' , 'icqnumber' , 'squad' , 'ground' , 'online' , 'age' , 'hometown' , 'frendsinally' , 'linktoprofil' , 'geschl' , 'variety' , 'mail' , 'nation' ); $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 = " . $squad ; $erg = db_query( $abf ); $row = db_fetch_assoc( $erg ); $rulz = (isset( $_POST [ 'rules' ])? $_POST [ 'rules' ]: $lang [ 'no' ]); # bitte in der richtigen reihenfolge angeben, sonst das nicht gehen tun, kann. $mailtxt = sprintf ( $lang [ 'joinusprivmsg' ], $name , $ingame , $linktoprofil , $online , $nation , $squad , $variety , $ground , $rulz , $frendsinally , $hometown , $age , $geschl , $icqnumber , $userreg , $mail ); # 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()) { echo $lang [ 'amailhasbeensenttoyouwithmailandpass' ]. '<br /><br />' ; } echo sprintf( $lang [ 'leaderofxalert' ], $row [ 'name' ]); } $design ->footer(); ?> |
/include/templates/joinus.htm
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 | <style type="text/css"> <!-- .Stil1 {font-weight: bold} --> </style> <form action="index.php?joinus" method="POST"> <fieldset> <legend> <br /> <b> </b> <h2>{_lang_joinustitel}</h2> <h3>{_lang_joinustitel2}</h3> <br /> <br /> </b> </legend> <label style="float:left; width:100px; "><i>{_lang_joininfo}:</i></label> <p><i>{_lang_plsfilloutallfields}</i></p> <p> </p> <b><h3>{_lang_yourdata}:</h3><br> <br /> <br /> </p> <label style="float:left; width:200px; ">{_lang_name}:</label><input name="name"{readonly} maxlength="15" value="{name}" /><br /> <label style="float:left; width:200px; ">{_lang_mail}</label><input type="text" name="mail" value="{mail}" /><br /> <label style="float:left; width:200px; ">{_lang_icqskype}</label><input type="text" name="icqnumber" value="{icqnumber}" /><br /> <label style="float:left; width:200px; ">{_lang_age}:</label><input type="text" name="age" value="{age}" /><br /> <label style="float:left; width:200px; ">{_lang_hometown}:</label><input type="text" name="hometown" value="{hometown}" /><br /> <label style="float:left; width:200px; ">{_lang_geschl}:</label><select name="geschl"> <option>männlich</option> {geschl} <option>weiblich</option> </select /> <br /> <span class="Stil1"><label style="float:left; width:100px; "> <br /> <br /> {_lang_joinustext}: </label> </span> <p><strong> <br /> </strong> </p> <p> </p> <p> <textarea name="ground" cols="70" rows="10">{ground}</textarea> <br> </p> </fieldset> <fieldset> <legend><b><h3>{_lang_charakterinfos}:</h3></b><br><br></legend> <label style="float:left; width:200px; ">{_lang_ingame}</label><input type="text" name="ingame" value="{ingame}" /><br /> <label style="float:left; width:200px; ">{_lang_onlinetime}</label><select name="online">{online} <option>Täglich 24/7</option> <option>Täglich Oft</option> <option>Täglich Mittel</option> <option>Täglich Wenig</option> <option>Jeden 2. Tag</option> <option>Jeden 3. Tag</option> <option>Am Wochenede</option> <option>Unterschiedlich</option> </select><br /> <label style="float:left; width:200px; ">{_lang_frendsinally}:</label><input type="text" name="frendsinally" value="{frendsinally}" /><br /><br /><br /> <label style="float:left; width:200px; ">{_lang_linktoprofil} :</label><input name="linktoprofil" type="text" value="{linktoprofil}" size="55" maxlength="100"/> <br /> {_lang_wedontneedlinktoourprofil} <a href="http://welt5.travian.de/dorf1.php" target="_blank"></a><br /> <br /><br /> <label style="float:left; width:200px; ">{_lang_squad}:</label><select name="squad">{squad}</select /><br /> <label style="float:left; width:200px; ">{_lang_volk}:</label><select name="nation"> <option>Römer</option> {nation} <option>Germane</option> <option>Gallier</option> </select /> <br /> <label style="float:left; width:200px; ">{_lang_variety}:</label><select name="variety"> <option>Ausgeglichen</option> {variety} <option>Passiv</option> <option>Aggressiv</option> </select /> <br> <br /> <br /> </fieldset> <fieldset> <legend><b><h3>{_lang_rules}:</h3></b> <br> </legend> <p> </p> <label style="float:left; width:100px; ">{_lang_rules}:</label><input type="checkbox" name="rules" value="{_lang_yes}" />{_lang_rulzreaded}<br /> <br /> <label style="float:left; width:100px; "> </label> <p> <input type="submit" name="sub" value="{_lang_formsub}" /> </p> <p> </p> <p>{_lang_joininfo1}</p> <p> </p> <p>{_lang_joininfo2}<br /> </p> </fieldset> </form> |
Würde mich freuen, wenn jemand eine Lösung hätte.
grüße,
Christian
verwendete ilchClan Version: 1.1
betroffene Homepage: externer Link
Zuletzt modifiziert von SystemX64 am 19.10.2009 - 17:17:09