Compare commits
5 Commits
4d2d5e2d5e
...
main
Author | SHA1 | Date | |
---|---|---|---|
d40a028cd6 | |||
4442667890 | |||
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>
|
||||||
|
```
|
||||||
|
|
27
api_73_5_e_insert.php
Normal file
27
api_73_5_e_insert.php
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
<?php
|
||||||
|
// 数据库连接
|
||||||
|
include 'db_config.php';
|
||||||
|
|
||||||
|
// 获取请求参数
|
||||||
|
$id = $_GET['id'];
|
||||||
|
$name = $_GET['name'];
|
||||||
|
$address = $_GET['address'];
|
||||||
|
$event_time = intval($_GET['event_time']);
|
||||||
|
$code = $_GET['code'];
|
||||||
|
|
||||||
|
// 检查是否已有相同记录
|
||||||
|
$sql_check = "SELECT * FROM nucleic_acid_test_2 WHERE id = '$id' AND address = '$address' AND event_time = $event_time";
|
||||||
|
$result_check = $link->query($sql_check);
|
||||||
|
|
||||||
|
if ($result_check->num_rows > 0) {
|
||||||
|
// 如果已有记录,直接返回码值
|
||||||
|
echo $code;
|
||||||
|
} else {
|
||||||
|
// 插入新记录
|
||||||
|
$sql_insert = "INSERT INTO nucleic_acid_test_2 (id, name, address, event_time, code) VALUES ('$id', '$name', '$address', $event_time, '$code')";
|
||||||
|
if ($link->query($sql_insert) === TRUE) {
|
||||||
|
echo $code;
|
||||||
|
} else {
|
||||||
|
echo "插入失败: " . $link->error;
|
||||||
|
}
|
||||||
|
}
|
50
api_73_5_e_select.php
Normal file
50
api_73_5_e_select.php
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
<?php
|
||||||
|
// 数据库连接
|
||||||
|
include "db_config.php";
|
||||||
|
$conn = $link;
|
||||||
|
|
||||||
|
// 获取请求参数
|
||||||
|
$id = $_GET['id'];
|
||||||
|
$name = $_GET['name'];
|
||||||
|
$address = $_GET['address'];
|
||||||
|
$event_time = intval($_GET['event_time']);
|
||||||
|
|
||||||
|
// 查询是否存在红码时空交集
|
||||||
|
$sql_red = "SELECT * FROM nucleic_acid_test_2
|
||||||
|
WHERE address = '$address' AND ABS(event_time - $event_time) < 1800 AND code = '3'";
|
||||||
|
$result_red = $conn->query($sql_red);
|
||||||
|
|
||||||
|
if ($result_red->num_rows > 0) {
|
||||||
|
// 存在红码时空交集,赋红码并入库
|
||||||
|
$sql_check = "SELECT * FROM nucleic_acid_test_2 WHERE id = '$id' AND address = '$address' AND event_time = $event_time";
|
||||||
|
$result_check = $conn->query($sql_check);
|
||||||
|
if ($result_check->num_rows == 0) {
|
||||||
|
$sql_insert = "INSERT INTO nucleic_acid_test_2 (id, name, address, event_time, code) VALUES ('$id', '$name', '$address', $event_time, '3')";
|
||||||
|
$conn->query($sql_insert);
|
||||||
|
}
|
||||||
|
echo "3";
|
||||||
|
$conn->close();
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询是否存在黄码时空交集
|
||||||
|
$sql_yellow = "SELECT * FROM nucleic_acid_test_2
|
||||||
|
WHERE (address = '$address' OR ABS(event_time - $event_time) < 1800) AND code = '2'";
|
||||||
|
$result_yellow = $conn->query($sql_yellow);
|
||||||
|
|
||||||
|
if ($result_yellow->num_rows > 0) {
|
||||||
|
// 存在黄码时空交集,赋黄码并入库
|
||||||
|
$sql_check = "SELECT * FROM nucleic_acid_test_2 WHERE id = '$id' AND address = '$address' AND event_time = $event_time";
|
||||||
|
$result_check = $conn->query($sql_check);
|
||||||
|
if ($result_check->num_rows == 0) {
|
||||||
|
$sql_insert = "INSERT INTO nucleic_acid_test_2 (id, name, address, event_time, code) VALUES ('$id', '$name', '$address', $event_time, '2')";
|
||||||
|
$conn->query($sql_insert);
|
||||||
|
}
|
||||||
|
echo "2";
|
||||||
|
$conn->close();
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 无风险,返回绿码
|
||||||
|
echo "1";
|
||||||
|
?>
|
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");
|
||||||
|
|
28
drop_tables.php
Normal file
28
drop_tables.php
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
<?php
|
||||||
|
include_once("db_config.php");
|
||||||
|
$conn = $link;
|
||||||
|
$sql = "DROP TABLE IF EXISTS `user_70`;";
|
||||||
|
$result = mysqli_query($conn, $sql);
|
||||||
|
if ($result) {
|
||||||
|
echo "Table users dropped successfully.";
|
||||||
|
} else {
|
||||||
|
echo "Error dropping table: " . mysqli_error($conn);
|
||||||
|
}
|
||||||
|
|
||||||
|
$sql = "DROP TABLE IF EXISTS `nucleic_acid_test_2`;";
|
||||||
|
$result = mysqli_query($conn, $sql);
|
||||||
|
if ($result) {
|
||||||
|
echo "Table users dropped successfully.";
|
||||||
|
} else {
|
||||||
|
echo "Error dropping table: " . mysqli_error($conn);
|
||||||
|
}
|
||||||
|
|
||||||
|
$sql = "DROP TABLE IF EXISTS `patient_90`;";
|
||||||
|
$result = mysqli_query($conn, $sql);
|
||||||
|
if ($result) {
|
||||||
|
echo "Table users dropped successfully.";
|
||||||
|
} else {
|
||||||
|
echo "Error dropping table: " . mysqli_error($conn);
|
||||||
|
}
|
||||||
|
mysqli_close($conn);
|
||||||
|
|
3
exam_config.php
Normal file
3
exam_config.php
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
<?php
|
||||||
|
$link=mysqli_connect('localhost','user_20241115_58056','K6UJKaRLiipvw','exam_20241115_58056');
|
||||||
|
mysqli_query($link,'set names utf8');
|
15
exam_setup.php
Normal file
15
exam_setup.php
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
<?php
|
||||||
|
require_once "exam_config.php";
|
||||||
|
|
||||||
|
//先删除在创建
|
||||||
|
mysqli_query($link,"drop table user_70");
|
||||||
|
|
||||||
|
$queryString="create table user_70(name char(50),address char(50),password char(50))ENGINE=MyISAM DEFAULT CHARSET=utf8";
|
||||||
|
mysqli_query($link,$queryString);
|
||||||
|
echo mysqli_error($link)."<br>";
|
||||||
|
$queryString="insert into user_70(name,address,password)values('mike','shanghai','c4ca4238a0b923820dcc509a6f75849b')";
|
||||||
|
mysqli_query($link,$queryString);
|
||||||
|
echo mysqli_error($link)."<br>";
|
||||||
|
$queryString="insert into user_70(name,address,password)values('rose','beijing','c4ca4238a0b923820dcc509a6f75849b')";
|
||||||
|
mysqli_query($link,$queryString);
|
||||||
|
echo mysqli_error($link)."<br>";
|
27
form_test_1.php
Normal file
27
form_test_1.php
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
<meta charset="UTF-8">
|
||||||
|
<?php
|
||||||
|
//里程碑 拿到浏览器提交的数据,数据重现(现场恢复) 无状态协议模式 stateless
|
||||||
|
//实现单选,复选,下拉框的数据重现
|
||||||
|
if(isset($_POST['ok'])){
|
||||||
|
//单选按钮与复选框在用户没有操作的情况下不会提交默认值到服务器,因此需要单独做逻辑处理
|
||||||
|
//var_dump($_POST);
|
||||||
|
echo $_POST['name'];
|
||||||
|
echo $_POST['age'];
|
||||||
|
$name=$_POST['name'];
|
||||||
|
$age=$_POST['age'];
|
||||||
|
|
||||||
|
}else{
|
||||||
|
$name="姓名不能为空";
|
||||||
|
$age = "";
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
|
<form action="" method="post">
|
||||||
|
姓名:<input type="text" id="name" name="name" value="<?php echo $name;?>"><br>
|
||||||
|
年龄:<input type="text" id="age" name="age" value="<?php echo $age;?>"><br></br>
|
||||||
|
<br>
|
||||||
|
<input type="submit" id="ok" name="ok" value="ok">
|
||||||
|
</form>
|
||||||
|
<script>
|
||||||
|
|
||||||
|
</script>
|
20
img_code_1.php
Normal file
20
img_code_1.php
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
<?php
|
||||||
|
//GD
|
||||||
|
//phpinfo();
|
||||||
|
//登录验证码
|
||||||
|
session_start();
|
||||||
|
|
||||||
|
header("Content-type: image/png; charset=utf-8");
|
||||||
|
//创建一个图片
|
||||||
|
$image = imagecreate(120,30);
|
||||||
|
//定义背景颜色
|
||||||
|
$black = imagecolorallocate($image,255, 0, 0);//reb 000代表黑
|
||||||
|
//定义前景颜色
|
||||||
|
$white = imagecolorallocate($image,255, 255, 255);
|
||||||
|
|
||||||
|
imagefill($image, 0, 0, $black );//向图片中填充背景
|
||||||
|
$string = $_GET['img_code'];
|
||||||
|
//把文字写到图片中
|
||||||
|
imagestring( $image, 5, 6, 4, $string, $white);
|
||||||
|
//生成png格式图形
|
||||||
|
imagepng( $image );
|
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
80
list_72_1.php
Normal file
80
list_72_1.php
Normal file
@ -0,0 +1,80 @@
|
|||||||
|
<meta charset="UTF-8">
|
||||||
|
<?php
|
||||||
|
//数据列表 带编辑,新增与删除操作
|
||||||
|
//引入数据库配置文件
|
||||||
|
/*
|
||||||
|
* select * from student_1 limit 0,10
|
||||||
|
* select * from student_1 limit 10,10
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
require_once "db_config.php";
|
||||||
|
mysqli_set_charset($link, 'utf8');
|
||||||
|
//取总记录数
|
||||||
|
$queryString="select count(name) as maxRows from user_70";
|
||||||
|
$rs=mysqli_query($link,$queryString);
|
||||||
|
$row=mysqli_fetch_assoc($rs);
|
||||||
|
$maxRows=$row['maxRows'];
|
||||||
|
|
||||||
|
$rowsOfPage = $_GET['rows_of_page'] ?? 10;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if(isset($_GET['action'])){
|
||||||
|
//翻页进入
|
||||||
|
if($_GET['action']=="top"){
|
||||||
|
$offset=0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if($_GET['action']=="previous"){
|
||||||
|
$offset=$_GET['offset']-$rowsOfPage;
|
||||||
|
if($offset<0){
|
||||||
|
$offset=0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if($_GET['action']=="next"){
|
||||||
|
$offset=$_GET['offset']+$rowsOfPage;
|
||||||
|
//处理最后一页的计算逻辑
|
||||||
|
if($offset>=$maxRows){
|
||||||
|
$offset=$_GET['offset'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if($_GET['action']=='bottom'){
|
||||||
|
if($maxRows%$rowsOfPage==0){
|
||||||
|
//整页
|
||||||
|
$offset=$maxRows-$rowsOfPage;
|
||||||
|
}else{
|
||||||
|
//非整页
|
||||||
|
$offset=$maxRows-$maxRows%$rowsOfPage;
|
||||||
|
//20 10 20-10 25-25%10 20
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}else{
|
||||||
|
//第一次进入,偏移量为0
|
||||||
|
$offset=0;
|
||||||
|
}
|
||||||
|
$queryString="select * from user_70 limit $offset,$rowsOfPage";
|
||||||
|
$rs=mysqli_query($link,$queryString);
|
||||||
|
//用循环语句,从数据集中读出每一条记录
|
||||||
|
echo "<table border='1'>";
|
||||||
|
//id,name,password,gender,birthday,course,hometown,resume
|
||||||
|
echo "<tr><td colspan='10'>姓名列表</td>";
|
||||||
|
$pattern = '/(\d+)/';
|
||||||
|
while ($row=mysqli_fetch_assoc($rs)){
|
||||||
|
preg_match_all($pattern, $row['name'], $matches);
|
||||||
|
echo "<tr>";
|
||||||
|
echo "<td>".($matches[0][0]+1)."</td>";
|
||||||
|
echo "<td>".$row['name']."</td>";
|
||||||
|
|
||||||
|
}
|
||||||
|
echo "<tr><td colspan='10'>
|
||||||
|
<a href='list_72_1.php?action=top&offset=$offset&rows_of_page=$rowsOfPage'>首页</a>
|
||||||
|
|
|
||||||
|
<a href='list_72_1.php?action=previous&offset=$offset&rows_of_page=$rowsOfPage'>上一页</a>
|
||||||
|
|
|
||||||
|
<a href='list_72_1.php?action=next&offset=$offset&rows_of_page=$rowsOfPage'>下一页</a>
|
||||||
|
|
|
||||||
|
<a href='list_72_1.php?action=bottom&offset=$offset&rows_of_page=$rowsOfPage'>末页</a>
|
||||||
|
</td></tr>";
|
||||||
|
echo "</table>";
|
4
my_first_program.php
Normal file
4
my_first_program.php
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
<?php
|
||||||
|
$link=mysqli_connect("localhost",'user_20241115_58056','K6UJKaRLiipvw','exam_20241115_58056');
|
||||||
|
mysqli_query($link,"set names utf8");
|
||||||
|
var_dump($link);
|
72
patient_90.php
Normal file
72
patient_90.php
Normal file
@ -0,0 +1,72 @@
|
|||||||
|
<?php
|
||||||
|
require 'db_config.php';
|
||||||
|
$conn = $link;
|
||||||
|
mysqli_set_charset($link, 'utf8');
|
||||||
|
// 初始化变量
|
||||||
|
$patient_id = $patient_name = $patient_gender = $patient_address = "";
|
||||||
|
|
||||||
|
// 检查表单提交
|
||||||
|
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||||
|
$patient_id = ($_POST['patient_id']);
|
||||||
|
$patient_name = ($_POST['patient_name']);
|
||||||
|
$patient_gender = ($_POST['patient_gender']);
|
||||||
|
$patient_address = ($_POST['patient_address']);
|
||||||
|
|
||||||
|
// 保存数据
|
||||||
|
try {
|
||||||
|
// 检查是否存在该患者
|
||||||
|
$query = "SELECT COUNT(*) AS count FROM patient_90 WHERE patient_id = '$patient_id'";
|
||||||
|
$result = mysqli_query($conn, $query);
|
||||||
|
$row = mysqli_fetch_assoc($result);
|
||||||
|
|
||||||
|
if ($row['count'] > 0) {
|
||||||
|
// 更新记录
|
||||||
|
$update_query = "UPDATE patient_90 SET
|
||||||
|
patient_name = '$patient_name',
|
||||||
|
patient_gender = '$patient_gender',
|
||||||
|
patient_address = '$patient_address'
|
||||||
|
WHERE patient_id = '$patient_id'";
|
||||||
|
mysqli_query($conn, $update_query);
|
||||||
|
} else {
|
||||||
|
// 插入新记录
|
||||||
|
$insert_query = "INSERT INTO patient_90
|
||||||
|
(patient_id, patient_name, patient_gender, patient_address)
|
||||||
|
VALUES
|
||||||
|
('$patient_id', '$patient_name', '$patient_gender', '$patient_address')";
|
||||||
|
mysqli_query($conn, $insert_query);
|
||||||
|
}
|
||||||
|
} catch (Exception $e) {
|
||||||
|
die("数据保存失败: " . $e->getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>患者建档</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h1>患者建档</h1>
|
||||||
|
<form action="patient_90.php" method="post">
|
||||||
|
<label for="patient_name">姓名:</label>
|
||||||
|
<input type="text" id="patient_name" name="patient_name" value=""><br>
|
||||||
|
|
||||||
|
<label for="patient_id">身份证:</label>
|
||||||
|
<input type="text" id="patient_id" name="patient_id" value=""><br>
|
||||||
|
|
||||||
|
<label>性别:</label>
|
||||||
|
<input type="radio" id="male" name="patient_gender" value="1" <?= $patient_gender === '1' ? 'checked' : '' ?>>
|
||||||
|
<label for="male">男</label>
|
||||||
|
<input type="radio" id="female" name="patient_gender" value="2" <?= $patient_gender === '2' ? 'checked' : '' ?>>
|
||||||
|
<label for="female">女</label><br>
|
||||||
|
|
||||||
|
<label for="patient_address">家庭住址:</label>
|
||||||
|
<input type="text" id="patient_address" name="patient_address" value=""><br>
|
||||||
|
|
||||||
|
<input type="submit" id="ok" name="ok" value="ok">
|
||||||
|
</form>
|
||||||
|
</body>
|
||||||
|
</html>
|
29
program_85.php
Normal file
29
program_85.php
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
<?php
|
||||||
|
// 自定义函数实现首尾字母交换
|
||||||
|
function mySwap($string) {
|
||||||
|
// 检查字符串是否为空或长度为1
|
||||||
|
if (strlen($string) <= 1) {
|
||||||
|
return $string;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取首字母和尾字母
|
||||||
|
$firstChar = $string[0];
|
||||||
|
$lastChar = $string[strlen($string) - 1];
|
||||||
|
|
||||||
|
// 替换首尾字母
|
||||||
|
$swappedString = $lastChar . substr($string, 1, -1) . $firstChar;
|
||||||
|
|
||||||
|
return $swappedString;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取URL传递的字符串
|
||||||
|
if (isset($_GET['string'])) {
|
||||||
|
$string = $_GET['string'];
|
||||||
|
|
||||||
|
// 输出结果
|
||||||
|
echo mySwap($string);
|
||||||
|
} else {
|
||||||
|
echo "请通过URL传递字符串,例如:program_85.php?string=example";
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<?php
|
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>
|
5
robot_251.php
Normal file
5
robot_251.php
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<?php
|
||||||
|
$content = file_get_contents("http://125.64.9.222:8022/goods/flash_sale.php");
|
||||||
|
$pattern = '/\d+(?=元)/';
|
||||||
|
preg_match_all($pattern, $content, $matches);
|
||||||
|
echo "[".$matches[0][1]."]";
|
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>
|
74
search_73_1.php
Normal file
74
search_73_1.php
Normal file
@ -0,0 +1,74 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="zh-CN">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title>姓名与地址查询</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<form method="POST" action="search_73_1.php">
|
||||||
|
<label for="searchName">姓名查询:</label>
|
||||||
|
<input type="text" id="searchName" name="searchName">
|
||||||
|
|
||||||
|
<label for="searchAddress">地址查询:</label>
|
||||||
|
<input type="text" id="searchAddress" name="searchAddress">
|
||||||
|
|
||||||
|
<label for="and">AND</label>
|
||||||
|
<input type="radio" id="and" name="searchLogic" value="and" checked>
|
||||||
|
|
||||||
|
<label for="or">OR</label>
|
||||||
|
<input type="radio" id="or" name="searchLogic" value="or">
|
||||||
|
|
||||||
|
<input type="submit" id="ok" name="ok" value="ok">
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
include_once 'db_config.php';
|
||||||
|
if ($_SERVER["REQUEST_METHOD"] == "POST") {
|
||||||
|
// 获取用户输入的查询条件
|
||||||
|
$searchName = $_POST['searchName'] ?? '';
|
||||||
|
$searchAddress = $_POST['searchAddress'] ?? '';
|
||||||
|
$searchLogic = $_POST['searchLogic'] ?? 'and';
|
||||||
|
|
||||||
|
// 设置字符集
|
||||||
|
mysqli_set_charset($link, "utf8");
|
||||||
|
// 动态构建查询语句
|
||||||
|
$conditions = [];
|
||||||
|
$params = [];
|
||||||
|
$types = '';
|
||||||
|
|
||||||
|
if (!empty($searchName)) {
|
||||||
|
$conditions[] = "name = ?";
|
||||||
|
$params[] = $searchName;
|
||||||
|
$types .= 's';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!empty($searchAddress)) {
|
||||||
|
$conditions[] = "address = ?";
|
||||||
|
$params[] = $searchAddress;
|
||||||
|
$types .= 's';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (count($conditions) > 0) {
|
||||||
|
$sql = "SELECT * FROM user_70 WHERE " . implode(" " . strtoupper($searchLogic) . " ", $conditions);
|
||||||
|
$stmt = $link->prepare($sql);
|
||||||
|
$stmt->bind_param($types, ...$params);
|
||||||
|
$stmt->execute();
|
||||||
|
$result = $stmt->get_result();
|
||||||
|
|
||||||
|
$rowCount = $result->num_rows;
|
||||||
|
echo "<p>[" . $rowCount . "]</p>"; // 显示记录数
|
||||||
|
|
||||||
|
if ($rowCount > 0) {
|
||||||
|
while ($row = $result->fetch_assoc()) {
|
||||||
|
echo "<p>姓名: " . htmlspecialchars($row['name']) . " 地址: " . htmlspecialchars($row['address']) . "</p>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$stmt->close();
|
||||||
|
} else {
|
||||||
|
// 如果没有提供查询条件则不执行查询
|
||||||
|
echo "<p>[0]</p>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
30
setup.html
30
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>
|
||||||
<option value="nucleic_acid_test_2">nucleic_acid_test_2</option>
|
<button data-operation="select" class="btn btn-primary m-2">select table</button>
|
||||||
<option value="patient_90">patient_90</option>
|
<select id="mySelect" class="form-select m-2 " aria-label="Select table">
|
||||||
</select>
|
<option value="user_70" selected>user_70</option>
|
||||||
<button onclick="location.reload();">refresh</button>
|
<option value="nucleic_acid_test_2">nucleic_acid_test_2</option>
|
||||||
<div id="result" style="border: 1px solid; margin-top:15px; margin-left: 20px; margin-right: 100px; padding: 50px">
|
<option value="patient_90">patient_90</option>
|
||||||
|
</select>
|
||||||
|
<button class="btn btn-secondary m-2" onclick="location.reload();">refresh</button>
|
||||||
|
</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/test_upload.txt
Normal file
1
upload/test_upload.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
6rlWseYg4VDRzwkAjLo
|
1
upload/tmp/test_upload.txt
Normal file
1
upload/tmp/test_upload.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
TipU5uMBK4WCb4D3zK3
|
14
www/admin/back_index.php
Normal file
14
www/admin/back_index.php
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
|
||||||
|
<?php
|
||||||
|
?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="Zh-CN">
|
||||||
|
<head>
|
||||||
|
<title>main</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<iframe src="top.html"></iframe>
|
||||||
|
<iframe src="left.html"></iframe>
|
||||||
|
<iframe src="right.html"></iframe>
|
||||||
|
</body>
|
||||||
|
</html>
|
10
www/admin/left.html
Normal file
10
www/admin/left.html
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title>Title</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
10
www/admin/right.html
Normal file
10
www/admin/right.html
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title>Title</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
10
www/admin/top.html
Normal file
10
www/admin/top.html
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title>Title</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
0
新建 文本文档.txt
Normal file
0
新建 文本文档.txt
Normal file
Reference in New Issue
Block a user