<!--#include file="../utf-8.asp" -->
<!--#include file="../js/Function.asp" -->
<!--#include file="../html/yidacms_htmlurl.asp" -->
<!--#include file="../js/admin_vipkp.asp" -->
<!--#include file="../CheckAdmin.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 NAME="copyright" CONTENT="Copyright 2010-2012 - yidacms.com" />
<META NAME="Author" CONTENT="世纪伟成  yidacms.com" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="../js/admin.css" rel="stylesheet" type="text/css">
<title>图文管理！</title>
	<script charset="utf-8" src="<%=webpath%>bianji/kindeditor.js"></script>
	<script charset="utf-8" src="<%=webpath%>bianji/lang/zh_CN.js"></script>
	<script charset="utf-8" src="<%=webpath%>bianji/plugins/code/prettify.js"></script>

	<script>
		KindEditor.ready(function(K) {
			var editor1 = K.create('textarea[name="content1"]', {

				uploadJson : '<%=webpath%>uploadclass/upfile_flash.asp',
				fileManagerJson : '<%=webpath%>uploadclass/file_manager_json.asp',
				allowFileManager : true,
				afterCreate : function() {
					var self = this;
					K.ctrl(document, 13, function() {
						self.sync();
						K('form[name=example]')[0].submit();
					});
					K.ctrl(self.edit.doc, 13, function() {
						self.sync();
						K('form[name=example]')[0].submit();
					});
				}
			});
			prettyPrint();
		});
	</script>
</head>
<body>
<%

		'版权：世纪伟成(http://yidacms.com)
		'本信息不会影响您网站的正常访问，无论免费用户或是收费用户请保留这里的信息.
		'如果您删除了这里的版权信息,将追究法律责任.
		yidacms_id = cint(Request("id"))
		set rs = server.createobject("adodb.recordset")
		sql="select * from shuaiweb_photo WHERE id = "&yidacms_id&""
		rs.open sql,dbok,1,1
        	T_news = rs("shuaiweb_photosort")

		if request("t")="photoedit" Then

		yidacms_fenlei = request.form("shuaiweb_photosort")
		yidacms_fenlei1 = split(yidacms_fenlei,"|")

	        if len(trim(request.Form("shuaiweb_photoname")))<1 then
				response.write ("<script language=javascript>alert('图文名称必填且不能少于1个字符！');history.back(-1);</script>")
				response.end
	        end if
	  
	        if len(trim(request.Form("shuaiweb_photoContent")))<1 then
				response.write ("<script language=javascript> alert('图文内容不能为空，且不少于1个字符！');history.back(-1);</script>")
				response.end
	        end if 

	        if len(trim(request.Form("shuaiweb_photoimg1")))<1 then
				response.write ("<script language=javascript> alert('必须上传一张图片！');history.back(-1);</script>")
				response.end
	        end if 

		dim rs,sql
		set rs=server.createobject("adodb.recordset")
		sql="select * from shuaiweb_photo WHERE id= "&yidacms_id&""
		rs.open sql,dbok,1,3
			rs("shuaiweb_photoname")=trim(request.form("shuaiweb_photoname"))
			rs("shuaiweb_photoimg1")=trim(request.form("shuaiweb_photoimg1"))
			rs("shuaiweb_photoimg2")=trim(request.form("shuaiweb_photoimg2"))
			rs("shuaiweb_photoimg3")=trim(request.form("shuaiweb_photoimg3"))
			rs("shuaiweb_photoimg4")=trim(request.form("shuaiweb_photoimg4"))
			rs("shuaiweb_photoimg5")=trim(request.form("shuaiweb_photoimg5"))
			rs("shuaiweb_photosort")=yidacms_fenlei1(0)
			rs("shuaiweb_photosort2")=yidacms_fenlei1(1)
			rs("shuaiweb_vipnkeywords")=trim(request.form("shuaiweb_vipnkeywords"))
			rs("shuaiweb_vipndescription")=trim(request.form("shuaiweb_vipndescription"))
			rs("shuaiweb_photocontent")=trim(request.form("shuaiweb_photocontent"))	
			rs("yida_language")="ch"
		rs.update
		rs.close
		set rs=nothing
		response.write "<script language=javascript> alert('成功修改！');location.replace('admin_photolist.asp');</script>"
		response.end
		End If
%>
		<form id="form1" name="form1" method="post" action="admin_photolistedit.asp?t=photoedit&id=<%=rs("id")%>">
		 <table width="98%" height="205" border="0" cellpadding="10" cellspacing="0" bordercolor="#666666" style="border-collapse:collapse" align="center">
                   <tr> 
                    <td>
                        <input type=button onclick="window.location.href('admin_photolist.asp')"value="返 回" class="inanniu">
                    </td>
                   </tr>
                   <tr>
			<td onMouseOver="this.id='aa'" onMouseOut="this.id='bb'" class="cc">图文栏目: <br />
<%
				set rs = server.createobject("adodb.recordset")
				sql="select * from shuaiweb_photoclass where wait_tcyi = '0'  ORDER BY shuaiweb_classsort ASC"
				rs.open sql,dbok,1,1
%>
					<select name="shuaiweb_photosort" id="shuaiweb_photosort" class="fenleiliebiao">
<%
				if rs.bof and rs.eof then
					response.write "暂无记录!"
						Else
				do while not rs.eof 
%>
		<optgroup label="<%=rs("shuaiweb_classname")%>">
<%
		set rss = server.createobject("adodb.recordset")
		sql="select * from shuaiweb_photoclass where wait_tcyi = '"&rs("id")&"' ORDER BY shuaiweb_classsort ASC"
		rss.open sql,dbok,1,1
		do while not rss.eof
%>
                <option value="<%=rss("id")%>|<%=rs("id")%>" <%if T_news = rss("id") then%>selected<%end if%>> ┝ <%=rss("shuaiweb_classname")%></option>
<%
                rss.movenext
                Loop
				rss.close
				set rss = nothing
				
				rs.MoveNext 
				loop   
				rs.close
				End If
		sql="select * from shuaiweb_photo WHERE id= "&request("id")&""
		rs.open sql,dbok,1,1
%>
						</select>
				</td>
                   </tr>
		  <tr>
			<td onMouseOver="this.id='aa'" onMouseOut="this.id='bb'" class="cc">标题<br /><input name="shuaiweb_photoname" type="text" id="shuaiweb_photoname" size="50"  class="win" value="<%=rs("shuaiweb_photoname")%>"/><font color=red>(必填)</font></td>
		  </tr>
				<%
				set rs = server.createobject("adodb.recordset")
				sql="select * from shuaiweb_photo WHERE id= "&yidacms_id&""
				rs.open sql,dbok,1,1
				%>
		  <tr>
			<td onMouseOver="this.id='aa'" onMouseOut="this.id='bb'" class="cc"><div class="uppic">图片1<br /><input name="shuaiweb_photoimg1" type="text" id="yidacms_adpic"  class="win" value="<%=rs("shuaiweb_photoimg1")%>"/></div><div class="uppic2"><iframe width="305" height="34" marginwidth=0 marginheight=0 hspace=0 vspace=0 frameborder=0 scrolling=no src="../../uploadclass/upload/upfile.asp?class=1&upload_class=photo" allowtransparency="true" ></iframe><font color=red>(必填)</font></div></td>
		  </tr>
		  <tr>
			<td onMouseOver="this.id='aa'" onMouseOut="this.id='bb'" class="cc"><div class="uppic">图片2<br /><input name="shuaiweb_photoimg2" type="text" id="yidacms_adpic2"  class="win" value="<%=rs("shuaiweb_photoimg2")%>"/></div><div class="uppic2"><iframe width="305" height="34" marginwidth=0 marginheight=0 hspace=0 vspace=0 frameborder=0 scrolling=no src="../../uploadclass/upload/upfile.asp?class=2&upload_class=photo" allowtransparency="true" ></iframe></div></td>
		  </tr>
		  <tr>
			<td onMouseOver="this.id='aa'" onMouseOut="this.id='bb'" class="cc"><div class="uppic">图片3<br /><input name="shuaiweb_photoimg3" type="text" id="yidacms_adpic3"  class="win" value="<%=rs("shuaiweb_photoimg3")%>"/></div><div class="uppic2"><iframe width="305" height="34" marginwidth=0 marginheight=0 hspace=0 vspace=0 frameborder=0 scrolling=no src="../../uploadclass/upload/upfile.asp?class=3&upload_class=photo" allowtransparency="true" ></iframe></div></td>
		  </tr>
		  <tr>
			<td onMouseOver="this.id='aa'" onMouseOut="this.id='bb'" class="cc"><div class="uppic">图片4<br /><input name="shuaiweb_photoimg4" type="text" id="yidacms_adpic4"  class="win" value="<%=rs("shuaiweb_photoimg4")%>"/></div><div class="uppic2"><iframe width="305" height="34" marginwidth=0 marginheight=0 hspace=0 vspace=0 frameborder=0 scrolling=no src="../../uploadclass/upload/upfile.asp?class=4&upload_class=photo" allowtransparency="true" ></iframe></div></td>
		  </tr>
		  <tr>
			<td onMouseOver="this.id='aa'" onMouseOut="this.id='bb'" class="cc"><div class="uppic">图片5<br /><input name="shuaiweb_photoimg5" type="text" id="yidacms_adpic5"  class="win" value="<%=rs("shuaiweb_photoimg5")%>"/></div><div class="uppic2"><iframe width="305" height="34" marginwidth=0 marginheight=0 hspace=0 vspace=0 frameborder=0 scrolling=no src="../../uploadclass/upload/upfile.asp?class=5&upload_class=photo" allowtransparency="true" ></iframe></div></td>
		  </tr>
		  <tr>
			<td colspan="2" width="90%" onMouseOver="this.id='aa'" onMouseOut="this.id='bb'" class="cc">内容<br /><textarea id="content1" name="shuaiweb_photocontent" style="width:100%;height:500px;"><%=rs("shuaiweb_photocontent")%></textarea><font color=red>(必填)</font></td>
		  </tr>
		  <tr>
			<td colspan="2"><input type="submit" name="Submit" value="提交" class="inanniu"/>
			  <input type="reset" name="Submit2" value="重置" class="inanniu"/> <input type=button onclick="window.location.href('admin_photolist.asp')"value="返 回" class="inanniu"></td>
		  </tr>
			<tr>
				<td>
<script>
 function showText(){
  if(document.getElementById("q").value==2){
   document.getElementById("text").innerHTML="<div style='padding:5px 5px 5px 5px; font-size:12px;'><input type='button' value='隐藏' onclick='hiddenText();' /><br /><br />网站标题 {sys:title} | 网站地址 {sys:weburl} | 公司标题 {sys:gongsibiaoti} | 公司地址 {sys:gongsidizhi}<br />联系电话 {sys:dianhua} | 移动电话 {sys:yidongdianhua} | 传真 {sys:chuanzhen} | QQ {sys:qq} | 联系人 {sys:lianxiren}<br />备案号 {sys:beian} | 邮箱 {sys:youxiang} | 邮编 {sys:youbian} </div>";
  } 
 }
 function hiddenText(){
  document.getElementById("text").innerHTML="";
 }
</script>
<select name="q" id="q" onchange="showText();">
 <option value="1">===查看可用标签===</option>
    <option value="2">基本标签</option>
</select>
<span id="text"></span>
				</td>
			</tr>
		</table>
		</form>
<%
rs.close
set rs = nothing
%>
</body>
</html>