page249.tpl.php 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368
  1. <?php // BEGIN PHP
  2. $websitekey=basename(__DIR__); if (empty($websitepagefile)) $websitepagefile=__FILE__;
  3. if (! defined('USEDOLIBARRSERVER') && ! defined('USEDOLIBARREDITOR')) {
  4. $pathdepth = count(explode('/', $_SERVER['SCRIPT_NAME'])) - 2;
  5. require_once ($pathdepth ? str_repeat('../', $pathdepth) : './').'master.inc.php';
  6. } // Not already loaded
  7. require_once DOL_DOCUMENT_ROOT.'/core/lib/website.lib.php';
  8. require_once DOL_DOCUMENT_ROOT.'/core/website.inc.php';
  9. ob_start();
  10. // END PHP ?>
  11. <html lang="en">
  12. <head>
  13. <title>Contact us</title>
  14. <meta charset="utf-8">
  15. <meta http-equiv="content-type" content="text/html; charset=utf-8" />
  16. <meta name="robots" content="index, follow" />
  17. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  18. <meta name="keywords" content="" />
  19. <meta name="title" content="Contact us" />
  20. <meta name="description" content="" />
  21. <meta name="generator" content="Dolibarr 17.0.0-beta (https://www.dolibarr.org)" />
  22. <meta name="dolibarr:pageid" content="249" />
  23. <?php if ($website->use_manifest) { print '<link rel="manifest" href="/manifest.json.php" />'."\n"; } ?>
  24. <!-- Include link to CSS file -->
  25. <link rel="stylesheet" href="/styles.css.php?website=<?php echo $websitekey; ?>" type="text/css" />
  26. <!-- Include link to JS file -->
  27. <script async src="/javascript.js.php"></script>
  28. <!-- Include HTML header from common file -->
  29. <?php if (file_exists(DOL_DATA_ROOT."/website/".$websitekey."/htmlheader.html")) include DOL_DATA_ROOT."/website/".$websitekey."/htmlheader.html"; ?>
  30. <!-- Include HTML header from page header block -->
  31. </head>
  32. <!-- File generated by Dolibarr website module editor -->
  33. <body id="bodywebsite" class="bodywebsite bodywebpage-contact">
  34. <!-- Enter here your HTML content. Add a section with an id tag and tag contenteditable="true" if you want to use the inline editor for the content -->
  35. <?php
  36. if (GETPOST('action') == 'sendmail') {
  37. include_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php';
  38. $from = GETPOST('email', 'alpha');
  39. $to = $mysoc->email;
  40. $message = GETPOST('message', 'alpha');
  41. $cmail = new CMailFile('Contact from website', $to, $from, $message);
  42. if ($cmail->sendfile()) {
  43. ?>
  44. <script>
  45. alert("Message sent successfully !");
  46. </script>
  47. <?php
  48. } else {
  49. echo $langs->trans("ErrorFailedToSendMail", $from, $to).'. '.$cmail->error;
  50. }
  51. }
  52. ?>
  53. <?php includeContainer('header'); ?>
  54. <section id="mysection1" contenteditable="true">
  55. <main>
  56. <header class="site-header site-contact-header">
  57. <div class="container">
  58. <div class="row">
  59. <div class="col-lg-10 col-12 mx-auto">
  60. <h1 class="text-white">Say Hi</h1>
  61. <strong class="text-white"
  62. >We are happy to get in touch with you</strong
  63. >
  64. </div>
  65. </div>
  66. </div>
  67. <div class="overlay"></div>
  68. </header>
  69. <a id="reservation"></a><br>
  70. <section class="contact section-padding">
  71. <div class="container">
  72. <div class="row">
  73. <div class="col-12">
  74. <h2 class="mb-4">Leave a message</h2>
  75. </div>
  76. <div class="col-lg-6 col-12">
  77. <form
  78. class="custom-form contact-form row"
  79. action="#"
  80. method="post"
  81. role="form"
  82. >
  83. <input type="hidden" name="action" value="sendmail">
  84. <input type="hidden" name="toekn" value="<?php echo newToken(); ?>">
  85. <div class="col-lg-6 col-6">
  86. <label for="contact-name" class="form-label"
  87. >Full Name</label
  88. >
  89. <input
  90. type="text"
  91. name="contact-name"
  92. id="contact-name"
  93. class="form-control"
  94. placeholder="Your Name"
  95. required
  96. />
  97. </div>
  98. <div class="col-lg-6 col-6">
  99. <label
  100. for="contact-phone"
  101. class="form-label"
  102. ><?php echo $weblangs->trans("Phone"); ?></label
  103. >
  104. <input
  105. type="telephone"
  106. name="contact-phone"
  107. id="contact-phone"
  108. class="form-control"
  109. />
  110. </div>
  111. <div class="col-12">
  112. <label
  113. for="contact-email"
  114. class="form-label"
  115. ><?php echo $weblangs->trans("Email"); ?></label
  116. >
  117. <input
  118. type="email"
  119. name="contact-email"
  120. id="contact-email"
  121. pattern="[^ @]*@[^ @]*"
  122. class="form-control"
  123. placeholder="Your Email"
  124. required=""
  125. />
  126. <label
  127. for="contact-message"
  128. class="form-label"
  129. ><?php echo $weblangs->trans("Message"); ?></label
  130. >
  131. <textarea
  132. class="form-control"
  133. rows="5"
  134. id="contact-message"
  135. name="contact-message"
  136. placeholder="Your Message"
  137. ></textarea>
  138. </div>
  139. <div class="col-lg-5 col-12 ms-auto">
  140. <button type="submit" class="form-control">
  141. <?php echo $weblangs->trans("Send"); ?>
  142. </button>
  143. </div>
  144. </form>
  145. </div>
  146. <div class="col-lg-4 col-12 mx-auto mt-lg-5 mt-4">
  147. <h5>Weekdays</h5>
  148. <div class=" mb-lg-3">
  149. <?php $days = ["MONDAY", "TUESDAY", "WEDNESDAY", "THURSDAY", "FRIDAY"];
  150. foreach ($days as $day){
  151. echo "<p> $day : " .getDolGlobalString("MAIN_INFO_OPENINGHOURS_$day") ."</p>";
  152. }
  153. ?>
  154. </div>
  155. <h5>Weekends</h5>
  156. <div class="d-flex">
  157. <p>Saturday and Sunday</p>
  158. <p class="ms-5">to be determined !</p>
  159. </div>
  160. </div>
  161. <div class="col-12" id="divaddress">
  162. <br><br>
  163. <h4 class="mt-5 mb-4 center">
  164. <?php echo $mysoc->getFullAddress() ?>
  165. </h4>
  166. <!-- Google MAPS -->
  167. <center><div class="mapouter"><div class="gmap_canvas"><iframe width="600" height="500" id="gmap_canvas" src="https://maps.google.com/maps?q=<?php echo urlencode($mysoc->getFullAddress()); ?>&t=&z=13&ie=UTF8&iwloc=&output=embed" frameborder="0" scrolling="no" marginheight="0" marginwidth="0"></iframe>
  168. </div>
  169. <style>.mapouter{text-align:right;height:500px;width:600px;}.gmap_canvas {overflow:hidden;background:none!important;height:500px;width:600px;}</style>
  170. </div></center>
  171. </div>
  172. </div>
  173. </div>
  174. </section>
  175. </main>
  176. <!-- Modal -->
  177. <div
  178. class="modal fade"
  179. id="BookingModal"
  180. tabindex="-1"
  181. aria-labelledby="BookingModal"
  182. aria-hidden="true"
  183. >
  184. <div class="modal-dialog modal-dialog-centered modal-xl">
  185. <div class="modal-content">
  186. <div class="modal-header">
  187. <h3 class="mb-0">Reserve a table</h3>
  188. <button
  189. type="button"
  190. class="btn-close"
  191. data-bs-dismiss="modal"
  192. aria-label="Close"
  193. ></button>
  194. </div>
  195. <div
  196. class="modal-body d-flex flex-column justify-content-center"
  197. >
  198. <div class="booking">
  199. <form
  200. class="booking-form row"
  201. role="form"
  202. action="contact.php"
  203. method="POST"
  204. >
  205. <input type="hidden" name="token" value="<?php echo newToken(); ?>" />
  206. <input type="hidden" name="action" value="sendmail">
  207. <div class="col-lg-6 col-12">
  208. <label for="name" class="form-label"
  209. >Full Name</label
  210. >
  211. <input
  212. type="text"
  213. name="name"
  214. id="name"
  215. class="form-control"
  216. placeholder="Your Name"
  217. required
  218. />
  219. </div>
  220. <div class="col-lg-6 col-12">
  221. <label for="email" class="form-label"
  222. >Email Address</label
  223. >
  224. <input
  225. type="email"
  226. name="email"
  227. id="email"
  228. pattern="[^ @]*@[^ @]*"
  229. class="form-control"
  230. placeholder="your@email.com"
  231. required
  232. />
  233. </div>
  234. <div class="col-lg-6 col-12">
  235. <label for="phone" class="form-label"
  236. >Phone Number</label
  237. >
  238. <input
  239. type="telephone"
  240. name="phone"
  241. id="phone"
  242. class="form-control"
  243. />
  244. </div>
  245. <div class="col-lg-6 col-12">
  246. <label for="people" class="form-label"
  247. >Number of persons</label
  248. >
  249. <input
  250. type="text"
  251. name="people"
  252. id="people"
  253. class="form-control"
  254. placeholder="12 persons"
  255. />
  256. </div>
  257. <div class="col-lg-6 col-12">
  258. <label for="date" class="form-label"
  259. >Date</label
  260. >
  261. <input
  262. type="date"
  263. name="date"
  264. id="date"
  265. value=""
  266. class="form-control"
  267. />
  268. </div>
  269. <div class="col-lg-6 col-12">
  270. <label for="time" class="form-label"
  271. >Time</label
  272. >
  273. <select
  274. class="form-select form-control"
  275. name="time"
  276. id="time"
  277. >
  278. <option value="5" selected>
  279. 5:00 PM
  280. </option>
  281. <option value="6">6:00 PM</option>
  282. <option value="7">7:00 PM</option>
  283. <option value="8">8:00 PM</option>
  284. <option value="9">9:00 PM</option>
  285. </select>
  286. </div>
  287. <div class="col-12">
  288. <label for="message" class="form-label"
  289. >Special Request</label
  290. >
  291. <textarea
  292. class="form-control"
  293. rows="4"
  294. id="message"
  295. name="message"
  296. placeholder=""
  297. ></textarea>
  298. </div>
  299. <div class="col-lg-4 col-12 ms-auto">
  300. <button type="submit" class="form-control">
  301. Submit Request
  302. </button>
  303. </div>
  304. </form>
  305. </div>
  306. </div>
  307. <div class="modal-footer"></div>
  308. </div>
  309. </div>
  310. </div>
  311. </section>
  312. <?php includeContainer('footer'); ?>
  313. </body>
  314. </html>
  315. <?php // BEGIN PHP
  316. $tmp = ob_get_contents(); ob_end_clean(); dolWebsiteOutput($tmp, "html", 249);
  317. // END PHP ?>