<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Edit-link.aspx.cs" Inherits="JuSNS.Web.home.space.Edit_link" %>

<!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>
                                <%if (Request.QueryString["f"] == "1" && string.IsNullOrEmpty(path))
                                  {%>
                                 <li><a href="edit.aspx?f=1">第一步：基本信息</a></li>
                                 <li class="current"><a href="edit-link.aspx?f=1">第二步：联系信息</a></li>
                                 <li><a href="userheadphoto.aspx?f=1">第三步：上传头像</a></li>
                                <%}
                                  else
                                  { %>
                                 <li><a href="edit.aspx">基本信息</a></li>
                                 <li class="current"><a href="edit-link.aspx">联系信息</a></li>
                                 <li><a href="edit-like.aspx">个人爱好</a></li>
                                 <li><a href="edit-edu.aspx">教育信息</a></li>
                                 <li><a href="edit-work.aspx">工作信息</a></li>
                                 <li><a href="userheadphoto.aspx">上传头像</a></li>
                                 <li><a href="template.aspx">装扮空间</a></li>
                                 <li><a href="../privacy">隐私设置</a></li>
                                 <li><a href="../base">帐号管理</a></li>
                                 <%} %>
                                 </ul>
                            </div>        
                     </div>
                    <div class="body_sec_all">                     
                    <% =GetTiShiDivStr%>   
                    <div class="content-reshow">
                        每一项联系信息的都可以单独<a href="../privacy">隐私设置</a>，请放心填写。
                    </div>  
                    <div class="msg-error" id="Div_Error"  style="display:none;"></div>
                    <div class="msg-succ" id="Div_Succ"  style="display:none;"></div>

                    <form runat="server" id="from1">
                    <div class="content">
                            <label class="f-label">Email：</label>
                             <span class="item" runat="server" id="spanEmail"></span><span class="privacy"><span id="spEmail" runat="server"></span> (<a href="javascript:Load(0,'设置Email的可见度',this.spEmail);">修改可见度</a>)</span> (<a href="../base">修改Email</a>)
                     </div>
                      <hr class="hr1" />
                     <div class="content">
                        <p class="cpstr"><label for="msn" class="f-label">MSN</label><input type="text" class="f-text" id="msn"  size="30" runat="server"/> <span id="spMsn" runat="server" ></span> (<a href="javascript:Load(1,'设置MSN的可见度',this.spMsn);">修改</a>) (<a href="../base/msn.aspx">绑定MSN</a>)</p>
                        <p class="cpstr"><label for="gtalk" class="f-label">GTalk</label><input type="text" class="f-text" id="gtalk"  size="30" runat="server"/> <span id="spGtalk" runat="server"></span> (<a href="javascript:Load(2,'设置GTalk的可见度',this.spGtalk);">修改</a>) (<a href="../base/msn.aspx">绑定GTalk</a>)</p>
                        <p class="cpstr"><label for="qq" class="f-label">QQ</label><input type="text" class="f-text" id="qq" size="30" runat="server" /> <span id="spqq" runat="server" ></span> (<a href="javascript:Load(3,'设置QQ的可见度',this.spqq);">修改</a>)</p>
                        <p class="cpstr"><label for="skype" class="f-label">Skype</label><input type="text" class="f-text" id="skype"  size="30" runat="server"/> <span id="spSkype" runat="server"></span> (<a href="javascript:Load(4,'设置Skype的可见度',this.spSkype);">修改</a>)</p>
                     </div>
                      <hr class="hr1" />
                     <div class="content">
                        <p class="cpstr"><label for="mobile" class="f-label">手机</label><input type="text" class="f-text" id="mobile"  size="30" runat="server"/> <span id="spMobile" runat="server"></span> (<a href="javascript:Load(5,'设置手机的可见度',this.spMobile);">修改</a>) (<a href="../base/mobile.aspx">免费绑定手机</a>)</p>
                        <p class="cpstr"><label for="landphone" class="f-label">电话</label><input type="text" class="f-text" id="landphone"  size="30" runat="server" /> <span id="spLandphone" runat="server"></span> (<a href="javascript:Load(6,'设置电话的可见度',this.spLandphone);">修改</a>)</p>
                     </div>
                        <hr class="hr1" />
                     <div class="content">
                        <p class="cpstr"><label for="address" class="f-label">住址</label><input type="text" class="f-text" id="address"  size="30" runat="server"/> <span id="spAddress" runat="server" ></span> (<a  href="javascript:Load(7,'设置住址的可见度',this.spAddress);">修改</a>)</p>
                        <p class="cpstr"><label for="website" class="f-label">个人网址</label><input type="text" class="f-text" id="website" size="30" runat="server"/> <span id="spWebsite" runat="server" ></span> (<a  href="javascript:Load(8,'设置个人网址的可见度',this.spWebsite);" >修改</a>)</p>	
                     </div>  
                     <div class="content">
                        <div class="f-label">&nbsp;</div>
                        <input type="button" class="f-button" value="保存联系信息" onclick="Submit();" />
                        <%if (Request.QueryString["f"] == "1" && string.IsNullOrEmpty(path))
                                  {%><input type="button" class="f-button" value=" 跳过 " onclick="window.location.href='userheadphoto.aspx?f=1'" /><%} %>
                     </div>
                     <div class="spline"></div> 
                     </form>
                     </div>
                     
             </div>
           <!--底部-->
             <div class="divbottom">
              <%=this.GetHtmlFoot()%>
              </div>    
           </div>
       </div>
</div>
</body>
</html>
<script language="javascript" type="text/javascript">
//function $(o){return document.getElementById(o);}
//提交
function Submit()
{
    var msn=$("msn").value;
    var gtalk=$("gtalk").value;
    var qq=$("qq").value;
    var skype=$("skype").value;
    var mobile=$("mobile").value;
    var landphone=$("landphone").value;
    var address=$("address").value;
    var website=$("website").value;
    var  options={  
				   method:'get',  
				   parameters:"msn="+msn+"&gtalk="+gtalk+"&qq="+qq+"&skype="+skype+"&mobile="+mobile+"&landphone="+landphone+"&address="+escape(address)+"&website="+website+"&Type=Edit",  
				   onComplete:function(transport)
					{ 
					    var v=transport.responseText;
					    if (v.indexOf("??")>-1)
					    {
                           $("Div_Error").style.display="";
                           $("Div_Succ").style.display="none";
                           $("Div_Error").innerHTML="修改失败";
                        }
					    else
					    {
					           var path='<%=path %>'
					           var f='<%=Request.QueryString["f"] %>'
					          if(path==""&&f=="1")
					          {
                                    window.location.href="UserHeadPhoto.aspx?f=1";
					          }
					          else
					          { 
                                   $("Div_Error").style.display="none";
                                   $("Div_Succ").style.display="";
                                   $("Div_Succ").innerHTML=v;
                              } 
                        }
					}  
				  }; 
       new Ajax.Request('edit-link.aspx',options);
}

function Load(I,title,span)
{
    sp=$(span.id).id;
    var content="<br/>可见度：<select id=\"selectDis\"><option value=\"0\" selected>全站用户可见</option><option value=\"1\">相同网络用户及好友可见</option><option value=\"2\">仅好友可见</option><option value=\"3\">仅自己可见</option></select><br/><span id=\"spanSub\"></span>";
    ShowDlg(464,194,title,content,"LoadOnclick("+I+","+sp+")");
}

function LoadOnclick(s,span)
{
    var Privacy=$("selectDis").value;
    var strName;
    if (s == 0){strName="EmailPrivacy";}
    else if (s == 1){strName="MSNPrivacy";}
    else if (s == 2){strName="GTalkPrivacy";}
    else if (s == 3){strName="QQPrivacy";}
    else if (s == 4){strName="SkypePrivacy";}
    else if (s == 5){strName="MobilePrivacy";}
    else if (s == 6){strName="TelPrivacy";}
    else if (s == 7){strName="AddrPrivacy";}
    else if (s == 8){strName="WebSitePrivacy";}
    var  options={  
				   method:'get',  
				   parameters:"Privacy="+Privacy+"&strName="+strName+"&Type=Privacy",  
				   onComplete:function(transport)
					{ 
					    var v=transport.responseText; 
					    alert(v);
					    if (v.indexOf("??")>-1)
					    {
                           $('spanSub').innerHTML="设置失败！";
                        }
					    else
					    {
                           $('spanSub').innerHTML=v;
                           var value=$("selectDis").options[$("selectDis").selectedIndex].text;
                           $(span.id).innerHTML=value;
                           HideAlertBox();
                        }
					}  
				  }; 
      new Ajax.Request('edit-link.aspx',options);
}

</script>