YaWK  24.1
Yet another WebKit
YAWK\PLUGINS\BOOKING\booking Class Reference

Booking Plugin is perfect if you want to let your customers submit appointments from frontend. Entries can be viewed, setup and monitored in the backend. More...

Public Member Functions

 getFrontendForm ($config, $lang)
 draw (output) html of the frontend form. This is displayed to the user. He will use to place a booking More...
 

Public Attributes

 $alternative_day
 
 $alternative_month
 
 $alternative_time
 
 $alternative_year
 
 $ban
 
 $comment
 
 $confirmed
 
 $date_alternative
 
 $date_confirmed
 
 $date_created
 
 $date_wish
 
 $datewish_day
 
 $datewish_month
 
 $datewish_time
 
 $datewish_year
 
 $day
 
 $email
 
 $gid
 
 $grade
 
 $hostname
 
 $id
 
 $income
 
 $invited
 
 $ip
 
 $lang
 
 $message
 
 $month
 
 $name
 
 $outdated
 
 $outstanding_sum
 
 $phone
 
 $referer
 
 $success
 
 $text
 
 $time
 
 $uid
 
 $useragent
 
 $visits
 

Detailed Description

Booking Plugin is perfect if you want to let your customers submit appointments from frontend. Entries can be viewed, setup and monitored in the backend.

Let users submit appointments from frontend. You can view & manage them in backend.

The Booking Plugin is a simple but nice, clean frontend form. Users can submit appointments. The entries are managable in the backend. Perfect for any kind of appointment requests. E.g. if you are a Hairdresser your customers can submit their wished dates. If you are a musician, this is perfect to do your bookings. You can manage them in the Backend and view all bookings in a sortable, clean table. You can set the Appointment to "done", rate it, count how many times you've met that user, how many bookings were successful and many, many more.

Class covers both, backend & frontend functionality. See Methods Summary for Details!

Author
Daniel Retzl danie.nosp@m.lret.nosp@m.zl@gm.nosp@m.ail..nosp@m.com
Version
1.0.0

Definition at line 22 of file booking.php.

Member Function Documentation

◆ getFrontendForm()

YAWK\PLUGINS\BOOKING\booking::getFrontendForm (   $config,
  $lang 
)

draw (output) html of the frontend form. This is displayed to the user. He will use to place a booking

Returns
string

Definition at line 294 of file booking.php.

295  {
296  /*
297  echo "<pre>";
298  echo "<h1>THIS object:</h1>";
299  print_r($this);
300  echo "<hr>";
301  echo "<h2>config object:</h2>";
302  print_r($config);
303  echo "</pre>";
304  */
305 
306  // init form html code markup variable
307  $html = "";
308 
309  $html .= "
310 <form class=\"form\" id=\"form\" method=\"post\" action=\"booking.html\">
311  <div class=\"row\">
312  <div class=\"col-md-4\">";
313 
314  // NAME
315  if ($config->bookingContactName !== "false")
316  {
317  if ($config->bookingContactName === "required")
318  { $requiredMarkup = "*"; }
319  else { $requiredMarkup = ""; }
320 
321  $html .= "
322  <label for=\"name\">Name".$requiredMarkup."</label>
323  <input type=\"text\" name=\"name\" id=\"name\" class=\"form-control\" placeholder=\"Your name\">
324  <br>";
325  }
326 
327  // EMAIL
328  if ($config->bookingEmail !== "false")
329  {
330  if ($config->bookingEmail === "required")
331  { $requiredMarkup = "*"; }
332  else { $requiredMarkup = ""; }
333 
334  $html .= "
335  <label for=\"email\">Email".$requiredMarkup."</label>
336  <input type=\"text\" name=\"email\" id=\"email\" class=\"form-control\" placeholder=\"[email protected]\">
337  <br>";
338  }
339 
340  // PHONE
341  if ($config->bookingPhone !== "false")
342  {
343  if ($config->bookingPhone === "required")
344  { $requiredMarkup = "*"; }
345  else { $requiredMarkup = ""; }
346 
347  $html .= "
348  <label for=\"phone\">Phone".$requiredMarkup."</label>
349  <input type=\"text\" name=\"phone\" id=\"phone\" class=\"form-control\" placeholder=\"+00 1234 / 1234567\">
350  <br>";
351  }
352  $html .= "
353 <br><br>
354  </div>
355  <div class=\"col-md-8\">
356  <div class=\"row\">
357  <div class=\"col-md-6\">
358  <!-- left -->";
359 
360  // EVENT DATE TIME
361  if ($config->bookingEventDatetime !== "false")
362  {
363  if ($config->bookingEventDatetime === "required")
364  { $requiredMarkup = "*"; }
365  else { $requiredMarkup = ""; }
366 
367  $html .= "
368  <label for=\"eventDateTime\">Event Date + Time".$requiredMarkup."</label>
369  <input type=\"text\" name=\"eventDateTime\" id=\"eventDateTime\" class=\"form-control\" placeholder=\"select Date\">
370  <br>";
371  }
372 
373  $html .= "</div>
374  <div class=\"col-md-6\">
375  <!-- right -->";
376 
377  // EVENT DATE TIME
378  if ($config->bookingBand !== "false")
379  {
380  if ($config->bookingBand === "required")
381  { $requiredMarkup = "*"; }
382  else { $requiredMarkup = ""; }
383 
384  $html .= "
385  <label for=\"band\">Band".$requiredMarkup."</label>
386  <select name=\"band\" id=\"band\" class=\"form-control\">
387  <option value=\"\">bitte ausw&auml;hlen</option>
388  <option value=\"Duo: Stephan Heiner &amp; B&ouml;rns Funkyfingers\">Duo: Stephan Heiner &amp; B&ouml;rns Funkyfingers</option>
389  <option value=\"Trio: BSB (B&ouml;rns, Stephan, Bertl)\">Trio: BSB (B&ouml;rns, Stephan, Bertl)</option>
390  <option value=\"Tommy Lee &amp; Glacestrizzis\">Tommy Lee &amp; Glacestrizzis</option>
391  <option value=\"WiR &amp; Jetzt\">WiR &amp; Jetzt</option>
392  </select>
393  <br>";
394  }
395 
396  // EVENT TYPE
397  if ($config->bookingLocationType !== "false")
398  {
399  if ($config->bookingLocationType === "required")
400  { $requiredMarkup = "*"; }
401  else { $requiredMarkup = ""; }
402 
403  $html .= "
404  <label for=\"locationType\">Art der Veranstaltung".$requiredMarkup."</label>
405  <select name=\"locationType\" id=\"locationType\" class=\"form-control\">
406  <option value=\"\">bitte ausw&auml;hlen</option>
407  <option value=\"Hochzeit\">Hochzeit</option>
408  <option value=\"Geburtstagsparty\">Geburtstagsparty</option>
409  <option value=\"Private Veranstaltung\">Private Veranstaltung</option>
410  <option value=\"Firmen Event\">Firmen Event</option>
411  <option value=\"Weihnachtsfeier\">Weihnachtsfeier</option>
412  <option value=\"Gro&szlig;veranstaltung\">Gro&szlig;veranstaltung</option>
413  <option value=\"Andere\">Andere</option>
414  </select>
415  <br>";
416  }
417 
418  // LOCATION
419  if ($config->bookingLocation !== "false")
420  {
421  if ($config->bookingLocation === "required")
422  { $requiredMarkup = "*"; }
423  else { $requiredMarkup = ""; }
424 
425  $html .= "
426  <label for=\"location\">Location".$requiredMarkup."</label>
427  <select name=\"location\" id=\"location\" class=\"form-control\">
428  <option value=\"\">bitte ausw&auml;hlen</option>
429  <option value=\"Indoor\">Indoor</option>
430  <option value=\"Outdoor\">Outdoor</option>
431  </select>
432  <br>";
433  }
434 
435  // LOCATION
436  if ($config->bookingCrowdAmount !== "false")
437  {
438  if ($config->bookingCrowdAmount === "required")
439  { $requiredMarkup = "*"; }
440  else { $requiredMarkup = ""; }
441 
442  $html .= "
443  <label for=\"crowdAmount\">Gr&ouml;&szlig;e".$requiredMarkup."</label>
444  <select name=\"crowdAmount\" id=\"crowdAmount\" class=\"form-control\">
445  <option value=\"\">bitte ausw&auml;hlen</option>
446  <option value=\"0 - 50\">0 - 50 Personen</option>
447  <option value=\"50 - 100\">50 - 100 Personen</option>
448  <option value=\"100 - 200\">100 - 200 Personen</option>
449  <option value=\"300 - 500\">300 - 500 Personen</option>
450  <option value=\"500 - 1000\">500 - 1000 Personen</option>
451  <option value=\"> 1000\">> 1000 Personen</option>
452  </select>
453  <br>";
454  }
455 
456  $html .="</div>
457  </div>";
458 
459  // MESSAGE
460  if ($config->bookingMessage !== "false")
461  {
462  if ($config->bookingMessage === "required")
463  { $requiredMarkup = "*"; }
464  else { $requiredMarkup = ""; }
465 
466  $html .= "
467  <label for=\"message\">Message".$requiredMarkup."</label>
468  <textarea name=\"mesage\" id=\"message\" class=\"form-control\" rows=\"8\"></textarea>
469  <br>";
470  }
471 
472  $html .="<label for=\"mailCopy\">Send a copy of this message to myself. &nbsp;
473  <input type=\"checkbox\" name=\"mailCopy\" value=\"1\" checked aria-checked=\"true\" id=\"mailCopy\"></label>
474  <button type=\"submit\" class=\"btn btn-success pull-right\" style=\"margin-top:1%;\" contenteditable=\"false\"><i class=\"fa fa-envelope-o\"></i> &nbsp;Send Message</button>
475  <input type=\"hidden\" name=\"sent\" value=\"1\">";
476 
477 
478  $html .= "</div>
479  </div>
480  </form>";
481  return $html;
482  } /* EOFunction getTable */

Member Data Documentation

◆ $alternative_day

YAWK\PLUGINS\BOOKING\booking::$alternative_day
  • Parameters
    stringalternative user booking day

Definition at line 81 of file booking.php.

◆ $alternative_month

YAWK\PLUGINS\BOOKING\booking::$alternative_month
  • Parameters
    stringalternative user booking month

Definition at line 79 of file booking.php.

◆ $alternative_time

YAWK\PLUGINS\BOOKING\booking::$alternative_time
  • Parameters
    stringalternative user booking time

Definition at line 77 of file booking.php.

◆ $alternative_year

YAWK\PLUGINS\BOOKING\booking::$alternative_year
  • Parameters
    stringalternative user booking year

Definition at line 83 of file booking.php.

◆ $ban

YAWK\PLUGINS\BOOKING\booking::$ban
  • Parameters
    int0|1 is this user (email adress) banned?

Definition at line 97 of file booking.php.

◆ $comment

YAWK\PLUGINS\BOOKING\booking::$comment
  • Parameters
    stringinternal comment for this booking (max 255 chars)

Definition at line 57 of file booking.php.

◆ $confirmed

YAWK\PLUGINS\BOOKING\booking::$confirmed
  • Parameters
    int0|1 is this booking confirmed?

Definition at line 65 of file booking.php.

◆ $date_alternative

YAWK\PLUGINS\BOOKING\booking::$date_alternative
  • Parameters
    stringalternative user booking date (full)

Definition at line 85 of file booking.php.

◆ $date_confirmed

YAWK\PLUGINS\BOOKING\booking::$date_confirmed
  • Parameters
    int0|1 is this a confirmed booking?

Definition at line 41 of file booking.php.

◆ $date_created

YAWK\PLUGINS\BOOKING\booking::$date_created
  • Parameters
    stringdate when the booking was created

Definition at line 39 of file booking.php.

◆ $date_wish

YAWK\PLUGINS\BOOKING\booking::$date_wish
  • Parameters
    stringuser booking date wish (full)

Definition at line 75 of file booking.php.

◆ $datewish_day

YAWK\PLUGINS\BOOKING\booking::$datewish_day
  • Parameters
    stringuser booking day

Definition at line 71 of file booking.php.

◆ $datewish_month

YAWK\PLUGINS\BOOKING\booking::$datewish_month
  • Parameters
    stringuser booking month

Definition at line 69 of file booking.php.

◆ $datewish_time

YAWK\PLUGINS\BOOKING\booking::$datewish_time
  • Parameters
    stringuser booking time

Definition at line 67 of file booking.php.

◆ $datewish_year

YAWK\PLUGINS\BOOKING\booking::$datewish_year
  • Parameters
    stringuser booking year

Definition at line 73 of file booking.php.

◆ $day

YAWK\PLUGINS\BOOKING\booking::$day
  • Parameters
    stringbooking day

Definition at line 27 of file booking.php.

◆ $email

YAWK\PLUGINS\BOOKING\booking::$email
  • Parameters
    stringbooking email address

Definition at line 45 of file booking.php.

◆ $gid

YAWK\PLUGINS\BOOKING\booking::$gid
  • Parameters
    stringgroup ID

Definition at line 37 of file booking.php.

◆ $grade

YAWK\PLUGINS\BOOKING\booking::$grade
  • Parameters
    intinternal voting for this booking (school grades)

Definition at line 53 of file booking.php.

◆ $hostname

YAWK\PLUGINS\BOOKING\booking::$hostname
  • Parameters
    stringusers hostname

Definition at line 61 of file booking.php.

◆ $id

YAWK\PLUGINS\BOOKING\booking::$id
  • Parameters
    stringbooking ID

Definition at line 33 of file booking.php.

◆ $income

YAWK\PLUGINS\BOOKING\booking::$income
  • Parameters
    inthow much is this booking worth?

Definition at line 63 of file booking.php.

◆ $invited

YAWK\PLUGINS\BOOKING\booking::$invited
  • Parameters
    int0|1 is this user invited?

Definition at line 99 of file booking.php.

◆ $ip

YAWK\PLUGINS\BOOKING\booking::$ip
  • Parameters
    stringIP Address of the user who booked

Definition at line 59 of file booking.php.

◆ $lang

YAWK\PLUGINS\BOOKING\booking::$lang

Definition at line 25 of file booking.php.

◆ $message

YAWK\PLUGINS\BOOKING\booking::$message
  • Parameters
    stringuser booking message

Definition at line 87 of file booking.php.

◆ $month

YAWK\PLUGINS\BOOKING\booking::$month
  • Parameters
    stringbooking month

Definition at line 29 of file booking.php.

◆ $name

YAWK\PLUGINS\BOOKING\booking::$name
  • Parameters
    stringbooking name

Definition at line 43 of file booking.php.

◆ $outdated

YAWK\PLUGINS\BOOKING\booking::$outdated
  • Parameters
    int0|1 is this booking set to outdated?

Definition at line 95 of file booking.php.

◆ $outstanding_sum

YAWK\PLUGINS\BOOKING\booking::$outstanding_sum
  • Parameters
    intexpected money from outstanding bookings

Definition at line 93 of file booking.php.

◆ $phone

YAWK\PLUGINS\BOOKING\booking::$phone
  • Parameters
    stringbooking phone number

Definition at line 47 of file booking.php.

◆ $referer

YAWK\PLUGINS\BOOKING\booking::$referer
  • Parameters
    stringreferer: where did the user came from? (last url)

Definition at line 91 of file booking.php.

◆ $success

YAWK\PLUGINS\BOOKING\booking::$success
  • Parameters
    int0|1 was the booking successful?

Definition at line 51 of file booking.php.

◆ $text

YAWK\PLUGINS\BOOKING\booking::$text
  • Parameters
    stringbooking text

Definition at line 49 of file booking.php.

◆ $time

YAWK\PLUGINS\BOOKING\booking::$time
  • Parameters
    stringbooking time

Definition at line 31 of file booking.php.

◆ $uid

YAWK\PLUGINS\BOOKING\booking::$uid
  • Parameters
    stringuser ID who booked

Definition at line 35 of file booking.php.

◆ $useragent

YAWK\PLUGINS\BOOKING\booking::$useragent
  • Parameters
    stringthe complete useragent

Definition at line 89 of file booking.php.

◆ $visits

YAWK\PLUGINS\BOOKING\booking::$visits
  • Parameters
    inthow often has this client (email adress) successful booked?

Definition at line 55 of file booking.php.


The documentation for this class was generated from the following file: