<!DOCTYPE html>
<%@ language="vbscript" codepage="936" %>
<!-- #include file="../common/checkru.asp" -->
<%
'========================================================================================
' 文 件 名: m_addnew.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
'========================================================================================
Randomize Timer
s = 1 + int(rnd * 10000)
man = "add"
%>
<!-- #include file="../common/m_sub_inc.asp" -->
<!-- #include file="../common/commfun.asp" -->
<!-- #include file="../common/ip_purview.asp" -->
<%
IF LingFengNet_MS_add_news_3 = 1 Then
	Response.Write "<meta http-equiv=Content-Type content=text/html;charset="& LingFengNet_MS_language_meta_mes_1 &"><script>alert('"& LingFengNet_MS_language_save_mes_51 &"');window.close();</script>"
	Response.end
End IF

IF Application("LingFengNet_MS_save_Load") + 1 > 10 Then
	Response.Write "<meta http-equiv=Content-Type content=text/html;charset="& LingFengNet_MS_language_meta_mes_1 &"><script>alert('"& LingFengNet_MS_language_save_mes_43 &""& LingFengNet_MS_language_save_mes_44 &"');</script>"
End IF
%>
<head>
<title><%= LingFengNet_MS_language_title_addnew %> - powered by LFMessS</title>
<%  
  Call htmlmeta() 
%>
<link rel="stylesheet" href="../style/css/<%= LingFengNet_MS_web_css %>.css" type="text/css">
<link rel="stylesheet" href="../style/css/m_common.css" type="text/css">
<link rel="shortcut icon" href="../pic/favicon.ico" type="image/x-icon">
<link rel="bookmark" href="../pic/favicon.ico" type="image/x-icon">
</head>
<body style="height: auto;" >
<%
Call htmltop()
%>
<!--openjs-->
<script>
var chkn
function validate(){
	chkn = 1;
	check_username();
	if (chkn == 1) check_post();
	<% IF LingFengNet_MS_mymail <> 1 Then %>
		if (chkn == 1) check_email();
	<% End IF %>
		check_tel();
	<% IF LingFengNet_MS_messreg <> 0 Then %>
		if (chkn == 1) check_reg();
	<% End IF %>
	if (chkn == 1) check_content();
	if (chkn == 0) {
		return false;
	}
	check_button(); 
}

function check_button() {
	document.getElementById("con_submit").innerHTML = "<input type=\"submit\" name=\"Submit\" value=\"<%= LingFengNet_MS_language_addnew_submit %>\" class=\"buttonface\" disabled>&ensp;&ensp;&ensp;&ensp;<input type=\"reset\" name=\"Submit\" value=\"<%= LingFengNet_MS_language_addnew_reset %>\" class=\"buttonface\" disabled>"; 
}

function check_username(){
	var username = form.username.value;
	var messname = "<%= LingFengNet_MS_language_save_mes_28 %>‘"+ username +"’"	;
	if (username == ""){
		strmsg_username = "<%= LingFengNet_MS_language_save_mes_36 %>";
		chkn = 0;
		changePrompt("con_name", strmsg_username);
		return false;
	}		
	if (username != ""){
	<% IF LingFengNet_MS_messchina = 0 Then %>	
		if ( /[^\u4E00-\u9FA5]/g.test(username) ){
			strmsg_username = messname + "<%= LingFengNet_MS_language_save_mes_32 %>";
			chkn = 0;
			changePrompt("con_name", strmsg_username);
			return false;
		}		
		if(! /^.{2,4}$/g.test( username ) )	{
			strmsg_username=messname + "<%= LingFengNet_MS_language_save_mes_30 %>"
			chkn = 0
			changePrompt("con_name", strmsg_username)
			return false;
		}				
	<% ElseIF LingFengNet_MS_messchina = 1 Then %>
		if(! /^([a-z]|[A-Z])[\w.]{0,16}$/g.test( username ) ){
			strmsg_username = messname + "<%= LingFengNet_MS_language_save_mes_31_1 %>";
			chkn = 0;
			changePrompt("con_name", strmsg_username);
			return false;
		}				
		if(! /^.{3,16}$/g.test( username ) ){
			strmsg_username = messname + "<%= LingFengNet_MS_language_save_mes_31 %>";
			chkn = 0;
			changePrompt("con_name", strmsg_username);
			return false;
		}	
		<% ElseIF LingFengNet_MS_messchina = 2 Then %>		
		if(! /^.{2,16}$/g.test( username ) ){
			strmsg_username = messname + "<%= LingFengNet_MS_language_save_mes_31 %>";
			chkn = 0;
			changePrompt("con_name", strmsg_username);
			return false;
		}			
	<% End IF %>		
		if( /^\d.*$/g.test( username ) ){
			strmsg_username = messname + "<%= LingFengNet_MS_language_save_mes_29 %>";
			chkn = 0;
			changePrompt("con_name", strmsg_username);
			return false;
		}	
	}		
}

function check_content(){	
	var content = form.contenttex.value;	
	var maxword = <%= LingFengNet_MS_maxword %>;
	if (content == ""){
		strmsg_content = "<%= LingFengNet_MS_language_save_mes_39 %>";
		chkn = 0;			
		changePrompt("con_content", strmsg_content);
		return false;
	}
		
	if (content != ""){
		if ( content.length > maxword ){
			strmsg_content = "<%= LingFengNet_MS_language_save_mes_46 & LingFengNet_MS_language_save_mes_49 %>"+"<span style=color:red>"+ maxword +"</span>"+"<%= LingFengNet_MS_language_save_mes_48 & LingFengNet_MS_language_save_mes_47 %>"+"<span style=color:red>"+ content.length +"</span>"+"<%= LingFengNet_MS_language_save_mes_48 %>";
			chkn = 0;
			changePrompt("con_content", strmsg_content);
			return false;
		}
	}
}

function check_post(){	
	var post = form.post.value;	
	if (post == "" || post == null){
		strmsg_post = "<%= LingFengNet_MS_language_save_mes_37 %>";
		chkn = 0;
		changePrompt("con_post", strmsg_post);
		return false;
	}
}

function check_tel(){	
	var tel = form.tel.value;	
	if (tel != ""){
		if(! /^[0-9]{7,13}$/g.test( tel ) )	{
			strmsg_tel = "<%= LingFengNet_MS_language_save_mes_41 %>";
			chkn = 0;
			changePrompt("con_tel", strmsg_tel);
			return false;
		}
	}
}

function check_email(){	
	var email = form.email.value;	
	if (email != ""){
		if(!/^[\w-]+(\.[\w-]+)*@[\w-]+(\.[\w-]+)+$/g.test( email ) ){
			strmsg_email = "<%= LingFengNet_MS_language_save_mes_40 %>";
			chkn = 0;
			changePrompt("con_email", strmsg_email);
			return false;
		}
	}		
}

function check_reg(){	
	var reg = form.reg.value;	
	if (reg == ""){
		strmsg_reg = "<%= LingFengNet_MS_language_save_mes_38 %>";
		chkn = 0;
		changePrompt("con_reg",strmsg_reg);
		return false;
	} else {
	<%IF LingFengNet_MS_messreg = 2 Then%>
		if(! /^[0-9]{4,5}$/g.test( reg ) ){
			strmsg_reg="<%= LingFengNet_MS_language_save_mes_52 %>";
			chkn = 0;
			changePrompt("con_reg", strmsg_reg);
			return false;
		}
	<%End IF%>	
	<%IF LingFengNet_MS_messreg = 3 Then%>
		if(! /^[0-9]{1,3}$/g.test( reg ) ){
			strmsg_reg = "<%= LingFengNet_MS_language_save_mes_53 %>";
			chkn = 0;
			changePrompt("con_reg", strmsg_reg);
			return false;
		}
	<%End IF%>		
	}
}	

function showcon(theform){
	message = theform.value.length
	document.getElementById("showcon").innerHTML = message;
}

function set_Size(num, objname){
	var obj = document.getElementById(objname)
	if (parseInt(obj.rows) + num >= 3){
		obj.rows = parseInt(obj.rows) + num;	
	}
	if (num > 0) {
		obj.width = "90%";
	}
}

function newverifypic(urlname){
	var timenow = new Date().getTime();
	var urlname = urlname;
	if (urlname == "math") {
		url = "showcode_math<%= Get_Suffix() %>";
	}
	if (urlname == "random") {
		url = "showcode_random<%= Get_Suffix() %>?typeid=<%=LingFengNet_MS_messreg_tx%>";
	}	
	id = url.indexOf('?');
	if(id >= 0 ){
		if(id == (url.length-1))
			url = url + "t=" + timenow;
		else 
			url = url + "&t=" + timenow;
	} else {
		url = url + "?t=" + timenow;
	}
	document.getElementById("verifypic").src = url;
}

console.log(<%= LingFengNet_MS_language_All_Info %>);

function changePrompt(divid,message){
	message = message.replace(/&.+;/g, "");
	alert(message.replace(/<(?:.|\s)*?>/g, ""));	
}
</script>

	<form  name="form" method="post" action="m_admin_save<%= Get_Suffix() %>" onSubmit="javascript:return validate()" style="height: 100%;">
		<div class="wdlf_liuYan_detail bgc">
			<div class="wdlf_liuYan_detail_tips">
				<div class="wdlf_liuYan_detail_tipsLeft">
					<%= LingFengNet_MS_language_addnew_times_1 %>
					<span>
						<% if LingFengNet_MS_messdoorday=0 Then %><%= LingFengNet_MS_messdoorday_times %>&ensp;<%= LingFengNet_MS_language_addnew_times_2 %><% Else %><%= LingFengNet_MS_language_addnew_times_5 %><% End IF %>
					</span>
				</div>
			</div> 
			<div class="wdlf_liuYan_detail_tips">
				<div class="wdlf_liuYan_detail_tipsLeft">
					<%= LingFengNet_MS_language_addnew_times_3 %>
					<span>
						<% if LingFengNet_MS_messdoor=0 Then %><%= LingFengNet_MS_messdoortimes %>&ensp;<%= LingFengNet_MS_language_addnew_times_4 %><% Else %><%= LingFengNet_MS_language_addnew_times_5 %><% End IF %>
					</span>
				</div>
			</div> 
			<!--留言类型-->
			<%if LingFengNet_MS_messlx = 0 Then%>
			<div class="wdlf_liuYan_detail_item">
				<div class="wdlf_liuYan_detail_content">
					<%= LingFengNet_MS_language_addnew_lylx_0 %>
				</div>
				<div class="wdlf_liuYan_select">
					<select name="lylx">
						<%CreateSelect LingFengNet_MS_messlx_nr, "yes"%>
					</select>
				</div>
			</div>
			<%End IF%>
			<!--姓名-->
			<div class="wdlf_liuYan_detail_item" id="wdlf_senderName">
				<div class="wdlf_liuYan_detail_content">
					<span style="color: #FF0000;position: relative;right: 5px;">*</span><%= LingFengNet_MS_language_addnew_username %>
				</div>
				<div class="wdlf_liuYan_input">
					<input type="text" name="username" maxlength="25" size="25" >
				</div>
			</div>
			<!--个人标示-->
			<%IF LingFengNet_MS_web_bs = 0 Then%>
			<div class="wdlf_liuYan_detail_item">
				<div class="wdlf_liuYan_detail_content">
					&ensp;<%= LingFengNet_MS_language_addnew_username_photo %>
				</div>
				<div class="wdlf_liuYan_select">
					<select name=face size=1 onChange="document.images['face'].src='face/' + options[selectedIndex].value;" >
		                <%IF LingFengNet_MS_web_bs_lx = 0 Then%>
		                <% For i = 1 to 104 %>
		                <option value="Business/LFW_mess_pho_b_<%=i%>.jpg"><%= LingFengNet_MS_language_addnew_username_photo_ %><%= i %> </option>
		                <%Next%>
		                <%End IF%>
		                <%IF LingFengNet_MS_web_bs_lx = 1 Then%>
		                <% For i = 1 to 30 %>
		                <option value="Individual/LFW_mess_pho_i_<%=i%>.jpg"><%= LingFengNet_MS_language_addnew_username_photo_4 %><%= i %> </option>
		                <%Next%>
		                <%End IF%>
		            </select>
		            <%IF LingFengNet_MS_web_bs_lx = 0 Then%>
		            
		              <img src="face/Business/LFW_mess_pho_b_1.jpg" alt=<%= LingFengNet_MS_language_addnew_username_photo_3 %> style="display: inline-block; margin-left: 20px;width: 30px;height: 30px; margin-bottom: -9px;" id=face> 
		              <%End IF%>
		              <%IF LingFengNet_MS_web_bs_lx = 1 Then%>
		              <img src="face/Individual/LFW_mess_pho_i_1.jpg" alt=<%= LingFengNet_MS_language_addnew_username_photo_3 %> style="display: inline-block; margin-left: 20px;width: 30px;height: 30px; margin-bottom: -9px;"  id=face> 
		            <%End IF%> 
				</div>
			</div>
			<%End IF%>
			<!--联系地址-->
			<div class="wdlf_liuYan_detail_item" id="wdlf_senderPhone">
				<div class="wdlf_liuYan_detail_content">
					<span style="color: #FF0000;position: relative;right: 5px;">*</span><%= LingFengNet_MS_language_addnew_post %>
				</div>
				<div class="wdlf_liuYan_input">
					<input type="text" name="post" size="25" maxlength="99"  >
				</div>
			</div>
			<!--电话-->
			<div class="wdlf_liuYan_detail_item" id="wdlf_senderPhone">
				<div class="wdlf_liuYan_detail_content">
					&ensp;<%= LingFengNet_MS_language_addnew_tel %>
				</div>
				<div class="wdlf_liuYan_input">
					<input type="text" name="tel" size="25" maxlength="25"  >
				</div>
			</div>
			<!--电子邮件-->
			<%IF LingFengNet_MS_mymail <> 1 Then%>
			<div class="wdlf_liuYan_detail_item" id="wdlf_senderPhone">
				<div class="wdlf_liuYan_detail_content">
					&ensp;<%= LingFengNet_MS_language_addnew_email %>
				</div>
				<div class="wdlf_liuYan_input">
					<input type="text" name="email" size="25" maxlength="99" >
				</div>
			</div>
			<%End IF%>
			<!--即时通讯-->
			<%IF LingFengNet_MS_myqq <> 1 Then%>
			<div class="wdlf_liuYan_detail_item">
				<div class="wdlf_liuYan_detail_content">
					&ensp;<%= LingFengNet_MS_language_addnew_mess %>
				</div>
				<div class="wdlf_liuYan_select" style="width: 70%;">
					<select name="mes_s" style="width: 40%;float: left;margin-top: 7px;">
						<option value="qq"><%= LingFengNet_MS_language_addnew_mess_mes_3 %></option>
						<option value="weixin"><%= LingFengNet_MS_language_addnew_mess_mes_4 %></option>
						<option value="wangwang"><%= LingFengNet_MS_language_addnew_mess_mes_5 %></option>
						<option value="yixin"><%= LingFengNet_MS_language_addnew_mess_mes_6 %></option>
						<option value="dingding"><%= LingFengNet_MS_language_addnew_mess_mes_7 %></option>
						<option value="no"><%= LingFengNet_MS_language_addnew_mess_mes_8 %></option>
					</select>
					<input type="text" name="mess" size="25" maxlength="99" class="input" style="width: 46%;float: left; margin-left: 10px;margin-top: 7px;">
				</div>
			</div>
			<%End IF%>
			<!--留言内容-->
			<%IF LingFengNet_MS_ss = 0 Then%>
			<div class="wdlf_liuYan_detail_item">
				<div class="wdlf_liuYan_detail_content">
					<%= LingFengNet_MS_language_addnew_att_0 %>
				</div>
				<div class="wdlf_liuYan_input">
					<div class="wdlf_liuYan_checkBox">
						<input name="ys" type="checkbox" id="ys" value="ys">
					</div>
					<div class="wdlf_liuYan_yinSi_tip"><%= LingFengNet_MS_language_addnew_att_mes_2 %></div>
				</div>
			</div>
			 <%End IF%>
			<%IF LingFengNet_MS_add_upload_1 = 0 Then%>
			<iframe src="m_uploadhtm<%= Get_Suffix() %>" width="100%" height="40px"  frameborder="no" border="0"></iframe>
			<%End IF%>
			<div class="wdlf_liuYan_detail_item"  id="wdlf_senderContent" style="height: 131px;">
				<div class="wdlf_liuYan_detail_content">
					<span style="color: #FF0000;position: relative;right: 5px;">*</span><%= LingFengNet_MS_language_addnew_content %>
				</div>
				<div class="wdlf_liuYan_input">
					 <textarea name="contenttex"  rows="6"  id="contenttex"></textarea>
				</div>
			</div>
			<!--验证码-->
			 <%IF LingFengNet_MS_messreg <> 0 Then%>
			<div class="wdlf_liuYan_detail_item" style="height: 100px;" id="wdlf_yanzhengma">
				<div class="wdlf_liuYan_detail_content">
					<span style="color: #FF0000;position: relative;right: 5px;">*</span><%= LingFengNet_MS_language_addnew_att %>
				</div>
				<div class="wdlf_liuYan_input">
					<input type="text" style="width: 47%;" name="reg" size="25" maxlength="25"  >
					<%IF LingFengNet_MS_messreg = 1 Then%>
                      &ensp;<font face="Arial, Helvetica, sans-serif"><b><%= s %></b></span>
                      <input name=reg1 type=hidden id="reg1" value="<%= s %>">
                      <%End IF%>
					<%IF LingFengNet_MS_messreg = 2 Then%>
              <img id="verifypic" src="showcode_random<%= Get_Suffix() %>?typeid=<%= LingFengNet_MS_messreg_tx %>" border="1" align="absmiddle" onClick="newverifypic('random')">&ensp;<br><%= LingFengNet_MS_language_messdef_login_right %>
           			<%End IF%>
					
					 <%IF LingFengNet_MS_messreg = 3 Then%>
					<img id="verifypic" style="width: 40%;height: 25px" src="showcode_math<%= Get_Suffix() %>" border="1" align="absmiddle" onClick="newverifypic('math')">&ensp;<br><%= LingFengNet_MS_language_messdef_login_right %>
					<%End IF%>
				</div>
			</div>
			<%End IF%>
			<div class="wdlf_liuYan_tiJiao">
				<input type="submit" name="Submit" value="<%= LingFengNet_MS_language_addnew_submit %>" class="wdlf_liuYan_tiJiao_btn buttonface">
				<input type="reset" name="Submit" value="<%= LingFengNet_MS_language_addnew_reset %>" class="wdlf_liuYan_tiJiao_btn buttonface">
			</div>
		</div>
	</form>
</div>
<!--endjs-->
</body>
</html>
<%
Call html_liuyanend()
%>
<script src="../common/jquery-3.2.1.min.js"></script>
<script>
window.onload = function(){
	//控制logo大小
	$('.wdlf_commonHead').css('height', $('.wdlf_commonHead .wdlf_commonHead_right img').css('height'));	
}
</script>