Habe 2 kleinere Fehler hoffe ich ma...
1. Habe ich das Problem das mein Adminbutton in der Loginbox nicht mehr angezeigt wird nachdem ich das Uploadmodul der FAQ Box eingebaut habe... hier der Code der Box:
<?php # Copyright by Manuel # Support www.ilch.de defined ('main') or die ( 'no direct access' ); $delt = time()-86400; db_query('DELETE FROM `prefix_ipsperre` WHERE date < "'.$delt.'"'); $tpl = new tpl ( 'user/boxen_login.htm' ); if ( loggedin() ) { if ( user_has_admin_right($menu,false) ) { $tpl->set ( 'ADMIN', '<a class="box" target="_blank" href="admin.php?admin"><img border="0" src="include/images/buttons/admin.gif" width="100" height="16"></a>' ); } else { $tpl->set ( 'ADMIN', '' ); } if ( has_right(@db_result(db_query("SELECT v5 FROM `prefix_allg` WHERE k = 'Uploadmodul';"),0)) ) { $admin .= '<a class="box" href="index.php?upload">Upload</a>'; } else { $admin .= ''; } $tpl->set ( 'ADMIN', $admin ); if ( $allgAr['Fpmf'] == 1 ) { $erg = db_query("SELECT COUNT(id) FROM `prefix_pm` WHERE gelesen = 0 AND status < 1 AND eid = ".$_SESSION['authid']); $check_pm = db_result($erg,0); $nachrichten_link = '<a class="box" href="index.php?forum-privmsg"><img border="0" src="include/images/buttons/nachrichten.gif" width="100" height="16"></a>'; } else { $nachrichten_link = ''; } $erg=db_query('SELECT * FROM prefix_kasse_beitraege WHERE uid='.$_SESSION['authid']); if(@db_num_rows($erg)==1){ $row=db_fetch_assoc($erg); $payedto= mktime(0, 0, 0, date ("m",$row['date'])+$row['zyklus'] , date ("d",$row['date']), date("Y",$row['date'])); $prewarn= mktime(0, 0, 0, date ("m") , date ("d")+20, date("Y")); $warn= mktime(0, 0, 0, date ("m") , date ("d")+7, date("Y")); $alert= mktime(0, 0, 0, date ("m") , date ("d")+2, date("Y")); $payedto2=date("d.m.Y",$payedto); if($payedto<time()){ $beitrag='<div style="color:#9F0000;"><h3>Beitrag war zu zahlen am '.$payedto2.'</h3></div>'; } elseif($payedto>time() AND $payedto<=$alert){ $beitrag='<div style="color:#FF0033;">Beitrag ist zu zahlen am '.$payedto2.'</div>'; } elseif($payedto>time() AND $payedto<=$warn){ $beitrag='<div style="color:#FF7F00;">Beitrag ist zu zahlen am '.$payedto2.'</div>'; } elseif($payedto>time() AND $payedto<=$prewarn){ $beitrag='<div style="color:#5CE72E;">Beitrag ist bezahlt<br>bis '.$payedto2.'</div>'; } elseif($payedto>time()){ $beitrag='<div style="color:#ffffff;">Beitrag ist bezahlt<br>bis '.$payedto2.'</div>'; } } else{ $beitrag=''; } $abf = 'SELECT id, name, avatar FROM prefix_user WHERE name = "'.$_SESSION['authname'].'"'; $erg = db_query($abf); $row = db_fetch_object($erg); if ( file_exists($row->avatar)) { $avatar = '<br><img src="'.$row->avatar.'" border="0"><br>'; }else{ $avatar = '<br><img src="include/images/avatars/noavatar.gif" border="0" alt="no Avatar"><br>'; } # USERGB START $usergb = db_query("SELECT COUNT(id) FROM `prefix_usergb` WHERE uid = ".$_SESSION['authid'].""); $eintrage = db_result($usergb,0); $usergb2 = '<a class="box" href="index.php?user-usergb-view-'.$_SESSION['authid'].'"><img border="0" src="include/images/buttons/gbook.gif" width="100" height="16"></a>'; $tpl->set ( 'USERGB' , $usergb2 ); # USERGB ENDE $tpl->set ( 'ID' , $row->id ); $tpl->set ( 'AVATAR' , $avatar ); $tpl->set ( 'SID' , session_id() ); $tpl->set ( 'NACHRICHTEN' , $nachrichten_link ); $tpl->set ( 'BEITRAG' , $beitrag ); $tpl->set ( 'NAME', $_SESSION['authname'] ); $tpl->set ( 'POPUP', check_for_pm_popup() ); $tpl->out (0); } else { if (empty($_POST['login_name'])) { $_POST['login_name'] = 'Nickname'; } if (empty($_POST['login_pw'])) { $_POST['login_pw'] = 'ääääääää'; } $regist = ''; if ( $allgAr['forum_regist'] == 1 ) { $regist = '<a href="index.php?user-regist"><img border="0" src="include/images/buttons/reg.gif" width="100" height="16"></a>'; } $ip = db_fetch_assoc(db_query("SELECT * FROM `prefix_ipsperre` WHERE ip = '".getip()."'")); if($ip['try'] >= 5){$loginbutton = 'Login Closed';} else{$loginbutton = '<br><input type="submit" style="background-image:url(include/images/buttons/login.gif); border:0; height:16px; width:100px;" name="user_login_sub" value=""/>';} $tpl->set_ar_out ( array ( 'LOGINBUTTON' => $loginbutton,'regist' => $regist, 'wdlink' => '?'.$allgAr['smodul'], 'PASS' => $_POST['login_pw'], 'NAME' => $_POST['login_name'] ) , 1 ); } unset($tpl); ?>
Und des weiteren werden im Forum die Homepagelinks irgendwie verfälscht, der link wohin er leitet sieht so aus
http://localhost/script/%5C'%5C'
hier mal der Code aus meiner showpost.php
<?php # Copyright by: Manuel # Support: www.ilch.de defined ('main') or die ( 'no direct access' ); # check ob ein fehler aufgetreten ist. check_forum_failure($forum_failure); # toipc als gelesen markieren $_SESSION['forumSEE'][$fid][$tid] = time(); $title = $allgAr['title'].' :: Forum :: '.$aktTopicRow['name'].' :: Beiträge zeigen'; $hmenu = $extented_forum_menu.'<a class="smalfont" href="index.php?forum">Forum</a><b> » </b><a class="smalfont" href="index.php?forum-showcat-'.$aktForumRow['cid'].'">'.$aktForumRow['kat'].'</a><b> » </b><a class="smalfont" href="index.php?forum-showtopics-'.$fid.'">'.$aktForumRow['name'].'</a><b> » </b>'; $hmenu .= $aktTopicRow['name'].$extented_forum_menu_sufix; $design = new design ( $title , $hmenu, 1); $design->header(); # Topic Hits werden eins hochgesetzt. db_query('UPDATE `prefix_topics` SET hit = hit + 1 WHERE id = "'.$tid.'"'); # mehrere seiten fals gefordert $limit = $allgAr['Fpanz']; // Limit $page = ($menu->getA(3) == 'p' ? $menu->getE(3) : 1 ); $MPL = db_make_sites ($page , "WHERE tid = ".$tid , $limit , 'index.php?forum-showposts-'.$tid , 'posts' ); $anfang = ($page - 1) * $limit; $antworten = ''; if ($aktTopicRow['stat'] == 1 AND $forum_rights['reply'] == TRUE ) { $antworten = '<a href="index.php?forum-newpost-'.$tid.'"><img border="0" src="include/images/buttons/antworten.gif" width="100" height="16"></a>'; } $class = 'Cmite'; $tpl = new tpl ( 'forum/showpost' ); $ar = array ( 'SITELINK' => $MPL, 'tid' => $tid, 'ANTWORTEN' => $antworten, 'TOPICNAME' => $aktTopicRow['name'] ); $tpl->set_ar_out($ar,0); $i = $anfang +1; $ges_ar = array ('wurstegal', 'maennlich', 'weiblich'); $erg = db_query("SELECT geschlecht, prefix_posts.id,txt,time,erstid,erst,sig,staat,wohnort,homepage,icq,avatar,posts,cpoints,fwarn,geschlecht,recht,status,regist FROM `prefix_posts` LEFT JOIN prefix_user ON prefix_posts.erstid = prefix_user.id WHERE tid = ".$tid." ORDER BY time LIMIT ".$anfang.",".$limit); while($row = db_fetch_assoc($erg)) { $class = ( $class == 'Cnorm' ? 'Cmite' : 'Cnorm' ); # define some vars. $row['sig'] = ( empty($row['sig']) ? '' : '<br><hr style="width: 50%;" align="left">'.bbcode($row['sig']) ); $row['TID'] = $tid; $row['class'] = $class; $row['date'] = date ('d.m.Y - H:i:s', $row['time'] ); $row['delete'] = ''; $row['change'] = ''; $row['staat'] = '<img src="include/images/flags/'.$row['staat'].'">'; $row['wohnort'] = ''.$row['wohnort'].''; $row['ohneavatar'] ='include/images/avatars/'.$ges_ar[$row['geschlecht']].'.gif'; $row['avatar'] = '<img src="'.(file_exists($row['avatar'])?$row['avatar']:(file_exists($row['ohneavatar'])?$row['ohneavatar']:'include/images/avatars/gast.gif')).'" alt="User Pic" border="0" /><br>'; $row['reng'] = userrang ($row['posts'],$row['erstid']); $row['pn'] .= "<a href='index.php?forum-privmsg-new&empfid=".$row['erstid']."'><img src='include/images/buttons/pn.gif' width='100' height='16' border='0'></a>"; $row['website'] .= "<a href=\'{$row['www']}\'><img src='include/images/buttons/website.gif' width='100' height='16' border='0'></a>"; $row['posts'] = ($row['posts']?''.$row['posts']:''); $row['txt'] = (isset($_GET['such']) ? markword(bbcode ($row['txt']),$_GET['such']) : bbcode ($row['txt']) ); $row['i'] = $i; $row['page'] = $page; $row['rang'] = userrang ($row['posts'],$row['erstid']); $row['rrang'] = getlistrecht($row['recht']); $spezrank=spezrang($row['erstid']); if(!empty($spezrank)){$row['spezrank']='<br/>und '.$spezrank;} else{$row['spezrank']='';} $rang=rangcount($row['erstid'],$row['posts'],$row['cpoints'],$row['fwarn']); $row['rang']=rangbildforum ($rang); $ast['0']='inaktiv'; $ast['1']='aktiv'; $ast['2']='gesperrt'; $row['aina']=$ast[$row['status']]; if (empty($row['aina'])){ $row['aina']='gast'; } $row['dabei'] = date('d.m.y',$row['regist']); /*** Verwarnungen ***/ $row['verw']=verwarnstu($row['fwarn'],1); if ( $row['erstid'] != '' ) { $user_row = db_fetch_assoc(db_query("SELECT posts,regist FROM prefix_user WHERE id = ".$row['erstid'])); $row['erst'] = '<a href="index.php?user-details-'.$row['erstid'].'"><b>'.$row['erst'].'</b></a>'; $posts = $user_row['posts']; $row['posts'] = ''.$user_row['posts']; if ( $posts == '' ) { $row['posts'] = '<br>Nicht registriert';} #Ranking Balken #Grafiken definieren $rand_l = '<img src="include/images/icons/ranking/rank_left.jpg" width="8" height="17" alt="" border="0">'; $rand_r = '<img src="include/images/icons/ranking/rank_right.jpg" width="8" height="17" alt="" border="0">'; $rank_grey = '<img src="include/images/icons/ranking/rank_grey.jpg" width="8" height="17" alt="" border="0">'; $rank_02 = '<img src="include/images/icons/ranking/rank_02.jpg" width="8" height="17" alt="" border="0">'; $rank_03 = '<img src="include/images/icons/ranking/rank_03.jpg" width="8" height="17" alt="" border="0">'; $rank_04 = '<img src="include/images/icons/ranking/rank_04.jpg" width="8" height="17" alt="" border="0">'; $rank_05 = '<img src="include/images/icons/ranking/rank_05.jpg" width="8" height="17" alt="" border="0">'; $rank_06 = '<img src="include/images/icons/ranking/rank_06.jpg" width="8" height="17" alt="" border="0">'; $rank_07 = '<img src="include/images/icons/ranking/rank_07.jpg" width="8" height="17" alt="" border="0">'; $rank_08 = '<img src="include/images/icons/ranking/rank_08.jpg" width="8" height="17" alt="" border="0">'; $rank_09 = '<img src="include/images/icons/ranking/rank_09.jpg" width="8" height="17" alt="" border="0">'; $rank_10 = '<img src="include/images/icons/ranking/rank_10.jpg" width="8" height="17" alt="" border="0">'; #Bezugnehmen auf das Ranking des users if ( $posts != '' ) { $row['rang'] = ''; if ($user_row['posts'] <= '9') { $row['rang'] .= $rand_l.$rank_grey.$rank_grey.$rank_grey.$rank_grey.$rank_grey.$rank_grey.$rank_grey.$rank_grey.$rank_grey.$rand_r; } elseif ($user_row['posts'] <= '24') { $row['rang'] .= $rand_l.$rank_02.$rank_grey.$rank_grey.$rank_grey.$rank_grey.$rank_grey.$rank_grey.$rank_grey.$rank_grey.$rand_r; } elseif ($user_row['posts'] <= '49') { $row['rang'] .= $rand_l.$rank_02.$rank_03.$rank_grey.$rank_grey.$rank_grey.$rank_grey.$rank_grey.$rank_grey.$rank_grey.$rand_r; } elseif ($user_row['posts'] <= '84') { $row['rang'] .= $rand_l.$rank_02.$rank_03.$rank_04.$rank_grey.$rank_grey.$rank_grey.$rank_grey.$rank_grey.$rank_grey.$rand_r; } elseif ($user_row['posts'] <= '124') { $row['rang'] .= $rand_l.$rank_02.$rank_03.$rank_04.$rank_05.$rank_grey.$rank_grey.$rank_grey.$rank_grey.$rank_grey.$rand_r; } elseif ($user_row['posts'] <= '179') { $row['rang'] .= $rand_l.$rank_02.$rank_03.$rank_04.$rank_05.$rank_06.$rank_grey.$rank_grey.$rank_grey.$rank_grey.$rand_r; } elseif ($user_row['posts'] <= '244') { $row['rang'] .= $rand_l.$rank_02.$rank_03.$rank_04.$rank_05.$rank_06.$rank_07.$rank_grey.$rank_grey.$rank_grey.$rand_r; } elseif ($user_row['posts'] <= '299') { $row['rang'] .= $rand_l.$rank_02.$rank_03.$rank_04.$rank_05.$rank_06.$rank_07.$rank_08.$rank_grey.$rank_grey.$rand_r; } elseif ($user_row['posts'] <= '344') { $row['rang'] .= $rand_l.$rank_02.$rank_03.$rank_04.$rank_05.$rank_06.$rank_07.$rank_08.$rank_09.$rank_grey.$rand_r; } elseif ($user_row['posts'] <= '399') { $row['rang'] .= $rand_l.$rank_02.$rank_03.$rank_04.$rank_05.$rank_06.$rank_07.$rank_08.$rank_09.$rank_10.$rand_r; } } else {$row['rang'] .= ""; } #Wenn der User registriert ist wird folgendes ausgelesen if ( $posts != '' ) { #Male or Female $abf1 = "SELECT * FROM prefix_userfields where uid = ".$row['erstid']." and fid = 9"; $erg1 = db_query($abf1); $gender = db_fetch_object($erg1); if ($gender->val == "männlich" ){ $row['erst'] .= ' <img src="include/images/icons/male.gif" border="0">'; } elseif ($gender->val == "weiblich" ){ $row['erst'] .= ' <img src="include/images/icons/female.gif" border="0">'; } #Messenger Daten werden ausgelesen if(!empty($row['icq'])){ $row['icq']=trim($row['icq']); $row['icq']='<a href="http://www.icq.com/whitepages/cmd.php?uin='.$row['icq'].'&action=add"><img src="include/images/buttons/icq.gif" width="100" height="16" border="0"></a>'; } else { $row['icq']=''; } #Website des Users if(!empty($row['homepage'])){ $www =str_replace('http://', '', $row['homepage']); $row['www']='<a href="http://'.$www.'" taget="_blank"><img src="include/images/icons/uwebsite.gif" border="0" alt="Website des Users besuchen"></a>'; } else { $row['www']=''; } #eMail des Users if($row['opt_mail']==1){ $row['email']='<a href="?user-mail-'.$row['erstid'].'"><img src="include/images/icons/uwebsite.gif" border="0" alt="Website des Users besuchen"></a>'; } else { $row['email']=''; } #User Details if ( $posts != '' ) { $abf1 = 'SELECT * FROM prefix_user where id = '.$row["erstid"]; $erg1 = db_query($abf1); $user = db_fetch_object($erg1); $bf1 = "SELECT * FROM prefix_userfields where uid = ".$row['erstid']." and fid = 1"; $rg1 = db_query($bf1); $userfield = db_fetch_object($rg1); $zeit = date('d. M Y',$user->regist); $row['details'] = "<br><br>Dabei seit: ".$zeit."<br>"; if ($userfield->val != '') { $row['details'] .= "Kommt aus: ".$userfield->val."<br>"; } } else { $row['details'] = "";} } # #Edit Ende ################################## # profilefields $sig = @db_result(db_query("SELECT val FROM prefix_userfields WHERE uid = ".$row['erstid']." AND fid = 5"),0); if (!empty($sig)) { $row['sig'] = '<br><hr size="1" width="100" align="left">'.bbcode($sig); } $avatar = @db_result(db_query("SELECT val FROM prefix_userfields WHERE uid = ".$row['erstid']." AND fid = 6"),0); if (!empty($avatar)) { $row['avatar'] = '<br><br><img src="'.$avatar.'" alt="User Pic" border="0" /><br>'; } } if(empty($points)){ $points=0; } $rang=$posts+$points; //$row['rang'] = rangbildforum ($rang); if ($forum_rights['mods'] == TRUE AND $i>1) { $row['delete'] = '<a href="index.php?forum-delpost-'.$tid.'-'.$row['id'].'"><img border="0" src="include/images/buttons/delete.gif" width="100" height="16"></a>'; } if ( $forum_rights['reply'] == TRUE AND loggedin() ) { $row['change'] = ' <a href="index.php?forum-editpost-'.$tid.'-'.$row['id'].'"><img border="0" src="include/images/buttons/bearbeiten.gif" width="100" height="16"></a>'; } //Forumex - begin $row['txt'] = FE_Vote2HTML($row['id'],$row['txt']); //Forumex - end $tpl->set_ar_out($row,1); $i++; } $tpl->set_ar_out( array ( 'SITELINK' => $MPL, 'ANTWORTEN' => $antworten ) , 2 ); if (loggedin()) { if ($menu->get(3) == 'topicalert') { if (1 == db_result(db_query("SELECT COUNT(*) FROM prefix_topic_alerts WHERE uid = ".$_SESSION['authid']." AND tid = ".$tid),0)) { db_query("DELETE FROM prefix_topic_alerts WHERE uid = ".$_SESSION['authid']." AND tid = ".$tid); } else { db_query("INSERT INTO prefix_topic_alerts (tid,uid) VALUES (".$tid.", ".$_SESSION['authid'].")"); } } echo '<b>Optionen:<b>'; if (1 == db_result(db_query("SELECT COUNT(*) FROM prefix_topic_alerts WHERE uid = ".$_SESSION['authid']." AND tid = ".$tid),0)) { echo '<br><br><a href="index.php?forum-showposts-'.$tid.'-topicalert"><img border="0" src="include/images/buttons/keinemail.gif" width="250" height="16"></a><br />'; } else { echo '<br><br><a href="index.php?forum-showposts-'.$tid.'-topicalert"><img border="0" src="include/images/buttons/mail.gif" width="250" height="16"></a><br />'; } } if ( $forum_rights['mods'] == TRUE ) { $tpl->set ( 'status', ($aktTopicRow['stat'] == 1 ? $lang['close'] : $lang['open'] ) ); $tpl->set ( 'festnorm', ($aktTopicRow['art'] == 0 ? $lang['fixedtopic'] : $lang['normaltopic'] ) ); $tpl->set('tid',$tid); $tpl->out(3); } $design->footer(); ?>
verwendete ilchClan Version: 1.1