dir = ROOT_DIR.'/templates/'.$config['skin'];;
define('TEMPLATE_DIR', $tpl->dir);
$id = intval($_REQUEST['news_id']);
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// "Начало" Показ краткого содержания
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
if($_REQUEST['action'] == "plus")
{
$result = $db->query("SELECT * FROM ".PREFIX."_post WHERE id='{$id}'");
$row = $db->get_row($result);
$tpl->load_template('newslist/newslist.tpl');
/* Делаем минус место плюча */
$tpl->set('{spoiler}',"");
$tpl->set("{story}", stripslashes($row['short_story']));
$tpl->set("{title}", stripslashes($row['title']));
$date_news = strtotime($row['date']);
$link = $config['http_home_url'].$row['id']."-".$row['alt_name'].".html";
$tpl->set("{link}", $link);
if(isset($_GET['author'])){$autor = "".stripcslashes($row['autor'])."";}else{$autor = "".stripcslashes($row['autor'])."";}
$tpl->set("{author}", $autor);
if($is_logged){$tpl->set("[hide]", "");$tpl->set("[/hide]", "");}
else{$tpl->set_block("'\\[hide\\](.*?)\\[/hide\\]'si","
Скрытый текст, необходима авторизация.
");}
$tpl->set("{rating}", $row['rating']);
$date = date("d.m.Y",strtotime($row['date']));
$tpl->set("{date}", $date);
$tpl->set("[ajax]", "");
$tpl->set("[/ajax]", "");
$tpl->set_block("'\\[not-ajax\\](.*?)\\[/not-ajax\\]'si","");
$tpl->set("{coments}", $row['comm_num']);
$tpl->set("{prosmotr}", $row['news_read']);
$tpl->set('{THEME}', $config['http_home_url'].'templates/'.$config['skin']);
$tpl->compile('newslistspoiler');
@header( "Content-type: text/html; charset=" . $config['charset'] );
echo $tpl->result['newslistspoiler'];
}elseif($_REQUEST['action'] == "minus"){
$result = $db->query("SELECT * FROM ".PREFIX."_post WHERE id='{$id}'");
$row = $db->get_row($result);
$tpl->load_template('newslist/newslist.tpl');
$tpl->set('{spoiler}',"");
$tpl->set("{story}", "");
$tpl->set("{title}", stripslashes($row['title']));
$date_news = strtotime($row['date']);
$link = $config['http_home_url'].$row['id']."-".$row['alt_name'].".html";
$tpl->set("{link}", $link);
if($row['approve'] == 1){$moder = "Да";}else{$moder = "Нет";}
if(isset($_GET['author'])){$autor = "".stripcslashes($row['autor'])."";}else{$autor = "".stripcslashes($row['autor'])."";}
$tpl->set("{author}", $autor);
$tpl->set("{rating}", $row['rating']);
$date = date("d.m.Y",strtotime($row['date']));
$tpl->set("{date}", $date);
$tpl->set_block("'\\[ajax\\](.*?)\\[/ajax\\]'si","");
$tpl->set("[not-ajax]", "");
$tpl->set("[/not-ajax]", "");
$tpl->set("{coments}", $row['comm_num']);
$tpl->set("{prosmotr}", $row['news_read']);
$tpl->set('{THEME}', $config['http_home_url'].'templates/'.$config['skin']);
$tpl->compile('newslistspoiler');
@header( "Content-type: text/html; charset=" . $config['charset'] );
echo $tpl->result['newslistspoiler'];
}
?>