<!--#include file="../inc/config.asp"-->
<!--#include file="../inc/conn.asp"-->
<!--#include file="../inc/function.asp" -->
<!--#include file="checklogin.asp"-->
<%
if(Cint(session("TotCms_UserChannel"))<>Cint(ChannelId)) then
	response.Write("非旅游频道企业会员")
	response.End()
end if
%>
<HTML>
<HEAD>
<TITLE>发布旅游社介绍</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<style>
body,td,input,textarea {
	font-size:9pt;
}
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
.style1 {
	color: #FFFFFF;
	font-weight: bold;
}
form{ margin:0px; padding:0px;}
.input{ width:98%;}
.textarea{ width:98%;}
.pad_left{ padding-left:10px;}
</style>
<script type="text/javascript">
function check(obj){
	if(obj.ComName.value==""){
		alert('标题不能为空!');
		obj.ComName.focus();
		obj.ComName.select();
		return false;
	}
	if(obj.Demons.value==""){
		alert('内容不能为空!');
		obj.Demons.focus();
		obj.Demons.select();
		return false;
	}
	if(obj.CheckCode.value==""){
		alert('请输入验证码!');
		obj.CheckCode.focus();
		obj.CheckCode.select();
		return false;
	}
	return true;
}
</script>
</HEAD>
<BODY>
<%
dim act,gourl

act=request.QueryString("act")
if(act<>"" and act="do") then
	if(isSelfRefer()) then
	else
		call alertstr("禁止外部提交",2)
	end if
	dim rs,ComName,Demons,CatalogId,CheckCode,UIP
	CatalogId=12
	ComName=trim(request.Form("ComName"))
	Demons=request.Form("content1")	
	
	UIP=request.ServerVariables("REMOTE_ADDR")
	dim pageSplitLists,folderCategory,folderStr,folderArr,catalogSaveDir,catalogSaveDirUrl,catalogDomainUrl,newsLinkUrl,current_time,current_M,current_D,folder_day,tempFolder
	current_time=now()
	'读取栏目保存路径
	catalogSaveDir="/html"
	catalogDomainUrl="/html"
   if(catalogSaveDir<>"") then
   		catalogSaveDirUrl=replace(catalogSaveDir,"/","\")
	 else		
		response.end()
   end if
   
	'创建文件夹及文件	
	
	'栏目文件夹
	folderCategory=server.MapPath("/")	
	'创建当天的文件夹
	current_M=chan_data(current_time)
	current_D=chan_day(current_time)
	folderStr=catalogSaveDirUrl&"\"&current_M&current_D
	folder_day=folderCategory&folderStr
	folderArr=split(folderStr,"\")
	for fi=0 to ubound(folderArr)
		tempFolder=tempFolder&"\"&folderArr(fi)
	next	
	tempid=chan_file(current_time)	
	files=folderCategory&folderStr&"\"&tempid&"."&FileExt	
	file_path=catalogSaveDir&"/"&current_M&current_D&"/"&tempid&"."&FileExt	
	newsLinkUrl=catalogDomainUrl&"/"&current_M&current_D&"/"&tempid&"."&FileExt	
	set rs=server.CreateObject("adodb.recordset") 
	rs.open "select top 1 * from news where 1=0 order by id desc",conn,3,3
	rs.addnew	
	rs("pagepath")=file_path
	rs("title")=ComName
	rs("title2")=""
	rs("title_color")=""
	rs("isoutlink")=0
	rs("keywords")=ComName
	rs("relate_key")=""
	rs("photo")=""
	rs("content")=Demons
	rs("parentid")=0
	rs("classid")=CatalogId
	rs("specialid")=0
	rs("templetid")=1
	rs("top1")=0
	rs("totop")=0
	rs("tohot")=0
	rs("author")=""
	rs("news_edit")=""
	rs("news_from")=""
	rs("imgnews")=0
	rs("checked")=0
	rs("recommend")=0
	rs("moditime")=now()	
	rs("username")="com_"&checkusername
	rs("hits")=0
	rs("linkurl")=newsLinkUrl
	rs("isslide")=0
	rs.update
	rs.close
	set rs=nothing	
	response.Write("<script>alert('您的信息已提交，请等待管理员的审核!');location.href='news_man.asp';</script>")
else
%>
<form id="form1" name="form1" method="post" action="?act=do" onSubmit="return check(this)">
  <table width="100%" align="center" cellpadding="0" cellspacing="1" bgcolor="#fff0cf" class="tableborder">
    <tr align="middle">
      <th height="24" colspan="2" bgcolor="#FF9900" class="pad_10">发布旅游社介绍</th>
    </tr>
    <tr>
      <td height="22" colspan="2" bgcolor="#FFFFFF" class="pformleft">★请仔细填写信息</td>
    </tr>
    <tr>
      <td width="21%" height="32" bgcolor="#FFFFFF" class="pad_5"><strong>标题：</strong></td>
      <td width="79%" bgcolor="#FFFFFF" class="pformleft"><input name="ComName" type="text" id="ComName" size="30" maxlength="50" /></td>
    </tr>
	  <tr>
	    <td bgcolor="#FFFFFF" class="pad_5"><strong>内容：</strong></td>
	    <td bgcolor="#FFFFFF" class="pformleft">
      <textarea name="content1" style="display:none; "></textarea>
	<IFRAME ID="eWebEditor1" src="webedit/editor.html" frameborder="0" scrolling="no" width="98%" height="350"></IFRAME>
      </td>
    </tr>
    <tr>
      <td colspan="2" bgcolor="#FFFFFF" class="row4"><div align="center">
        <input type="submit" name="Submit" value="提 交" />
        <input type="reset" name="Submit2" value="重 写" />
      </div></td>
    </tr>
  </table>
</form>
<%
	end if
%>
</BODY>
</HTML>
<%
call connclose()
%>