<%@ LANGUAGE=VBScript CodePage=65001%>
<% response.charset="utf-8" %>
<% session.codepage=65001 %>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!--#include file="../LyricInc/access.asp"  -->
<!-- #include file="LyricInc/functions.asp" -->
<!-- #include file="../LyricInc/m_x_to_html/index_to_html.asp" -->
<!-- #include file="../LyricInc/m_x_to_html/mobile_to_js.asp" -->
<%
act=Request("act")
If act="save" Then 
web_name=trim(request.form("web_name"))
web_url=trim(request.form("web_url"))
web_image=trim(request.form("web_image"))
web_title=trim(request.form("web_title"))
web_keywords=trim(request.form("web_keywords"))
web_description=trim(request.form("web_description"))
web_TopHTML=trim(request.form("web_TopHTML"))
web_BottomHTML=trim(request.form("web_BottomHTML"))
web_copyright=trim(request.form("content"))
web_contact=trim(request.form("web_contact"))
web_person=trim(request.form("web_person"))
web_birthdate=trim(request.form("web_birthdate"))
web_birthplace=trim(request.form("web_birthplace"))
web_shortintro=trim(request.form("web_shortintro"))
web_email=trim(request.form("web_email"))
web_tel=trim(request.form("web_tel"))
web_ModelEdit=trim(request.form("web_ModelEdit"))
web_time=trim(request.form("web_time"))
web_Folder=Replace(trim(request.form("web_Folder")),"/","")
if web_time="" then
 web_time=now()
end if 
web_Show=trim(request.form("web_Show"))

set rs=server.createobject("adodb.recordset")
sql="select * from mobile_web_settings"
rs.open(sql),cn,1,3
rs("web_name")=web_name
rs("web_url")=web_url
rs("web_image")=web_image
rs("web_title")=web_title
rs("web_keywords")=web_keywords
rs("web_description")=web_description
rs("web_TopHTML")=web_TopHTML
rs("web_BottomHTML")=web_BottomHTML
rs("web_copyright")=web_copyright
rs("web_contact")=web_contact
rs("web_person")=web_person
OldFolder=rs("web_folder")
rs("web_Folder")=web_Folder
rs("web_Show")=web_Show
'rs("web_birthplace")=web_birthplace
'rs("web_shortintro")=web_shortintro
'rs("web_email")=web_email
'rs("web_tel")=web_tel
'rs("web_ModelEdit")=web_ModelEdit
'rs("web_time")=web_time
rs.update
rs.close
set rs=nothing

if web_Show=0 then
'检测原文件夹是否存在，否则创建
Set Fso=Server.CreateObject("Scripting.FileSystemObject") 
If Fso.FolderExists(Server.MapPath("/"&OldFolder))=false Then
NewFolderDir="/"&OldFolder
call CreateFolderB(NewFolderDir)
end if
'检测新文件夹是否与原文件夹不同，是则更名。
if OldFolder<>web_Folder  then
NewFolderDir="/"&web_Folder
OldFolderDir="/"&OldFolder
call renamefolder(OldFolderDir,NewFolderDir) 
end if
else
'如果设置手机站不显示，则删除手机站文件夹
Set Fso=Server.CreateObject("Scripting.FileSystemObject") 
If Fso.FolderExists(Server.MapPath("/"&web_Folder)) Then
call DelFolder("/"&web_Folder)
end if
end if
call Mobile_to_js()
call index_to_MHtml()
response.Write "<script language='javascript'>alert('提交成功！')</script>"

end if
 %>
 
	<%
Call header()

%>
<%set rs=server.createobject("adodb.recordset")
sql="select * from mobile_web_settings"
rs.open(sql),cn,1,1
if not rs.eof and not rs.bof then
%>
  <form id="form1" name="form1" method="post" action="?act=save">
         <script language='javascript'>
function checksignup1() {
if ( document.form1.web_Folder.value == '' ) {
window.alert('请输入手机网站目标文件夹^_^');
document.form1.web_Folder.focus();
return false;}

return true;}
</script>

	<table cellpadding='3' cellspacing='0' border='0' class='tableBorder' align=center>
	<tr>
	  <th class='tableHeaderText' colspan=2 height=31>手机网站信息设置</th>
	<tr>
	  <td height=23 colspan="2" class='forumRow'><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
          <td height="20" class='TipTitle'>&nbsp;√ 操作提示</td>
        </tr>
        <tr>
          <td height="30" valign="top" class="TipWords"><p>1、设置完成后，请到 静态管理 处 更新手机所有页面查看设置效果。</p>
</td>
        </tr>
        <tr>
          <td height="10">&nbsp;</td>
        </tr>
      </table></td>
	  </tr>
	<tr>
	  <td class='forumRowHighLight' height=23>是否开启手机站</td>
	  <td class='forumRowHighLight'><label>
	    <input type="radio" name="web_show" value="0" <%
		if rs("web_show")=0 then
		response.write "checked"
		end if%>>
      开启
      &nbsp;
      <input name="web_show" type="radio" value="1" <%if rs("web_show")=1 then
		response.write "checked"
		end if%>>
      关闭</label></td>
	</tr>	
	<tr>
	<td width="15%" height=23 class='forumRow'>目标文件夹</td>
	<td class='forumRow'><input name='web_Folder' type='text' id='web_Folder' value="<%=rs("web_Folder")%>" size='80' maxlength="30"> 文件夹将创建在根目录下</td>
	</tr>	<tr>
	<td width="15%" height=23 class='forumRowHighLight'>网站名称(Name)</td>
	<td class='forumRowHighLight'><input name='web_name' type='text' id='web_name' value="<%=rs("web_name")%>" size='80'></td>
	</tr>
	<tr>
	<td class='forumRow' height=23>网站网址(Url)</td>
<td class='forumRow'><input type='text' id='web_url' name='web_url' value="<%=rs("web_url")%>" size='80'> 
  &nbsp;以http://开头，后面不要带 </td>
	</tr>
	  <tr>
	    <td class='forumRowHighLight' height=23>网站标志(Logo)</td>
	    <td width="85%" class='forumRowHighLight'><table width="100%" border="0" cellspacing="0" cellpadding="0">
         <tr>
           <td width="22%"  class=''><input name="web_image" type="text" id="web_image"  value="<%=rs("web_image")%>"  size="30"></td>
           <td width="78%"  class=''><iframe width="500" name="ad" frameborder=0 height=30 scrolling=no src=PetUpload.asp></iframe></td>
         </tr>
       </table></td>
      </tr>
	    <td class='forumRow' height=23>首页标题(Title)</td>
	      <td class='forumRow'><input type='text' id='web_title' name='web_title'   value="<%=rs("web_title")%>" size='80'></td>
	</tr>
	    <td class='forumRowHighLight' height=11>网站关键字(Keywords)</td>
	      <td class='forumRowHighLight'><input type='text' id='v3' name='web_keywords'   value="<%=rs("web_keywords")%>" size='80'>
	  </td>
	</tr><tr>
	  <td class='forumRow' height=11>网站描述(Description)</td>
	  <td class='forumRow'><textarea name='web_description'  cols="100" rows="4" ><%=rs("web_description")%></textarea></td>
	</tr>
	<tr>
	  <td class='forumRow' height=23>网站底部文字信息<br>(支持HTML代码)</td>
	  <td class='forumRow'> <textarea name='web_BottomHTML' cols="100" rows="10"  id="web_BottomHTML" ><%=rs("web_BottomHTML")%></textarea></td>
	</tr>	

	<tr><td height="100" colspan=2  class='forumRow2'><div class='ButtonFix' align="center">
	  <INPUT class='GPetSubmit' type=submit value='提 交'  onClick='javascript:return checksignup1()' name=Submit>
	  </div></td></tr>
	</table>
</form>

<%
Call DbconnEnd()
else
response.write "暂时无数据"
end if %>