<?php
	$acl=$_SESSION["acl"];
	if (strlen($acl)<1 || !strpos($acl,"<2036>")) {	//没有权限
		ob_clean();
		header("Location: accesserror.html");
		exit;
	}
?>


<html>

<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>自助注册用户确认生效</title>
</head>
<body background="bkg.bmp">
<p align="center"><font size="5"><b>自助注册用户确认生效</b></font></p>
<hr color="#999966">
<div align="center">
<form method="POST" action="activereg2.php">
    <table border="1" bordercolor="#008080" cellspacing="0" cellpadding="0">
        <tr>
           <td width="150" align="center">用户ID</td>
           <td align="left" width="300" >&nbsp;   
			<input type="text" name="loginname" size="20">
           </td>
        </tr>
         <tr>
           <td  colspan="2" width="450" align="center"><input type="submit" value="提交" name="B1"></td>
        </tr>
    </table>
</form>
</div>
<br>
<div align="center">
  <center>
  <table border="1" cellpadding="0" cellspacing="0" width="90%" bordercolor="#008080">
    <tr>
      <td width="10%">
        <p align="center">用户ID</td>
      <td width="14%">
        <p align="center">用户名称</td>
      <td width="12%">
        <p align="center">联系方式</td>
      <td width="13%">
        <p align="center">备注说明</td>
      <td width="12%">
        <p align="center">合计费用(元)</td>
    </tr>
<?php
	$db=mysql_pconnect(get_cfg_var("SIPSERVER"),get_cfg_var("SIPUSER"),get_cfg_var("SIPPWD"));
	mysql_select_db(get_cfg_var("SIPDB"),$db);
	$timestr=strftime("%Y-%m-%d %H:%M:%S",strtotime("-7 day",time()));
	mysql_query( "delete from tmpusers where createtime<'".$timestr."'",$db );	//删除7天前的临时用户记录
	$rs = mysql_query("select loginname,username,usertel,comment,money from tmpusers",$db);
	while ($row = mysql_fetch_array($rs)) {
?>
    		<tr>
      		<td width="10%"><a href=activereg2.php?loginname=<?php echo $row["loginname"]; ?>><?php echo $row["loginname"]; ?></a>&nbsp;</td>
      		<td width="14%"><?php echo $row["username"]; ?>&nbsp;</td>
      		<td width="12%"><?php echo $row["usertel"]; ?>&nbsp;</td>
      		<td width="13%"><?php echo $row["comment"]; ?>&nbsp;</td>
      		<td width="12%"><?php echo $row["money"]; ?>&nbsp;</td>
    		</tr>
<?php
    }
    mysql_free_result($rs);
    mysql_close($db);
?>
  </table>
  </center>
</div>
<p>注：自助注册的用户记录，如果在7天内没有确认生效，将自动删除记录。</p>
<hr>
<p align="center">SIP宽带上网计费管理系统</p>
  <p align="center">作者：<b>深圳市飞沃软件有限公司</b></p>
</body>

</html>