<!--#include file="user_top.asp"-->
<!--#include file="inc/class_blog.asp"-->
<!--#include file="inc/class_Trackback.asp"-->
<script src="oBlogStyle/move.js" type="text/javascript"></script>
<script src="inc/function.js" type="text/javascript"></script>
<%
If oblog.l_uNewbie=1 Then 
	response.write("<script>parent.show_title('选择模版')</script>")
	oblog.showok "发布前请先选择一个喜欢的模版。","user_template.asp?action=showconfig"
	'jscmd="go_cmdurl('选择模版','tab3')"
end if
If Application(cache_name_user&"_systemenmod")<>"" Then
	Dim enStr
	enStr=Application(cache_name_user&"_systemenmod")
	enStr=Split(enStr,",")
	If enStr(2)="1" Then	response.write("系统临时禁止操作日志与相册!"):response.End()
End If
If t=1 or t=2 Then
	dim flashurl
%>
<script type="text/javascript" src="inc/flash.js"></script>
<script type="text/vbscript" src="inc/flash_vb.js"></script>
<%
	select case t
		case 1
		dim tmpstr
		if Trim(request("action"))="showphoto" then tmpstr="" else tmpstr="upload"
		flashurl="photo.swf?action="&tmpstr&"&blogurl=&userid="&oblog.l_uid
		case 2
		flashurl="cam3.swf"
	end select	
%>
</head>
<body scroll="no" style="overflow:auto!important;overflow:scroll;background:#fff;">
<div id="flashcontent" style="margin:10px;width:96%;height:96%;text-align:left;">
<script language="JavaScript" type="text/javascript">
var hasRightVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);
if(!hasRightVersion && <%=t%>==2) {
	document.write('\您的flash版本过低，<a href="http:\/\/www.adobe.com\/go\/getflash\/" target="_blank"\>请点击升级Flash Player插件来支持大头贴程序</a>');
  }else{
  	document.write("<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0' width='100%' height='500' ><param name='wmode' value='transparent' /><param name='movie' value='<%=flashurl%>' /><param name='quality' value='high' /><embed src='<%=flashurl%>' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='100%' height='500'></embed></object>");
  }
</script>

</div>

<!--<script language="JavaScript" type="text/javascript">
var hasRightVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);
if(hasRightVersion) {
	var so = new SWFObject("<%=flashurl%>", "photo", "100%", "500", "9", "#FFFFFF");
	so.addParam("wmode", "transparent");
	so.write("flashcontent");
  } else { 
  	document.write('\<a href="http:\/\/www.adobe.com\/go\/getflash\/" target="_blank"\>请升级Flash Player插件来支持本程序</a>');
  }
</script>-->
</body>
</html>

<%
	response.End()
End If
Dim sDisable
action = Trim(request("action"))
If action<>"savelog" Then 
	sDisable=" "
Else
	sDisable=" disabled"
End if
%>
</head>
<body>
<ul id="user_page_top">
	<li id="p2"><a href="#" onClick="return doMenu('swin1');" <%=sDisable%>>高级选项</a></li>
    <li id="p1"><a href="#" onClick="return doMenu('swin2');" <%=sDisable%>>引用通告</a></li>
    <li id="p3"><a href="#" onClick="return doMenu('swin3');" <%=sDisable%>>上传文件</a></li>
    <li id="p1"><a href="#" onClick="return doMenu('swin4');" <%=sDisable%>>文章摘要</a></li>
</ul>

<%
Dim action,rs
Set rs=Server.CreateObject("Adodb.Recordset")


If action="savelog" Then
		Call savelog
	Else
	    Call main
End If
%>
</body>
</html>

<%
Sub main()
    Dim  logid, log_specialid,photofile
    logid = request.QueryString("logid")
    photofile = Trim(request.QueryString("photofile"))
    Dim log_tags, tags, filename,  log_type,log_abstract
    Dim face, topic, classid, subjectid, logtext, istop, ishide, isencomment, showword, addtime, userid, authorid,ispassword, tburl, oldisdraft
    oldisdraft = 0
    If logid<>"" Then logid=Int(logid)
    If logid > 0 Then
        Set rs=oblog.execute("Select * From oblog_log Where logid="&logid&" And (authorid= "&oblog.l_uid&" or userid="&oblog.l_uid&")")
        If rs.EOF Then
            Set rs = Nothing
            oblog.adderrstr ("无此权限操作此" & tName & "！")
            oblog.showusererr
        End If
		if rs("isdel")=1 then
			set rs=nothing
			oblog.showok "已删除日志，请先恢复后再操作。",""
		end if
        topic = rs("topic")
        face = rs("face")
        classid = rs("classid")
        subjectid = rs("subjectid")
        logtext = Replace(rs("logtext"), "#isubb#", "")
        istop = rs("istop")
        ishide = rs("ishide")
        isencomment = rs("isencomment")
        showword = rs("showword")
        addtime = rs("addtime")
        userid = rs("userid")
        authorid = rs("authorid")
        ispassword = rs("ispassword")
        If ispassword<>"" Then ispassword="已设密码，若不修改请不要操作"
        tburl = rs("tburl")
        oldisdraft = rs("isdraft")
        filename = rs("filename")
        log_type = rs("logtype")
		log_abstract=rs("abstract")
        If IsNull(rs("logtags")) Then
            tags = ""
        Else
            tags = rs("logtags")
        End If
        log_specialid=rs("specialid")
        Set rs = Nothing
    Else
    	'检测发表限制
    	Dim sPostAccess
    	sPostAccess=oblog.CheckPostAccess    	
    	If sPostAccess<>"" Then
			oblog.AddErrstr sPostAccess
         	oblog.ShowUserErr
    	End If
    	authorid=oblog.l_uid
    End If
    If isencomment = "" Then isencomment = 1
    If userid = "" Then userid = oblog.l_uId
    if oblog.CacheConfig(23)="1" then
		if filename="" then filename=Year(now) & Month(now) & Day(now)&hour(now())&minute(now())&second(now())
	else
		if filename="" then filename="自动编号"		
	end if
	call getteam()
%>

<script language=javascript>
function ResetValue(tvalue)
{
	<%If logid > 0 Then%>
	document.getElementById('oblogform').reset; 
	return;
	<%else%>
	var showword='<%=oblog.l_uShowlogWord%>';
	var filename='<%=filename%>';
	if (tvalue==1)
	{
//		document.getElementsByName('isencomment')[isencomment].checked="checked";
		document.oblogform.isencomment[0].checked="checked";
		document.oblogform.ishide[1].checked="checked";
		document.oblogform.istop[1].checked="checked";
		document.oblogform.showword.value=showword;
		document.oblogform.filename.value=filename;
		document.oblogform.ispassword.value='';
		document.oblogform.blogteam.options[0].selected='selected';
	}
	else if (tvalue==2)
	{
		document.oblogform.tb.value='';	
	}
	else if (tvalue==3)
	{
		document.oblogform.abstract.value='';	
	}
	<%end if%>
}
parent.show_title("发布日志");
var in_ob_useradmin=true;
var issubmit=false;
function chkfilename()
{
	var filename=del_space(document.oblogform.filename.value);
	if (filename=="自动编号"){document.oblogform.filename.value=""}
	if (filename==""){document.oblogform.filename.value="自动编号"}
}
function checkerr(string)
{
var i=0;
for (i=0; i<string.length; i++)
{
	if((string.charAt(i) < '0' || string.charAt(i) > '9') && (string.charAt(i) < 'a' || string.charAt(i) > 'z')&& (string.charAt(i) < 'A' || string.charAt(i) > 'Z')&& (string.charAt(i)!='-')&& (string.charAt(i)!='_'))
	{return 1;}
	}
	return 0;//pass
}

function setdraft()
{
	document.oblogform.isdraft.value='1';
	savelog();
}
function autosetdraft()
{
	document.oblogform.edit.value=oEdit1.getHTMLBody();
	var edit = del_space(document.oblogform.edit.value); 
	if (edit.length > 0&&!issubmit){
		document.oblogform.isdraft.value='1';
		savelog();
	}
}
function savelog()
{
	document.getElementById("save_ing").style.display="";
	document.getElementById("save_ing").innerHTML="<img src='images/loading.gif' align='absbottom'> 正在保存...";
	if (issubmit){
		var oDialog = new dialog("<%=blogurl%>");
		oDialog.init();
	 	oDialog.event("正在提交中，请稍候...",'');
		oDialog.button('dialogOk',"");	
	}else{
		issubmit=true;
		var errstr=""
		document.oblogform.edit.value=oEdit1.getHTMLBody();
		var topic = del_space(document.oblogform.topic.value);
		 if (topic.length == 0&&document.oblogform.isdraft.value!="1")
		 {
			errstr="您忘了填写题目。<br />";
		 }	
		 var needclassid=<%=oblog.CacheConfig(25)%>
		 if (needclassid==1 &&document.oblogform.isdraft.value!="1") {
		 if (document.oblogform.classid.value == 0)
		 {
			errstr=errstr+"请选择日志的类别。<br />";
		 }
		 }
		
		var filename=del_space(document.oblogform.filename.value);
		if ((checkerr(filename) == "1")&&(filename!="")&&(filename!="自动编号")){
			errstr=errstr+"文件名称请用0-9的数字和a-z的半角字母及下划线,不允许中文和怪字符（如!@#$%^等）。<br />";
		}
		
		if (document.oblogform.edit.value == "")
		 {
			errstr=errstr+"请输入日志的内容。<br />";
		 }
		var date=document.oblogform.selecty.value+"-"+document.oblogform.selectm.value+"-"+document.oblogform.selectd.value
		var datereg=/^(\d{4})-(\d{1,2})-(\d{1,2})$/
		var datareg=/^(\d){1,2}$/
		if (!datereg.test(date)){
		  errstr=errstr+"日志时间输入格式错误。<br />";
		 }
		var r=date.match(datereg)
		var d=new Date(r[1],r[2]-1,r[3])
		if (!(d.getFullYear()==r[1]&&d.getMonth()==r[2]-1&&d.getDate()==r[3])){
		  errstr=errstr+"日志时间输入格式错误。<br />";
		 }
		 
		 if (errstr!=""){
			var oDialog = new dialog("<%=blogurl%>");
			oDialog.init();
			oDialog.event(errstr,'');
			oDialog.button('dialogOk',"");
			issubmit=false;	 
			document.getElementById("save_ing").style.display="none";
		 }
		 else{
			var re=/\+/g; 
			var topic=escape(document.oblogform.topic.value.replace(re,"<%=Chr(25)%>"));
			var classid=document.oblogform.classid.value;
			var logtags=escape(document.oblogform.logtags.value.replace(re,"<%=Chr(25)%>"));
			var edit=escape(document.oblogform.edit.value.replace(re,"<%=Chr(25)%>"));
			<%if oblog.l_Group(31,0)=1 then%>
			var codestr=document.oblogform.codestr.value;
			var ob_codename=document.oblogform.ob_codename.value
			<%else%>
			var codestr='';
			var ob_codename='';
			<%end if%>
			if (document.oblogform.teamid){
				var teamid=read_checkbox('teamid');}
			else{
				var teamid='';}
			var isencomment=read_radio("isencomment");
			var ishide=read_radio("ishide");
			var istop=read_radio("istop");
			var ispassword=document.oblogform.ispassword.value;
			var filename=document.oblogform.filename.value;
			var selecty=document.oblogform.selecty.value;
			var selectm=document.oblogform.selectm.value;
			var selectd=document.oblogform.selectd.value;
			var selecth=document.oblogform.selecth.value;
			var selectmi=document.oblogform.selectmi.value;
			var tb=document.oblogform.tb.value;
			var abstract=document.oblogform.abstract.value;
			var logid=document.oblogform.logid.value;
			var oldisdraft=document.oblogform.oldisdraft.value;
			var isdraft=document.oblogform.isdraft.value;
			var subjectid=document.oblogform.subjectid.value;
			var blogteam=document.oblogform.blogteam.value;
			var blogteamsubject=document.oblogform.blogteamsubject.value;
			var showword=document.oblogform.showword.value;
			var Ajax = new oAjax("ajaxserver.asp?action=savelog",show_returnsave);
			var arrKey = new Array("topic",
									"classid",
									"logtags",
									"edit",
									"codestr",
									"ob_codename",
									"teamid",
									"isencomment",
									"ishide",
									"istop",
									"ispassword",
									"filename",
									"selecty",
									"selectm",
									"selectd",
									"selecth",
									"selectmi",
									"tb",
									"abstract",
									"logid",
									"oldisdraft",
									"isdraft",
									"blogteam",
									"blogteamsubject",
									"showword",
									"subjectid");	
			var arrValue = new Array(topic,
									classid,
									logtags,
									edit,
									codestr,
									ob_codename,
									teamid,
									isencomment,
									ishide,
									istop,
									ispassword,
									filename,
									selecty,
									selectm,
									selectd,
									selecth,
									selectmi,
									tb,
									abstract,
									logid,
									oldisdraft,
									isdraft,
									blogteam,
									blogteamsubject,
									showword,
									subjectid);													
			Ajax.Post(arrKey,arrValue);
		 
		 }
	}
}


function show_returnsave(arrobj){
	if (arrobj){
		switch (arrobj[1]){
		case '0':
			var oDialog = new dialog("<%=blogurl%>");
			oDialog.init();
			oDialog.event(arrobj[0],'');
			oDialog.button('dialogOk',"");	
			issubmit=false;
			document.getElementById("save_ing").style.display="none";
			break;
		case '1':
			parent.get_draft();			
			var oDialog = new dialog("<%=blogurl%>");
			oDialog.init();
			oDialog.event("发布日志成功!",'');
			oDialog.button('dialogOk',"window.location='"+window.location.href.substring(0,window.location.href.lastIndexOf("/"))+"/"+"user_blogmanage.asp'");
			document.getElementById("ob_submit").disabled="disabled";
			document.getElementById("ob_submit_d").disabled="disabled";
			document.getElementById("save_ing").style.display="none";			
			break;
		case '2':
			document.getElementById("save_ing").innerHTML=arrobj[0];
			document.getElementById("logid").value=arrobj[2];
			document.oblogform.isdraft.value='0';
			parent.get_draft();
			issubmit=false;
			break;
		case '3':
			var oDialog = new dialog("<%=blogurl%>");
			oDialog.init();
			oDialog.event(arrobj[0],'');
			oDialog.button('dialogOk',"top.location='"+window.location.href.substring(0,window.location.href.lastIndexOf("/"))+"/"+"index.asp'");	
			issubmit=false;
			document.getElementById("save_ing").style.display="none";
			break;
		}
	}
}



function taghelp(){
	var str='<div style="height:200px;overflow:auto">一、什么是标签（TAG）？<br />　　简单的说,标签就是一篇文章的"关键词"。您可以将日志文章或者照片，选择一个或多个词语（标签）来标记，这样一来，凡是我们博客网站上使用该词语的文章自动成为一个列表显示。<br />二、使用标签的好处：<br />　　1、您添加标签的文章就会被直链接到网站相应标签的页面，这样浏览者在访问相关标签时，就有可能访问到您的文章，增加了您的文章被访问的机会。<br />　　2、您可以很方便地查找到与您使用了同样标签的文章，延伸您文章的视野；可以方便地查找到与您使用了同样标签的作者，作为志同道合的朋友，您可以将他们加为好友或友情博客，扩大您的朋友圈。 <br />　　3、增加标签的方式完全由您自主决定，不受任何的限制，不用受网站系统分类和自己原有日志分类的限制，便于信息的整理、记忆和查找。<br />三、如何使用标签?<br />　　例如：您写了一篇到北京旅游的文章，按照文章提到的内容，您可以给这篇文章加上：<br />　　北京旅游,天安门,长城,故宫<br />　　等几个标签，当浏览者想搜索关于长城的文章时，浏览者会点击标签：长城，从而看到所有关于长城的文章，方便了浏览者查找日志，同时您也可用此方法找到和您同样喜欢的人，以便一起相互交流等等。<br />四．如何添加“好”的Tag？ <br />　　1． Tag应该要能够体现出自己的特色，并且是大家经常采用的熟悉的词语。<br />　　2．用词尽量简单精炼,词语字数不要太长，两三个字的词语就可以了，尽量是有意义的词汇，不要使用一些只作为装饰的符号，如｛｝等。<br />　　3．不要使用一些语义比较弱的词汇，如“我的家”，“图片”等。<br /></div>'
	var oDialog = new dialog("<%=blogurl%>");
	oDialog.init();
	oDialog.event(str,'');
	oDialog.button('dialogOk',"");	
	document.getElementById("ob_boxface").style.display="none";

}
function setSort(s1,s2)
{
param=s1.selectedIndex-1;
if(param>=0)
	{
	s2.options.length=0;						
		for(i=0;i<p_array[param].length;i++)
		{
			s2.options.length++;
			s2.options[i].text=p_array[param][i];
			s2.options[i].value=p_array_id[param][i];
		}

	}else
	{
	s2.options.length=0;
	s2.options.length++;
	s2.options[0].text="我的专题";
	s2.options[0].value="0";
	}
}
setInterval(autosetdraft,<%=oblog.CacheConfig(7)%>*60000);
</script>

<form action="user_post.asp?action=savelog&t=<%=t%>" method="post" name="oblogform" id="oblogform"> 	

<div id="user_post_title">
<span class="user_post_inputtxt">标题:</span><input name="topic" type=text id="topic" size="40" maxlength="50" value="<%=topic%>"> 
    <select name="classid" id="classid" <%If oblog.CacheConfig(25)=1 Then Response.Write "style=""color:#f00;"" title=""必须填写系统分类"" " %>>
    <%=oblog.show_Postclass(classid)%>
    </select>
    <select name="subjectid" id="subjectid">
    <option value="0">我的分类</option>
<%
Set rs = oblog.Execute("select subjectid,subjectname from oblog_subject where userid=" & userid & " And subjectType=" & t)
While Not rs.EOF
    If rs(0) = subjectid Then
        response.Write ("<option value=" & rs(0) & " selected>" & oblog.filt_html(rs(1)) & "</option>")
    Else
        response.Write ("<option value=" & rs(0) & " >" & oblog.filt_html(rs(1)) & "</option>")
    End If
    rs.movenext
Wend
%>
    </select>
</div>
<div id="user_post_tag">
	<span class="user_post_inputtxt">标签:</span><input name="logtags" type="text" size="40" maxlength="255" value="<%=tags%>"/>
        以<%
        Select Case P_TAGS_SPLIT
            Case " "
                response.Write "空格"
            Case ","
                response.Write "逗号"
            Case Else
                response.Write P_TAGS_SPLIT
        End Select
        %>分隔(<a href="#" onclick="taghelp();">什么是标签?</a>)
</div>
<div id="user_post_Editor">

<div id="user_post_Edit">
	<%
	Dim EditorHeight
	if oblog.l_Group(31,0)=1 then
		EditorHeight=250
	Else
		EditorHeight=250
	End If
		%>
	<span id="loadedit" style="font-size:12px"><img src='images/loading.gif' align='absbottom'> 正在载入编辑器...</span>
  	<textarea id="edit" name="edit" style="width:100%;height:<%=EditorHeight%>px; display:none"><%=Server.HtmlEncode(logtext)%></textarea>
	<%if oblog.l_Group(31,0)=1 then%>
验证码：<input name="codestr" type="text" size="6" maxlength="4" /> <%=oblog.getcode%>(如果您撰写文章花费了较长的时间,请点击验证码图片重新刷新)
<%end if%>
</div>
<%
Dim sHidden
If oblog.l_Group(11,0) = 0 or 1=1 Then
	sHidden=""
Else
	sHidden="style=""display:none;"""
End If
%>
<div id="user_post_Edit_right" <%=sHidden%>>
<font >同时发布到<%=P_QQ_NAME%></font>
<%
Dim rst
Set rs=oblog.Execute("Select a.teamid,a.t_name From oblog_team a ,(Select  teamid From oblog_teamusers Where userid=" & oblog.l_Uid & " and state>=3) b Where a.teamid=b.teamid And a.istate=3")
If rs.Eof Then
	Response.Write "您还没有加入任何" &P_QQ_NAME
Else
	If logid>0 Then
		Set rst=oblog.Execute("Select teamid From oblog_teampost Where logid=" & logid & " And userid=" & oblog.l_uid)
		Do While Not rs.EOF
			rst.Filter="teamid=" & rs(0)
			If Not rst.Eof Then
				%>
			    <p><input type="checkbox" name="teamid" value="<%=rs(0)%>" checked> <a href="group.asp?gid=<%=rs(0)%>" target="_blank"><%=rs(1)%></a></p>
				<%
			Else
				%>
				<p><input type="checkbox" name="teamid" value="<%=rs(0)%>"> <a href="group.asp?gid=<%=rs(0)%>" target="_blank"><%=rs(1)%></a></p>
				<%
			End If
    		rs.movenext
		Loop
	Else
		Do While Not rs.EOF
			%>
				<p><input type="checkbox" name="teamid" value="<%=rs(0)%>"> <a href="group.asp?gid=<%=rs(0)%>" target="_blank"><%=rs(1)%></a></p>
				<%
    		rs.movenext
		Loop
	End If
End If
Set rst=Nothing
%>

<input type="hidden" name="isdraft" id="isdraft" value="0" />
<input name="logid"  type="hidden" id="logid" value=<%=logid%> >
<input name="oldisdraft"  type="hidden" id="oldisdraft" value=<%=oldisdraft%> >
    </ul>

</div>
</div>

</div>
<ul id="user_post_input">
<input type="button" id="ob_submit"  value="发布日志" title="发布日志" onclick="savelog();" />
 <input type="button" id="ob_submit_d" value="保存为草稿" title="保存为草稿" onClick="setdraft();"/>
<!-- <input type="button" onClick="oblog_editors['edit'].setHTML(oblog_editors['edit'].getHTML()+'#此前在首页部分显示#');" value="部分显示标记" />
--></ul>
 <div style="margin:-29px 0 0 380px;padding:8px;position:absolute;z-index:50;">
 <span id="save_ing" style="padding:7px 6px 5px 6px;border:1px #CCCCCC solid; height:20px;background:#FFFFE0;display:none;"></span>
 </div>

<div id="swin1" style="display:none;position:absolute;top:41px;left:10px;z-index:100;">
	<table class='win_table' align='center' border='0' cellpadding='0' cellspacing='1'>
		<tr>
			<td colspan='2' align='center' class='win_table_top'>高级选项</td>
		</tr>
		<tr>
			<td class='win_table_td' width='200'>允许评论：</td>
			<td><input value='1' name='isencomment' id="isencomment" <%If isencomment=1 Or isencomment="" Then Response.Write " checked='checked'" End If%> type='radio'>是  <input value='0' name='isencomment' id="isencomment" type='radio' <%If isencomment=0 Then Response.Write " checked='checked'" End If%>> 否</td>
		</tr>
		<tr>
			<td class='win_table_td'>仅好友可见：</td>
			<td><input value='1' name='ishide' id="ishide" <%If ishide=1 Then Response.Write " checked='checked'" End If%> type='radio'>是  <input value='0' id="ishide" name='ishide' type='radio' <%If ishide=0 Or ishide="" Then Response.Write " checked='checked'" End If%>> 否</td>
		</tr>
		<tr>
			<td class='win_table_td'>首页固顶：</td>
			<td><input value='1' name='istop' id="istop" <%If istop=1 Then Response.Write " checked='checked'" End If%> type='radio'>是  <input value='0' name='istop' id="istop"  type='radio' <%If istop=0 Or istop="" Then Response.Write " checked='checked'" End If%>> 否</td>
		</tr>
		<tr>
			<td class='win_table_td'>日志密码：</td>
			<td><input name='ispassword' id='ispassword' size='30' value='<%=ispassword%>'></td>
		</tr>
		<tr>
			<td class='win_table_td'>部分显示字数：</td>
			<td><input name="showword" id="showword" size='30'value="<%if showword<>"" then response.Write(showword) else response.Write(oblog.l_uShowlogWord)%>"></td>
		</tr>
		<tr>
			<td class='win_table_td'>文件名称：</td>
			<td><input name='filename' id='filename' size='30' value="<%=filename%>" onClick="chkfilename();"  onBlur="chkfilename();">.<%=f_ext%><br/> (只能为英文、数字及下划线，最长30个字符。)</td>
		</tr>
		<tr>
			<td class='win_table_td'>共同撰写：</td>
			<td><select name="blogteam" id="s1" onChange="setSort(this,this.form.s2);">
			<option value="<%=authorid%>" >我的BLOG</option>
		<%
		set rs=oblog.execute("select a.mainuserid,b.blogname,a.id from oblog_blogteam a,[oblog_user] b where a.otheruserid="&oblog.l_uid&" and a.mainuserid=b.userid")
		while not rs.eof
			if clng(rs(0))=clng(userid) then 
				response.Write "<option value="&rs(0)&" selected>"&oblog.filt_html(rs(1))&"</option>"
			else
				response.Write "<option value="&rs(0)&">"&oblog.filt_html(rs(1))&"</option>"
			end if
			rs.movenext
		wend
		%>
			</select>
			专题： 
			<select name="blogteamsubject" id="s2">
		<%
		if oblog.l_uid<>userid and userid>0 then
			set rs=oblog.execute("select subjectid,subjectname from oblog_subject where userid="&userid)
			response.Write("<option value=0>我的专题</option>")
			while not rs.eof
				if subjectid=rs(0) then
					response.Write("<option value="&rs(0)&" selected>"&rs(1)&"</option>")
				else
					response.Write("<option value="&rs(0)&" >"&rs(1)&"</option>")
				end if
				rs.movenext
			wend
		else
			response.Write("<option value=0 selected>我的专题</option>")
		end if
		set rs=nothing
		%>                
			</select> 
			</td>
		</tr>
		<tr>
			<td class='win_table_td'>发表时间：</td>
			<td><%show_selectdate(addtime)%></td>
		</tr>
		<tr>
			<td colspan='2' class="win_table_end"><input type="button" onClick="return doMenu('swin1');" value=" 确 定 " title=" 确 定 " />&nbsp;&nbsp;&nbsp;<input type="button" onClick="ResetValue(1);setSort(this,this.form.s2);return doMenu('swin1');" value=" 取 消 " title=" 取 消 " /></td>
		</tr>
	</table>
</div>

<div id="swin2" style="display:none;position:absolute;top:41px;left:104px;z-index:100;">
	<table class='win_table' align='center' border='0' cellpadding='0' cellspacing='1'>
		<tr>
			<td align='center' class='win_table_top'>引用通告</td>
		</tr>
		<tr>
			<td><p>引用通告(支持多个引用通告，每一行为一个)：</p>
				<textarea name="tb" type="text" id="tb" rows=3 cols=60><%=oblog.filt_html(tburl)%></textarea></td>
		</tr>

		<tr>
			<td class="win_table_end"><input type="button" onClick="return doMenu('swin2');" value=" 确 定 " title=" 确 定 " />&nbsp;&nbsp;&nbsp;<input type="button" onClick="ResetValue(2);return doMenu('swin2');" value=" 取 消 " title=" 取 消 " /></td>
		</tr>
	</table>
</div>
<div id="swin3" style="display:none;position:absolute;top:41px;left:197px;z-index:100;">
	<table class='win_table' align='center' border='0' cellpadding='0' cellspacing='1'>
		<tr>
			<td align='center' class='win_table_top'>上传文件</td>
		</tr>
		<tr>
			<td><iframe id='d_file' frameborder='0' src='upload.asp?tMode=<%=t%>&re=' width='100%' height='60' scrolling='no'></iframe></td>
		</tr>
		<tr>
			<td class="win_table_end"><input type="button" onClick="return doMenu('swin3');" value=" 确 定 " title=" 确 定 " /></td>
		</tr>
	</table>
</div>
<div id="swin4" style="display:none;position:absolute;top:41px;left:292px;z-index:100;">
	<table class='win_table' align='center' border='0' cellpadding='0' cellspacing='1'>
		<tr>
			<td align='center' class='win_table_top'>文章摘要</td>
		</tr>
		<tr>
			<td><p>文章摘要(请填写您文章的简要内容)： </p>
				<p>内容摘要不支持Html格式,且应小于500字符</p>
			<textarea name="abstract" type="text" id="abstract" rows=6 cols=50><%=log_abstract%></textarea>
			</td>
		</tr>
		<tr>
			<td class="win_table_end"><input type="button" onClick="return doMenu('swin4');" value=" 确 定 " title=" 确 定 "/>&nbsp;&nbsp;&nbsp;<input type="button" onClick="ResetValue(3);return doMenu('swin4');" value=" 取 消 " title=" 取 消 " /></td>
		</tr>
	</table>
</div>
</form>
<div id="swin5"></div>
<iframe id="DivShim" scrolling="no" frameborder="0" style="position:absolute;top:0px; left:0px;display:none"></iframe>
<%
End Sub

Sub show_selectdate(addtime)
    Dim y, m, d, h, mi, s, ttime
    If addtime = "" Then ttime = ServerDate(Now()) Else ttime = addtime
    response.Write ("<select name=selecty id=selecty>")
    For y = 2000 To 2010
        If Year(ttime) = y Then
            response.Write "<option value="&y&" selected>"&y&"年</option>"
        Else
            response.Write "<option value="&y&">"&y&"年</option>"
        End If
    Next
    response.Write "</select><select name=selectm id=selectm >"
    For m = 1 To 12
        If Month(ttime) = m Then
            response.Write "<option value="&m&" selected>"&m&"月</option>"
        Else
            response.Write "<option value="&m&">"&m&"月</option>"
        End If
    Next
    response.Write ("</select><select name=selectd id=selectd >")
    For d = 1 To 31
        If Day(ttime) = d Then
            response.Write "<option value="&d&" selected>"&d&"日</option>"
        Else
            response.Write "<option value="&d&">"&d&"日</option>"
        End If
    Next
    response.Write ("</select><select name=selecth id=selecth>")
    For h = 0 To 23
        If Hour(ttime) = h Then
            response.Write "<option value="&h&" selected>"&h&"时</option>"
        Else
            response.Write "<option value="&h&">"&h&"时</option>"
        End If
    Next
    response.Write ("</select><select name=selectmi id=selectmi>")
    For mi = 0 To 59
        If Minute(ttime) = mi Then
            response.Write "<option value="&mi&" selected>"&mi&"分</option>"
        Else
            response.Write "<option value="&mi&">"&mi&"分</option>"
        End If
    Next
    response.Write ("</select>")
End Sub
sub getteam()
	dim s,i,s1,rs,rs1
	set rs=server.createobject("adodb.recordset")
	rs.open "select oblog_blogteam.mainuserid,[oblog_user].blogname from oblog_blogteam,[oblog_user] where oblog_blogteam.otheruserid="&oblog.l_uid&" and oblog_blogteam.mainuserid=[oblog_user].userid",conn,1,1
	if not rs.eof then
		response.write "<script language=""JavaScript"">"&vbcrlf
		s = "var p_array = new Array(" + cstr(rs.recordcount-1) + ");"&vbcrlf
		response.write s
		s = "var p_array_id = new Array(" + cstr(rs.recordcount-1) + ");"&vbcrlf
		response.write s
		i = 0
		while not rs.eof
			set rs1=server.createobject("adodb.recordset")
			rs1.open "select subjectid,subjectname from oblog_subject where userid="&rs("mainuserid"),conn,1,1
			s = "var p"+cstr(rs("mainuserid"))+"_array = Array("
			s1 = "var p"+cstr(rs("mainuserid"))+"_array_id = Array("
			if rs1.recordcount > 0 then
			while not rs1.eof
				if trim(rs1("subjectname"))<>"" then
					s = s + """" + oblog.filt_html(rs1("subjectname")) + """" 
					s1 = s1 + """" + cstr(rs1("subjectid")) + """"
					s = s + ","
					s1 = s1 + ","
				end if
				rs1.movenext
			wend
			s = s + """" + "不选择专题" + """" 
			s1 = s1 + """" + cstr(0) + """"
			else
				s = s + """" + "无可用专题" + """" 
				s1 = s1 + """" + cstr(0) + """"
			end if
			s = s+ ");"&vbcrlf
			s1 = s1+ ");"&vbcrlf
			response.write s
			response.write s1 
			response.write "p_array["+cstr(i)+"] = p"+cstr(rs("mainuserid"))+"_array;"&vbcrlf
			response.write "p_array_id["+cstr(i)+"] = p"+cstr(rs("mainuserid"))+"_array_id;"&vbcrlf
			i = i + 1
			rs.movenext
		wend
		response.write  "</script>"&vbcrlf
		rs.close
		set rs=nothing
		rs1.close
		set rs1=nothing
	end if
end sub
%>
<%oblog.MakeEditorText "",1,"535","250"%>