="'.$year.'-'.$month.'-'.$day.' 00:00:00") AND'; $id_cat = -1; $type_name = 'Публикации за '.date_select($year.'-'.$month.'-'.$day,-5,'','y-m-d'); } require_once $z."include/module/content_show.php"; $title = ($cr['meta_title'] ? ($cr['meta_title']) : $type_name); $desc = ($cr['meta_descr']); $keys = ($cr['meta_keywords']); p_start(($title),'','',$desc,$keys); if ($id_cat) $crumbs = $section_crumbs.'^|'.$type_name; else $crumbs = $section_crumbs_lastnotlink; p_header('news', $crumbs); } if ($id_cat && $type_name) { echo '

'.$type_name.'

'; } elseif (!$_fromscript) { echo $echo; } $where = 'WHERE a.status="1"'; if ($id_cat > 0) { $where .= ' AND a.id_cat="'.$id_cat.'"'; } $where .= ' AND (a.cdate<="'.$nowsqldate.' 23:59:59")'; $sql = 'SELECT a.*, b.pretty_url AS caturl, b.name AS catname FROM '.$dbtable['news'].' a LEFT JOIN '.$dbtable['newscat'].' b ON (b.id=a.id_cat) '.$where.' ORDER BY a.cdate DESC, a.id DESC'; $sql_count = 'SELECT COUNT(*) AS rtotal FROM '.$dbtable['news'].' a '.$where; $rpp = intval($xoptions['mv_page']); $p = intval($_GET['p']); if (!$p) $p = 1; $selectresult = db_pageselect($sql_count, $sql, $rpp, $p); $nav = dbp_nav (20, "./", "", $site['root'], $selectresult['p'], $rpp, $selectresult['ptotal'], $selectresult['rtotal']); $result = $selectresult['result']; if ($selectresult['rtotal']) { require 'list.php'; if ($nav) echo $nav; mysql_free_result($result); // очистка } if (!$_fromscript) { p_bottom(); p_final(); } ?>