<!--
whilvydy 新闻发布系统
-->

<%@ page contentType="text/html; charset=GB2312" language="java" import="java.sql.*" %>
<%@ page import="java.io.*" %> 
<%@ page import="java.util.*" %>
<%@ page import="net.jspcn.util.SendMail" %>
<%@ include file = "function/parameter.jsp" %>

<jsp:useBean id="index_man" scope="page" class="net.jspcn.db.DbConnect" />
<jsp:useBean id='StrTool' scope='page' class='net.jspcn.tool.StringProcess' />
<jsp:useBean id="counter" class="net.jspcn.util.counter" scope="request" />

<%
///////////////////////// the varity init */
int intDisplay,newslength;
int giveType_id = 2;
intDisplay = param[0];
newslength = param[1];
String htmltitle;
htmltitle = msg[0];

index_man.openConnection();
String sql,sql1,userWealth;
userWealth="";
ResultSet rs,rs1;


String cont=counter.ReadFile(msg[1]+"count.txt");

///////////////////* 得到横目录
String[] vtitle = new String[10];
String[] vlink = new String[10];
int vtitle_count = 0;
sql = "select * from "+type_table+" where type_audit=1 and type_id<>1";
rs = index_man.executeQuery(sql);

while(rs.next()) {
	vtitle[vtitle_count] = rs.getString("type_name");
	vlink[vtitle_count] = rs.getString("type_id");
	vtitle_count++;
}

///////////////////变量定义
String type_name,board_name;
int type_id,board_id;

boolean smflag = false;

    if(request.getMethod().equals("POST")) {
    SendMail mail = new SendMail();
    mail.setHost("smtp.163.net");
    mail.setUser("webmaster");
    mail.setPassword("123456!@#$%^");
    mail.setFrom(request.getParameter("from"));
    mail.setTo("webmaster@jspcn.net");
    mail.setSubject(request.getParameter("subject"));
    mail.setContent(request.getParameter("content"));
    mail.send();

    smflag = true;
    }
%>

<%@ include file = "function/header1.jsp" %>
JSP中文网--欢迎您
<%@ include file = "function/header2.jsp" %>

<%
if(smflag) {
%>
谢谢您对JSP中文网的支持
<br>
您的邮件发送成功！！！
<br>
<%
}
else{
%>
谢谢您对JSP中文网的支持
<br>
您的邮件发送失败！！！
<br>

<%
}
%>
<%@ include file = "function/feeder.jsp" %>                                                                            