<%--
  Created by IntelliJ IDEA.
  User: hkw
  Date: 2018/10/31
  Time: 14:06
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" import="com.itheima.po.Student" %> <!-- 设置页面的字符编码为UTF-8，导入Student类 -->
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> <!-- 引入JSTL标签库 -->

<html>
<head>
    <title>后台登录</title> <!-- 页面标题 -->
    <meta name="renderer" content="webkit|ie-comp|ie-stand"> <!-- 指定浏览器渲染引擎 -->
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <!-- 兼容IE浏览器 -->
    <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" /> <!-- 设置视口，适配不同设备 -->
    <%--<meta http-equiv="Cache-Control" content="no-siteapp" />--%> <!-- 被注释掉的元数据，禁止网站应用程序缓存 -->

    <link rel="icon" href="/images/favicon.ico" sizes="32x32" /> <!-- 网站图标 -->
    <link rel="stylesheet" href="./css/font.css"> <!-- 引入字体样式 -->
    <link rel="stylesheet" href="./css/xadmin.css"> <!-- 引入自定义管理样式 -->
    <script type="text/javascript" src="./js/jquery-1.3.2.min.js"></script> <!-- 引入jQuery库 -->
    <script src="lib/layui/layui.js"></script> <!-- 引入layui库 -->
    <script type="text/javascript" src="./js/xadmin.js"></script> <!-- 引入自定义xadmin脚本 -->
    <script src="/layui_exts/excel.js"></script> <!-- 引入excel导出功能 -->

    <style type="text/css">
        .layui-table{
            text-align: center; <!-- 设置表格内容居中 -->
        }
        .layui-table th{
            text-align: center; <!-- 设置表头内容居中 -->
        }
    </style>
</head>

<body>
<div class="x-nav">
    <span class="layui-breadcrumb">
        <a href="">首页</a> <!-- 首页链接 -->
        <a href="/findStudent">学生信息</a> <!-- 学生信息页面链接 -->
    </span>
    <a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right" href="/findStudent" title="刷新">
        <i class="layui-icon" style="line-height:30px">ဂ</i> <!-- 刷新按钮图标 -->
    </a>
</div>
<div class="x-body">
    <div class="layui-row">
        <form class="layui-form layui-col-md12 x-so" action="/findStudent">
            <input class="layui-input" placeholder="请输入姓名" name="s_name" id="s_name"> <!-- 姓名输入框 -->
            <input class="layui-input" placeholder="请输入学号" name="s_studentid" id="s_studentid"> <!-- 学号输入框 -->
            <input class="layui-input" placeholder="请输入班级编号" name="s_classid" id="s_classid"> <!-- 班级编号输入框 -->
            <input class="layui-input" placeholder="请输入班级名" name="s_classname" id="s_classname"> <!-- 班级名输入框 -->

            <input class="layui-input" type="hidden" name="pageIndex" value="1"> <!-- 页码 -->
            <input class="layui-input" type="hidden" name="pageSize" value="3"> <!-- 每页条数 -->
            <button class="layui-btn" lay-submit="" lay-filter="search"><i class="layui-icon">&#xe615;</i></button> <!-- 搜索按钮 -->
        </form>
    </div>
    <xblock>
        <button id="addStudnetBtn" class="layui-btn layui-btn-normal"> <i class="layui-icon">&#xe654;</i>添加 </button> <!-- 添加学生按钮 -->
        <button class="layui-btn layui-btn-warm" lay-filter="toolbarDemo" lay-submit=""><i class="layui-icon">&#xe67c;</i>导出</button> <!-- 导出按钮 -->
        <span class="x-right" style="line-height:40px">共有数据：${pi.totalCount} 条</span> <!-- 显示数据总数 -->
    </xblock>

    <%-- 添加模态框 --%>
    <div class="layui-row" id="test" style="display: none;">
        <div class="layui-col-md10">
            <form class="layui-form" id="addEmployeeForm">
                <div class="layui-form-item">
                    <label class="layui-form-label">学号：</label> <!-- 学号标签 -->
                    <div class="layui-input-block">
                        <input type="text" lay-verify="required" name="s_studentid" class="layui-input" placeholder="请输入学号"> <!-- 学号输入框 -->
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">姓名：</label> <!-- 姓名标签 -->
                    <div class="layui-input-block">
                        <input type="text" lay-verify="required" name="s_name" class="layui-input" placeholder="请输入姓名"> <!-- 姓名输入框 -->
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">性别</label> <!-- 性别标签 -->
                    <div class="layui-input-block">
                        <input type="radio" name="s_sex" value="男" title="男" checked=""> <!-- 性别选择：男 -->
                        <input type="radio" name="s_sex" value="女" title="女"> <!-- 性别选择：女 -->
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">年龄：</label> <!-- 年龄标签 -->
                    <div class="layui-input-block">
                        <input type="text" name="s_age" class="layui-input" placeholder="请输入年龄"> <!-- 年龄输入框 -->
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">电话：</label> <!-- 电话标签 -->
                    <div class="layui-input-block">
                        <input type="text" name="s_phone" class="layui-input" placeholder="请输入电话"> <!-- 电话输入框 -->
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">班级编号：</label> <!-- 班级编号标签 -->
                    <div class="layui-input-block">
                        <input type="text" name="s_classid" class="layui-input" placeholder="请输入班级编号"> <!-- 班级编号输入框 -->
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">班级名：</label> <!-- 班级名标签 -->
                    <div class="layui-input-block">
                        <input type="text" name="s_classname" class="layui-input" placeholder="请输入班级名"> <!-- 班级名输入框 -->
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">寝室编号：</label> <!-- 寝室编号标签 -->
                    <div class="layui-input-block">
                        <input type="text" name="s_dormitoryid" class="layui-input" placeholder="请输入寝室编号"> <!-- 寝室编号输入框 -->
                    </div>
                </div>

                <div class="layui-form-item">
                    <div class="layui-input-block">
                        <button type="button" class="layui-btn layui-btn-normal" lay-submit lay-filter="formDemo">提交</button> <!-- 提交按钮 -->
                        <button type="reset" class="layui-btn layui-btn-primary">重置</button> <!-- 重置按钮 -->
                    </div>
                </div>
            </form>
        </div>
    </div>

    <%-- 编辑模态框 --%>

    <div class="layui-row" id="updteDiv" style="display: none;">
        <div class="layui-col-md10">
            <form class="layui-form" id="addUpdatForm">
                <input value="${sessionScope.sid}" type="text" name="s_id" id="edit_id"/> <!-- 学生ID -->
                <div class="layui-form-item">
                    <label class="layui-form-label">学号：</label> <!-- 学号标签 -->
                    <div class="layui-input-block">
                        <input type="text" name="s_studentid" id="edit_studentid" value="" class="layui-input" placeholder="请输入学号"> <!-- 学号输入框 -->
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">姓名：</label> <!-- 姓名标签 -->
                    <div class="layui-input-block">
                        <input type="text" name="s_name" id="edit_names" value="" class="layui-input" placeholder="请输入姓名"> <!-- 姓名输入框 -->
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">性别</label> <!-- 性别标签 -->
                    <div class="layui-input-block">
                        <input type="radio" name="s_sex" id="edit_sex" value="男" title="男" checked=""> <!-- 性别选择：男 -->
                        <input type="radio" name="s_sex" id="edit_sex" value="女" title="女"> <!-- 性别选择：女 -->
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">年龄：</label> <!-- 年龄标签 -->
                    <div class="layui-input-block">
                        <input type="text" name="s_age" class="layui-input" id="edit_age" value="" placeholder="请输入年龄"> <!-- 年龄输入框 -->
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">电话：</label> <!-- 电话标签 -->
                    <div class="layui-input-block">
                        <input type="text" name="s_phone" id="edit_phone" value="" class="layui-input" placeholder="请输入电话"> <!-- 电话输入框 -->
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">班级编号：</label> <!-- 班级编号标签 -->
                    <div class="layui-input-block">
                        <input type="text" name="s_classid" id="edit_classids" value="" class="layui-input" placeholder="请输入班级编号"> <!-- 班级编号输入框 -->
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">班级名：</label> <!-- 班级名标签 -->
                    <div class="layui-input-block">
                        <input type="text" name="s_classname" id="edit_classname" value="" class="layui-input" placeholder="请输入班级名"> <!-- 班级名输入框 -->
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">宿舍编号：</label> <!-- 宿舍编号标签 -->
                    <div class="layui-input-block">
                        <input type="text" name="s_dormitoryid" id="edit_dormitoryids" value="" class="layui-input" placeholder="请输入宿舍编号"> <!-- 宿舍编号输入框 -->
                    </div>
                </div>

                <div class="layui-form-item">
                    <div class="layui-input-block">
                        <button type="button" class="layui-btn layui-btn-normal" lay-submit lay-filter="updateForm">更新</button> <!-- 更新按钮 -->
                        <button type="reset" class="layui-btn layui-btn-primary">重置</button> <!-- 重置按钮 -->
                    </div>
                </div>
            </form>
        </div>
    </div>

    <%-- 表格数据 --%>
    <table class="layui-table">
        <thead>
        <tr>
            <th>ID</th> <!-- ID 列 -->
            <th>学号</th> <!-- 学号列 -->
            <th>姓名</th> <!-- 姓名列 -->
            <th>性别</th> <!-- 性别列 -->
            <th>年龄</th> <!-- 年龄列 -->
            <th>电话</th> <!-- 电话列 -->
            <th>班级编号</th> <!-- 班级编号列 -->
            <th>班级名</th> <!-- 班级名列 -->
            <th>寝室编号</th> <!-- 寝室编号列 -->
            <th>操作</th> <!-- 操作列 -->
        </thead>
        <tbody>

