<?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)) {
  //$web['img_name_b'] = '162100userface_'.urlencode($session[0]); width="'.$web['img_w_b'].'" height="'.$web['img_h_b'].'"
  require ('inc/set/set_userface.php');
  echo '
  <table cellspacing="0" border="0" cellpadding="0" width="100%">
    <tr>
      <td width="200" align="left">我的当前头像（LOGO）：</td>
      <td align="left"><span id="screenshotsShow" class="iface_s"><img src="obj.php?title=face-'.urlencode($session[0]).'.'.$web['img_up_format'].'" /></span></td>
    </tr>
  </table>
<br />
  <table cellspacing="0" border="0" cellpadding="0" width="100%">
    <tr>
      <td width="200" align="left">重新制作头像（LOGO）：</td>
      <td align="left"><iframe src="inc/require/z_other_face_start.html" width="322" height="277" frameborder="0" scrolling="No"></iframe></td>
    </tr>
  </table>
<br />
<div align="left"><strong>！<a href="member.php?get=file">完善自己的名片&gt;&gt;</a>，以便让更多人关注</strong></div>
';

} else {
  echo $err;
}

?>
