Encyclopedia News
if(isset($_GET['art'])) {
$id=clearString($_GET['art']);
$sql = 'SELECT * FROM `news` where `ID`="'.$id.'"';
//echo $sql;
$result = $db->query($sql);
$output[] = '';
while ($row = $result->fetch()) {
$output[] = '
';
if(!empty($row['img0']))
$output[] = '
!['.strip_tags(htmlspecialchars_decode($row['title'])).' '.strip_tags(htmlspecialchars_decode($txt_cart)).'](photo/'.$row['img0'].')
';
$output[] = '
';
$output[] = '
'.strip_tags(htmlspecialchars_decode($row['title'])).'
'.nl2br(createLink(htmlspecialchars_decode($row['content']))).'';//
'.$row['datums'].'
$output[] = '
'.htmlspecialchars_decode($row['video']).'
';
$output[] = '';
}
/*$output[]='
';*/
$output[] = '
';
echo join('',$output);
}
else {
$datums=time();
$sql = 'SELECT * FROM `news` where `show`="on" and `from`<='.$datums.' ORDER BY `from` desc'; //and `lang`="'.$lang_variable_suf.'"
//echo $sql;
$result = $db->query($sql);
$output[] = '';
while ($row = $result->fetch()) {
$output[] = '
'.htmlspecialchars_decode($row['title']).'
'.$row['datums'].' |
'.getFirstSentence($row['content']).' ['.txt_read_more.']
';
//$output[] = '
';
}
$output[] = '
';
echo join('',$output);
}
?>