diff --git a/conn.php b/conn.php new file mode 100644 index 0000000..8778640 --- /dev/null +++ b/conn.php @@ -0,0 +1,9 @@ + \ No newline at end of file diff --git a/css/mystyle.css b/css/mystyle.css new file mode 100644 index 0000000..786dcde --- /dev/null +++ b/css/mystyle.css @@ -0,0 +1,31 @@ +h2,h4 +{ + color:green; + letter-spacing: 2px; + word-spacing: 10px; +} + +h2 +{ + text-align: center; + text-shadow: 5px 5px 5px #FF0000; +} +table +{ +border-collapse:collapse; +} +table,th, td +{ +border: 1px solid green; +} + +th +{ + background-color:green; + color: black +} +td +{ + text-align: center; + padding: 15px; +} diff --git a/get_users.php b/get_users.php new file mode 100644 index 0000000..86ff5fa --- /dev/null +++ b/get_users.php @@ -0,0 +1,31 @@ + \ No newline at end of file diff --git a/index.html b/index.html new file mode 100644 index 0000000..2ae8897 --- /dev/null +++ b/index.html @@ -0,0 +1,86 @@ + + + + + + + User CRUD of My Bookstore + + + + + + + + + + + + + + +

Basic CRUD

+

Search and Double click to edit and Click the header to sort

+ + + + + + + + + +
First NameLast NamePhoneEmail
+
+
+ New + Destroy + Save + Cancel + +
+ +

+
+ First Name: + + Last Name: + + Search +
+
+ + + \ No newline at end of file diff --git a/readMe.txt b/readMe.txt new file mode 100644 index 0000000..e0bb24c --- /dev/null +++ b/readMe.txt @@ -0,0 +1,5 @@ +实现功能:CRUD以及,分页,搜索,排序,双击编辑。 +前端:jquery-easyui +后端:php交互 +数据存储:mysql数据库 + diff --git a/remove_user.php b/remove_user.php new file mode 100644 index 0000000..e23f063 --- /dev/null +++ b/remove_user.php @@ -0,0 +1,14 @@ +true)); +} else { + echo json_encode(array('msg'=>'Some errors occured.')); +} +?> \ No newline at end of file diff --git a/save_user.php b/save_user.php new file mode 100644 index 0000000..6410415 --- /dev/null +++ b/save_user.php @@ -0,0 +1,19 @@ + mysql_insert_id(), + 'firstname' => $firstname, + 'lastname' => $lastname, + 'phone' => $phone, + 'email' => $email +)); +?> \ No newline at end of file diff --git a/update_user.php b/update_user.php new file mode 100644 index 0000000..ae62b64 --- /dev/null +++ b/update_user.php @@ -0,0 +1,20 @@ + $id, + 'firstname' => $firstname, + 'lastname' => $lastname, + 'phone' => $phone, + 'email' => $email +)); +?> \ No newline at end of file