首页 > 其他分享 >每日总结-23.5.11

每日总结-23.5.11

时间:2023-05-11 21:46:23浏览次数:33  
标签:11 总结 color text 23.5 background font border id

<%@ page import="wangzhan.Thesql" %>
<%@ page import="wangzhan.Pd_P_assignment" %>
<%@ page import="wangzhan.Pd_S_assignment" %>
<%@ page import="wangzhan.Pd_lesson" %>
<%@ page language="java" contentType="text/html; charset=UTF-8"

         pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>教学管理平台</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            background-color: #f7f7f7;
        }

        h1 {
            color: #333;
            text-align: center;
            margin-top: 50px;
        }

        table {
            margin: 0 auto;
            border-collapse: collapse;
            box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
            background-color: #fff;
        }

        th, td {
            padding: 30px;
            text-align: center;
            border: 1px solid #ddd;
            font-size: 17px;
        }

        th {
            background-color: #8b8989;
            color: #fff;
            font-size: 30px;
        }

        tr:nth-child(even) {
            background-color: #f2f2f2;
        }
        input{
            border: none;
            border-radius: 10px;
            height: 27px;
        }
        .submit{
            background-color: rgb(26, 131, 201);
            color: aliceblue;
            height: 50px;
            width: 90%;
        }
        .submit:active{
            background-color: rgb(166, 172, 175);
        }
        a{
            text-decoration: none;
            font-size: 20px;
            color: #3bc9e2;
        }
        /* 翻页选中样式 */
        .active {
            color: white;
            background-color: #007bff;
            border-radius: 0.25rem;
            padding: 0.5rem;
            text-decoration: none;
            margin-right: 10px;
        }

        /* 翻页未选中样式 */
        a.page-link {
            color: #007bff;
            text-decoration: none;
            margin-right: 10px;
        }
        #pagination{
            text-align: center;
        }
    </style>
</head>
<%
    HttpSession httpSession = request.getSession();
//    String tea_id= (String) httpSession.getAttribute("id_");
    String tea_id=request.getParameter("id_");
    Thesql thesql = new Thesql();
    request.setCharacterEncoding("UTF-8");
    String les="";//课程名称
    String pu="";
    String stu="";//是否审批
    les=request.getParameter("les");
    stu=request.getParameter("stu");

    Pd_lesson pd[] = thesql.lesson_DimQuery("",les,pu,stu);

    int itemsPerPage = 5;//每页展示多少条
    int totalItems = pd.length;//总共多少条
    int currentPage = request.getParameter("page") == null ? 1 : Integer.parseInt(request.getParameter("page"));
    int totalPages = (int) Math.ceil(totalItems / (double)itemsPerPage);
    int startItem = (currentPage - 1) * itemsPerPage + 1;
    int endItem = Math.min(startItem + itemsPerPage - 1, totalItems);
%>
<body>

<h1>浏览课程</h1>

<table>
    <tr>
        <form action="Browse_lesson.jsp" method="post">
            <th>编号</th>
            <th>课程:<input type="text" name="les"></th>
            <th>审批状态:<input type="text" name="stu"></th>
            <th>发布作业</th>
            <th>发布实验</th>
            <th><input class="submit" type="submit"></th>
        </form>
    </tr>
    <% for (int i = startItem; i < endItem; i++) { %>
    <tr>
        <td><%=pd[i].getId()%></td>
        <td><%=pd[i].getLesson_name()%></td>
        <td><%=pd[i].getIsPass()%></td>
        <td>
            <%if(pd[i].getIsPass().equals("已通过")&&tea_id.length()!=8) {%>
            <a href="Publish_work.jsp?les_id=<%=pd[i].getId()%>&id_=<%=tea_id%>">发布作业</a>
            <%}%>
        </td>
        <td>
            <%if(pd[i].getIsPass().equals("已通过")&&tea_id.length()!=8) {%>
            <a href="Publish_experiment.jsp?les_id=<%=pd[i].getId()%>&id_=<%=tea_id%>">发布实验</a>
            <%}%>
        </td>
        <td><a href="look_lesson.jsp?les_id=<%=pd[i].getId()%>&id_=<%=tea_id%>">查看</a></td>
    </tr>
    <% }%>

</table>
<br>
<%
    if(!(les!=null)) les="";
    if(!(pu!=null)) pu="";
    if(!(stu!=null)) stu="";
    if(!(tea_id!=null)) tea_id="";
%>
<div id="pagination">
    <%-- 显示翻页链接 --%>
    <%--    &les=<%=les%>&pu=<%=pu%>&stu=<%=stu%>--%>
    <a href="?page=<%= Math.max(1, currentPage - 1) %>&les=<%=les%>&pu=<%=pu%>&stu=<%=stu%>&id_=<%=tea_id%>" <%= currentPage == 1 ? "class=\"disabled page-link\"" : "class=\"page-link\"" %> >&laquo; 上一页</a>
    <% for (int i = 1; i <= totalPages; i++) { %>
    <a href="?page=<%= i %>&les=<%=les%>&pu=<%=pu%>&stu=<%=stu%>&id_=<%=tea_id%>" <%= i == currentPage ? "class=\"active\"" : "class=\"page-link\"" %> ><%= i %></a>
    <% } %>
    <a href="?page=<%= Math.min(currentPage + 1, totalPages) %>&les=<%=les%>&pu=<%=pu%>&stu=<%=stu%>&id_=<%=tea_id%>" <%= currentPage == totalPages ? "class=\"disabled page-link\"" : "class=\"page-link\"" %> >下一页 &raquo;</a>
</div>

</body>>
</html>

 

标签:11,总结,color,text,23.5,background,font,border,id
From: https://www.cnblogs.com/laobing6214/p/17392325.html

相关文章

  • Java关键字总结
    finalfinal在Java中是一个保留的关键字,可以声明成员变量、方法、类以及本地变量。final变量对于一个final变量,如果是基本数据类型的变量,则其数值一旦在初始化之后便不能更改;如果是引用类型的变量,则在对其初始化之后便不能再让其指向另一个对象,但是可以改变实例的属性。凡......
  • 每日总结
    遍历文件importjava.io.File;publicclassFileTraversal{publicstaticvoidmain(String[]args){//要遍历的文件路径StringfilePath="C:\\Users\\username\\Documents";//创建File对象,代表要遍历的目录或文件Filefile=newFile(filePath);/......
  • flower in 5.11
    在此,我想探讨一下多项式全家桶应该怎么封装、封装成什么程度的问题。我所认为的多项式全家桶应当是一种全面而又精简、快速而不冗长的一种代码块。最早看到的所谓“多项式全家桶”是Delov半年多前的《简单封装Poly》。非常优雅的马蜂。确实非常优雅的马蜂,相当精简,可读性也极强......
  • Java 编程之美总结
    内容来自王争Java编程之美1、Java基础1、程序本质:代码是如何被执行的?CPU、操作系统、虚拟机各司何职2、基础语法:从CPU角度看变量、数组、类型、运算、跳转、函数等语法3、引用类型:同样都是存储地址,为何Java引用比C/C++指针更安全4、基本类型:既然Java一切皆对......
  • Partitioning by Palindromes - UVa 11584
    例题9-7划分成回文串(PartitioningbyPalindromes,UVa11584)#dp#线性dp#字符串回文#T3输入一个由小写字母组成的字符串,要求把它划分成尽量少的回文串。输出最少的个数。如aaadbccb最少可以划分为3个:aaa,d,bccb输入:第一行输入一个n表示数据组数接下来n行每行输入一个......
  • 5.11
    #include<iostream>#include<string>usingnamespacestd;classPerson{public:Personoperator+(Person&p){Personp3;p3.a=this->a+p.a;p3.b=this->b+p.b;returnp3;}inta;intb;};Personoperator+(Person&p1,Person&......
  • 2023 5 11
    #include<iostream>usingnamespacestd;voidpandaun(inta){inti,t;t=a;//用于储存a的值intA[3];//用于储存各位上的数据for(i=0;i<3;i++){A[i]=a%10;a/=10;}if(t==(A[0]*A[0]*A[0]+A[1]*A......
  • 整体二分总结
    整体二分总结整体二分,就是一种高效离线处理可二分答案的询问的方法,可以代替例如树套树这种高级数据结构。例题:1.P1527[国家集训队]矩阵乘法题意:多次询问,求子矩阵第\(k\)小数。思路:先考虑如果只有一个询问,可以二分答案,把矩阵中小于等于\(mid\)的数赋1,大于的赋0,那么如果子矩阵......
  • 5月11日打卡
    习题4-7题目描述:定义一个Dot类,包含的age、weight等属性,以及对这些属性操作的方法。实现并设计这个类。设计思路:1.定义一个类包含私有类型age、weigh、t共有类型构造函数和输出函数。流程图: 代码部分:#include<iostream>usingnamespacestd;classDot{private:i......
  • 每日总结 5.11
    <!doctypehtml><html><head><metacharset="UTF-8"><scripttype='text/javascript'>if(document.createElement("input").webkitSpeech===undefined){ale......