返回顶部
首页 > 资讯 > 数据库 >PHP-MYSQL宾馆客房管理系统(附源码)
  • 307
分享到

PHP-MYSQL宾馆客房管理系统(附源码)

phpmysql开发语言 2023-09-02 11:09:11 307人浏览 八月长安
摘要

PHP-Mysql宾馆客房管理系统(附源码) 主要功能主要语言部分界面获取方式 分为 前台用户和 后台管理员两个角色,功能完善,界面优美,运行良好。 (文末有获取源代码方式) 主要功

PHP-Mysql宾馆客房管理系统(附源码


分为 前台用户后台管理员两个角色,功能完善,界面优美,运行良好。 (文末有获取源代码方式)

主要功能

用户:

  • 查看客房信息

  • 在线预订

  • 订单查询

  • 信息留言等

管理员

  • 入住管理:(大堂入住 订单入住 入住查询 入住统计)
  • 退房管理:(退房清算)
  • 房间管理:(新增房间 房间编辑)
  • 房类管理:(新增房类 房类编辑)
  • 相册管理:(新增相册 相册编辑)
  • 留言管理:(留言查看)
  • 系统管理:(人员添加 密码修改 退出系统)

主要语言

php mysql javascript html Jquery

本系统采用phpstudy开发平台,采用PHP和Mysql数据库进行开发,开发工具为HBuilder。同时在Dw、PHPstORM、submit、vscode等编辑器软件中均可正常运行。

phpStudy是一个PHP调试环境的程序集成最新的Apache+PHP+MySQL+phpMyAdmin,一次性安装,无须配置即可使用,是非常方便、好用的PHP调试环境。(其他开发平台均可)

部分界面

  • 后台登录

后台登录

require("../dbconnect.php");if($_POST['action'] == "test"){  function make_safe($variable)   {     $variable = addslashes(trim($variable));     return $variable;   }   $user=make_safe($_POST["username"]);   $pass=make_safe($_POST["pwd"]);    $sql="select * from admin where name='$user'";  $result=mysqli_query($db_link,$sql);  $row = mysqli_fetch_assoc($result);   if($row==false)  {    echo "";    exit;  }  else  {     if($row["passwd"]==$pass)    {      session_start();      $_SESSION['aname']=$row["name"];      // 重定向      header("location:admin_index.php");      exit;    }    else     {      echo "";      exit;    }     }}?>
  • 在线预订

在线预订

              require("dbconnect.php");              $pagesize = 10;              $sql = "select a.roomid,b.typeid,b.typename,b.area,b.hasNet,b.hasTV,b.price from room a,roomtype b where a.typeid=b.typeid and a.status='否' and b.leftnum>0 and a.roomid not in (select roomid from orders where ostatus='是')";              $rs=mysqli_query($db_link,$sql);              if(!$rs)              {                  echo "抱歉,房间已满";                  exit;              }              $recordcount=mysqli_num_rows($rs);              $pagecount=($recordcount-1)/$pagesize+1;              $pagecount=(int)$pagecount;              $pageno=@$_GET["pageno"];              if($pageno=="")              {                  $pageno=1;              }              if($pageno>$pagecount)              {                  $pageno=$pagecount;              }              $startno=($pageno-1)*$pagesize;              $sql="select a.roomid,b.typeid,b.typename,b.area,b.hasNet,b.hasTV,b.price from room a,roomtype b where a.typeid=b.typeid and a.status='否' and b.leftnum>0 and a.roomid not in (select roomid from orders where ostatus='是') order by roomid asc limit $startno,$pagesize";                         $rs=mysqli_query($db_link,$sql);              if(!$rs)              {                  echo "抱歉,房间已满";                  exit;              }              while($rows=mysqli_fetch_assoc($rs))              {  ?>                <tr>                <td class='tc'> echo $rows["roomid"] ?></td>                <td class='tc'> echo $rows["typeid"] ?></td>                <td class='tc'> echo $rows["typename"] ?></td>                <td class='tc'> echo $rows["area"] ?></td>                <td class='tc'> echo $rows["hasNet"] ?></td>                <td class='tc'> echo $rows["hasTV"] ?></td>                <td class='tc'> echo $rows["price"] ?></td>    <td class='tc'>                <a href='online_order.php?orid='  class='link-update'>在线预订</a>                </td>                </tr>             } ?>          
  • 订单查询

订单查询

      require("dbconnect.php");      $sql="select a.roomid,b.typeid,b.typename,b.price from room a,roomtype b where a.typeid=b.typeid and a.roomid='".$_GET["orid"]."'";      $arr=mysqli_query($db_link,$sql);      $rows=mysqli_fetch_row($arr); ?>
  • 相册管理

相册管理

              require("../dbconnect.php");              $pagesize = 10;              $sql = "select * from news";              $rs=mysqli_query($db_link,$sql);              if(!$rs)              {                  echo "无相册信息!";                  exit;              }              $recordcount=mysqli_num_rows($rs);              $pagecount=($recordcount-1)/$pagesize+1;              $pagecount=(int)$pagecount;              $pageno=@$_GET["pageno"];              if($pageno=="")              {                  $pageno=1;              }              if($pageno>$pagecount)              {                  $pageno=$pagecount;              }              $startno=($pageno-1)*$pagesize;              $sql="select * from news order by id asc limit $startno,$pagesize";                         $rs=mysqli_query($db_link,$sql);              if(!$rs)              {                  echo "无相册信息";                  exit;              }              while($rows=mysqli_fetch_assoc($rs))              {  ?>                <tr>                <td class='tc'> echo $rows["id"] ?></td>                <td class='tc'> echo $rows["title"] ?></td>                <td class='tc'>                <img height='auto' width="60px" src='../images/'>                </td>                <td class='tc'>                <img height='auto' width="60px" src='../images/'>                </td>                <td class='tc'> echo $rows["describes"] ?></td>                <td class='tc'>                <a href='admin_photomod.php?pid='  class='link-update'>修改</a>&nbsp;&nbsp;<a href='delete.php?pid=' class='link-del''>删除</a>                </td>                </tr>             } ?>
  • 大堂入住

大堂入住

              require("../dbconnect.php");              $pagesize = 10;              $sql = "select a.roomid,b.typeid,b.typename,b.area,b.hasNet,b.hasTV,b.price from room a,roomtype b where a.typeid=b.typeid and a.status='否' and b.leftnum>0 and a.roomid not in (select roomid from orders where ostatus='是')";              $rs=mysqli_query($db_link,$sql);              if(!$rs)              {                  echo "抱歉,房间已满!";                  exit;              }              $recordcount=mysqli_num_rows($rs);              $pagecount=($recordcount-1)/$pagesize+1;              $pagecount=(int)$pagecount;              $pageno=@$_GET["pageno"];              if($pageno=="")              {                  $pageno=1;              }              if($pageno>$pagecount)              {                  $pageno=$pagecount;              }              $startno=($pageno-1)*$pagesize;              $sql="select a.roomid,b.typeid,b.typename,b.area,b.hasNet,b.hasTV,b.price from room a,roomtype b where a.typeid=b.typeid and a.status='否' and b.leftnum>0 and a.roomid not in (select roomid from orders where ostatus='是') order by a.roomid asc limit $startno,$pagesize";                         $rs=mysqli_query($db_link,$sql);              if(!$rs)              {                  echo "抱歉,房间已满";                  exit;              }              while($rows=mysqli_fetch_assoc($rs))              {  ?>                <tr>                <td class='tc'> echo $rows["roomid"] ?></td>                <td class='tc'> echo $rows["typeid"] ?></td>                <td class='tc'> echo $rows["typename"] ?></td>                <td class='tc'> echo $rows["area"] ?></td>                <td class='tc'> echo $rows["hasNet"] ?></td>                <td class='tc'> echo $rows["hasTV"] ?></td>                <td class='tc'> echo $rows["price"] ?></td>    <td class='tc'>                <a href='admin_order.php?orid='  class='link-update'>办理入住</a>                </td>                </tr>             } ?>
  • 人员添加

人员添加

              require("../dbconnect.php");              $pagesize = 10;              $sql = "select * from admin";              $rs=mysqli_query($db_link,$sql);              $recordcount=mysqli_num_rows($rs);              $pagecount=($recordcount-1)/$pagesize+1;              $pagecount=(int)$pagecount;              $pageno=@$_GET["pageno"];              if($pageno=="")              {                  $pageno=1;              }              if($pageno>$pagecount)              {                  $pageno=$pagecount;              }              $startno=($pageno-1)*$pagesize;              $sql="select * from admin order by id asc limit $startno,$pagesize";              $rs=mysqli_query($db_link,$sql);              while($rows=mysqli_fetch_assoc($rs))              {                ?>                <tr>                <td class='tc'> echo $rows["id"] ?></td>                <td class='tc'> echo $rows["name"] ?></td>                <td class='tc'> echo $rows["passwd"] ?></td>                <td class='tc'>                <a href='delete.php?id='  class='link-update'>删除</a>                </td>                  </tr>            } ?>

演示视频

获取方式

方式一:跳转获取源代码
方式二:公众号搜索“麻了秃头”回复“宾馆客房”

其他系统
系统

来源地址:https://blog.csdn.net/qq_57161040/article/details/129683829

您可能感兴趣的文档:

--结束END--

本文标题: PHP-MYSQL宾馆客房管理系统(附源码)

本文链接: https://www.lsjlt.com/news/390640.html(转载时请注明来源链接)

有问题或投稿请发送至: 邮箱/279061341@qq.com    QQ/279061341

猜你喜欢
软考高级职称资格查询
编程网,编程工程师的家园,是目前国内优秀的开源技术社区之一,形成了由开源软件库、代码分享、资讯、协作翻译、讨论区和博客等几大频道内容,为IT开发者提供了一个发现、使用、并交流开源技术的平台。
  • 官方手机版

  • 微信公众号

  • 商务合作