<%@ LANGUAGE=VBScript codepage ="936" %>
<!--#include file="check.asp"-->
<%Response.Expires=0
Response.Buffer=true
lb=LCase(trim(Request.QueryString("lb")))%>
<html><head><title>物品修改程序</title><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><link href="jh.css" rel="stylesheet" type="text/css"></head>
<SCRIPT language=JavaScript>
function check(){
var a=document.form.a.value;
var i=document.form.i.value;
var j=document.form.j.value;
var k=document.form.k.value;
var l=document.form.l.value;
var b=document.form.b.value;
var d=document.form.d.value;
var e=document.form.e.value;
var f=document.form.f.value;
var g=document.form.g.value;
var c=document.form.c.value;
var h=document.form.h.value;
var m=document.form.m.value;

if(a=="" || a=="物品名"){alert("提示：物品名不能为空！");return false;}
if(i=="" ){alert("提示：图片不能为空！");return false;}
if(j=="" ){alert("提示：耐久度不能为空！");return false;}
if(k=="" ){alert("提示：特性不能为空！");return false;}
if(l=="" ){alert("提示：条件表达式不能为空！");return false;}
if(b=="" ){alert("提示：类型不能为空！");return false;}
if(d=="" ){alert("提示：内力不能为空！");return false;}
if(e=="" ){alert("提示：体力为空！");return false;}
if(f=="" ){alert("提示：攻击不能为空！");return false;}
if(g=="" ){alert("提示：防御不能为空！");return false;}
if(c=="" ){alert("提示：说明不能为空！");return false;}
if(h=="" ){alert("提示：银两不能为空！");return false;}
if(m=="" ){alert("提示：金币不能为空！");return false;}
var pattern = /^([0-9])+$/;
if(pattern.test(j)!=true){alert("提示：耐久度请使用数字！");return false;}
if(pattern.test(d)!=true){alert("提示：内力请使用数字！");return false;}
if(pattern.test(e)!=true){alert("提示：体力请使用数字！");return false;}
if(pattern.test(f)!=true){alert("提示：攻击请使用数字！");return false;}
if(pattern.test(g)!=true){alert("提示：防御请使用数字！");return false;}
if(pattern.test(h)!=true){alert("提示：银两请使用数字！");return false;}
if(pattern.test(m)!=true){alert("提示：金币请使用数字！");return false;}
if(b!="暗器" && b!="宠物" && b!="毒药" && b!="锻造" && b!="花园" && b!="卡片" && b!="盔甲" && b!="双脚" && b!="头盔" && b!="鲜花" && b!="插花" && b!="药品" && b!="猪场" && b!="右手" && b!="左手" && b!="装饰" && b!="交通" && b!="物品"  && b!="配药" && b!="渔具"  && b!="渔"  && b!="渔饵" && b!="极品右手" && b!="极品左手" && b!="极品装饰" && b!="极品盔甲" && b!="极品双脚" && b!="极品头盔"){alert("提示：类型只能为：[暗器][宠物][毒药][锻造][花园][卡片]\n[盔甲][双脚][头盔][鲜花][药品][右手][左手][装饰]\n\n[极品盔甲][极品双脚][极品头盔][鲜花][插花][药品][极品右手][极品左手][装饰][交通][物品][配药]！");return false;}
if ((parseFloat(d)==0 && parseFloat(e)==0 && parseFloat(f)==0 && parseFloat(g)==0) && (b!="宠物" && b!="花园" && b!="卡片" && b!="交通" && b!="配药" && b!="渔" && b!="渔饵" && b!="渔具")){alert("提示：内力、体力、攻击、防御不能全部为0");return false;}
//if (parseFloat(h)==0 ){alert("提示：银两不能为0");return false;}
if (parseFloat(j)==0 && (b=="盔甲" || b=="双脚" || b=="头盔" || b=="右手" || b=="左手" || b=="装饰" || b=="极品盔甲" || b=="极品双脚" || b=="极品头盔" || b=="极品右手" || b=="极品左手" || b=="极品装饰")){alert("提示：在设置装备时，耐久值不能为0");return false;}

}
function DoTitle(addTitle) {
var sm="加入房间无限制";
var bds="无限制";
if (addTitle=="0"){var sm="只有会员才可以进入!";var bds="jh_hydj<>0";}
if (addTitle=="1"){var sm="30级以上玩家专用！";var bds="jh_dj>30";}
if (addTitle=="2"){var sm="此物品为大侠专属物品!";var bds="jh_sex='男'";}
if (addTitle=="3"){var sm="此物品为女侠专属物品!";var bds="jh_sex='女'";}
if (addTitle=="4"){var sm="华山派弟子的专用物品!";var bds="jh_mp='华山'";}
if (addTitle=="5"){var sm="只有华山派女弟子使用!";var bds="jh_mp='华山' and jh_sex='女'";}
if (addTitle=="6"){var sm="除华山派弟子使用！";var bds="jh_mp<>'华山'";}
if (addTitle=="7"){var sm="已婚江湖人士专用！";var bds="jh_peiou<>'无'";}
document.form.c.value=sm;
document.form.l.value=bds;
document.form.l.focus();
document.form.c.focus();
return; }
</script>
<form method="post" action="jhgl.asp?act=addwp" onSubmit="return check(this);" name="form" >
  <table width="50%" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#000000" bordercolordark="#FFFFFF">
    <tr><td height="14" colspan="2" align="center" bgcolor="#009900">物品修改程序</td></tr>
<tr bgcolor="" onmouseover="this.bgColor='#85C2E0';" onmouseout="this.bgColor='';">
      <td width="54" align="center" bgcolor="#d7ebff">物品名</td>
      <td width="330"><input name="a" type="text" value="物品名" size="20" maxlength="20"></td></tr>
<tr bgcolor="" onmouseover="this.bgColor='#85C2E0';" onmouseout="this.bgColor='';">
      <td width="54" align="center" bgcolor="#d7ebff">图片</td>
      <td width="330"><input type="text" name="i" value="无" size="10">(hcjs/jhjs/images)</td></tr>
<tr bgcolor="" onmouseover="this.bgColor='#85C2E0';" onmouseout="this.bgColor='';">
      <td width="54" align="center" bgcolor="#d7ebff">耐久度</td>
      <td width="330"><input name="j" type="text" value="0" size="10" maxlength="10">(只对装备有效果)</td></tr>
<tr bgcolor="" onmouseover="this.bgColor='#85C2E0';" onmouseout="this.bgColor='';">
      <td width="54" align="center" bgcolor="#d7ebff">特性</td>
      <td width="330"><input name="k" type="text" value="无" size="8" maxlength="10">(只对右手及宠物有效果，其它填写:无)</td></tr>
<tr bgcolor="" onmouseover="this.bgColor='#85C2E0';" onmouseout="this.bgColor='';">
      <td width="54" align="center" bgcolor="#d7ebff">条件</td>
      <td width="330"><input name="l" type="text" value="true" size="20" maxlength="10">(任意买写:<b>True</b>)<select name=kscz size=1 onchange=DoTitle(this.options[this.selectedIndex].value)>
<option value='' selected>快速指令</option><option value='0'>会员购买</option><option value='1'>30级上买</option><option value='2'>大侠专用</option><option value='3'>女侠专用</option><option value='4'>华山专用</option><option value='5'>华山女侠</option><option value='6'>华山不卖</option><option value='7'>以婚专用</option></select></td></tr>
<tr bgcolor="" onmouseover="this.bgColor='#85C2E0';" onmouseout="this.bgColor='';">
      <td width="54" align="center" bgcolor="#d7ebff">类型</td>
      <td width="330">
<select name=b>rs("b")
<option value='药品' <%if lb="药品" then%>selected<%end if%>>药品</option>
<option value='猪场' <%if lb="猪场" then%>selected<%end if%>>猪场</option>
<option value='暗器' <%if lb="暗器" then%>selected<%end if%>>暗器</option>
<option value='毒药' <%if lb="毒药" then%>selected<%end if%>>毒药</option>
<option value='宠物' <%if lb="宠物" then%>selected<%end if%>>宠物</option>
<option value='极品盔甲' <%if lb="极品盔甲" then%>selected<%end if%>>极品盔甲</option>
<option value='极品双脚' <%if lb="极品双脚" then%>selected<%end if%>>极品双脚</option>
<option value='极品头盔' <%if lb="极品头盔" then%>selected<%end if%>>极品头盔</option>
<option value='极品右手' <%if lb="极品右手" then%>selected<%end if%>>极品右手</option>
<option value='极品左手' <%if lb="极品左手" then%>selected<%end if%>>极品左手</option>
<option value='极品装饰' <%if lb="极品装饰" then%>selected<%end if%>>极品装饰</option>

<option value='盔甲' <%if lb="盔甲" then%>selected<%end if%>>盔甲</option>
<option value='双脚' <%if lb="双脚" then%>selected<%end if%>>双脚</option>
<option value='头盔' <%if lb="头盔" then%>selected<%end if%>>头盔</option>
<option value='右手' <%if lb="右手" then%>selected<%end if%>>右手</option>
<option value='左手' <%if lb="左手" then%>selected<%end if%>>左手</option>
<option value='装饰' <%if lb="装饰" then%>selected<%end if%>>装饰</option>
<option value='插花' <%if lb="插花" then%>selected<%end if%>>插花</option>
<option value='鲜花' <%if lb="鲜花" then%>selected<%end if%>>鲜花</option>
<option value='锻造' <%if lb="锻造" then%>selected<%end if%>>锻造</option>
<option value='花园' <%if lb="花园" then%>selected<%end if%>>花园</option>
<option value='卡片' <%if lb="卡片" then%>selected<%end if%>>卡片</option>
<option value='配药' <%if lb="配药" then%>selected<%end if%>>配药</option>
<option value='交通' <%if lb="交通" then%>selected<%end if%>>交通</option>
<option value='物品' <%if lb="物品" then%>selected<%end if%>>物品</option>
<option value='渔具' <%if lb="渔具" then%>selected<%end if%>>渔具</option>
<option value='渔饵' <%if lb="渔饵" then%>selected<%end if%>>渔饵</option>
<option value='渔' <%if lb="渔" then%>selected<%end if%>>渔</option>
</select>
</td></tr>
<tr bgcolor="" onmouseover="this.bgColor='#85C2E0';" onmouseout="this.bgColor='';">
      <td width="54" align="center" bgcolor="#d7ebff">内力</td>
      <td width="330"><input name="d" type="text" value="0" size="10" maxlength="10">(对于药品、暗器、毒药)</td></tr>
<tr bgcolor="" onmouseover="this.bgColor='#85C2E0';" onmouseout="this.bgColor='';">
      <td width="54" align="center" bgcolor="#d7ebff">体力</td>
      <td width="330"><input name="e" type="text" value="0" size="10" maxlength="10">(对于药品、暗器、毒药)</td></tr>
<tr bgcolor="" onmouseover="this.bgColor='#85C2E0';" onmouseout="this.bgColor='';">
      <td width="54" align="center" bgcolor="#d7ebff">攻击</td>
      <td width="330"><input name="f" type="text" value="0" size="10" maxlength="10">(对于所有装备有效)</td></tr>
<tr bgcolor="" onmouseover="this.bgColor='#85C2E0';" onmouseout="this.bgColor='';">
      <td width="54" height="20" align="center" bgcolor="#d7ebff">防御</td>
      <td width="330"><input name="g" type="text" value="0" size="10" maxlength="10">(对于所有装备有效)</td></tr>
<tr bgcolor="" onmouseover="this.bgColor='#85C2E0';" onmouseout="this.bgColor='';">
  <td align="center" bgcolor="#d7ebff">当银</td>
  <td><input name="dan_yin" type="text" id="dan_yin" value="100" size="10" maxlength="10">
    当铺时当此物品的银两.</td>
</tr>
<tr bgcolor="" onmouseover="this.bgColor='#85C2E0';" onmouseout="this.bgColor='';">
  <td align="center" bgcolor="#d7ebff">当金</td>
  <td><input name="dan_jin" type="text" id="dan_jin" value="0" size="10" maxlength="10">
    当铺时当此物品的金币.</td>
</tr>
<tr bgcolor="" onmouseover="this.bgColor='#85C2E0';" onmouseout="this.bgColor='';">
      <td width="54" align="center" bgcolor="#d7ebff">说明</td>
      <td width="330"><input name="c" type="text" value="此物品供大家购买!" size="40" maxlength="150"></td></tr>
<tr bgcolor="" onmouseover="this.bgColor='#85C2E0';" onmouseout="this.bgColor='';">
      <td width="54" align="center" bgcolor="#d7ebff">银两</td>
      <td width="330"><input name="h" type="text" value="100" size="10" maxlength="10">(价钱填写:0 隐藏物品)</td></tr>
<tr bgcolor="" onmouseover="this.bgColor='#85C2E0';" onmouseout="this.bgColor='';">
      <td width="54" align="center" bgcolor="#d7ebff">金币</td>
      <td width="330"><input name="m" type="text" value="0" size="10" maxlength="10">(<b>只对宠物有效</b>)</td></tr>
<tr align="center"><td colspan="2" bgcolor="#009900"><input type="submit" value="确 定"> <input  onClick="javascript:window.document.location.href='warelist.asp?lb=<%=lb%>'" value="返 回" type=button name="back"></td></tr>
</table>
</form>
