<?php
//echo @file_get_contents('http://info.162100.com/get_newinfo_for162100.php');



@ require ('inc/set/set.php');
@ require ('inc/set/set_sql.php');
@ require ('inc/function/cutstr.php');








//处理伪静态
if ($web['url_html_list'] == 1) {
  $list_         = 'list.'.$web['sitemode'].'...1.html';
} else {
  $list_         = 'list.php?mode='.$web['sitemode'];
}
if ($web['url_html_article'] == 1) {
  $article_url   = '"article.'.$web['sitemode'].'.".$row["id"].".1.html"';
} else {
  $article_url   = '"article.php?mode='.$web['sitemode'].'&id=".$row["id"].""';
}
if ($web['url_html_article'] == 1) {
  $article_url   = '"article.'.$web['sitemode'].'.".$row["id"].".1.html"';
} else {
  $article_url   = '"article.php?mode='.$web['sitemode'].'&id=".$row["id"].""';
}


if ($db = @mysql_connect($sql['host'].':'.$sql['port'], $sql['user'], $sql['pass'])) {
  if (@mysql_select_db($sql['name'], $db)) {
    @mysql_query('SET NAMES '.$sql['char'].'');

    //最新10条
    $count = 10;
    $text_top = '';
    $result = @mysql_query('SELECT id,title FROM `'.$sql['pref'].''.$sql['data']['承载主题文章的表名'].'` WHERE area_check="0" ORDER BY id DESC LIMIT '.$count.'', $db);
    if (@mysql_num_rows($result) > 0) {
      while ($row = @mysql_fetch_assoc($result)) {
        $text_top .= '<li><a href="'.$web['path'].''.eval('return '.$article_url.';').'" title="'.$row['title'].'" target="_blank">'.cutstr($row['title'], 40).'</a></li>';
        unset($row);
      }
    }
    @mysql_free_result($result);

  }
  @mysql_close();
}


echo $text_top != '' ? $text_top : '暂无记录';
echo '<p style="text-align:right;"><a href="'.$web['path'].''.$list_.'" target="_blank">更多&gt;&gt;</a></p>';


?>