PageRenderTime 55ms CodeModel.GetById 25ms RepoModel.GetById 1ms app.codeStats 0ms

/ewcfg6.php

https://github.com/fredd-for/emaus_tesoreria
PHP | 271 lines | 163 code | 35 blank | 73 comment | 2 complexity | 38b8cd1867d46af8307d8470eba693f8 MD5 | raw file
Possible License(s): LGPL-2.1
  1. <?php
  2. /**
  3. * PHPMaker 6 configuration file
  4. */
  5. // Database connection
  6. define("EW_CONN_HOST", "localhost", TRUE);
  7. define("EW_CONN_PORT", 3306, TRUE);
  8. define("EW_CONN_USER", "user_tesoreria", TRUE);
  9. define("EW_CONN_PASS", "pass_tesoreria", TRUE);
  10. define("EW_CONN_DB", "bd_emaus_tesoreria", TRUE);
  11. // Show SQL for debug
  12. //define("EW_DEBUG_ENABLED", TRUE, TRUE); // Uncomment to debug
  13. define("EW_IS_WINDOWS", (strtolower(substr(PHP_OS, 0, 3)) === 'win'), TRUE); // Is Windows OS
  14. define("EW_IS_PHP5", (phpversion() >= "5.0.0"), TRUE); // Is PHP5
  15. define("EW_PATH_DELIMITER", ((EW_IS_WINDOWS) ? "\\" : "/"), TRUE); // Physical path delimiter
  16. define("EW_ROOT_RELATIVE_PATH", ".", TRUE); // Relative path of app root
  17. define("EW_DEFAULT_DATE_FORMAT", "dd-mm-yyyy", TRUE); // Default date format
  18. define("EW_DEFAULT_DATE_FORMAT_ID", "7", TRUE); // Default date format
  19. define("EW_DATE_SEPARATOR", "-", TRUE); // Date separator
  20. define("EW_PROJECT_NAME", "project1", TRUE); // Project Name
  21. define("EW_RANDOM_KEY", 'pYP8VuF4eUMPWX4W', TRUE); // Random key for encryption
  22. /**
  23. * Encoding for Ajax
  24. * Note: If you use non English languages, you may need to set the encoding for
  25. * Ajax features. Make sure your encoding is supported by your PHP and either
  26. * iconv functions or multibyte string functions are enabled. See PHP manual
  27. * for details
  28. * e.g. define("EW_ENCODING", "ISO-8859-1", TRUE);
  29. */
  30. define("EW_ENCODING", "ISO-8859-1", TRUE); // Encoding for Ajax
  31. /**
  32. * Password (MD5 and case-sensitivity)
  33. * Note: If you enable MD5 password, make sure that the passwords in your
  34. * user table are stored as MD5 hash (32-character hexadecimal number) of the
  35. * clear text password. If you also use case-insensitive password, convert the
  36. * clear text passwords to lower case first before calculating MD5 hash.
  37. * Otherwise, existing users will not be able to login. MD5 hash is
  38. * irreversible, password will be reset during password recovery.
  39. */
  40. define("EW_MD5_PASSWORD", TRUE, TRUE); // Use MD5 password
  41. define("EW_CASE_SENSITIVE_PASSWORD", TRUE, TRUE); // Case-sensitive password
  42. // Session names
  43. define("EW_SESSION_STATUS", EW_PROJECT_NAME . "_status", TRUE); // Login Status
  44. define("EW_SESSION_USER_NAME", EW_SESSION_STATUS . "_UserName", TRUE); // User Name
  45. define("EW_SESSION_USER_ID", EW_SESSION_STATUS . "_UserID", TRUE); // User ID
  46. define("EW_SESSION_USER_LEVEL_ID", EW_SESSION_STATUS . "_UserLevel", TRUE); // User Level ID
  47. define("EW_SESSION_USER_LEVEL", EW_SESSION_STATUS . "_UserLevelValue", TRUE); // User Level
  48. define("EW_SESSION_PARENT_USER_ID", EW_SESSION_STATUS . "_ParentUserID", TRUE); // Parent User ID
  49. define("EW_SESSION_SYS_ADMIN", EW_PROJECT_NAME . "_SysAdmin", TRUE); // System Admin
  50. define("EW_SESSION_AR_USER_LEVEL", EW_PROJECT_NAME . "_arUserLevel", TRUE); // User Level Array
  51. define("EW_SESSION_AR_USER_LEVEL_PRIV", EW_PROJECT_NAME . "_arUserLevelPriv", TRUE); // User Level Privilege Array
  52. define("EW_SESSION_SECURITY", EW_PROJECT_NAME . "_Security", TRUE); // Security Array
  53. define("EW_SESSION_MESSAGE", EW_PROJECT_NAME . "_Message", TRUE); // System Message
  54. define("EW_SESSION_INLINE_MODE", EW_PROJECT_NAME . "_InlineMode", TRUE); // Inline Mode
  55. define("EW_DATATYPE_NUMBER", 1, TRUE);
  56. define("EW_DATATYPE_DATE", 2, TRUE);
  57. define("EW_DATATYPE_STRING", 3, TRUE);
  58. define("EW_DATATYPE_BOOLEAN", 4, TRUE);
  59. define("EW_DATATYPE_MEMO", 5, TRUE);
  60. define("EW_DATATYPE_BLOB", 6, TRUE);
  61. define("EW_DATATYPE_TIME", 7, TRUE);
  62. define("EW_DATATYPE_GUID", 8, TRUE);
  63. define("EW_DATATYPE_OTHER", 9, TRUE);
  64. define("EW_ROWTYPE_VIEW", 1, TRUE); // Row type view
  65. define("EW_ROWTYPE_ADD", 2, TRUE); // Row type add
  66. define("EW_ROWTYPE_EDIT", 3, TRUE); // Row type edit
  67. define("EW_ROWTYPE_SEARCH", 4, TRUE); // Row type search
  68. define("EW_ROWTYPE_MASTER", 5, TRUE); // Row type master record
  69. define("EW_COMPOSITE_KEY_SEPARATOR", ",", TRUE); // Composite key separator
  70. define("EW_EMAIL_KEYWORD_SEPARATOR", "|", TRUE); // Email keyword separator
  71. define("EW_HIGHLIGHT_COMPARE", TRUE, TRUE); // TRUE = case-insensitive
  72. // Table parameters
  73. define("EW_TABLE_REC_PER_PAGE", "RecPerPage", TRUE); // Records per page
  74. define("EW_TABLE_START_REC", "start", TRUE); // Start record
  75. define("EW_TABLE_PAGE_NO", "pageno", TRUE); // Page number
  76. define("EW_TABLE_BASIC_SEARCH", "psearch", TRUE); // Basic search keyword
  77. define("EW_TABLE_BASIC_SEARCH_TYPE","psearchtype", TRUE); // Basic search type
  78. define("EW_TABLE_ADVANCED_SEARCH", "advsrch", TRUE); // Advanced search
  79. define("EW_TABLE_SEARCH_WHERE", "searchwhere", TRUE); // Search where clause
  80. define("EW_TABLE_WHERE", "where", TRUE); // Table where
  81. define("EW_TABLE_ORDER_BY", "orderby", TRUE); // Table order by
  82. define("EW_TABLE_SORT", "sort", TRUE); // Table sort
  83. define("EW_TABLE_KEY", "key", TRUE); // Table key
  84. define("EW_TABLE_SHOW_MASTER", "showmaster", TRUE); // Table show master
  85. define("EW_TABLE_MASTER_TABLE", "MasterTable", TRUE); // Master table
  86. define("EW_TABLE_MASTER_FILTER", "MasterFilter", TRUE); // Master filter
  87. define("EW_TABLE_DETAIL_FILTER", "DetailFilter", TRUE); // Detail filter
  88. define("EW_TABLE_RETURN_URL", "return", TRUE); // Return url
  89. // Database
  90. define("EW_IS_MSACCESS", FALSE, TRUE); // Access (Reserved, NOT USED)
  91. define("EW_IS_MYSQL", TRUE, TRUE); // MySQL
  92. define("EW_DB_QUOTE_START", "`", TRUE);
  93. define("EW_DB_QUOTE_END", "`", TRUE);
  94. /**
  95. * MySQL charset (for SET NAMES statement, not used by default)
  96. * Note: Read http://dev.mysql.com/doc/refman/5.0/en/charset-connection.html
  97. * before using this setting.
  98. */
  99. define("EW_MYSQL_CHARSET", "", TRUE);
  100. // Security
  101. define("EW_ADMIN_USER_NAME", "Admin", TRUE); // Administrator user name
  102. define("EW_ADMIN_PASSWORD", "8209125", TRUE); // Administrator password
  103. // Dynamic User Level table
  104. $EW_USER_LEVEL_TABLE_NAME[] = 'cuenta';
  105. $EW_USER_LEVEL_TABLE_CAPTION[] = "Cuenta";
  106. $EW_USER_LEVEL_TABLE_NAME[] = 'diezmo';
  107. $EW_USER_LEVEL_TABLE_CAPTION[] = "Diezmo";
  108. $EW_USER_LEVEL_TABLE_NAME[] = 'miembro';
  109. $EW_USER_LEVEL_TABLE_CAPTION[] = "Miembro";
  110. $EW_USER_LEVEL_TABLE_NAME[] = 'saldo_cuenta';
  111. $EW_USER_LEVEL_TABLE_CAPTION[] = "Saldo Cuenta";
  112. $EW_USER_LEVEL_TABLE_NAME[] = 'saldo_iglesia';
  113. $EW_USER_LEVEL_TABLE_CAPTION[] = "Saldo Iglesia";
  114. $EW_USER_LEVEL_TABLE_NAME[] = 'usuario';
  115. $EW_USER_LEVEL_TABLE_CAPTION[] = "Usuario";
  116. // Dynamic User Level settings
  117. // User level definition table/field names
  118. define("EW_USER_LEVEL_TABLE", "`rol`", TRUE);
  119. define("EW_USER_LEVEL_ID_FIELD", "`idRol`", TRUE);
  120. define("EW_USER_LEVEL_NAME_FIELD", "`nombre`", TRUE);
  121. // User Level privileges table/field names
  122. define("EW_USER_LEVEL_PRIV_TABLE", "`permiso`", TRUE);
  123. define("EW_USER_LEVEL_PRIV_TABLE_NAME_FIELD", "`nombre`", TRUE);
  124. define("EW_USER_LEVEL_PRIV_USER_LEVEL_ID_FIELD", "`idRol`", TRUE);
  125. define("EW_USER_LEVEL_PRIV_PRIV_FIELD", "`permiso`", TRUE);
  126. // User level constants
  127. define("EW_USER_LEVEL_COMPAT", TRUE, TRUE); // Use old User Level values. Comment out to use new User Level values (separate values for View/Search)
  128. define("EW_ALLOW_ADD", 1, TRUE); // Add
  129. define("EW_ALLOW_DELETE", 2, TRUE); // Delete
  130. define("EW_ALLOW_EDIT", 4, TRUE); // Edit
  131. define("EW_ALLOW_LIST", 8, TRUE); // List
  132. if (defined("EW_USER_LEVEL_COMPAT")) {
  133. define("EW_ALLOW_VIEW", 8, TRUE); // View
  134. define("EW_ALLOW_SEARCH", 8, TRUE); // Search
  135. } else {
  136. define("EW_ALLOW_VIEW", 32, TRUE); // View
  137. define("EW_ALLOW_SEARCH", 64, TRUE); // Search
  138. }
  139. define("EW_ALLOW_REPORT", 8, TRUE); // Report
  140. define("EW_ALLOW_ADMIN", 16, TRUE); // Admin
  141. // Hierarchical User ID
  142. define("EW_USER_ID_IS_HIERARCHICAL", TRUE, TRUE); // Change to FALSE to show 1 level
  143. // Email
  144. define("EW_EMAIL_COMPONENT", strtoupper("PHP"), TRUE);
  145. define("EW_SMTP_SERVER", "localhost", TRUE); // SMTP server
  146. define("EW_SMTP_SERVER_PORT", 25, TRUE); // SMTP server port
  147. define("EW_SMTP_SERVER_USERNAME", "", TRUE); // SMTP server user name
  148. define("EW_SMTP_SERVER_PASSWORD", "", TRUE); // SMTP server password
  149. define("EW_SENDER_EMAIL", "", TRUE); // Sender email
  150. define("EW_RECIPIENT_EMAIL", "", TRUE); // Receiver email
  151. // File upload
  152. define("EW_UPLOAD_DEST_PATH", "", TRUE); // Upload destination path (relative to app root)
  153. define("EW_UPLOAD_ALLOWED_FILE_EXT", "gif,jpg,jpeg,bmp,png,doc,xls,pdf,zip", TRUE); // Allowed file extensions
  154. define("EW_IMAGE_ALLOWED_FILE_EXT", "gif,jpg,png,bmp", TRUE); // Allowed file extensions for images
  155. define("EW_MAX_FILE_SIZE", 2000000, TRUE); // Max file size
  156. define("EW_THUMBNAIL_FILE_PREFIX", "tn_", TRUE); // Thumbnail file prefix
  157. define("EW_THUMBNAIL_FILE_SUFFIX", "", TRUE); // Thumbnail file suffix
  158. define("EW_THUMBNAIL_DEFAULT_WIDTH", 0, TRUE); // Thumbnail default width
  159. define("EW_THUMBNAIL_DEFAULT_HEIGHT", 0, TRUE); // Thumbnail default height
  160. define("EW_THUMBNAIL_DEFAULT_QUALITY", 75, TRUE); // Thumbnail default qualtity (JPEG)
  161. define("EW_UPLOADED_FILE_MODE", 0666, TRUE); // Uploaded file mode
  162. define("EW_UPLOAD_TMP_PATH", "", TRUE); // User upload temp path (relative to app root) e.g. "tmp/"
  163. // Audit Trail
  164. define("EW_AUDIT_TRAIL_PATH", "", TRUE); // Audit trail path (relative to app root)
  165. // Export records
  166. define("EW_EXPORT_ALL", TRUE, TRUE); // Export all records
  167. define("EW_XML_ENCODING", "", TRUE); // Encoding for Export to XML
  168. // Export original value
  169. define("EW_EXPORT_ORIGINAL_VALUE", FALSE, TRUE);
  170. // Use token in URL (reserved, not used, do NOT change!)
  171. define("EW_USE_TOKEN_IN_URL", FALSE, TRUE);
  172. /**
  173. * Search multi value option
  174. * 1 - no multi value
  175. * 2 - AND all multi values
  176. * 3 - OR all multi values
  177. */
  178. define("EW_SEARCH_MULTI_VALUE_OPTION", 3, TRUE);
  179. // Validate option
  180. define("EW_CLIENT_VALIDATE", TRUE, TRUE);
  181. define("EW_SERVER_VALIDATE", FALSE, TRUE);
  182. // Checkbox and radio button groups
  183. define("EW_ITEM_TEMPLATE_CLASSNAME", "ewTemplate", TRUE);
  184. define("EW_ITEM_TABLE_CLASSNAME", "ewItemTable", TRUE);
  185. // Remove XSS
  186. define("EW_REMOVE_XSS", TRUE, TRUE);
  187. // Lookup
  188. define("EW_RECORD_DELIMITER", "\r", TRUE);
  189. define("EW_FIELD_DELIMITER", "|", TRUE);
  190. /**
  191. * Numeric and monetary formatting options
  192. * Set EW_USE_DEFAULT_LOCALE to TRUE to override localeconv and use the
  193. * following constants for ew_FormatCurrency/Number/Percent functions
  194. * Also read http://www.php.net/localeconv for description of the constants
  195. */
  196. define("EW_USE_DEFAULT_LOCALE", FALSE, TRUE);
  197. define("DEFAULT_DECIMAL_POINT", ".", TRUE);
  198. define("DEFAULT_THOUSANDS_SEP", ",", TRUE);
  199. define("DEFAULT_CURRENCY_SYMBOL", "$", TRUE);
  200. define("DEFAULT_MON_DECIMAL_POINT", ".", TRUE);
  201. define("DEFAULT_MON_THOUSANDS_SEP", ",", TRUE);
  202. define("DEFAULT_POSITIVE_SIGN", "", TRUE);
  203. define("DEFAULT_NEGATIVE_SIGN", "-", TRUE);
  204. define("DEFAULT_FRAC_DIGITS", 2, TRUE);
  205. define("DEFAULT_P_CS_PRECEDES", TRUE, TRUE);
  206. define("DEFAULT_P_SEP_BY_SPACE", FALSE, TRUE);
  207. define("DEFAULT_N_CS_PRECEDES", TRUE, TRUE);
  208. define("DEFAULT_N_SEP_BY_SPACE", FALSE, TRUE);
  209. define("DEFAULT_P_SIGN_POSN", 3, TRUE);
  210. define("DEFAULT_N_SIGN_POSN", 3, TRUE);
  211. /**
  212. * Time zone (Note: Requires PHP 5 >= 5.1.0)
  213. * Read http://www.php.net/date_default_timezone_set for details
  214. * and http://www.php.net/timezones for supported time zones
  215. */
  216. //date_default_timezone_set("timezone_identifier"); // Comment out this line and change the timezone_identifier to use
  217. //
  218. // PHPMaker 6 global variables
  219. //
  220. // Common
  221. $Page = NULL; // Common page object
  222. $conn = NULL;
  223. $rs = NULL;
  224. $rsdtl = NULL;
  225. $Security = NULL;
  226. $objForm = NULL;
  227. $ListOptions = NULL;
  228. // Used by ValidateForm/ValidateSearch
  229. $gsFormError = "";
  230. $gsSearchError = "";
  231. // Used by *master.php
  232. $gsMasterReturnUrl = "";
  233. // Used by header.php, export checking
  234. $gsExport = "";
  235. $gsExportFile = "";
  236. ?>