package com;
import java.util.*;
import java.sql.*;
import java.text.*;
public class words extends Conn
{
//定义成员变量
private int WordsID;
private String WordsContent;
private String WordsTime;
private String UserName;
private String sql;
private SimpleDateFormat timeFormatter;
//构造函数,初始化成员变量
public words()
{
WordsID=0;
WordsContent="";
UserName="";
timeFormatter = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
WordsTime=timeFormatter.format(new java.util.Date());
sql="";
}
public boolean add_words()
{
sql="insert into words ";
sql=sql + "(";
sql=sql + "WordsContent,";
sql=sql + "WordsTime,";
sql=sql + "UserName";
sql=sql + ") ";
sql=sql + "values(";
sql=sql + "'" + WordsContent + "',";
sql=sql + "'" + WordsTime + "',";
sql=sql + "'" + UserName + "'";
sql=sql + ")";
boolean isAdd = super.exeSql(sql);
return isAdd;
}
public boolean init()
{
sql="select * from words where WordsID=";
sql=sql + WordsID;
try
{
ResultSet rs = super.executeQuery(sql);
if (rs.next())
{
//获取留言内容
this.WordsID=rs.getInt("WordsID");
this.WordsContent=rs.getString("WordsContent");
this.WordsTime=rs.getString("WordsTime");
this.UserName=rs.getString("UserName");
return true;
}
else
{
return false;
}
}
catch(Exception ex)
{
System.out.println(ex.toString());
return false;
}
}
public ResultSet show_words()
{
sql="select * from words";
ResultSet rs = null;
try
{
rs = super.executeQuery(sql);
}
catch(Exception ex)
{
System.out.println(ex.toString());
}
return rs;
}
public void setWordsID(int WordsID)
{
this.WordsID = WordsID;
}
public int getWordsID()
{
return this.WordsID;
}
public void setWordsContent(String WordsContent)
{
this.WordsContent = WordsContent;
}
public String getWordsContent()
{
return this.WordsContent;
}
public void setWordsTime(String WordsTime)
{
this.WordsTime = WordsTime;
}
public String getWordsTime()
{
return this.WordsTime;
}
public void setUserName(String UserName)
{
this.UserName = UserName;
}
public String getUserName()
{
return this.UserName;
}
}
没有合适的资源?快使用搜索试试~ 我知道了~
JSP做的nba投票系统,比较简单
共88个文件
jsp:28个
jpg:26个
css:10个
需积分: 9 9 下载量 97 浏览量
2013-05-12
10:00:00
上传
评论
收藏 2.47MB RAR 举报
温馨提示
nba.txt为数据库文件,导入masql中,运行文件中的index.jsp文件
资源推荐
资源详情
资源评论
收起资源包目录
JSP.rar (88个子文件)
JSP
.project 1KB
WebContent
update.css 253B
WEB-INF
lib
web.xml 636B
user.jsp 1000B
rejister.jsp 2KB
left.jsp 479B
userlist.jsp 3KB
index.css 694B
index.jsp 2KB
img
delete.jpg 187KB
kobe.jpg 17KB
title.jpg 46KB
byselect2.jpg 255KB
userlist.jpg 149KB
james.jpg 29KB
word.jpg 111KB
show.jpg 185KB
admin.jpg 332KB
Garnett.jpg 15KB
result1.jpg 157KB
nba1.jpg 6KB
delete1.jpg 3KB
conew1.jpg 107KB
Griffin.jpg 8KB
Loew.jpg 15KB
bar1.gif 84B
bar.png 272B
update.jpg 235KB
Howard.jpg 10KB
result21.jpg 372KB
result5.jpg 22KB
result3.jpg 18KB
Anthony.jpg 12KB
Nowitzk.jpg 10KB
Durant.jpg 17KB
result4.png 17KB
wade.jpg 33KB
rejister.jpg 182KB
result2.png 12KB
addplayer.jsp 605B
rejister.css 561B
update.jsp 2KB
dele_user.jsp 387B
admin_check.jsp 1KB
user
show.jsp 1KB
bySelect.jsp 4KB
s.jsp 251B
vote.jsp 403B
result.jsp 2KB
words.html 218B
result2.css 561B
words1.jsp 1KB
s2.jsp 252B
result2.jsp 2KB
words_save.jsp 848B
login_check.jsp 1KB
vote2.jsp 450B
out.jsp 263B
result.css 1KB
byselect2.css 561B
bySelect2.jsp 1KB
byselect1.css 2KB
META-INF
MANIFEST.MF 39B
image.jsp 2KB
user_admin.jsp 1KB
userlist.css 668B
select.jsp 2KB
insert.jsp 3KB
delete.jsp 390B
user_save.jsp 1KB
blank.html 49B
insert.css 356B
user_admin.css 564B
src
com
Conn.java 964B
splitPage.java 2KB
User_save.java 2KB
words.java 3KB
.settings
org.eclipse.wst.jsdt.ui.superType.container 49B
org.eclipse.wst.common.project.facet.core.xml 345B
org.eclipse.jdt.core.prefs 364B
org.eclipse.wst.jsdt.ui.superType.name 6B
org.eclipse.wst.common.component 461B
.jsdtscope 503B
build
classes
com
Conn.class 2KB
User_save.class 2KB
words.class 3KB
splitPage.class 3KB
.classpath 834B
共 88 条
- 1
资源评论
初出茅庐的菜鸟
- 粉丝: 0
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 高光谱数据集(.mat.csv)-科研学术
- 基于JavaScript和CSS的母婴之家网页设计源码 - myzj
- WX小程序源码无后台京东白条
- WX小程序源码无后台简易计算器
- 基于SpringBoot和Vue的Fastcms前后端分离CMS系统设计源码 - fastcms
- WX小程序源码无后台会议精灵
- 基于Java和Javascript的工程建设综合管理系统材料管理模块设计源码 - material
- c51_2_2.c
- 凡客vancl商城的商品分类-产品搜索-产品详情-评论的抓取php程序压缩包
- ASCII American Standard Code for Information Interchange
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功