<%@ LANGUAGE = VBScript.Encode %>
<!--#include virtual="/include/pub_var.inc"-->
<!--#include virtual="/include/data.inc"-->
<%#@~^4AAAAA==@#@&z&确定`Id进行(Hd后台保存@#@&V+Hk['DDrhvD+$;+kY`rVnXbNr#b@#@&dDDKlD4q	0G~{PIn5!+dYcjD-DjlDbl(s+k`EnzKum&1s}E#@#@&/D.KlDt&xWW~x,J4YD2)JzE~LPIn5!+dYcjD-DjlDbl(s+k`E?AI#3"{1z\2r#PL~J+6Yv/ODKCDt(x6G~&xdOMI+-ckY.nmO4qU6WBJzr#*@#@&r0IAAA==^#~@%>
<html>
<head>
<title><%=#@~^BQAAAA==ObYsIgIAAA==^#~@%></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<%=#@~^DAAAAA==dDDmbx1VE9+8zQQAAA==^#~@%>
<%=#@~^DAAAAA==dDDmbx1VE9+yzgQAAA==^#~@%>
<SCRIPT language=javascript>
function checkstr(){
   var str=window.content.value;
   var len=parseInt(str.length);
   var val="";
   var testval="true";
   var testval11=0;
   var testval22=0;
   var testval33="";
   var testval44="";
   if ((str.substring(0,1)==" ")||(str.substring(0,1)=="&")||(str.substring(0,1)=="|"))
      testval="false";
   else{
      for (i=0;i<len;i++){
         val=str.substring(i,i+1);
         switch (val){
		    case "&" :
			   if ((str.substring(i-1,i)!==" ")||(str.substring(i+1,i+2)!==" "))
			      testval="false";
			   break;
		    case "|" :
			   if ((str.substring(i-1,i)!==" ")||(str.substring(i+1,i+2)!==" "))
			      testval="false";
			   break;
	        case "!" :
		       break;
	        case "(" :
			   if (str.substring(i+1,i+2)==" ")
			      testval="false";
		       testval11++;
			   break;			 
	        case ")" :
		       testval22++;
			   break;			 
	     }

    }
    if (testval11!==testval22)
      testval="false";
   }
if (testval=="false")
   return false;
else 
   return true;
}

function save_keylist()
{
	var KeyListid=window.KeyListid.value;
	if (KeyListid=="")
	   KeyListid=0;
	var KeyClass=window.KeyClass.value;
	var content=window.content.value;
	var str=/&/g;
	content=content.replace(str,"||");
	
    
	if (KeyClass=="")
	{
		alert("关键字组不能为空！");
		window.KeyClass.focus();
		return false;
	}
	
	else if (content=="")
	{
		alert("表达式不能为空！");
		window.content.focus();
		return false;
	}
    else if (!checkstr()){
		alert("表达式书写错误,请重新输入！");
		window.content.focus();
		return false;
	    
	}
	else
	{
    var oXMLDoc = new ActiveXObject('MSXML');
	var sURL;
	sURL="<%=#@~^CwAAAA==dDDKmY4qx6WcgQAAA==^#~@%>save_keylist.asp?keylistid="+KeyListid+"&KeyClass="+KeyClass+"&content="+content;
  
	oXMLDoc.url = sURL;
	
	var oRoot=oXMLDoc.root;
	var result;
	if(oRoot.children != null)
    	{
        for(var i=0;i<oRoot.children.length;++i)
        {
           result= oRoot.children.item(i).text;
       	}
		if (result=="1")
		{
		alert("保存成功");
		window.roleviewFrame.location="keylist_view.asp?keyid=<%=#@~^BQAAAA==VXr9FgIAAA==^#~@%>";
		window.Keylistindex.value="";
		window.KeyListid.value="";
		window.content.value="";
		window.content.focus();
		}
		else
		{
		alert(result);
		}
	}

	}
}
function del_keylist()
{
    var KeyListid=window.KeyListid.value;
	var KeyClass=window.KeyClass.value;
 	if ((KeyListid=="")||(KeyClass==""))
	{
		alert("请选择要删除的记录！");
		return false;
	}
	else
	{
    var oXMLDoc = new ActiveXObject('MSXML');
	var sURL;
	sURL="<%=#@~^CwAAAA==dDDKmY4qx6WcgQAAA==^#~@%>del_keylist.asp?keylistid="+KeyListid;
    oXMLDoc.url = sURL;
	
	var oRoot=oXMLDoc.root;
	var result;
	if(oRoot.children != null)
    	{
        for(var i=0;i<oRoot.children.length;++i)
        {
           result= oRoot.children.item(i).text;
       	}
		if (result=="0")
		{
		alert("删除失败！");
		}
		else
		{
		alert("删除成功");
		window.roleviewFrame.location="keylist_view.asp?keyid=<%=#@~^BQAAAA==VXr9FgIAAA==^#~@%>";
	    window.Keylistindex.value="";
		window.KeyListid.value="";
		window.content.value="";
		}
	}

	}
}
</script>
</head>

<body bgcolor=<%=#@~^CwAAAA==d!4Abx1WVKDtwQAAA==^#~@%> text="#000000" leftmargin=<%=#@~^BQAAAA==s0OsGAIAAA==^#~@%> topmargin=<%=#@~^BAAAAA==OKwhwAEAAA==^#~@%> marginwidth=<%=#@~^BgAAAA==hSk[DtjQIAAA==^#~@%> marginheight=<%=#@~^BwAAAA==h4+rTtD5gIAAA==^#~@%> scroll="no">
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="100%">
  	<%#@~^zAAAAA==@#@&dv取关键字组名@#@&i/;^'rd+^+^Y,e~WMW:,O4^3+H^slk/,h4+.n,3nX1slk/r[{JP'~1kUYvVXr9#@#@&dk+D~Dk{V+HVrdD'mKUxc+6^;Y`k;s#@#@&i3nX	C:'.d|3+zsb/O`rVX^^lk/xm:E#@#@&7Dk{VnHVkkOR1VWkn@#@&i/Y~Ddm0+zVbdY{xGO4kxLM0AAAA==^#~@%>
  <tr> 
    <td  height="20"  bgcolor="buttonface"　class="csstitle">
	&nbsp;<b>&nbsp;<%=#@~^BwAAAA==VXUm:6gIAAA==^#~@%></b>
    </td>
  </tr>
  <tr> 
    <td valign="top"> <iframe ID="roleviewFrame" name="roleviewFrame" src="Keylist_view.asp?Keyid=<%=#@~^BQAAAA==FXr99gEAAA==^#~@%>" style="background-color:transparent" scrolling="yes" frameborder="1" width="100%" height="100%"></iframe> 
    </td>
  </tr>
  
  <tr> 
    <td height="30" bgcolor="buttonface" valign="middle"> 
      
      &nbsp; 编号：
	  <input type="text" readonly class="cssButtonArea" name="Keylistindex" size="3">
	  <input type="hidden" name="KeyListid">
  <!--关键字组：<select name="KeyClass">
	  <%#@~^ZgAAAA==@#@&d~,/$V'r/s+1Y~e,0.GsPY(s3Xm^Cd/r@#@&d~PdnDP./{^W	x nX+m;O`d;^b@#@&7,P9WPStbs+,xGY,Dd W0@#@&d,PmBwAAA==^#~@%>
	  <option value="<%=#@~^EAAAAA==.k`E0+HmVm/krNr#pgUAAA==^#~@%>"><%=#@~^EgAAAA==.k`E0+HmVm/kUls+E#egYAAA==^#~@%></option>
	  <%#@~^XwAAAA==@#@&d~,DkR:K\U+XY@#@&iP~sKWw@#@&d,PDk ^VK/@#@&d~~k+OPMd'	WO4bxo@#@&iP~/O,mG	x{xWDtbUo@#@&7P,fxcAAA==^#~@%>
	  &nbsp;&nbsp;描述：<input type="text"  name="Desc" >
     </select>-->
	  &nbsp;&nbsp;表达式：
      <input  name="content" type="text" size="50" >
      <input type="submit" name="Submit" value="保存" onclick="javascript:save_keylist()">
      <input type="submit" name="delkeylist" value="删除" onclick="javascript:del_keylist()">
	  <input type="hidden" name="KeyClass" value="<%=#@~^BQAAAA==FX(GtgEAAA==^#~@%>">
      </td>
  </tr>
</table>
</body>
</html>

