'REQUEST_TIME_FLOAT' => 1605519375.1466
'REQUEST_TIME' => 1605519375
]
+2020-11-17 13:22:55 [192.168.0.68][1][dj2rsqp1dn6rlribcj91kqh9a9][error][Error] Error: Call to undefined method app\models\User::canPermisson() in /var/www/invent/basic/views/layouts/main.php:71
+Stack trace:
+#0 /var/www/invent/basic/vendor/yiisoft/yii2/base/View.php(348): require()
+#1 /var/www/invent/basic/vendor/yiisoft/yii2/base/View.php(257): yii\base\View->renderPhpFile()
+#2 /var/www/invent/basic/vendor/yiisoft/yii2/base/Controller.php(424): yii\base\View->renderFile()
+#3 /var/www/invent/basic/vendor/yiisoft/yii2/base/Controller.php(410): yii\base\Controller->renderContent()
+#4 /var/www/invent/basic/controllers/ItemsController.php(645): yii\base\Controller->render()
+#5 [internal function]: app\controllers\ItemsController->actionUpdate()
+#6 /var/www/invent/basic/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array()
+#7 /var/www/invent/basic/vendor/yiisoft/yii2/base/Controller.php(180): yii\base\InlineAction->runWithParams()
+#8 /var/www/invent/basic/vendor/yiisoft/yii2/base/Module.php(528): yii\base\Controller->runAction()
+#9 /var/www/invent/basic/vendor/yiisoft/yii2/web/Application.php(103): yii\base\Module->runAction()
+#10 /var/www/invent/basic/vendor/yiisoft/yii2/base/Application.php(386): yii\web\Application->handleRequest()
+#11 /var/www/invent/basic/web/index.php(12): yii\base\Application->run()
+#12 {main}
+2020-11-17 13:22:54 [192.168.0.68][1][dj2rsqp1dn6rlribcj91kqh9a9][info][application] $_GET = [
+ 'r' => 'items/update'
+ 'id' => '15'
+]
+
+$_POST = []
+
+$_FILES = []
+
+$_COOKIE = [
+ '_csrf' => '95a3fd4558204ed62e237b4b263e8783347916fc4b0ce727f1c56ee391ad512aa:2:{i:0;s:5:\"_csrf\";i:1;s:32:\"_fcuY0hqNcJQ-syjxweA0iu3BB5N-whp\";}'
+ 'PPA_ID' => 'ka0p000jump5brgp5gm34h4teb'
+ 'webfx-tree-cookie-persistence' => 'wfxt-49+wfxt-47+wfxt-8+wfxt-16+wfxt-14+wfxt-6+wfxt-4+wfxt-18'
+ 'PHPSESSID' => '6bqlm4hroqmp1pd029q2vvtm2n'
+ '_identity' => '992cc680fcb56a39cf1a309dc6073fe21f1604f6f2a8c4dc514ba5f1d621968aa:2:{i:0;s:9:\"_identity\";i:1;s:16:\"[1,null,2592000]\";}'
+]
+
+$_SESSION = [
+ '__flash' => []
+ '__id' => 1
+]
+
+$_SERVER = [
+ 'HTTPS' => 'on'
+ 'SSL_SERVER_S_DN_C' => 'RU'
+ 'SSL_SERVER_S_DN_ST' => 'MSK'
+ 'SSL_SERVER_S_DN_L' => 'Moscow'
+ 'SSL_SERVER_S_DN_O' => 'GBUV MO TERVETUPRAVLENIE N1'
+ 'SSL_SERVER_S_DN_OU' => 'IT'
+ 'SSL_SERVER_S_DN_CN' => '192.168.0.32'
+ 'SSL_SERVER_S_DN_Email' => 'tervet1@inbox.ru'
+ 'SSL_SERVER_I_DN_C' => 'RU'
+ 'SSL_SERVER_I_DN_ST' => 'MSK'
+ 'SSL_SERVER_I_DN_L' => 'Moscow'
+ 'SSL_SERVER_I_DN_O' => 'GBUV MO TERVETUPRAVLENIE N1'
+ 'SSL_SERVER_I_DN_OU' => 'IT'
+ 'SSL_SERVER_I_DN_CN' => '192.168.0.32'
+ 'SSL_SERVER_I_DN_Email' => 'tervet1@inbox.ru'
+ 'SSL_VERSION_INTERFACE' => 'mod_ssl/2.4.25'
+ 'SSL_VERSION_LIBRARY' => 'OpenSSL/1.0.2u'
+ 'SSL_PROTOCOL' => 'TLSv1.2'
+ 'SSL_SECURE_RENEG' => 'true'
+ 'SSL_COMPRESS_METHOD' => 'NULL'
+ 'SSL_CIPHER' => 'ECDHE-RSA-AES128-GCM-SHA256'
+ 'SSL_CIPHER_EXPORT' => 'false'
+ 'SSL_CIPHER_USEKEYSIZE' => '128'
+ 'SSL_CIPHER_ALGKEYSIZE' => '128'
+ 'SSL_CLIENT_VERIFY' => 'NONE'
+ 'SSL_SERVER_M_VERSION' => '1'
+ 'SSL_SERVER_M_SERIAL' => 'A339F5E73AD6C129'
+ 'SSL_SERVER_V_START' => 'Sep 19 06:04:13 2020 GMT'
+ 'SSL_SERVER_V_END' => 'May 29 06:04:13 2034 GMT'
+ 'SSL_SERVER_S_DN' => 'emailAddress=tervet1@inbox.ru,CN=192.168.0.32,OU=IT,O=GBUV MO TERVETUPRAVLENIE N1,L=Moscow,ST=MSK,C=RU'
+ 'SSL_SERVER_I_DN' => 'emailAddress=tervet1@inbox.ru,CN=192.168.0.32,OU=IT,O=GBUV MO TERVETUPRAVLENIE N1,L=Moscow,ST=MSK,C=RU'
+ 'SSL_SERVER_A_KEY' => 'rsaEncryption'
+ 'SSL_SERVER_A_SIG' => 'sha256WithRSAEncryption'
+ 'SSL_SESSION_ID' => 'ff876aa6ae49eccd3380e911da3b180490747c55814de6f64308f9621f8bfe65'
+ 'SSL_SESSION_RESUMED' => 'Resumed'
+ 'HTTP_HOST' => '192.168.0.32'
+ 'HTTP_USER_AGENT' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:82.0) Gecko/20100101 Firefox/82.0'
+ 'HTTP_ACCEPT' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8'
+ 'HTTP_ACCEPT_LANGUAGE' => 'ru-RU,ru;q=0.8,en-US;q=0.5,en;q=0.3'
+ 'HTTP_ACCEPT_ENCODING' => 'gzip, deflate, br'
+ 'HTTP_REFERER' => 'https://192.168.0.32/invent/index.php?r=items%2Findex'
+ 'HTTP_CONNECTION' => 'keep-alive'
+ 'HTTP_COOKIE' => '_csrf=95a3fd4558204ed62e237b4b263e8783347916fc4b0ce727f1c56ee391ad512aa%3A2%3A%7Bi%3A0%3Bs%3A5%3A%22_csrf%22%3Bi%3A1%3Bs%3A32%3A%22_fcuY0hqNcJQ-syjxweA0iu3BB5N-whp%22%3B%7D; PPA_ID=ka0p000jump5brgp5gm34h4teb; webfx-tree-cookie-persistence=wfxt-49+wfxt-47+wfxt-8+wfxt-16+wfxt-14+wfxt-6+wfxt-4+wfxt-18; PHPSESSID=6bqlm4hroqmp1pd029q2vvtm2n; _identity=992cc680fcb56a39cf1a309dc6073fe21f1604f6f2a8c4dc514ba5f1d621968aa%3A2%3A%7Bi%3A0%3Bs%3A9%3A%22_identity%22%3Bi%3A1%3Bs%3A16%3A%22%5B1%2Cnull%2C2592000%5D%22%3B%7D'
+ 'HTTP_UPGRADE_INSECURE_REQUESTS' => '1'
+ 'PATH' => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'
+ 'SERVER_SIGNATURE' => '<address>Apache/2.4.25 (Debian) Server at 192.168.0.32 Port 443</address>
+'
+ 'SERVER_SOFTWARE' => 'Apache/2.4.25 (Debian)'
+ 'SERVER_NAME' => '192.168.0.32'
+ 'SERVER_ADDR' => '192.168.0.32'
+ 'SERVER_PORT' => '443'
+ 'REMOTE_ADDR' => '192.168.0.68'
+ 'DOCUMENT_ROOT' => '/var/www/html'
+ 'REQUEST_SCHEME' => 'https'
+ 'CONTEXT_PREFIX' => '/invent'
+ 'CONTEXT_DOCUMENT_ROOT' => '/var/www/invent/basic/web'
+ 'SERVER_ADMIN' => 'webmaster@localhost'
+ 'SCRIPT_FILENAME' => '/var/www/invent/basic/web/index.php'
+ 'REMOTE_PORT' => '9542'
+ 'GATEWAY_INTERFACE' => 'CGI/1.1'
+ 'SERVER_PROTOCOL' => 'HTTP/1.1'
+ 'REQUEST_METHOD' => 'GET'
+ 'QUERY_STRING' => 'r=items%2Fupdate&id=15'
+ 'REQUEST_URI' => '/invent/index.php?r=items%2Fupdate&id=15'
+ 'SCRIPT_NAME' => '/invent/index.php'
+ 'PHP_SELF' => '/invent/index.php'
+ 'REQUEST_TIME_FLOAT' => 1605608574.978
+ 'REQUEST_TIME' => 1605608574
+]
array_push($items, [ 'label' => Yii::t('app', 'Home' ), 'url' => [ '/site/index' ]] );
array_push($items, [ 'label' => Yii::t('app', 'About' ), 'url' => [ '/site/about' ]] );
array_push($items, [ 'label' => Yii::t('app', 'Contact'), 'url' => [ '/site/contact' ]] );
+
+ // Предметы/оборудование
if (User::canPermission('createRecord'))
{
array_push($items, [ 'label' => Yii::t('app', 'Items' ), 'url' => [ '/items/index' ]] );
+ // Отчёты
+ array_push($items, [ 'label' => Yii::t('app', 'Reports'), 'url' => [ '/reports/index' ]]);
+ }
+
+ // Пользователи
+ $subitems = [];
+ if (Yii::$app->user->isGuest)
+ {
+ array_push($items, [ 'label' => Yii::t('app', 'Login'), 'url' => [ '/site/login' ]]);
+ }
+ else
+ {
+ array_push($subitems, ''
+ . Html::BeginForm([ '/site/logout' ], 'post')
+ . Html::submitButton(
+ Yii::t('app', 'Logout'),
+ [ 'class' => 'btn btn-link logout', ]
+ )
+ . Html::endForm()
+ . '');
+ array_push($subitems, [ 'label' => Yii::t('users', 'Change password'), 'url' => [ 'site/changepassword' ]]);
+ if (User::canPermission('updateRecord'))
+ {
+ array_push($subitems, [ 'label' => Yii::t('users', 'Create users'), 'url' => [ 'site/createusers' ]]);
+ array_push($subitems, [ 'label' => Yii::t('users', 'Reset users passwords'), 'url' => [ 'site/resetuser' ]]);
+ }
+ array_push($items, [ 'label' => Yii::$app->user->identity->username, 'options' => [ 'id' => 'down_history' ], 'items' => $subitems ]);
}
+ /*
if (User::canPermission('updateRecord'))
{
array_push($items, [ 'label' => Yii::t('users', 'Manage users'), 'options' => [ 'id' => 'down_history' ], 'items' => [
[ 'label' => Yii::t('app', 'Login'), 'url' => [ '/site/login' ]]
) : (
'<li>'
-// . Html::a(Yii::t('users', 'Change password'), Url::to([ 'site/changepassword' ]), [ 'class' => 'btn btn-link' ])
-// . '</li><li>'
. Html::beginForm([ '/site/logout' ], 'post')
. Html::submitButton(
Yii::t('app', 'Logout') . ' (' . Yii::$app->user->identity->username . ')',
)
. Html::endForm()
. '</li>'
- ) );
+ ) ); // */
echo Nav::widget([
'options' => ['class' => 'navbar-nav navbar-right'],