1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- <?php
- require_once 'CheckPoint.php';
- require_once "doctrine/bootstrap.php";
- use \CheckPoints\CheckPoint;
- //defined('YII_DEBUG') or define('YII_DEBUG', false);
- //defined('YII_ENV') or define('YII_ENV', 'prod');
- require_once 'api/vendor/autoload.php';
- //require_once 'api/vendor/yiisoft/yii2/Yii.php';
- $config = require_once 'api/config/web.php';
- //(new yii\web\Application($config));
- if (!isset($db_hostname))
- {
- require_once 'auth.php';
- require_once 'functions.php';
- }
- $echo = $_REQUEST['echo'];
- if (!isset($echo))
- $echo = false;
- /**
- * @var $company Company
- */
- $companies = $entityManager->getRepository('Company')->findAll();
- foreach ($companies as $company) {
- $company->CheckInvalidTasks($echo);
- $lazyaccs = $company->GetLazyAccounts();
- $offlineaccs = $company->GetOfflineAccounts();
- if ($echo)
- \Doctrine\Common\Util\Debug::dump($lazyaccs);
- $companyID = $company->id;
- CheckPush($lazyaccs, $echo); //напоминания о принятых, но неначатых задачах
- $urgent = $company->getUrgentProjects();
- // \Doctrine\Common\Util\Debug::dump($urgent);
- foreach ($urgent as $proj)
- if (intval($proj->getStatus()) < 5)
- TasksAssign('', true, $proj->id, $echo, 3000000000);
- TasksAssign('', true, 0, $echo, 3000000000);
- }
|