habe es versucht funtz aber nicht er verweist mich immer aufs Admin menu
kann mir mal bitte einer dabei helfen wenn es geht meine icq ist 357878942
<?php # Copyright by: Nero $title = $allgAr['title'].' :: GwBuilds'; $hmenu = 'GwBuilds'; $design = new design ( $title , $hmenu ); $design->header(); ## ### #### ##### A k t i o n e n 1 & F u n k t i o n e n if(!isset($_POST['reg'])){ $_POST['reg'] = false; } if(!isset($_POST['killreg'])){ $_POST['killreg'] = false; } if(!isset($_POST['del'])){ $_POST['del'] = false; } $uptatecheck = true; //ein paar Variabeln definieren $row2['skillv0'] = '<option id="icons/choose.jpg" value=""> Bitte Wählen </option>'; $row2['skillv1'] = '<option id="icons/choose.jpg" value=""> Bitte Wählen </option>'; $row2['skillv2'] = '<option id="icons/choose.jpg" value=""> Bitte Wählen </option>'; $row2['skillv3'] = '<option id="icons/choose.jpg" value=""> Bitte Wählen </option>'; $row2['skillv4'] = '<option id="icons/choose.jpg" value=""> Bitte Wählen </option>'; $row2['skillv5'] = '<option id="icons/choose.jpg" value=""> Bitte Wählen </option>'; $row2['skillv6'] = '<option id="icons/choose.jpg" value=""> Bitte Wählen </option>'; $row2['skillv7'] = '<option id="icons/choose.jpg" value=""> Bitte Wählen </option>'; $row2['skillv8'] = '<option id="icons/choose.jpg" value=""> Bitte Wählen </option>'; $row2['skillv9'] = '<option id="icons/choose.jpg" value=""> Bitte Wählen </option>'; $row2['skillv10'] = '<option id="icons/choose.jpg" value=""> Bitte Wählen </option>'; $row2['picture0'] = 'icons/choose.jpg'; $row2['picture1'] = 'icons/choose.jpg'; $row2['picture2'] = 'icons/choose.jpg'; $row2['picture3'] = 'icons/choose.jpg'; $row2['picture4'] = 'icons/choose.jpg'; $row2['picture5'] = 'icons/choose.jpg'; $row2['picture6'] = 'icons/choose.jpg'; $row2['picture7'] = 'icons/choose.jpg'; $row2['picture8'] = 'icons/choose.jpg'; $row2['picture9'] = 'icons/choose.jpg'; $row2['picture10'] = 'icons/choose.jpg'; $gallerpict = 'icons/chooseb.jpg'; $gallerypictname = '<option id="icons/chooseb.jpg" value=""> Bitte Wählen </option>'; $nene = ''; $display1 = '*Primärklasse: <select name="charr1up" onChange="var sel1 = selectWert(document.form.charr1up);show1(sel1);this.form.atri1up.value=shows1;" size="1"><option value="">Bitte Wählen</option><option value="Assassin" >Assassin</option><option value="Elementarmagier">Elementarmagier</option><option value="Krieger">Krieger</option><option value="Mesmer">Mesmer</option><option value="Monk">Monk</option><option value="Nekro">Nekro</option><option value="Ritualist">Ritualist</option><option value="Waldläufer">Waldläufer</option></select>'; $display2 = '*Sekundärklasse: <select name="charr2up" onChange="var sel2 = selectWert(document.form.charr2up);show2(sel2);this.form.atri2up.value=shows2;" size="1"><option value="">Bitte Wählen</option><option value="Assassin">Assassin</option><option value="Elementarmagier">Elementarmagier</option><option value="Krieger">Krieger</option><option value="Mesmer">Mesmer</option><option value="Monk">Monk</option><option value="Nekro">Nekro</option><option value="Ritualist">Ritualist</option><option value="Waldläufer">Waldläufer</option></select>'; $wasmachen = 'Skills auswählen'; //funktion für die Skills aus der datenbank rauszulesen function skchose($SkChid,$Skid=false) { $skills = ''; $abf1 = "SELECT * FROM prefix_gwskills WHERE skillcharid = ".$SkChid; $erg1 = db_query($abf1); while($row = db_fetch_assoc($erg1)) { if($Skid <> $row['id']OR !$Skid){ $skills .= '<option id="'.$row['url'].'" value="'.$row['id'].'">'.$row['name'].'</option>'; } } return $skills; } function Skidchose($Skid,$SkChid1,$SkChid2,$chekit = false){ $fskill = ''; $abf1 = "SELECT * FROM prefix_gwskills WHERE id = ".$Skid; $erg1 = db_query($abf1); $fskill = db_fetch_object($erg1); if($fskill->skillcharid == $SkChid1 OR $fskill->skillcharid == $SkChid2){ $fskill = '<option id="'.$fskill->url.'" value="'.$fskill->id.'">'.$fskill->name.'</option>'; if($chekit>8){ $fskill .= '<option id="icons/choose.jpg" value=""> Zurück setzen </option>'; } $fskill .= skchose($SkChid1,$Skid); $fskill .= skchose($SkChid2,$Skid); }else{ $fskill = '<option id="icons/choose.jpg" value=""> Bitte Wählen </option>'; $fskill .= skchose($SkChid1); $fskill .= skchose($SkChid2); } return $fskill; } function pictchoose($Skid,$SkChid1,$SkChid2){ $fpicture = ''; $abf1 = "SELECT * FROM prefix_gwskills WHERE id = ".$Skid; $erg1 = db_query($abf1); $fpicture = db_fetch_object($erg1); if($fpicture->skillcharid == $SkChid1 OR $fpicture->skillcharid == $SkChid2){ $fpicture = $fpicture->url; }else{ $fpicture = 'icons/choose.jpg'; } return $fpicture; } function gallerypictchoose($Skid,$SkChid1){ $fpicture = ''; $abf1 = "SELECT * FROM prefix_gwgallery_imgs WHERE id = ".$Skid; $erg1 = db_query($abf1); $fpicture = db_fetch_object($erg1); if($fpicture->cat == $SkChid1){ $fpicture = 'gwgallery/img_thumb_'.$fpicture->id.'.'.$fpicture->endung; }else{ $fpicture = 'icons/chooseb.jpg'; } return $fpicture; } function gallerypicttake($SkChid,$Skid=false) { $skills = ''; $abf1 = "SELECT * FROM prefix_gwgallery_imgs WHERE cat = ".$SkChid; $erg1 = db_query($abf1); while($row = db_fetch_assoc($erg1)) { if($Skid <> $row['id']OR !$Skid){ $skills .= '<option id="gwgallery/img_thumb_'.$row['id'].'.'.$row['endung'].'" value="'.$row['id'].'">'.$row['besch'].'</option>'; } } return $skills; } function gallerypictcontrol($Skid,$SkChid1){ $fskill = ''; $abf1 = "SELECT * FROM prefix_gwgallery_imgs WHERE id = ".$Skid; $erg1 = db_query($abf1); $fskill = db_fetch_object($erg1); if($fskill->cat == $SkChid1){ $fskill = '<option id="gwgallery/img_thumb_'.$fskill->id.'.'.$fskill->endung.'" value="'.$fskill->id.'">'.$fskill->besch.'</option>'; $fskill .= '<option id="icons/chooseb.jpg" value=""> Zurück setzen </option>'; $fskill .= gallerypicttake($SkChid1,$Skid); }else{ $fskill = '<option id="icons/chooseb.jpg" value=""> Bitte Wählen </option>'; $fskill .= gallerypicttake($SkChid1); } return $fskill; } ## ### #### ##### A k t i o n e n 2 $tpl = new tpl ( 'gwbuilds', 0 ); if($_POST['del']){ $abf1 = "SELECT * FROM prefix_gwbilds WHERE id = ".$_POST['Idchoos']; $erg1 = db_query($abf1); $name = db_fetch_object($erg1); $erstidif = $name->erstid; if($_SESSION['authright'] == -9 OR $erstidif == $_SESSION['authid']){ db_query('DELETE FROM `prefix_gwbild` WHERE id = "'.$_POST['Idchoos'].'" LIMIT 1'); db_query('DELETE FROM `prefix_gwbilds` WHERE id = "'.$_POST['Idchoos'].'" LIMIT 1'); wd('?gwbuilds','Erfolgreich gelöscht',3); }else{ echo 'Du hast kein recht dieses Build zu löschen!!'; } } elseif($_POST['reg']=== false OR $_POST['reg']== '1'){ $tpl->out(0); //Da les ich mir mal die Builds raus :P $erg = db_query("SELECT * FROM `prefix_gwbilds` "); if(mysql_num_rows($erg)){ while($row = db_fetch_assoc($erg)){ $name = $row['name']; $id = $row['id']; $ar = array ( 'input' => $name, 'id' => $id ); $tpl->set_ar_out($ar,1); } } $tpl->out(2); // -----So da ist Standart dingsbums------------- if($_POST['killreg'] === false ){ // -----Hier holt ich mir von der user datenbank den Namen des Users------- $erg1 = db_query("SELECT * FROM `prefix_user` WHERE id = " .$_SESSION['authid'] ); while($row = db_fetch_assoc($erg1)) { //ein paar Variabeln definieren $rows['name'] = ''; $rows['erst'] = ''; $rows['charr1'] = ''; $rows['charr2'] = ''; $rows['atri1'] = ''; $rows['atri2'] = ''; $rows['text'] = ''; $rows['skill1'] = ''; $rows['skill2'] = ''; $rows['skill3'] = ''; $rows['skill4'] = ''; $rows['skill5'] = ''; $rows['skill6'] = ''; $rows['skill7'] = ''; $rows['skill8'] = ''; $rows['skill9'] = ''; $rows['skill10'] = ''; $rows['skill11'] = ''; $rows['uptate'] = ''; $rows['id'] = ''; $rows['gallerybild'] =''; $rows['reg'] = '1'; $rows['display1'] = $display1; $rows['display2'] = $display2; $rows['wasmachen'] = $wasmachen; $rows['erstid'] = $_SESSION['authid']; $rows['hidden'] = 'hidden'; $rows['erst'] = $row['name']; $rows['formchek'] = 'chek1'; $rows['SMILIES'] = getsmilies(); //Hier beginen die sachen, welche zum editiern gebraucht werden ;) if($_POST['reg']== 1 AND $_POST['killreg'] === false){ //Da wird überbruft ob der user es editieren darf oder nicht, Admin darf alles !! $abf1 = "SELECT * FROM prefix_gwbilds WHERE id = ".$_POST['Idchoos']; $erg1 = db_query($abf1); $name = db_fetch_object($erg1); $erstidif = $name->erstid; if($_SESSION['authright'] == -9 OR $erstidif == $_SESSION['authid']){ $erg1 = db_query("SELECT * FROM `prefix_gwbild` WHERE id = " .$_POST['Idchoos'] ); while($row = db_fetch_assoc($erg1)) { $rows['text'] = escape_for_fields(unescape($row['txt'])); $rows['atri1'] = $row['atribute1']; $rows['atri2'] = $row['atribute2']; $rows['name'] = $name->name; $rows['erst'] = $row['erst']; $rows['charr1'] = $row['charr1']; $rows['charr2'] = $row['charr2']; $rows['hidden'] = 'text'; $rows['uptate'] = 'uptotate1'; $rows['id'] = $row['id']; $rows['reg'] = '1'; $rows['formchek'] = 'chek1'; $rows['gallerybild'] = ''; $rows['display1'] = $display1; $rows['display2'] = $display2; $rows['wasmachen'] = $wasmachen; } }else{ //hier ist die Fehlermeldung wenn jemand etwas nicht editieren darf, Admin darf immer noch alles ! $nene = 'Nene, Verändern des Builds von einem anderen User ist Verboten! Nur der Admin darf das :P'; $nene .='<SCRIPT LANGUAGE="JavaScript" SRC="include/includes/js/gwfunction.js"></SCRIPT>'; $uptatecheck = false; } } } if($uptatecheck){ $tpl->set_ar_out($rows,3); } } if($_POST['killreg'] == 1 AND $_POST['reg']== 1 ){ //----------Skillcharr überbrüfen Start------------- $charrt1 = $_POST['charr1up']; $charrt2 = $_POST['charr2up']; if($_POST['charr1up'] == ''){$charrt1 = $_POST['charrupd1'];} if($_POST['charr2up'] == ''){$charrt2 = $_POST['charrupd2'];} $rows['charr1'] = $charrt1; $rows['charr2'] = $charrt2; $skill = ''; $ohtergallerypicts = ''; switch($charrt1){ case 'Krieger': $SkiChaid1 = 1; break; case 'Monk': $SkiChaid1 = 2; break; case 'Elementarmagier': $SkiChaid1 = 3; break; case 'Nekro': $SkiChaid1 = 4; break; case 'Mesmer': $SkiChaid1 = 5; break; case 'Ritualist': $SkiChaid1 = 6; break; case 'Assassin': $SkiChaid1 = 7; break; case 'Waldläufer': $SkiChaid1 = 8; } switch($charrt2){ case 'Krieger': $SkiChaid2 = 1; break; case 'Monk': $SkiChaid2 = 2; break; case 'Elementarmagier': $SkiChaid2 = 3; break; case 'Nekro': $SkiChaid2 = 4; break; case 'Mesmer': $SkiChaid2 = 5; break; case 'Ritualist': $SkiChaid2 = 6; break; case 'Assassin': $SkiChaid2 = 7; break; case 'Waldläufer': $SkiChaid2 = 8; } //----------Skillcharr überbrüfen Ende------------- $rows['uptate'] = ''; $rows['erstid'] = $_SESSION['authid']; //Wenn man ein Build uptatet werden hier die skills und andere sachen definiert if($_POST['uptate'] == 'uptotate1'){ $rows['id'] = $_POST['idup']; $rows['uptate'] = 'uptotate'; $rows['erstid'] = ''; $i = 0; $bdskillnumb = 1; $sktxt = 'skillv'; $erg1 = db_query("SELECT * FROM `prefix_gwbild` WHERE id = " .$_POST['idup'] ); while($row = db_fetch_assoc($erg1)) { $skill = ''; while($i<11){ if($row['skill'.$bdskillnumb]){ $row2[$sktxt.$i] = Skidchose($row['skill'.$bdskillnumb],$SkiChaid1,$SkiChaid2,$bdskillnumb); $row2['picture'.$i] = pictchoose($row['skill'.$bdskillnumb],$SkiChaid1,$SkiChaid2); }else{ $row2[$sktxt.$i] .= skchose($SkiChaid1); $row2[$sktxt.$i] .= skchose($SkiChaid2); } $i++; $bdskillnumb++; } if($row['klassenbild']){ $gallerpict = gallerypictchoose($row['klassenbild'],$SkiChaid1); $gallerypictname = gallerypictcontrol($row['klassenbild'],$SkiChaid1); } } }else{ $skill = skchose($SkiChaid1); $skill .= skchose($SkiChaid2); $ohtergallerypicts = gallerypicttake($SkiChaid1); } $rows['name'] = $_POST['nameup']; $rows['erst'] = $_POST['erstup']; $rows['atri1'] = $_POST['atri1up']; $rows['atri2'] = $_POST['atri2up']; $rows['text'] = $_POST['txt']; $rows['hidden'] = 'text'; $rows['reg'] = '2'; $rows['wasmachen'] = 'Speichern'; $rows['display1'] = ''; $rows['display2'] = ''; $rows['SMILIES'] = getsmilies(); $rows['formchek'] = 'chek2'; $rows['skill1'] = '<tr align="center"><td><hr><br>Skill 1 <img name="skill_1" src="include/images/guildwars/'.$row2['picture0'].'" border="0" alt="" /> <select name="skill1up" onkeyup="show_skill(this.options[selectedIndex].id,\'skill_1\');" onchange="show_skill(this.options[selectedIndex].id,\'skill_1\');" size="1">'.$row2['skillv0'].$skill.'</select></td></tr>'; $rows['skill2'] = '<tr align="center"><td><hr><br>Skill 2 <img name="skill_2" src="include/images/guildwars/'.$row2['picture1'].'" border="0" alt="" /> <select name="skill2up" onkeyup="show_skill(this.options[selectedIndex].id,\'skill_2\');" onchange="show_skill(this.options[selectedIndex].id,\'skill_2\');" size="1">'.$row2['skillv1'].$skill.'</select></td></tr>'; $rows['skill3'] = '<tr align="center"><td><hr><br>Skill 3 <img name="skill_3" src="include/images/guildwars/'.$row2['picture2'].'" border="0" alt="" /> <select name="skill3up" onkeyup="show_skill(this.options[selectedIndex].id,\'skill_3\');" onchange="show_skill(this.options[selectedIndex].id,\'skill_3\');" size="1">'.$row2['skillv2'].$skill.'</select></td></tr>'; $rows['skill4'] = '<tr align="center"><td><hr><br>Skill 4 <img name="skill_4" src="include/images/guildwars/'.$row2['picture3'].'" border="0" alt="" /> <select name="skill4up" onkeyup="show_skill(this.options[selectedIndex].id,\'skill_4\');" onchange="show_skill(this.options[selectedIndex].id,\'skill_4\');" size="1">'.$row2['skillv3'].$skill.'</select></td></tr>'; $rows['skill5'] = '<tr align="center"><td><hr><br>Skill 5 <img name="skill_5" src="include/images/guildwars/'.$row2['picture4'].'" border="0" alt="" /> <select name="skill5up" onkeyup="show_skill(this.options[selectedIndex].id,\'skill_5\');" onchange="show_skill(this.options[selectedIndex].id,\'skill_5\');" size="1">'.$row2['skillv4'].$skill.'</select></td></tr>'; $rows['skill6'] = '<tr align="center"><td><hr><br>Skill 6 <img name="skill_6" src="include/images/guildwars/'.$row2['picture5'].'" border="0" alt="" /> <select name="skill6up" onkeyup="show_skill(this.options[selectedIndex].id,\'skill_6\');" onchange="show_skill(this.options[selectedIndex].id,\'skill_6\');" size="1">'.$row2['skillv5'].$skill.'</select></td></tr>'; $rows['skill7'] = '<tr align="center"><td><hr><br>Skill 7 <img name="skill_7" src="include/images/guildwars/'.$row2['picture6'].'" border="0" alt="" /> <select name="skill7up" onkeyup="show_skill(this.options[selectedIndex].id,\'skill_7\');" onchange="show_skill(this.options[selectedIndex].id,\'skill_7\');" size="1">'.$row2['skillv6'].$skill.'</select></td></tr>'; $rows['skill8'] = '<tr align="center"><td><hr><br>Skill 8 <img name="skill_8" src="include/images/guildwars/'.$row2['picture7'].'" border="0" alt="" /> <select name="skill8up" onkeyup="show_skill(this.options[selectedIndex].id,\'skill_8\');" onchange="show_skill(this.options[selectedIndex].id,\'skill_8\');" size="1">'.$row2['skillv7'].$skill.'</select></td></tr>'; $rows['skill9'] = '<tr align="center"><td><hr><br>Skill 9 <img name="skill_9" src="include/images/guildwars/'.$row2['picture8'].'" border="0" alt="" /> <select name="skill9up" onkeyup="show_skill(this.options[selectedIndex].id,\'skill_9\');" onchange="show_skill(this.options[selectedIndex].id,\'skill_9\');" size="1">'.$row2['skillv8'].$skill.'</select></td></tr>'; $rows['skill10'] = '<tr align="center"><td><hr><br>Skill 10 <img name="skill_10" src="include/images/guildwars/'.$row2['picture9'].'" border="0" alt="" /> <select name="skill10up" onkeyup="show_skill(this.options[selectedIndex].id,\'skill_10\');" onchange="show_skill(this.options[selectedIndex].id,\'skill_10\');" size="1">'.$row2['skillv9'].$skill.'</select></td></tr>'; $rows['skill11'] = '<tr align="center"><td><hr><br>Skill 11 <img name="skill_11" src="include/images/guildwars/'.$row2['picture10'].'" border="0" alt="" /> <select name="skill11up" onkeyup="show_skill(this.options[selectedIndex].id,\'skill_11\');" onchange="show_skill(this.options[selectedIndex].id,\'skill_11\');" size="1">'.$row2['skillv10'].$skill.'</select><br><br></td></tr>'; $rows['gallerybild'] = '<tr align="center" class=""><td><hr><br>Bild Wählen: <img name="showpict" src="include/images/guildwars/'.$gallerpict.'" border="0" alt="" /> <select name="gallerpictup" onkeyup="show_skill(this.options[selectedIndex].id,\'showpict\');" onchange="show_skill(this.options[selectedIndex].id,\'showpict\');" size="1">'.$gallerypictname.$ohtergallerypicts.'</select><br><br></td></tr>'; $tpl->set_ar_out($rows,3); } $row3['nene'] = $nene; $tpl->set_ar_out($row3,4); } //Hier wird alles richtig geordnet und in die MySQL datenbank geschrieben if($_POST['reg']== 2){ if($_POST['skill1up'] =='' OR $_POST['skill2up'] =='' OR $_POST['skill3up'] =='' OR $_POST['skill4up'] =='' OR $_POST['skill5up'] =='' OR $_POST['skill6up'] =='' OR $_POST['skill7up'] =='' OR $_POST['skill8up'] =='' OR $_POST['charrupd1'] =='' OR $_POST['charrupd2'] =='' OR $_POST['atri1up']=='' OR $_POST['atri2up'] =='') { echo 'Bitte füllen oder wählen sie alle Pflichfelder aus und aktivieren sie Javascript!'; }else{ $upid = $_POST['idup']; $upname = $_POST['nameup']; $uptext = $_POST['txt']; $uperstid = $_POST['erstidup']; $upatri1 = $_POST['atri1up']; $upatri2 = $_POST['atri2up']; $upcharr1 = $_POST['charrupd1']; $upcharr2 = $_POST['charrupd2']; $uptate = $_POST['uptate']; $uperst = $_POST['erstup']; $upskill1 = $_POST['skill1up']; $upskill2 = $_POST['skill2up']; $upskill3 = $_POST['skill3up']; $upskill4 = $_POST['skill4up']; $upskill5 = $_POST['skill5up']; $upskill6 = $_POST['skill6up']; $upskill7 = $_POST['skill7up']; $upskill8 = $_POST['skill8up']; $upskill9 = $_POST['skill9up']; $upskill10 = $_POST['skill10up']; $upskill11 = $_POST['skill11up']; $upgallerpict = $_POST['gallerpictup']; if($uptate == 'uptotate'){ $uptext = trim(escape($uptext, 'textarea')); db_query('UPDATE `prefix_gwbild` SET erst = "'.$uperst.'", skill1 = "'.$upskill1.'", skill2 = "'.$upskill2.'", skill3 = "'.$upskill3.'", skill4 = "'.$upskill4.'", skill5 = "'.$upskill5.'", skill6 = "'.$upskill6.'", skill7 = "'.$upskill7.'", skill8 = "'.$upskill8.'", skill9 = "'.$upskill9.'", skill10 = "'.$upskill10.'", skill11 = "'.$upskill11.'", charr1 = "'.$upcharr1.'", charr2 = "'.$upcharr2.'", atribute1 = "'.$upatri1.'", atribute2 = "'.$upatri2.'", txt = "'.$uptext.'", klassenbild = "'.$upgallerpict.'" WHERE id = "'.$upid.'" LIMIT 1'); db_query('UPDATE `prefix_gwbilds` SET name = "'.$upname.'" WHERE id = "'.$upid.'" LIMIT 1'); wd('?gwbuilds','Erfolgreich geändert',3); }else{ $uptext = trim(escape($uptext, 'textarea')); db_query("INSERT INTO `prefix_gwbild` (erst,skill1,skill2,skill3,skill4,skill5,skill6,skill7,skill8,skill9,skill10,skill11,charr1,charr2,atribute1,atribute2,txt,klassenbild) VALUES ('$uperst','$upskill1','$upskill2','$upskill3','$upskill4','$upskill5','$upskill6','$upskill7','$upskill8','$upskill9','$upskill10','$upskill11','$upcharr1','$upcharr2','$upatri1','$upatri2','$uptext','$upgallerpict')"); db_query("INSERT INTO `prefix_gwbilds` (erstid,name) VALUES ('".$uperstid."','".$upname."')"); wd('?gwbuilds','Erfolgreich eingefügt',3); } } } $design->footer(); ?>
verwendete ilchClan Version: 1.1
betroffene Homepage: externer Link