<?php

/* 文章页 - 分类信息风格模式 */
/* 162100源码 - 162100.com - download.162100.com */

$_GET['id'] = preg_replace('/[^\d]+/', '', $_GET['id']);
$GLOBALS['this_mode'] = 'i';

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

$data_type = '';
$text = $text_area_index = '';

$re_err = '"".($row["reply"] - $n_re)."条已被删除或屏蔽，"';
if (!empty($_GET['only'])) {
  $_GET['only'] = strtolower(trim($_GET['only']));
  $_GET['only'] = str_replace('.', '&#46;', $_GET['only']);
  if (!preg_match('/^([^\x00-\x7f]|\w|&#46;){3,45}$/', $_GET['only'])) {
    die('&#29992;&#25143;&#21517;&#19981;&#21512;&#27861;&#65281;');
  }
  $re_err = '当前只显示'.$_GET['only'].'的回复，其它回复';
  $data_type = ' AND author_ip="'.$_GET['only'].'"';
}

$n_re = $mess = $point = 0;

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 id="'.$_GET['id'].'" LIMIT 1', $db);
if (!($row = @mysql_fetch_assoc($result))) {
  die('&#26597;&#19981;&#21040;&#35813;&#35760;&#24405;&#65292;&#21487;&#33021;&#25991;&#31456;&#24050;&#34987;&#21024;&#38500;&#12290;&#35831;<a href="javascript:window.history.back();">&#36820;&#22238;</a>');
}
@mysql_free_result($result);
if (!strstr($row['author_ip'], '.')) {
  $authors[] = $row['author_ip'];
} else {
  $GLOBALS['author_file'][$row['author_ip']] = hidden_ip($row['author_ip']);
}
$area_id_root = get_arearoot($row['area_id']);

if (strstr($session[4].'-string', '('.$area_id_root.')')) {
  $_POWER = 3;
}
$userface = user_class($_POWER, $session[3]);

//取栏目
$arr_area_title = array();
$base_title = $row['area_id'];
$eval_title = 'area_id="'.$row['area_id'].'"';
$area_title = '$arr_area_title[\''.$row['area_id'].'\']';
while (strpos($base_title, '_') !== false) {
  $base_title = preg_replace('/\_\d+$/', '', $base_title);
  $eval_title .= ' OR area_id="'.$base_title.'"';
  $area_title = '$arr_area_title[\''.$base_title.'\'].\' &gt; \'.'.$area_title.'';}
$result = @mysql_query('SELECT * FROM `'.$sql['pref'].''.$sql['data']['承载版区分类的表名'].'` WHERE '.$eval_title.'', $db);
if (mysql_num_rows($result) > 0) {
  while ($row_area = @mysql_fetch_assoc($result)) {
    if ($row_area['area_id'] == $area_id_root) {
      $area_power = $row_area;
    }
    $arr_area_title[$row_area['area_id']] = '<a href="'.eval('return '.$list_url_area.';').'"'.$row_area['area_style'].'>'.$row_area['area_name'].'</a> ';
    unset($row_area);
  }
}
@mysql_free_result($result);
//@uksort($arr_area_title, 'strnatcmp');
eval('$title1 = '.$area_title.';');
/*
if (empty($arr_area_title[$row['area_id']])) {
  die('&#26631;&#31614;&#38169;&#35823;&#65281;&#35831;&#20174;<a href="./'.$index_url.'">&#39318;&#39029;</a>&#37325;&#26032;&#24320;&#22987;');
}
*/
if (!empty($area_power['area_index']) && !strstr($area_power['area_index'], $GLOBALS['this_mode'])) {
  $sitemode = false;
  if (strstr($area_power['area_index'], $web['sitemode'])) {
    $sitemode = $web['sitemode'];
  } else {
    foreach (@explode('|', $area_power['area_index']) as $mode) {
      if (file_exists('inc/css/'.$mode.'/index.php') && file_exists('inc/css/'.$mode.'/list.php') && file_exists('inc/css/'.$mode.'/article.php')) {
        $sitemode = $mode == $web['sitemode'] ? $web['sitemode'] : $mode;
        break;
      }
    }
    if ($sitemode ==false) {
      $text_area_index .= '<div class="red_err">以下内容所属栏目分类并没有分配至当前模板！但是可以借此模板正常显示</div>';
    } else {
      $GLOBALS['this_mode'] = $sitemode;
      header('location: '.eval('return '.$article_url.';'));
    }
  }
  unset($sitemode, $mode);
}
if (floatval($area_power['area_power_read']) > 0 ) {
  if (floatval($session[3]) < floatval($area_power['area_power_read'])) {
    die('&#26412;&#26639;&#30446;&#38656;&#35201;&#25104;&#21592;&#30331;&#24405;&#19988;&#31215;&#20998;&#22823;&#20110;'.$area_power['area_power_read'].'&#20998;&#65281;&#35831;<a href="javascript:window.history.back();">&#36820;&#22238;</a>');
  }
} elseif ($area_power['area_power_read'] == '-1') {
  if ($_POWER < 1) {
    die('&#26412;&#26639;&#30446;&#38656;&#35201;&#25104;&#21592;&#30331;&#24405;&#65281;&#35831;<a href="javascript:window.history.back();">&#36820;&#22238;</a>');
  }
}
if ($area_power['area_check'] == '1') {
  if ($row['area_check'] == '1' && ($_POWER <= 1 && $session[0] != $row['author_ip'])) {
    die('&#35813;&#25991;&#23578;&#22312;&#23457;&#26680;&#20013;&#65281;');
  }
}
if ($area_power['area_check_reply'] == '1') {
  //$data_type = ' AND area_check_reply="0"';
}

$p = 1;

$id = $row['id'];

//取邻近记录
$text_new_li = '<div class="side">
      <div class="title"><a href="'.eval('return '.$list_url_area.';').'" class="more">更多&gt;&gt;</a>本分类更多信息</div><ul class="text">';
$result = mysql_query('SELECT id,title FROM `'.$sql['pref'].''.$sql['data']['承载主题文章的表名'].'` WHERE area_id="'.$row['area_id'].'" ORDER BY id DESC LIMIT 10', $db);
if (@mysql_num_rows($result) > 0) {
  while ($row_new_li = mysql_fetch_assoc($result)) {
    $row_new_li['title'] = preg_replace('/(\|.*)?/', '', $row_new_li['title']);
    $row['id'] = $row_new_li['id'];
    $text_new_li .= '<li><a href="'.eval('return '.$article_url.';').'" title="'.$row_new_li['title'].'" target="_blank">'.cutstr($row_new_li['title'], 60).'</a></li>';
    unset($row_new_li);
  }
} else {
  $text_new_li .= '暂无记录';
}
$text_new_li .= '</ul></div>';
@mysql_free_result($result);

$row['id'] = $id;

if ($_POWER >= 3) {
  $dis_noe = '';
} else {
  $dis_noe = ' style="display:none;"';
}

if (!empty($row['id'])) {
  if (!empty($row['reward'])) {
    $reward = '<br /><span class="redword">此文设悬赏金：'.$row['reward'].'</span>';
    $eval_reward_re = '"获赏".$row_re["reward"]."" ';
  }
  if (strstr($row['title_mark'], '图')) {
    $datetime = gmdate("Y-m-d H:i:s", time() + (floatval($web["time_pos"]) * 3600));
    $result_thumb = @mysql_query('SELECT id,date FROM `'.$sql['pref'].''.$sql['data']['承载上传数据的表名'].'` WHERE title LIKE "thumb-'.$_GET['id'].'.%"', $db);
    if ($row_thumb = @mysql_fetch_assoc($result_thumb)) {
      if ($row_thumb['date'] > $datetime) {
        $index_e_key .= '<span class="redword">此文首页图文展示中</span> <a href="webmaster_central.php?post=unity_run&dataname=listdata&limit=cess_index&id='.$_GET['id'].'" class="grayword"'.$dis_noe.'>撤展</a> ';
      } else {
        $index_e_key .= '<a href="webmaster_central.php?post=unity_run&dataname=listdata&limit=ess_index&id='.$_GET['id'].'" class="grayword"'.$dis_noe.'>首页图文展示</a> ';
        @mysql_query('DELETE FROM '.$sql['pref'].''.$sql['data']['承载上传数据的表名'].' WHERE id="'.$row['id'].'"', $db);
      }
      unset($row_thumb);
    } else {
      $index_e_key .= '<a href="webmaster_central.php?post=unity_run&dataname=listdata&limit=ess_index&id='.$_GET['id'].'" class="grayword"'.$dis_noe.'>首页图文展示</a> ';
    }
    @mysql_free_result($result_thumb);
  } else {
    $index_e_key .= '<del'.$dis_noe.'>首页图文展示（无图）</del> ';
  }
  //从用户档案转来的查看
  if (!empty($_GET['reply_id']) && is_numeric($_GET['reply_id'])) {
    $result_re_ = @mysql_query('SELECT COUNT(id) AS total_ FROM `'.$sql['pref'].''.$sql['data']['承载回复评论的表名'].'` WHERE r_id="'.$_GET['id'].'" AND id<='.$_GET['reply_id'].'', $db);
    if ($row_re_ = @mysql_fetch_assoc($result_re_)) {
      $n_re_ = abs($row_re_['total_']);
      $_GET['p'] = ceil($n_re_ / $web['pagesize']);
      unset($row_re_, $n_re_);
    }/* else {
      die('&#x56DE;&#x590D;&#x5DF2;&#x4E0D;&#x5B58;&#x5728;&#xFF01;');
    }*/
    @mysql_free_result($result_re_);
    //$data_type = ' AND id="'.$_GET['reply_id'].'"';
    //$re_err = '当前只显示你要查看的回复，其它回复。';
  }

  //取回复
  $result = @mysql_query('SELECT COUNT(id) AS total FROM `'.$sql['pref'].''.$sql['data']['承载回复评论的表名'].'` WHERE r_id="'.$_GET['id'].'"'.$data_type.'', $db);// AND text<>"<赞>" AND text<>"<拍>"
  $row_re = @mysql_fetch_assoc($result);
  $n_re = abs($row_re['total']);
  unset($row_re);
  @mysql_free_result($result);

  if ($n_re > 0) {
    $p = get_page($n_re); //页数
    $seek = $web['pagesize'] * ($p-1);
    $result = @mysql_query('SELECT * FROM `'.$sql['pref'].''.$sql['data']['承载回复评论的表名'].'` WHERE r_id="'.$_GET['id'].'"'.$data_type.' ORDER BY id '.($_GET['order'] == 'desc' ? 'DESC' : 'ASC').' LIMIT '.$seek.','.$web['pagesize'].'', $db);
    $del_bar_ = '';
    if ($_POWER >= 3) {
      $del_bar_ = '$del_bar = " <a href=\"webmaster_central.php?post=unity_run&id=".$row_re["id"]."&dataname=reply&limit=del&m=1\" target=\"lastFrame\">删除</a>";';
    }

    while ($row_re = mysql_fetch_assoc($result)) {
      $seek++;
      $bu = $row_re['floor'] ? $row_re['floor'] : $seek;
      eval($del_bar_);
      if (!strstr($row_re['author_ip'], '.')) {
        $authors[] = $row_re['author_ip'];
        $u_class = ' class="author_face_file"';
        $row_re_author_ip = $row_re['author_ip'];
      } else {
        $GLOBALS['author_file'][$row_re['author_ip']] = '';
        $row_re_author_ip = hidden_ip($row_re['author_ip']);
        $u_class = '';
      }
      //取引用
      if (!empty($row_re['quote'])) {
        if (!isset($GLOBALS['quote'][$row_re['quote']])) {
          $GLOBALS['quote'][$row_re['quote']] = get_quote($row_re['quote']);
        }
      }
      if ($row_re['area_check_reply'] == 0) {
        $text_re .= 'echo \'<div id="reply_'.$row_re['id'].'"><table width="100%" border="0" cellspacing="0" cellpadding="0" class="author">
  <tr>
    <td width="400"'.$u_class.'><span class="author_face_file_in">\'.$GLOBALS[\'author_file\'][\''.$row_re['author_ip'].'\'].\'</span><span class="grayword">#'.$bu.'：</span> '.$row_re_author_ip.' - <i>'.$row_re['date'].'</i></td>
    <td align="right">'.eval('return '.$eval_reward_re.';').' <a href="#reply_lou" class="quote" onclick="rePower(\\\'#'.$bu.'\\\',\\\'huifu\\\', \\\''.$row_re_author_ip.'\\\', \\\''.$row_re['id'].'\\\')" title="回复/引用"></a> <a class="add_collect" href="member.php?post=unity_run&dataname=myaccount&id[]='.$row_re['id'].'&limit=collect_reply&m=1" target="lastFrame" title="将评论加入“我的收藏”"></a>'.$del_bar.'</td>
  </tr>
</table>'.$GLOBALS['quote'][$row_re['quote']].'<div id="#'.$bu.'" class="text">'.str_replace("'", "\'", $row_re['text']).'</div></div>
\';
';


      } else {
        $contents_ = $row_re['area_check_reply'] == 2 ? '审核未通过' : '尚在审核中';
        $text_re .= 'echo \'<div id="reply_'.$row_re['id'].'"><table width="100%" border="0" cellspacing="0" cellpadding="0" class="author" id="reply_'.$row_re['id'].'">
  <tr>
    <td width="400"><span class="grayword">#'.$bu.'：</span>'.$row_re_author_ip.' - <i>'.$row_re['date'].'</i></td>
    <td align="right">'.$del_bar.'</td>
  </tr>
</table><div id="#'.$bu.'" class="text">该文'.$contents_.'</div></div>
\';
';

        unset($contents_);
      }
    }
    $text_re .= 'echo \'<span id="reply_last"></span>\';';
    @mysql_free_result($result);
  } else {
    $text_re .= 'echo \'暂无评论\';';
  }

  //预查询用户档案，储存备用
  $result = @mysql_query('SELECT username,power,point,writecount,replycount,regdate,company,sign FROM `'.$sql['pref'].''.$sql['data']['承载成员档案的表名'].'` WHERE username="'.implode('" OR username="', $authors).'"', $db);
  while ($row_au_re = @mysql_fetch_assoc($result)) {
    $GLOBALS['author_file'][$row_au_re['username']] = get_author_file($row_au_re);
  }
  unset($row_au_re);
  @mysql_free_result($result);

  $text_re .= $row['reply'] > $n_re ? 'echo \'<div class="red_err" style="margin-bottom:10px;">'.eval('return '.$re_err.';').'不再显示 [<a href="'.eval('return '.$article_url.';').'&order=&only=">回到全部回复</a>]</div>\';' : '';



//取关键词
$result_search = @mysql_query('SELECT title FROM '.$sql['pref'].''.$sql['data']['承载关键词的表名'].' WHERE id="'.$_GET['id'].'" LIMIT 1', $db);
if ($row_search = @mysql_fetch_assoc($result_search)) {
  $row_search['title'] = preg_replace('/^.*\|TMD\|/', '', $row_search['title']);
  $keywords = entities2utf8($row_search['title']);
}
unset($row_search);
@mysql_free_result($result_search);

} else {
  die('id error!');
}

//取短信
if ($_POWER >= 1) {
  $result = @mysql_query('SELECT mess_num,point FROM `'.$sql['pref'].''.$sql['data']['承载成员档案的表名'].'` WHERE username="'.$session[0].'" LIMIT 1', $db); //短信
  $row_member = @mysql_fetch_assoc($result);
  $mess = '<span class="area_statistics">'.preg_replace('/^\d+/', '<span>$0</span>', $row_member['mess_num']).'</span>';
  $point = $row_member['point'];
  @mysql_free_result($result);
  unset($row_member);
}

$title = $row['title'];
define('POWER', $_POWER);
@mysql_query('UPDATE '.$sql['pref'].''.$sql['data']['承载主题文章的表名'].' SET views=views+1 WHERE id="'.$_GET['id'].'"', $db);
@ require ('inc/function/add_online.php'); //在线


@mysql_close();

function get_quote($id) {
  global $web, $row, $sql, $db;
  $text = '';
  $result_quote = @mysql_query('SELECT id,author_ip,date,text,area_check_reply,floor FROM `'.$sql['pref'].''.$sql['data']['承载回复评论的表名'].'` WHERE id="'.$id.'" LIMIT 1', $db);
  $row_quote = mysql_fetch_assoc($result_quote);
  @mysql_free_result($result_quote);
  if (is_array($row_quote)) {
    /*
    if (!$row_quote['text']) {
      return '<div class="text"><fieldset><legend><b><a href="user.php?get=card&username='.urlencode($row_quote['author_ip']).'" target="_blank">'.$row_quote['author_ip'].'</a> '.$row_quote['date'].'发表在 <a href="?mode='.$GLOBALS['this_mode'].'&id='.$row['id'].'&reply_id='.$row_quote['id'].'#reply_'.$row_quote['id'].'">'.$row_quote['floor'].' 楼</a>：</b></legend>引用回复的文章不存在或已被删除！</fieldset></div>';
    }
    */
    $row_quote_author_ip = !strstr($row_quote['author_ip'], '.') ? '<a href="user.php?get=card&username='.urlencode($row_quote['author_ip']).'" target="_blank">'.$row_quote['author_ip'].'</a>' : hidden_ip($row_quote['author_ip']);
    if ($row_quote['area_check_reply'] == 1) {
      $text .= '<div class="text"><fieldset><legend><b>'.$row_quote_author_ip.' '.$row_quote['date'].'发表在 <a href="?mode='.$GLOBALS['this_mode'].'&id='.$row['id'].'&reply_id='.$row_quote['id'].'#reply_'.$row_quote['id'].'">'.$row_quote['floor'].' 楼</a>：</b></legend>此文尚在审核中</fieldset></div>';

    } elseif ($row_quote['area_check_reply'] == 2) {
      $text .= '<div class="text"><fieldset><legend><b>'.$row_quote_author_ip.' '.$row_quote['date'].'发表在 <a href="?mode='.$GLOBALS['this_mode'].'&id='.$row['id'].'&reply_id='.$row_quote['id'].'#reply_'.$row_quote['id'].'">'.$row_quote['floor'].' 楼</a>：</b></legend>此文审核未通过</fieldset></div>';
    } else {
      $short_str=cutstr($row_quote['text'], 450);
      if (preg_match('/<img [^>]*src[\s\r\n]*=(?![\s\r\n]*\"?('.preg_quote($web['path'], '/').')?inc\/images\/)[^>]*>/i', $row_quote['text'], $mi)) {
        $first_img='<br /><span class="iface_s">'.$mi[0].'</span>';
      }
      $text .= '<div class="text"><fieldset><legend><b>'.$row_quote_author_ip.' '.$row_quote['date'].'发表在 <a href="?mode='.$GLOBALS['this_mode'].'&id='.$row['id'].'&reply_id='.$row_quote['id'].'#reply_'.$row_quote['id'].'">'.$row_quote['floor'].' 楼</a>：</b></legend>'.$short_str.$first_img.'</fieldset></div>';
    }
  }
  unset($row_quote);
  return $text;
}

function get_author_file($row_au_re) {
  global $web, $row, $article_url, $p;
  $text .= '<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td style="padding-right:15px;">';
  $text .= '<span class="iface_b"><span class="louzhuis filter">'.($row_au_re['username']==$row['author_ip']?'作<br />者':'<button type="button" class="small" title="只看该人回复" onclick="location.href=\''.eval('return '.$article_url.';').'&order='.$_GET['order'].'&only='.urlencode($row_au_re['username']).'\';"><b>&raquo;</b></button>').'</span><img src="obj.php?title=face-'.urlencode($row_au_re['username']).'.'.$web['img_up_format'].'" width="'.$web['img_w_b'].'" height="'.$web['img_h_b'].'" /></span>';
  $text .= '</td><td>';
  if (!empty($row_au_re['company']) || !empty($row_au_re['sign'])) {
    $sign = !empty($row_au_re['company']) ? $row_au_re['company'] : $row_au_re['sign'];
    $sign = ''.(!empty($row_au_re['sign']) ? '<a href="user.php?get=company&username='.urlencode($row_au_re['username']).'" target="_blank">'.$sign.'</a>' : $sign);
  } else {
    $sign = '未登记';
  }
  $text .= '
等级：'.users_class($row_au_re['power'], $row_au_re['point']).'
<br />文章：'.(abs($row_au_re['writecount']) > 0 ? '<a href="user.php?get=list&username='.urlencode($row_au_re['username']).'" title="文章数" target="_blank">'.$row_au_re['writecount'].'</a>' : 0).'|'.(abs($row_au_re['replycount']) > 0 ? '<a href="user.php?get=reply&username='.urlencode($row_au_re['username']).'" title="回复数" target="_blank">'.$row_au_re['replycount'].'</a>' : 0).'
<br />注册：'.substr($row_au_re['regdate'], 0, 10).'
<br />商号：'.$sign.'
<br />信誉：<a href="user.php?get=credit&username='.urlencode($row_au_re['username']).'" target="_blank">查看资质</a>
</td></tr></table>';
  return $text;
}
//身份图像
function users_class($power, $point) {
  global $web, $session;
  if ($power == 'm') {
    $image = '<img src="inc/images/manager'.($session[0] == $web['manager'] ? '_base' : '').'.gif" title="管理员">';
  } elseif (preg_match('/\d+/', $power)) {
    $image = '<img src="inc/images/admin_big.gif" title="版主">';
  } else {
    if ($point >= 0 && $point <= abs($web['class_iron'])) {
      $image = '<img src="inc/images/iron.gif" width="'.(ceil($point / (abs($web['class_iron']) / 10) * 3) + 3).'" height="16" title="积分'.$point.'-铁级用户">';
    }elseif ($point > abs($web['class_iron']) && $point <= abs($web['class_silver'])) {
      $image = '<img src="inc/images/silver.gif" width="'.(ceil($point / (abs($web['class_silver']) / 10) * 3) + 3).'" height="16" title="积分'.$point.'-银级用户">';
    }elseif ($point > abs($web['class_slive']) && $point <= abs($web['class_gold'])) {
      $image = '<img src="inc/images/gold.gif" width="'.(ceil($point / (abs($web['class_gold']) / 10) * 3) + 3).'" height="16" title="积分'.$point.'-金级用户">';
    }else{
      $text = '';
      $n = ceil($point / abs($web['class_gold'])) - 1;
      for ($i = 0; $i < $n; $i++) {
        $text .= '<img src="inc/images/diamond.gif">';
      }
      return '<span title="积分'.$point.'-'.$n.'钻级用户">'.$text.'</span>';
    }
  }
  return $image;
}

?><!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 $title, $web['code_author']; ?></title>
<meta name="Description" content="<?php echo $row['title']; ?>" />
<meta name="keywords" content="<?php echo $keywords; ?>" />
<link id="my_style" rel="stylesheet" type="text/css" href="inc/css/<?php echo $GLOBALS['this_mode']; ?>/style.css">
<style type="text/css">
.temp_reply { width:960px; /*position:absolute !important;*/ position:fixed; left:50%; bottom:0; margin-left:-480px; border-color:#FF9900; border-style:dotted; }
.temp_reply .li_article_r { background-color:#FFFFCC; }
/*#reply_lou { display:none; padding:4px 0; width:100%; height:20px; line-height:20px; position:absolute; top:0; left:0; z-index:99; background-color:#F2F2F2; border-bottom:#999999 1px solid; overflow:hidden; }*/
#reply_lou { display:none; padding:10px; text-align:right; background-color: #FFFF99; margin-bottom:10px; overflow:hidden; }
#reply_lou button { }
#reply_lou fieldset { text-align:left; border:1px #669999 solid; line-height:normal; margin:0px 10px; padding:5px; font-size:12px; clear:both; }

</style>
<script language="javascript" src="inc/js/main.js" type="text/javascript"></script>
<script language="JavaScript" type="text/javascript">
<!--
function closeLouEditor(){
    $('lou').value='';
    $('reply_lou').style.display='none';
    $('reply_lou').innerHTML='';
    try{runReset();}catch(e){}
}

function rePower(bu,type,username,reId){
  <?php //echo $rePowerKey; ?>;
  var str=$(bu).innerHTML.replace(/[\r\n]+/g, '').replace(/<\!-- ad -->.*<\!-- \/ad -->/ig, '');
  var shortStr=cutstr(str, 450);
  var firstImg='';
  if (mi=str.match(/<img [^>]*src[\s\r\n]*=(?![\s\r\n]*\"?(<?php echo preg_quote($web['path'], '/'); ?>)?inc\/images\/)[^>]*>/i)) {
    firstImg='<br /><span class="iface_s">'+mi[0]+'</span>';
  }
  $('lou').value=bu+'|'+username+'|'+reId+'|'+str;
  var reText='<fieldset><legend><b>回复'+username+'发表于'+bu+'楼的内容：</b></legend>'+shortStr+firstImg+'</fieldset>';
  if(type=='huifu'){
    $('reply_lou').style.display='block';
    $('reply_lou').innerHTML='<button type="button" onclick="closeLouEditor()"><b>取消对其回复</b></button>'+reText;
  }else if(type=='yinyong'){
    $('reply_lou').style.display='block';
    $('reply_lou').innerHTML='<button type="button" onclick="closeLouEditor()"><b>取消对其引用</b></button>'+reText;
  }/*else if(type=='zhichi'){
    try{document.mainform162100.imcode.value=getCookie('regimcode');}catch(err){}
    e162100I.document.body.innerHTML=e162100T.value='<b>支持'+bu+'</b> <img src="inc/images/smiley/17.gif" />';
    runSubmit();
  }else if(type=='fandui'){
    try{document.mainform162100.imcode.value=getCookie('regimcode');}catch(err){}
    e162100I.document.body.innerHTML=e162100T.value='<b>反对'+bu+'</b> <img src="inc/images/smiley/16.gif" />';
    runSubmit();
  }*/else{
    alert('命令错误！');
  }
}

-->
</script></head>
<body>
<div id="session" class="session"><div id="city"><?php
if (file_exists('inc/css/'.$GLOBALS['this_mode'].'/city.php')) {
  if (!empty($row['city'])) {
    echo '<b>'.$row['city'].'</b> [<a href="city.php" target="_blank">切换地区</a>]';
  } else {
    echo '<img src="inc/images/po.gif" width="12" height="16" title="此文章发布时未指定地区，现自动选择地区" />';
$text_city = $city_sql = '';
$city_sql_pre = '';
    @ include ('inc/city/getcity.php');
    @ include ('inc/css/'.$GLOBALS['this_mode'].'/city.php');
    echo $text_city;
  }
}
?></div><?php @ include ('inc/require/head.txt'); ?></div>
<?php
if ($web['siteclose'] > 1) {
  @include ('inc/require/siteclose_why.txt');
}
?>
<table width="100%" border="0" cellpadding="0" cellspacing="0" id="logo">
  <tr>
    <td width="200"><img src="<?php echo $web['sitelogo']; ?>" /></td>
    <td width="500"><?php @include ('inc/css/'.$GLOBALS['this_mode'].'/ad_article_logoside.txt'); ?></td>
    <td align="right"><button type="button" onclick="location.href='write.php?mode=<?php echo $GLOBALS['this_mode']; ?>&area_id=<?php echo $row['area_id']; ?>'" class="large"><b><div class="send_write">免费发布信息</div></b></button> <a href="member.php?get=list" class="send2">修改删除信息</a></td>
  </tr>
</table>
<div id="banner"><a href="./">首页</a> <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>
<?php echo $text_area_index; ?>
<div class="column">
  <h5><a href="./<?php echo $list_; ?>">全部栏目</a> &gt; <?php echo $title1; ?></h5>
  <div class="column_in" style="position:relative;"><a href="other_gourl.php?id=<?php echo $_GET['id']; ?>&seek=next&mode=<?php echo $GLOBALS['this_mode']; ?>" class="gourl">下一篇</a><a href="other_gourl.php?id=<?php echo $_GET['id']; ?>&seek=pre&mode=<?php echo $GLOBALS['this_mode']; ?>" class="gourl">上一篇</a><?php echo $area_power['area_mark']; ?>
      <iframe id="lastFrame" name="lastFrame" frameborder="0" style="position:absolute;top:24px;left:0;width:100%;height:320px;display:none;z-index:18;"></iframe>
    <?php
  echo '<form method="post" name="manageform" id="manageform" style="display:none"><input name="to_id" id="to_id" type="hidden" /><input name="id" id="id" type="hidden" value="'.$_GET['id'].'" /></form>
<a href="#" onclick="toToid();return false;" class="grayword"'.$dis_noe.'>转移</a>
<a href="webmaster_central.php?post=unity_run&dataname=listdata&limit=del&id='.$_GET['id'].'" class="grayword"'.$dis_noe.'>删除</a>
<a href="webmaster_central.php?post=unity_run&dataname=listdata&limit=refresh&id='.$_GET['id'].'" class="grayword"'.$dis_noe.'>置前</a>';

  echo $row['topdate'] > gmdate('Y-m-d H:i:s', time() + (floatval($web['time_pos']) * 3600)) ? '<span class="redword">此文置顶中</span> <a href="webmaster_central.php?post=unity_run&dataname=listdata&limit=ctop&id='.$_GET['id'].'" class="grayword"'.$dis_noe.'>撤顶</a> ' : '<a href="webmaster_central.php?post=unity_run&dataname=listdata&limit=top&id='.$_GET['id'].'" class="grayword"'.$dis_noe.'>置顶</a> ';
  echo $index_e_key;
  echo strstr($row['title_mark'], '荐') ? '<span class="redword">此文已被推荐</span> <a href="webmaster_central.php?post=unity_run&dataname=listdata&limit=cess&id='.$_GET['id'].'" class="grayword"'.$dis_noe.'>撤荐</a> ' : '<a href="webmaster_central.php?post=unity_run&dataname=listdata&limit=ess&id='.$_GET['id'].'" class="grayword"'.$dis_noe.'>推荐</a> ';
  unset($index_e_key);

echo POWER >= 3 || $row['author_ip'] == $session[0] ? ' <a href="member.php?get=list_edit&id='.$_GET['id'].'&mode='.$GLOBALS['this_mode'].'" class="grayword">编辑</a> ' : '';
echo $row['author_ip'] == $session[0] && isset($reward) ? '<a href="member.php?get=reward_cash&id='.$_GET['id'].'" class="grayword">结帐</a> ' : '';
?></div>
</div>
<?php @include ('inc/css/'.$GLOBALS['this_mode'].'/ad_article_top.txt'); ?>
<table border="0" cellpadding="0" cellspacing="0" class="body" id="body">
  <tr valign="top">
  <td class="left" id="left">
    <h4><a class="add_collect" href="member.php?post=unity_run&dataname=myaccount&id[]=<?php echo $row['id']; ?>&limit=collect_listdata" title="将文章加入“我的收藏”"></a> <?php echo $title; ?>
<?php
if (floatval($area_power['area_expires']) > 0) {
  if ($row['topdate'] < gmdate('Y-m-d H:i:s', time() + (floatval($web['time_pos']) * 3600) - floatval($area_power['area_expires']) * 86400)) {
    echo '<br /><span class="redword" style="font-size:12px; font-weight:normal;">（', $expires = '该文时效期已过，回复评论被关闭', '，且不再显示于列表中。）</span>';
  }
}
?>
    </h4>


      
<div class="author_style_out">
<table border="0" cellspacing="10" cellpadding="0" class="author_style">
  <tr>
    <td><?php echo $GLOBALS['author_file'][$row['author_ip']]; ?></td>
    <td><?php
//$web['img_name_b'] = '162100userface_'.urlencode($row['author_ip']);

echo '发布人：'.(strstr((string)$row['author_ip'],'.') ? '<span title="匿名用户">('.hidden_ip($row['author_ip']).')</span>' : '<a href="user.php?get=card&username='.urlencode($row['author_ip']).'" target="_blank" title="点击查看发布人名片">'.$row['author_ip'].'<img src="inc/images/card.gif" /></a>').'<br />
      发布日期：'.$row['date'].'<br />
	  刷新日期：'.$row['topdate'].'<br />
      回复或评论：'.$row['reply'].'<br />
      阅览：'.$row['views'].'
      '.$reward.'
';

?></td>
  </tr>
</table>
</div>



    <div class="text"> <!-- ad --><?php @include ('inc/css/'.$GLOBALS['this_mode'].'/ad_article_text_top.txt'); ?><!-- /ad --><?php echo $row['text']; ?>
<style type="text/css">
<!--
#zan, #fan { display:inline-block !important; display:inline; zoom:1; margin:0 10px; width:43px; height:24px; background:url(inc/css/<?php echo $GLOBALS['this_mode']; ?>/zan_fandui.gif) no-repeat; line-height:22px; overflow:hidden;
 color:#FFFFFF; font-size:12px; padding-left:30px; }
#zan { background-position:0 0; }
#fan { background-position:-74px 0; }
-->
</style>
<?php
list($zan, $fan) = @explode('|', $row['zanfan']);
?>
<div style="clear:both; text-align:center;"><a id="zan"<?php echo isset($_COOKIE['zan'][$row['id']])?' onclick="return false;"':''; ?> href="member.php?post=zanfan&act=zan&mode=<?php echo $GLOBALS['this_mode']; ?>&id=<?php echo $row['id']; ?>" target="lastFrame"><?php echo abs($zan); ?></a><a id="fan"<?php echo isset($_COOKIE['fan'][$row['id']])?' onclick="return false;"':''; ?> href="member.php?post=zanfan&act=fan&mode=<?php echo $GLOBALS['this_mode']; ?>&id=<?php echo $row['id']; ?>" target="lastFrame"><?php echo abs($fan); ?></a></div>
        <!-- ad --><?php @include ('inc/css/'.$GLOBALS['this_mode'].'/ad_article_text_bottom.txt'); ?><!-- /ad -->
    </div>

    <fieldset class="re_in" id="re_in">
      <legend>评论（<?php echo $n_re; ?>）
        <button type="button" class="small" title="倒转顺序查看回复" onclick="location.href=location.search.replace(/&?order=(desc|asc)?/,'').replace(/\??/,'?order=<?php echo $_GET['order'] == 'desc' ? 'asc' : 'desc'; ?>&').replace(/&+/,'&')+'#re_in';"><b><?php echo $_GET['order'] == 'desc' ? '︾' : '︽'; ?></b></button>
    </legend><span id="reply_last_temp" style="display:none;"></span>
<?php eval($text_re); ?>
<?php echo get_page_foot($n_re, $web['pagesize'], $p, $page_url_before, $page_url_after); ?>
<?php echo $err; ?>
    </fieldset>
    <br />
    <br />
<script language="JavaScript" type="text/javascript">
<!--
function addFavor() {
  var thisTitle = document.title;
  var thisUrl = location.href;
  if (document.all)
    window.external.AddFavorite(thisUrl, thisTitle);
  else if (window.sidebar)
    window.sidebar.addPanel(thisTitle, thisUrl, '');
  return false;
}

function toToid(){
  $('lastFrame').style.display='block';
  $('lastFrame').src='inc/require/z_other_chanto.php?mode=<?php echo $GLOBALS['this_mode']; ?>';
}
-->
</script>
<div id="reply_lou" style="display:none;"></div>
<script language="JavaScript" type="text/javascript">
<!--

var uploadPower = <?php echo $point >= $web['up_start'] ? '"yes"' : $web['up_start']; ?>;
var liMaxCount = <?php echo $web['re_wordcount']; ?>;
var eX = 'simple';       //编辑器模式，简洁
var formU="member.php?post=reply";
var formT='<input type="hidden" name="lou" id="lou" /><input type="hidden" name="m" id="m" value="1" /><input type="hidden" name="mode" id="mode" value="<?php echo $GLOBALS['this_mode']; ?>" /><?php echo POWER < 1 ? '<input type="hidden" name="imcode" id="imcode" />' : ''; ?><input type="hidden" name="id" value="<?php echo $_GET['id']; ?>" />';
document.write('<'+'sc'+'ript language="javascript" src="inc/js/editor.js?'+new Date().getTime()+'" type="text/javascript"></'+'sc'+'ript>');
-->
</script>
<script language="JavaScript" type="text/javascript">
<!--

<?php
if (isset($expires)) {
  $no_login = $expires;
} else {
  if (POWER < 1) {
    if ($area_power['area_power_reply'] == 0) {
      $no_login = false;
      $addOthers .= '
  $(\'f_c162100_tool\').innerHTML = \'<table border="0" cellspacing="0" cellpadding="0"><tr><td width="160">非注册成员回复请输验证码：</td><td width="95"><input id="tempcode" type="text" style="width:85px; float:left;" onblur="$(\\\'imcode\\\').value=this.value" /></td><td width="95"><iframe src="inc/js/imcode.html" id="imFrame" name="imFrame" width="75" height="18" frameborder="0" marginwidth="0" marginheight="0" scrolling="No" allowtransparency="true"></iframe></td><td width="100"><a href="login.php" onmouseover="showLogin(this, false);">登陆</a>获得高级功能</td></tr></table>\';
';
    } else {
      $no_login = '系统设置该分类不允许非注册成员回复。请<a href="login.php" onmouseover="showLogin(this, false);">登陆</a>';
    }
  } elseif (POWER <= 3) {
    if (floatval($area_power['area_power_reply']) > 0 && floatval($session[3]) < floatval($area_power['area_power_reply'])) {
      $no_login = '系统设置该分类回复需要成员积分达到'.floatval($area_power['area_power_reply']).'';
    }
  }
}
if (isset($no_login)) {
  echo '
function confirmLogin(){
'.($no_login ? '
  $("fexpires").style.display=\'block\';
  $("fexpires").className=\'filter\';
  $("fexpires").innerHTML=\'<span style="margin-top:60px; background-color:#000000; padding:10px; display:inline-block !important; display:inline; zoom:1;">'.$no_login.'</span>\';' :'').'
  '.$addOthers.'
}
if (document.all) {
  window.attachEvent(\'onload\', confirmLogin);//对于IE
} else {
  window.addEventListener(\'load\', confirmLogin, false);//对于FireFox
}

';
}

?>
-->
</script>
<script language="JavaScript" type="text/javascript">
<!--
if($('editor_send')!=null){
  $('editor_send').innerHTML+='<input type="checkbox" class="checkbox" onclick="if(this.checked==true){try{$(\'m\').value=0;}catch(e){}}else{try{$(\'m\').value=1;}catch(e){}}" /> 提交到最后页';
}
-->
</script>

  </td>
  <td class="right">
    <div class="ad_side"><?php @include ('inc/css/'.$GLOBALS['this_mode'].'/ad_article_side.txt'); ?></div>
  </td>
  </tr>
</table>
<div class="column"><div class="column_in">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><div id="bdshare" class="bdshare_t bds_tools get-codes-bdshare">
<a class="bds_qzone"></a>
<a class="bds_tsina"></a>
<a class="bds_tqq"></a>
<a class="bds_tieba"></a>
<a class="bds_douban"></a>
<a class="bds_tsohu"></a>
<a class="bds_qq"></a>
<a class="bds_renren"></a>
<a class="bds_t163"></a>
<a class="bds_tfh"></a>
<a class="bds_ty"></a>
<a class="bds_baidu"></a>
<a class="bds_hi"></a>
<a class="bds_kaixin001"></a>
<a class="bds_copy"></a>
</div></td> 
    <td style="text-align:right;font-size:12px;"> <b>‖</b><a href="javascript:window.print()">打印</a> <b>‖</b> <a href="#" onclick="addFavor();return false;">收藏</a> <b>‖</b> <a href="javascript:window.close(this)">关闭窗口</a> <b>‖</b></td>
    <td style="width:230px;text-align:right;font-size:12px;"><a href="other_gourl.php?id=<?php echo $_GET['id']; ?>&seek=next&mode=<?php echo $GLOBALS['this_mode']; ?>" class="gourl">下一篇</a><a href="other_gourl.php?id=<?php echo $_GET['id']; ?>&seek=pre&mode=<?php echo $GLOBALS['this_mode']; ?>" class="gourl">上一篇</a></td>
  </tr>
</table>
</div></div>

<div class="body">
  <table width="100%" border="0" cellspacing="0" cellpadding="0" id="bottom">
    <tr valign="top">
      <td width="383" style="border-right:1px #DDDDDD solid;"><?php echo $text_new_li; unset($text_new_li); ?></td>
      <td><?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/css/'.$GLOBALS['this_mode'].'/ad_article_bottom.txt'); ?>
<div id="foot"><?php @include ('inc/css/'.$GLOBALS['this_mode'].'/foot.txt'); ?></div>
<script language="JavaScript" type="text/javascript">
<!--
try{$('new_mess').innerHTML='<?php echo $mess; ?>';}catch(err){}
-->
</script>
<script type="text/javascript" id="bdshare_js" data="type=tools" ></script>
<script type="text/javascript" id="bdshell_js"></script>
<script type="text/javascript">
	document.getElementById("bdshell_js").src = "http://bdimg.share.baidu.com/static/js/shell_v2.js?t=" + new Date().getHours();
</script>

</body>
</html>