-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit ea5cfa5
Showing
64 changed files
with
3,650 additions
and
0 deletions.
There are no files selected for viewing
Empty file.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<projectDescription> | ||
<name>PHP_bighomework</name> | ||
<comment>Create By HBuilder</comment> | ||
<projects> | ||
</projects> | ||
<buildSpec> | ||
<buildCommand> | ||
<name>com.aptana.ide.core.unifiedBuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
</buildSpec> | ||
<natures> | ||
<nature>com.aptana.projects.webnature</nature> | ||
</natures> | ||
<filteredResources> | ||
<filter> | ||
<id>1591243494976</id> | ||
<name></name> | ||
<type>10</type> | ||
<matcher> | ||
<id>org.eclipse.ui.ide.orFilterMatcher</id> | ||
<arguments> | ||
<matcher> | ||
<id>org.eclipse.ui.ide.multiFilter</id> | ||
<arguments>1.0-projectRelativePath-matches-false-false-bin</arguments> | ||
</matcher> | ||
<matcher> | ||
<id>org.eclipse.ui.ide.multiFilter</id> | ||
<arguments>1.0-projectRelativePath-matches-false-false-setting</arguments> | ||
</matcher> | ||
</arguments> | ||
</matcher> | ||
</filter> | ||
<filter> | ||
<id>1591245077138</id> | ||
<name></name> | ||
<type>26</type> | ||
<matcher> | ||
<id>org.eclipse.ui.ide.multiFilter</id> | ||
<arguments>1.0-name-matches-false-false-node_modules</arguments> | ||
</matcher> | ||
</filter> | ||
<filter> | ||
<id>1591245077140</id> | ||
<name></name> | ||
<type>26</type> | ||
<matcher> | ||
<id>org.eclipse.ui.ide.multiFilter</id> | ||
<arguments>1.0-name-matches-false-false-node_modules</arguments> | ||
</matcher> | ||
</filter> | ||
</filteredResources> | ||
</projectDescription> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<module type="JAVA_MODULE" version="4"> | ||
<component name="NewModuleRootManager"> | ||
<output url="file://$MODULE_DIR$/bin" /> | ||
<exclude-output /> | ||
<content url="file://$MODULE_DIR$" /> | ||
<orderEntry type="sourceFolder" forTests="false" /> | ||
</component> | ||
</module> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,141 @@ | ||
-- phpMyAdmin SQL Dump | ||
-- version 3.4.10.1 | ||
-- http://www.phpmyadmin.net | ||
-- | ||
-- 主机: localhost | ||
-- 生成日期: 2020 年 06 月 12 日 11:58 | ||
-- 服务器版本: 5.5.20 | ||
-- PHP 版本: 5.3.10 | ||
|
||
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; | ||
SET time_zone = "+00:00"; | ||
|
||
|
||
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; | ||
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; | ||
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; | ||
/*!40101 SET NAMES utf8 */; | ||
|
||
-- | ||
-- 数据库: `bighomework` | ||
-- | ||
|
||
-- -------------------------------------------------------- | ||
|
||
-- | ||
-- 表的结构 `admin` | ||
-- | ||
|
||
CREATE TABLE IF NOT EXISTS `admin` ( | ||
`username` varchar(10) NOT NULL, | ||
`password` char(32) NOT NULL, | ||
UNIQUE KEY `username` (`username`) | ||
) ENGINE=InnoDB DEFAULT CHARSET=utf8; | ||
|
||
-- | ||
-- 转存表中的数据 `admin` | ||
-- | ||
|
||
INSERT INTO `admin` (`username`, `password`) VALUES | ||
('admin', 'admin'); | ||
|
||
-- -------------------------------------------------------- | ||
|
||
-- | ||
-- 表的结构 `goods` | ||
-- | ||
|
||
CREATE TABLE IF NOT EXISTS `goods` ( | ||
`id` int(10) unsigned NOT NULL AUTO_INCREMENT, | ||
`img_src` varchar(100) NOT NULL, | ||
`price` int(10) unsigned NOT NULL, | ||
`name` varchar(20) DEFAULT NULL, | ||
PRIMARY KEY (`id`) | ||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=23 ; | ||
|
||
-- | ||
-- 转存表中的数据 `goods` | ||
-- | ||
|
||
INSERT INTO `goods` (`id`, `img_src`, `price`, `name`) VALUES | ||
(1, '../img/05.jpg', 1234, 'fff'), | ||
(2, '../img/02.jpg', 2000, 'book'), | ||
(3, '../img/03.jpg', 2000, 'haircup'), | ||
(4, '../img/04.jpg', 1255, 'peach'), | ||
(5, '../img/01.jpg', 1000, 'compute'), | ||
(6, '../img/01.jpg', 1000, 'compute'), | ||
(7, '../img/01.jpg', 1000, 'compute'), | ||
(8, '../img/01.jpg', 1000, 'compute'), | ||
(9, '../img/01.jpg', 1000, 'compute'), | ||
(10, '../img/05.jpg', 1000, 'compute'), | ||
(11, '../img/05.jpg', 1000, 'compute'), | ||
(12, '../img/05.jpg', 1000, 'compute'), | ||
(13, '../img/05.jpg', 1000, 'compute'), | ||
(14, '../img/05.jpg', 1000, 'compute'), | ||
(15, '../img/05.jpg', 1000, 'compute'), | ||
(16, '../img/05.jpg', 1000, 'compute'), | ||
(17, '../img/05.jpg', 1000, 'compute'), | ||
(18, '../img/05.jpg', 1000, 'compute'), | ||
(19, '../img/05.jpg', 1000, 'compute'), | ||
(20, '../img/05.jpg', 1000, 'compute'), | ||
(21, '../img/05.jpg', 1000, 'compute'), | ||
(22, '../img/05.jpg', 1000, 'compute'); | ||
|
||
-- -------------------------------------------------------- | ||
|
||
-- | ||
-- 表的结构 `ord` | ||
-- | ||
|
||
CREATE TABLE IF NOT EXISTS `ord` ( | ||
`gid` int(10) unsigned DEFAULT NULL, | ||
`uid` int(10) unsigned DEFAULT NULL, | ||
`price` int(11) DEFAULT NULL, | ||
`name` varchar(40) DEFAULT NULL | ||
) ENGINE=InnoDB DEFAULT CHARSET=utf8; | ||
|
||
-- | ||
-- 转存表中的数据 `ord` | ||
-- | ||
|
||
INSERT INTO `ord` (`gid`, `uid`, `price`, `name`) VALUES | ||
(3, 5, 2000, 'haircup'), | ||
(9, 5, 1000, 'compute'), | ||
(2, 5, 2000, 'book'), | ||
(4, 5, 1255, 'peach'), | ||
(4, 4, 1255, 'peach'), | ||
(5, 4, 1000, 'compute'), | ||
(8, 4, 1000, 'compute'), | ||
(11, 4, 1000, 'compute'); | ||
|
||
-- -------------------------------------------------------- | ||
|
||
-- | ||
-- 表的结构 `user` | ||
-- | ||
|
||
CREATE TABLE IF NOT EXISTS `user` ( | ||
`id` int(10) unsigned NOT NULL AUTO_INCREMENT, | ||
`username` varchar(10) NOT NULL, | ||
`password` char(32) NOT NULL, | ||
`salt` char(32) NOT NULL, | ||
`email` varchar(40) NOT NULL, | ||
PRIMARY KEY (`id`), | ||
UNIQUE KEY `username` (`username`) | ||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=7 ; | ||
|
||
-- | ||
-- 转存表中的数据 `user` | ||
-- | ||
|
||
INSERT INTO `user` (`id`, `username`, `password`, `salt`, `email`) VALUES | ||
(1, '老八', '66480f4dfa71b4d5149a0e33b23279a3', 'eebba793a7687af8cd20a87ce82d9173', '[email protected]'), | ||
(2, '1313', 'c58fbb1a98cff4db3a5f94460166f799', '602f5b624a6aa9ac13e30c34c261da48', '[email protected]'), | ||
(3, 'ddd', '10ebf1a1f5c253153452d9045fdb7241', 'e027937c46a0176b8dd3f420cd35bc36', '[email protected]'), | ||
(4, 'admin', '220d16bc12d77fd2843cc162d0fcb503', 'a8de0834ecca6143526a026919486b6e', '[email protected]'), | ||
(5, '123123', '1009ea1da97b854c0c2e6f6268dc515e', '9074b7d72eb96ce6cd87b6526ee4f2d8', '[email protected]'), | ||
(6, 'asdf', '123456', 'ae3e49ee8a1a54b4c4fb17cf1bbfcad1', '[email protected]'); | ||
|
||
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; | ||
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; | ||
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?php | ||
require './connect.php'; | ||
//补充完整代码 | ||
$where=''; | ||
if(isset($_POST['keyword'])){ | ||
|
||
$keyword=$_POST['keyword']; | ||
$keyword=mysqli_real_escape_string($link,$keyword); | ||
$where="where name like '%$keyword%'"; | ||
|
||
} | ||
$sql="select * from goods $where"; | ||
|
||
|
||
|
||
// 执行SQL语句,获取结果集 | ||
$res = mysqli_query($link, $sql); | ||
if (!$res) { | ||
exit(mysqli_error($link)); | ||
} | ||
|
||
// 定义员工数组,用以保存员工信息 | ||
$emp_info = array(); | ||
// 遍历结果集,获取每位员工的详细数据 | ||
while ($row = mysqli_fetch_assoc($res)) { | ||
$emp_info[] = $row; | ||
} | ||
// 设置常量,用以判断视图页面是否由此页面加载 | ||
// 加载视图页面,显示数据 | ||
//define('APP', 'bighomework'); | ||
|
||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
<?php require './chaxun.php';?> | ||
<!doctype html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<title>商品信息列表</title> | ||
<style> | ||
.box{margin:20px;} | ||
.box .title{font-size:22px;font-weight:bold;text-align:center;} | ||
.box table{width:100%;margin-top:10px;border-collapse:collapse;font-size:12px;border:1px solid #B5D6E6;min-width:460px;} | ||
.box table th,.box table td{height:20px;border:1px solid #B5D6E6;} | ||
.box table th{background-color:#E8F6FC;font-weight:normal;} | ||
.box table td{text-align:center;} | ||
.search{padding:10px 0;float:right;font-size:12px;} | ||
</style> | ||
</head> | ||
<body style="background: url(../img/07.jpeg);"> | ||
<form action="./chaxun_html.php" method="post"> | ||
<div class="box"> | ||
<div class="title" style="color: white;opacity: 0.7;">商品信息列表</div> | ||
<div class="search" style="color: white; opacity: 0.7;">快速查询: | ||
<input type="text" name="keyword"/> | ||
<input type="submit" value="搜索"/> | ||
</div> | ||
<table border="1"> | ||
<tr style="opacity: 0.5;"><th width="5%">ID</th><th>图片来源</th><th>价格</th><th>商品名</th><th width="25%">相关操作</th></tr> | ||
<?php if(!empty($emp_info)) { ?> | ||
<?php foreach($emp_info as $row) { ?> | ||
<tr style="color: white; opacity: 0.8;"> | ||
<td><?php echo $row['id']; ?></td> | ||
<td><?php echo $row['img_src']; ?></td> | ||
<td><?php echo $row['price']; ?></td> | ||
<td><?php echo $row['name']; ?></td> | ||
<td><div align="center"><span> | ||
<img src="images/edit.gif" width="16" height="16" /> | ||
<a class="pen" href="xiugai.php">修改</a> | ||
<img src="images/del.gif" width="16" height="16" /> | ||
<a class="pen" href="shanchu.php">删除</a> </span></div> | ||
</td> | ||
</tr> | ||
<?php } ?> | ||
<?php }else{ ?> | ||
<tr><td colspan="6">查询的结果不存在!</td></tr> | ||
<?php } ?> | ||
</table> | ||
</div> | ||
</form> | ||
<a href="index_html.php" style="text-decoration: none;" class="pen">返回主页</a> | ||
</body> | ||
<style type="text/css"> | ||
.pen{ | ||
text-decoration: none; | ||
color: white; | ||
opacity: 0.7; | ||
} | ||
</style> | ||
</html> |
Oops, something went wrong.