5.10每日总结

复制代码
<%@ 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>
<head>
  <title>登录</title>
  <style type="text/css">
    table {
      /*表格边框为实线或者是空心双线*/
      border-collapse: collapse;
      /*边框与边框的空间*/
      border-spacing: 0;
      padding: 40px ;
    }
    #loginMain {
      width: 400px;
      height:300px;
      margin: 1em auto;
      padding-bottom: 10px;
      border-right: rgb(30,144,255) 2px solid;
      border-top: rgb(30,144,255) 2px solid;
      border-left: rgb(30,144,255) 2px solid;
      border-bottom: rgb(30,144,255) 2px solid;
    }
    input{
      height: 40px;
      width: 240px;
    }

  </style>
</head>
<%
    String pages="";
    pages=request.getParameter("pages");
%>
<%
    String username="";
    String password="";
    out.print(pages);
    //获取cookie里面的值
    Cookie [] cookies = request.getCookies();
    if(cookies!=null){
        //遍历cookie
        for(int i = 0;i<cookies.length;i++){
            if(cookies[i].getName().equals("username")){
                //获取cookie里面的用户名
                username = cookies[i].getValue();
            }else if(cookies[i].getName().equals("password")){
                //获取密码
                password = cookies[i].getValue();
            }
        }
    }
%>
<body background="back.jpg">
<h1 align="center">登 陆</h1>
<br><br>
<form action="check.jsp" method="post">
  <table id="loginMain" border="0" style="font-size:18px;width:480px" align="center">
      <tr>
        <td align="center">用户名:<input type="text" name="username" size="20" placeholder="输入用户名"  style="font-size:18px"/>
      <br><br><input type="hidden" name="pages" value=<%=pages%> />
        密   码:<input type="password" name="password" size="20" placeholder="输入密码" style="font-size:18px"/></td>
      </tr>
      <tr><td align="center" colspan="2"><input type="submit" value="登录" style="width:45px;height:30px;margin:5px 40px"/>
        <input type="reset" value="重置" style="width:45px;height:30px;margin:5px 40px"/>
      </td>
      </tr>
  </table>
</form>
</body>
</html>
复制代码
复制代码
<%@ 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>
<%
    Thesql thesql = new Thesql();
    request.setCharacterEncoding("UTF-8");
    String les="";//课程名称
    String pu="";//老师名称
    String stu="";//是否审批
    les=request.getParameter("les");
    pu=request.getParameter("pu");
    stu=request.getParameter("stu");

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

    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="shenhe.jsp" method="post">
            <th>编号</th>
            <th>课程:<input type="text" name="les"></th>
            <th>教师:<input type="text" name="pu"></th>
            <th>审批状态:<input type="text" name="stu"></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].getLesson_teacher()%></td>
        <td><%=pd[i].getIsPass()%></td>
        <td><a href="Aduit.jsp?les_id=<%=pd[i].getId()%>&id_=<%=id_%>">查看</a></td>
    </tr>
    <% }%>

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

</body>>
</html>
复制代码

 

昨天对前端的显示做了一些调整,修改了一下显得更加美观

今天我大约花了2小时时间在qt学习上。              

今日完成:初步用qt制作页面,在python的基础上完成网页实现

明日目标:继续学习qt页面布局

遇到问题(已解决或未解决):用python做页面意味着要学更多新内容,由于我对python了解不是很多,所以第一次学习费了很长一段时间。

今天在修改servlet,现在还是不显示界面,就说部署的设备不足,现在一直在找是什么情况

posted @   漏网鲨鱼  阅读(6)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· Manus重磅发布:全球首款通用AI代理技术深度解析与实战指南
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· 没有Manus邀请码?试试免邀请码的MGX或者开源的OpenManus吧
· 园子的第一款AI主题卫衣上架——"HELLO! HOW CAN I ASSIST YOU TODAY
· 【自荐】一款简洁、开源的在线白板工具 Drawnix
点击右上角即可分享
微信分享提示