Source for file defines.php

Documentation is available at defines.php

  1. <?php
  2.  
  3. $session Session_Wrapper::getInstance();
  4.  
  5. // ************************ SESSION_ID *************************************
  6. //define ("SESSION_ID",  session_id());
  7.  
  8. if $session->get("perm_id"== null)
  9. {
  10.     $session->set("perm_id""PERM_CUSTOMER");
  11. }
  12.  
  13. define ("PORTFOLIO_DEFAULT""polarsystemsdesign");
  14.  
  15.  
  16. define ("MISSING_VALUE",  "*UNDEFINED*");
  17. define ("MISSING_NEXT_ID""-1");
  18. define ("NO_BOOKING_ID"0);
  19. if $session->get("booking_id"== null)
  20. {
  21.     $session->set("booking_id"NO_BOOKING_ID);
  22. }
  23.  
  24. // ***************************** FLAGS **************************************
  25. $true_or_false="true(".true.") or false(".false.")";
  26. define ("TRUE_OR_FALSE",  $true_or_false);
  27. define ("ADMIN_CONTROL_LINK",  "<A class=in-line-link href=javascript:trigger_submit('')>Back to Menu</A>");
  28.  
  29. // ************************ CLIENT TYPE   *************************************
  30. define ("CLIENT_TYPE_WEBSITE"0);
  31. define ("CLIENT_TYPE_OWNER",   1);
  32. define ("CLIENT_TYPE_ROOT",    2);
  33.  
  34. // ************************ PERMISSIONS   **********************************
  35. //define ("PERM_SIMPLE_USER",  0);
  36. //define ("PERM_BARRED",  1);
  37. //define ("PERM_CUSTOMER",2);
  38. //define ("PERM_OWNER",  3);
  39. //define ("PERM_ROOT",    4);
  40. // 20/11/08
  41. define ("PERM_BASIC",  0.0);
  42. define ("PERM_BARRED"1.0);
  43. define ("PERM_CUSTOMER"2.0);
  44. define ("PERM_CLIENT"10.0);
  45. define ("PERM_CLIENT_BASIC"10.1);
  46. define ("PERM_CLIENT_STANDARD"10.2);
  47. define ("PERM_CLIENT_PREMIUM",  10.3);
  48. define ("PERM_ROOT",   20.0);
  49.  
  50.  
  51. // ********************* DEFAULT CLIENTS ************************************
  52. // unknown
  53. define ("CLIENT_UNKNOWN",  -99);
  54.  
  55. // root
  56. define ("CLIENT_ROOT",   -1);
  57. define ("CLIENT_DEMO_VILLA"-2);
  58. define ("CLIENT_DEMO_BandB"-3);
  59. if $session->get("client_id"== null)
  60. {
  61.     $session->set("client_id"CLIENT_DEMO_VILLA);
  62. }
  63.  
  64. // ********************* DEFAULT USERS **************************************
  65. define ("LOGIN_NAME_ROOT",  "root");
  66. define ("LOGIN_NAME_DEMO_VILLA",  "demo1");
  67. define ("LOGIN_NAME_DEMO_BandB",  "demo2");
  68. define ("USER_ROOT",   CLIENT_ROOT);
  69. define ("USER_DEMO_VILLA"CLIENT_DEMO_VILLA);
  70. define ("USER_DEMO_BandB"CLIENT_DEMO_BandB);
  71.  
  72. // unknown
  73. define ("USER_GENERIC",  CLIENT_UNKNOWN-1);
  74. define ("USER_UNKNOWN",  CLIENT_UNKNOWN);
  75. define ("LOGIN_NAME_UNKNOWN",  CLIENT_UNKNOWN);
  76.  
  77. // ************************ DATES ******************************************
  78. define ("DATE_FORMAT_SQL",  "Y-m-d");
  79. define ("DATE_FORMAT_SQL_TIME",  DATE_FORMAT_SQL." H:i:s");
  80. define ("DATE_FORMAT_DDD",   "D");
  81. define ("DATE_FORMAT_PHP",   "d M Y");
  82. define ("DATE_FORMAT_PHP_DDD",   "D jS M Y");
  83. define ("DATE_TODAY",  date(DATE_FORMAT_SQL));
  84. define ("DATE_NOW",  date(DATE_FORMAT_SQL_TIME));
  85. define ("DATE_FOREVER",  "2020-12-31")// should be enough!
  86. define ("DATE_FROM_DEFAULT"DATE_TODAY);
  87. define ("DATE_TO_DEFAULT",   DATE_FOREVER);
  88. define ("DATE_BLANK1",   "0000-00-00");
  89. define ("DATE_BLANK2",   DATE_BLANK1." 00:00:00");
  90.  
  91. // Master Email
  92. define ("ROOT_EMAIL",  "enquiries@polarsystemsdesign.co.uk");
  93. define ("CONTACT_WEBMASTER_TEXT""Please contact your <A class=in-line-link href='mailto:".ROOT_EMAIL."'>website administrator</A>.");
  94. //if (!defined(MASTER_EMAIL))
  95. //{
  96.     //if ($_GET['install'] == true)
  97.     //{
  98.         //define ("MASTER_EMAIL",  "enquiries@polarsystemsdesign.co.uk");
  99. define("MASTER_COMPANY""Polar Systems Design");
  100.         //define("MASTER_URL", "http://www.polarsystemsdesign.co.uk");
  101.     //}
  102. //}
  103.  
  104. // ************************ PAYMENT METHODS *********************************
  105. define ("PYT_CARD",   1);
  106. define ("PYT_CHEQUE"2);
  107. define ("PYT_PHONE",  3);
  108.  
  109. // ************************ ACCOMM DETAILS  *********************************
  110. /*
  111. if (!defined(BOOKABLE_ADULT))
  112. {
  113.     define ("BOOKABLE_ADULT",  1);
  114.     define ("BOOKABLE_CHILD",  2);
  115.     define ("BOOKABLE_INFANT", 3);
  116.     define ("BOOKABLE_COT",    4);
  117.     define ("BOOKABLE_PET",    5);
  118.     define ("BOOKABLE_RQT",    6);
  119. }
  120. */
  121.  
  122. define ("CELL_CLASS_TEXT""cell_class");
  123. define ("CELL_CLASS_DELIM""^");
  124.  
  125. // *************************** SEASONS      *********************************
  126. define ("SEASON_DEFAULT",  1);
  127.  
  128. define ("STATUS_DATE_AVAILABLE"1);
  129. define ("STATUS_DATE_BOOKED"2);
  130. define ("STATUS_DATE_PROVISIONAL"5);
  131. define ("STATUS_BOOKING_HELD"1);
  132. define ("STATUS_BOOKING_CANCELLED"5);
  133.  
  134. // *************************** BOOKING_STATUS ********************************
  135. define ("STATUS_BOOKING_DEFAULT"1);
  136. define ("STATUS_DATE_DEFAULT"4);
  137. define ("STATUS_BOOKING_ADMIN"6)// Dummy booking by admin, eg blocked dates
  138.  
  139. // *************************** 'REQUIRED' INDICATOR **************************
  140. define ("RQD_INDICATOR""<SPAN class=error>*</SPAN>")// see BookingForm.inc etc

Documentation generated on Fri, 27 Mar 2009 13:48:32 +0000 by phpDocumentor 1.4.1