<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="email.aspx.cs" Inherits="JuSNS.Web.home.ibase.email" %>
<!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>
<title id="ptitle" runat="server">邮件通知设置</title>
<script language="javascript" type="text/javascript" src="../../js/ajax.js"></script>
<script language="javascript" type="text/javascript" src="../../js/public.js"></script>
<link href="../../template/<% Response.Write(JuSNS.Config.UiConfig.SkinStyle); %>/css/base.css" id="skinpath" type="text/css" rel="stylesheet" />
</head>
<body>
<!--头部-->
<%=this.GetHtmlShort()%>
<div id="divhead">
    <%=this.GetHtmlHead()%>
</div>

<div id="divbody">
    <div id="body_first">
        <div class="body_menu"> 
        <%=this.GetHtmlLeft()%>
        </div>
    </div>
    <div id="body_sec">
            <div id="body_mid"> 
                <div class="body_frame"> 
                 <!--主题内容中-->    
                
                <input type="hidden" id="txtYear" runat="server" /><input type="hidden" id="txtDay" runat="server" />                    
                <div class="body_frame_otherinfo">
	                        <div class="title">
                                <div class="l"><img src="../../template/<%Response.Write(JuSNS.Config.UiConfig.SkinStyle); %>/images/site/acc.gif" align="absmiddle" /> <span class="shenlan bold font14 ocolor">邮件通知设置</span></div>
                                <div class="r"><a href="javascript:window.history.back();" title="返回上一页">返回上一页</a></div>
                                <div class="c"></div>
                            </div>
            		       
                            <div class="nav-menu">
                                <ul>
                                 <li><a href="index.aspx">帐号管理</a></li>
                                 <li style="display:none;"><a href="advs.aspx">高级管理</a></li>
                                 <li><a href="network.aspx">网络设置</a></li>
                                 <li><a href="msn.aspx">MSN/GTalk</a></li>
                                 <li><a href="mobile.aspx">手机</a></li>
                                 <li class="current"><a href="email.aspx">邮件通知</a></li>
                                 <li><a href="../space/edit.aspx">空间设置</a></li>
                                 </ul>
                            </div>        
                     </div>
                    <div class="body_sec_all">
                    <div class="content-reshow">
                      如果你一段时间没有登录<%# JuSNS.Config.UiConfig.SiteName%>，我们会通过 Email 提醒与你有关的事件。<br />你可以选择只接受某些类别的提醒。
                    </div>
                    <div class="spline"></div>
                    <div class="msg-succ" id="div_Suc" style="display: none;"></div>
                    <div class="msg-error" id="div_error" style="display: none;"></div>
                    <div class="spline"></div>
	                <!--正文-->
	                
                    <div class="content">
                            <div class="line1"></div>
	                        <form method="post" action="" id="acc-noti-form">
	                        <div id="acc-noti-netsns">
	                        <p><span class="reshow bold underline">请求通知</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="normal green">通知 不通知</span></p> 
	                               <div class="content"> 
                                      <label class="f-label1">新消息</label>  
                                      <span>
                                        <input type="radio" id="radYes0" runat="server" name="sendmailPmsg" value="1" />
                                        &nbsp;&nbsp;<input type="radio" id="radNo0" runat="server" name="sendmailPmsg" value="0" />
                                      </span>
                                   </div>
                                  
                                  
                                  <div class="content">
                                    <label class="f-label1">好友请求</label>
                                    <span>
                                        <input type="radio" id="radYes1" runat="server" name="sendmailFriendRequest" value="1" />
                                        &nbsp;&nbsp;<input type="radio" id="radNo1" runat="server" name="sendmailFriendRequest" value="0" />
                                    </span> 
                                  </div>
                                  
                                 <div class="content">
                                    <label class="f-label1">新留言</label>
                                    <span>
                                        <input type="radio" id="radYes2" runat="server" name="sendmailWall" value="1" />
                                        &nbsp;&nbsp;<input type="radio" id="radNo2" runat="server" name="sendmailWall" value="0" />
                                    </span> 
                                  </div>                        
                                  
                                  
                                   <div class="content">
                                    <label class="f-label1">打招呼</label>
                                    <span>
                                        <input type="radio" id="radYes3" runat="server" name="sendmailPoke" value="1"/>
                                        &nbsp;&nbsp;<input type="radio" id="radNo3" runat="server" name="sendmailPoke" value="0" />
                                    </span> 
                                  </div>                          
                                  
                                   <div class="content disp-none">
                                    <label class="f-label1">好友描述请求</label>
                                    <span>
                                        <input type="radio" id="radYes4" runat="server" name="sendmailFriendDetail" value="1"/>
                                        &nbsp;&nbsp;<input type="radio" id="radNo4" runat="server" name="sendmailFriendDetail" value="0" />
                                    </span> 
                                  </div>                          
                                  
                                   <div class="content">
                                    <label class="f-label1">朋友接受邀请</label>
                                    <span>
                                        <input type="radio" id="radYes5" runat="server" name="sendmailInviteRegister_add" value="1"  />
                                        &nbsp;&nbsp;<input type="radio" id="radNo5" runat="server" name="sendmailInviteRegister_add" value="0" />
                                    </span> 
                                  </div>                          
                            </div>  
                            <div class="line1"></div>
                           <div id="acc-noti-photo"> 
                           <p class="reshow bold underline">相册</p>
                           <div class="content">
                            <label class="f-label1">在照片中被圈</label>
                            <span>
                                <input type="radio" id="radYes6" runat="server" name="sendmailPhotoTag_you" value="1"/>
                                &nbsp;&nbsp;<input type="radio" id="radNo6" runat="server" name="sendmailPhotoTag_you" value="0" />
                            </span> 
                          </div>                          
                          
                           <div class="content disp-none">
                            <label class="f-label1 disp-none">收到照片圈人请求</label>
                            <span>
                                <input type="radio" id="radYes7" runat="server" name="sendmailPhotoTag_request" value="1" />
                                &nbsp;&nbsp;<input type="radio" id="radNo7" runat="server" name="sendmailPhotoTag_request" value="0" />
                            </span> 
                          </div>                          
                          
                           <div class="content">
                            <label class="f-label1">照片新评论</label>
                            <span>
                                <input type="radio" id="radYes8" runat="server" name="sendmailPhotoComment" value="1"  />
                                &nbsp;&nbsp;<input type="radio" id="radNo8" runat="server" name="sendmailPhotoComment" value="0" />
                            </span> 
                          </div>                          
                          
                           <div class="content">
                            <label class="f-label1">评论有新回复</label>
                            <span>
                                <input type="radio" id="radYes9" runat="server" name="sendmailPhotoComment_reply" value="1" />
                                &nbsp;&nbsp;<input type="radio" id="radNo9" runat="server" name="sendmailPhotoComment_reply" value="0" />
                            </span> 
                          </div>
                           </div>      
                            <div class="line1"></div>
                           <div id="acc-noti-group">       
                           <p class="reshow bold underline">群组</p>           
                           <div class="content">
                            <label class="f-label1">群组邀请</label>
                            <span>
                                <input type="radio" id="radYes10" runat="server" name="sendmailRequest_group" value="1" />
                                &nbsp;&nbsp;<input type="radio" id="radNo10" runat="server" name="sendmailRequest_group" value="0" />
                            </span> 
                          </div>
                    
                           <div class="content">
                            <label class="f-label1">为群组管理员</label>
                            <span>
                                <input type="radio" id="radYes11" runat="server" name="sendmailUserGroup_admin" value="1" />
                                &nbsp;&nbsp;<input type="radio" id="radNo11" runat="server" name="sendmailUserGroup_admin" value="0" />
                            </span> 
                          </div>
                                        
                           <div class="content">
                            <label class="f-label1">群组成员申请</label>
                            <span>
                                <input type="radio" id="radYes12" runat="server" name="sendmailUserGroup_apply" value="1"  />
                                &nbsp;&nbsp;<input type="radio" id="radNo12" runat="server" name="sendmailUserGroup_apply" value="0" />
                            </span> 
                          </div>
                                                    
                           <div class="content">
                            <label class="f-label1">主题新回复</label>
                            <span>
                                <input type="radio" id="radYes13" runat="server" name="sendmailGroupPost_reply" value="1"  />
                                &nbsp;&nbsp;<input type="radio" id="radNo13" runat="server" name="sendmailGroupPost_reply" value="0" />
                            </span> 
                          </div>
                           </div>
                            <div class="line1"></div>
                          <div id="acc-noti-blog">
                             <p class="reshow bold underline">博客日志</p>
                            <div class="content">
                            <label class="f-label1">日志新评论</label>
                            <span>
                                <input type="radio" id="radYes14" runat="server" name="sendmailBlogComment" value="1" />
                                &nbsp;&nbsp;<input type="radio" id="radNo14" runat="server" name="sendmailBlogComment" value="0" />
                            </span> 
                          </div>
                          
                          <div class="content">
                            <label class="f-label1">日志评论有新回复</label>
                            <span>
                                <input type="radio" id="radYes15" runat="server" name="sendmailBlogComment_reply" value="1" />
                                &nbsp;&nbsp;<input type="radio" id="radNo15" runat="server" name="sendmailBlogComment_reply" value="0" />
                            </span> 
                          </div> 
                          </div>
                            <div class="line1 disp-none"></div>
                          <div id="banji" class="disp-none">
                                <p class="reshow bold underline">班级</p>
                              <div class="content">
                                <label class="f-label1">班级新留言</label>
                                <span>
                                    <input type="radio" id="radYes16" runat="server" name="sendmailClassWall" value="1"  />
                                    &nbsp;&nbsp;<input type="radio" id="radNo16" runat="server" name="sendmailClassWall" value="0" />
                                </span> 
                              </div>
                              
                              <div class="content">
                                <label class="f-label1">班级新同学</label>
                                <span>
                                    <input type="radio" id="radYes17" runat="server" name="sendmailClassUser" value="1" />
                                    &nbsp;&nbsp;<input type="radio" id="radNo17" runat="server" name="sendmailClassUser" value="0" />
                                </span> 
                              </div>                          
                          </div>
                            <div class="line1"></div>
                          <div id="share">
                          <p class="reshow bold underline">分享</p>
                          <div class="content">
                            <label class="f-label1">分享新评论</label>
                            <span>
                                <input type="radio" id="radYes18" runat="server" name="sendmailShareComment" value="1" />
                                &nbsp;&nbsp;<input type="radio" id="radNo18" runat="server" name="sendmailShareComment" value="0" />
                            </span> 
                          </div>
                          
                          <div class="content disp-none">
                            <label class="f-label1">你的分享评论有新回复</label>
                            <span>
                                        <input type="radio" id="radYes19" runat="server" name="sendmailShareComment_reply" value="1"/>
                                        &nbsp;&nbsp;<input type="radio" id="radNo19" runat="server" name="sendmailShareComment_reply" value="0" />
                            </span> 
                          </div>                           
                           </div>
                                         
			                 <p class="pstr">
			                 <input type="hidden" id="Type" value="Save" />
			                 <input type="button" class="f-button" value="保存设置..." onclick="SaveEmailSet();" />
			                 </p>

	                        </form>                    
                    </div>
                    <div class="spline"></div>
                    </div>
           </div>  
           <!--底部-->
             <div class="divbottom">
              <%=this.GetHtmlFoot()%>
              </div>
         </div>
   </div>
</div>
</body>
</html>
<script language="JavaScript" type="text/javascript">
function SaveEmailSet()
{
    var Announce="";
    var ItemId="";//邮件通知设置类型
    var n=0;
    for(var i=0;i<20;i++)
    {   
        n+=1;
        if($("radYes"+i).checked==true)
        {
            Announce+=$("radYes"+i).value+"|";
            ItemId+=n+"|";
        }
        else if($("radNo"+i).checked==true)
        {
             Announce+=$("radNo"+i).value+"|";
             ItemId+=n+"|";
        }
    }       
	     var  options={  
					       method:'get',  
					       parameters:"itemid="+escape(ItemId)+"&announce="+escape(Announce)+"&type=emailr",
					       onComplete:function(transport)
						    {  
							    var returnvalue=transport.responseText;
							    if (returnvalue=="1")
							    {
			                        $("div_error").style.display="none";
                                    $("div_Suc").style.display="";
				                    $("div_Suc").innerHTML="设置成功";
                                 }
							    else
							    {
				                    $("div_error").style.display="";
				                    $("div_Suc").style.display="none";
				                    $("div_error").innerHTML="设置失败！";
							    }
						    }  
				       }; 
	     new  Ajax.Request('../../inc/ajax/ibase/seting.aspx?no-cache='+Math.random(),options);    
}
</script>
