legacy/retailcrm/app.php

30 lines
577 B
PHP
Raw Normal View History

2015-10-30 11:30:51 +03:00
<?php
if (
function_exists('date_default_timezone_set')
&&
function_exists('date_default_timezone_get')
) {
date_default_timezone_set(@date_default_timezone_get());
}
require_once 'bootstrap.php';
$shortopts = 'dluce:m:p:r:h:';
$options = getopt($shortopts);
2015-10-30 11:30:51 +03:00
2015-11-23 17:31:55 +03:00
if (!$options || $options == -1) {
$opt = new OptHelper($shortopts);
$options = $opt->get();
2015-11-23 17:31:55 +03:00
}
2015-10-30 11:30:51 +03:00
if (isset($options['e'])) {
$command = new Command($options);
$command->run();
2015-11-23 17:31:55 +03:00
} elseif (!$options) {
CommandHelper::notWorkGetOptNotice();
2015-10-30 11:30:51 +03:00
} else {
CommandHelper::runHelp();
}