<%
if request.cookies("buyok")("admin")="" then response.write "<meta http-equiv='refresh' content='0;URL=../admin.asp'>"
%>
<!--#include file="../include/nowshop.asp"-->

<script language=javascript src=../include/mouse.js></script>
 <%
sub checkmanage(str)
Set mrs = conn.Execute("select * from manage where username='"&request.cookies("buyok")("admin")&"'")
if not (mrs.bof and mrs.eof) then
manage=mrs("manage")
if instr(manage,str)<=0 then
response.write "<script language='javascript'>"
response.write "alert('警告：您没有此项操作的权限！');"
response.write "location.href='quit.asp';"
response.write "</script>"
response.end
else
session("buyok_admin_login")=0
end if
else 
response.write "<script language='javascript'>"
response.write "alert('没有登陆，不能执行此操作！');"
response.write "location.href='quit.asp';"
response.write "</script>"
response.end
end if
set mrs=nothing
end sub
%>
<%call checkmanage("01")%>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<LINK href="../images/css.css" type=text/css rel=stylesheet>
<LINK href="../list/newhead.css" type=text/css rel=stylesheet>
</head>
<BODY bgcolor="#D9EAFC">
<%
action=request("ok")
call aspsql()
if action="" then 
Set rs = conn.Execute("select * from bconfig") 
%>
		  <table height="5"><tr><td></td></tr></table>

<TABLE cellSpacing=0 cellPadding=0 width=95% border=0 style="BORDER-RIGHT: #b1bfee 1px solid; BORDER-TOP: #b1bfee 1px solid; BORDER-LEFT: #b1bfee 1px solid; BORDER-BOTTOM: #b1bfee 1px solid" 
>
  <TBODY>
    <TR>
      <TD width="90%" bgColor=#f4f5fd><font color="#000000">　<B><font color="#FF0000">&nbsp;在线咨询设置</font></B></font></TD>
      <TD bgColor=#f4f5fd height=30><font color="#000000">&nbsp;<a href="http://www.nowshop.com.cn/help/index.asp?boardid=2&page=1" target="_blank">设置帮助</a></font></TD>
    </TR>
  </TBODY>
</TABLE>
		  <table height="5"><tr><td></td></tr></table>

<table width="95%"  border="0" cellpadding="0" cellspacing="1" bgcolor="#b1bfee">
  <form action=config4.asp method=post name=setup>
    <tr bgcolor="#FFFFFF">
      <td width=20% align=right>“在线咨询”状态 &nbsp;</td>
      <td > <input type="radio" name="qqonline" value="1" <%if rs("qqonline")=1 then%>checked<%end if%>>
        显示 
        <input type="radio" name="qqonline" value="0" <%if rs("qqonline")=0 then%>checked<%end if%>>
        隐藏 </td>
    </TR>
    <tr bgcolor="#FFFFFF">
      <td width=20% align=right>显示位置 &nbsp;</td>
      <td > <input type="radio" name="whereqq" value="1" <%if rs("whereqq")=1 then%>checked<%end if%>>
        左侧 
        <input type="radio" name="whereqq" value="0" <%if rs("whereqq")=0 then%>checked<%end if%>>
        右侧 &nbsp; <img src=../images/admin/memo.gif alt="建议放在右侧"></td>
    </TR>
    <tr bgcolor="#FFFFFF">
      <td width=20% align=right>客服QQ号 &nbsp;</td>
      <td > <input type=text value="<%=rs("adm_qq")%>" size=35 name="adm_qq" maxlength="50" size=50> 
        &nbsp; <img src=../images/admin/memo.gif alt="请填QQ号<br>多个QQ号用西文逗号隔开<br>注意：QQ号应与下面的昵称一一对应"> 
      </td>
    </TR>
    <tr bgcolor="#FFFFFF">
      <td width=20% align=right>客服QQ对应昵称 &nbsp;</td>
      <td > <input type=text value="<%=rs("adm_qq_name")%>" size=35 name="adm_qq_name" maxlength="50" size=50> 
        &nbsp; <img src=../images/admin/memo.gif alt="请填QQ昵称<br>多个昵称用西文逗号隔开<br>注意：昵称应与上面的QQ号一一对应"> 
      </td>
    </TR>
    <tr bgcolor="#FFFFFF">
      <td width=20% align=right>请选择头像 &nbsp;</td>
      <td> <table width=50% border=0>
          <tr>
            <td><input type="radio" name="qqskin" value="1" <%if rs("qqskin")=1 then%>checked<%end if%>>
              在线：</td>
            <td><img src=../images/qq/qqon1.gif border=0> </td>
            <td> 离线：</td>
            <td><img src=../images/qq/qqoff1.gif border=0> &nbsp; &nbsp; &nbsp; 
              &nbsp; <img src=../images/admin/memo.gif alt="上面所填QQ昵称较长时<br>请使用第一种小头像<br>否则会超过窗口宽度"></td>
          </tr>
          <tr>
            <td><input type="radio" name="qqskin" value="2" <%if rs("qqskin")=2 then%>checked<%end if%>>
              在线：</td>
            <td><img src=../images/qq/qqon2.gif border=0> </td>
            <td> 离线： </td>
            <td> <img src=../images/qq/qqoff2.gif border=0> </td>
          </tr>
          <tr>
            <td><input type="radio" name="qqskin" value="3" <%if rs("qqskin")=3 then%>checked<%end if%>>
              在线：</td>
            <td><img src=../images/qq/qqon3.gif border=0> </td>
            <td> 离线： </td>
            <td> <img src=../images/qq/qqoff3.gif border=0> </td>
          </tr>
          <tr>
            <td><input type="radio" name="qqskin" value="4" <%if rs("qqskin")=4 then%>checked<%end if%>>
              在线：</td>
            <td><img src=../images/qq/qqon4.gif border=0> </td>
            <td> 离线： </td>
            <td> <img src=../images/qq/qqoff4.gif border=0> </td>
          </tr>
          <tr>
            <td><input type="radio" name="qqskin" value="5" <%if rs("qqskin")=5 then%>checked<%end if%>>
              在线：</td>
            <td><img src=../images/qq/qqon5.gif border=0> </td>
            <td> 离线： </td>
            <td> <img src=../images/qq/qqoff5.gif border=0> </td>
          </tr>
        </table></td>
    </TR>
    <tr bgcolor="#FFFFFF">
      <td width=20% align=right>请选择样式 &nbsp;</td>
      <td > <input type="radio" name="kefuskin" value="1" <%if rs("kefuskin")=1 then%>checked<%end if%>>
        样式一 
        <input type="radio" name="kefuskin" value="2" <%if rs("kefuskin")=2 then%>checked<%end if%>>
        样式二 
        <input type="radio" name="kefuskin" value="3" <%if rs("kefuskin")=3 then%>checked<%end if%>>
        样式三 
        <input type="radio" name="kefuskin" value="4" <%if rs("kefuskin")=4 then%>checked<%end if%>>
        样式四 
        <input type="radio" name="kefuskin" value="5" <%if rs("kefuskin")=5 then%>checked<%end if%>>
        样式五 <a href=../images/help/qq.gif target=_blank><img src=../images/admin/memo.gif border=0 alt="点击预览效果"></a> 
      </td>
    </TR>
    <tr bgcolor="#FFFFFF">
      <td width=20% align=right>在线提示语 &nbsp;</td>
      <td > <TEXTAREA NAME="qqmsg_on" ROWS="3" COLS="34" style="overflow:auto;"><%=rs("qqmsg_on")%></TEXTAREA> 
        &nbsp; <img align=top src=../images/admin/memo.gif alt="客服在线时，鼠标指向头像或昵称<br>会显示这句个性化提示语<br>换行请加〈br〉。"></td>
    </tr>
    <tr bgcolor="#FFFFFF">
      <td width=20% align=right>离线提示语 &nbsp;</td>
      <td > <TEXTAREA NAME="qqmsg_off" ROWS="3" COLS="34" style="overflow:auto;"><%=rs("qqmsg_off")%></TEXTAREA> 
        &nbsp; <img align=top src=../images/admin/memo.gif alt="客服离线时，鼠标指向头像或昵称<br>会显示这句个性化提示语<br>换行请加〈br〉。"></td>
    </tr>
    <tr bgcolor="#FFFFFF">
      <td width="568" colspan=2 ><INPUT name="ok" TYPE="hidden" value="ok">
        <INPUT name=action TYPE="submit" value="保存设置"> &nbsp;</td>
    </tr>
  </form>
</table>
<table height="5"><tr><td></td></tr></table>

<%
rs.close
set rs=nothing
conn.close
set conn=nothing
end if
if action="ok" then
if request.form("qqonline")="" or request.form("whereqq")="" then
response.write "<script language='javascript'>"
response.write "alert('出错了，资料填写不完整或有错误！');"
response.write "location.href='javascript:history.go(-1)';"
response.write "</script>"
response.end
end if
if request.form("qqonline")=1 then
if trim(request.form("adm_qq"))="" or trim(request.form("qqmsg_on"))="" or trim(request.form("qqmsg_off"))="" then
response.write "<script language='javascript'>"
response.write "alert('出错了，资料填写不完整或有错误！');"
response.write "location.href='javascript:history.go(-1)';"
response.write "</script>"
response.end
end if
end if
if request.form("adm_qq_name")<>"" and request.form("adm_qq")<>"" then
adm_qq_name=replace(request.form("adm_qq_name"),"，",",")
adm_qq=replace(request.form("adm_qq"),"，",",")
if UBound(split(adm_qq_name,","))<> UBound(split(adm_qq,",")) then
response.write "<script language='javascript'>"
response.write "alert('出错了，客服QQ号与其昵称未一一对应！');"
response.write "location.href='javascript:history.go(-1)';"
response.write "</script>"
response.end
end if
end if
Set rs=Server.CreateObject("ADODB.Recordset")
sql="select * from bconfig"
rs.open sql,conn,1,3
rs("qqonline")=request.form("qqonline")
rs("whereqq")=request.form("whereqq")
if request.form("qqonline")=1 then 
rs("kefuskin")=request.form("kefuskin")
rs("qqskin")=request.form("qqskin")
qqmsg_off=replace(trim(request.form("qqmsg_off")),"'","")
qqmsg_off=replace(qqmsg_off,"&quot;","")
rs("qqmsg_off")=qqmsg_off
qqmsg_on=replace(trim(request.form("qqmsg_on")),"'","")
qqmsg_on=replace(qqmsg_on,"&quot;","")
rs("qqmsg_on")=qqmsg_on
rs("adm_qq")=replace(request.form("adm_qq"),"，",",")
rs("adm_qq_name")=replace(request.form("adm_qq_name"),"，",",")
if request.form("adm_qq_name")="" then rs("adm_qq_name")=replace(request.form("adm_qq"),"，",",") 
end if
rs.update
url="config4.asp"
rs.close
set rs=nothing
conn.close
set conn=nothing
response.write "<script language='javascript'>"
response.write "alert('操作成功，您设置的信息已保存！');"
response.write "location.href='"&url&"';"
response.write "</script>"
end if%>
<table width="95%" border="0">
  <tr> 
    <td height="60"><font color="#FF0000">我们将为购买正版NowShop商城系统者免费设计全套广告图片；提供免费安装调试；免费送1%网银接口、支付宝接口；免费提供技术支持；免费提供系统升级；免费提供系统模板更换；免费代办网站ICP备案；使您的网店更具吸引力！</font></td>
  </tr>
  <tr> 
    <td><p>购买咨询或技术支持，请在周一至周五8：00-18：00间联系<br>
        Email / MSN：shop@nowshop.com.cn<br>
        电话：0551-5123308&nbsp;&nbsp;13965090551<br>
        QQ：2055008<br>
        网站：<a href="http://www.nowshop.com.cn" target="_blank">http://www.nowshop.com.cn</a><br>
        演示：<a href="http://ys.nowshop.com.cn" target="_blank">http://ys.nowshop.com.cn</a><br>
      </p>
      <p>Powerd By：NowShop商城系统 V3.5</p></td>
  </tr>
</table>
