OnUserAdd 904 B

123456789101112131415161718192021222324252627282930313233
  1. #!/usr/local/bin/php
  2. <?php if ( !empty($argv) && $argc == 2 ) {
  3. // Environment:
  4. define('ENVIRONMENT', basename($argv[0]));
  5. // User's login:
  6. if (isset($argv[1])) {
  7. define('LOGIN', $argv[1]);
  8. } else define('LOGIN', NULL);
  9. // Paths:
  10. define('BASEPATH', __DIR__ . '/');
  11. define('SYSTEM', BASEPATH . 'system/');
  12. define('DBPATH', SYSTEM . 'database/');
  13. define('NASPATH', SYSTEM . 'executer/');
  14. define('LOGPATH', SYSTEM . 'log/');
  15. // Driver's extention:
  16. define('EXT', '.drv');
  17. // Turn off PHP error reporting:
  18. error_reporting(0);
  19. // Unset all resived arguments and their amount:
  20. unset($argv, $argc);
  21. // Continue...
  22. // include_once(SYSTEM . 'ubilling.cls');
  23. // new Ubilling();
  24. } else exit('Only STG can run script!');
  25. ?>