<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="admin.asp"-->
<!--#include file="../inc/upfile.asp"-->
<!--#include file="../inc/conn.asp"-->
<!--#include file="../inc/function.asp"-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>上传设置</title>
<link href="style/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
function check(form)
{
  if(form.cf_name.value=="")
  {
    alert('网站名称不能为空！');
	form.cf_name.focus();
	return false
  }
  if(form.cf_host.value=="")
  {
    alert('网站域名不能为空！');
	form.cf_host.focus();
	return false
  }
  if(form.cf_root.value=="")
  {
     alert('网站安装目录不能为空！');
	 form.cf_root.focus();
	 return false
  }
  return true
}
</script>
</head>
<body id="page">
<h2 class="title">网站信息</h2>
<%
if request("submit")=1 then

filepath=server.mappath("../inc/upfile.asp")
Set fobj = Server.CreateObject("SCRIPTING.FILESYSTEMOBJECT")
Set fs = fobj.CreateTextFile(filepath,true)
fs.Write("<"&chr(37)&chr(10))
fs.Write("Cw_jpeg_t0="&request("t0")&chr(10))
fs.Write("Cw_jpeg_t1="&request("t1")&chr(10))
fs.Write("Cw_jpeg_t2="&chr(34)&request("t2")&chr(34)&chr(10))
fs.Write("Cw_jpeg_t3="&chr(34)&request("t3")&chr(34)&chr(10))
fs.Write("Cw_jpeg_t4="&chr(34)&request("t4")&chr(34)&chr(10))
fs.Write("Cw_jpeg_t5="&chr(34)&request("t5")&chr(34)&chr(10))
fs.Write("Cw_jpeg_t6="&chr(34)&replace(request("t6"),"#","&H")&chr(34)&chr(10))
fs.Write("Cw_jpeg_t7="&chr(34)&request("t7")&chr(34)&chr(10))
fs.Write("Cw_jpeg_t8="&chr(34)&request("t8")&chr(34)&chr(10))
fs.Write("Cw_jpeg_t9="&chr(34)&request("t9")&chr(34)&chr(10))
fs.Write("Cw_jpeg_t10="&chr(34)&replace(request("t10"),"#","&H")&chr(34)&chr(10))
fs.Write("Cw_jpeg_t11="&request("t11")&chr(10))
fs.Write("Cw_jpeg_t12=Split("&chr(34)&request("t121")&"|"&request("t122")&chr(34)&","&chr(34)&"|"&chr(34)&")"&chr(10))
fs.Write("Cw_jpeg_t13="&chr(34)&request("t13")&chr(34)&chr(10))
fs.Write("Cw_jpeg_t14="&chr(34)&request("t14")&chr(34)&chr(10))
fs.Write("Cw_jpeg_t15="&request("t15")&chr(10))
fs.Write("filepath="&chr(34)&replace(request("t16"),"/","")&chr(34)&chr(10))
fs.Write("filetp="&chr(34)&replace(request("t17"),"｜","|")&chr(34)&chr(10))
fs.Write("filesz="&chr(34)&request("t18")&chr(34)&chr(10))
fs.Write(chr(37)&">")
fs.close
set  fobj=nothing
set  fs=nothing

response.Write("<script>alert('操作成功!系统将自动返回');location.href='cw_upload.asp';</script>")
response.End()

end if
%>
 <%
Function IsObjInstall(obj) 
  Dim IsObj 
  On Error Resume Next 
  Set IsObj = Server.CreateObject(obj) 
  if Err = 0 then 
     IsObjInstall = True
  else 
     IsObjInstall = Flase
  end If 
  Set IsObj = Nothing 
  If Err <> 0 Then Err.Clear 
 End Function

 %>
<table width="99%" border="0" align="center" class="line_table">
  <tr>
    <td height="20">&nbsp;网站后台管理 &gt;&gt; <a href="cw_info.asp">系统设置</a></td>
  </tr>
</table>
<form id="form1" name="form1" method="post" action="cw_upload.asp?submit=1" onsubmit="return check(this)">
      <table width="99%" border="0">
        <tr>
          <td height="20" align="right">上传目录：</td>
          <td ><input name="t16" type="text" id="t16" value="<%=filepath%>" /><span>*填文件夹名称，如：upfile</span> </td>
        </tr>
        <tr>
          <td height="20" align="right">可上传类型：</td>
          <td ><input name="t17" type="text" id="t17" value="<%=filetp%>" size="40" />
            <span>*允许上传的文件类型，多个请用“|”格开</span></td>
        </tr>
		<tr>
          <td height="20" align="right">上传文件最大：</td>
          <td><input name="t18" type="text" id="t18" value="<%=filesz%>" maxlength="15" /> 
          *单位KB</td>
        </tr>
        <tr>
          <td height="20" align="right">缩略图算法：</td>
          <td ><select name="t15" id="t15">
		  <option value="0" Selected <%if Cw_jpeg_t15=0 then%>selected="selected"<%end if%>>常规法</option>
<option value="1" <%if Cw_jpeg_t15=1 then%>selected="selected"<%end if%>>裁剪法</option>
<option value="2" <%if Cw_jpeg_t15=2 then%>selected="selected"<%end if%>>补充法</option>
          </select>  宽：
            <input name="t13" type="text" id="t13" value="<%=Cw_jpeg_t13%>" size="10" />
            高：
            <input name="t14" type="text" id="t14" value="<%=Cw_jpeg_t14%>" size="10" /><span>*为0时按比例缩小</span> </td>
        </tr>
        <tr>
          <td width="14%" height="20" align="right">网站是否加水印：</td>
          <td width="86%" ><select name="t0" id="t0">
            <option value="0"  <%if Cw_jpeg_t0=0 then%>selected="selected"<%end if%>>关闭</option>
			<%IF Cw_commons("Persits.Jpeg")=True Then%>
			<option value="1"  <%if Cw_jpeg_t0=1 then%>selected="selected"<%end if%>>AspJpeg</option>
			<%End if%>
          </select>          </td>
        </tr>
        <tr>
          <td height="20" align="right">水印类型：</td>
          <td><input name="t1" type="radio" value="0" <%if Cw_jpeg_t1=0 then%>checked="checked"<%end if%> />
            文字
            <input type="radio" name="t1" value="1" <%if Cw_jpeg_t1=1 then%>checked="checked"<%end if%>/>
          图片</td></tr>
        <tr>
          <td height="20" align="right">水印质量：</td>
          <td><input name="t2" type="text" id="t2" value="<%=Cw_jpeg_t2%>" />
            <span>*0-100 为100时质量最好</span></td>
        </tr>
        <tr>
          <td height="20" align="right">水印文字：</td>
          <td><input name="t3" type="text" id="t3" value="<%=Cw_jpeg_t3%>" /></td>
        </tr>
        <tr>
          <td height="20" align="right">文字字体：</td>
          <td><select name="t4" id="t4">
		  <option value="宋体" <%if Cw_jpeg_t4="宋体" then%>selected<%end if%>>宋体</option>	  
	  <option value="楷体_GB2312" <%if Cw_jpeg_t4="楷体_GB2312" then%>selected<%end if%>>楷体_GB2312</option>	  
	  <option value="黑体" <%if Cw_jpeg_t4="黑体" then%>selected<%end if%>>黑体</option>	  
	  <option value="隶书" <%if Cw_jpeg_t4="隶书" then%>selected<%end if%>>隶书</option>	  
	  <option value="幼圆" <%if Cw_jpeg_t4="幼圆" then%>selected<%end if%>>幼圆</option>	  
	  <option value="Arial" <%if Cw_jpeg_t4="Arial" then%>selected<%end if%>>Arial</option>	  
	  <option value="Verdana" <%if Cw_jpeg_t4="Verdana" then%>selected<%end if%>>Verdana</option>
          </select>          </td>
        </tr>
        <tr>
          <td height="20" align="right">文字颜色：</td>
          <td><input name="t6" type="text" id="t6" value="<%=replace(Cw_jpeg_t6,"&H","#")%>" />
            <span>*如：#000000</span></td>
        </tr>
        <tr>
          <td height="20" align="right">字体大小：</td>
          <td><select name="t5" id="t5">
            <option value="10" <%if Cw_jpeg_t5="10" then%>selected="selected"<%end if%>>10</option>
            <option value="12" <%if Cw_jpeg_t5="12" then%>selected="selected"<%end if%>>12</option>
            <option value="14" <%if Cw_jpeg_t5="14" then%>selected="selected"<%end if%>>14</option>
            <option value="16" <%if Cw_jpeg_t5="16" then%>selected="selected"<%end if%>>16</option>
            <option value="18" <%if Cw_jpeg_t5="88" then%>selected="selected"<%end if%>>18</option>
            <option value="20" <%if Cw_jpeg_t5="20" then%>selected="selected"<%end if%>>20</option>
			<option value="22" <%if Cw_jpeg_t5="22" then%>selected="selected"<%end if%>>22</option>
            <option value="24" <%if Cw_jpeg_t5="24" then%>selected="selected"<%end if%>>24</option>
            <option value="26" <%if Cw_jpeg_t5="26" then%>selected="selected"<%end if%>>26</option>
            <option value="28" <%if Cw_jpeg_t5="28" then%>selected="selected"<%end if%>>28</option>
          </select>    <span>*单位：Px</span>      <input type="radio" name="t7" value="1" <%if Cw_jpeg_t7=1 then%>checked="checked"<%end if%>/>
            加粗
              <input name="t7" type="radio" value="0" <%if Cw_jpeg_t7=0 then%>checked="checked"<%end if%> />
            不加粗</td>
        </tr>
        
        <tr>
          <td height="20" align="right">水印图片路径：</td>
          <td><input name="t8" type="text" id="t8" value="<%=Cw_jpeg_t8%>" size="40" /></td>
        </tr>
        
        <tr>
          <td height="20" align="right">上传水印图片：</td>
          <td><iframe src="../inc/upload.asp?lei=2&pid=t8" frameborder="0" width="400" height="25" scrolling="No"></iframe></td>
        </tr>
        <tr>
          <td height="20" align="right">水印透明度：</td>
		  <td><input name="t9" type="text" id="t9" value="<%=Cw_jpeg_t9%>" /><span>*0-1之间的数字</span></td>
        </tr>
        <tr>
          <td height="20" align="right">水印图片底色：</td>
          <td>
            <input name="t10" type="text" id="t10" value="<%=replace(Cw_jpeg_t10,"&H","#")%>" /><span>*如：#000000　为空时不去除水印图底色</span>          </td>
        </tr>
        <tr>
          <td height="20" align="right">水印坐标起点：</td>
          <td><select name="t11" id="t11">
			<option value="0" <%if Cw_jpeg_t11=0 then%>selected="selected"<%end if%>>左上</option>
	  <option value="1" <%if Cw_jpeg_t11=1 then%>selected="selected"<%end if%>>左下</option>
	  <option value="2" <%if Cw_jpeg_t11=2 then%>selected="selected"<%end if%>>居中</option>
	  <option value="3" <%if Cw_jpeg_t11=3 then%>selected="selected"<%end if%>>右上</option>
	  <option value="4" <%if Cw_jpeg_t11=4 then%>selected="selected"<%end if%>>右下</option>
            </select>         </td>
        </tr>
        
        <tr>
          <td height="20" align="right">水印坐标X、Y轴：</td>
          <td>X轴
            <input name="t121" type="text" id="t121" value="<%=Cw_jpeg_t12(0)%>" size="10" />
            Y轴
            <input name="t122" type="text" id="t122" value="<%=Cw_jpeg_t12(1)%>" size="10" /><span>*只能是数字</span></td>
        </tr>
        
        <tr>
          <td>&nbsp;</td>
          <td><input type="submit" name="Submit" value="保存配置"  class="btn"></td>
        </tr>
      </table>
</form>
</body>
</html>
