<%@ LANGUAGE=VBScript codepage ="936" %>
<!--#include file="check.asp"-->
<html><head>
<title>武功添加</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="jh.css" rel="stylesheet" type="text/css">
</head>
<body leftmargin="0" topmargin="0">
<br><form method="post" action="jhgl.asp?act=addwg" name="form" onsubmit="return(check());">
  <table width="75%" border="1" align="center" cellpadding="1" cellspacing="0" bordercolor="#000000" bordercolordark="#FFFFFF">
    <tr align="center" bgcolor="#d7ebff"> 
      <td colspan="5">武功添加 </td>
    </tr>
    <tr> 
      <td width="58" align="center" bgcolor="#d7ebff">门派</td>
      <td width="115">
      <%Set conn=Server.CreateObject("ADODB.CONNECTION")
Set rs=Server.CreateObject("ADODB.RecordSet")
conn.open Application("sjjh_usermdb")
sqlstr="select * from sjjh_p "
rs.open sqlstr,conn,1,1
%>
<select name=b size=1 id="b" style="BACKGROUND-COLOR: #99CCFF; BORDER-BOTTOM: 1px double; BORDER-LEFT: 1px double; BORDER-RIGHT: 1px double; BORDER-TOP: 1px double; COLOR: #000000" onChange="sound('<EMBED src=../chat/wav/'+ options[selectedIndex].value +' autostart=true hidden=true>');">
<%
do while not rs.eof
%>
<option value="<%=rs("a")%>"><%=rs("a")%></option>
<%rs.movenext
loop
rs.close
set rs=nothing
conn.close
set conn=nothing
%></select></td>
      <td width="55" align="center" bgcolor="#d7ebff">武功名</td>
      <td width="86"><input type="text" name="a" value="名称" size="6" maxlength="10"></td>
      <td width="253" bgcolor="#d7ebff"><a onclick="sound('<EMBED src=../chat/wav/'+ document.form.e.value +' autostart=true hidden=true>');" >声音</a> 
        <select name=e size=1 id="e" style="BACKGROUND-COLOR: #99CCFF; BORDER-BOTTOM: 1px double; BORDER-LEFT: 1px double; BORDER-RIGHT: 1px double; BORDER-TOP: 1px double; COLOR: #000000" onChange="sound('<EMBED src=../chat/wav/'+ options[selectedIndex].value +' autostart=true hidden=true>');">
          <option value="随机" selected>随机</option>
          <%for t=1 to 14%>
          <option value="wav<%=t%>.wav">声<%=t%></option>
          <%next%>
        </select>
        强度 
        <select name=c size=1 id="c" style="BACKGROUND-COLOR: #99CCFF; BORDER-BOTTOM: 1px double; BORDER-LEFT: 1px double; BORDER-RIGHT: 1px double; BORDER-TOP: 1px double; COLOR: #000000">
          <option value="0">最弱</option>
          <option value="1" selected>普通</option>
          <option value="3">增强</option>
          <option value="5">至强</option>
        </select> <a onclick="sound('<EMBED src=../chat/wav/'+ document.form.e.value +' autostart=true hidden=true>');" >声音试听</a> 
      </td>
    </tr>
    <tr> 
      <td width="58" align="center" bgcolor="#d7ebff">使用武功</td>
      <td width="115"><input type="text" name="h" value="1" size="3" maxlength="4"></td>
      <td width="55" align="center" bgcolor="#d7ebff">使用内力</td>
      <td width="86"><input type="text" name="i" value="1" size="3" maxlength="4"></td>
      <td width="253" bgcolor="#d7ebff">部位 
        <select name=g size=1 id="g" style="BACKGROUND-COLOR: #99CCFF; BORDER-BOTTOM: 1px double; BORDER-LEFT: 1px double; BORDER-RIGHT: 1px double; BORDER-TOP: 1px double; COLOR: #000000">
          <option value="护头" selected>头部</option>
          <option value="护胸">胸部</option>
          <option value="护腹">腹部</option>
          <option value="护背">背部</option>
          <option value="护手">手部</option>
          <option value="护腿">腿部</option>
        </select>
        图片 
        <select name=d size=1 id="d" style="BACKGROUND-COLOR: #99CCFF; BORDER-BOTTOM: 1px double; BORDER-LEFT: 1px double; BORDER-RIGHT: 1px double; BORDER-TOP: 1px double; COLOR: #000000" onChange="document.images['face'].src='../jhmp/gif/'+options[selectedIndex].value+'';">
          <option value="随机" selected>随机</option>
          <%for t=1 to 130%>
          <option value="wg<%=t%>.gif">图<%=t%></option>
          <%next%>
        </select> </td>
    </tr>
    <tr> 
      <td width="58" align="center" bgcolor="#d7ebff">发招说明</td>
      <td colspan="4"><input name="f" type="text" value="##向%%打去#%!" size="65" maxlength="70"></td>
    </tr>
    <tr align="center" bgcolor="#d7ebff"> 
      <td height="29" colspan="5"> 
        <input name="submit" type="submit" value="添 加">
      </td>
    </tr>
    <tr> 
      <td height="29" colspan="5" bgcolor="#d7ebff">说明:发招说明为在使用此招式时的描述,其中##为发招人,%%代表被打人 
        #%表求图片位置。<br>
        招式名：<font color="#0000FF">烈火金刚</font> <br>
        说明为：<font color="#0000FF">##吸气，呼气。只见双掌发红…如烈火般燃烧，重重的向%%拍去……</font> 
        <div id="Layer1" style="position:absolute; width:144px; height:70px; z-index:1; left: 544px; top: 143px;"><font color="#0000FF"><img id=face src="../jhmp/gif/wg1.gif" alt=招式图片></font></div></td>
    </tr>
  </table>
</form>
<SCRIPT language="JavaScript"> 
var badword = new Array("射精","奸","去死","吃屎","妈","娘","日你","操你","干死你","王八","逼","傻","贱","狗","婊","表子","靠你","叉","插你","插死","干你","干死","日死","鸡巴","睾丸","包皮","龟头","奶子","作爱","做爱","床上","抱抱","鸡八","处女","打炮","爷","爸","我儿","麻痹","吗比","叼","草你","老吗","乌龟","猪","屎","屁","笨蛋","白痴","滚","大便","死八公","fuck","cao","腚","你吗");
var badstr = "~!@ #$%^&*()[]{}_+-|=\`;,:'\"?<>/～！·＃￥％…；‘’：“”—＊（　）—＋｜－＝、／。，？《》" ;
function sound(ss)
{mysound.innerHTML=ss;}
function IsBadWord(m)
{var tmp = "" ;
for(var i=0;i<m.length; i++)
{for(var j=0;j<badstr.length;j++)
if(m.charAt(i) == badstr.charAt(j)) break;
if(j==badstr.length) tmp += m.charAt(i) ;}
for(i=0;i<badword.length;i++) if(tmp.search(badword[i]) != -1) return true;
return false;}
function check()
{
var a=document.form.a.value;
var f=document.form.f.value;
var h=document.form.h.value;
var i=document.form.i.value;
if(a=="" || a==null){window.alert("输入要招式名字");return false;}
if(f=="" || f==null){window.alert("输入要说明文字");return false;}
if(h=="" || h==null){window.alert("武功不可以为空");return false;}
if(i=="" || i==null){window.alert("内力不可以为空");return false;}
var pattern = /^([0-9])+$/;
if(pattern.test(h)!=true){alert("提示：武功请使用数字！");return false;}
if(pattern.test(i)!=true){alert("提示：内力请使用数字！");return false;}
if( IsBadWord(a) ){
window.alert("招式名不文雅!");
return false;
}
if( CheckIfEnglish(a) ){
window.alert("请使用汉字输入!");
return false;
}
if( IsBadWord(f) ){
window.alert("招式说明不文雅!");
return false;
}
}
function check1()
{
var youname=document.modi.wgname.value;
if(youname=="" || youname==null){window.alert("请输入武功名字！！^_^!");return false;}
if( IsBadWord(youname) ){
window.alert("招式名字不文雅!");
return false;
}
if( CheckIfEnglish(youname) )
{
window.alert("武功中不能有非法字符、英文、数字；只能使用中文片假名！^_^!");
return false;
}
return true;
}

function CheckIfEnglish( String )
{ 
    var Letters = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890`=~!@#$%^&*()_+[]{}\\|/?.>,<;:'\-?<>/\"";
     var i;
     var c;
     for( i = 0; i < String.length; i ++ )
     {
          c = String.charAt( i );
	  if (Letters.indexOf( c ) < 0)
	     return false;
     }
     return true;
}

//-->
</SCRIPT>
<table width="75%" border="0">
  <tr> 
    <td id="mysound">&nbsp;</td>
  </tr>
</table>
