<%@ page language="C#" autoeventwireup="true" inherits="admin_email_emailboxitem, localhost_deploy" %>

<%@ Register Src='../../common/formitem.ascx' TagName='formitem' TagPrefix='uc1' %>
<!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 runat="server">
<title>邮箱编辑页</title>
<link href='/admin/common/client.css' rel='stylesheet' type='text/css' />
</head>
<body>
<br />
<%
	string s_name="";
	if(Para("type")=="1")
	{
		s_name="发";
	}
	else
	{
		s_name="收";
		
	}
	
	Formitem.Table="Sys_EmailBox";
	Formitem.Head=s_name + "邮箱";
	Formitem.Action="";
	
	if(Para("type")=="0")
	{
		Formitem.AddItem("@@Csharp.SetShowText('邮件标题','##Table[\"Sys_EmailBox\"].R_Title##','')@@");
		
		Formitem.AddItem("@@Csharp.SetShowText('电子邮件','<a href=\"mailto:##Table[\"Sys_EmailBox\"].R_Email##\">##Table[\"Sys_EmailBox\"].R_Email##</a>','')@@");
		
		Formitem.AddItem("@@Csharp.SetShowText('接收时间','##Table[\"Sys_EmailBox\"].R_Date##','')@@");
		Formitem.AddItem("@@Csharp.SetShowText('邮件内容','##Table[\"Sys_EmailBox\"].R_Content##','')@@"); 
		
		//<input value=' 回复邮件 ' name='butreturn'  type='button' onclick='RestoreEmail()' class='button' /> 
		
		string s_file=GetEmailFile(Formitem["R_File"]);
		if(!string.IsNullOrEmpty(s_file))
		{
			Formitem.AddItem("@@Csharp.SetShowText('附件','"+s_file+"','')@@"); 
		}	
		
		if(WebCode.function.GetNumber(Formitem["R_Status"])<1)
		{
			//邮件已读
			ds.ExecuteSQL(" update Sys_EmailBox  set R_Status=1 where R_ID="+Para("id"));
		}
		
		Formitem.Button = "  <input value=' 返回 ' name='butreturn'  type='button' onclick='ReturnPage(0)' class='button' />";
	}
	else
	{
		//发送邮件
		Formitem.AddItem("@@Csharp.SetInputText('邮件标题','R_Title','##Table[\"Sys_EmailBox\"].R_Title##','35','true','')@@");	
		Formitem.AddItem("@@Csharp.SetTextArea('邮件内容','R_Content','##Table[\"User_Content\"].R_Content##','10','false','')@@");
		
	}
	
	
%>	
<uc1:formitem ID='Formitem' runat='server' />
<script type='text/javascript'>
//$('frmitem').encoding ="multipart/form-data";
</script>
</body>
</html>   
