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.

get-support-article.php 543B

1234567891011121314151617181920
  1. #!/usr/bin/php -q
  2. <?PHP
  3. if (!ctype_digit($argv[1])) { die('Usage: ./get-support-article.php <id>'); }
  4. chdir('/home/utd/control/');
  5. define('NOLOGINREF', true);
  6. require_once('lib/database.php');
  7. require_once('lib/dashboard.php');
  8. define('SUPPORT_INDEX', True);
  9. $file = str_pad($argv[1],3,'0',STR_PAD_LEFT);
  10. if (file_exists('sup/'.$file.'.php')) {
  11. require_once('sup/'.$file.'.php');
  12. file_put_contents('sup/search/'.$file.'.txt', SUPPORT_TITLE."\n\n".strip_tags(SUPPORT_BODY));
  13. } else {
  14. die('Support article not found');
  15. }
  16. ?>