<!DOCTYPE html>
<!-- 
'========================================================================================
' 文 件 名: m_default.asp
' 版    本: 岭峰网行业专用留言系统3.10.0 (LFMessS 2020 - 3.10.0.F Build 200604)
' 说    明: 移动端主要显示页面 | 请小心修改为自己的风格
' 文件日期: 2020-06-04
' 设 计 者: 疾风之狼
'========================================================================================
' 郑州文达岭峰网络科技有限公司.
'========================================================================================
' Copyright (C) 2001-2020 岭峰网. All rights reserved.
' 网    站: http://www.lfmesss.com
' 电子邮件: support@lfmesss.com
' 联系ＱＱ: 85112407
'========================================================================================
-->
<%@ language="vbscript" codepage="936" %>
<!-- #include file="../common/contencrypt.asp" -->
<!-- #include file="../common/m_sub_inc.asp" -->
<!-- #include file="../common/connect.asp" -->
<!-- #include file="../common/commfun.asp" -->
<!-- #include file="../common/ip_purview.asp" -->
<!-- #include file="../common/purview_default.asp" -->
<!-- #include file="../common/checkru.asp" -->
<!-- #include file="../common/md5_32.asp" -->
<!-- #include file="../common/del.asp" -->
<%
sql = "DELETE * FROM ok WHERE DateDiff('d',addtime,#" & getDateNow() & "#)>" & LingFengNet_MS_oklist & ""
conn.Execute(sql)
sql = "DELETE * FROM err WHERE DateDiff('d',addtime,#" & getDateNow() & "#)>" & LingFengNet_MS_errlist & ""
conn.Execute(sql)
IF Session("LingFengNet_MS_admin") = "ok" and Request("topid") = "" Then
sql = "SELECT "&sqlkey&" FROM lfmessb ORDER BY topok,addtime Desc"
ElseIF Request("topid") <> "" Then
sql = "SELECT "&sqlkey&" FROM lfmessb WHERE id="&Request("topid")
Else
sql = "SELECT "&sqlkey&" FROM lfmessb WHERE Auditing=2 or Auditing=5 ORDER BY topok,addtime Desc"
End IF
Set rs = Server.CreateObject("ADODB.Recordset")
rs.open sql,conn,1,1
total  = rs.RecordCount
page = Request("page")
IF LingFengNet_MS_noaud = 0 or Session("LingFengNet_MS_admin") = "ok" Then
Set rs1 = Server.CreateObject("ADODB.Recordset")
sql1 = "SELECT id FROM lfmessb WHERE Auditing=0 ORDER BY addtime Desc"
Rs1.open sql1,conn,1,1
totalno = rs1.RecordCount
rs1.close
Set rs1 = Nothing
End IF
Response.Write vbcrlf&"<html>"&vbcrlf&_
"<head>"&vbcrlf&_
"<title>"& LingFengNet_MS_web_name &" -- "& LingFengNet_MS_sys_name &"   - powered by LFMessS</title>"&vbcrlf
Call htmlmeta()
IF LingFengNet_MS_refreshtime <> 0 Then Response.Write "<meta http-equiv='refresh' content='"& LingFengNet_MS_refreshtime &"'>"&vbcrlf
Response.Write "<link rel=""stylesheet"" href=""../style/css/"& LingFengNet_MS_web_css &".css"" type=""text/css"" >"&vbcrlf&_
"<link rel=""stylesheet"" href=""../style/css/m_common.css"" type=""text/css"" >"&vbcrlf&_
"<link rel=""shortcut icon"" href=""../pic/favicon.ico"" type=""image/x-icon"">"&vbcrlf&_
"<link rel=""bookmark"" href=""../pic/favicon.ico"" type=""image/x-icon"">"&vbcrlf&_
"<link rel=""alternate"" type=""application/rss+xml"" title=""RSS"" href=""XML.asp"" >"&vbcrlf&_
"<script>"&vbcrlf&_
"var msg = """&LingFengNet_MS_language_messdef_newsmail_1 & totalno & LingFengNet_MS_language_messdef_newsmail_2&""";"&vbcrlf&_
"var speed = 300; "&vbcrlf&_
"var msgud = "" "" + msg; "&vbcrlf&_
"function titleScroll() { "&vbcrlf&_
"if (msgud.length <msg.length) msgud += "" - "" + msg; "&vbcrlf&_
"msgud = msgud.substring(1, msgud.length); "&vbcrlf&_
"document.title = msgud.substring(0, msg.length);"&vbcrlf&_
"window.setTimeout(""titleScroll()"", speed); "&vbcrlf&_
"} "&vbcrlf&_
"console.log("& LingFengNet_MS_language_All_Info &");"&vbcrlf&_
"</script>"&vbcrlf
IF totalno <> 0 and Session("LingFengNet_MS_admin") = "ok" Then newsmail = " onload=""window.setTimeout('titleScroll()', 500)"""
Response.Write "</head>"&vbcrlf&_
"<body onkeydown=""EnableKey()"" "&newsmail&">"&vbcrlf
Call htmlmain()
Response.Write "</div></div>"&vbcrlf
Call htmlcop()
Response.Write "</body>"&vbcrlf&_
"</html>"
rs.close
conn.close
Set rs = Nothing
Set conn = Nothing
Call htmlend() ' 底部区域
Call htmlbr()
Call htmlcebianlan()
Call htmlzheZhao()
Call htmlpasswordceng()
Call htmlcontentceng()
%>
<script src="../common/jquery-3.2.1.min.js" ></script>
<script>
//根据密码查询
function wdlf_search_by_password(id){
	$('#wdlf_search_by_password').show();
	$('#wdlf_search_bg').show();
}

//根据输入的内容来查询
function wdlf_search_by_content(){
	$('#wdlf_search_by_content').show();
	$('#wdlf_search_bg').show();
}

window.onload = function(){
	
	//留言区只有一条留言时 解决背景不能完全遮罩的问题
	if( $('.wdlf_commonBody').outerHeight() < $(window).height() ){
		$('.wdlf_commonBody').css('height', '100%')
	}
	
	//点击取消
	$('.wdlf_liuYan_cancel_btn').click(function(){
		$(this).parent().parent().parent().parent().hide();
		$('#wdlf_search_bg').hide();
	})
	
	//点击提交
	$('.wdlf_liuYan_tiJiao_btn').click(function(){
		var wdlf_id = $(this).parent().parent().parent().parent().attr('id');
		if(wdlf_id == 'wdlf_search_by_password'){
			if($('#'+wdlf_id).find("input[name='keyword']").val() == ''){
				alert("<%= LingFengNet_MS_language_mobile_9 %>");
				return false;
			}
			$("form[name='messpass']").submit();
		}
		if(wdlf_id == 'wdlf_search_by_content'){
			if($('#'+wdlf_id).find("input[name='keyword']").val() == ''){
				alert("<%= LingFengNet_MS_language_mobile_10 %>");
				return false;
			}
			$("form[name='form1']").submit();
		}
	})
	
	//控制logo大小
//			$('.wdlf_commonHead').css('height', $('.wdlf_commonHead .wdlf_commonHead_right img').css('height'))
	
	//查看管理员回复
	$('.wdlf_common_content_left').click(function(){
		var wdlf_content = $(this).parent();
		wdlf_content.find('.wdlf_common_content_admin_date').toggle(400);
		wdlf_content.find('.wdlf_common_content_admin_huiFu').toggle(400, function(){
			var wdlf_content_huiFu = wdlf_content.find('.wdlf_common_content_left').html();
			if(wdlf_content_huiFu.trim() == "<%= LingFengNet_MS_language_mobile_5 %>"){
				wdlf_content.find('.wdlf_common_content_left').html("<%= LingFengNet_MS_language_mobile_8 %>");
			}else{
				wdlf_content.find('.wdlf_common_content_left').html("<%= LingFengNet_MS_language_mobile_5 %>");	
			}
		});
	})
	//点击查看更多
	var wdlf_contentDetail_realHeight = [];
	var wdlf_contentDetail_limitHeight = 59;//四行就隐藏
	var wdlf_content_detail = $('.wdlf_common_content_centerRight_detail');
	for(var i = 0; i< wdlf_content_detail.length; i++){
		wdlf_contentDetail_realHeight[i] = wdlf_content_detail.eq(i).outerHeight();
		
		if(wdlf_contentDetail_realHeight[i] > wdlf_contentDetail_limitHeight){
			wdlf_content_detail.eq(i).addClass('wdlf_plus_shengLue_3');
			wdlf_content_detail.eq(i).after('<div class="wdlf_common_content_centerRight_readMore" ><%= LingFengNet_MS_language_mobile_7 %></div>');
		}else{
			wdlf_content_detail.eq(i).addClass('wdlf_plus_shengLue_4');
		}
	}
	
	$('.wdlf_common_content_centerRight_readMore').click(function(){
		var n = $('.wdlf_common_content_centerRight_detail').index($(this).prev())
		var wdlf_currentHeight = $(this).prev().outerHeight();
		if(wdlf_currentHeight < wdlf_contentDetail_limitHeight){
			// wdlf_common_content_center 最大的div长度变长
			$(this).parent().parent().animate({
				height: wdlf_contentDetail_realHeight[n]+50 
			}, "normal");
			
			// wdlf_common_content_centerLeft 左边
			$(this).parent().parent().find('.wdlf_common_content_centerLeft').animate({
				height: wdlf_contentDetail_realHeight[n]+50 
			}, "normal");
			
			// wdlf_common_content_centerRight 右边
			$(this).parent().parent().find('.wdlf_common_content_centerRight').animate({
				height: wdlf_contentDetail_realHeight[n]+50 
			}, "normal");
			// 具体内容
			$(this).parent().parent().find('.wdlf_common_content_centerRight_detail').animate({
				height: wdlf_contentDetail_realHeight[n] 
			}, "normal");
			
			$(this).parent().parent().find('.wdlf_common_content_centerRight_readMore').html("<%= LingFengNet_MS_language_mobile_8 %>");
			$(this).parent().find('.wdlf_common_content_centerRight_detail').removeClass('wdlf_plus_shengLue_3');

		}else if(wdlf_currentHeight > wdlf_contentDetail_limitHeight){
			//隐藏
			$(this).parent().parent().animate({
				height: wdlf_contentDetail_limitHeight
			}, "normal");
			
			// wdlf_common_content_centerLeft 左边
			$(this).parent().parent().find('.wdlf_common_content_centerLeft').animate({
				height: wdlf_contentDetail_limitHeight
			}, "normal");
			
			// wdlf_common_content_centerRight 右边
			$(this).parent().parent().find('.wdlf_common_content_centerRight').animate({
				height: wdlf_contentDetail_limitHeight
			}, "normal");
			// 具体内容，需限定死
			$(this).parent().parent().find('.wdlf_common_content_centerRight_detail').animate({
				height: 22
			}, "normal");
			$(this).parent().parent().find('.wdlf_common_content_centerRight_readMore').html("<%= LingFengNet_MS_language_mobile_7 %>");
			$(this).parent().find('.wdlf_common_content_centerRight_detail').addClass('wdlf_plus_shengLue_3');
			
		}
	})
}
</script>