<?php
require ('authentication_member.php');
?>
<?php

/* 成员中心 - 我要求广告位 */
/* 162100源码 - 162100.com */



$mess = 0;

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

if ($sql['db_err'] == '') {

  $result = @mysql_query('SELECT mess_num,check_reg FROM '.$sql['pref'].''.$sql['data']['承载成员档案的表名'].' WHERE username="'.$session[0].'" LIMIT 1', $db);
  if ($row = @mysql_fetch_assoc($result)) {
    if ($row['check_reg'] == '1') {
      $err = '帐号注册审核中！';
    } elseif ($row['check_reg'] == '2') {
	  $err = '帐号已被移除至<a href="list_member.php?act=punished" target="_blank">黑名单</a>！';
    } else {
      $mess = '<span class="grayword">'.preg_replace('/^\d+/', '<span>$0</span>', $row['mess_num']).'</span>';
    }
    unset($row);
  } else {
    $err = '帐号不存在！';
  }
  @mysql_free_result($result);

  require ('inc/function/add_online.php'); //在线
} else {
  $err .= $sql['db_err'];
}

@mysql_close();

if (empty($err)) {
  echo '<div class="list_title"><a class="list_title_in">广告位列表</a></div>
  <div class="text">'.@file_get_contents('inc/require/ad_list.txt').'</div>
  <div class="text redword">该功能尚未开放</div>


';

} else {
  echo $err;
}
?>