Giter Site home page Giter Site logo

fantasticlbp / hotels_server Goto Github PK

View Code? Open in Web Editor NEW
293.0 18.0 137.0 9.03 MB

酒店预订系统后台管理系统

PHP 43.68% CSS 25.56% JavaScript 2.29% Hack 28.47%
hotel hotel-management server-management hotel-booking hotel-api apis api-service hotels booking-system api-rest

hotels_server's Introduction

Hotels_Server

住哪儿项目后台管理系统

住哪儿App的后台管理功能,包括主题酒店、特色酒店发布、注册用户的统计查看、订单的统计查看、酒店的统计查看。Controller目录下的Api下就是给App开发的api。想写api的童鞋们可以看看。

    包括php系统开发的常见功能:
  • 复杂表单的提交,包括多图片上传
  • 基于Bootstrap框架的界面布局
  • 封装PDO数据库操作类,实现增删改查等等常见功能,调用简单
  • 随机酒店推荐策略
  • 多条件模糊搜索酒店算法
  • jquery表格插件Datatables的使用大大丰富了数据的展现方式,更具交互性。具有自动分页、模糊搜索等功能
  • 封装了Response类,可以传递4个参数 show($code, $message = '', $data = array(), $type = self::JSON)来展示json或者array或者xml。
  • 工程结构一幕了然,便于拓展

效果截图

系统截图

ToDo:后期可能会实现MVC框架优化。客户端接口想实现缓存出来,当客户端请求的数据存在于缓存的时候直接从缓存中读取。

如果有不懂的地方可以加入QQ交流群讨论:515066271。这个QQ群讨论技术范围包括:iOS、H5混合开发、前端开发、PHP开发,欢迎大家讨论技术。

福利,福利

如果想学习客户端开发的同学可以看看这个项目。项目地址:(https://github.com/FantasticLBP/Hotels)

实现了类似艺龙App的预定酒店功能,包括酒店搜索、特色酒店推荐、特惠酒店推荐等等功能,可以预定酒店、查看订单,唯独不能支付(支付功能必须由公司的名义注册,个人练手注册不了)。

    包括iOS开发的常见功能:
  • 自定义NavigationController实现全屏右滑返回上一控制器
  • UICollecionView展现界面
  • UITableview上拉加载、下面刷新功能
  • Masonry自动布局库的使用
  • 封装好的启动欢迎页
  • YYModel字典转模型
  • 复杂界面的布局
  • cell的重用内存优化
  • 工程结构一幕了然,便于拓展
  • 界面采用代码实现,部分界面采用xib实现。整个代码可读性比较好、代码规范、有注释说明,配合服务端是自己用php写的,Api也是php实现的。
  • 主要功能:根据不同主题查找酒店、摇一摇随机推荐酒店、根据城市定位推荐酒店、根据用户输入多条件模糊搜索查找酒店、酒店位置地图显示、路径规划及其导航(百度地图、高德地图、系统地图)、订单查看等、酒店分享等功能

效果截图

App效果图

本项目包含功能为后端,如有需要客户端或者商业合作请联系本人(QQ/微信:704568245)

hotels_server's People

Contributors

fantasticlbp avatar geek-xi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hotels_server's Issues

XSS Vulnerability in /view/hotelList.php

In /view/hotelList.php

image

As you see, there are not any filtration in all ‘echo’s.

Also in /controller/publishHotel.php , these are inserted into database without filtration

image

After all, we can enjoy XSS

image

image

Hotels_Server Password disclosure

Hotels_Server /view/login.php Enter user name unauthenticated user get password
login.php post data to doAction.php user name unauthenticated user get password
code:
2

2

language

How can i translate to english

Hotels_Server through 2018-11-05 has SQL Injection via the API.

In /controller/api/login.php
It will receive a parameter called "telephone" to search for existed users.
But in fact,this parameter just become a part of the SQL request without any process,so it will be possible to have a SQL injection.
We can use SQLMAP to test this vulnerability:
20190215223537
20190215223806
20190215223829

SQL Injection Vulnerability in controller/fetchpwd.php

In controller/fetchpwd.php
2019-01-19-225422_457x392_scrot

the parameter was added with a string "username=" ,passed to function find

In the definition of function find,we can notice that though the author use PDO, he didn't use Prepared technique to avoid SQL injection vulnerability. What a pity!
2019-01-19-225526_566x228_scrot

After analyzing these codes,we can simply use sqlmap to exploit the vulnerability and have fun!
2019-01-19-231950_878x370_scrot

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.