Wollte mir den auf die Homepage loaden, hat auch eigentlich alles gut geklappt...
doch nun sind meine news und so weg...
kann mir da vll jemand helfen
meine site ist
www.sulfad.de
Hier kann eine Notiz zum Merk-Eintrag hinzugefügt werden (optional)
Geschlossen |
$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">';
<?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' ); $tpl->set_out('SITELINK', $MPL,1); $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]; } if($row['html'] == "false"){ $row['text'] = BBcode($row['text']); } $tpl->set_ar_out($row,0); } $tpl->set_out('SITELINK', $MPL,1); unset($tpl); }else{ #<<show artikel 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); if($row->news_html == "false"){ $textToShow = BBcode($row->news_text); }else{ $textToShow = $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)) { if($row1->html == "false"){ $row1->text = BBcode($row1->text); } $tpl->set_ar_out( array('NAME' => $row1->name, 'TEXT' => $row1->text, 'ZAHL' => $zahl ) , 4 ); $zahl--; } } $tpl->out(5); } $tpl->out(6); } } $design->footer(); ?>
Warning: fopen(include/includes/config.php): failed to open stream: Permission denied in /var/www/html/sulfad/bbcodeinstall.php on line 62 Warning: fwrite(): supplied argument is not a valid stream resource in /var/www/html/sulfad/bbcodeinstall.php on line 63
Geschlossen | ||
Zurück zu Fehlersuche und Probleme |