日期:2014-05-16 浏览次数:20453 次
<%@page import="com.basic.Business"%> <%@ page language="java" import="java.util.*" import="com.basic.GeneralDAO" import="com.basic.db.SQLParameter" import="com.basic.DB" pageEncoding="utf-8"%> <% String path = request.getContextPath(); String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/system"; GeneralDAO gd = new GeneralDAO(); // String sql_show = ""; String sql_fields = ""; String sql_tables = ""; String sql_condition = ""; String sql_order = ""; String editpath = "/system/attend/update.jsp"; String editpath1 = "/system/attend/query.jsp"; String listpath = "/system/attend/query.jsp"; String edittitle = "出勤"; String tablename = "attend"; sql_show = ""; //sql_fields= " tab_attend left inner join tab_course on tab_attend.cours=b.b right inner join c on a.a=c.c inner join d on a.a=d.d "; //sql_fields= "select tab_attend.tableid,tab_attend.courseno,tab_course.coursename from tab_attend ,tab_course where tab_attend.courseno=tab_course.tableid right inner join c on a.a=c.c inner join d on a.a=d.d "; sql_fields = " tab_attend.*, tab_department.tableid deptid ,tab_course.coursename, tab_student.tableid stuid ,tab_student.name stuname,tab_department.name deptname ,tab_class.name classname ,tab_class.grade "; // sql_fields = " tab_attend.* "; //sql_tables = "tab_attend "; //sql_tables = "tab_attend inner join tab_course on tab_attend.courseno = tab_course.tableid inner join tab_student on (tab_attend.stuid = tab_student.tableid) inner join tab_department on( tab_attend.deptid = tab_department.tableid) "; sql_tables = "tab_attend inner join tab_course on tab_attend.courseno = tab_course.tableid inner join tab_student on (tab_attend.stuid = tab_student.tableid) inner join tab_department on( tab_attend.deptid = tab_department.tableid) inner join tab_class on( tab_attend.class= tab_class.tableid) "; sql_condition = "tab_attend.tableid !=? "; sql_order = " order by tab_attend.createtime desc"; sql_condition += sql_order; //查询条件声明 String q_deptname = ""; String q_classname = ""; String q_stuid = ""; String q_coursename = ""; String q_year = ""; String q_month= ""; //组成查询字符串 int totalrecord = 2; try { totalrecord = gd.getSize("*", null, null, "tab_attend"); } catch (Exception ex) { System.out.println("查询SIZE出错:" + ex.toString()); } %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <link type="text/css" hreflang="utf-8" href="/images/skin.css" rel="Stylesheet" /> <title>出勤</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <script type="text/javascript" src="/js/cqjw.js" charset="utf-8"></script> <script type="text/javascript"> function init() { alert("11"); document.all.q_deptname_show.value="<%out.println(q_deptname);%>"; document.all.q_classname_