
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>[.$ourphp_adminfont.admintitle.]</title>
<link href="templates/images/ourphp_login.css" rel="stylesheet" type="text/css"> 
<script type="text/javascript" src="../../function/plugs/jquery/1.7.2/jquery-1.7.2.min.js"></script>
<script src="../../function/plugs/layer/layer.min.js"></script>
<script>
<!--
/*第一种形式 第二种形式 更换显示样式*/
function setTab(m,n){
 var tli=document.getElementById("menu"+m).getElementsByTagName("li");
 var mli=document.getElementById("main"+m).getElementsByTagName("ul");
 for(i=0;i<tli.length;i++){
  tli[i].className=i==n?"hover":"";
  mli[i].style.display=i==n?"block":"none";
 }
}
//-->
</script>

</head>

<body>
<div style="height:50px;"></div>
<div style="clear:both"></div>
<div id="tabs0">
 <ul class="menu0" id="menu0">
  <li onclick="setTab(0,0)" class="hover">邮件列表</li>
  <li onclick="setTab(0,1)">发送新邮件</li>
 </ul>
 <div class="main" id="main0" style="border-top:2px #488fcd solid; clear:both;">
  <ul class="block">
	  <li>
		<div class="ourphp_newslist">
		        <table width="100%" border="0" cellpadding="10" class="ourphp_newslist">
                  <tr>
				  	<td width="5%" bgcolor="#EBEBEB"><div align="center">ID</div></td>
                    <td width="15%" bgcolor="#EBEBEB">发送人账号</td>
					<td width="15%" bgcolor="#EBEBEB">接收人账号</td>
					<td width="40%" bgcolor="#EBEBEB">邮件内容</td>
					<td width="15%" bgcolor="#EBEBEB">时间</td>
                    <td width="10%" bgcolor="#EBEBEB">操作</td>
                  </tr>
				  [.section loop=$email name=op.]
                  <tr>
				  	<td><div align="center"><font style="background:#009933; color:#FFFFFF; padding:2px; text-align:center;">[.$email[op].id.]</font></div></td>
                    <td>[.$email[op].send.]</td>
					<td>[.$email[op].collect.]</td>
                    <td>[.$email[op].content.][.if $email[op].class == 1.](未读)[.else.](已读)[./if.]</td>
					<td>[.$email[op].time.]</td>
                    <td><a href="?ourphp_cms=del&id=[.$email[op].id.]" onclick="javascript:return confirm('确认删除吗?')">删除</a></td>
                  </tr>
				  [.sectionelse.]
				  <tr>
                    <td colspan="6">[.$ourphp_access.]</td>
                  </tr>
				  [./section.]
				  
                  <tr>
                    <td colspan="6">[.$ourphppage.]</td>
                  </tr>
                </table>
		</div>
	  </li>
  </ul>
  
  <ul>
	  <li>
		<form id="form1" name="form1" method="POST" action="?ourphp_cms=add" class="registerform">
		<table width="98%" border="0" cellpadding="5" cellspacing="0" bordercolor="#666666" style="border-collapse:collapse;" align="center">
		  <tr>
		  	<td><div align="right">发送人</div></td>
			<td>管理员<input type="hidden" name="OP_Usersend" value="管理员" /></td>
		  </tr>
		  <tr>
		  	<td><div align="right">发送类型</div></td>
			<td>
			<span onclick="doradio()">
			<label><input name="OP_Userclass" type="radio" value="1" id="" checked="checked" />单一发送</label>&nbsp;&nbsp;
			<label><input name="OP_Userclass" type="radio" value="2" id="全体会员" />全体发送</label>
			</span>
			</td>
		  </tr>
		  <tr>
		  	<td><div align="right">收件人</div></td>
			<td><input name="OP_Usercollect" type="text" class="win" [.$ourphp_bgcolor.] id="searchid" datatype="*" nullmsg="收件人是必填项!"  onchange="dochange(this.value)" /><font color=red> (*)</font>&nbsp;&nbsp;输入会员的账户，email或手机号格式&nbsp;&nbsp;[<a href="javascript:dialog('usersearch')">查找</a>]</td>
		  </tr>
		  <tr>
		  	<td valign="top"><div align="right">邮件内容</div></td>
			<td><textarea name="OP_Usercontent" [.$ourphp_bgcolor.] class="wtextarea" style="width:80%; height:200px;"></textarea>
			[.include file="ourphp_editor.html".]
			
		<script>
			var editor;
			KindEditor.ready(function(K) {
				editor = K.create('textarea[name="OP_Usercontent"]', {
					resizeType : 1,
					allowPreviewEmoticons : false,
					allowImageUpload : true,
					items : [
						'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline',
						'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist',
						'insertunorderedlist', '|', 'emoticons', 'image', 'link']
				});
			});
		</script>
		
			</td>
		  </tr>
		  
		   <tr>
		   	<td><input type="hidden" name="OP_Usersource" value="后台添加" /></td>
			<td><input type="submit" name="submit" value="提 交" class="ourphp-anniu"/></td>
		  </tr>
		</table>
		</form>
	  </li>
  </ul>
 </div>
</div>
<script>
function dochange(str)
{
var obj=document.getElementsByTagName("input")
for(var i=0;i<obj.length;i++)
if(obj[i].type=="radio" && obj[i].value==str)
obj[i].checked=true;
}
function doradio(){
var obj=document.getElementsByTagName("input")
for(var i=0;i<obj.length;i++)
if(obj[i].type=="radio" && obj[i].checked)
document.all.OP_Usercollect.value=obj[i].id
}

function dialog(id){
    $.layer({
        type: 2,
        title: '搜索',
        shade: [0],
		border: [5, 0.3, '#000'],
        area: ['1000px', '300px'],
		iframe:{src: 'ourphp_search.php?ourphp='+id,scrolling: 'yes'}
    });
};
</script>
[.include file="ourphp_foot.html".]
</body>
</html>