简体   繁体   English

设施预订系统

[英]Facility booking system

We are planning to implement a facility booking system wherein the user would be able to check the availability of a hall/room at a particular date and time. 我们正计划实施一种设施预订系统,其中用户将能够在特定的日期和时间检查大厅/房间的可用性。 The user would also be able to book a facility if it is available. 用户也可以预订设施(如果有)。

However, I am having issues in creating two components for the system: 但是,在为系统创建两个组件时遇到了问题:

  1. Calendar - The calendar needs to be dynamic, such that the user can book the room with a mouse click after specifying the duration through mouse drag. 日历 -日历必须是动态的,以便用户在通过鼠标拖动指定持续时间后可以单击鼠标来预订房间。 Also, the mouseover should display the event info, so that I do not need to put the event details in some other static page/link. 另外,鼠标悬停时应显示事件信息,因此我无需将事件详细信息放在其他静态页面/链接中。 Lastly, the calendar needs to be flexible enough to display availability of the rooms/halls sorted by day, week, and month. 最后,日历需要足够灵活以显示按天,周和月排序的房间/大厅的可用性。

  2. Booking through SMS - Whenever a room is booked, an SMS is to be sent to a specific user (selected). 通过SMS进行预订 -预订房间时,都会将SMS发送给特定的用户(选定)。 The user can then reply to the SMS to book the room (mentioning the unique request ID in SMS response). 然后,用户可以回复SMS以预订房间(在SMS响应中提及唯一的请求ID)。 However, I have never created an SMS server, so I wanted to know how to begin, and whether it is feasible to make an SMS-based response system. 但是,我从未创建过SMS服务器,因此我想知道如何开始以及创建基于SMS的响应系统是否可行。

Please share your views or any source code you know is available which takes care of any of these requirements. 请分享您的观点或您知道的任何可用的源代码都可以满足这些要求。

  1. PHP has plenty of date and time related functions which can help you generate your calendar. PHP具有大量与日期和时间相关的功能 ,可以帮助您生成日历。 You could also find an open source project with a calendar you like and see how they did it. 您还可以找到带有您喜欢的日历的开源项目,并查看他们的工作方式。

  2. There are service providers for SMS. 有SMS的服务提供商。 You simply call a URL (like http://smsservices.com/send.php?message=YOUR_MESSAGE&api_key=YOUR_API_KEY&number=RECIPIENT_NUMBER ) and the SMS gets sent by them. 您只需调用一个URL(例如http://smsservices.com/send.php?message=YOUR_MESSAGE&api_key=YOUR_API_KEY&number=RECIPIENT_NUMBER ),然后SMS就会由他们发送。 Receiving is equally easy: They give you a unique number your users can send messages to. 接收同样容易:它们为您提供了用户可以向其发送消息的唯一号码。 If they receive a message they either call a URL of your website (like http://yoursite.com/receive_sms?message=MESSAGE&number=SENDERS_NUMBER ) or send you an email with the message sender's number and message. 如果他们收到一条消息,他们会呼叫您网站的URL(例如http://yoursite.com/receive_sms?message=MESSAGE&number=SENDERS_NUMBER ),或者向您发送一封电子邮件,其中包含消息发件人的号码和消息。 Just search around Google and you'll find a suitable service provider in your area. 只需在Google周围搜索,您就会在您所在的地区找到合适的服务提供商。

Ideally this would be asked as two separate questions. 理想情况下,这将作为两个单独的问题提出。

Regarding your question on SMS. 关于您的短信问题。

You can use an SMS aggregator, such as BulkSMS , to enable you to send messages and receive replies. 您可以使用SMS聚合器(例如BulkSMS)来发送消息和接收回复。 You don't mention which country this is intended for and there can be complications in some regions. 您没有提及这是哪个国家/地区,并且在某些地区可能会出现问题。

Sending a message can be a simple as making an HTTP request. 发送消息就像发出HTTP请求一样简单。 Replies can be returned to you via another HTTP request to your server, or via email, for example. 例如,可以通过对服务器的另一个HTTP请求或通过电子邮件将回复返回给您。

Take a look at the BulkSMS API documentation 看看BulkSMS API文档

Disclaimer: I work for BulkSMS 免责声明:我为BulkSMS工作

From the little i have read from your post, i could understand what exactly you are trying to achieve and i must say that its quite straight forward if you carefully plan your web application. 从我从您的帖子中所读到的内容中,我可以理解您到底要实现什么目标,如果您仔细计划Web应用程序,我必须说这很简单。

I have embarked upon such a solution before and will give you a hint on how to solve the sms part which will enable you send sms with unique booking id to the user. 我以前就采用过这样的解决方案,并且将向您提示如何解决短信部分,使您可以将具有唯一预订ID的短信发送给用户。 I presume that your booking form will have all the necessary fields which will enable you collect the basic user details precisely the important ones which consist of booking details,user name,email & phone number. 我想您的预订表格将包含所有必填字段,使您能够准确地收集基本用户详细信息,其中包括预订详细信息,用户名,电子邮件和电话号码等重要信息。

Below is a sample php curl code embedded with XML that my sms gateway provided which i usually tweak to enable me deploy both static and dynamically generated sms using this script below. 以下是我的sms网关提供的,嵌入了XML的示例php curl代码,我通常会对其进行调整,以使我能够使用下面的此脚本部署静态和动态生成的sms。 /////////////////////////////SMS GATE WAY IS WWW.INFOBIPS.COM ///////////////////// ///////////////////////////// SMS网关为WWW.INFOBIPS.COM ///////////// /////////

$user="smsgateway_user";
$pass="smsgateway_password";
$sender= "sendername";
$mobileno="2348034057037";
$message= "Your sms message goes here";

?>
<?php

$postUrl = "http://www.infobip.com/AddOn/SMSService/XML/XMLInput.aspx";
// XML-formatted data

$xmlString =
"<SMS>
<authentification>
<username>$user</username>
<password>$pass</password>
</authentification>
<message>
<sender>$sender</sender>
<text>$message</text>
</message>
<recipients>
<gsm>$mobileno</gsm>
</recipients>
</SMS>";

// previously formatted XML data becomes value of “XML” POST variable

$fields = "XML=" . urlencode($xmlString);
// in this example, POST request was made using PHP’s CURL

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $postUrl);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $fields);
// response of the POST request
$response = curl_exec($ch);

// redirect the page upon successful sending

header("Location:customized/confirmationpage.php"); 
curl_close($ch);

?>

What i expect you to do is to simply redirect your booking form to this script after it has been submitted,this script will trigger the sms to the phone no of the user before redirecting back to the confirmation page of your booking script. 我希望您要做的就是在提交表单后将您的预订表单重定向到该脚本,该脚本将触发短信到用户的电话号码,然后重定向回您的预订脚本的确认页面。

With regards to the other part where the user sends and sms with unique room booking ID to confirm, I'm not to familiar this area but i guess you can decide to use a short code service or just use a manual phone number to receive your confirmation sms. 关于用户发送和带有唯一房间预订ID的短信进行确认的其他部分,我不熟悉该区域,但我想您可以决定使用短代码服务或仅使用手动电话号码来接收您的信息确认短信。

I hope this helps 我希望这有帮助

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM