?? install.jsp
字號(hào):
<%@ page contentType="text/html;charset=gb2312" %>
<%@ include file="htmhead.htm" %>
<jsp:useBean id="sqlbean" scope="session" class="org.zhengmao.soft.sqlcon" />
<%
int create = 100;
if(request.getParameter("create")!=null){
create = Integer.parseInt(request.getParameter("create"));
}
String sql="";
if(create ==100){
%>
<dive align=center>
<TABLE cellSpacing=0 cellPadding=0 width="90%" align=center border=0>
<TBODY>
<TR>
<TD bgColor=#000000>
<TABLE cellSpacing=1 cellPadding=3 width="100%" border=0>
<TBODY>
<TR bgcolor=#e3e3ea class=header>
<TD >安裝程序--提示</TD>
</TR>
<TR bgcolor=#e3e3ea>
<TD>您可以自己創(chuàng)建數(shù)據(jù)庫(create database)和數(shù)據(jù)表(create table)或者使用這個(gè)程序創(chuàng)建數(shù)據(jù)表(create table),
但是必須在已有數(shù)據(jù)庫中(use 'database')創(chuàng)建數(shù)據(jù)表(create table),或者你先創(chuàng)建數(shù)據(jù)庫(create database),要不程序會(huì)出錯(cuò)。
<font color=red>請一定記住!運(yùn)行完此程序以后,先在《超級管理》一項(xiàng)內(nèi)初始化系統(tǒng)資料,要不會(huì)出錯(cuò)!</font>
</TD></TR>
</TBODY></TABLE></TD></TR></TBODY></TABLE></div>
<div align=center>
<form action=install.jsp?create=1 method=post name=iii onsubmit="cmpPwd(this.form)">
<TABLE cellSpacing=0 cellPadding=0 width="90%" align=center border=0>
<TBODY>
<TR>
<TD bgColor=#000000>
<TABLE cellSpacing=1 cellPadding=3 width="100%" border=0>
<TBODY>
<TR bgcolor=#e3e3ea class=header>
<TD colspan=2>輸入基本資料</TD>
</TR>
<TR bgcolor=#e3e3ea>
<TD>選擇數(shù)據(jù)庫類型</TD>
<TD>
<SELECT NAME=rowid >
<OPTION VALUE="AUTO_INCREMENT" selected>MYSQL SERVER</OPTION>
<OPTION VALUE="IDENTITY">MS SQL SERVER</OPTION>
<OPTION VALUE="ROWID">ORACLE SERVER</OPTION>
</SELECT>您的數(shù)據(jù)庫
</TD>
</TR>
<TR bgcolor=#e3e3ea>
<TD>用戶名稱</TD>
<TD><INPUT name=username value=""></TD></TR>
<TR bgcolor=#e3e3ea>
<TD>登陸密碼</TD>
<TD><INPUT name=password type=password value=""></TD></TR>
<TR bgcolor=#e3e3ea>
<TD>確認(rèn)密碼</TD>
<TD><INPUT name=password2 type=password value=""></TD></TR>
<TR bgcolor=#e3e3ea>
<TD>真實(shí)姓名</TD>
<TD><INPUT name=rname type=text value=""></TD></TR>
<TR bgcolor=#e3e3ea>
<TD colspan=2 align=middle><INPUT id=submit1 type=submit value=開始安裝 name=submit1 IsShowProcessBar="True"></TD>
</TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
</form>
</div>
<% }else if(create==1){ %>
<TABLE cellSpacing=0 cellPadding=0 width="99%" align=center border=0>
<TBODY>
<TR>
<TD bgColor=#000000>
<TABLE cellSpacing=1 cellPadding=3 width="100%" border=0>
<TBODY>
<TR bgcolor=#e3e3ea class=header>
<TD colspan=2>開始創(chuàng)建數(shù)據(jù)表--以DBA角色登陸--以后正常使用時(shí)請退出DBA角色</TD>
</TR>
<TR bgcolor=#e3e3ea>
<TD>創(chuàng)建《列名轉(zhuǎn)化》數(shù)據(jù)表:</TD>
<%
String rowid = request.getParameter("rowid");
String bincol="mediumblob";
String txtcol ="text";
if(rowid.compareTo("IDENTITY")==0){
bincol = "image";
txtcol = "text";
sqlbean.setGBbyte(true);
}else if(rowid.compareTo("ROWID")==0){
bincol ="longraw";
txtcol ="long";
sqlbean.setGBbyte(true);
}
sql ="create table colname(tbcol varchar(16),gb2312 varchar(16),english varchar(16),isindex tinyint not null default 0,tbname varchar(16),ID int not null primary key "+rowid+")";
sqlbean.executeUpdate(sql);
%>
<TD>創(chuàng)建成功!</TD></TR>
<TR bgcolor=#e3e3ea>
<TD>插入《列名轉(zhuǎn)化》數(shù)據(jù):</TD>
<%
sql = "insert into colname(tbcol,gb2312,english,isindex,tbname)values('ID','"+sqlbean.to_8859_1("序號(hào)")+"','"+sqlbean.to_8859_1("No.")+"',0,'url')";
sqlbean.executeUpdate(sql);
sql = "insert into colname(tbcol,gb2312,english,isindex,tbname)values('url','"+sqlbean.to_8859_1("網(wǎng)址")+"','"+sqlbean.to_8859_1("URL")+"',1,'url')";
sqlbean.executeUpdate(sql);
sql = "insert into colname(tbcol,gb2312,english,isindex,tbname)values('urlname','"+sqlbean.to_8859_1("網(wǎng)站名稱")+"','"+sqlbean.to_8859_1("WEB NAME")+"',1,'url')";
sqlbean.executeUpdate(sql);
sql = "insert into colname(tbcol,gb2312,english,isindex,tbname)values('urlsn','"+sqlbean.to_8859_1("網(wǎng)站簡介")+"','"+sqlbean.to_8859_1("INTRODUCTION")+"',1,'url')";
sqlbean.executeUpdate(sql);
sql = "insert into colname(tbcol,gb2312,english,isindex,tbname)values('SubjectId','"+sqlbean.to_8859_1("帖子標(biāo)志")+"','"+sqlbean.to_8859_1("SubjectID")+"',0,'bbs')";
sqlbean.executeUpdate(sql);
sql = "insert into colname(tbcol,gb2312,english,isindex,tbname)values('Name','"+sqlbean.to_8859_1("發(fā)帖人名")+"','"+sqlbean.to_8859_1("name")+"',1,'bbs')";
sqlbean.executeUpdate(sql);
sql = "insert into colname(tbcol,gb2312,english,isindex,tbname)values('Time','"+sqlbean.to_8859_1("發(fā)表時(shí)間")+"','"+sqlbean.to_8859_1("time")+"',1,'bbs')";
sqlbean.executeUpdate(sql);
sql = "insert into colname(tbcol,gb2312,english,isindex,tbname)values('Subject','"+sqlbean.to_8859_1("帖子標(biāo)題")+"','"+sqlbean.to_8859_1("Subject")+"',1,'bbs')";
sqlbean.executeUpdate(sql);
sql = "insert into colname(tbcol,gb2312,english,isindex,tbname)values('Content','"+sqlbean.to_8859_1("帖子內(nèi)容")+"','"+sqlbean.to_8859_1("Content")+"',1,'bbs')";
sqlbean.executeUpdate(sql);
sql = "insert into colname(tbcol,gb2312,english,isindex,tbname)values('Pic','"+sqlbean.to_8859_1("圖片標(biāo)志")+"','"+sqlbean.to_8859_1("Pic")+"',0,'bbs')";
sqlbean.executeUpdate(sql);
sql = "insert into colname(tbcol,gb2312,english,isindex,tbname)values('click','"+sqlbean.to_8859_1("查看次數(shù)")+"','"+sqlbean.to_8859_1("Click")+"',0,'bbs')";
sqlbean.executeUpdate(sql);
sql = "insert into colname(tbcol,gb2312,english,isindex,tbname)values('IP','"+sqlbean.to_8859_1("發(fā)帖人IP")+"','"+sqlbean.to_8859_1("IP")+"',0,'bbs')";
sqlbean.executeUpdate(sql);
sql = "insert into colname(tbcol,gb2312,english,isindex,tbname)values('title','"+sqlbean.to_8859_1("日程標(biāo)題")+"','"+sqlbean.to_8859_1("Title")+"',1,'calendar')";
sqlbean.executeUpdate(sql);
sql = "insert into colname(tbcol,gb2312,english,isindex,tbname)values('time','"+sqlbean.to_8859_1("發(fā)生時(shí)間")+"','"+sqlbean.to_8859_1("Time")+"',1,'calendar')";
sqlbean.executeUpdate(sql);
sql = "insert into colname(tbcol,gb2312,english,isindex,tbname)values('remindtime','"+sqlbean.to_8859_1("提醒時(shí)間")+"','"+sqlbean.to_8859_1("Remind Time")+"',1,'calendar')";
sqlbean.executeUpdate(sql);
sql = "insert into colname(tbcol,gb2312,english,isindex,tbname)values('content','"+sqlbean.to_8859_1("日程內(nèi)容")+"','"+sqlbean.to_8859_1("Content")+"',1,'calendar')";
sqlbean.executeUpdate(sql);
sql = "insert into colname(tbcol,gb2312,english,isindex,tbname)values('state','"+sqlbean.to_8859_1("提醒狀態(tài)")+"','"+sqlbean.to_8859_1("Name")+"',0,'calendar')";
sqlbean.executeUpdate(sql);
sql = "insert into colname(tbcol,gb2312,english,isindex,tbname)values('userid','"+sqlbean.to_8859_1("用戶標(biāo)志")+"','"+sqlbean.to_8859_1("UserID")+"',0,'calendar')";
sqlbean.executeUpdate(sql);
sql = "insert into colname(tbcol,gb2312,english,isindex,tbname)values('cname','"+sqlbean.to_8859_1("中文名")+"','"+sqlbean.to_8859_1("Chinese Name")+"',1,'card')";
sqlbean.executeUpdate(sql);
sql = "insert into colname(tbcol,gb2312,english,isindex,tbname)values('company','"+sqlbean.to_8859_1("公司")+"','"+sqlbean.to_8859_1("Company")+"',1,'card')";
sqlbean.executeUpdate(sql);
sql = "insert into colname(tbcol,gb2312,english,isindex,tbname)values('duty','"+sqlbean.to_8859_1("職務(wù)")+"','"+sqlbean.to_8859_1("Duty")+"',1,'card')";
sqlbean.executeUpdate(sql);
sql = "insert into colname(tbcol,gb2312,english,isindex,tbname)values('phone','"+sqlbean.to_8859_1("電話")+"','"+sqlbean.to_8859_1("Phone")+"',1,'card')";
sqlbean.executeUpdate(sql);
sql = "insert into colname(tbcol,gb2312,english,isindex,tbname)values('handset','"+sqlbean.to_8859_1("手機(jī)")+"','"+sqlbean.to_8859_1("Handset")+"',1,'card')";
sqlbean.executeUpdate(sql);
sql = "insert into colname(tbcol,gb2312,english,isindex,tbname)values('email','"+sqlbean.to_8859_1("Email")+"','"+sqlbean.to_8859_1("Email")+"',1,'card')";
sqlbean.executeUpdate(sql);
sql = "insert into colname(tbcol,gb2312,english,isindex,tbname)values('remark','"+sqlbean.to_8859_1("備注")+"','"+sqlbean.to_8859_1("Remark")+"',1,'card')";
sqlbean.executeUpdate(sql);
sql = "insert into colname(tbcol,gb2312,english,isindex,tbname)values('address','"+sqlbean.to_8859_1("地址")+"','"+sqlbean.to_8859_1("Address")+"',1,'card')";
sqlbean.executeUpdate(sql);
sql = "insert into colname(tbcol,gb2312,english,isindex,tbname)values('fax','"+sqlbean.to_8859_1("傳真")+"','"+sqlbean.to_8859_1("Fax")+"',1,'card')";
sqlbean.executeUpdate(sql);
sql = "insert into colname(tbcol,gb2312,english,isindex,tbname)values('postcode','"+sqlbean.to_8859_1("郵編")+"','"+sqlbean.to_8859_1("Postcode")+"',1,'card')";
sqlbean.executeUpdate(sql);
sql = "insert into colname(tbcol,gb2312,english,isindex,tbname)values('userid','"+sqlbean.to_8859_1("用戶標(biāo)志")+"','"+sqlbean.to_8859_1("UserID")+"',0,'card')";
sqlbean.executeUpdate(sql);
sql = "insert into colname(tbcol,gb2312,english,isindex,tbname)values('send','"+sqlbean.to_8859_1("發(fā)送標(biāo)志")+"','"+sqlbean.to_8859_1("Send")+"',0,'chat')";
sqlbean.executeUpdate(sql);
sql = "insert into colname(tbcol,gb2312,english,isindex,tbname)values('receive','"+sqlbean.to_8859_1("接受標(biāo)志")+"','"+sqlbean.to_8859_1("Receive")+"',0,'chat')";
sqlbean.executeUpdate(sql);
sql = "insert into colname(tbcol,gb2312,english,isindex,tbname)values('message','"+sqlbean.to_8859_1("內(nèi)容")+"','"+sqlbean.to_8859_1("Message")+"',1,'chat')";
sqlbean.executeUpdate(sql);
sql = "insert into colname(tbcol,gb2312,english,isindex,tbname)values('zt','"+sqlbean.to_8859_1("用戶標(biāo)志")+"','"+sqlbean.to_8859_1("Zt")+"',0,'chat')";
sqlbean.executeUpdate(sql);
sql = "insert into colname(tbcol,gb2312,english,isindex,tbname)values('who','"+sqlbean.to_8859_1("發(fā)貼用戶")+"','"+sqlbean.to_8859_1("Who")+"',1,'chat')";
sqlbean.executeUpdate(sql);
sql = "insert into colname(tbcol,gb2312,english,isindex,tbname)values('time','"+sqlbean.to_8859_1("發(fā)貼時(shí)間")+"','"+sqlbean.to_8859_1("Time")+"',1,'chat')";
sqlbean.executeUpdate(sql);
sql = "insert into colname(tbcol,gb2312,english,isindex,tbname)values('endtime','"+sqlbean.to_8859_1("結(jié)束時(shí)間")+"','"+sqlbean.to_8859_1("Endtime")+"',1,'chat')";
sqlbean.executeUpdate(sql);
sql = "insert into colname(tbcol,gb2312,english,isindex,tbname)values('type','"+sqlbean.to_8859_1("文件類型")+"','"+sqlbean.to_8859_1("Type")+"',0,'learn')";
sqlbean.executeUpdate(sql);
sql = "insert into colname(tbcol,gb2312,english,isindex,tbname)values('tname','"+sqlbean.to_8859_1("人名")+"','"+sqlbean.to_8859_1("Who")+"',1,'learn')";
sqlbean.executeUpdate(sql);
sql = "insert into colname(tbcol,gb2312,english,isindex,tbname)values('part','"+sqlbean.to_8859_1("部門")+"','"+sqlbean.to_8859_1("Department")+"',1,'learn')";
sqlbean.executeUpdate(sql);
sql = "insert into colname(tbcol,gb2312,english,isindex,tbname)values('title','"+sqlbean.to_8859_1("標(biāo)題")+"','"+sqlbean.to_8859_1("Title")+"',1,'learn')";
sqlbean.executeUpdate(sql);
sql = "insert into colname(tbcol,gb2312,english,isindex,tbname)values('ttext','"+sqlbean.to_8859_1("內(nèi)容")+"','"+sqlbean.to_8859_1("Content")+"',1,'learn')";
sqlbean.executeUpdate(sql);
sql = "insert into colname(tbcol,gb2312,english,isindex,tbname)values('body','"+sqlbean.to_8859_1("數(shù)據(jù)")+"','"+sqlbean.to_8859_1("Binary Data")+"',0,'learn')";
sqlbean.executeUpdate(sql);
sql = "insert into colname(tbcol,gb2312,english,isindex,tbname)values('html','"+sqlbean.to_8859_1("連接")+"','"+sqlbean.to_8859_1("Link")+"',0,'learn')";
sqlbean.executeUpdate(sql);
sql = "insert into colname(tbcol,gb2312,english,isindex,tbname)values('filesize','"+sqlbean.to_8859_1("文件大小")+"','"+sqlbean.to_8859_1("File Size")+"',0,'learn')";
sqlbean.executeUpdate(sql);
sql = "insert into colname(tbcol,gb2312,english,isindex,tbname)values('time','"+sqlbean.to_8859_1("發(fā)表時(shí)間")+"','"+sqlbean.to_8859_1("Time")+"',1,'learn')";
sqlbean.executeUpdate(sql);
sql = "insert into colname(tbcol,gb2312,english,isindex,tbname)values('count','"+sqlbean.to_8859_1("查看次數(shù)")+"','"+sqlbean.to_8859_1("Click")+"',0,'learn')";
sqlbean.executeUpdate(sql);
sql = "insert into colname(tbcol,gb2312,english,isindex,tbname)values('IP','"+sqlbean.to_8859_1("上載IP")+"','"+sqlbean.to_8859_1("IP")+"',0,'learn')";
sqlbean.executeUpdate(sql);
sql = "insert into colname(tbcol,gb2312,english,isindex,tbname)values('filename','"+sqlbean.to_8859_1("文件名")+"','"+sqlbean.to_8859_1("File Name")+"',1,'learn')";
sqlbean.executeUpdate(sql);
sql = "insert into colname(tbcol,gb2312,english,isindex,tbname)values('contenttype','"+sqlbean.to_8859_1("數(shù)據(jù)類型")+"','"+sqlbean.to_8859_1("Content Type")+"',0,'learn')";
sqlbean.executeUpdate(sql);
sql = "insert into colname(tbcol,gb2312,english,isindex,tbname)values('type','"+sqlbean.to_8859_1("文件類型")+"','"+sqlbean.to_8859_1("Type")+"',0,'upfile')";
sqlbean.executeUpdate(sql);
sql = "insert into colname(tbcol,gb2312,english,isindex,tbname)values('tname','"+sqlbean.to_8859_1("人名")+"','"+sqlbean.to_8859_1("Who")+"',1,'upfile')";
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -