<!--#Include File="Connection.Asp"-->
 
<%
Dim JaZ,C,flyN,B,cur
Set JaZ = new q_zone
B = JaZ.JaKillStr(Request.QueryString("JaUid"))
If B="" Then
B= "2"
End If
C=Split(JaZ.GetHeadElement("*",B,"JaFaceSet",""),"<><><>")
flyN = split(Trim(C(2)),"|")
If Cint(Trim(C(1)))<>0 Then
cur = "CURSOR:url('cur/"&C(1)&".ani');"
Else
cur = ""
End If 

Dim JaCheckIsLog
JaCheckIsLog = JaZ.JaIsUser(B)
If JaCheckIsLog <> "yes" Then
Response.Write "<script language=javascript>alert('你没有权限观看该页面!');"
Response.Write "window.document.location.href='javascript:history.go(-1)';</script>"
End if
%>
<html>
<head>
<META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>JaZone</title>
<link type="text/css" rel="stylesheet" href="Style/<%=Trim(C(5))%>/css.css">
</head>
<script>
function CheckJaUser() {
         if (document.form1.baalna.value=="")
           {
           alert("姓名不能为空!");
           document.form1.baalna.focus();
           return false;
           }
         if (document.form1.baalxin.value=="-1")
           {
           alert("请选择你的星座!");
           document.form1.baalxin.focus();
           return false;
           }
         if (document.form1.baalhigh.value=="")
           {
           alert("身高不能为空!");
           document.form1.baalhigh.focus();
           return false;
           }
        if (document.form1.baalweigh.value=="")
           {
           alert("体重不能为空!");
           document.form1.baalweigh.focus();
           return false;
           }
		   if (document.form1.baallove.value=="")
           {
           alert("爱好不能为空!");
           document.form1.baallove.focus();
           return false;
           }
         if (document.form1.baalmemo.value=="")
           {
           alert("简介不能为空!");
           document.form1.baalmemo.focus();
           return false;
           }
}

var iTimerId;
var iTimeOut=0;

function adjustSize(obj,w, h) {
	if ( (obj.width/obj.height) > (w/h) ) {
		if (obj.width>w) obj.style.width=w;
	}
	else {
		if (obj.height>h) obj.style.height=h;
	}
}

function avoidEscapeChar(varstr, charstr){
	var invalid_str="";
	for (i=0; i<charstr.length; i++) {
		if (varstr.indexOf(charstr.charAt(i)) >=0)
			invalid_str += charstr.charAt(i)+" ";
		}
	return invalid_str;
}

function adjustTimer(obj,w,h)
{
	if(obj.height>h||obj.width>w)
	{
		adjustSize(obj,w,h);
		clearInterval(iTimerId);	
	}
	iTimeOut++;
	if(iTimeOut>100)
	{
			clearInterval(iTimerId);
	}
}

function startAdjust()
{
	iTimerId = setInterval("adjustTimer(form1.urlimg,120,120)",100);
}

function postPic()
{
		var urla;
		urla = prompt("请输入图片的地址","http://");
		if(!urla) return ;
		var invalid_str="";
		var test_str="'\"<>\\";
		invalid_str +=avoidEscapeChar(urla, test_str);
		if (invalid_str != "") {
			alert("请不要在输入中包含 " + invalid_str + "等字符。");		
			return ;
		}
		if(urla == ""|| urla == "http://" || urla.length < 7)
		return ;
		if(urla.substring(0,7) != "http://" && urla.substring(0,7) !="HTTP://")
			return;
		
		form1.urlimg.src = urla;
		form1.ouPhoto.value = urla;
		startAdjust();
}
function clearPic()
{
    	form1.urlimg.src  = "Qz/nopic.gif";
	form1.ouPhoto.value = "Qz/nopic.gif";
}
</script>
<body leftMargin=2 topMargin=0 marginheight="0" marginwidth="0" style="background-color:transparent;<%=cur%>" text="#cccccc" link="#cccccc" vlink="#cccccc" alink="#cccccc">
<table width="100%"  border="0" cellspacing="0" cellpadding="0">
  <tr> 
    <td height="23" colspan="3" background="Style/<%=Trim(C(5))%>/titleback.gif">&nbsp;<span class="classs"><img src="Style/<%=Trim(C(5))%>/b.gif" width="1" height="1" align="absmiddle" class="ltitle">&nbsp;<b>添加偶像</b></span></td>
  </tr>
  <tr> 
    <td width="845" height="2"></td>
    <td width="29"></td>
    <td width="131"></td>
  </tr>
</table>
<BR>
<table width="102%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td><div align="center">
        <form name="form1" method="post" action="BaalSave.Asp?JaUid=<%=B%>" onSubmit="return CheckJaUser();">
          <table width="100%" border="0" cellspacing="2" cellpadding="0">
            <tr> 
              <td width="32%" rowspan="8" valign="top"> <table width="125" height="125" border="0" cellpadding="0" cellspacing="1" bgcolor="#999999">
                  <tr> 
                    <td bgcolor="#FFFFFF"><div align="center"><img src="Qz/nopic.gif" id="urlimg" width="120" height="120"></div></td>
                  </tr>
                </table>
                <input name="ouPhoto" type="hidden" id="ouPhoto" value="Qz/nopic.gif">
                <table width="125" border="0" cellspacing="3" cellpadding="0">
                  <tr> 
                    <td><div align="center"><a href="#" onclick ="postPic();return false;"><img src="Qz/bt_add.gif" width="43" height="19" border="0"></a> 
                        <a href="#" onclick ="clearPic();return false;"><img src="Qz/bt_del.gif" width="43" height="19" border="0"></a></div></td>
                  </tr>
                </table></td>
              <td width="14%">姓名：</td>
              <td colspan="3"> <input name="baalna" type="text" id="baalna" size="28" maxlength="16"></td>
            </tr>
            <tr> 
              <td>生日：</td>
              <td colspan="3"><select name="Janian" id="Janian">
                  <option value="1980" selected>1980</option>
                  <option value="1981">1981</option>
                  <option value="1982">1982</option>
                  <option value="1983">1983</option>
                  <option value="1984">1984</option>
                  <option value="1985">1985</option>
                  <option value="1986">1986</option>
                  <option value="1987">1987</option>
                  <option value="1988">1988</option>
                  <option value="1989">1989</option>
                  <option value="1990">1990</option>
                </select>
                年 
                <select name="Jayue" id="Jayue">
                  <option value="1" selected>1</option>
                  <option value="2">2</option>
                  <option value="3">3</option>
                  <option value="4">4</option>
                  <option value="5">5</option>
                  <option value="6">6</option>
                  <option value="7">7</option>
                  <option value="8">8</option>
                  <option value="9">9</option>
                  <option value="10">10</option>
                  <option value="11">11</option>
                  <option value="12">12</option>
                </select>
                月 
                <select name="Jari" id="Jari">
                  <option value="1" selected>1</option>
                  <%
Dim l
For l=2 To 31
Response.Write "<option value='"&l&"'>"&l&"</option>"
Next
%>
                </select>
                日</td>
            </tr>
            <tr> 
              <td>星座：</td>
              <td width="21%"><select name="baalxin" id="baalxin">
                  <option value="-1" selected>星座</option>
                  <option value="白羊座">白羊座</option>
                  <option value="金牛座">金牛座</option>
                  <option value="双子座">双子座</option>
                  <option value="巨蟹座">巨蟹座</option>
                  <option value="狮子座">狮子座</option>
                  <option value="处女座">处女座</option>
                  <option value="天秤座">天秤座</option>
                  <option value="天蝎座">天蝎座</option>
                  <option value="射手座">射手座</option>
                  <option value="摩羯座">摩羯座</option>
                  <option value="水瓶座">水瓶座</option>
                  <option value="双鱼座">双鱼座</option>
                </select> </td>
              <td width="10%">血型：</td>
              <td width="23%"><select name="baalxue" id="baalxue">
                  <option value="A" selected>A</option>
                  <option value="B">B</option>
                  <option value="AB">AB</option>
                  <option value="O">O</option>
                </select>
                型</td>
            </tr>
            <tr> 
              <td>身高：</td>
              <td width="21%"><input name="baalhigh" type="text" id="baalhigh" size="6" maxlength="6">
                厘米 </td>
              <td width="10%">体重：</td>
              <td width="23%"><input name="baalweigh" type="text" id="baalweigh" size="6" maxlength="6">
                公斤</td>
            </tr>
            <tr> 
              <td>爱好：</td>
              <td colspan="3"><input name="baallove" type="text" id="baallove" size="28" maxlength="20"> 
              </td>
            </tr>
            <tr> 
              <td>简介：</td>
              <td colspan="3"><textarea name="baalmemo" cols="27" rows="5" id="baalmemo"></textarea></td>
            </tr>
            <tr> 
              <td>音乐：</td>
              <td colspan="3"><select name="select">
           <option value="0" selected>未分配</option>
<%
Dim mm
Set mm=Conn.Execute("Select ID,SpecialName From [JaMusicSpecial] Where JaUid='"&B&"' ")
Do While Not mm.Eof
Response.Write "<option value='"&mm(0)&"'>"&mm(1)&"</option>"
mm.MoveNext
Loop
mm.Close
Set mm=Nothing
%>
                  
                </select></td>
            </tr>
            <tr> 
              <td>&nbsp;</td>
              <td colspan="3"><input name="isshow" type="checkbox" id="isshow" value="yes">
                首页显示该偶像</td>
            </tr>
            <tr> 
              <td colspan="5"> <div align="center"><br>
                  <input name="imageField" type="image" src="Qz/b.gif" width="1" height="1" border="0" class="submit" onClick="return checkAndSub()">
                  <input name="imageField" type="image" src="Qz/b.gif" width="1" height="1" border="0" class="reset" onClick="javascript:form1.reset();return false;">
                </div></td>
            </tr>
          </table>
        </form>
      </div></td>
  </tr>
</table>
</body>
</html>
