index.php 826 B

1234567891011121314151617181920212223242526
  1. <?php
  2. declare(strict_types=0);
  3. if (empty($_SERVER['argv'][1])) exit('Access Invalid!');
  4. defined('APP_ID') or define('APP_ID','crontab');
  5. defined('BASE_ROOT_PATH') or define('BASE_ROOT_PATH',str_replace('/crontab','',dirname(__FILE__)));
  6. defined('BASE_PATH') or define('BASE_PATH',BASE_ROOT_PATH . '/crontab');
  7. require_once(BASE_ROOT_PATH . '/global.php');
  8. require_once(BASE_ROOT_PATH . '/fooder.php');
  9. require_once(BASE_CORE_PATH . '/lrlz.php');
  10. define('TRANS_MASTER',true);
  11. if (php_sapi_name() == 'cli') {
  12. $_GET['act'] = $_SERVER['argv'][1];
  13. $_GET['op'] = empty($_SERVER['argv'][2]) ? 'index' : $_SERVER['argv'][2];
  14. }
  15. if (!@include(BASE_PATH.'/control/control.php')) exit('control.php isn\'t exists!');
  16. echo "act=" . $_GET['act'] . "\n";
  17. echo "act=" . $_GET['op'] . "\n";
  18. Base::run();