Das Problem ist wenn ich bei den News auf ganzen Artikel lesen klicke kommt folgende Fehlermeldung.
Fatal error: Call to undefined function: check_rights() in /var/www/densetsu/www/include/contents/news.php on line 111
Kann mir jemand bitte helfen.:)
Hier noch der komplette php Code der News Datei.
<?php # Copyright by: Manuel # Support: www.ilch.de defined ('main') or die ( 'no direct access' ); $title = $allgAr['title'].' :: News'; $hmenu = 'News'; $design = new design ( $title , $hmenu ); $design->header(); function news_find_kat ($kat) { $katpfad = 'include/images/news/'; $katjpg = $katpfad.$kat.'.jpg'; $katgif = $katpfad.$kat.'.gif'; $katpng = $katpfad.$kat.'.jpg'; if ( file_exists( $katjpg ) ) { $pfadzumBild = $katjpg; } elseif ( file_exists ( $katgif ) ) { $pfadzumBild = $katgif; } elseif ( file_exists ( $katpng ) ) { $pfadzumBild = $katpng; } if ( !empty( $pfadzumBild ) ) { $kategorie = '<img src="'.$pfadzumBild.'" alt="'.$kat.'">'; } else { $kategorie = '<b>'.$kat.'</b><br /><br />'; } return ( $kategorie ); } $limit = $allgAr['Nlimit']; if ( empty ( $um ) ) { if(empty($_GET['page'])) { $_GET['page'] = 1; } $MPL = db_make_sites ($_GET['page'] , "WHERE news_recht >= ".$_SESSION['authright'] , $limit , '?m=news' , 'news' ); $anfang = ($_GET['page'] - 1) * $limit; $tpl = new tpl ( 'news.htm' ); $abf = <<< query SELECT a.news_title as title, a.news_id as id, DATE_FORMAT(a.news_time,'%d. %m. %Y') as datum, DATE_FORMAT(a.news_time,'%W') as dayofweek, a.news_kat as kate, a.news_text as text, b.name as username, a.user_id as userid FROM prefix_news as a LEFT JOIN prefix_user as b ON a.user_id = b.id WHERE {$_SESSION['authright']} <= a.news_recht OR a.news_recht = 0 ORDER BY news_time DESC LIMIT {$anfang},{$limit} query; #echo '<pre>'.$abf.'</pre>'; $erg = db_query($abf); while ($row = db_fetch_assoc($erg)) { $k0m = db_query("SELECT COUNT(ID) FROM `prefix_koms` WHERE uid = 'NEWS_".$row['id']."'"); $row['kom'] = db_result($k0m,0); $avatar_exists = @db_result(db_query("SELECT val FROM prefix_userfields WHERE fid = 6 AND uid = ".$row['userid']),0); $row ['AVATA'] = '<img src="'.$avatar_exists.'" border="0">'; $row['kate'] = news_find_kat($row['kate']); $row['datum'] = $lang[$row['dayofweek']].' '.$row['datum']; if ( strpos ( $row['text'] , '[PREVIEWENDE]' ) !== FALSE ) { $a = explode('[PREVIEWENDE]' , $row['text']); $row['text'] = $a[0]; } $row['text'] = BBcode($row['text']); $tpl->set_ar_out($row,0); } $tpl->set_out('SITELINK', $MPL,1); unset($tpl); } else { # show artiel if ( !empty($_REQUEST['nid']) ) { $nid = escape($_REQUEST['nid'],'integer'); } $row = db_fetch_object(db_query("SELECT * FROM `prefix_news` WHERE news_id = '".$nid."'")); if ( check_rights(array($row->news_recht)) ) { $komsOK = true; if ( $allgAr['Ngkoms'] == 0 ) { if ($_SESSION['authright'] <= -1 ) { $komsOK = true; } else { $komsOK = false; } } if ( $allgAr['Nukoms'] == 0 ) { $komsOK = false; } # kommentar add if ( $komsOK AND !empty($_POST['name']) AND !empty($_POST['txt']) AND !empty($_POST['nid']) ) { $_POST['txt'] = escape($_POST['txt'],'string'); $_POST['name'] = escape($_POST['name'],'string'); if ( !array_key_exists('newskommentar'.$nid,$_SESSION) ) { $_SESSION['newskommentar'.$nid] = TRUE; db_query("INSERT INTO `prefix_koms` VALUES ('','NEWS_".$_POST['nid']."','".$_POST['name']."','".$_POST['txt']."')"); } $nid = $_POST['nid']; } # kommentar add $kategorie = news_find_kat($row->news_kat); $textToShow = BBcode($row->news_text); $textToShow = str_replace('[PREVIEWENDE]','',$textToShow); if ( !empty($such) ) { $textToShow = markword($textToShow,$such); } $tpl = new tpl ( 'news.htm' ); $ar = array ('TEXT' => $textToShow, 'KATE' => $kategorie, 'NID' => $nid, 'NAME' => $row->news_title, ); $tpl->set_ar_out($ar, 2 ); if ($komsOK) { $tpl->set_ar_out ( array ( 'NAME' => $row->news_title , 'NID' => $nid ), 3 ); $erg1 = db_query("SELECT * FROM `prefix_koms` WHERE uid = 'NEWS_".$nid."' ORDER BY id DESC"); $ergAnz1 = db_num_rows($erg1); if ( $ergAnz1 == 0 ) { echo '<tr><td><b>Kein Kommentar vorhanden</b></td></tr>'; } else { $zahl = $ergAnz1; while ($row1 = db_fetch_object($erg1)) { $tpl->set_ar_out( array('NAME' => $row1->name, 'TEXT' => BBcode($row1->text), 'ZAHL' => $zahl ) , 4 ); $zahl--; } } $tpl->out(5); } $tpl->out(6); } } $design->footer(); ?>
betroffene Homepage: densetsu-thelight.de