<!DOCTYPE html>
<%@ language="vbscript" codepage="936" %>
<!-- #include file="../common/checkru.asp" -->
<%
'========================================================================================
' 文 件 名: 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/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="shortcut icon" href="../pic/favicon.ico" type="image/x-icon">
<link rel="bookmark" href="../pic/favicon.ico" type="image/x-icon">
<script>
var system = { 
win: false, 
mac: false, 
xll: false, 
ipad: false 
}; 
window.console = window.console || (function () {
    var c ={}; 
　　c.log = c.warn = c.debug = c.info = c.error = c.time = c.dir = c.profile= c.clear = c.exception = c.trace = c.assert = function(){};
    return c;
})();
var p = navigator.platform; 
var hrefstr = location.href; //获取到整个地址
hrefstr = hrefstr.substr(-1);
system.win = p.indexOf("Win") == 0; 
system.mac = p.indexOf("Mac") == 0; 
system.x11 = (p == "X11") || (p.indexOf("Linux") == 0); 
system.ipad = (navigator.userAgent.match(/iPad/i) != null) ? true : false;
if (system.win || system.mac || system.xll||system.ipad) { 
} else { 
window.location.href = "m_addnew<%= Get_Suffix() %>";
}
</script>
</head>
<body onkeydown="EnableKey()">
<%
Call htmltop()
Call htmlbr()
IF LingFengNet_MS_messadmin = 0 Then
Call htmltopg()
Call htmlbr()
End IF
%>
<!--openjs-->
<script>
function validate(){
	chkn = 1;
	check_username();
	check_post();
	<% IF LingFengNet_MS_mymail <> 1 Then %>check_email();<% End IF %>
	check_tel()			
	<% IF LingFengNet_MS_messreg <> 0 Then %>check_reg();<% End IF %>
	check_explorer();
	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;
	}		
	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;
		}		
		if(! /^.{2,4}$/g.test( username ) )	{
			strmsg_username = messname + "<%= LingFengNet_MS_language_save_mes_30 %>";
			chkn = 0;
			changePrompt("con_name", strmsg_username);
			return;
		}				
	<% 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;
		}				
		if(! /^.{3,16}$/g.test( username ) ){
			strmsg_username = messname + "<%= LingFengNet_MS_language_save_mes_31 %>";
			chkn = 0;
			changePrompt("con_name", strmsg_username);
			return;
		}	
		<%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;
		}			
	<% End IF %>		
		if( /^\d.*$/g.test( username ) ){
			strmsg_username = messname + "<%= LingFengNet_MS_language_save_mes_29 %>";
			chkn = 0;
			changePrompt("con_name", strmsg_username);
			return;
		}
		document.getElementById("con_name").innerHTML = "<%= LingFengNet_MS_language_save_mes_34 %>";			
	}		
}

function check_explorer(){
	var cont = document.getElementById("s"+"h"+"owc"+"op").innerHTML;
	contlength = cont.length;
	console.log(contlength);
	if (contlength == unescape("%u0036%u0033%u0031")||contlength == unescape("%u0035%u0039%u0033")||contlength == unescape("%u0036%u0033%u0036")||contlength == unescape("%u0035%u0039%u0038")) {
	} else {
		strmsg_show = "%u672C%u5957%u7559%u8A00";
		strmsg_show = strmsg_show + "%u7CFB%u7EDF%u4F7F%u7528%u8FDD%u53CD%u57FA%u672C";
		strmsg_show = strmsg_show + "%u6388%u6743%u534F%u8BAE%uFF0C%u7A0B%u5E8F";
		strmsg_show = strmsg_show + "%u7EC8%u6B62%u8FD0%u884C%u3002";
		strmsg_show = unescape(strmsg_show);
		chkn=0;
		changePrompt("show", strmsg_show);
		check_button();
	}
}

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;
	}
		
	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;
		}
	}
	document.getElementById("con_content").innerHTML = "<%= LingFengNet_MS_language_save_mes_34 %>";		
}

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;
	}
	document.getElementById("con_post").innerHTML = "<%= LingFengNet_MS_language_save_mes_34 %>";			
}

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;
		}
		document.getElementById("con_tel").innerHTML = "<%= LingFengNet_MS_language_save_mes_34 %>";	
	} else {
		document.getElementById("con_tel").style.display = "none";	
	}	
}

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;
		}else{
			document.getElementById("con_email").innerHTML = "<%= LingFengNet_MS_language_save_mes_34 %>";
			return;
		}
	}	
	document.getElementById("con_email").style.display = "none";		
}

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;
	} 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;
		}
	<%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;
		}
	<%End IF%>		
	}			
	document.getElementById("con_reg").innerHTML = "<%= LingFengNet_MS_language_save_mes_34 %>";			
}	

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){
	document.getElementById(divid).style.display = "block";
	document.getElementById(divid).innerHTML = message;
}
</script>
<table width="<%= LingFengNet_MS_web_w %>" border="0" cellspacing="0" cellpadding="0" align="center">
  <tr>
    <td class="bgc2"><table width="100%" border="0" cellspacing="1" cellpadding="3" class="nofix" >
        <tr class="bgc">
          <td width="23%" height="45" align="center"><%= LingFengNet_MS_language_addnew_times_1 %></td>
          <td width="27%" height="45" align="center"><% 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 %></td>
          <td width="23%" height="45" align="center"><%= LingFengNet_MS_language_addnew_times_3 %></td>
          <td width="27%" height="45" align="center"><% 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 %></td>
        </tr>
    </table></td>
  </tr>
</table>
<table width="<%= LingFengNet_MS_web_w %>" border="0" cellspacing="0" cellpadding="0" align="center">
  <tr>
    <td class="bgc2"><table width="100%" border="0" cellspacing="1" cellpadding="3" class=nofix >
        <form name="form" method="post" action="admin_save.asp" onSubmit="javascript:return validate()">
          <%IF LingFengNet_MS_messlx = 0 Then%>
          <tr class="bgc">
            <td width="23%" height="45" align="center"><%= LingFengNet_MS_language_addnew_lylx_0 %></td>
            <td height="45" colspan="2" align="left"><select name="lylx"><%CreateSelect LingFengNet_MS_messlx_nr,"yes"%></select>
            <%= LingFengNet_MS_language_addnew_lylx_1 %></td>
          </tr>
          <%End IF%>
          <tr class="bgc">
            <td width="23%" height="45" align="center"><span style="color:#FF0000">*</span>&ensp;<%= LingFengNet_MS_language_addnew_username %></td>
            <td height="45" colspan="2" align="left"><input type="text" name="username" maxlength="25" size="25" class="input" onKeyDown="check_username();" onKeyUp="check_username();" onBlur="check_username();">
              <%
				IF LingFengNet_MS_messchina = 0 Then
					Response.Write LingFengNet_MS_language_addnew_username_mes_1
					IF LingFengNet_MS_ss = 0 Then
						Response.Write LingFengNet_MS_language_addnew_username_mes_2
					Else
						Response.Write LingFengNet_MS_language_addnew_username_mes_3
					End IF
				End IF
			  %>
            <!--<input name="chkuser"  type="button" onClick="checkUsername();" class="bt"  value="<%= LingFengNet_MS_language_save_mes_42 %>">--><div id="con_name"></div></td>
          </tr>
          <%IF LingFengNet_MS_web_bs = 0 Then%>
          <tr class="bgc">
            <td width="23%" height="45" align="center"><%= LingFengNet_MS_language_addnew_username_photo %></td>
            <td height="45" colspan="2" align="left"><select name="face" size="1" onChange="document.images['face'].src='../face/' + options[selectedIndex].value;" style="background-color: #ffffff; border-bottom: #000 1px solid; border-left: #000 1px solid; border-right: #000 1px solid; border-top: #000 1px solid; color: black;display: table-cell;vertical-align: middle;" >
                <%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 %> width="40" height="40" id="face" style="vertical-align: middle;"> <%= LingFengNet_MS_language_addnew_username_photo_1 %>
              <%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 %> width="40" height="40" id="face" style="vertical-align: middle;"> <%= LingFengNet_MS_language_addnew_username_photo_2 %>
            <%End IF%>            </td>
          </tr>
          <%End IF%>
          <tr class="bgc">
            <td width="23%" height="45" align="center"><span style="color:#FF0000">*&ensp;</span><%= LingFengNet_MS_language_addnew_post %></td>
            <td height="45" colspan="2" align="left"><input type="text" name="post" size="25" maxlength="99" class="input" onKeyDown="check_post();" onKeyUp="check_post();" onBlur="check_post();">
            <%= LingFengNet_MS_language_addnew_post_mes %><div id="con_post"></div></td>
          </tr>
          <tr class="bgc">
            <td width="23%" height="45" align="center">&ensp;<%= LingFengNet_MS_language_addnew_tel %></td>
            <td height="45" colspan="2" align="left" class="bgc"><input type="text" name="tel" size="25" maxlength="25" class="input" onKeyDown="check_tel();" onKeyUp="check_tel();" onBlur="check_tel();">
              <%= LingFengNet_MS_language_addnew_tel_mes_1 %>
            <div id="con_tel"></div></td>
          </tr>
          <%IF LingFengNet_MS_mymail <> 1 Then%>
          <tr class="bgc">
            <td width="23%" height="45" align="center">&ensp;<%= LingFengNet_MS_language_addnew_email %></td>
            <td height="45" colspan="2" align="left" class="bgc"><input type="text" name="email" size="25" maxlength="99" class="input" onKeyDown="check_email();" onKeyUp="check_email();" onBlur="check_email();"><div id="con_email"></div>            </td>
          </tr>
          <%End IF%>
          <%IF LingFengNet_MS_myqq <> 1 Then%>
          <tr class="bgc">
            <td width="23%" height="45" align="center">&ensp;<%= LingFengNet_MS_language_addnew_mess %></td>
            <td height="45" colspan="2" align="center"><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td width="10%" height="30" align="center"><%= LingFengNet_MS_language_addnew_mess_mes_1 %></td>
                <td width="75%" height="30">&ensp;
                  <label><input type="radio" name="mes_s" value="qq">
                  <%= LingFengNet_MS_language_addnew_mess_mes_3 %></label>
                  <label><input type="radio" name="mes_s" value="weixin">
                  <%= LingFengNet_MS_language_addnew_mess_mes_4 %></label>
                  <label><input type="radio" name="mes_s" value="wangwang">
                  <%= LingFengNet_MS_language_addnew_mess_mes_5 %></label>
                  <label><input type="radio" name="mes_s" value="yixin">
                  <%= LingFengNet_MS_language_addnew_mess_mes_6 %></label>
                  <label><input type="radio" name="mes_s" value="dingding">
                  <%= LingFengNet_MS_language_addnew_mess_mes_7 %></label>
                  <label><input type="radio" name="mes_s" value="no" checked>
                  <%= LingFengNet_MS_language_addnew_mess_mes_8 %></label></td>
              </tr>
              <tr>
                <td width="10%" height="30" align="center"><%= LingFengNet_MS_language_addnew_mess_mes_2 %></td>
                <td width="75%" height="30">&ensp;
                  <input type="text" name="mess" size="25" maxlength="99" class="input"></td>
              </tr>
            </table></td>
          </tr>          
          <%End IF%>
          <%IF LingFengNet_MS_messreg <> 0 Then%>
          <tr class="bgc">
            <td width="23%" height="45" align="center"><span style="color:#FF0000">*&ensp;</span><%= LingFengNet_MS_language_addnew_att %></td>
            <td height="45" colspan="2" align="left"><input type="text" name="reg" size="25" maxlength="25" class="input" onKeyDown="check_reg();" onKeyUp="check_reg();" onBlur="check_reg();">
              <%= LingFengNet_MS_language_addnew_att_mes_1 %>
              <%IF LingFengNet_MS_messreg = 1 Then%>
              &ensp;<span class="eng_font"><b><%= s %></b></span>
              <input name=reg1 type=hidden id="reg1" value="<%= s %>">
              <%End IF%>
              <%IF LingFengNet_MS_messreg = 2 Then%>
              &ensp;
              <img id="verifypic" src="showcode_random.asp?typeid=<%=LingFengNet_MS_messreg_tx%>" border="1" align="absmiddle" onClick="newverifypic('random')">&ensp;<%= LingFengNet_MS_language_messdef_login_right %>
            <%End IF%>
			<%IF LingFengNet_MS_messreg = 3 Then%>
              &ensp;
              <img src="showcode_math<%= Get_Suffix() %>" width="88" height="14" id="verifypic" onClick="newverifypic('math')" border="1" align="absmiddle">&ensp;<%= LingFengNet_MS_language_messdef_login_right %>
            <%End IF%><div id="con_reg"></div>            </td>
          </tr>
          <%End IF%>
          <%IF LingFengNet_MS_ss = 0 Then%>
          <tr class="bgc">
            <td width="23%" height="45" align="center"><%= LingFengNet_MS_language_addnew_att_0 %></td>
            <td height="45" colspan="2" align="left"><label><input name="ys" type="checkbox" id="ys" value="ys"><%= LingFengNet_MS_language_addnew_att_mes_2 %>&ensp;<%= LingFengNet_MS_language_addnew_att_1 %></label></td>
          </tr>
          <%End IF%>
          <%IF LingFengNet_MS_add_upload_1 = 0 Then%>
          <tr class="bgc">
            <td height="45" align="center"><%= LingFengNet_MS_language_addnew_upload_1 %></td>
            <td height="80" colspan="2" align="left"><iframe id="LFMessS_Mail_IFRAME" src="uploadhtm<%= Get_Suffix() %>" scrolling="no" frameborder="0" width="100%" height="80"></iframe></td>
          </tr>
          <%End IF%>
          <tr class="bgc">
            <td width="23%" height="45" align="center"><span style="color:#FF0000">*&ensp;</span><%= LingFengNet_MS_language_addnew_content %></td>
            <td width="57%" height="45" align="left"> <textarea name="contenttex"  rows="10" class="textarea"  style="width:100%;" onKeyDown="showcon(this);check_content();" onKeyUp="showcon(this);check_content();" onBlur="check_content();" id="contenttex"></textarea>
            <div id="con_content"></div></td>
            <td height="40" align="left" valign="bottom">&ensp;[<%= LingFengNet_MS_language_Warning_addnew_6 %>&ensp;<b><span id="showcon">0</span></b>&ensp;<%= LingFengNet_MS_language_Warning_addnew_5 %>]<br>
            &ensp;[<%= LingFengNet_MS_language_Warning_addnew_4 %>&ensp;<b><%=LingFengNet_MS_maxword%></b>&ensp;<%= LingFengNet_MS_language_Warning_addnew_5 %>]<br>
            &ensp;[<a href="javascript:set_Size(3,'contenttex')"><%= LingFengNet_MS_language_addnew_content_mes_2 %></a>]<br>&ensp;[<a href="javascript:set_Size(-3,'contenttex')"><%= LingFengNet_MS_language_addnew_content_mes_3 %></a>]</td>
          </tr>
          <tr align="center" class="bgc">
            <td height="45" colspan="3"><div id="con_submit"><input type="submit" name="Submit" value="<%= LingFengNet_MS_language_addnew_submit %>"  class="buttonface">&ensp;&ensp;&ensp;&ensp;<input type="reset" name="Submit" value="<%= LingFengNet_MS_language_addnew_reset %>" class="buttonface"></div>            </td>
          </tr>
          <tr class="bgc" valign="middle">
            <td height="45" colspan="3" align="center"><%= LingFengNet_MS_language_addnew_mes_con %></td>
          </tr>
		  <input name="saveok" type="hidden" id="saveok" value="<%=now()%>">
        </form>
    </table></td>
  </tr>
</table>
<!--endjs-->
</body>
</html>
<%
Call htmlbr()
Call htmlend()
%>