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

/* 成员中心 - 发送短信 */
/* 162100源码 - 162100.com */



$mess = $point = 0;

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

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

  $result = @mysql_query('SELECT mess_num,check_reg,point 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>';
    }
    $point = $row['point'];
    unset($row);
  } else {
    $err = '帐号不存在！';
  }
  @mysql_free_result($result);

} else {
  $err .= $sql['db_err'];
}

@ require ('inc/function/add_online.php'); //在线
@mysql_close();


if (empty($err)) {
?>
<iframe id="lastFrame" name="lastFrame" frameborder="0" style="display:none"></iframe>
<script language="JavaScript" type="text/javascript">
<!--
var uploadPower = <?php echo $point >= $web['up_start'] ? '"yes"' : $web['up_start']; ?>;
var liMaxCount = <?php echo $web['mess_wordcount']; ?>;
var eXSize = 588;       //编辑器宽度，最小宽度限588px
var formU = '?post=mess';
var formT='<input type="hidden" name="m" id="m" value="1" /><u><b><span class="redword">*</span> 收信人：</b></u><br /><input class="large" type="text" id="username" name="username" value="<?php echo $_GET['username']; ?>" /> <a href="list_member.php" target="_blank">查看用户列表</a><br /><br /><u><b id="a_subject"><span class="redword">*</span> 题　目：</b></u><br /><input class="large" name="subject" id="subject" type="text" value="" style="width:330px" maxlength="180" /><br /><br /><u><b id="a_content"><span class="redword">*</span> 内　容：</b></u><br />';
document.write('<'+'sc'+'ript language="javascript" src="inc/js/editor.js?'+new Date().getTime()+'" type="text/javascript"></'+'sc'+'ript>');
-->
</script>
<?php
} else {
  echo $err;
}

?>