找传奇、传世资源到传世资源站!

图书商城简单后台管理模块

8.5玩家评分(1人评分)
下载后可评
介绍 评论 失效链接反馈

【例子介绍】图书商城简单后台管理模块

自己学习开发的图书商城简单后台管理模块,能够实现用户注册登录、密码修改、图书类别及图书信息的添加、修改、删除等基本功能。

【相关图片】

from clipboard

from clipboard

from clipboard

【源码结构】

<?php session_start();
require('conn.php');
$an = $_POST['adminname'];
$pw = $_POST['password'];
$sql="select * from admin where adminname='$an' and password='$pw'";
$result=mysqli_query($conn,$sql); //执行查询创建结果集
$num = mysqli_num_rows($result);

if ($num==0){
unset($_SESSION['admin']);
echo "<SCRIPT>alert('您输入的用户名或密码不正确!');history.go(-1)</SCRIPT>";
exit();}
else{
$rows =mysqli_fetch_assoc($result);
$_SESSION['admin']=$rows['adminname'];
echo "<script>location.href='admin.php'</script>";}
?>

<?php
    require('conn.php');
    $Name = $_POST["Name"];
    $CategoryId = $_POST["CategoryId"];
    $Descn = $_POST["Descn"];
    $Image = $_POST["Image"];
    $ListPrice = $_POST["ListPrice"];

    if (empty($Name)) {
       exit('<p align = "center">图书名称不能为空!<a href="admin_book_add.php">返回</a>');
    }
    if (strlen($Name) > 20) {
       exit('<p align = "center">图书名称太长!<a href="admin_book_add.php">返回</a>');
    }
    $sql = "insert into product(Name,CategoryId,Descn,Image,ListPrice) values('$Name','$CategoryId','$Descn','$Image','$ListPrice' )";
    $result = mysqli_query($conn,$sql);
    if($result){
        echo"<script>alert('添加成功');window.location.href='admin_book.php'</script>;";
    }
    else{
        echo"<script>alert('添加失败');window.location.href='admin_book.php'</script>;";
    }

mysqli_free_result($result);
mysql_close($conn);
?>

.
├── Logout.php
├── admin.php
├── admin_book.php
├── admin_book_add.php
├── admin_book_add_do.php
├── admin_book_delete.php
├── admin_book_update.php
├── admin_book_update_do.php
├── admin_booktype.php
├── admin_booktype_add.php
├── admin_booktype_add_do.php
├── admin_booktype_delete.php
├── admin_booktype_update.php
├── admin_booktype_update_do.php
├── admin_kehu.php
├── admin_user.php
├── admin_user_act.php
├── admin_user_do.php
├── admin_user_zhuce.php
├── admin_user_zhuce_do.php
├── bookshop.sql
├── c1.css
├── c2.css
├── check.php
├── conn.php
├── login.php
├── tuichu.php
└── 图书商城简单后台管理模块5t6t网_图书商城后台模块.zip

0 directories, 28 files

评论

发表评论必须先登陆, 您可以 登陆 或者 注册新账号 !


在线咨询: 问题反馈
客服QQ:174666394

有问题请留言,看到后及时答复