<%temp_customer_manage_grade_update_show=site.object_p%>
<!-- object[<%=site.object_p%>]::temp_customer_manage_grade_update_show -->
<form name=customerselect method=post action='do.asp?tr=customer|manage|grade|update|edit' >
<input type=hidden value='-1' name='select_sort' >
<script>var pact=new Array;var hhhh=new Array;</script>
<center><b>·用户升级·</b>
<div align="center" id="regselect">
  <table align=center width="100%" border="0" cellpadding="6" cellspacing="0" <%=site.object(site.object_p).style%>>
  <tr >
	<td width="100%" align=left colspan=6 background="<%=site.object(site.object_p).image%>/dot03.gif" height="1" ></td>
  </tr>
  <tr >
	<td width="10%" align=center bgcolor="#fafafa">选择</td>
	<td width="18%" align=center bgcolor="#fafafa">用户级别</td>
	<td width="13%" align=left bgcolor="#fafafa">所需积分</td>
	<td width="15%" align=center bgcolor="#fafafa">审核</td>
	<td width="44%" align=left bgcolor="#fafafa">是否可以注册</td>
  </tr>
  <tr >
	<td width="100%" align=left colspan=6 background="<%=site.object(site.object_p).image%>/dot03.gif" height="1" ></td>
  </tr>
<%
site.object(site.object_p).rs.open "select * from jins_customer_sort where sort_open=1 and sort_grade > "&site.temp.customer.info.sort_grade&" order by sort_grade ",conn,1,1
do while not site.object(site.object_p).rs.eof
          response.Write "<tr >"
          response.Write "  <td align=center width=10% ><input type='radio' value="&site.object(site.object_p).rs("sort_id")&" name=""select_sort"" ></td>"
          response.Write "  <td align=center width=18% >"&site.object(site.object_p).rs("sort_description")&"</td>"
'//////////////////////////////////////////////////////////////////////////////	  
          response.Write "  <td align=left width=13% >"&site.object(site.object_p).rs("sort_count")&"<img hspace=5 src='"&site.object(site.object_p).image&"/"
if site.temp.customer.info.count_rest>=site.object(site.object_p).rs("sort_count") then
          response.Write "yes.gif"
else
          response.Write "no.gif"
end if
          response.Write "  '></td>"
'//////////////////////////////////////////////////////////////////////////////	  
if site.object(site.object_p).rs("sort_update_admin")=1 then
          response.Write "  <td align=center width=15% >需要审核</td>"
else
          response.Write "  <td align=center width=15% >不需要审核</td>"
end if
'//////////////////////////////////////////////////////////////////////////////	  
if site.object(site.object_p).rs("sort_limit_customers")>conn.execute("select count(customer_reg_name) from jins_customer_list where sort_id="&site.object(site.object_p).rs("sort_id")&" ")(0) then
          response.Write "  <td align=left width=44% >可以注册</td>"
else
          response.Write "  <td align=left width=44% >停止注册:用户人数已达到限制数量！</td>"
end if
'//////////////////////////////////////////////////////////////////////////////	  
          response.Write "</tr>"
          response.Write "<tr >"
          response.Write "   <td width='100%' align=left colspan=6 background='"&site.object(site.object_p).image&"/dot03.gif' height='1' ></td>"
          response.Write "</tr>"
          response.Write "<script>hhhh["&site.object(site.object_p).rs("sort_id")&"]='"&site.object(site.object_p).rs("sort_description")&"';</script>"
   site.object(site.object_p).rs.movenext
loop
site.object(site.object_p).rs.close
%>
  <tr >
   <td align="center" colspan="6"><input onClick="startreg();" type=button value=" 开始申请 "><input type=reset name="Clear" value=" 重新选择 "></td>
  </tr>
</table>
</div>
<div align="center" id="regpact" style="display:none">
<table width="100%" border="0" cellpadding="5" cellspacing="1" >
	<tr>
		<td height="47%" width="100%" align="center" valign="top">$$$$申请条约</td>
	</tr>
  <tr >
	<td width="100%" align=left background="<%=site.object(site.object_p).image%>/dot03.gif" height="1" ></td>
  </tr>
	<tr>
		<td height="47%" width="100%" align="center" valign="top">
<%
site.object(site.object_p).rs.open "select sort_reg_pact,sort_id from jins_customer_sort where sort_open=1 and sort_grade > "&site.temp.customer.info.sort_grade&" order by sort_grade ",conn,1,1
do while not site.object(site.object_p).rs.eof
          response.Write "<textarea rows='30' style='display:none' id='pact_reg_"&site.object(site.object_p).rs("sort_id")&"' name='pact_reg' cols='67' >"&site.object(site.object_p).rs("sort_reg_pact")&"</textarea>"
   site.object(site.object_p).rs.movenext
loop
%>		
		
		</td>
	</tr>
  <tr >
	<td width="100%" align=left background="<%=site.object(site.object_p).image%>/dot03.gif" height="1" ></td>
  </tr>
	<tr>
		<td height="47%" width="100%" align="center" style="padding-top: 10px; padding-bottom: 10px">
		<input type="hidden" name="sort_id" ><input type="hidden" name="pact_ok" value="0"><p><input type="button" value="我同意" name="B3" onclick="document.customerselect.pact_ok.value='ok';customerselect.submit();">&nbsp;&nbsp; <input type="button" value="我不同意" name="B1" onclick="location.reload()"></p>
		</td>
	</tr>
</table>
<br>
</div>
</form>
<script>
var i=0;
var checkedpactid=-1;
var hhhh_temp;
//alert(customerselect.select_sort.length)
function startreg(){
if(customerselect.select_sort.length<=0)checkedpactid = customerselect.select_sort.value;
for (i=0; i < customerselect.select_sort.length; i++) {
	if (customerselect.select_sort[i].checked) {
		checkedpactid = customerselect.select_sort[i].value;
	}
}
if(checkedpactid==-1){
alert('请选择您要申请的用户类型！')
return false
}
document.customerselect.sort_id.value=checkedpactid;
document.getElementById("regselect").style.display="none";
//document.getElementById("pact_reg").value=pact[checkedpactid];
hhhh_temp=document.getElementById("regpact").innerHTML;
document.getElementById("regpact").innerHTML=hhhh_temp.replace('$$$$',hhhh[checkedpactid]);
document.getElementById("pact_reg_"+checkedpactid).style.display="";
document.getElementById("regpact").style.display="";
}
</script>
<%
site.object(site.object_p).rs.close
set site.object(site.object_p).rs=nothing

%>