* * File Name : news_druckversion.html * Last Update : 2010-12-29 */ include('glob/start.php'); if($id){ $result = $sm_db->query("SELECT id, title, img_id_text, img_id, subtitle, text, author, games_id, news_id, date_format(dateon, '%d.%m.%Y') as showdateon FROM news WHERE status=".STATUS_ONLINE." and id='$id'") or mysql_die($sm_db); $querynum2++; $db = mysqli_fetch_assoc($result); if($db){ define('TOPIC_ID', $db['id']); $thispagetree[end(array_keys($thispagetree))]['title'] = stripslashes($db['title']); $thispagetree[end(array_keys($thispagetree))]['uri'] = $thispage['uri'].$db['id']; $thispage = end($thispagetree); create_thispage($thispage['id'],$thispage['uri'],$thispage['title']); }elseif($thispagetree){ array_pop($thispagetree); url_redirect($thispagetree[end(array_keys($thispagetree))]['uri']); } } $subtitle = nl2br(stripslashes($db['subtitle'])); $text = nl2br(stripslashes($db['text'])); $dateon = $db['showdateon']; $img_id = $db['img_id']; $img_id_text = $db['img_id_text']; $news_id = $db['news_id']; $games_id = $db['games_id']; $authors = ($db['author'])?explode(', ',$db['author']):NULL; if($qarr){ foreach(array('subtitle','text') as $val){ $$val = html_entity_decode(preg_replace($qarr, "$0", htmlentities($$val))); } } ///i n s e r t i m a g e s if($img_id = ($img_id_text)?$img_id_text:(($img_id)?$img_id:NULL)){ $text = 'IMGL'.$img_id.' '.$text; } $text = insert_img($text,PAGE_TITLE); ///i n s e r t n e w s l i n k if($text_withnewslink = insert_newslink($text)) $text = $text_withnewslink; ///a u t h o r s if($authors){ foreach($authors as $val){ $qauthor[] = '\''.$val.'\''; } $where_author = 'in ('.implode(',', $qauthor).')'; $result = $sm_db->query("SELECT real_name, abbr, url FROM admin WHERE real_name $where_author") or mysql_die($sm_db); while($result && $db = mysqli_fetch_assoc($result)){ $author[$db['real_name']]['abbr'] = $db['abbr']; $author[$db['real_name']]['url'] = $db['url']; } foreach($authors as $val){ $authorshow[] .= (($author[$val]['uri'])?'':NULL).(($author[$val]['abbr'])?$author[$val]['abbr']:$val).(($author[$val]['uri'])?'':NULL); } $content_author .= ' ('.implode(', ', $authorshow).')'; } ///more n e w s if($news_id){ $where_news = 'in ('.implode(',', explode(' ,',substr($news_id, 1, -1))).')'; $result = $sm_db->query("SELECT id, title, date_format(dateon, '%d.%m.%Y') as showdateon FROM news WHERE dateon<=now() and status='1' and id $where_news ORDER BY dateon DESC") or mysql_die($sm_db); while($result && $db = mysqli_fetch_assoc($result)){ $str .= '
  • '.stripslashes($db['title']).' ('.$db['showdateon'].')
  • '; } if($str){ $content_news .= '

    weitere News zum Thema

    '; } } $c_body = '

    '.PAGE_TITLE.'

    '.$dateon.'

    '.$subtitle.'

    '.$text.'


    '.$content_news; ////////////////////////// WAR

    '.$text.$content_author.'

    ////////////////////////// O U T P U T $result = $sm_db->query("SELECT id, code, meta_tags FROM pages WHERE id IN ('".SITE."','".PAGE_PARENT_ID."','".PAGE_ID."')") or mysql_die($sm_db); $querynum2++; while($result && $db = mysqli_fetch_assoc($result)){ $page[$db['id']]['code'] = explode('[[]]', $db['code']); $page[$db['id']]['metatags'] = $db['meta_tags']; } if($page[PAGE_ID]['metatags']) $page[SITE]['metatags'] = preg_replace( '/(\<\/meta>)/', "$1".$page[PAGE_ID]['metatags'].", $2", $page[SITE]['metatags']); $page[PAGE_ID]['headtitle'] = str_replace('{$TITLE}', PAGE_TITLE, $page[PAGE_ID]['headtitle']); $page[PAGE_ID]['headtitle'] = str_replace('{$PARENT_TITLE}', $page[PAGE_PARENT_ID]['title'], $page[PAGE_ID]['headtitle']); $page[PAGE_ID]['headtitle'] = str_replace('{$SITE}', SITE_TITLE, $page[PAGE_ID]['headtitle']); $page[SITE]['metatags'] .= ' '; echo ' '.$page[PAGE_ID]['headtitle'].''. $page[SITE]['metatags'].'
    '.SITE_TITLE.' - '.PAGE_TITLE.'
    '.SITE_URL.'/'.uri_get2(SITE_PAGE_NEWS,$id,PAGE_TITLE,0,0,0,0,0).'

    '. $c_body.'
    '.SITE_COPY.'
    '; ?>