Compare commits
3 Commits
4d2d5e2d5e
...
20250106
Author | SHA1 | Date | |
---|---|---|---|
25b84ffe94 | |||
f4441e4f64 | |||
1389a32e22 |
4
.idea/vcs.xml
generated
4
.idea/vcs.xml
generated
@ -1,4 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="VcsDirectoryMappings" defaultProject="true" />
|
<component name="VcsDirectoryMappings">
|
||||||
|
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||||
|
</component>
|
||||||
</project>
|
</project>
|
485
Readme.md
Normal file
485
Readme.md
Normal file
@ -0,0 +1,485 @@
|
|||||||
|
本题5分 共5个小题
|
||||||
|
|
||||||
|
1. B/S架构系统后台常见的服务器端编程技术有JSP 、______、PHP、Python等。
|
||||||
|
2. JavaScript是一种___________编程语言。
|
||||||
|
3. CMS是指________________。
|
||||||
|
4. B/S架构系统制作完成后,一般通过_____________工具上传到服务器上运行。
|
||||||
|
5. HTTP服务器默认监听的是______________端口。
|
||||||
|
|
||||||
|
备注:作答结果填写在中间的作答框中,答案之间用空格分开就行,不用写题号,顺序不限制。
|
||||||
|
|
||||||
|
```
|
||||||
|
ASP
|
||||||
|
解释型
|
||||||
|
内容管理系统
|
||||||
|
FTP
|
||||||
|
80
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
本题5分
|
||||||
|
div+CSS编程
|
||||||
|
样式如下
|
||||||
|

|
||||||
|
要求如下:
|
||||||
|
|
||||||
|
1. 各div的id如图所示。
|
||||||
|
2. 所有的div相对定位,左浮动,border都为实线,1px,红色。
|
||||||
|
3. 所有的div的外边距为10px,内边距为10px。
|
||||||
|
4. main的宽为400px,高为270px;
|
||||||
|
5. top的宽为358px,高为20px。
|
||||||
|
6. menu的宽为358px,高为20px。
|
||||||
|
7. footer的宽为358px,高为15px。
|
||||||
|
8. left的宽为110px。
|
||||||
|
|
||||||
|
<!DOCTYPE html>
|
||||||
|
```
|
||||||
|
<html lang="zh-CN">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
|
||||||
|
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
|
||||||
|
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
|
||||||
|
|
||||||
|
<title>Div Layout</title>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
|
||||||
|
|
||||||
|
div {
|
||||||
|
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
float: left;
|
||||||
|
|
||||||
|
border: 1px solid red;
|
||||||
|
|
||||||
|
margin: 10px;
|
||||||
|
|
||||||
|
padding: 10px;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#main {
|
||||||
|
|
||||||
|
width: 400px;
|
||||||
|
|
||||||
|
height: 270px;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#top {
|
||||||
|
|
||||||
|
width: 358px;
|
||||||
|
|
||||||
|
height: 20px;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#menu {
|
||||||
|
|
||||||
|
width: 358px;
|
||||||
|
|
||||||
|
height: 20px;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#footer {
|
||||||
|
|
||||||
|
width: 358px;
|
||||||
|
|
||||||
|
height: 15px;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#left {
|
||||||
|
|
||||||
|
width: 110px;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#right_1, #right_2 {
|
||||||
|
|
||||||
|
width: 206px; /* 358px (main inner width) - 110px (left) - 20px (2 * margin) */
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
|
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<div id="main">
|
||||||
|
|
||||||
|
|
||||||
|
<div id="top">Top</div>
|
||||||
|
|
||||||
|
<div id="menu">Menu</div>
|
||||||
|
|
||||||
|
<div id="left">Left</div>
|
||||||
|
|
||||||
|
<div id="right_1">Right 1</div>
|
||||||
|
|
||||||
|
<div id="right_2">Right 2</div>
|
||||||
|
|
||||||
|
<div id="footer">Footer</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
本题5分 共5个小题
|
||||||
|
|
||||||
|
1. 一般情况下,B/S架构系统的首页文件名是_______________。
|
||||||
|
2. 小型B/S架构系统,可采用申请________________的方式运行。
|
||||||
|
3. document.getElementById的功能是________________。
|
||||||
|
4. JavaScript编程中,产生随机数是用________________。
|
||||||
|
5. Jquery是________________。
|
||||||
|
|
||||||
|
备注:作答结果填写在中间的作答框中,答案之间用空格分开就行,不用写题号,顺序不限制。
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
```
|
||||||
|
index.html 虚拟主机 获取对象 Math.random() js类库
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
本题5分 共5个小题
|
||||||
|
|
||||||
|
> 1. spring boot中@RequestMapping注解的作用是___________。
|
||||||
|
> 2. spring boot中'@SpringBootApplication注解的作用是___________。
|
||||||
|
> 3. spring boot中'@Controller注解的作用是___________。
|
||||||
|
> 4. spring boot中'@Service注解的作用是___________。
|
||||||
|
> 5. spring boot中'@Autowired注解的作用是___________。
|
||||||
|
|
||||||
|
备注:作答结果填写在中间的作答框中,答案之间用空格分开就行,不用写题号,顺序不限制。
|
||||||
|
|
||||||
|
```
|
||||||
|
映射URL路径
|
||||||
|
主配置类
|
||||||
|
标识一个Java 类是一个控制器
|
||||||
|
用于标识服务层组件
|
||||||
|
注入对象
|
||||||
|
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
本题5分 共5个小题
|
||||||
|
|
||||||
|
> 1. ___________是用来简化Spring MVC的技术。
|
||||||
|
> 2. spring boot中,使用注解来代替繁琐的__________配置。
|
||||||
|
> 3. AOP是指________________。
|
||||||
|
> 4. IOC是指________________。
|
||||||
|
> 5. DI是指______________。
|
||||||
|
|
||||||
|
备注:作答结果填写在中间的作答框中,答案之间用空格分开就行,不用写题号,顺序不限制。
|
||||||
|
|
||||||
|
```
|
||||||
|
springboot XML 面向切面编程 控制反 依赖注入
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
本题5分 共5个小题
|
||||||
|
|
||||||
|
数据表student的字段为id,name,score;偏移量为offset,每页记录数为rowsOfPage;完成mapper层的功能设计
|
||||||
|
|
||||||
|
> <mapper namespace="com.luowei.app.mapper.StudentMapper">
|
||||||
|
> <select id="selectAll" resultType="com.luowei.app.entity.StudentEntity">
|
||||||
|
>
|
||||||
|
> 1._______________________________________________________
|
||||||
|
> </select>
|
||||||
|
> <select id="selectLimit" resultType="com.luowei.app.entity.StudentEntity">
|
||||||
|
>
|
||||||
|
> 2._______________________________________________________
|
||||||
|
> </select>
|
||||||
|
> <select id="selectCount" resultType="int">
|
||||||
|
>
|
||||||
|
> 3._______________________________________________________
|
||||||
|
> </select>
|
||||||
|
> <select id="select" resultType="com.luowei.app.entity.StudentEntity">
|
||||||
|
>
|
||||||
|
> 4._______________________________________________________
|
||||||
|
> </select>
|
||||||
|
> <update id="update" parameterType="com.luowei.app.entity.StudentEntity">
|
||||||
|
>
|
||||||
|
> 5._______________________________________________________
|
||||||
|
> </update>
|
||||||
|
> </mapper>
|
||||||
|
|
||||||
|
备注:SQL关键词大写。作答结果填写在中间的作答框中,答案之间用空格分开就行,不用写题号,顺序不限制。
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
```
|
||||||
|
`<mapper namespace="com.luowei.app.mapper.StudentMapper">`
|
||||||
|
`<select id="selectAll" resultType="com.luowei.app.entity.StudentEntity">`
|
||||||
|
`SELECT * FROM student`
|
||||||
|
`</select>`
|
||||||
|
`<select id="selectLimit" resultType="com.luowei.app.entity.StudentEntity">`
|
||||||
|
`SELECT * FROM student LIMIT #{offset},#{rowsOfPage}`
|
||||||
|
`</select>`
|
||||||
|
`<select id="selectCount" resultType="int">`
|
||||||
|
`SELECT COUNT(*) AS counter FROM student`
|
||||||
|
`</select>`
|
||||||
|
`<select id="select" resultType="com.luowei.app.entity.StudentEntity">`
|
||||||
|
`SELECT * FROM student WHERE id=#{id}`
|
||||||
|
`</select>`
|
||||||
|
`<update id="update" parameterType="com.luowei.app.entity.StudentEntity">`
|
||||||
|
`UPDATE student SET name=#{name},score=#{score} WHERE id=#{id}`
|
||||||
|
`</update>`
|
||||||
|
`</mapper>`
|
||||||
|
```
|
||||||
|
|
||||||
|
————————————————————————————————————————————————————————————————————————————————
|
||||||
|
本题5分 共5个小题
|
||||||
|
数据表student的字段为id,name,score;偏移量为offset,每页记录数为rowsOfPage;数据表实体为:StudentEntity;完成mapper接口的功能设计
|
||||||
|
|
||||||
|
> @Repository
|
||||||
|
> @Mapper
|
||||||
|
> public interface StudentMapper {
|
||||||
|
>
|
||||||
|
> List<StudentEntity> 1.___________________________________
|
||||||
|
>
|
||||||
|
> List<StudentEntity> 2.___________________________________
|
||||||
|
>
|
||||||
|
> 3._______________________________________________________
|
||||||
|
>
|
||||||
|
> 4._______________________________________________________
|
||||||
|
>
|
||||||
|
> 5._______________________________________________________
|
||||||
|
> }
|
||||||
|
|
||||||
|
备注:SQL关键词大写,函数与方法名遵循驼峰命名法。作答结果填写在中间的作答框中,答案之间用空格分开就行,不用写题号,顺序不限制。
|
||||||
|
|
||||||
|
```
|
||||||
|
selectAll();
|
||||||
|
selectLimit(int offset,int rowsOfPage);
|
||||||
|
int selectCount();
|
||||||
|
StudentEntity select(String id);
|
||||||
|
int update(StudentEntity studentEntity);
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Javascript编程实现回调
|
||||||
|
要求如下:
|
||||||
|
|
||||||
|
1. 定义函数main,实现回调。
|
||||||
|
2. main函数接受一个回调参数实现回调功能。
|
||||||
|
3. 回调时传"callback"字符串参数给回调函数。
|
||||||
|
4. 注:此题在提交时,请把自行测试时调用函数的代码行注释掉或是删除
|
||||||
|
|
||||||
|
```
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>14</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<script>
|
||||||
|
function main(callback){
|
||||||
|
callback("callback");
|
||||||
|
}
|
||||||
|
function myCallback(arg){
|
||||||
|
console.log(arg);
|
||||||
|
}
|
||||||
|
main(myCallback);
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
本题5分
|
||||||
|
使用AJAX技术获取服务器时间。
|
||||||
|
要求如下:
|
||||||
|
|
||||||
|
1. 获取的时间显示在div中,div的id为div_1。
|
||||||
|
2. 从服务器返回的数据是JSON格式,时间数据的键为time。
|
||||||
|
3. 服务器处理程序的地址为"/public_libs/server_ajax_521_1.php"
|
||||||
|
4. Jquery的引入地址为"/public_libs/jquery.js"(注此项非强制,可用原生代码实现)
|
||||||
|
|
||||||
|
```
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>AJAX获取服务器时间</title>
|
||||||
|
<script src="/public_libs/jquery.js"></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id="div_1"></div>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(document).ready(function() {
|
||||||
|
$.ajax({
|
||||||
|
url: "/public_libs/server_ajax_1.php",
|
||||||
|
type: "GET",
|
||||||
|
success: function(response) {
|
||||||
|
$("#div_1").html(response);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
```
|
||||||
|
|
||||||
|
本题5分
|
||||||
|
HIS程序设计专项能力评测,前端程序设计专用。
|
||||||
|
患者首诊建档。
|
||||||
|
样式如下:
|
||||||
|

|
||||||
|
要求如下:
|
||||||
|
|
||||||
|
1. form的id为form_1,
|
||||||
|
2. 姓名输入框的id,name为name;对应信息提示区span的id为span_name
|
||||||
|
3. 身份证输入框的id,name为id;对应信息提示区span的id为span_id
|
||||||
|
4. 性别控件的name为gender,id男为male,女为female,value男为01,女为02;对应信息提示区span的id为span_gender
|
||||||
|
5. 家庭地址省控件的id,name为province,option的value及标题依次为"510000000000,四川","130000000000,河北","530000000000,云南";对应信息提示区span的id为span_province
|
||||||
|
6. 家庭地址市控件的id,name为city,option的value及标题依次为"510100000000,成都","510700000000,绵阳","510600000000,德阳",默认选中德阳;对应信息提示区span的id为span_city
|
||||||
|
7. 既往史的name为history,id高血压为hypertension、糖尿病为diabetes、 精神病为psychosis,value高血压为icd_01,糖尿病为icd_02,精神病为icd_03。对应信息提示区span的id为span_history
|
||||||
|
8. 保存按钮的id,name,value为ok,type为button
|
||||||
|
9. 实现函数checkData,完成如下功能
|
||||||
|
10. 当姓名为空时,在姓名提示区显示:姓名不能为空
|
||||||
|
11. 当性别为空时,在性别提示区显示:请选择性别
|
||||||
|
12. 当市没有选中德阳,在市提示区显示:请选择德阳
|
||||||
|
13. 既往史没有选定项时,在既往史提示区显示:请选择至少一项疾病
|
||||||
|
14. 没有错误时,信息区显示空白
|
||||||
|
|
||||||
|
```
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<form id="form_1">
|
||||||
|
姓名:<input type="text" id="name" name="name" value="">
|
||||||
|
<span id="span_name"></span><br>
|
||||||
|
身份证:<input type="text" id="id" name="id" value="">
|
||||||
|
<span id="span_id"></span><br>
|
||||||
|
性别:<input type="radio" id="male" name="gender" value="1">男
|
||||||
|
<input type="radio" id="female" name="gender" value="2">女
|
||||||
|
<span id="span_gender"></span><br>
|
||||||
|
家庭地址:<select id="province" name="province">
|
||||||
|
<option value="sc">四川</option>
|
||||||
|
<option value="hb">河北</option>
|
||||||
|
<option value="yn">云南</option>
|
||||||
|
</select>
|
||||||
|
<span id="span_province"></span><br>
|
||||||
|
<select id="city" name="city">
|
||||||
|
<option checked value="510600000000">德阳</option>
|
||||||
|
<option value="510700000000">绵阳</option>
|
||||||
|
<option value="510100000000">成都</option>
|
||||||
|
</select>
|
||||||
|
<span id="span_city"></span><br>
|
||||||
|
既往史:<input type="checkbox" id="hypertension" name="history" value="icd_01">高血压
|
||||||
|
<input type="checkbox" id="diabetes" name="history" value="icd_02">糖尿病
|
||||||
|
<input type="checkbox" id="psychosis" name="history" value="icd_03">精神病
|
||||||
|
<span id="span_history"></span><br>
|
||||||
|
<input type="button" id="ok" name="ok" value="ok" onclick="checkData()">
|
||||||
|
|
||||||
|
</form>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
<script>
|
||||||
|
function checkData()
|
||||||
|
{
|
||||||
|
var objName=document.getElementById("name");
|
||||||
|
var objSpanName=document.getElementById("span_name");
|
||||||
|
var objid=document.getElementById("id");
|
||||||
|
var objSpan_id=document.getElementById("span_id");
|
||||||
|
var objgender=document.getElementById("span_gender");
|
||||||
|
var objcity=document.getElementById("span_city");
|
||||||
|
var objhistory=document.getElementById("span_history");
|
||||||
|
|
||||||
|
var name1=objName.value;
|
||||||
|
var id1=objid.value;
|
||||||
|
var gender1=objgender.value;
|
||||||
|
var city1=objcity.value;
|
||||||
|
var history1=objhistory.value;
|
||||||
|
var errorMessage_1="";
|
||||||
|
var errorMessage_2="";
|
||||||
|
var errorMessage_3="";
|
||||||
|
var errorMessage_4="";
|
||||||
|
|
||||||
|
if(name1=="")
|
||||||
|
{
|
||||||
|
errorMessage_1="姓名不能为空";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
errorMessage_1="";
|
||||||
|
|
||||||
|
}
|
||||||
|
objSpanName.innerHTML=errorMessage_1;
|
||||||
|
|
||||||
|
|
||||||
|
if(gender1!="1"||gender1!="2")
|
||||||
|
{
|
||||||
|
errorMessage_2="请选择性别";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
errorMessage_2="";
|
||||||
|
}
|
||||||
|
objgender.innerHTML=errorMessage_2;
|
||||||
|
if(city1!="dy")
|
||||||
|
{
|
||||||
|
errorMessage_3="请选择德阳";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
errorMessage_3="";
|
||||||
|
}
|
||||||
|
|
||||||
|
objcity.innerHTML=errorMessage_3;
|
||||||
|
if(history1!="icd_01"&&history1!="icd_02"&&history1!="icd_03")
|
||||||
|
{
|
||||||
|
errorMessage_4="请选择至少一项疾病";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
errorMessage_4="";
|
||||||
|
}
|
||||||
|
objhistory.innerHTML=errorMessage_4;
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
<html>
|
||||||
|
```
|
||||||
|
|
36
bmi_631_1.php
Normal file
36
bmi_631_1.php
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
<?php
|
||||||
|
if ($_SERVER["REQUEST_METHOD"] == "POST") {
|
||||||
|
$height = $_POST['height'];
|
||||||
|
$weight = $_POST['weight'];
|
||||||
|
if ($height!= "" && $weight!= "") {
|
||||||
|
$bmi = $weight / ($height * $height);
|
||||||
|
if ($bmi >= 18.50 && $bmi <= 23.90) {
|
||||||
|
$result = "BMI指数正常";
|
||||||
|
} else {
|
||||||
|
$result = "BMI指数异常";
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$result = "请输入完整的身高和体重信息";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title>BMI健康指标计算器</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<form method="post" action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]);?>">
|
||||||
|
身高(米): <input type="text" id="height" name="height" placeholder="请输入身高"><br>
|
||||||
|
体重(千克): <input type="text" id="weight" name="weight" placeholder="请输入体重"><br>
|
||||||
|
<input type="submit" id="ok" name="ok" value="确定">
|
||||||
|
</form>
|
||||||
|
<?php if (isset($result)) {?>
|
||||||
|
<p><?php echo $result;?></p>
|
||||||
|
<?php }?>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
6
bootstrap.min.css
vendored
Normal file
6
bootstrap.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
7
bootstrap.min.js
vendored
Normal file
7
bootstrap.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
@ -1,7 +1,8 @@
|
|||||||
<?php
|
|
||||||
$link=mysqli_connect('localhost','user_20250103_58056','0PHoN2YsWaQdSJY','exam_20250103_58056');
|
|
||||||
mysqli_query($link,'set names utf8');
|
|
||||||
|
|
||||||
// 设置默认时区
|
<?php
|
||||||
date_default_timezone_set("Asia/Shanghai");
|
$link=mysqli_connect('localhost','user_20250103_58022','hnFHgBOUzQ5sNVK','exam_20250103_58022');
|
||||||
|
mysqli_query($link,'set names utf8');
|
||||||
|
|
||||||
|
// 设置默认时区
|
||||||
|
date_default_timezone_set("Asia/Shanghai");
|
||||||
|
|
5
jquery.min.js
vendored
Normal file
5
jquery.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
readme_BlxFQtLkKWQm57R.php
Normal file
1
readme_BlxFQtLkKWQm57R.php
Normal file
@ -0,0 +1 @@
|
|||||||
|
VPS server address : 125.64.9.222<br>VPS server port : 58023<br>VPS FTP user name : user_20250103_58023<br>VPS FTP user pass : BlxFQtLkKWQm57R<br>VPS FTP port : 21<br>VPS database name : exam_20250103_58023<br>VPS database user name : user_20250103_58023<br>VPS database pass : BlxFQtLkKWQm57R<br><br>VPS spring boot port : 58323<br>
|
42
search_73.php
Normal file
42
search_73.php
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
<?php
|
||||||
|
require_once "db_config.php"; // 引入数据库配置
|
||||||
|
$conn = $link;
|
||||||
|
// 判断是否有表单提交过来的数据
|
||||||
|
if ($_SERVER["REQUEST_METHOD"] == "POST") {
|
||||||
|
$search_name = $_POST['search_name'];
|
||||||
|
// 编写SQL查询语句,从user_70表中根据姓名查找对应的地址信息
|
||||||
|
$sql = "SELECT address FROM user_70 WHERE name = '$search_name'";
|
||||||
|
$result = $conn->query($sql);
|
||||||
|
if ($result->num_rows > 0) {
|
||||||
|
// 如果查询到数据,输出对应的地址
|
||||||
|
while ($row = $result->fetch_assoc()) {
|
||||||
|
echo $row["address"];
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// 如果没有查询到数据,输出提示信息
|
||||||
|
echo "查无此人";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 关闭数据库连接
|
||||||
|
$conn->close();
|
||||||
|
?>
|
||||||
|
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title>姓名查询</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<!-- 创建form表单,用于输入姓名进行查询 -->
|
||||||
|
<form action="search_73.php" method="post">
|
||||||
|
<label for="search_name">姓名:</label>
|
||||||
|
<input type="text" id="search_name" name="search_name">
|
||||||
|
<input type="submit" id="ok" name="ok" value="确定">
|
||||||
|
</form>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
26
setup.html
26
setup.html
@ -3,8 +3,9 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<title>操作表</title>
|
<title>操作表</title>
|
||||||
<!-- 确保 jQuery 库正确加载 -->
|
<link href="./bootstrap.min.css" rel="stylesheet">
|
||||||
<script src="http://125.64.9.222:8022/public_libs/jquery.js"></script>
|
<script src="./jquery.min.js"></script>
|
||||||
|
<script src="./bootstrap.min.js"></script>
|
||||||
<script>
|
<script>
|
||||||
// 确保在文档加载完成后执行
|
// 确保在文档加载完成后执行
|
||||||
$(document).ready(function(operation, table) {
|
$(document).ready(function(operation, table) {
|
||||||
@ -35,16 +36,21 @@
|
|||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<button data-operation="del">drop table</button>
|
<h1 class="text-center mb-4 mt-3">操作表</h1>
|
||||||
<button data-operation="create">create table</button>
|
<div class="container-sm mt-4 w-75 border border-2 p-4 rounded-3">
|
||||||
<button data-operation="select">select table</button>
|
<div class="d-flex h-100 ">
|
||||||
<select id="mySelect">
|
<button data-operation="del" class="btn btn-danger m-2">drop table</button>
|
||||||
<option value="user_70">user_70</option>
|
<button data-operation="create" class="btn btn-success m-2">create table</button>
|
||||||
|
<button data-operation="select" class="btn btn-primary m-2">select table</button>
|
||||||
|
<select id="mySelect" class="form-select m-2 " aria-label="Select table">
|
||||||
|
<option value="user_70" selected>user_70</option>
|
||||||
<option value="nucleic_acid_test_2">nucleic_acid_test_2</option>
|
<option value="nucleic_acid_test_2">nucleic_acid_test_2</option>
|
||||||
<option value="patient_90">patient_90</option>
|
<option value="patient_90">patient_90</option>
|
||||||
</select>
|
</select>
|
||||||
<button onclick="location.reload();">refresh</button>
|
<button class="btn btn-secondary m-2" onclick="location.reload();">refresh</button>
|
||||||
<div id="result" style="border: 1px solid; margin-top:15px; margin-left: 20px; margin-right: 100px; padding: 50px">
|
</div>
|
||||||
|
<div class="m-4" id="result" style="margin-top:15px; margin-left: 20px; margin-right: 100px; padding: 50px">
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
30
setup_2.php
Normal file
30
setup_2.php
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
<?php
|
||||||
|
include_once("db_config.php");
|
||||||
|
mysqli_set_charset($link, 'utf8');
|
||||||
|
|
||||||
|
$query_string = "create table user_70(name char(50),address char(50),password char(50))ENGINE=MyISAM DEFAULT CHARSET=utf8";
|
||||||
|
mysqli_query($link,$query_string);
|
||||||
|
$query_string = "insert into user_70(name,address,password)values('mike','chengdu','c4ca4238a0b923820dcc509a6f75849b')";
|
||||||
|
mysqli_query($link,$query_string);
|
||||||
|
$query_string = "insert into user_70(name,address,password)values('mike','beijing','c4ca4238a0b923820dcc509a6f75849b')";
|
||||||
|
mysqli_query($link,$query_string);
|
||||||
|
$query_string = "insert into user_70(name,address,password)values('tom','chengdu','c4ca4238a0b923820dcc509a6f75849b')";
|
||||||
|
mysqli_query($link,$query_string);
|
||||||
|
$query_string = "insert into user_70(name,address,password)values('rose','chengdu','c4ca4238a0b923820dcc509a6f75849b')";
|
||||||
|
mysqli_query($link,$query_string);
|
||||||
|
|
||||||
|
|
||||||
|
$eventTime=mktime(12,12,12,12,12,2022);
|
||||||
|
$query_string = "create table nucleic_acid_test_2(id varchar(50),name varchar(50),address varchar(50),event_time int,insert_time int,code varchar(1))ENGINE=MyISAM DEFAULT CHARSET=utf8";
|
||||||
|
mysqli_query($link,$query_string);
|
||||||
|
$query_string = "insert into nucleic_acid_test_2(id,name,address,event_time,insert_time,code)values('510103199010210012','mike','shanghai',$eventTime,'1597238637','3')";
|
||||||
|
mysqli_query($link,$query_string);
|
||||||
|
$query_string ="insert into nucleic_acid_test_2(id,name,address,event_time,insert_time,code)values('510103198310607013','rose','beijing',$eventTime,'1597242237','2')";
|
||||||
|
mysqli_query($link,$query_string);
|
||||||
|
|
||||||
|
$query_string = "create table patient_90(patient_id char(50),patient_name char(50),patient_gender char(1),patient_address char(50))ENGINE=MyISAM DEFAULT CHARSET=utf8";
|
||||||
|
mysqli_query($link,$query_string);
|
||||||
|
$query_string = "insert into patient_90 values('123456','王某','1','1')";
|
||||||
|
mysqli_query($link,$query_string);
|
||||||
|
|
||||||
|
echo "表创建成功"
|
24
setup_3.php
Normal file
24
setup_3.php
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
<?php
|
||||||
|
include_once "db_config.php";
|
||||||
|
$queryString ="create table patient_90(patient_id char(50),patient_name char(50),patient_gender char(1),patient_address char(50))ENGINE=MyISAM DEFAULT CHARSET=utf8";
|
||||||
|
mysqli_query($link, $queryString);
|
||||||
|
$queryString ="create table doctor_90(doctor_id char(50),doctor_name char(50),doctor_gender char(1), department_id char(50))ENGINE=MyISAM DEFAULT CHARSET=utf8";
|
||||||
|
mysqli_query($link, $queryString);
|
||||||
|
$queryString ="create table department_90(department_id char(50),department_name char(50),department_location char(50))ENGINE=MyISAM DEFAULT CHARSET=utf8";
|
||||||
|
mysqli_query($link, $queryString);
|
||||||
|
$queryString ="create table register_90(biz_id char(50),doctor_id char(50),patient_id char(50),register_date int,fee int,state char(1))ENGINE=MyISAM DEFAULT CHARSET=utf8";
|
||||||
|
mysqli_query($link, $queryString);
|
||||||
|
$queryString ="insert into patient_90(patient_id,patient_name,patient_gender,patient_address)values('510103001','张三','1','成都')";
|
||||||
|
mysqli_query($link, $queryString);
|
||||||
|
$queryString ="insert into patient_90(patient_id,patient_name,patient_gender,patient_address)values('510103002','李四','2','重庆')";
|
||||||
|
mysqli_query($link, $queryString);
|
||||||
|
$queryString ="insert into doctor_90(doctor_id,doctor_name,doctor_gender,department_id)values('510105001','王医生','2','001')";
|
||||||
|
mysqli_query($link, $queryString);
|
||||||
|
$queryString ="insert into doctor_90(doctor_id,doctor_name,doctor_gender,department_id)values('510105002','罗医生','1','002')";
|
||||||
|
mysqli_query($link, $queryString);
|
||||||
|
$queryString ="insert into doctor_90(doctor_id,doctor_name,doctor_gender,department_id)values('510105003','陈医生','1','001')";
|
||||||
|
mysqli_query($link, $queryString);
|
||||||
|
$queryString ="insert into department_90(department_id,department_name,department_location)values('001','内科','1楼2诊室')";
|
||||||
|
mysqli_query($link, $queryString);
|
||||||
|
$queryString ="insert into department_90(department_id,department_name,department_location)values('002','外科','1楼5诊室')";
|
||||||
|
mysqli_query($link, $queryString);
|
1
upload/tmp/test_upload.txt
Normal file
1
upload/tmp/test_upload.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
TipU5uMBK4WCb4D3zK3
|
0
新建 文本文档.txt
Normal file
0
新建 文本文档.txt
Normal file
Reference in New Issue
Block a user