<!--#include file="Admin_Common.asp"-->
<!--#include file="Admin_CommonCode_JS.asp"-->
<%
'**************************************************************
' Software name: PowerEasy SiteWeaver
' Web: http://www.powereasy.net
' Copyright (C) 2005－2009 佛山市动易网络科技有限公司 版权所有
'**************************************************************

Sub Add()
    Response.Write "<form action='Admin_ProductJS.asp' method='post' name='myform' id='myform'>"
    Response.Write "  <table width='100%' border='0' align='center' cellpadding='2' cellspacing='1' class='border'>"
    Response.Write "    <tr class='title'>"
    Response.Write "      <td height='22' colspan='2' align='center'><strong>添加新的JS文件（普通列表方式）</strong></td>"
    Response.Write "    </tr>"

    Call JsBaseInif("", "", 0, "")

    Response.Write "    <tr class='tdbg'>"
    Response.Write "      <td height='25' align='right' ><strong>所属栏目：</strong></td>"
    Response.Write "      <td height='25'>"
    Response.Write "        <select name='ClassID'><option value='0'>所有栏目</option>" & GetClass_Option(0) & "</select>"
    Response.Write "        <input type='checkbox' name='IncludeChild' value='1' checked>包含子栏目&nbsp;&nbsp;&nbsp;&nbsp;<font color='red'><b>注意：</b></font>不能指定为外部栏目"
    Response.Write "      </td>"
    Response.Write "    </tr>"
    Response.Write "    <tr class='tdbg'>"
    Response.Write "      <td height='25' align='right' ><strong>所属专题：</strong></td>"
    Response.Write "      <td height='25' ><select name='SpecialID' id='SpecialID'><option value=''>不属于任何专题</option>" & GetSpecial_Option(0) & "</select></td>"
    Response.Write "    </tr>"
    Response.Write "    <tr class='tdbg'>"
    Response.Write "      <td height='25' align='right' ><strong>显示样式：</strong></td>"
    Response.Write "      <td height='25'>"
    Response.Write "        <select name='ShowType' id='ShowType'>"
    Response.Write "          <option value='1' selected>普通列表</option>"
    Response.Write "          <option value='2'>表格式</option>"
    Response.Write "          <option value='3'>各项独立式</option>"
    Response.Write "          <option value='4'>输出DIV格式</option>"
    Response.Write "          <option value='5'>输出RSS格式</option>"
    Response.Write "        </select>"
    Response.Write "      </td>"
    Response.Write "    </tr>"
    Response.Write "    <tr class='tdbg'>"
    Response.Write "      <td height='25' align='right' ><strong>" & ChannelShortName & "数目：</strong></td>"
    Response.Write "      <td height='25'><input name='ProductNum' type='text' value='10' size='5' maxlength='3'> <font color='#FF0000'>*</font></td>"
    Response.Write "    </tr>"
    Response.Write "    <tr class='tdbg'>"
    Response.Write "      <td height='25' align='right' ><strong>" & ChannelShortName & "属性：</strong></td>"
    Response.Write "      <td height='25'>"
    Response.Write "        <input name='IsHot' type='checkbox' id='IsHot' value='1'> 热门" & ChannelShortName & "&nbsp;&nbsp;&nbsp;&nbsp;"
    Response.Write "        <input name='IsElite' type='checkbox' id='IsElite' value='1'> 推荐" & ChannelShortName & "&nbsp;&nbsp;&nbsp;&nbsp;"
    Response.Write "        <font color='#FF0000'>如果都不选，将显示所有" & ChannelShortName & "</font>"
    Response.Write "      </td>"
    Response.Write "    </tr>"
    Response.Write "    <tr class='tdbg'>"
    Response.Write "      <td height='25' align='right' ><strong>" & ChannelShortName & "类型：</strong></td>"
    Response.Write "      <td height='25'>"
    Response.Write "        <select name='ProductType' id='ProductType'>"
    Response.Write "          <option value='1' selected>正常销售" & ChannelShortName & "</option>"
    Response.Write "          <option value='2'>涨价" & ChannelShortName & "</option>"
    Response.Write "          <option value='3'>特价" & ChannelShortName & "</option>"
    Response.Write "          <option value='4'>促销礼品</option>"
    Response.Write "          <option value='5'>正常销售和涨价" & ChannelShortName & "</option>"
    Response.Write "          <option value='6'>降价" & ChannelShortName & "</option>"
    Response.Write "          <option value='0'>所有" & ChannelShortName & "</option>"
    Response.Write "        </select>"
    Response.Write "      </td>"
    Response.Write "    </tr>"
    Response.Write "    <tr class='tdbg'>"
    Response.Write "      <td height='25' align='right' ><strong>日期范围：</strong></td>"
    Response.Write "      <td height='25'>只显示最近 <input name='DateNum' type='text' id='DateNum' value='30' size='5' maxlength='3'> 天内更新的" & ChannelShortName & "&nbsp;&nbsp;&nbsp;&nbsp;<font color='#FF0000'>&nbsp;&nbsp;如果为空或0，则显示所有天数的" & ChannelShortName & "</font></td>"
    Response.Write "    </tr>"
    Response.Write "    <tr class='tdbg'>"
    Response.Write "      <td height='25' align='right' ><strong>排序方法：</strong></td>"
    Response.Write "      <td height='25'>"
    Response.Write "        <select name='OrderType' id='OrderType'>"
    Response.Write "          <option value='1' selected>" & ChannelShortName & "ID（降序）</option>"
    Response.Write "          <option value='2'>" & ChannelShortName & "ID（升序）</option>"
    Response.Write "          <option value='3'>更新时间（降序）</option>"
    Response.Write "          <option value='4'>更新时间（升序）</option>"
    Response.Write "          <option value='5'>点击次数（降序）</option>"
    Response.Write "          <option value='6'>点击次数（升序）</option>"
    Response.Write "          <option value='7'>按评论数（降序）</option>"
    Response.Write "          <option value='8'>按评论数（升序）</option>"
    Response.Write "        </select>"
    Response.Write "      </td>"
    Response.Write "    </tr>"
    Response.Write "    <tr class='tdbg'>"
    Response.Write "      <td height='25' align='right' ><strong>" & ChannelShortName & "属性图片：</strong></td>"
    Response.Write "      <td height='25'>"
    Response.Write "        <select name='ShowPropertyType' id='ShowPropertyType'>"
    Response.Write "          <option value='0' >不显示</option>"
    Response.Write "          <option value='2'>符号</option>"
    Response.Write "          <option value='1' selected>小图片（样式1）</option>"
    Response.Write "          <option value='3' selected>小图片（样式2）</option>"
    Response.Write "          <option value='4' selected>小图片（样式3）</option>"
    Response.Write "          <option value='5' selected>小图片（样式4）</option>"
    Response.Write "          <option value='6' selected>小图片（样式5）</option>"
    Response.Write "        </select>"
    Response.Write "      </td>"
    Response.Write "    </tr>"
    Response.Write "    <tr class='tdbg'>"
    Response.Write "      <td height='25' align='right' ><strong>标题最多字符数：</strong></td>"
    Response.Write "      <td height='25'><input name='TitleLen' type='text' id='TitleLen' value='30' size='5' maxlength='3'>&nbsp;&nbsp;&nbsp;&nbsp;<font color='#FF0000'>如果为0，则显示完整标题。字母算一个字符，汉字算两个字符。</font></td>"
    Response.Write "    </tr>"
    Response.Write "    <tr class='tdbg'>"
    Response.Write "      <td height='25' align='right' ><strong>" & ChannelShortName & "内容字符数：</strong></td>"
    Response.Write "      <td height='25'><input name='ContentLen' type='text' id='ContentLen' value='0' size='5' maxlength='3'>&nbsp;&nbsp;&nbsp;&nbsp;<font color='#FF0000'>如果大于0，则在标题下方面显示指定字数的" & ChannelShortName & "内容</font></td>"
    Response.Write "    </tr>"
    Response.Write "    <tr class='tdbg'>"
    Response.Write "      <td height='25' align='right' ><strong>每行的列数：</strong></td>"
    Response.Write "      <td height='25'><input name='Cols' type='text' id='ContentLen' value='0' size='5' maxlength='3'>&nbsp;&nbsp;&nbsp;&nbsp;<font color='#FF0000'>超过此列数就换行</td>"
    Response.Write "    </tr>"
    Response.Write "    <tr class='tdbg'>"
    Response.Write "      <td height='50' align='right' ><strong>显示内容：</strong></td>"
    Response.Write "      <td height='50'><table width='100%' border='0' cellpadding='1' cellspacing='2'>"
    Response.Write "        <tr>"
    Response.Write "          <td><input name='ShowClassName' type='checkbox' id='ShowClassName' value='1'>所属栏目</td>"
    Response.Write "          <td>更新时间"
    Response.Write "            <select name='ShowDateType' id='ShowDateType'>"
    Response.Write "              <option value='0'>不显示</option>"
    Response.Write "              <option value='1'>年月日</option>"
    Response.Write "              <option value='2'>月日</option>"
    Response.Write "              <option value='3'>月-日</option>"
    Response.Write "            </select>"
    Response.Write "          </td>"
    Response.Write "        </tr>"
    Response.Write "        <tr>"
    Response.Write "          <td><input name='ShowHotSign' type='checkbox' id='ShowHotSign' value='1'>热点" & ChannelShortName & "标志</td>"
    Response.Write "          <td><input name='ShowNewSign' type='checkbox' id='ShowNewSign' value='1'>最新" & ChannelShortName & "标志</td>"
    Response.Write "          <td><input name='UsePage' type='checkbox' id='UsePage' value='1'>是否分页显示</td>"
    Response.Write "          <td> </td>"
    Response.Write "        </tr>"
    Response.Write "      </table></td>"
    Response.Write "    </tr>"
    Response.Write "    <tr class='tdbg'>"
    Response.Write "      <td height='25' align='right' ><strong>" & ChannelShortName & "打开方式：</strong></td>"
    Response.Write "      <td height='25'>"
    Response.Write "        <select name='OpenType' id='OpenType'>"
    Response.Write "          <option value='0'>在原窗口打开</option>"
    Response.Write "          <option value='1' selected>在新窗口打开</option>"
    Response.Write "        </select>"
    Response.Write "      </td>"
    Response.Write "    </tr>"
    Response.Write "    <tr class='tdbg'>"
    Response.Write "      <td height='25' align='right' ><strong>链接地址选项：</strong></td>"
    Response.Write "      <td height='25'>"
    Response.Write "        <select name='UrlType' id='OpenType'>"
    Response.Write "          <option value='0' selected>使用相对路径</option>"
    Response.Write "          <option value='1'>使用包含完整网址的绝对路径</option>"
    Response.Write "        </select>"
    Response.Write "      </td>"
    Response.Write "    </tr>"
    Response.Write "    <tr class='tdbg'>"
    Response.Write "      <td height='25' align='right' ><strong>每隔多少行空白一行：</strong></td>"
    Response.Write "      <td height='25'><input name='IntervalLines' type='text' id='ContentLen' value='0' size='5' maxlength='3'>&nbsp;&nbsp;&nbsp;&nbsp;<font color='#FF0000'>为0时不空行</td>"
    Response.Write "    </tr>"
    Response.Write "    <tr class='tdbg'>" & vbCrLf
    Response.Write "      <td height='25' align='right' ><strong>表格头部文字：</strong></td>" & vbCrLf
    Response.Write "      <td height='25' >" & vbCrLf
    Response.Write "        <table border='0' cellpadding='0' cellspacing='0' width='100%' height='100%' align='center'>" & vbCrLf
    Response.Write "          <tr class='tdbg' align='center'>" & vbCrLf
    Response.Write "            <td>商品名称</td>" & vbCrLf
    Response.Write "            <td>型号</td>" & vbCrLf
    Response.Write "            <td>规格</td>" & vbCrLf
    Response.Write "            <td>上市时间</td>" & vbCrLf
    Response.Write "            <td>单位</td>" & vbCrLf
    Response.Write "            <td>库存量</td>" & vbCrLf
    Response.Write "            <td>重量</td>" & vbCrLf
    Response.Write "          </tr>" & vbCrLf
    Response.Write "          <tr class='tdbg' align='center'>" & vbCrLf
    Response.Write "            <td>" & vbCrLf
    Response.Write "              <Input name='TableTitleStr1' type='text' value='商品名称'  size='10' maxlength='20' style='text-align: center;'></td>" & vbCrLf
    Response.Write "            <td>" & vbCrLf
    Response.Write "              <Input name='TableTitleStr2' type='text' value='型号'  size='10' maxlength='20' style='text-align: center;'></td>" & vbCrLf
    Response.Write "            <td>" & vbCrLf
    Response.Write "              <Input name='TableTitleStr3' type='text' value='规格'  size='10' maxlength='20' style='text-align: center;'></td>" & vbCrLf
    Response.Write "            <td>" & vbCrLf
    Response.Write "              <Input name='TableTitleStr4' type='text' value='上市时间'  size='10' maxlength='20' style='text-align: center;'></td>" & vbCrLf
    Response.Write "            <td>" & vbCrLf
    Response.Write "              <Input name='TableTitleStr5' type='text' value='单位'  size='10' maxlength='20' style='text-align: center;'></td>" & vbCrLf
    Response.Write "            <td>" & vbCrLf
    Response.Write "              <Input name='TableTitleStr6' type='text' value='库存量'  size='10' maxlength='20' style='text-align: center;'></td>" & vbCrLf
    Response.Write "            <td>" & vbCrLf
    Response.Write "              <Input name='TableTitleStr7' type='text' value='重量'  size='10' maxlength='20' style='text-align: center;'></td>" & vbCrLf
    Response.Write "          </tr>" & vbCrLf
    Response.Write "          <tr class='tdbg' align='center'>" & vbCrLf
    Response.Write "            <td>市场价</td>" & vbCrLf
    Response.Write "            <td>商城价</td>" & vbCrLf
    Response.Write "            <td>优惠价</td>" & vbCrLf
    Response.Write "            <td>会员价</td>" & vbCrLf
    Response.Write "            <td>折扣率</td>" & vbCrLf
    Response.Write "            <td>操作</td>" & vbCrLf
    Response.Write "          </tr>" & vbCrLf
    Response.Write "          <tr class='tdbg' align='center'>" & vbCrLf
    Response.Write "            <td>" & vbCrLf
    Response.Write "              <Input name='TableTitleStr8' type='text' value='市场价'  size='10' maxlength='20' style='text-align: center;'></td>" & vbCrLf
    Response.Write "            <td>" & vbCrLf
    Response.Write "              <Input name='TableTitleStr9' type='text' value='商城价'  size='10' maxlength='20' style='text-align: center;'></td>" & vbCrLf
    Response.Write "            <td>" & vbCrLf
    Response.Write "              <Input name='TableTitleStr10' type='text' value='优惠价'  size='10' maxlength='20' style='text-align: center;'></td>" & vbCrLf
    Response.Write "            <td>" & vbCrLf
    Response.Write "              <Input name='TableTitleStr11' type='text' value='会员价'  size='10' maxlength='20' style='text-align: center;'></td>" & vbCrLf
    Response.Write "            <td>" & vbCrLf
    Response.Write "              <Input name='TableTitleStr12' type='text' value='折扣率'  size='10' maxlength='20' style='text-align: center;'></td>" & vbCrLf
    Response.Write "            <td>" & vbCrLf
    Response.Write "              <Input name='TableTitleStr13' type='text' value='操作'  size='10' maxlength='20' style='text-align: center;'></td>" & vbCrLf
    Response.Write "          </tr>" & vbCrLf
    Response.Write "        </table>" & vbCrLf
    Response.Write "      </td>" & vbCrLf
    Response.Write "    </tr>" & vbCrLf
    Response.Write "    <tr class='tdbg'>" & vbCrLf
    Response.Write "      <td height='25' align='right' ><strong>显示商品库存方式：</strong></td>" & vbCrLf
    Response.Write "      <td height='25'>" & vbCrLf
    Response.Write "        <Select name='ShowStocksType' id='ShowStocksType'>" & vbCrLf
    Response.Write "         <option value='0' >不显示</option>" & vbCrLf
    Response.Write "         <option value='1' >显示虚拟库存</option>" & vbCrLf
    Response.Write "         <option value='2' >显示实际库存</option>" & vbCrLf
    Response.Write "        </Select></td>" & vbCrLf
    Response.Write "    </tr>" & vbCrLf
    Response.Write "    <tr class='tdbg'>" & vbCrLf
    Response.Write "      <td height='25' align='right' ><strong>按钮显示方式：</strong></td>" & vbCrLf
    Response.Write "      <td height='25'>" & vbCrLf
    Response.Write "        <Select name='ShowButtonType' id='ShowButtonType'>" & vbCrLf
    Response.Write "         <option value='0' >不显示</option>" & vbCrLf
    Response.Write "         <option value='1' >显示购买按钮</option>" & vbCrLf
    Response.Write "         <option value='2' >显示详细按钮</option>" & vbCrLf
    Response.Write "         <option value='3' >显示收藏按钮</option>" & vbCrLf
    Response.Write "         <option value='4' >显示购买＋详细按钮</option>" & vbCrLf
    Response.Write "         <option value='5' >显示购买＋收藏按钮</option>" & vbCrLf
    Response.Write "         <option value='6' >详细＋收藏按钮</option>" & vbCrLf
    Response.Write "         <option value='7' >三个都显示</option>" & vbCrLf
    Response.Write "        </Select></td>" & vbCrLf
    Response.Write "    </tr>" & vbCrLf
    Response.Write "    <tr class='tdbg'>" & vbCrLf
    Response.Write "      <td height='50' align='right' ><strong>显示商品详细信息：</strong></td>" & vbCrLf
    Response.Write "      <td height='50'>" & vbCrLf
    Response.Write "        <table width='100%' border='0' cellpadding='1' cellspacing='2'>" & vbCrLf
    Response.Write "          <tr>" & vbCrLf
    Response.Write "            <td>" & vbCrLf
    Response.Write "              <Input name='ShowTableTitle' type='checkbox' id='ShowTableTitle' value='yes' >表格头部文字</td>" & vbCrLf
    Response.Write "            <td>" & vbCrLf
    Response.Write "              <Input name='ShowProductModel' type='checkbox' id='ShowProductModel' value='yes' >是否显示商品型号</td>" & vbCrLf
    Response.Write "            <td>" & vbCrLf
    Response.Write "              <Input name='ShowProductStandard' type='checkbox' id='ShowProductStandard' value='yes' >是否显示商品规格</td>" & vbCrLf
    Response.Write "          </tr>" & vbCrLf
    Response.Write "          <tr>" & vbCrLf
    Response.Write "            <td>" & vbCrLf
    Response.Write "              <Input name='ShowUnit' type='checkbox' id='ShowUnit' value='yes' >是否显示商品单位</td>" & vbCrLf
    Response.Write "            <td>" & vbCrLf
    Response.Write "              <Input name='ShowWeight' type='checkbox' id='ShowWeight' value='yes' >是否显示商品重量</td>" & vbCrLf
    Response.Write "            <td>" & vbCrLf
    Response.Write "              <Input name='ShowPrice_Market' type='checkbox' id='ShowPrice_Market' value='yes' >是否显示市场价</td>" & vbCrLf
    Response.Write "          </tr>" & vbCrLf
    Response.Write "          <tr>" & vbCrLf
    Response.Write "            <td>" & vbCrLf
    Response.Write "              <Input name='ShowPrice_Original' type='checkbox' id='ShowPrice_Original' value='yes' >是否显示原价</td>" & vbCrLf
    Response.Write "            <td>" & vbCrLf
    Response.Write "              <Input name='ShowPrice' type='checkbox' id='ShowPrice' value='yes' >是否显示当前零售价</td>" & vbCrLf
    Response.Write "            <td>" & vbCrLf
    Response.Write "              <Input name='ShowPrice_Member' type='checkbox' id='ShowPrice_Member' value='yes' >是否显示会员价</td>" & vbCrLf
    Response.Write "            <td>" & vbCrLf
    Response.Write "              <Input name='ShowDiscount' type='checkbox' id='ShowDiscount' value='yes' >是否显示折扣率</td>" & vbCrLf
    Response.Write "          </tr>" & vbCrLf
    Response.Write "        </table>" & vbCrLf
    Response.Write "      </td>" & vbCrLf
    Response.Write "    </tr>" & vbCrLf
    Response.Write "    <tr class='tdbg'>" & vbCrLf
    Response.Write "      <td height='25' align='right' ><strong>自定义按钮图片：</strong></td>" & vbCrLf
    Response.Write "      <td height='25' >" & vbCrLf
    Response.Write "        <Input name='ButtonStyle' type='text' value=''  size='10' maxlength='20'>&nbsp;&nbsp;<font color='blue'>请填写定义图片数字</font><br>"
    Response.Write "举例：<br>"
    Response.Write "　" & InstallDir & ChannelDir & "/images/ProductBuy<FONT color='blue'>“数字”</FONT>.gif<br>"
    Response.Write "　" & InstallDir & ChannelDir & "/images/ProductContent<FONT color='blue'>“数字”</FONT>.gif<br>"
    Response.Write "　" & InstallDir & ChannelDir & "/images/ProductFav<FONT color='blue'>“数字”</FONT>.gif<br>"
    Response.Write "&nbsp;&nbsp;<font color='blue'>请按以上方式制作上传自定义按钮图片</font></td>"
    Response.Write "    </tr>" & vbCrLf
    Response.Write "    <tr class='tdbg'>" & vbCrLf
    Response.Write "      <td height='25' align='right' ><strong>表格CSS：</strong></td>" & vbCrLf
    Response.Write "      <td height='25'>" & vbCrLf
    Response.Write "        <Input name='CssNameTable' type='text' value=''  size='10' maxlength='10'>    <font color='#FF0000'>表格的CSS类名，可选参数</font></td>" & vbCrLf
    Response.Write "    </tr>" & vbCrLf
    Response.Write "    <tr class='tdbg'>" & vbCrLf
    Response.Write "      <td height='25' align='right' ><strong>表格头部CSS：</strong></td>" & vbCrLf
    Response.Write "      <td height='25'>" & vbCrLf
    Response.Write "        <Input name='CssNameTitle' type='text' value=''  size='10' maxlength='10'>    <font color='#FF0000'>表格头部行的CSS类名，可选参数。</font></td>" & vbCrLf
    Response.Write "    </tr>" & vbCrLf
    Response.Write "    <tr class='tdbg'>" & vbCrLf
    Response.Write "      <td height='25' align='right' ><strong>CSS类名：</strong></td>" & vbCrLf
    Response.Write "      <td height='25'>" & vbCrLf
    Response.Write "        <Input name='CssNameA' type='text' value=''  size='10' maxlength='10'>    <font color='#FF0000'>列表中文字链接调用的CSS类名，可选参数</font></td>" & vbCrLf
    Response.Write "    </tr>" & vbCrLf
    Response.Write "    <tr class='tdbg'>" & vbCrLf
    Response.Write "      <td height='25' align='right' ><strong>风格样式1：</strong></td>" & vbCrLf
    Response.Write "      <td height='25'>" & vbCrLf
    Response.Write "        <Input name='CssName1' type='text' value=''  size='10' maxlength='10'>    <font color='#FF0000'>列表中奇数行的CSS效果的类名，可选参数</font></td>" & vbCrLf
    Response.Write "    </tr>" & vbCrLf
    Response.Write "    <tr class='tdbg'>" & vbCrLf
    Response.Write "      <td height='25' align='right' ><strong>风格样式2：</strong></td>" & vbCrLf
    Response.Write "      <td height='25'>" & vbCrLf
    Response.Write "        <Input name='CssName2' type='text' value=''  size='10' maxlength='10'>    <font color='#FF0000'>列表中偶数行的CSS效果的类名，可选参数</font></td>" & vbCrLf
    Response.Write "    </tr>" & vbCrLf
    Response.Write "    <tr class='tdbg'>"
    Response.Write "      <td height='40' colspan='2' align='center'>"
    Response.Write "        <input name='ChannelID' type='hidden' id='ChannelID' value='" & ChannelID & "'>"
    Response.Write "        <input name='Action' type='hidden' id='Action' value='SaveAdd'>"
    Response.Write "        <input name='Submit' type='submit' id='Submit' value=' 添 加 '>"
    Response.Write "      </td>"
    Response.Write "    </tr>"
    Response.Write "  </table>"
    Response.Write "</form>"
End Sub

Sub Modify()
    Dim ID, sqlJs, rsJs, JsConfig
    ID = PE_CLng(Trim(Request("ID")))
    If ID = 0 Then
        FoundErr = True
        ErrMsg = ErrMsg & "<li>参数丢失！</li>"
        Exit Sub
    End If
    sqlJs = "select * from PE_JsFile where ID=" & ID
    Set rsJs = Conn.Execute(sqlJs)
    If rsJs.BOF And rsJs.EOF Then
        FoundErr = True
        ErrMsg = ErrMsg & "<li>找不到指定的JS文件！</li>"
        rsJs.Close
        Set rsJs = Nothing
        Exit Sub
    End If
    JsConfig = Split(rsJs("Config"), "|")

    If UBound(JsConfig) <= 20 Then
        JsConfig = rsJs("Config") & "|0|0|0|0|0|0|0|0|0|false|商品名称{$}型号{$}规格{$}上市时间{$}单位{$}库存量{$}重量{$}市场价{$}商城价{$}优惠价{$}会员价{$}折扣率{$}操作|false|false|false|false|false|false|false|false|false|false|||||||"
        JsConfig = Split(JsConfig, "|")
    End If
    
    Response.Write "<form action='Admin_ProductJS.asp' method='post' name='myform' id='myform'>"
    Response.Write "  <table width='100%' border='0' align='center' cellpadding='2' cellspacing='1' class='border'>"
    Response.Write "    <tr class='title'>"
    Response.Write "      <td height='22' colspan='2' align='center'><strong>修改参数（普通列表方式）</strong></td>"
    Response.Write "    </tr>"

    Call JsBaseInif(rsJs("JsName"), rsJs("JsReadme"), rsJs("ContentType"), rsJs("JsFileName"))

    Response.Write "    <tr class='tdbg'>"
    Response.Write "      <td height='25' align='right' ><strong>所属栏目：</strong></td>"
    Response.Write "      <td height='25'>"
    Response.Write "        <select name='ClassID'><option value='0'>所有栏目</option>" & GetClass_Option(PE_CLng(JsConfig(0))) & "</select>"
    Response.Write "        <input type='checkbox' name='IncludeChild' " & RadioValue(PE_CLng(JsConfig(1)), 1) & ">包含子栏目&nbsp;&nbsp;&nbsp;&nbsp;<font color='red'><b>注意：</b></font>不能指定为外部栏目"
    Response.Write "      </td>"
    Response.Write "    </tr>"
    Response.Write "    <tr class='tdbg'>"
    Response.Write "      <td height='25' align='right' ><strong>所属专题：</strong></td>"
    Response.Write "      <td height='25' ><select name='SpecialID' id='SpecialID'><option value=''>不属于任何专题</option>" & GetSpecial_Option(PE_CLng(JsConfig(2))) & "</select></td>"
    Response.Write "    </tr>"
    Response.Write "    <tr class='tdbg'>"
    Response.Write "      <td height='25' align='right' ><strong>显示样式：</strong></td>"
    Response.Write "      <td height='25'>"
    Response.Write "        <select name='ShowType' id='ShowType'>"
    Response.Write "          <option " & OptionValue(PE_CLng(JsConfig(9)), 1) & ">普通列表</option>"
    Response.Write "          <option " & OptionValue(PE_CLng(JsConfig(9)), 2) & ">表格式</option>"
    Response.Write "          <option " & OptionValue(PE_CLng(JsConfig(9)), 3) & ">各项独立式</option>"
    Response.Write "          <option " & OptionValue(PE_CLng(JsConfig(9)), 4) & ">输出DIV格式</option>"
    Response.Write "          <option " & OptionValue(PE_CLng(JsConfig(9)), 5) & ">输出RSS格式</option>"
    Response.Write "        </select>"
    Response.Write "      </td>"
    Response.Write "    </tr>"
    Response.Write "    <tr class='tdbg'>"
    Response.Write "      <td height='25' align='right' ><strong>" & ChannelShortName & "数目：</strong></td>"
    Response.Write "      <td height='25'><input name='ProductNum' type='text' value='" & JsConfig(3) & "' size='5' maxlength='3'><font color='#FF0000'>*</font></td>"
    Response.Write "    </tr>"
    Response.Write "    <tr class='tdbg'>"
    Response.Write "      <td height='25' align='right' ><strong>" & ChannelShortName & "属性：</strong></td>"
    Response.Write "      <td height='25'>"
    Response.Write "        <input name='IsHot' type='checkbox' id='IsHot' " & RadioValue(PE_CLng(JsConfig(5)), 1) & "> 热门" & ChannelShortName & "&nbsp;&nbsp;&nbsp;&nbsp;"
    Response.Write "        <input name='IsElite' type='checkbox' id='IsElite' " & RadioValue(PE_CLng(JsConfig(6)), 1) & "> 推荐" & ChannelShortName & "&nbsp;&nbsp;&nbsp;&nbsp;"
    Response.Write "        <font color='#FF0000'>如果都不选，将显示所有" & ChannelShortName & "</font>"
    Response.Write "      </td>"
    Response.Write "    </tr>"
    Response.Write "    <tr class='tdbg'>"
    Response.Write "      <td height='25' align='right' ><strong>" & ChannelShortName & "类型：</strong></td>"
    Response.Write "      <td height='25'>"
    Response.Write "        <select name='ProductType' id='ProductType'>"
    Response.Write "          <option " & OptionValue(PE_CLng(JsConfig(4)), 1) & ">正常销售" & ChannelShortName & "</option>"
    Response.Write "          <option " & OptionValue(PE_CLng(JsConfig(4)), 2) & ">涨价" & ChannelShortName & "</option>"
    Response.Write "          <option " & OptionValue(PE_CLng(JsConfig(4)), 3) & ">特价" & ChannelShortName & "</option>"
    Response.Write "          <option " & OptionValue(PE_CLng(JsConfig(4)), 4) & ">促销礼品</option>"
    Response.Write "          <option " & OptionValue(PE_CLng(JsConfig(4)), 5) & ">正常销售和涨价" & ChannelShortName & "</option>"
    Response.Write "          <option " & OptionValue(PE_CLng(JsConfig(4)), 6) & ">降价" & ChannelShortName & "</option>"
    Response.Write "          <option " & OptionValue(PE_CLng(JsConfig(4)), 0) & ">所有" & ChannelShortName & "</option>"
    Response.Write "        </select>"
    Response.Write "      </td>"
    Response.Write "    </tr>"
    Response.Write "    <tr class='tdbg'>"
    Response.Write "      <td height='25' align='right' ><strong>日期范围：</strong></td>"
    Response.Write "      <td height='25'>只显示最近 <input name='DateNum' type='text' id='DateNum' value='" & JsConfig(7) & "' size='5' maxlength='3'> 天内更新的" & ChannelShortName & "&nbsp;&nbsp;&nbsp;&nbsp;<font color='#FF0000'>&nbsp;&nbsp;如果为空或0，则显示所有天数的" & ChannelShortName & "</font></td>"
    Response.Write "    </tr>"
    Response.Write "    <tr class='tdbg'>"
    Response.Write "      <td height='25' align='right' ><strong>排序方法：</strong></td>"
    Response.Write "      <td height='25'>"
    Response.Write "        <select name='OrderType' id='OrderType'>"
    Response.Write "          <option " & OptionValue(PE_CLng(JsConfig(8)), 1) & ">" & ChannelShortName & "ID（降序）</option>"
    Response.Write "          <option " & OptionValue(PE_CLng(JsConfig(8)), 2) & ">" & ChannelShortName & "ID（升序）</option>"
    Response.Write "          <option " & OptionValue(PE_CLng(JsConfig(8)), 3) & ">更新时间（降序）</option>"
    Response.Write "          <option " & OptionValue(PE_CLng(JsConfig(8)), 4) & ">更新时间（升序）</option>"
    Response.Write "          <option " & OptionValue(PE_CLng(JsConfig(8)), 5) & ">点击次数（降序）</option>"
    Response.Write "          <option " & OptionValue(PE_CLng(JsConfig(8)), 6) & ">点击次数（升序）</option>"
    Response.Write "          <option " & OptionValue(PE_CLng(JsConfig(8)), 7) & ">按评论数（降序）</option>"
    Response.Write "          <option " & OptionValue(PE_CLng(JsConfig(8)), 8) & ">按评论数（升序）</option>"
    Response.Write "        </select>"
    Response.Write "      </td>"
    Response.Write "    </tr>"
    Response.Write "    <tr class='tdbg'>"
    Response.Write "      <td height='25' align='right' ><strong>" & ChannelShortName & "属性图片：</strong></td>"
    Response.Write "      <td height='25'>"
    Response.Write "        <select name='ShowPropertyType' id='ShowPropertyType'>"
    Response.Write "          <option " & OptionValue(PE_CLng(JsConfig(13)), 0) & ">不显示</option>"
    Response.Write "          <option " & OptionValue(PE_CLng(JsConfig(13)), 2) & ">符号</option>"
    Response.Write "          <option " & OptionValue(PE_CLng(JsConfig(13)), 1) & ">小图片（样式1）</option>"
    Response.Write "          <option " & OptionValue(PE_CLng(JsConfig(13)), 3) & ">小图片（样式2）</option>"
    Response.Write "          <option " & OptionValue(PE_CLng(JsConfig(13)), 4) & ">小图片（样式3）</option>"
    Response.Write "          <option " & OptionValue(PE_CLng(JsConfig(13)), 5) & ">小图片（样式4）</option>"
    Response.Write "          <option " & OptionValue(PE_CLng(JsConfig(13)), 6) & ">小图片（样式5）</option>"
    Response.Write "        </select>"
    Response.Write "      </td>"
    Response.Write "    </tr>"
    Response.Write "    <tr class='tdbg'>"
    Response.Write "      <td height='25' align='right' ><strong>标题最多字符数：</strong></td>"
    Response.Write "      <td height='25'><input name='TitleLen' type='text' id='TitleLen' value='" & JsConfig(10) & "' size='5' maxlength='3'>&nbsp;&nbsp;&nbsp;&nbsp;<font color='#FF0000'>如果为0，则显示完整标题。字母算一个字符，汉字算两个字符。</font></td>"
    Response.Write "    </tr>"
    Response.Write "    <tr class='tdbg'>"
    Response.Write "      <td height='25' align='right' ><strong>" & ChannelShortName & "内容字符数：</strong></td>"
    Response.Write "      <td height='25'><input name='ContentLen' type='text' id='ContentLen' value='" & JsConfig(11) & "' size='5' maxlength='3'>&nbsp;&nbsp;&nbsp;&nbsp;<font color='#FF0000'>如果大于0，则在标题下方面显示指定字数的" & ChannelShortName & "内容</font></td>"
    Response.Write "    </tr>"
    Response.Write "    <tr class='tdbg'>"
    Response.Write "      <td height='25' align='right' ><strong>每行的列数：</strong></td>"
    Response.Write "      <td height='25'><input name='Cols' type='text' id='ContentLen' value='" & JsConfig(21) & "' size='5' maxlength='3'>&nbsp;&nbsp;&nbsp;&nbsp;<font color='#FF0000'>超过此列数就换行</td>"
    Response.Write "    </tr>"
    Response.Write "    <tr class='tdbg'>"
    Response.Write "      <td height='50' align='right' ><strong>显示内容：</strong></td>"
    Response.Write "      <td height='50'><table width='100%' border='0' cellpadding='1' cellspacing='2'>"
    Response.Write "        <tr>"
    Response.Write "          <td><input name='ShowClassName' type='checkbox' id='ShowClassName' " & RadioValue(PE_CLng(JsConfig(12)), 1) & ">所属栏目</td>"
    Response.Write "          <td>更新时间"
    Response.Write "            <select name='ShowDateType' id='ShowDateType'>"
    Response.Write "              <option " & OptionValue(PE_CLng(JsConfig(14)), 0) & ">不显示</option>"
    Response.Write "              <option " & OptionValue(PE_CLng(JsConfig(14)), 1) & ">年月日</option>"
    Response.Write "              <option " & OptionValue(PE_CLng(JsConfig(14)), 2) & ">月日</option>"
    Response.Write "              <option " & OptionValue(PE_CLng(JsConfig(14)), 3) & ">月-日</option>"
    Response.Write "            </select>"
    Response.Write "          </td>"
    Response.Write "        </tr>"
    Response.Write "        <tr>"
    Response.Write "          <td><input name='ShowHotSign' type='checkbox' id='ShowHotSign' " & RadioValue(PE_CLng(JsConfig(15)), 1) & ">热点" & ChannelShortName & "标志</td>"
    Response.Write "          <td><input name='ShowNewSign' type='checkbox' id='ShowNewSign' " & RadioValue(PE_CLng(JsConfig(16)), 1) & ">最新" & ChannelShortName & "标志</td>"
    Response.Write "          <td><input name='UsePage' type='checkbox' id='UsePage' " & RadioValue(PE_CLng(JsConfig(17)), 1) & ">是否分页显示</td>"
    Response.Write "          <td> </td>"
    Response.Write "        </tr>"
    Response.Write "      </table></td>"
    Response.Write "    </tr>"
    Response.Write "    <tr class='tdbg'>"
    Response.Write "      <td height='25' align='right' ><strong>" & ChannelShortName & "打开方式：</strong></td>"
    Response.Write "      <td height='25'>"
    Response.Write "        <select name='OpenType' id='OpenType'>"
    Response.Write "          <option " & OptionValue(PE_CLng(JsConfig(18)), 0) & ">在原窗口打开</option>"
    Response.Write "          <option " & OptionValue(PE_CLng(JsConfig(18)), 1) & ">在新窗口打开</option>"
    Response.Write "        </select>"
    Response.Write "      </td>"
    Response.Write "    </tr>"
    Response.Write "    <tr class='tdbg'>"
    Response.Write "      <td height='25' align='right' ><strong>链接地址选项：</strong></td>"
    Response.Write "      <td height='25'>"
    Response.Write "        <select name='UrlType' id='OpenType'>"
    Response.Write "          <option " & OptionValue(PE_CLng(JsConfig(19)), 0) & ">使用相对路径</option>"
    Response.Write "          <option " & OptionValue(PE_CLng(JsConfig(19)), 1) & ">使用包含完整网址的绝对路径</option>"
    Response.Write "        </select>"
    Response.Write "      </td>"
    Response.Write "    </tr>"
    Response.Write "    <tr class='tdbg'>"
    Response.Write "      <td height='25' align='right' ><strong>每隔多少行空白一行：</strong></td>"
    Response.Write "      <td height='25'><input name='IntervalLines' type='text' value='"
    If PE_CLng(JsConfig(20)) = """" Then
        Response.Write ""
    Else
        Response.Write PE_CLng(JsConfig(20))
    End If
    Response.Write "'  size='10' maxlength='10'>&nbsp;<font color=blue>为0时不空行</font></td>"
    Response.Write "    </tr>"
    Response.Write "    <tr class='tdbg'>"
    Response.Write "      <td height='25' align='right' ><strong>表格头部文字：</strong></td>"
    Response.Write "      <td height='25' >"
    If JsConfig(23) = "" Or InStr(JsConfig(23), "{$}") <= 0 Or UBound(Split(JsConfig(23), "{$}")) > 12 Or UBound(Split(JsConfig(23), "{$}")) < 12 Then
        JsConfig(23) = "商品名称{$}型号{$}规格{$}上市时间{$}单位{$}库存量{$}重量{$}市场价{$}商城价{$}优惠价{$}会员价{$}折扣率{$}操作"
    End If
    Dim TableTitleStr
    TableTitleStr = Split(JsConfig(23), "{$}")
    Response.Write "<table border='0' cellpadding='0' cellspacing='0' width='100%' height='100%' align='center'>"
    Response.Write " <tr class='tdbg' align='center'>"
    Response.Write "    <td>商品名称</td><td>型号</td><td>规格</td><td>上市时间</td><td>单位</td><td>库存量</td><td>重量</td>"
    Response.Write " </tr>"
    Response.Write " <tr class='tdbg' align='center'>"
    Response.Write "    <td><input name='TableTitleStr1' type='text' value='" & TableTitleStr(0) & "'  size='10' maxlength='20' style='text-align: center;'></td>"
    Response.Write "    <td><input name='TableTitleStr2' type='text' value='" & TableTitleStr(1) & "'  size='10' maxlength='20' style='text-align: center;'></td>"
    Response.Write "    <td><input name='TableTitleStr3' type='text' value='" & TableTitleStr(2) & "'  size='10' maxlength='20' style='text-align: center;'></td>"
    Response.Write "    <td><input name='TableTitleStr4' type='text' value='" & TableTitleStr(3) & "'  size='10' maxlength='20' style='text-align: center;'></td>"
    Response.Write "    <td><input name='TableTitleStr5' type='text' value='" & TableTitleStr(4) & "'  size='10' maxlength='20' style='text-align: center;'></td>"
    Response.Write "    <td><input name='TableTitleStr6' type='text' value='" & TableTitleStr(5) & "'  size='10' maxlength='20' style='text-align: center;'></td>"
    Response.Write "    <td><input name='TableTitleStr7' type='text' value='" & TableTitleStr(6) & "'  size='10' maxlength='20' style='text-align: center;'></td>"
    Response.Write " </tr>"
    Response.Write "  <tr class='tdbg' align='center'>"
    Response.Write "    <td>市场价</td><td>商城价</td><td>优惠价</td><td>会员价</td><td>折扣率</td><td>操作</td>"
    Response.Write " </tr>"
    Response.Write "  <tr class='tdbg' align='center'>"
    Response.Write "    <td><input name='TableTitleStr8' type='text' value='" & TableTitleStr(7) & "'  size='10' maxlength='20' style='text-align: center;'></td>"
    Response.Write "    <td><input name='TableTitleStr9' type='text' value='" & TableTitleStr(8) & "'  size='10' maxlength='20' style='text-align: center;'></td>"
    Response.Write "    <td><input name='TableTitleStr10' type='text' value='" & TableTitleStr(9) & "'  size='10' maxlength='20' style='text-align: center;'></td>"
    Response.Write "    <td><input name='TableTitleStr11' type='text' value='" & TableTitleStr(10) & "'  size='10' maxlength='20' style='text-align: center;'></td>"
    Response.Write "    <td><input name='TableTitleStr12' type='text' value='" & TableTitleStr(11) & "'  size='10' maxlength='20' style='text-align: center;'></td>"
    Response.Write "    <td><input name='TableTitleStr13' type='text' value='" & TableTitleStr(12) & "'  size='10' maxlength='20' style='text-align: center;'></td>"
    Response.Write "  </tr>"
    Response.Write " </table>"
    Response.Write "     </td>"
    Response.Write "    </tr>"
    Response.Write "    <tr class='tdbg'>"
    Response.Write "      <td height='25' align='right' ><strong>显示商品库存方式：</strong></td>"
    Response.Write "      <td height='25'><select name='ShowStocksType' id='ShowStocksType'>"
    Response.Write "       <option value='0' "
    If Trim(JsConfig(27)) = "0" Then Response.Write "selected"
    Response.Write ">不显示</option>"
    Response.Write "       <option value='1' "
    If Trim(JsConfig(27)) = "1" Then Response.Write "selected"
    Response.Write ">显示虚拟库存</option>"
    Response.Write "       <option value='2' "
    If Trim(JsConfig(27)) = "2" Then Response.Write "selected"
    Response.Write ">显示实际库存</option>"
    Response.Write "      </select></td>"
    Response.Write "    </tr>"
    Response.Write "    <tr class='tdbg'>"
    Response.Write "      <td height='25' align='right' ><strong>按钮显示方式：</strong></td>"
    Response.Write "      <td height='25'><select name='ShowButtonType' id='ShowButtonType'>"
    Response.Write "       <option value='0' "
    If Trim(JsConfig(34)) = "0" Then Response.Write "selected"
    Response.Write ">不显示</option>"
    Response.Write "       <option value='1' "
    If Trim(JsConfig(34)) = "1" Then Response.Write "selected"
    Response.Write ">显示购买按钮</option>"
    Response.Write "       <option value='2' "
    If Trim(JsConfig(34)) = "2" Then Response.Write "selected"
    Response.Write ">显示详细按钮</option>"
    Response.Write "       <option value='3' "
    If Trim(JsConfig(34)) = "3" Then Response.Write "selected"
    Response.Write ">显示收藏按钮</option>"
    Response.Write "       <option value='4' "
    If Trim(JsConfig(34)) = "4" Then Response.Write "selected"
    Response.Write ">显示购买＋详细按钮</option>"
    Response.Write "       <option value='5' "
    If Trim(JsConfig(34)) = "5" Then Response.Write "selected"
    Response.Write ">显示购买＋收藏按钮</option>"
    Response.Write "       <option value='6' "
    If Trim(JsConfig(34)) = "6" Then Response.Write "selected"
    Response.Write ">详细＋收藏按钮</option>"
    Response.Write "       <option value='7' "
    If Trim(JsConfig(34)) = "7" Then Response.Write "selected"
    Response.Write ">三个都显示</option>"
    Response.Write "      </select></td>"
    Response.Write "    </tr>"
    Response.Write "    <tr class='tdbg'>"
    Response.Write "      <td height='50' align='right' ><strong>显示商品详细信息：</strong></td>"
    Response.Write "      <td height='50'><table width='100%' border='0' cellpadding='1' cellspacing='2'>"
    Response.Write "        <tr>"
    Response.Write "          <td><input name='ShowTableTitle' type='checkbox' id='ShowTableTitle' value='yes'  "
    If LCase(Trim(JsConfig(22))) = "true" Then
        Response.Write "checked"
    End If
    Response.Write ">表格头部文字</td>"
    Response.Write "          <td><input name='ShowProductModel' type='checkbox' id='ShowProductModel' value='yes'  "
    If LCase(Trim(JsConfig(24))) = "true" Then
        Response.Write "checked"
    End If
    Response.Write ">是否显示商品型号</td>"
    Response.Write "          <td><input name='ShowProductStandard' type='checkbox' id='ShowProductStandard' value='yes'  "
    If LCase(Trim(JsConfig(25))) = "true" Then
        Response.Write "checked"
    End If
    Response.Write ">是否显示商品规格</td>"
    Response.Write "        </tr>"
    Response.Write "        <tr>"
    Response.Write "          <td><input name='ShowUnit' type='checkbox' id='ShowUnit' value='yes' "
    If LCase(Trim(JsConfig(26))) = "true" Then
        Response.Write "checked"
    End If
    Response.Write ">是否显示商品单位</td>"
    Response.Write "          <td><input name='ShowWeight' type='checkbox' id='ShowWeight' value='yes' "
    If LCase(Trim(JsConfig(28))) = "true" Then
        Response.Write "checked"
    End If
    Response.Write ">是否显示商品重量</td>"
    Response.Write "          <td><input name='ShowPrice_Market' type='checkbox' id='ShowPrice_Market' value='yes' "
    If LCase(Trim(JsConfig(29))) = "true" Then
        Response.Write "checked"
    End If
    Response.Write ">是否显示市场价</td>"
    Response.Write "        </tr>"
    Response.Write "      <tr>"
    Response.Write "          <td><input name='ShowPrice_Original' type='checkbox' id='ShowPrice_Original' value='yes' "
    If LCase(Trim(JsConfig(30))) = "true" Then
        Response.Write "checked"
    End If
    Response.Write ">是否显示原价</td>"

    Response.Write "          <td><input name='ShowPrice' type='checkbox' id='ShowPrice' value='yes' "
    If LCase(Trim(JsConfig(31))) = "true" Then
        Response.Write "checked"
    End If
    Response.Write ">是否显示当前零售价</td>"

    Response.Write "          <td><input name='ShowPrice_Member' type='checkbox' id='ShowPrice_Member' value='yes' "
    If LCase(Trim(JsConfig(32))) = "true" Then
        Response.Write "checked"
    End If
    Response.Write ">是否显示会员价</td>"

    Response.Write "          <td><input name='ShowDiscount' type='checkbox' id='ShowDiscount' value='yes' "
    If LCase(Trim(JsConfig(33))) = "true" Then
        Response.Write "checked"
    End If
    Response.Write ">是否显示折扣率</td>"
    Response.Write "        </tr>"
    Response.Write "      </table>"
    Response.Write "     </td>"
    Response.Write "   </tr>"
    Response.Write "   <tr class='tdbg'>"
    Response.Write "     <td height='25' align='right' ><strong>自定义按钮图片：</strong></td>"
    Response.Write "     <td height='25' ><input name='ButtonStyle' type='text' value='"
    If Trim(JsConfig(35)) = """" Then
        Response.Write ""
    Else
        Response.Write JsConfig(35)
    End If
    Response.Write "'  size='10' maxlength='20'>&nbsp;&nbsp;<font color='blue'>请填写定义图片数字</font><br>"
    Response.Write "举例：<br>"
    Response.Write "　" & InstallDir & ChannelDir & "/images/ProductBuy<FONT color='blue'>“数字”</FONT>.gif<br>"
    Response.Write "　" & InstallDir & ChannelDir & "/images/ProductContent<FONT color='blue'>“数字”</FONT>.gif<br>"
    Response.Write "　" & InstallDir & ChannelDir & "/images/ProductFav<FONT color='blue'>“数字”</FONT>.gif<br>"
    Response.Write "&nbsp;&nbsp;<font color='blue'>请按以上方式制作上传自定义按钮图片</font></td>"
    Response.Write "   </tr>"
    Response.Write "    <tr class='tdbg'>"
    Response.Write "      <td height='25' align='right' ><strong>表格CSS：</strong></td>"
    Response.Write "      <td height='25'><input name='CssNameTable' type='text' value='"
    If Trim(JsConfig(36)) = """" Then
        Response.Write ""
    Else
        Response.Write JsConfig(36)
    End If
    Response.Write "'  size='10' maxlength='10'>&nbsp;&nbsp;&nbsp;&nbsp;<font color='#FF0000'>表格的CSS类名，可选参数</font></td>"
    Response.Write "    </tr>"
    Response.Write "    <tr class='tdbg'>"
    Response.Write "      <td height='25' align='right' ><strong>表格头部CSS：</strong></td>"
    Response.Write "      <td height='25'><input name='CssNameTitle' type='text' value='"
    If Trim(JsConfig(37)) = """" Then
        Response.Write ""
    Else
        Response.Write JsConfig(37)
    End If
    Response.Write "'  size='10' maxlength='10'>&nbsp;&nbsp;&nbsp;&nbsp;<font color='#FF0000'>表格头部行的CSS类名，可选参数。</font></td>"
    Response.Write "    </tr>"

    Response.Write "    <tr class='tdbg'>"
    Response.Write "      <td height='25' align='right' ><strong>CSS类名：</strong></td>"
    Response.Write "      <td height='25'><input name='CssNameA' type='text' value='"
    If Trim(JsConfig(38)) = """" Then
        Response.Write ""
    Else
        Response.Write JsConfig(38)
    End If
    Response.Write "'  size='10' maxlength='10'>&nbsp;&nbsp;&nbsp;&nbsp;<font color='#FF0000'>列表中文字链接调用的CSS类名，可选参数</font></td>"
    Response.Write "    </tr>"
    Response.Write "    <tr class='tdbg'>"
    Response.Write "      <td height='25' align='right' ><strong>风格样式1：</strong></td>"
    Response.Write "      <td height='25'><input name='CssName1' type='text' value='"
    If Trim(JsConfig(39)) = """" Then
        Response.Write ""
    Else
        Response.Write JsConfig(39)
    End If
    Response.Write "'  size='10' maxlength='10'>&nbsp;&nbsp;&nbsp;&nbsp;<font color='#FF0000'>列表中奇数行的CSS效果的类名，可选参数</font></td>"
    Response.Write "    </tr>"
    Response.Write "    <tr class='tdbg'>"
    Response.Write "      <td height='25' align='right' ><strong>风格样式2：</strong></td>"
    Response.Write "      <td height='25'><input name='CssName2' type='text' value='"
    If Trim(JsConfig(40)) = """" Then
        Response.Write ""
    Else
        Response.Write JsConfig(40)
    End If
    Response.Write "'  size='10' maxlength='10'>&nbsp;&nbsp;&nbsp;&nbsp;<font color='#FF0000'>列表中偶数行的CSS效果的类名，可选参数</font></td>"
    Response.Write "    </tr>"
    Response.Write "    <tr class='tdbg'>"
    Response.Write "      <td height='40' colspan='2' align='center'>"
    Response.Write "        <input name='ChannelID' type='hidden' id='ChannelID' value='" & ChannelID & "'>"
    Response.Write "        <input name='ID' type='hidden' id='ID' value='" & ID & "'>"
    Response.Write "        <input name='Action' type='hidden' id='Action' value='SaveModify'>"
    Response.Write "        <input name='Submit' type='submit' id='Submit' value='保存修改结果'>"
    Response.Write "      </td>"
    Response.Write "    </tr>"
    Response.Write "  </table>"
    Response.Write "</form>"
    rsJs.Close
    Set rsJs = Nothing
End Sub

Sub AddPic()

    Response.Write "<form action='Admin_ProductJS.asp' method='post' name='myform' id='myform'>"
    Response.Write "  <table width='100%' border='0' align='center' cellpadding='2' cellspacing='1' class='border'>"
    Response.Write "    <tr class='title'>"
    Response.Write "      <td height='22' colspan='2' align='center'><strong>添加新的JS文件（图片列表方式）</strong></td>"
    Response.Write "    </tr>"

    Call JsBaseInif("", "", 0, "")

    Response.Write "    <tr class='tdbg'>"
    Response.Write "      <td height='25' align='right'><strong>所属栏目：</strong></td>"
    Response.Write "      <td height='25'>"
    Response.Write "        <select name='ClassID'><option value='0'>所有栏目</option>" & GetClass_Option(0) & "</select>"
    Response.Write "        <input type='checkbox' name='IncludeChild' value='1' checked>包含子栏目&nbsp;&nbsp;&nbsp;&nbsp;<font color='red'><b>注意：</b></font>不能指定为外部栏目"
    Response.Write "      </td>"
    Response.Write "    </tr>"
    Response.Write "    <tr class='tdbg'>"
    Response.Write "      <td height='25' align='right'><strong>所属专题：</strong></td>"
    Response.Write "      <td height='25' ><select name='SpecialID' id='SpecialID'><option value=''>不属于任何专题</option>" & GetSpecial_Option(0) & "</select></td>"
    Response.Write "    </tr>"
    Response.Write "    <tr class='tdbg'>"
    Response.Write "      <td height='25' align='right'><strong>" & ChannelShortName & "数目：</strong></td>"
    Response.Write "      <td height='25'><input name='ProductNum' type='text' value='4' size='5' maxlength='3'> <font color='#FF0000'>*</font></td>"
    Response.Write "    </tr>"
    Response.Write "    <tr class='tdbg'>"
    Response.Write "      <td height='25' align='right'><strong>" & ChannelShortName & "类型：</strong></td>"
    Response.Write "      <td height='25'>"
    Response.Write "        <select name='ProductType' id='ProductType'>"
    Response.Write "          <option value='1' selected>正常销售" & ChannelShortName & "</option>"
    Response.Write "          <option value='2'>涨价" & ChannelShortName & "</option>"
    Response.Write "          <option value='3'>特价" & ChannelShortName & "</option>"
    Response.Write "          <option value='4'>促销礼品</option>"
    Response.Write "          <option value='5'>正常销售和涨价" & ChannelShortName & "</option>"
    Response.Write "          <option value='6'>降价" & ChannelShortName & "</option>"
    Response.Write "          <option value='0'>所有" & ChannelShortName & "</option>"
    Response.Write "        </select>"
    Response.Write "      </td>"
    Response.Write "    </tr>"
    Response.Write "    <tr class='tdbg'>"
    Response.Write "      <td height='25' align='right'><strong>" & ChannelShortName & "属性：</strong></td>"
    Response.Write "      <td height='25'>"
    Response.Write "        <input name='IsHot' type='checkbox' id='IsHot' value='1'> 热门" & ChannelShortName & "&nbsp;&nbsp;&nbsp;&nbsp;"
    Response.Write "        <input name='IsElite' type='checkbox' id='IsElite' value='1'> 推荐" & ChannelShortName & "&nbsp;&nbsp;&nbsp;&nbsp;"
    Response.Write "        <font color='#FF0000'>如果都不选，将显示所有" & ChannelShortName & "</font>"
    Response.Write "      </td>"
    Response.Write "    </tr>"
    Response.Write "    <tr class='tdbg'>"
    Response.Write "      <td height='25' align='right'><strong>日期范围：</strong></td>"
    Response.Write "      <td height='25'>只显示最近 <input name='DateNum' type='text' id='DateNum' value='30' size='5' maxlength='3'> 天内更新的" & ChannelShortName & "&nbsp;&nbsp;&nbsp;&nbsp;<font color='#FF0000'>&nbsp;&nbsp;如果为空或0，则显示所有天数的" & ChannelShortName & "</font></td>"
    Response.Write "    </tr>"
    Response.Write "    <tr class='tdbg'>"
    Response.Write "      <td height='25' align='right'><strong>排序方法：</strong></td>"
    Response.Write "      <td height='25'>"
    Response.Write "        <select name='OrderType' id='OrderType'>"
    Response.Write "          <option value='1' selected>" & ChannelShortName & "ID（降序）</option>"
    Response.Write "          <option value='2'>" & ChannelShortName & "ID（升序）</option>"
    Response.Write "          <option value='3'>更新时间（降序）</option>"
    Response.Write "          <option value='4'>更新时间（升序）</option>"
    Response.Write "          <option value='5'>点击次数（降序）</option>"
    Response.Write "          <option value='6'>点击次数（升序）</option>"
    Response.Write "          <option value='7'>按评论数（降序）</option>"
    Response.Write "          <option value='8'>按评论数（升序）</option>"
    Response.Write "        </select>"
    Response.Write "      </td>"
    Response.Write "    </tr>"
    Response.Write "    <tr class='tdbg'>"
    Response.Write "      <td height='25' align='right'><strong>显示样式：</strong></td>"
    Response.Write "      <td height='25'>"
    Response.Write "        <input name='ShowType' type='radio' value='1' checked> 图片+名称+价格：上下排列<br>"
    Response.Write "        <input name='ShowType' type='radio' value='2'> （图片+名称：上下排列）+（名称+价格）：左右排列<br>"
    Response.Write "        <input name='ShowType' type='radio' value='3'> 图片+（名称+价格：上下排列）：左右排列<br>"
    Response.Write "        <input name='ShowType' type='radio' value='4'> 图片+名称+价格：上下排列<br>"
    Response.Write "        <input name='ShowType' type='radio' value='5'> （图片+名称：上下排列）+价格<br>"
    Response.Write "        <input name='ShowType' type='radio' value='6'> 图片+（名称+价格：上下排列）：左右排列<br>"
    Response.Write "        <input name='ShowType' type='radio' value='7'> 图片+名称+按钮：上下排列<br>"
    Response.Write "        <input name='ShowType' type='radio' value='8'> 图片+名称：上下排列<br>"
    Response.Write "        <input name='ShowType' type='radio' value='9'> 图片+按钮：上下排列<br>"
    Response.Write "        <input name='ShowType' type='radio' value='10'> 只显示图片<br>"
    Response.Write "        <input name='ShowType' type='radio' value='11'> 输出DIV格式<br>"
    Response.Write "      </td>"
    Response.Write "    </tr>"
    Response.Write "    <tr class='tdbg'>"
    Response.Write "      <td height='25' align='right'><b>首页图片设置：</b></td>"
    Response.Write "      <td height='25'>"
    Response.Write "        宽度： <input name='ImgWidth' type='text' id='ImgWidth' value='130' size='5' maxlength='3'> 像素&nbsp;&nbsp;&nbsp;&nbsp;"
    Response.Write "        高度： <input name='ImgHeight' type='text' id='ImgHeight' value='90' size='5' maxlength='3'> 像素"
    Response.Write "      </td>"
    Response.Write "    </tr>"
    Response.Write "    <tr class='tdbg'>"
    Response.Write "      <td height='25' align='right'><strong>标题最多字符数：</strong></td>"
    Response.Write "      <td height='25'><input name='TitleLen' type='text' id='TitleLen' value='20' size='5' maxlength='3'>&nbsp;&nbsp;&nbsp;&nbsp;<font color='#FF0000'>若为0，则不显示标题；若为-1，则显示完整标题。字母算一个字符，汉字算两个字符。</font></td>"
    Response.Write "    </tr>"
    Response.Write "    <tr class='tdbg'>"
    Response.Write "      <td height='25' align='right'><strong>每行显示" & ChannelShortName & "数：</strong></td>"
    Response.Write "      <td height='25'>"
    Response.Write "        <select name='Cols' id='Cols'>"
    Response.Write "          <option value='1'>1</option>"
    Response.Write "          <option value='2'>2</option>"
    Response.Write "          <option value='3'>3</option>"
    Response.Write "          <option value='4' selected>4</option>"
    Response.Write "          <option value='5'>5</option>"
    Response.Write "          <option value='6'>6</option>"
    Response.Write "          <option value='7'>7</option>"
    Response.Write "          <option value='8'>8</option>"
    Response.Write "          <option value='9'>9</option>"
    Response.Write "          <option value='10'>10</option>"
    Response.Write "          <option value='11'>11</option>"
    Response.Write "          <option value='12'>12</option>"
    Response.Write "        </select>"
    Response.Write "        &nbsp;&nbsp;&nbsp;&nbsp;超过指行列数就会换行"
    Response.Write "      </td>"
    Response.Write "    </tr>"
    Response.Write "    <tr class='tdbg'>"
    Response.Write "      <td height='25' align='right'><strong>链接地址选项：</strong></td>"
    Response.Write "      <td height='25'>"
    Response.Write "        <select name='UrlType' id='OpenType'>"
    Response.Write "          <option value='0' selected>使用相对路径</option>"
    Response.Write "          <option value='1'>使用包含完整网址的绝对路径</option>"
    Response.Write "        </select>"
    Response.Write "      </td>"
    Response.Write "    </tr>"
    Response.Write "    <tr class='tdbg'>"
    Response.Write "      <td height='40' colspan='2' align='center'>"
    Response.Write "        <input name='ChannelID' type='hidden' id='ChannelID' value='" & ChannelID & "'>"
    Response.Write "        <input name='Action' type='hidden' id='Action' value='SaveAddPic'>"
    Response.Write "        <input name='Submit' type='submit' id='Submit' value=' 添 加 '>"
    Response.Write "      </td>"
    Response.Write "    </tr>"
    Response.Write "  </table>"
    Response.Write "</form>"
End Sub

Sub ModifyPic()
    Dim ID, sqlJs, rsJs, JsConfig
    ID = PE_CLng(Trim(Request("ID")))
    If ID = 0 Then
        FoundErr = True
        ErrMsg = ErrMsg & "<li>参数丢失！</li>"
        Exit Sub
    End If
    sqlJs = "select * from PE_JsFile where ID=" & ID
    Set rsJs = Conn.Execute(sqlJs)
    If rsJs.BOF And rsJs.EOF Then
        FoundErr = True
        ErrMsg = ErrMsg & "<li>找不到指定的JS文件！</li>"
        rsJs.Close
        Set rsJs = Nothing
        Exit Sub
    End If
    JsConfig = Split(rsJs("Config"), "|")
    
    Response.Write "<form action='Admin_ProductJS.asp' method='post' name='myform' id='myform'>"
    Response.Write "  <table width='100%' border='0' align='center' cellpadding='2' cellspacing='1' class='border'>"
    Response.Write "    <tr class='title'>"
    Response.Write "      <td height='22' colspan='2' align='center'><strong>修改参数（图片列表方式）</strong></td>"
    Response.Write "    </tr>"

    Call JsBaseInif(rsJs("JsName"), rsJs("JsReadme"), rsJs("ContentType"), rsJs("JsFileName"))

    Response.Write "    <tr class='tdbg'>"
    Response.Write "      <td height='25' align='right'><strong>所属栏目：</strong></td>"
    Response.Write "      <td height='25'>"
    Response.Write "        <select name='ClassID'><option value='0'>所有栏目</option>" & GetClass_Option(PE_CLng(JsConfig(0))) & "</select>"
    Response.Write "        <input type='checkbox' name='IncludeChild' " & RadioValue(PE_CLng(JsConfig(1)), 1) & ">包含子栏目&nbsp;&nbsp;&nbsp;&nbsp;<font color='red'><b>注意：</b></font>不能指定为外部栏目"
    Response.Write "      </td>"
    Response.Write "    </tr>"
    Response.Write "    <tr class='tdbg'>"
    Response.Write "      <td height='25' align='right'><strong>所属专题：</strong></td>"
    Response.Write "      <td height='25' ><select name='SpecialID' id='SpecialID'><option value=''>不属于任何专题</option>" & GetSpecial_Option(PE_CLng(JsConfig(2))) & "</select></td>"
    Response.Write "    </tr>"
    Response.Write "    <tr class='tdbg'>"
    Response.Write "      <td height='25' align='right'><strong>" & ChannelShortName & "数目：</strong></td>"
    Response.Write "      <td height='25'><input name='ProductNum' type='text' value='" & JsConfig(3) & "' size='5' maxlength='3'> <font color='#FF0000'>*</font></td>"
    Response.Write "    </tr>"
    Response.Write "    <tr class='tdbg'>"
    Response.Write "      <td height='25' align='right'><strong>" & ChannelShortName & "类型：</strong></td>"
    Response.Write "      <td height='25'>"
    Response.Write "        <select name='ProductType' id='ProductType'>"
    Response.Write "          <option " & OptionValue(PE_CLng(JsConfig(4)), 1) & ">正常销售" & ChannelShortName & "</option>"
    Response.Write "          <option " & OptionValue(PE_CLng(JsConfig(4)), 2) & ">涨价" & ChannelShortName & "</option>"
    Response.Write "          <option " & OptionValue(PE_CLng(JsConfig(4)), 3) & ">特价" & ChannelShortName & "</option>"
    Response.Write "          <option " & OptionValue(PE_CLng(JsConfig(4)), 4) & ">促销礼品</option>"
    Response.Write "          <option " & OptionValue(PE_CLng(JsConfig(4)), 5) & ">正常销售和涨价" & ChannelShortName & "</option>"
    Response.Write "          <option " & OptionValue(PE_CLng(JsConfig(4)), 6) & ">降价" & ChannelShortName & "</option>"
    Response.Write "          <option " & OptionValue(PE_CLng(JsConfig(4)), 0) & ">所有" & ChannelShortName & "</option>"
    Response.Write "        </select>"
    Response.Write "      </td>"
    Response.Write "    </tr>"
    Response.Write "    <tr class='tdbg'>"
    Response.Write "      <td height='25' align='right'><strong>" & ChannelShortName & "属性：</strong></td>"
    Response.Write "      <td height='25'>"
    Response.Write "        <input name='IsHot' type='checkbox' id='IsHot' " & RadioValue(PE_CLng(JsConfig(5)), 1) & "> 热门" & ChannelShortName & "&nbsp;&nbsp;&nbsp;&nbsp;"
    Response.Write "        <input name='IsElite' type='checkbox' id='IsElite' " & RadioValue(PE_CLng(JsConfig(6)), 1) & "> 推荐" & ChannelShortName & "&nbsp;&nbsp;&nbsp;&nbsp;"
    Response.Write "        <font color='#FF0000'>如果都不选，将显示所有" & ChannelShortName & "</font>"
    Response.Write "      </td>"
    Response.Write "    </tr>"
    Response.Write "    <tr class='tdbg'>"
    Response.Write "      <td height='25' align='right'><strong>日期范围：</strong></td>"
    Response.Write "      <td height='25'>只显示最近 <input name='DateNum' type='text' id='DateNum' value='" & JsConfig(7) & "' size='5' maxlength='3'> 天内更新的" & ChannelShortName & "&nbsp;&nbsp;&nbsp;&nbsp;<font color='#FF0000'>&nbsp;&nbsp;如果为空或0，则显示所有天数的" & ChannelShortName & "</font></td>"
    Response.Write "    </tr>"
    Response.Write "    <tr class='tdbg'>"
    Response.Write "      <td height='25' align='right'><strong>排序方法：</strong></td>"
    Response.Write "      <td height='25'>"
    Response.Write "        <select name='OrderType' id='OrderType'>"
    Response.Write "          <option " & OptionValue(PE_CLng(JsConfig(8)), 1) & ">" & ChannelShortName & "ID（降序）</option>"
    Response.Write "          <option " & OptionValue(PE_CLng(JsConfig(8)), 2) & ">" & ChannelShortName & "ID（升序）</option>"
    Response.Write "          <option " & OptionValue(PE_CLng(JsConfig(8)), 3) & ">按上市时间（降序）</option>"
    Response.Write "          <option " & OptionValue(PE_CLng(JsConfig(8)), 4) & ">按上市时间（升序）</option>"
    Response.Write "          <option " & OptionValue(PE_CLng(JsConfig(8)), 5) & ">按点击数（降序）</option>"
    Response.Write "          <option " & OptionValue(PE_CLng(JsConfig(8)), 6) & ">按点击数（升序）</option>"
    Response.Write "          <option " & OptionValue(PE_CLng(JsConfig(8)), 7) & ">按评论数（降序）</option>"
    Response.Write "          <option " & OptionValue(PE_CLng(JsConfig(8)), 8) & ">按评论数（升序）</option>"
    Response.Write "        </select>"
    Response.Write "      </td>"
    Response.Write "    </tr>"
    Response.Write "    <tr class='tdbg'>"
    Response.Write "      <td height='25' align='right'><strong>显示样式：</strong></td>"
    Response.Write "      <td height='25'>"
    Response.Write "        <input name='ShowType' type='radio' " & RadioValue(PE_CLng(JsConfig(9)), 1) & ">图片+名称+价格：上下排列<br>"
    Response.Write "        <input name='ShowType' type='radio' " & RadioValue(PE_CLng(JsConfig(9)), 2) & ">（图片+名称：上下排列）+（名称+价格）：左右排列<br>"
    Response.Write "        <input name='ShowType' type='radio' " & RadioValue(PE_CLng(JsConfig(9)), 3) & ">图片+（名称+价格：上下排列）：左右排列<br>"
    Response.Write "        <input name='ShowType' type='radio' " & RadioValue(PE_CLng(JsConfig(9)), 4) & ">图片+名称+价格：上下排列<br>"
    Response.Write "        <input name='ShowType' type='radio' " & RadioValue(PE_CLng(JsConfig(9)), 5) & ">（图片+名称：上下排列）+价格：左右排列<br>"
    Response.Write "        <input name='ShowType' type='radio' " & RadioValue(PE_CLng(JsConfig(9)), 6) & ">图片+（名称+价格：上下排列）：左右排列<br>"
    Response.Write "        <input name='ShowType' type='radio' " & RadioValue(PE_CLng(JsConfig(9)), 7) & ">图片+名称+按钮：上下排列<br>"
    Response.Write "        <input name='ShowType' type='radio' " & RadioValue(PE_CLng(JsConfig(9)), 8) & ">图片+名称：上下排列<br>"
    Response.Write "        <input name='ShowType' type='radio' " & RadioValue(PE_CLng(JsConfig(9)), 9) & ">图片+按钮：上下排列<br>"
    Response.Write "        <input name='ShowType' type='radio' " & RadioValue(PE_CLng(JsConfig(9)), 10) & ">只显示图片<br>"
    Response.Write "        <input name='ShowType' type='radio' " & RadioValue(PE_CLng(JsConfig(9)), 11) & ">输出DIV格式<br>"
    Response.Write "      </td>"
    Response.Write "    </tr>"
    Response.Write "    <tr class='tdbg'>"
    Response.Write "      <td height='25' align='right'><b>首页图片设置：</b></td>"
    Response.Write "      <td height='25'>"
    Response.Write "        宽度： <input name='ImgWidth' type='text' id='ImgWidth' value='" & JsConfig(10) & "' size='5' maxlength='3'> 像素&nbsp;&nbsp;&nbsp;&nbsp;"
    Response.Write "        高度： <input name='ImgHeight' type='text' id='ImgHeight' value='" & JsConfig(11) & "' size='5' maxlength='3'> 像素"
    Response.Write "      </td>"
    Response.Write "    </tr>"
    Response.Write "    <tr class='tdbg'>"
    Response.Write "      <td height='25' align='right'><strong>标题最多字符数：</strong></td>"
    Response.Write "      <td height='25'><input name='TitleLen' type='text' id='TitleLen' value='" & JsConfig(12) & "' size='5' maxlength='3'> &nbsp;&nbsp;&nbsp;&nbsp;<font color='#FF0000'>若为0，则不显示标题；若为-1，则显示完整标题。字母算一个字符，汉字算两个字符。</font></td>"
    Response.Write "    </tr>"
    Response.Write "    <tr class='tdbg'>"
    Response.Write "      <td height='25' align='right'><strong>每行显示" & ChannelShortName & "数：</strong></td>"
    Response.Write "      <td height='25'>"
    Response.Write "        <select name='Cols' id='Cols'>"
    Response.Write "          <option " & OptionValue(PE_CLng(JsConfig(13)), 1) & ">1</option>"
    Response.Write "          <option " & OptionValue(PE_CLng(JsConfig(13)), 2) & ">2</option>"
    Response.Write "          <option " & OptionValue(PE_CLng(JsConfig(13)), 3) & ">3</option>"
    Response.Write "          <option " & OptionValue(PE_CLng(JsConfig(13)), 4) & ">4</option>"
    Response.Write "          <option " & OptionValue(PE_CLng(JsConfig(13)), 5) & ">5</option>"
    Response.Write "          <option " & OptionValue(PE_CLng(JsConfig(13)), 6) & ">6</option>"
    Response.Write "          <option " & OptionValue(PE_CLng(JsConfig(13)), 7) & ">7</option>"
    Response.Write "          <option " & OptionValue(PE_CLng(JsConfig(13)), 8) & ">8</option>"
    Response.Write "          <option " & OptionValue(PE_CLng(JsConfig(13)), 9) & ">9</option>"
    Response.Write "          <option " & OptionValue(PE_CLng(JsConfig(13)), 10) & ">10</option>"
    Response.Write "          <option " & OptionValue(PE_CLng(JsConfig(13)), 11) & ">11</option>"
    Response.Write "          <option " & OptionValue(PE_CLng(JsConfig(13)), 12) & ">12</option>"
    Response.Write "        </select>"
    Response.Write "        &nbsp;&nbsp;&nbsp;&nbsp;超过指行列数就会换行"
    Response.Write "      </td>"
    Response.Write "    </tr>"
    Response.Write "    <tr class='tdbg'>"
    Response.Write "      <td height='25' align='right'><strong>链接地址选项：</strong></td>"
    Response.Write "      <td height='25'>"
    Response.Write "        <select name='UrlType' id='OpenType'>"
    Response.Write "          <option " & OptionValue(PE_CLng(JsConfig(14)), 0) & ">使用相对路径</option>"
    Response.Write "          <option " & OptionValue(PE_CLng(JsConfig(14)), 1) & ">使用包含完整网址的绝对路径</option>"
    Response.Write "        </select>"
    Response.Write "      </td>"
    Response.Write "    </tr>"
    Response.Write "    <tr class='tdbg'>"
    Response.Write "      <td height='40' colspan='2' align='center'>"
    Response.Write "        <input name='ChannelID' type='hidden' id='ChannelID' value='" & ChannelID & "'>"
    Response.Write "        <input name='ID' type='hidden' id='ID' value='" & ID & "'>"
    Response.Write "        <input name='Action' type='hidden' id='Action' value='SaveModifyPic'>"
    Response.Write "        <input name='Submit' type='submit' id='Submit' value='保存修改结果'>"
    Response.Write "      </td>"
    Response.Write "    </tr>"
    Response.Write "  </table>"
    Response.Write "</form>"
    rsJs.Close
    Set rsJs = Nothing
End Sub

Sub SaveJS_List()
    Dim ID, JsName, JsReadme, JsFileName, Config
    Dim ShowType, ProductNum, ClassID, SpecialID, IncludeChild, IsHot, IsElite, DateNum, OrderType, TitleLen, ContentLen
    Dim ShowClassName, ShowDateType, ShowHotSign, ProductType, ShowPropertyType
    Dim ShowNewSign, UsePage, OpenType, UrlType
    Dim rsJs, sqlJs, trs
    Dim ContentType

    Dim IntervalLines, Cols, ShowTableTitle, TableTitleStr, ShowProductModel, ShowProductStandard
    Dim ShowUnit, ShowStocksType, ShowWeight, ShowPrice_Market, ShowPrice_Original, ShowPrice
    Dim ShowPrice_Member, ShowDiscount, ShowButtonType, ButtonStyle
    Dim CssNameTable, CssNameTitle, CssNameA, CssName1, CssName2, i

    If Action = "SaveAdd" Then
        ID = 0
    Else
        ID = PE_CLng(Trim(Request("ID")))
        If ID = 0 Then
            FoundErr = True
            ErrMsg = ErrMsg & "<li>参数丢失！</li>"
            Exit Sub
        End If
    End If
    JsName = Trim(Request("JsName"))
    JsReadme = Trim(Request("JsReadme"))
    JsFileName = Trim(Request("JsFileName"))
    ClassID = Trim(Request("ClassID"))
    IncludeChild = PE_CLng(Trim(Request("IncludeChild")))
    SpecialID = PE_CLng(Trim(Request("SpecialID")))
    ProductNum = PE_CLng(Trim(Request("ProductNum")))
    ProductType = PE_CLng(Trim(Request("ProductType")))
    IsHot = PE_CLng(Trim(Request("IsHot")))
    IsElite = PE_CLng(Trim(Request("IsElite")))
    DateNum = PE_CLng(Trim(Request("DateNum")))
    OrderType = PE_CLng(Trim(Request("OrderType")))
    ShowType = PE_CLng(Trim(Request("ShowType")))
    TitleLen = PE_CLng(Trim(Request("TitleLen")))
    ContentLen = PE_CLng(Trim(Request("ContentLen")))
    ShowClassName = PE_CLng(Trim(Request("ShowClassName")))
    ShowPropertyType = PE_CLng(Trim(Request("ShowPropertyType")))
    ShowDateType = PE_CLng(Trim(Request("ShowDateType")))
    ShowHotSign = PE_CLng(Trim(Request("ShowHotSign")))
    ShowNewSign = PE_CLng(Trim(Request("ShowNewSign")))
    UsePage = PE_CLng(Trim(Request("UsePage")))
    OpenType = PE_CLng(Trim(Request("OpenType")))
    UrlType = PE_CLng(Trim(Request("UrlType")))

    ContentType = PE_CLng(Trim(Request("ContentType")))

    IntervalLines = PE_CLng(Trim(Request("IntervalLines")))
    Cols = PE_CLng(Trim(Request("Cols")))

    ShowTableTitle = IsStringBit(Trim(Request("ShowTableTitle")))
    ShowProductModel = IsStringBit(Trim(Request("ShowProductModel")))
    ShowProductStandard = IsStringBit(Trim(Request("ShowProductStandard")))
    ShowUnit = IsStringBit(Trim(Request("ShowUnit")))
    ShowStocksType = IsStringBit(Trim(Request("ShowStocksType")))
    ShowWeight = IsStringBit(Trim(Request("ShowWeight")))
    ShowPrice_Market = IsStringBit(Trim(Request("ShowPrice_Market")))
    ShowPrice_Original = IsStringBit(Trim(Request("ShowPrice_Original")))
    ShowPrice = IsStringBit(Trim(Request("ShowPrice")))
    ShowPrice_Member = IsStringBit(Trim(Request("ShowPrice_Member")))
    ShowDiscount = IsStringBit(Trim(Request("ShowDiscount")))

    ShowButtonType = Trim(Request("ShowButtonType"))
    ButtonStyle = Trim(Request("ButtonStyle"))
    CssNameTable = Trim(Request("CssNameTable"))
    CssNameTitle = Trim(Request("CssNameTitle"))
    CssNameA = Trim(Request("CssNameA"))
    CssName1 = Trim(Request("CssName1"))
    CssName2 = Trim(Request("CssName2"))

    For i = 1 To 13
        If TableTitleStr = "" Then
            TableTitleStr = Trim(Request("TableTitleStr" & i))
        Else
            TableTitleStr = TableTitleStr & "{$}" & Trim(Request("TableTitleStr" & i))
        End If
    Next

    If JsName = "" Then
        FoundErr = True
        ErrMsg = ErrMsg & "<li>JS代码名称不能为空！</li>"
    Else
        JsName = ReplaceBadChar(JsName)
        Set trs = Conn.Execute("select * from PE_JsFile where ChannelID=" & ChannelID & " and ID<>" & ID & " and JsName='" & JsName & "'")
        If Not (trs.BOF And trs.EOF) Then
            FoundErr = True
            ErrMsg = ErrMsg & "<li>指定的代码名称已经存在！</li>"
        End If
        Set trs = Nothing
    End If
    If JsFileName = "" Then
        FoundErr = True
        ErrMsg = ErrMsg & "<li>JS文件名不能为空！</li>"
    Else
        If IsValidJsFileName(JsFileName, ContentType) = False Then
            FoundErr = True
            If ContentType = 0 Then
                ErrMsg = ErrMsg & "<li>你输入了非法的JS文件名！</li>"
            Else
                ErrMsg = ErrMsg & "<li>你输入了非法的Html文件名！</li>"
            End If
        Else
            Set trs = Conn.Execute("select * from PE_JsFile where ChannelID=" & ChannelID & " and ID<>" & ID & " and JsFileName='" & JsFileName & "'")
            If Not (trs.BOF And trs.EOF) Then
                FoundErr = True
                ErrMsg = ErrMsg & "<li>指定的JS文件名已经存在！</li>"
            End If
            Set trs = Nothing
        End If
    End If
    If ProductNum <= 0 Then
        FoundErr = True
        ErrMsg = ErrMsg & "<li>" & ChannelShortName & "数目必须大于0！</li>"
    End If
    If ClassID = "" Then
        FoundErr = True
        ErrMsg = ErrMsg & "<li>所属栏目不能指定为外部栏目！</li>"
    Else
        ClassID = PE_CLng(ClassID)
    End If
    If FoundErr = True Then Exit Sub

    Config = ClassID & "|" & IncludeChild & "|" & SpecialID & "|" & ProductNum & "|" & ProductType & "|" & IsHot & "|" & IsElite & "|" & DateNum & "|" & OrderType & "|" & ShowType & "|" & TitleLen & "|" & ContentLen & "|" & ShowClassName & "|" & ShowPropertyType & "|" & ShowDateType & "|" & ShowHotSign & "|" & ShowNewSign & "|" & UsePage & "|" & OpenType & "|" & UrlType
    Config = Config & "|" & IntervalLines & "|" & Cols & "|" & ShowTableTitle
    Config = Config & "|" & TableTitleStr & "|" & ShowProductModel & "|" & ShowProductStandard & "|" & ShowUnit
    Config = Config & "|" & ShowStocksType & "|" & ShowWeight & "|" & ShowPrice_Market & "|" & ShowPrice_Original
    Config = Config & "|" & ShowPrice & "|" & ShowPrice_Member & "|" & ShowDiscount & "|" & ShowButtonType
    Config = Config & "|" & ButtonStyle & "|" & CssNameTable & "|" & CssNameTitle & "|" & CssNameA
    Config = Config & "|" & CssName1 & "|" & CssName2

    Set rsJs = Server.CreateObject("ADODB.Recordset")
    If Action = "SaveAdd" Then
        sqlJs = "select top 1 * from PE_JsFile"
        rsJs.Open sqlJs, Conn, 1, 3
        rsJs.addnew
        rsJs("JsType") = 0
        rsJs("ChannelID") = ChannelID
    Else
        sqlJs = "select * from PE_JsFile where ID=" & ID
        rsJs.Open sqlJs, Conn, 1, 3
        If rsJs.BOF And rsJs.EOF Then
            FoundErr = True
            ErrMsg = ErrMsg & "<li>找不到指定的JS文件！</li>"
            rsJs.Close
            Set rsJs = Nothing
            Exit Sub
        End If
    End If
    rsJs("JsName") = JsName
    rsJs("JsReadme") = JsReadme
    rsJs("JsFileName") = JsFileName
    rsJs("Config") = Config
    rsJs("ContentType") = ContentType
    rsJs.Update
    rsJs.Close
    Set rsJs = Nothing
    
    Call WriteSuccessMsg("保存JS文件设置成功！", "Admin_ProductJS.asp?ChannelID=" & ChannelID)
    Call CreateJS(ID)
End Sub

Sub SaveJS_Pic()
    Dim ID, JsName, JsReadme, JsFileName, Config
    Dim ClassID, SpecialID, IncludeChild, ProductNum, ProductType, IsHot, IsElite, DateNum, OrderType, ShowType, ImgWidth, ImgHeight, TitleLen, Cols, UrlType
    Dim rsJs, sqlJs, trs
    Dim ContentType

    If Action = "SaveAddPic" Then
        ID = 0
    Else
        ID = PE_CLng(Trim(Request("ID")))
        If ID = 0 Then
            FoundErr = True
            ErrMsg = ErrMsg & "<li>参数丢失！</li>"
            Exit Sub
        End If
    End If
    JsName = Trim(Request("JsName"))
    JsReadme = Trim(Request("JsReadme"))
    JsFileName = Trim(Request("JsFileName"))
    ClassID = Trim(Request("ClassID"))
    SpecialID = PE_CLng(Trim(Request("SpecialID")))
    IncludeChild = PE_CLng(Trim(Request("IncludeChild")))
    ProductNum = PE_CLng(Trim(Request("ProductNum")))
    ProductType = PE_CLng(Trim(Request("ProductType")))
    IsHot = PE_CLng(Trim(Request("IsHot")))
    IsElite = PE_CLng(Trim(Request("IsElite")))
    DateNum = PE_CLng(Trim(Request("DateNum")))
    OrderType = PE_CLng(Trim(Request("OrderType")))
    ShowType = PE_CLng(Trim(Request("ShowType")))
    ImgWidth = PE_CLng(Trim(Request("ImgWidth")))
    ImgHeight = PE_CLng(Trim(Request("ImgHeight")))
    TitleLen = PE_CLng(Trim(Request("TitleLen")))
    Cols = PE_CLng1(Trim(Request("Cols")))
    UrlType = PE_CLng(Trim(Request("UrlType")))
    ContentType = PE_CLng(Trim(Request("ContentType")))
    
    If JsName = "" Then
        FoundErr = True
        ErrMsg = ErrMsg & "<li>JS代码名称不能为空！</li>"
    Else
        JsName = ReplaceBadChar(JsName)
        Set trs = Conn.Execute("select * from PE_JsFile where ChannelID=" & ChannelID & " and ID<>" & ID & " and JsName='" & JsName & "'")
        If Not (trs.BOF And trs.EOF) Then
            FoundErr = True
            ErrMsg = ErrMsg & "<li>指定的JS代码名称已经存在！</li>"
        End If
        Set trs = Nothing
    End If
    If JsFileName = "" Then
        FoundErr = True
        ErrMsg = ErrMsg & "<li>JS文件名不能为空！</li>"
    Else
        If IsValidJsFileName(JsFileName, ContentType) = False Then
            FoundErr = True
            If ContentType = 0 Then
                ErrMsg = ErrMsg & "<li>你输入了非法的JS文件名！</li>"
            Else
                ErrMsg = ErrMsg & "<li>你输入了非法的Html文件名！</li>"
            End If
        Else
            Set trs = Conn.Execute("select * from PE_JsFile where ChannelID=" & ChannelID & " and ID<>" & ID & " and JsFileName='" & JsFileName & "'")
            If Not (trs.BOF And trs.EOF) Then
                FoundErr = True
                ErrMsg = ErrMsg & "<li>指定的JS文件名已经存在！</li>"
            End If
            Set trs = Nothing
        End If
    End If
    If ClassID = "" Then
        FoundErr = True
        ErrMsg = ErrMsg & "<li>所属栏目不能指定为外部栏目！</li>"
    Else
        ClassID = PE_CLng(ClassID)
    End If
    If ProductNum <= 0 Then
        FoundErr = True
        ErrMsg = ErrMsg & "<li>" & ChannelShortName & "数目必须大于0！</li>"
    End If
    If FoundErr = True Then Exit Sub

    Config = ClassID & "|" & IncludeChild & "|" & SpecialID & "|" & ProductNum & "|" & ProductType & "|" & IsHot & "|" & IsElite & "|" & DateNum & "|" & OrderType & "|" & ShowType & "|" & ImgWidth & "|" & ImgHeight & "|" & TitleLen & "|" & Cols & "|" & UrlType

    Set rsJs = Server.CreateObject("ADODB.Recordset")
    If Action = "SaveAddPic" Then
        sqlJs = "select top 1 * from PE_JsFile"
        rsJs.Open sqlJs, Conn, 1, 3
        rsJs.addnew
        rsJs("JsType") = 1
        rsJs("ChannelID") = ChannelID
    Else
        sqlJs = "select * from PE_JsFile where ID=" & ID
        rsJs.Open sqlJs, Conn, 1, 3
        If rsJs.BOF And rsJs.EOF Then
            FoundErr = True
            ErrMsg = ErrMsg & "<li>找不到指定的JS文件！</li>"
            rsJs.Close
            Set rsJs = Nothing
            Exit Sub
        End If
    End If
    rsJs("JsName") = JsName
    rsJs("JsReadme") = JsReadme
    rsJs("JsFileName") = JsFileName
    rsJs("Config") = Config
    rsJs("ContentType") = ContentType
    rsJs.Update
    rsJs.Close
    Set rsJs = Nothing
    
    Call WriteSuccessMsg("保存JS文件设置成功！", "Admin_ProductJS.asp?ChannelID=" & ChannelID)
    Call CreateJS(ID)
End Sub

Function IsStringBit(ByVal strTemp)
    If strTemp = "yes" Then
        IsStringBit = "true"
    Else
        IsStringBit = "false"
    End If
End Function
%>
