Unsupported scripts and control panel web app for a hosting company
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

support.php 1.1KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <?PHP
  2. require_once('lib/dashboard.php');
  3. if (!isset($_GET['n']) || !preg_match('/^[0-9]{3}$/',$_GET['n']) || !file_exists('sup/'.$_GET['n'].'.php')) {
  4. $support = '000';
  5. } else {
  6. $support = $_GET['n'];
  7. }
  8. if (isset($_GET['n']) && ctype_digit($_GET['n']) && strlen($_GET['n']) == 3) {
  9. if ($_GET['n'] != $support) {
  10. define('MESSAGE', 'Support article not found.');
  11. }
  12. }
  13. define('NOLOGINREF', true); // Everyone can access support!
  14. define('NOTACREF', true);
  15. require_once('lib/common.php');
  16. if (file_exists('../support.dat')) {
  17. $stats = unserialize(file_get_contents('../support.dat'));
  18. } else {
  19. $stats = array();
  20. }
  21. if ($support != '000' && $support != '999') {
  22. $stats[$support]++;
  23. file_put_contents('../support.dat', serialize($stats));
  24. }
  25. require_once('sup/'.$support.'.php');
  26. define('TITLE', 'Support :: '.SUPPORT_TITLE);
  27. addDashboardItem('Useful links', 'Raise a ticket', 'tickets');
  28. addDashboardItem('Useful links', 'Support home', 'support/000');
  29. addDashboardItem('Useful links', 'Search support', 'support/999');
  30. require_once('lib/header.php');
  31. require_once('pages/support.php');
  32. require_once('lib/footer.php');
  33. ?>