<!--#INCLUDE FILE="../HXINCLUDE/HXINCLUDEHEAD.ASP"-->
<%if WS_S.MemberPriv("WS_SystemSettel")<>1 then HX_GoBack "对不起,您的权限不够!",""
WS_Teid=request("WS_Teid"):WS_Companyname=request("WS_Companyname"):WS_Telphone=request("WS_Telphone"):ColumnName="":Tablename="HX_Telsearch"
if WS_Teid<>"" and isnumeric(WS_Teid) then
  if request("action")="editsave" then Orderby=" where WS_Teid<>"&WS_Teid&" and WS_Companyname='"&WS_Companyname&"' and WS_Telphone='"&WS_Telphone&"'" else Orderby=" where WS_Teid="&WS_Teid
else
 response.Write("<script language=javascript>alert('非法操作!');window.close();</script>"):response.end
end if
set rs=WS_S.HX_SetRSD(ColumnName,Tablename,Orderby)
if request("action")="editsave" then
  if rs.recordcount>0 then  Call WS_S.HX_GoBack("此号码已存在","")
  Call WS_S.HX_RSClose(rs)
  set rs=WS_S.HX_SetRSD(ColumnName,Tablename," where WS_Teid="&WS_Teid)
  rs("WS_Companyname")=WS_Companyname:rs("WS_Telphone")=WS_Telphone:rs.update
  response.write "<script>alert('修改成功');window.opener.location.reload();window.close();</script>":response.end
else
  if rs.recordcount>0 then WS_Companyname=rs("WS_Companyname"):WS_Telphone=rs("WS_Telphone")
end if
response.Write "<head><meta http-equiv='Content-Type' content='text/html; charset=gb2312'><title>常用电话修改</title><link rel=stylesheet type=text/css href='../HXinclude/HX_Style.css'><script src='../hxinclude/HX_function.js'></script></head><body topmargin='20' leftmargin='0' bottommargin='0'><script language='javascript'>  function check(){ var frms=document.form2;  if(frms.WS_Companyname.value=='')    {	alert('单位名称不能为空！');	frms.WS_Companyname.focus();return false;	}  if(frms.WS_Telphone.value=='')    {	alert('电话号码不能为空！');	frms.WS_Telphone.focus();	return false;	}	return true;  }</script><table width='380'  border='0' cellspacing='1' cellpadding='0' align=center bgcolor='#613c25'><tr><td colspan='2' bgcolor=FFFBE8><table width='100%'  border='0' cellspacing='0' cellpadding='0'><tr><td height='25' background='../hximages/titleline.gif'><font class='fontmenu'>常用电话修改</font></td></tr></table><table width='100%'  border='0' cellpadding='0' cellspacing='1' bgcolor=613c25><tr bgcolor='FFFBE8'><td><table width='100%'  border='0' cellspacing='1' cellpadding='2' bgcolor=BF9B73><form name='form2' method='post' action='?action=editsave' onSubmit='return check();'><tr bgcolor='#FFFBE8'><td width='30%' bgcolor='#FFFBE8'><div align='right'>单位名称：</div></td><td width='70%'><input type='text' name='WS_Companyname' size=25  value='"&WS_Companyname&"'></td></tr><tr bgcolor='#FFFBE8'><td bgcolor='#FFFBE8'><div align='right'>电话号码：</div></td><td><input type='text' name='WS_Telphone' size=25 value='"&WS_Telphone&"'></td></tr><tr bgcolor='#FFFBE8'><td colspan='2'><div align='right'><input type='submit' name='Submit' value=' 修 改 '>&nbsp;&nbsp;<input name='' type='reset' value=' 重 输 '>&nbsp;&nbsp;<input name='' type='button' value=' 关 闭 ' onclick='window.close();'>        &nbsp;       </div></td><input type='hidden' name='WS_Teid' size=25 value='"&WS_Teid&"'></tr></form></table></td></tr></table></td></tr></table></td></tr></table>"
WS_S.HX_RSClose rs%>