12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- <?php
- /*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
- if (!$logged_me_in_successfully234)
- return;
- /*defined('YII_DEBUG') or define('YII_DEBUG', true);
- defined('YII_ENV') or define('YII_ENV', 'dev');
- require __DIR__ . '/api/vendor/autoload.php';
- require __DIR__ . '/api/vendor/yiisoft/yii2/Yii.php';
- $config = require __DIR__ . '/api/config/web.php';
- (new yii\web\Application($config));
- use Yii;
- use yii\base\Model;
- use app\models\entity\ProjectsLocotech;
- use app\models\entity\Tasks;
- use app\models\entity\Tasknotes;
- use app\models\LocomotiveModel;
- use app\models\EmployeesModel;/**/
- /*echo '<html><head><title>';
- echo 'Тестирование интеграции SMoPP - АСУ СГ';
- echo '</title>';
- echo '</head>
- <body>';/**/
- $action = filter_input(INPUT_GET, 'action');
- if (1 == $action)
- {
- $str = $_POST['text'];
-
- if ($str)
- {
- //$safestr = mysqli_real_escape_string($str);
- $res = Yii::$app->db->createCommand()
- ->insert('text_log',
- ['msg' => $str]
- )->execute();
- //'insert into text_log (msg) values (\''
- //. $safestr . '\')')->execute();
- if ($res)
- echo 'Записано.<br/>';
- else
- echo 'Не записано.<br/>';
- }
- }
- echo '<h2>Внесите текст:</h2>
- <br/>
- <form action="?act=_log&action=1" method="post">
- <textarea name="text" style="width:100%"></textarea>
- <p><input type="submit" /></p>
- </form>';
- //echo '</body>';
|