1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- #!/usr/local/bin/php
- <?php if ( !empty($argv) && $argc == 6 ) {
- // Environment:
- define('ENVIRONMENT', basename($argv[0]));
- // User's login:
- if ( isset($argv[1]) ) {
- define('LOGIN', $argv[1]);
- } else define('LOGIN', NULL);
- // User's IP:
- if ( isset($argv[2]) ) {
- define('IP', $argv[2]);
- } else define('IP', NULL);
- // User's cash:
- if ( isset($argv[3]) ) {
- define('CASH', $argv[3]);
- } else define('CASH', NULL);
- // User's ID:
- if ( isset($argv[4]) ) {
- define('ID', $argv[4]);
- } else define('ID', NULL);
- // User's allowed directions:
- if ( isset($argv[5]) ) {
- define('DIRS', $argv[5]);
- } else define('DIRS', NULL);
- // Paths:
- define('BASEPATH', __DIR__ . '/');
- define('SYSTEM', BASEPATH . 'system/');
- define('DBPATH', SYSTEM . 'database/');
- define('NASPATH', SYSTEM . 'executer/');
- define('LOGPATH', SYSTEM . 'log/');
- // Driver's extention:
- define('EXT', '.drv');
- // Turn off PHP error reporting:
- error_reporting(0);
- // Unset all resived arguments and their amount:
- unset($argv, $argc);
- // Continue...
- include_once(SYSTEM . 'ubilling.cls');
- new Ubilling();
- } else exit('Only STG can run script!');
- ?>
|