Advertisement
Guest User

Untitled

a guest
Mar 30th, 2019
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 20.53 KB | None | 0 0
  1. <?php
  2. /**
  3. * phpVMS - Virtual Airline Administration Software
  4. * Copyright (c) 2008 Nabeel Shahzad
  5. * For more information, visit www.phpvms.net
  6. * Forums: http://www.phpvms.net/forum
  7. * Documentation: http://www.phpvms.net/docs
  8. *
  9. * phpVMS is licenced under the following license:
  10. * Creative Commons Attribution Non-commercial Share Alike (by-nc-sa)
  11. * View license.txt in the root, or visit http://creativecommons.org/licenses/by-nc-sa/3.0/
  12. *
  13. * @author Nabeel Shahzad
  14. * @copyright Copyright (c) 2008, Nabeel Shahzad
  15. * @link http://www.phpvms.net
  16. * @license http://creativecommons.org/licenses/by-nc-sa/3.0/
  17. */
  18.  
  19. /**
  20. * DO NOT MODIFY THESE SETTINGS HERE!!
  21. * They will get over-ridden in an update. These are just defaults
  22. * To change, copy-paste and change the line/option/setting into your
  23. * local.config.php file
  24. *
  25. * Most of these are in your local.config.php already
  26. *
  27. * View the docs for details about these settings
  28. */
  29.  
  30. define('IN_PHPVMS', true);
  31.  
  32. # Debug mode is off by default
  33. Config::Set('DEBUG_MODE', false);
  34. Config::Set('DEBUG_LEVEL', 1); // 1 logs query errors, 2 logs all queries
  35. Config::Set('ERROR_LEVEL', E_ALL ^ E_NOTICE);
  36.  
  37. # Page encoding options
  38. Config::Set('PAGE_ENCODING', 'UTF-8');
  39. Config::Set('DB_CHARSET_NAME', 'utf8');
  40.  
  41. # Maintenance mode - this disables the site to non-admins
  42. Config::Set('MAINTENANCE_MODE', false);
  43. Config::Set('MAINTENANCE_MESSAGE', 'We are currently down for maintenance, please check back soon.');
  44.  
  45. # This is your airline's twitter account, if it exists
  46. Config::Set('TWITTER_AIRLINE_ACCOUNT', '');
  47. Config::Set('TWITTER_ENABLE_PUSH', false);
  48. Config::Set('TWITTER_CONSUMER_KEY', '');
  49. Config::Set('TWITTER_CONSUMER_SECRET', '');
  50. Config::Set('TWITTER_OAUTH_TOKEN', '');
  51. Config::Set('TWITTER_OAUTH_SECRET', '');
  52.  
  53. # See more details about these in the docs
  54. Config::Set('PAGE_EXT', '.htm'); # .htm is fine. You can still run PHP
  55. Config::Set('PILOTID_OFFSET', 0); # What # to start pilot ID's from
  56. Config::Set('PILOTID_LENGTH', 4); # Length of the Pilot ID
  57. Config::Set('UNITS', 'nm'); # Your units: nm, mi or km
  58. Config::Set('LOAD_FACTOR', '82'); # %age load factor
  59. Config::Set('CARGO_UNITS', 'lbs');
  60. Config::Set('DEFAULT_MAX_CARGO_LOAD', 10000);
  61. Config::Set('DEFAULT_MAX_PAX_LOAD', 250);
  62.  
  63. # Number of routes to show in the route map
  64. Config::Set('ROUTE_MAP_SHOW_NUMBER', 25);
  65.  
  66. # After how long to mark a pilot inactive, in days
  67. Config::Set('PILOT_AUTO_RETIRE', true);
  68. Config::Set('PILOT_INACTIVE_TIME', 90);
  69.  
  70. # Automatically confirm pilots?
  71. Config::Set('PILOT_AUTO_CONFIRM', false);
  72.  
  73. # Automatically calculate ranks?
  74. Config::Set('RANKS_AUTOCALCULATE', true);
  75.  
  76. # Schedules - ignore the day of week active?
  77. Config::Set('CHECK_SCHEDULE_DAY_OF_WEEK', true);
  78.  
  79. # Schedules - only show schedules from the last filed PIREP
  80. Config::Set('SCHEDULES_ONLY_LAST_PIREP', false);
  81.  
  82. # For how many hours a pilot can edit their submitted PIREP (custom fields only)
  83. Config::Set('PIREP_CUSTOM_FIELD_EDIT', '48');
  84.  
  85. # The time to wait to be allowed to submit identical PIREPS
  86. Config::Set('PIREP_CHECK_DUPLICATE', true);
  87. Config::Set('PIREP_TIME_CHECK', '1'); # Minutes, to wait in between duplicate submits
  88.  
  89. # Whether to ignore any user-inputted load, and always calculate it
  90. Config::Set('PIREP_OVERRIDE_LOAD', false);
  91.  
  92. /* What to order schedules by. Use s.[column_name] [ASC/DESC],
  93. with the column name being from the schedules table */
  94. Config::Set('SCHEDULES_ORDER_BY', 's.flightnum ASC');
  95.  
  96. /* For PIREPS_ORDER_BY use p.[column_name] [ASC/DESC] */
  97. Config::Set('PIREPS_ORDER_BY', 'p.submitdate DESC');
  98.  
  99. /* For PILOTS_ORDER_BY use p.[column_name] [ASC/DESC] */
  100. Config::Set('PILOT_ORDER_BY', 'p.joindate ASC');
  101.  
  102. # If someone places a bid, whether to disable that or not
  103. Config::Set('DISABLE_SCHED_ON_BID', true);
  104. Config::Set('DISABLE_BIDS_ON_BID', false);
  105.  
  106. # Whether to close any bids after a certain amount of time
  107. Config::Set('CLOSE_BIDS_AFTER_EXPIRE', false);
  108. Config::Set('BID_EXPIRE_TIME', '48'); # How many hours to hold bids for
  109.  
  110. # If you want to count transfer hours in rank calculations
  111. Config::Set('TRANSFER_HOURS_IN_RANKS', false);
  112.  
  113. # Pilot pilots to only fly aircraft they're ranked to
  114. Config::Set('RESTRICT_AIRCRAFT_RANKS', true);
  115.  
  116. # The StatsData::UserOnline() function - how many minutes to check
  117. Config::Set('USERS_ONLINE_TIME', 20);
  118.  
  119. # Google Map Options
  120. Config::Set('MAP_WIDTH', '800px');
  121. Config::Set('MAP_HEIGHT', '600px');
  122. Config::Set('MAP_TYPE', 'G_PHYSICAL_MAP');
  123. Config::Set('MAP_LINE_COLOR', '#ff0000');
  124. Config::Set('MAP_CENTER_LAT', '45.484400');
  125. Config::Set('MAP_CENTER_LNG', '-62.334821');
  126. Config::Set('MAP_ZOOM_LEVEL', 12);
  127.  
  128. # ACARS options
  129. # Minutes, flights to show on the ACARS
  130. # Default is 720 minutes (12 hours)
  131. Config::Set('ACARS_LIVE_TIME', 720);
  132. Config::Set('ACARS_DEBUG', false);
  133.  
  134. /*
  135. This is the unit of money. For non-dollars, use :
  136. Dollars ($), enter "$"
  137. Euro (�), enter "&#8364;"
  138. Yen (�), enter "&yen;"
  139. Pounds (�), enter "&pound;"
  140.  
  141. For example, to set EUROS:
  142. Config::Set('MONEY_UNIT', '&#8364;');
  143. */
  144.  
  145. Config::Set('MONEY_UNIT', '$');
  146.  
  147. /*
  148. To change the money format, look at:
  149. http://us3.php.net/money_format
  150.  
  151. However, I do not recommend changing this
  152. */
  153.  
  154. Config::Set('MONEY_FORMAT', '%(#10n');
  155.  
  156.  
  157. # Fuel info
  158. /* Default fuel price, for airports that don't have
  159. And the surcharge percentage. View the docs
  160. for more details about these
  161. */
  162. Config::Set('FUEL_DEFAULT_PRICE', '5.10');
  163. Config::Set('FUEL_SURCHARGE', '5');
  164.  
  165. # Units settings
  166. # These are global, also used for FSPAX
  167. Config::Set('WeightUnit', '1'); # 0=Kg 1=lbs
  168. Config::Set('DistanceUnit', '2'); # 0=KM 1= Miles 2=NMiles
  169. Config::Set('SpeedUnit', '1'); # 0=Km/H 1=Kts
  170. Config::Set('AltUnit', '1'); # 0=Meter 1=Feet
  171. Config::Set('LiquidUnit', '3'); # 0=liter 1=gal 2=kg 3=lbs
  172. Config::Set('WelcomeMessage', 'phpVMS/FSPAX ACARS'); # Welcome Message
  173. Config::Set('LIQUID_UNIT_NAMES', array('liter','gal','kg', 'lbs'));
  174.  
  175. /* FSFK Settings
  176. Your FTP Server, and path to the lib/images folder (from where the FTP connects from), IE
  177. ftp://phpvms.net/phpvms/lib/fsfk or ftp://phpvms.net/public_html/phpvms/lib/fsfk
  178.  
  179. You want the path from when you connect to the FTP down to where the /lib/fsfk folder is
  180.  
  181. SECURITY NOTE! Make a separate FTP user and password ONLY for this, with access only to this folder
  182.  
  183. */
  184. Config::Set('FSFK_FTP_SERVER', '');
  185. Config::Set('FSFK_FTP_PORT', '21');
  186. Config::Set('FSFK_FTP_USER', '');
  187. Config::Set('FSFK_FTP_PASS', '');
  188. Config::Set('FSFK_FTP_PASSIVE_MODE', 'TRUE');
  189. Config::Set('FSFK_IMAGE_PATH', '/lib/fsfk'); // web path from SITE_ROOT
  190.  
  191. # Options for the signature that's generated
  192. Config::Set('SIGNATURE_TEXT_COLOR', '#000');
  193. Config::Set('SIGNATURE_USE_CUSTOM_FONT', true);
  194. Config::Set('SIGNATURE_FONT_PATH', SITE_ROOT.'/lib/fonts/Silkscreen.ttf');
  195. Config::Set('SIGNATURE_FONT_SIZE', '10');
  196. Config::Set('SIGNATURE_X_OFFSET', '10');
  197. Config::Set('SIGNATURE_Y_OFFSET', '17');
  198. Config::Set('SIGNATURE_FONT_PADDING', 4);
  199. Config::Set('SIGNATURE_SHOW_EARNINGS', true);
  200. Config::Set('SIGNATURE_SHOW_RANK_IMAGE', true);
  201. Config::Set('SIGNATURE_SHOW_COPYRIGHT', true);
  202.  
  203. # Avatar information
  204. Config::Set('AVATAR_FILE_SIZE', 50000); # Maximum file-size they can upload
  205. Config::Set('AVATAR_MAX_WIDTH', 80); # Resized width
  206. Config::Set('AVATAR_MAX_HEIGHT', 80); # Resized height
  207.  
  208. # Cookie information
  209. Config::Set('SESSION_LOGIN_TIME', (60*60*24*30)); # Expire after 30 days, in seconds
  210. Config::Set('SESSION_GUEST_EXPIRE', '30'); # Clear guest sessions 30 minutes
  211. //Config::Set('SESSION_COOKIE_NAME', 'VMS_AUTH_COOKIE');
  212.  
  213. # Email Settings
  214. Config::Set('EMAIL_FROM_NAME', '');
  215. Config::Set('EMAIL_FROM_ADDRESS', '');
  216.  
  217. Config::Set('EMAIL_USE_SMTP', false);
  218. # Add multiple SMTP servers by separating them with ;
  219. Config::Set('EMAIL_SMTP_SERVERS', '');
  220. Config::Set('EMAIL_SMTP_PORT', '25');
  221. Config::Set('EMAIL_SMTP_USE_AUTH', false);
  222. Config::Set('EMAIL_SMTP_SECURE', ''); # must be "ssl" for Google Apps
  223. Config::Set('EMAIL_SMTP_USER', '');
  224. Config::Set('EMAIL_SMTP_PASS', '');
  225.  
  226. # Set specific email addresses to send notifications to
  227. Config::Set('EMAIL_NEW_REGISTRATION', '');
  228. Config::Set('EMAIL_NEW_PIREP', '');
  229.  
  230. # Whether to send an email or not
  231. Config::Set('EMAIL_SEND_PIREP', true);
  232.  
  233. # This is email to specifically send email sent error to, such
  234. # as failure notices with an invalid email or something
  235. # If blank, it'll default to the "from" email that's specified
  236. Config::Set('EMAIL_RETURN_PATH', '');
  237.  
  238. Config::Set('PHPVMS_API_SERVER', 'http://api.vacentral.net');
  239. Config::Set('PHPVMS_NEWS_FEED', 'http://feeds.feedburner.com/phpvms');
  240. Config::Set('VACENTRAL_NEWS_FEED', 'http://feeds.feedburner.com/vacentral');
  241.  
  242. /* Keys for recaptcha, you can change these if you want to your own but it's
  243. a global key so it should just work */
  244. Config::Set('RECAPTCHA_PUBLIC_KEY', '6LcklAsAAAAAAJqmghmMPOACeJrAxW3sJulSboxx');
  245. Config::Set('RECAPTCHA_PRIVATE_KEY', '6LcklAsAAAAAAMeQy5ZBoDu8JOMTP-UL7ek1GedO');
  246.  
  247. /* Whether you have the /admin/maintenance.php script added into cron.
  248. If you do, set this to true. This saves many DB calls since phpVMS will
  249. have to 'fake' a cron-job
  250. */
  251. Config::Set('USE_CRON', false);
  252.  
  253. Config::Set('CHECK_RELEASE_VERSION', true);
  254. Config::Set('CHECK_BETA_VERSION', false);
  255. Config::Set('URL_REWRITE', false);
  256.  
  257. /* Days of the Week
  258. The compacted view, and the full text
  259. */
  260. Config::Set('DAYS_COMPACT', array('Su', 'M', 'T', 'W', 'Th', 'F', 'S', 'Su'));
  261.  
  262. Config::Set('DAYS_LONG',
  263. array('Sunday',
  264. 'Monday',
  265. 'Tuesday',
  266. 'Wednesday',
  267. 'Thursday',
  268. 'Friday',
  269. 'Saturday',
  270. 'Sunday'
  271. )
  272. );
  273.  
  274. Config::Set('SITE_LANGUAGE', 'en');
  275. Config::Set('ADMIN_SKIN', 'layout');
  276.  
  277.  
  278. /**
  279. * *******************************************************
  280. *
  281. *
  282. *
  283. *
  284. *
  285. *
  286. * Advanced options, don't edit unless you
  287. * know what you're doing!!
  288. *
  289. * Actually, don't change them, at all. Please.
  290. * For your sake. And mine. :)
  291. *
  292. *
  293. *
  294. *
  295. *
  296. *
  297. *
  298. *
  299. *
  300. *
  301. *
  302. *
  303. *
  304. *
  305. *
  306. *
  307. *
  308. *
  309. *
  310. *
  311. *
  312. */
  313.  
  314. $revision = trim(file_get_contents(CORE_PATH.'/version'));
  315. define('PHPVMS_VERSION', $revision);
  316.  
  317. Config::Set('TEMPLATE_USE_CACHE', false);
  318. Config::Set('TEMPLATE_CACHE_EXPIRE', '24');
  319. Config::Set('DBASE_USE_CACHE', false);
  320. Config::Set('CACHE_PATH', SITE_ROOT . '/core/cache');
  321. Config::Set('TPL_EXTENSION', '.tpl');
  322. Config::Set('BASE_TEMPLATE_PATH', SITE_ROOT.'/core/templates');
  323.  
  324. if(defined('ADMIN_PANEL') && ADMIN_PANEL === true) {
  325. Template::SetTemplatePath(SITE_ROOT.'/admin/templates');
  326.  
  327. define('CODON_MODULES_PATH', SITE_ROOT.'/admin/modules');
  328. define('CODON_DEFAULT_MODULE', 'Dashboard');
  329. } else {
  330. Template::SetTemplatePath(Config::Get('BASE_TEMPLATE_PATH'));
  331.  
  332. define('CODON_MODULES_PATH', SITE_ROOT.'/core/modules');
  333. define('CODON_DEFAULT_MODULE', 'Frontpage');
  334. }
  335.  
  336. /* Cache settings */
  337. $cache_settings = array(
  338. 'active' => false,
  339. 'engine' => 'file', /* "file" or "apc" */
  340. 'location' => CACHE_PATH, /* For the "file" engine type */
  341. 'prefix' => 'phpvms_', /* Specify a prefix for any entries */
  342. 'profiles' => array(
  343. 'default' => array(
  344. 'duration' => '+10 minutes',
  345. ),
  346.  
  347. 'short' => array(
  348. 'duration' => '+3 minutes',
  349. ),
  350.  
  351. '15minute' => array(
  352. 'duration' => '+15 minutes',
  353. ),
  354.  
  355. 'medium' => array(
  356. 'duration' => '+1 hour',
  357. ),
  358.  
  359. 'medium_well' => array(
  360. 'duration' => '+3 hour',
  361. ),
  362.  
  363. 'long' => array(
  364. 'duration' => '+6 hours'
  365. ),
  366. )
  367. );
  368.  
  369. Config::Set('CACHE_KEY_LIST', array(
  370. 'all_airline_active',
  371. 'all_airlines',
  372. 'start_date',
  373. 'months_since_start',
  374. 'years_since_start',
  375. 'stats_aircraft_usage',
  376. 'all_settings',
  377. 'total_flights',
  378. 'top_routes',
  379. 'users_online',
  380. 'guests_online',
  381. 'pilot_count',
  382. 'total_pax_carried',
  383. 'flights_today',
  384. 'fuel_burned',
  385. 'miles_flown',
  386. 'aircraft_in_fleet',
  387. 'total_news_items',
  388. 'total_schedules',
  389. 'all_groups',
  390. 'all_ranks',
  391. )
  392. );
  393.  
  394. Config::Set('TABLE_LIST', array(
  395. 'acarsdata',
  396. 'adminlog',
  397. 'aircraft',
  398. 'airlines',
  399. 'airports',
  400. 'awards',
  401. 'awardsgranted',
  402. 'bids',
  403. 'customfields',
  404. 'downloads',
  405. 'expenselog',
  406. 'expenses',
  407. 'fieldvalues',
  408. 'financedata',
  409. 'fuelprices',
  410. 'groupmembers',
  411. 'groups',
  412. 'navdata',
  413. 'news',
  414. 'pages',
  415. 'pilots',
  416. 'pirepcomments',
  417. 'pirepfields',
  418. 'pireps',
  419. 'pirepvalues',
  420. 'ranks',
  421. 'schedules',
  422. 'sessions',
  423. 'settings',
  424. 'updates'
  425. )
  426. );
  427.  
  428. /* VACentral */
  429. Config::Set('VACENTRAL_ENABLED', false);
  430. Config::Set('VACENTRAL_DEBUG_MODE', false);
  431. Config::Set('VACENTRAL_DEBUG_DETAIL', 0);
  432. Config::Set('VACENTRAL_API_SERVER', 'http://api.vacentral.net');
  433. Config::Set('VACENTRAL_API_KEY', '');
  434. Config::Set('VACENTRAL_DATA_FORMAT', 'json');
  435.  
  436. /**
  437. * Constants
  438. * Do not modify these! All sorts of weird shit can happen
  439. */
  440. # Set the type of flights we have
  441. Config::Set(
  442. 'FLIGHT_TYPES', array(
  443. 'P'=>'Passenger',
  444. 'C'=>'Cargo',
  445. 'H'=>'Charter'
  446. )
  447. );
  448.  
  449. # Set the types of expenses we have
  450. Config::Set(
  451. 'EXPENSE_TYPES', array(
  452. 'M'=>'Monthly',
  453. 'F'=>'Per Flight',
  454. 'P'=>'Percent (month)',
  455. 'G'=>'Percent (per flight)'
  456. )
  457. );
  458.  
  459.  
  460. /* These are pilot statuses which can be selected in
  461. the admin panel. I would be weary of changing these!
  462.  
  463. Though you can safely change the name or messages or tweak
  464. the additional settings provided
  465. */
  466. Config::Set('PILOT_STATUS_TYPES', array(
  467.  
  468. /* DO NOT CHANGE THIS ACTIVE NUMBER OR STATUS OR THINGS WILL BREAK!!! */
  469. 0 => array(
  470. 'name' => 'Active', # The title to show in the dropdown
  471. 'message' => '', # Message to show if they can't login (below is false)
  472. 'default' => true, # Should this be their default status?
  473. 'canlogin' => true, # Are they allowed to log in
  474. 'active' => true, # Are they an active pilot?
  475. 'autoretire' => false, # Use this status for the auto-retire functionality
  476. 'group_add' => array( # ID or name of the group this user is added to with this status
  477. 'Active Pilots',
  478. ),
  479. 'group_remove' => array( # ID or name of the groups this user is removed from with this status
  480. 'Inactive Pilots',
  481. ),
  482. ),
  483.  
  484. /* DO NOT CHANGE THIS INACTIVE NUMBER OR STATUS OR THINGS WILL BREAK!!! */
  485. 1 => array(
  486. 'name' => 'Inactive',
  487. 'message' => 'Your account was marked inactive',
  488. 'default' => false,
  489. 'canlogin' => false,
  490. 'active' => false,
  491. 'autoretire' => false,
  492. 'group_add' => array(
  493. 'Inactive Pilots',
  494. ),
  495. 'group_remove' => array(
  496. 'Active Pilots',
  497. ),
  498. ),
  499.  
  500. 2 => array(
  501. 'name' => 'Banned',
  502. 'message' => 'Your account is banned, please contact an admin!',
  503. 'default' => false,
  504. 'canlogin' => false,
  505. 'active' => false,
  506. 'autoretire' => false,
  507. 'group_add' => array(
  508. 'Inactive Pilots',
  509. ),
  510. 'group_remove' => array(
  511. 'Active Pilots',
  512. ),
  513. ),
  514.  
  515. 3 => array(
  516. 'name' => 'On Leave',
  517. 'message' => 'You have been marked as on leave',
  518. 'default' => false,
  519. 'canlogin' => true,
  520. 'active' => false,
  521. 'autoretire' => true,
  522. 'group_add' => array(
  523. 'Inactive Pilots',
  524. ),
  525. 'group_remove' => array(
  526. 'Active Pilots',
  527. ),
  528. ),
  529. ));
  530.  
  531. define('SIGNATURE_PATH', '/lib/signatures');
  532. define('AVATAR_PATH', '/lib/avatars');
  533.  
  534. # PIREP Statuses
  535. define('PIREP_PENDING', 0);
  536. define('PIREP_ACCEPTED', 1);
  537. define('PIREP_REJECTED', 2);
  538. define('PIREP_INPROGRESS', 3);
  539.  
  540. # Pilot Registration
  541. define('PILOT_PENDING', 0);
  542. define('PILOT_ACCEPTED', 1);
  543. define('PILOT_REJECTED', 2);
  544.  
  545. # Constants for 'paysource' column in ledger
  546. define('PAYSOURCE_PIREP', 1);
  547.  
  548. # Constants for 'paytype' column in ledge
  549. define('PILOT_PAY_HOURLY', 1);
  550. define('PILOT_PAY_SCHEDULE', 2);
  551. define('PILOT_PAY_FIXED', 3);
  552.  
  553. # Activity Feed types
  554. define('ACTIVITY_NEW_PIREP', 1);
  555. define('ACTIVITY_NEW_PILOT', 2);
  556. define('ACTIVITY_PROMOTION', 3);
  557. define('ACTIVITY_NEW_AWARD', 4);
  558. define('ACTIVITY_NEW_BID', 5);
  559. define('ACTIVITY_TWITTER', 6);
  560.  
  561. define('TWITTER_STATUS_URL', 'http://api.twitter.com/1/statuses/user_timeline.json?include_entities=0&screen_name=');
  562.  
  563. define('NAV_NDB', 2);
  564. define('NAV_VOR', 3);
  565. define('NAV_DME', 4);
  566. define('NAV_FIX', 5);
  567. define('NAV_TRACK', 6);
  568.  
  569. define('LOAD_VARIATION', 5);
  570. define('SECONDS_PER_DAY', 86400);
  571.  
  572. define('VMS_AUTH_COOKIE', 'VMSAUTH');
  573.  
  574.  
  575. /**
  576. * Library Includes (from 3rd Party)
  577. */
  578.  
  579. # Bit-masks for permission sets
  580. $permission_set = array(
  581. /*'NO_ADMIN_ACCESS' => 0,*/
  582. 'ACCESS_ADMIN' => 0x1,
  583. 'EDIT_NEWS' => 0x2,
  584. 'EDIT_PAGES' => 0x4,
  585. 'EDIT_DOWNLOADS' => 0x8,
  586. 'EMAIL_PILOTS' => 0x10,
  587. 'EDIT_AIRLINES' => 0x20,
  588. 'EDIT_FLEET' => 0x40,
  589. 'EDIT_SCHEDULES' => 0x80,
  590. 'IMPORT_SCHEDULES' => 0x100,
  591. 'MODERATE_REGISTRATIONS' => 0x200,
  592. 'EDIT_PILOTS' => 0x400,
  593. 'EDIT_GROUPS' => 0x800,
  594. 'EDIT_RANKS' => 0x1000,
  595. 'EDIT_AWARDS' => 0x2000,
  596. 'MODERATE_PIREPS' => 0x4000,
  597. 'EDIT_PIREPS_FIELDS' => 0x8000,
  598. 'VIEW_FINANCES' => 0x10000,
  599. 'EDIT_EXPENSES' => 0x20000,
  600. 'EDIT_SETTINGS' => 0x40000,
  601. 'EDIT_PROFILE_FIELDS' => 0x80000,
  602. 'EDIT_VACENTRAL' => 0x100000,
  603. 'MAINTENANCE' => 0x2000000,
  604. //'CUSTOM_PERM1' => 0x4000000,
  605. //'CUSTOM_PERM2' => 0x8000000,
  606. //'CUSTOM_PERM3' => 0x10000000,
  607. //'FULL_ADMIN' => 2147483647 // This is the supposed maximum, however it's still working!
  608. 'FULL_ADMIN' => 0x1FFFFFFF
  609. );
  610. # Discriptions for permission sets
  611. $permission_discription = array(
  612. /*'NO_ADMIN_ACCESS' => 0,*/
  613. 'ACCESS_ADMIN' => 'Give a user access to the administration panel. This is required if any other permissions are set.',
  614. 'EDIT_NEWS' => '(News &amp; Content) Give a user access to add &amp; edit the news &amp; notams.',
  615. 'EDIT_PAGES' => '(News &amp; Content) Give a user access to add &amp; edit the pages.',
  616. 'EDIT_DOWNLOADS' => '(News &amp; Content) Give a user access to add &amp; edit the downloads.',
  617. 'EMAIL_PILOTS' => '(News &amp; Content) Give a user access to email your pilots.',
  618. 'EDIT_AIRLINES' => '(Airline Operations) Give a user access to add &amp; edit your airlines.',
  619. 'EDIT_FLEET' => '(Airline Operations) Give a user access to add &amp; edit your fleet.',
  620. 'EDIT_SCHEDULES' => '(Airline Operations) Give a user access to add &amp; edit schedules.',
  621. 'IMPORT_SCHEDULES' => '(Airline Operations) Give a user access to import and export schedules.',
  622. 'MODERATE_REGISTRATIONS' => '(Pilots &amp; Groups) Allow a user to moderate new site registrations.',
  623. 'EDIT_PILOTS' => '(Pilots &amp; Groups) Give a user access to edit your pilots.',
  624. 'EDIT_GROUPS' => '(Pilots &amp; Groups) Give a user access to add &amp; edit pilot groups. Might aswell just give them full admin.',
  625. 'EDIT_RANKS' => '(Pilots &amp; Groups) Give a user access to add &amp; edit ranks.',
  626. 'EDIT_AWARDS' => '(Pilots &amp; Groups) Give a user access to add &amp; edit awards.',
  627. 'MODERATE_PIREPS' => '(Pilot Reports (PIREPS)) Give a user access to moderate PIREPS',
  628. 'EDIT_PIREPS_FIELDS' => '(Pilot Reports (PIREPS)) Give a user access to add and edit PIREPS fields.',
  629. 'VIEW_FINANCES' => '(Reports &amp; Expenses) Give a user access to view your finances.',
  630. 'EDIT_EXPENSES' => '(Reports &amp; Expenses) Give a user access to edit your expenses.',
  631. 'EDIT_SETTINGS' => '(Site &amp; Settings) Give a user access to edit your site settings.',
  632. 'EDIT_PROFILE_FIELDS' => '(Site &amp; Settings) Give a user access to add and edit profile fields.',
  633. 'EDIT_VACENTRAL' => '(Site &amp; Settings) Give a user access to edit your VACentral Settings.',
  634. //'CUSTOM_PERM0' => 'Custom Discription of the permission',
  635. //'CUSTOM_PERM1' => 'Custom Discription of the permission',
  636. //'CUSTOM_PERM2' => 'Custom Discription of the permission',
  637. //'CUSTOM_PERM3' => 'Custom Discription of the permission',
  638. 'FULL_ADMIN' => 'Full Administration Over-ride. This option will automatically overide all above settings, enabling all of them.'
  639. );
  640. Config::Set('permission_set', $permission_set);
  641. Config::Set('permission_discription', $permission_discription);
  642. define('NO_ADMIN_ACCESS', 0);
  643. foreach($permission_set as $key=>$value) {
  644. define($key, $value);
  645. }
  646. foreach($permission_discription as $key=>$value) {
  647. define($key.'_DISCRIP', $value);
  648. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement