{template 'phpcms','header'}
<script type="text/javascript">
function checkemail()
{
	if(!Common.isemail($F('email')))
	{
		alert('您的email地址非法，请重新填写！');
		$('email').focus();
		return false;
	}	
}
function checkform()
{
	if(!Common.isemail($F('email')))
	{
		alert('您的email地址非法，请重新填写！');
		$('email').focus();
		return false;
	}	
	var flag=false;
	for(var i = 0;i < formsend.elements.length; i++) {
		var e = formsend.elements[i];
		if (e.checked == true) {
			flag = true;
			break;
		}
	}
	if(!flag)
	{
		alert('您没有选中任何订阅的类别！');
		return false;
	}
}
</script>
<table cellspacing="0" cellpadding="0" width="980">
  <tr>
    <td valign="top" class="left">
    {template "member","left"}
    </td>
    <td width="10" valign="top"></td>
    <td class="right" valign="top">
      <div class="memberborder_1">
      <div class="memberborder_2">
        <h1>可订阅类别列表</h1>
<form id="formsend" name="formsend" method="post" action="?">
  <table cellpadding="2" cellspacing="1" class="righttable">
	  <!--{loop $TYPE $i $tp}-->
    <tr>
      <td width="150" class="td_left"><input type="checkbox" id="ck{$i}" name="cktypeid[{$i}]"> {$tp[name]} </td>
      <td class="td_left">{$tp[introduce]}</td>
    </tr>
	 <!--{/loop}-->
    <tr>
      <td class="td_left"><input name='chkall' title="全部选中" type='checkbox' id='chkall' onclick='checkall(this.form)' value='checkbox' /> 全选/不选</td>
	  <td class="td_left">&nbsp;</td>
    </tr>
      <td class="td_right">您的Email </td>
      <td class="td_left"><input name="email" type="text" id="email" value="{$useremail}" size="20" maxlength="50" />
	  </td>
    </tr>
    <tr>
      <td class="td_right"></td>
      <td class="td_left"><input type="submit" name="dosubmit" id="submit" value="  订 阅  " onclick="return  checkform();" />
        <input type="submit" name="dologout" id="logout" value="  退 订 " onclick=" return checkemail();" /></td>
    </tr>
  </table>
</form>
</div></div>

<table cellpadding="2" cellspacing="1" class="mar_10 border_1" width="750">
  <tr>
    <td align=center>提示信息</td>
  </tr>
  <tr>
    <td>	<p style="margin:10px; text-indent:20px;">第一次订阅邮件，请在选准邮件种类后按"订阅"即可。退订邮件，请在"取消订阅"窗口栏中输入您的邮箱信息，系统会列出订阅信息，在上面完成增加、删除、修改等操作即可。 </p>
	</td>
  </tr>
</table>
</td>
  </tr>
</table>
{template 'phpcms','footer'}