12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- <?php
- namespace app\models;
- echo "Global!";
- if ( $addwork == 5) {
-
-
-
-
- $serviceModel = new \app\models\ServiceModel;
- $params = [];
- $params['place'] = 'a84d0a15-08ec-11e5-829d-00155d6cab05';
- $params['date'] = '1562077752';
- $res = \app\models\Api::getSectionList($params);
- $res = json_decode($res)->array;
- $params = $res[0];
-
- $r = $serviceModel->addWokrWeb($params);
-
-
-
- //$r = $res->getPositions();
-
- /*
- $employeesModel = new \app\models\EmployeesModel;
- $params['placeOfRepair'] = 'a84d0a15-08ec-11e5-829d-00155d6cab05';
- $res = $employeesModel->getWorkers($params);
- $res = json_decode($res);
- $res = $res->array;
- $positionsArray = [];
- foreach( $res as $r){
- $positionsArray[] = $r->Position;
- }
- $posit = [];
- $i = 0 ;
- foreach( $r as $pos){
-
- if( in_array($pos->Position, $positionsArray) ){
- $posit[] = $pos->Position;
- $i++;
- }
-
- }
- echo $i;
- */
- echo '<pre>'; var_dump($r); echo '</pre>';
- }
- ?>
- <input name="New" type="button" id="New" onClick="addNewWork()" value="Создать Братск">
|