<?php


/* 首页 - 简约论坛风格模式 */
/* 162100源码 - 162100.com - download.162100.com */

$title = '首页';

$GLOBALS['this_mode'] = 'f';

$text_city = $city_sql = '';
$city_sql_pre = 'B.';
@ include ('inc/city/getcity.php');
if (file_exists('inc/css/'.$GLOBALS['this_mode'].'/city.php')) {
  @ include ('inc/css/'.$GLOBALS['this_mode'].'/city.php');
}

function get_area_logo($area_id, $column_key) {
  static $step = 0;
  static $step2 = 0;
  if (file_exists('inc/css/'.$GLOBALS['this_mode'].'/area_logo_'.$area_id.'.gif')) {
    return '<img src="inc/css/'.$GLOBALS['this_mode'].'/area_logo_'.$area_id.'.gif" width="36" height="36" />';
  } else {
    $bg = array("#CC6633", "#CCCC00", "#66CC99", "#6699CC", "Plum", "LightBlue", "Silver","YellowGreen", "DarkSlateBlue", "Gray");
    //$bg = array_rand(array("Black" => "黑色", "Sienna" => "赭色", "DarkOliveGreen" => "暗橄榄绿色", "DarkGreen" => "暗绿色", "DarkSlateBlue" => "暗灰蓝色", "Navy" => "海军色", "Indigo" => "靛青色", "DarkSlateGray" => "墨绿色", "DarkRed" => "暗红色", "DarkOrange" => "暗桔黄色", "Olive" => "橄榄色", "Green" => "绿色", "Teal" => "水鸭色", "Blue" => "蓝色", "SlateGray" => "灰石色", "DimGray" => "暗灰色", "Red" => "红色", "SandyBrown" => "沙褐色", "YellowGreen" => "黄绿色", "SeaGreen" => "海绿色", "MediumTurquoise" => "间绿宝石", "RoyalBlue" => "皇家蓝", "Purple" => "紫色", "Gray" => "灰色", "Magenta" => "红紫色", "Orange" => "橙色", "Yellow" => "黄色", "Lime" => "酸橙色", "Cyan" => "青色", "DeepSkyBlue" => "深天蓝色", "DarkOrchid" => "暗紫色", "Silver" => "银色", "Pink" => "粉色", "Wheat" => "浅黄色", "PaleGreen" => "苍绿色", "PaleTurquoise" => "苍宝石绿", "LightBlue" => "亮蓝色", "Plum" => "洋李色"));
    if (!isset($GLOBALS['color'][$column_key])) {
      $GLOBALS['color'][$column_key] = $bg[$step2 % 9];
      $step2++;
    }
    $step++;
    
    return'<span class="area_logo_mark" style="font-size:19px;background-color:'.$GLOBALS['color'][$column_key].'; color:#FFF;">'.$step.'</span>';
  }
}

function get_e($row) {
  global $article_url;
  return '
<div class="e_list" title="首页图文推荐">
  <div class="e_text">
    <span class="e_thumb"><a href="'.eval('return '.$article_url.';').'" target="_blank"><img src="obj.php?title='.$row['thumb'].'" /></a></span>
    <h6><a href="'.eval('return '.$article_url.';').'" target="_blank">'.$row['title'].'</a></h6>
    '.cutstr(strip_tags($row['text']), 150).'
  </div>
</div>';
}

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

$n = $mess = $c = $reply = $member = 0;
$area = $area_root = $area_second = $area_statistics = $area_name = $area_style = $total = $today = $thumb_area = $column = array();
$date = gmdate('md', time() + (floatval($web['time_pos']) * 3600));
$text = '';





if (!isset($sql['db_err'])) {
  db_conn();
}

if ($sql['db_err'] != '') {
  die($sql['db_err']);
}


//取该模板所分配的分类

$result = @mysql_query('SELECT * FROM '.$sql['pref'].''.$sql['data']['承载版区分类的表名'].' WHERE area_id REGEXP "^[0-9]+\-[0-9]+$" AND area_index LIKE "%'.$GLOBALS['this_mode'].'%"', $db);
if (@mysql_num_rows($result) > 0) {
  while ($row = @mysql_fetch_assoc($result)) {
    $area_id_root = $row['area_id'];
    $area_root[$area_id_root] = 1;
    $area_sql_forlistdata[abs($area_id_root)] = 1;
    //$mark[$area_id_root] = $row['area_mark'];
    $area_name[$area_id_root] = $row['area_name'];
    $area_style[$area_id_root] = $row['area_style'];
    $area_description[$area_id_root] = $row['area_description'];
    $total[$area_id_root] = $row['area_total'];
    if (substr($row['area_today'], 0, 4) == $date) {
      $today[$area_id_root] = substr($row['area_today'], 4);
    } else {
      $today[$area_id_root] = 0;
    }
    $result_statistics = @mysql_query('SELECT COUNT(id) AS n FROM '.$sql['pref'].''.$sql['data']['承载版区分类的表名'].' WHERE (area_id LIKE "'.$area_id_root.'\_%") ', $db);
    $row_statistics = @mysql_fetch_assoc($result_statistics);
    $area_statistics[$area_id_root] = $row_statistics['n'] + 1;
    @mysql_free_result($result_statistics);
  }
}
@mysql_free_result($result);

$tongyoung_sql = ' (B.area_id LIKE "'.@implode('-%" OR B.area_id LIKE "', array_keys($area_sql_forlistdata)).'-%") ';

$result = @mysql_query('SELECT area_id,area_name,area_style FROM '.$sql['pref'].''.$sql['data']['承载版区分类的表名'].' WHERE (area_id REGEXP "^('.@implode('|', array_keys($area_sql_forlistdata)).')-[0-9]+_[0-9]+$") ', $db);
//if (@mysql_num_rows($result) > 0) {
  while ($row = @mysql_fetch_assoc($result)) {
    $area_id_root = get_arearoot($row['area_id']);
    //$area[$area_id_root][substr($row['area_id'],strlen($area_id_root)+1)] = '<a href="'.eval('return '.$list_url_area.';').'"'.$row['area_style'].'>'.$row['area_name'].'</a>';
    $area[$area_id_root][substr($row['area_id'],strlen($area_id_root)+1)] = '<a href="'.eval('return '.$list_url_area.';').'"'.$row['area_style'].'>'.$row['area_name'].'</a>';

    $area_second[$area_id_root] ++;
    unset($row, $area_id_rooty);
  }
  @mysql_free_result($result);

  //取首页图文推荐
  $result = @mysql_query('SELECT A.title AS thumb,A.id AS i,A.date,B.id,B.area_id,B.title,B.text FROM '.$sql['pref'].''.$sql['data']['承载上传数据的表名'].' A,'.$sql['pref'].''.$sql['data']['承载主题文章的表名'].' B WHERE A.title LIKE "thumb-%" AND B.id=ABS(SUBSTRING(A.title,7)) AND '.$tongyoung_sql.''.$city_sql.'', $db); //
  if (@mysql_num_rows($result) > 0) {
    $datetime = gmdate("Y-m-d H:i:s", time() + (floatval($web["time_pos"]) * 3600));
    while ($row = @mysql_fetch_assoc($result)) {
      if ($row['date'] > $datetime) {
        $area_id_root = get_arearoot($row['area_id']);
        $thumb_area[$area_id_root] .= get_e($row);
      } else {
        @mysql_query('DELETE FROM '.$sql['pref'].''.$sql['data']['承载上传数据的表名'].' WHERE id="'.$row['i'].'"', $db);
      }
      unset($row, $area_id_root);
    }
  }

  @mysql_free_result($result);
  @uksort($area_root, 'strnatcmp');

  if (count($area_root) > 0) {
  foreach (array_keys($area_root) as $area_id_root) {
    $row['area_id'] = $area_id_root;
    @ksort($area[$area_id_root]);
    $column_key = ltrim(strrchr($area_id_root, '-'), '-');
    if (strlen($column_key) >= 3) {
      $column_key = substr($column_key, 0, -2);
    } else {
      $column_key = 0;
    }

    $column[$column_key] .= '
<div class="area"><div class="area__">
  <table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr valign="top">
      <td class="area_logo"><a href="'.eval('return '.$list_url_area.';').'">'.get_area_logo($area_id_root, $column_key).'</a></td>
      <td style="position:relative;"><span class="area_name" style="float:left;"><a href="'.eval('return '.$list_url_area.';').'"'.($area_description[$area_id_root]?' title="'.$area_description[$area_id_root].'"':'').''.$area_style[$area_id_root].'>'.$area_name[$area_id_root].'</a></span><br />
        <div class="area_n"><a href="javascript:void(0);" name="area_li" id="'.$area_id_root.'" title="点击展开分类" onclick="showClass(this,\'block\');return false;" class="grayword">︾ 论坛分类（<span class="hand" title="子论坛">'.abs($area_second[$area_id_root]).'</span>/<span class="hand" title="全部分类">'.$area_statistics[$area_id_root].'</span>）</a> 主题文章（<a title="今日主题" class="hand'.($today[$area_id_root]>0?' redword" href="'.eval('return '.$list_url_area.';').'&list_type=today"':'"').'>'.$today[$area_id_root].'</a>/<a title="主题总计" class="hand"'.($total[$area_id_root]>0?' href="'.eval('return '.$list_url_area.';').'&list_type=total"':'').'>'.$total[$area_id_root].'</a>）
</div>
        <button class="large" type="button" title="发表" onclick="window.open(\'write.php?mode='.$GLOBALS['this_mode'].'&area_id='.$area_id_root.'\',\'_blank\');"><b><div class="send_write"></div></b></button></td>
    </tr>
  </table>  ';
    if (!empty($area[$area_id_root])) {
      $column[$column_key] .= '
  <div class="area_li" id="area_li_'.$area_id_root.'"><img class="eli" src="inc/css/'.$GLOBALS['this_mode'].'/eli.gif" />'.@implode(' ', $area[$area_id_root]).'</div>'.(isset($thumb_area[$area_id_root]) ? $thumb_area[$area_id_root] : '').'
';
    }
    $column[$column_key] .= '</div></div>';
    unset($row, $area_id_root, $column_ke);
  }
  $text .= '<div class="wrap"><input type="hidden" name="wrap[]" />'.@implode('</div><div class="wrap"><input type="hidden" name="wrap[]" />', $column).'</div>';

  } else {
  $text .= '没有论坛！';
  }

  //点击排行 10条
  $count = 10;
  $text_readrank = '<div class="side"><div class="title">阅览排行</div><ul class="text">';
  $result = @mysql_query('SELECT B.id,B.title,B.city,B.area_id,C.area_name FROM `'.$sql['pref'].''.$sql['data']['承载主题文章的表名'].'` B LEFT JOIN `'.$sql['pref'].''.$sql['data']['承载版区分类的表名'].'` C ON B.area_id=C.area_id WHERE '.$tongyoung_sql.' AND B.area_check="" ORDER BY B.views DESC LIMIT '.$count.'', $db);
  if (@mysql_num_rows($result) > 0) {
    $step_readrank = 0;
    while ($row = @mysql_fetch_assoc($result)) {
      $step_readrank++;
      $text_readrank .= '<li><b style="color:'.($step_readrank <= 3 ? '#FF9900;' : '#9999FF;').';">'.$step_readrank.'.</b> <a href="'.eval('return '.$article_url.';').'" title="'.$row['title'].'" target="_blank">'.cutstr($row['title'], 45).'</a> <span class="ar">[<a href="'.eval('return '.$list_url_area.';').'">'.$row['area_name'].'</a> '.$row['city'].']</span></li>';
      unset($row);
    }
  } else {
    $text_readrank .= '没有记录';
  }
  $text_readrank .= '</ul></div>';
  @mysql_free_result($result);

  //回复排行 10条
  $count = 10;
  $text_reply = '<div class="side"><div class="title">回复排行</div><ul class="text">';
  $result = @mysql_query('SELECT B.id,B.title,B.city,B.area_id,C.area_name FROM `'.$sql['pref'].''.$sql['data']['承载主题文章的表名'].'` B LEFT JOIN `'.$sql['pref'].''.$sql['data']['承载版区分类的表名'].'` C ON B.area_id=C.area_id WHERE '.$tongyoung_sql.' AND B.area_check="" ORDER BY B.reply DESC LIMIT '.$count.'', $db);
  if (@mysql_num_rows($result) > 0) {
    $step_reply = 0;
    while ($row = @mysql_fetch_assoc($result)) {
      $step_reply++;
      $text_reply .= '<li><b style="color:'.($step_reply <= 3 ? '#FF9900;' : '#9999FF;').';">'.$step_reply.'.</b> <a href="'.eval('return '.$article_url.';').'" title="'.$row['title'].'" target="_blank">'.cutstr($row['title'], 45).'</a> <span class="ar">[<a href="'.eval('return '.$list_url_area.';').'">'.$row['area_name'].'</a> '.$row['city'].']</span></li>';
      unset($row);
    }
  } else {
    $text_reply .= '没有记录';
  }
  $text_reply .= '</ul></div>';
  @mysql_free_result($result);

//}
//@ksort($option);


//评论数
  $result = @mysql_query('SELECT COUNT(A.id) AS n FROM
'.$sql['pref'].''.$sql['data']['承载回复评论的表名'].' A
LEFT JOIN
'.$sql['pref'].''.$sql['data']['承载主题文章的表名'].' B
ON A.r_id=B.id WHERE '.$tongyoung_sql.'
', $db);
$row = @mysql_fetch_assoc($result);
$reply = abs($row['n']);
unset($row);
@mysql_free_result($result);
//成员数
$result = @mysql_query('SELECT COUNT(id) AS n FROM '.$sql['pref'].''.$sql['data']['承载成员档案的表名'].'', $db);
$row = @mysql_fetch_assoc($result);
$member = abs($row['n']);
unset($row);
@mysql_free_result($result);
//新成员
$result = @mysql_query('SELECT username,regdate FROM '.$sql['pref'].''.$sql['data']['承载成员档案的表名'].' ORDER BY id DESC LIMIT 1', $db);
$row = @mysql_fetch_assoc($result);
$member_new = $row['username'];
$member_regdate = substr($row['regdate'], 0, 16);
unset($row);
@mysql_free_result($result);
//取短信
if (POWER >= 1) {
  $result = @mysql_query('SELECT mess_num FROM `'.$sql['pref'].''.$sql['data']['承载成员档案的表名'].'` WHERE username="'.$session[0].'" LIMIT 1', $db); //短信
  $row = @mysql_fetch_assoc($result);
  $mess = '<span class="area_statistics">'.preg_replace('/^\d+/', '<span>$0</span>', $row['mess_num']).'</span>';
  @mysql_free_result($result);
  unset($row);
}
@ require ('inc/function/add_online.php'); //在线
//总数
$result = mysql_query('SELECT COUNT(id) AS total FROM '.$sql['pref'].''.$sql['data']['承载在线统计的表名'].''.(!empty($reg_online) ? ' WHERE '.$reg_online : '').'',$db);
$row = @mysql_fetch_assoc($result);
$n_online = abs($row['total']);
@mysql_free_result($result);
unset($row);

$n_online_member = 0;
$text_online .= '';
$result = mysql_query('SELECT * FROM `'.$sql['pref'].''.$sql['data']['承载在线统计的表名'].'` WHERE memberye>0'.(!empty($reg_online) ? ' AND '.$reg_online : '').' ORDER BY memberye DESC', $db); //,utime DESC
while ($row = @mysql_fetch_assoc($result)) {
  $n_online_member++;
  $text_online .= '<span><a href="user.php?get=card&username='.urlencode($row['username']).'" target="_blank">'.$row['username'].' '.$row['userface'].'</a></span>';
}
$text_online = $n_online_member > 0 ? '<div id="li_online" class="li">'.$text_online.'</div>' : '';
@mysql_free_result($result);
unset($row);

$sql['sql_version'] = @mysql_get_server_info();
@mysql_close();

?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php
echo $web['sitename'], $web['code_author'];
?></title>
<meta name="Description" content="<?php echo $web['description']; ?>" />
<meta name="keywords" content="<?php echo $web['keywords']; ?>" />
<link id="my_style" rel="stylesheet" type="text/css" href="inc/css/<?php echo $GLOBALS['this_mode']; ?>/style.css">
<script language="javascript" src="inc/js/main.js" type="text/javascript"></script>
<script>
	function showClass(o, type) {
		var areaClass=$('area_li_'+o.id);
		if(areaClass!=null){
			if(type=='block'){
				o.title="点击隐藏分类";
				areaClass.style.display="block";
				o.innerHTML=o.innerHTML.replace(/︾/g, "︽");
				o.onclick=function(){
					showClass(this, 'none');
				}
			}else{
				o.title="点击展开分类";
				areaClass.style.display="none";
				o.innerHTML=o.innerHTML.replace(/︽/g, "︾");
				o.onclick=function(){
					showClass(this, 'block');
				}
			}
		}
		SortAll();
	}
		
function showAllClass(o, type) {
  var allA = document.getElementsByName("area_li");
  if (allA.length > 0) {
    for (var i = 0; i < allA.length; i++) {
		showClass(allA[i], type)
    }
    if($('list_title_in')!=null){
      $('list_title_in').className='';
      $('list_title_in').id='main_all';
    }
    o.className='list_title_in';
    o.id='list_title_in';
  }
  SortAll();

  if(type=='block'){
    if(mainClass==false){
      $('main_class_all').style.display="inline";
      $('main_class_').style.display="none";
    }else{
      $('main_class_all').style.display="none";
      $('main_class_').style.display="none";
    }
  }else{
    if(mainClass!=false){
      $('main_class_').style.display="inline";
      $('main_class_all').style.display="none";
    }else{
      $('main_class_').style.display="none";
      $('main_class_all').style.display="none";
    }
  }

}

function setMainPage(type) {
  if (type == 'all') {
    setCookie('mainpage', type, 365);
  } else {
    setCookie('mainpage', '', -365);
  }
  $('main_class_'+type).style.display='none';
  alert('设置成功！');
}

</script>
<script type="text/javascript">
function Sort(wrap) {
  var n = 3; //列数。必须大于0的整数
  var columnW = wrap.offsetWidth/n; //列宽
  var icolumnT = [];
  for (var k = 0; k < n; k++) {
    icolumnT[k] = 0;
  }
  var minHK;
  var box = wrap.childNodes;
  if (box.length > 0) {
    for(var i = 0; i < box.length; i++) {
	  if (box[i].nodeType == 1) {
		minHK = MK(icolumnT);
		icolumnT[minHK[0]] = minHK[1];
        box[i].style.position = 'absolute';
        box[i].style.top = icolumnT[minHK[0]] + 'px';
        box[i].style.left = (minHK[0] * columnW) + 'px';
        icolumnT[minHK[0]] += box[i].offsetHeight;
	  }
	}
    wrap.style.height = (Math.max.apply({},icolumnT))+'px';
  }
};

function MK(arr) {
  var minArr;
  var minV = arr[0];
  minArr = new Array(0, minV);
  for(var i=1; i<arr.length; i++) {
    if (arr[i] < minV) {
	  minV = arr[i];
	  minArr = new Array(i, arr[i]);
	}
  }
  return minArr;
}


var mainClass=getCookie('mainpage');

function sortAll() {
  if(mainClass=='all'){
    showAllClass($('main_all'), 'block');
  }else{
    SortAll();
  }
}
function SortAll() {
    var allWrap = document.getElementsByName('wrap[]');
    var n = 0;
    if (allWrap != null && allWrap.length > 0) {
      for (var i = 0; i < allWrap.length; i++) {
        Sort(allWrap[i].parentNode);
      }
    }
}

if (document.all) {
  window.attachEvent('onload', sortAll);//对于IE
} else {
  window.addEventListener('load', sortAll, false);//对于FireFox
}
</script>

</head>
<body>
<div id="session" class="session"><div id="city"><?php
echo $text_city;
?></div><?php $power_text .= '<style> .session_in .login_key { display:inline; } </style>';
@ include ('inc/require/head.txt'); ?></div>
<?php
if ($web['siteclose'] > 0) {
  if ($web['siteclose'] == 1) {
    $ann_e = 'include ("inc/require/siteclose_why.txt")';
  } else {
    @include ('inc/require/siteclose_why.txt');
  }
}
?>
<table width="100%" border="0" cellpadding="0" cellspacing="0" id="logo">
  <tr>
    <td width="200"><a href="<?php echo $web['path']; ?>"><img src="<?php echo $web['sitelogo']; ?>" /></a></td>
    <td width="400" align="center"><?php @include ('inc/css/'.$GLOBALS['this_mode'].'/ad_index_logoside.txt'); ?></td>
    <td align="right"><form id="searchform" action="search.php?action=search" method="get" title="搜索文章" onsubmit="return $('keyword').value!=''||false;">
      <input type="hidden" name="area_id" value="all" />
      <input type="hidden" name="action" value="search" />
      <input name="keyword" id="keyword" class="large" type="text" />
      <input type="submit" name="submit" id="submit" class="search_member search_article" value="" />
    </form></td>
  </tr>
</table>
<div id="banner"> <a class="column_is">首页</a> <a href="list_company.php">商号</a> <a href="list_member.php">成员</a> <a href="list_online.php">在线</a> <a href="help.php">帮助</a>
    <?php @include ('inc/css/'.$GLOBALS['this_mode'].'/banner.txt'); ?>
</div>
<div class="column">
  <h5><a href="rss.php?mode=<?php echo $GLOBALS['this_mode']; ?>&area_id=<?php echo $_GET['area_id']; ?>" class="dingyue"><img src="inc/images/rss.gif" width="14" height="14" /> 订阅</a>
       <a href="<?php echo $list_; ?>" class="dingyue">全部文章</a><?php echo $web['description']; ?>——<?php echo @file_get_contents('inc/css/'.$GLOBALS['this_mode'].'/title2.txt'); ?></h5>
  <div class="column_in"> 主题（<a title="今日"<?php echo array_sum($today)>0?' class="hand redword" href="'.$list_.'&list_type=today"':' class="hand"'; ?>><?php echo array_sum($today); ?></a>/<a href="<?php echo $list_; ?>&list_type=total"><?php echo array_sum($total); ?></a>） 回帖（<span class="hand"><?php echo $reply; ?></span>） 成员（<a href="list_member.php" target="_blank"><?php echo $member; ?></a>） 新成员（<a href="user.php?get=card&username=<?php echo urlencode($member_new); ?>" target="_blank"><?php echo $member_new; ?></a> <?php echo $member_regdate; ?>）    <?php eval('return '.$ann_e.';'); ?>

  </div>
</div>
<?php @include ('inc/css/'.$GLOBALS['this_mode'].'/ad_index_top.txt'); ?>
<div class="body">
  <div class="list_title"><a href="javascript:void(0);" class="list_title_in" id="list_title_in" onclick="showAllClass(this, 'none');return false;">论坛<span>（<span class="hand" title="根论坛"><?php echo count($area_root); ?></span>）</span></a><img id="main_class_" class="dingweihome" onclick="setMainPage('')" src="inc/css/<?php echo $GLOBALS['this_mode']; ?>/main_page.gif" title="设为载入时直接显示" /><a href="javascript:void(0);" id="main_all" onclick="showAllClass(this, 'block');return false;" title="瀑布流展示">全部子论坛分类（<span class="hand"><?php echo array_sum($area_statistics); ?></span>）</a><img id="main_class_all" class="dingweihome" onclick="setMainPage('all')" src="inc/css/<?php echo $GLOBALS['this_mode']; ?>/main_page.gif" title="设为载入时直接显示" /></div>

  <div class="body_in">
    <?php
    if (isset($sql['sql_version']) && $sql['sql_version'] < '5.0') {
      echo '<div class="red_err">服务器数据库版本（'.$sql['sql_version'].'）太低！数据可能显示不正常。本程序建设基于MySQL版本5.0以上</div>';
    }
    echo $text, $err;
  ?>
  </div>
</div>



<div class="body">
  <table width="100%" border="0" cellspacing="0" cellpadding="0" class="bottom">
    <tr valign="top">
      <td width="375" style="padding-right:10px;"><?php echo $text_readrank; unset($text_readrank); ?></td>
      <td style="padding-right:10px;"><?php echo $text_reply; unset($text_reply); ?><?php //@include ('inc/require/company_update.txt'); ?></td>
      <td width="220"><div class="hot"><div class="title">热门标签</div><div class="text">
      <?php
      @include ('inc/require/hot_mark.txt');
	  ?></div>
    </div></td>
    </tr>
  </table>
</div>



<?php @include ('inc/require/hot_user.txt'); ?>
<div class="body">
  <div class="list_title"><?php echo '<a href="list_online.php" class="list_title_in" target="_blank">用户在线<span>（'.$n_online.'）</span></a>'; ?>&nbsp;&nbsp;</div>
  <div class="body_in">
    <!--div class="list_title_">
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <th><img src="inc/images/manager_base.gif" width="18" height="16" />&nbsp;&nbsp;基础管理员</th>
          <th><img src="inc/images/manager.gif" width="18" height="16" />&nbsp;&nbsp;管理员</th>
          <th><img src="inc/images/admin_big.gif" width="16" height="16" />&nbsp;&nbsp;版主</th>
          <th><img src="inc/images/admin.gif" width="16" height="16" />&nbsp;&nbsp;当前版主</th>
          <th><img src="inc/images/diamond.gif" width="16" height="16" />&nbsp;&nbsp;钻级成员</th>
          <th><img src="inc/images/gold.gif" width="12" height="16" />&nbsp;&nbsp;金级成员</th>
          <th><img src="inc/images/silver.gif" width="12" height="16" />&nbsp;&nbsp;银级成员</th>
          <th><img src="inc/images/iron.gif" width="12" height="16" />&nbsp;&nbsp;铁级成员</th>
        </tr>
      </table>
    </div-->
    <?php echo $text_online; ?> <?php echo $n_online - $n_online_member > 0 ? '<div id="li_online" class="li"><span><a href="list_online.php?act=guest" target="_blank">'.($n_online - $n_online_member).'位访客…</a></span></div>' : ''; ?> </div>
</div>

<div class="friend_link"> <a class="greenword"><b>常用工具</b></a>
    <?php @include ('inc/css/'.$GLOBALS['this_mode'].'/tools.txt'); ?>
</div>

<div class="friend_link"> <a class="greenword"><b>友情链接</b></a>
  <?php @include ('inc/css/'.$GLOBALS['this_mode'].'/friendlink.txt'); ?>
</div>

<?php @include ('inc/css/'.$GLOBALS['this_mode'].'/ad_index_bottom.txt'); ?>
<div id="foot">
  <?php @include ('inc/css/'.$GLOBALS['this_mode'].'/foot.txt'); ?>
  <a style="COLOR: #666666" href="http://www.miibeian.gov.cn/" target="_blank"><?php @include ('inc/require/icp.txt'); ?></a>
</div>
<script language="JavaScript" type="text/javascript">
<!--
try{$('new_mess').innerHTML='<?php echo $mess; ?>';}catch(err){}
-->
</script>

</body>
</html>