Showing
2 changed files
with
44 additions
and
7 deletions
@@ -1306,7 +1306,7 @@ foreach ($files as $file) { | @@ -1306,7 +1306,7 @@ foreach ($files as $file) { | ||
1306 | case 'request/forhire': | 1306 | case 'request/forhire': |
1307 | $issue_props = | 1307 | $issue_props = |
1308 | array( | 1308 | array( |
1309 | - 'assigned_to_id' => USERID_EGMAKSIMOVA, | 1309 | + 'assigned_to_id' => USERID_EGMAKSIMOVA, |
1310 | 'project_id' => $project_id, | 1310 | 'project_id' => $project_id, |
1311 | 'subject' => 'Заявка на подбор персонала', | 1311 | 'subject' => 'Заявка на подбор персонала', |
1312 | 1312 | ||
@@ -1326,7 +1326,7 @@ foreach ($files as $file) { | @@ -1326,7 +1326,7 @@ foreach ($files as $file) { | ||
1326 | default: | 1326 | default: |
1327 | $issue_props = | 1327 | $issue_props = |
1328 | array( | 1328 | array( |
1329 | - 'assigned_to_id' => USERID_DYOKUNEV, | 1329 | + 'assigned_to_id' => USERID_AATRUTTSE, |
1330 | 'project_id' => $project_id, | 1330 | 'project_id' => $project_id, |
1331 | 'subject' => $memo_subject, | 1331 | 'subject' => $memo_subject, |
1332 | 'description' => $text, | 1332 | 'description' => $text, |
@@ -1407,6 +1407,7 @@ foreach ($files as $file) { | @@ -1407,6 +1407,7 @@ foreach ($files as $file) { | ||
1407 | case 'request/voip-softphone': | 1407 | case 'request/voip-softphone': |
1408 | $redmine_admin->api('issue')->addWatcher($issue_id, USERID_AMGLADTSIN); | 1408 | $redmine_admin->api('issue')->addWatcher($issue_id, USERID_AMGLADTSIN); |
1409 | $redmine_admin->api('issue')->addWatcher($issue_id, USERID_DYOKUNEV); | 1409 | $redmine_admin->api('issue')->addWatcher($issue_id, USERID_DYOKUNEV); |
1410 | + $redmine_admin->api('issue')->addWatcher($issue_id, USERID_AATRUTTSE); | ||
1410 | break; | 1411 | break; |
1411 | case 'request/lanmodern': | 1412 | case 'request/lanmodern': |
1412 | // $redmine_admin->api('issue')->addWatcher($issue_id, USERID_PVMAKAROV); | 1413 | // $redmine_admin->api('issue')->addWatcher($issue_id, USERID_PVMAKAROV); |
@@ -195,7 +195,7 @@ switch ($file) { | @@ -195,7 +195,7 @@ switch ($file) { | ||
195 | //print_r($themes);die(); | 195 | //print_r($themes);die(); |
196 | 196 | ||
197 | function newFormularData($stfCardId) { | 197 | function newFormularData($stfCardId) { |
198 | - global $themes; | 198 | + global $themes, $inflect; |
199 | 199 | ||
200 | $salaries = array( | 200 | $salaries = array( |
201 | '1-1' => 7800, | 201 | '1-1' => 7800, |
@@ -290,17 +290,53 @@ switch ($file) { | @@ -290,17 +290,53 @@ switch ($file) { | ||
290 | $account = '_____________'; | 290 | $account = '_____________'; |
291 | $account_manager = '_________________'; | 291 | $account_manager = '_________________'; |
292 | 292 | ||
293 | + if (!empty($_GET['account'])) { | ||
294 | + $account = $_GET['account']; | ||
295 | + } | ||
296 | + | ||
297 | + if (!empty($_GET['account-manager'])) { | ||
298 | + $account_manager = $_GET['account-manager']; | ||
299 | + } | ||
300 | + | ||
293 | if (!empty($themes[$a['Code']])) { | 301 | if (!empty($themes[$a['Code']])) { |
294 | //$account = $themes[$a['Code']]['theme']; | 302 | //$account = $themes[$a['Code']]['theme']; |
295 | } | 303 | } |
296 | 304 | ||
297 | - $prorector_appointment = json_decode(file_get_contents('https://voip.mephi.ru/appointments/'.$_GET['prorector-appointment-id'].'.json'), 1)['appointment_selected']; | 305 | + $prorector_appointment_id = @$_GET['prorector-appointment-id']; |
306 | + | ||
307 | + $prorector_appointment = json_decode(file_get_contents('https://voip.mephi.ru/appointments/'.$prorector_appointment_id.'.json'), 1)['appointment_selected']; | ||
308 | + | ||
309 | + $attorney_date = '«___» __________ 20___г'; | ||
310 | + $attorney_code = '_____________'; | ||
311 | + switch ((int)$prorector_appointment_id) { | ||
312 | + case 155472: // Нагорнов | ||
313 | + $attorney_code = '329-17-001/17'; | ||
314 | + $attorney_date = '«30» декабря 2016г'; | ||
315 | + break; | ||
316 | + case 155480: // Ужва | ||
317 | + $attorney_code = '329-17-009/17'; | ||
318 | + $attorney_date = '«30» декабря 2016г'; | ||
319 | + break; | ||
320 | + case 155706: // Весна | ||
321 | + $attorney_code = '329-17-008/17'; | ||
322 | + $attorney_date = '«30» декабря 2016г'; | ||
323 | + break; | ||
324 | + case 158626: // Каргин | ||
325 | + case -27400500: | ||
326 | + $attorney_code = '329-17-002/17'; | ||
327 | + $attorney_date = '«30» декабря 2016г'; | ||
328 | + break; | ||
329 | + } | ||
330 | + | ||
331 | + if (empty($prorector_appointment['Name']) || $prorector_appointment['Name'] == '-') { | ||
332 | + $prorector_appointment['Name'] = $prorector_appointment['Description']; | ||
333 | + } | ||
298 | 334 | ||
299 | return array( | 335 | return array( |
300 | - 'of-prorector' => '_________________', | 336 | + 'of-prorector' => $inflect->getInflectNoun($prorector_appointment['Name'], 0).' '.explode(' ', $inflect->getInflectName($prorector_appointment['Subscriber']['Fullname'], 0))[0].' '.mb_substr($prorector_appointment['Subscriber']['Firstname'], 0, 1).'.'.mb_substr($prorector_appointment['Subscriber']['Patronymic'], 0, 1).'.', |
301 | 'prorector' => $prorector_appointment['Subscriber']['Lastname'].' '.mb_substr($prorector_appointment['Subscriber']['Firstname'], 0, 1).'.'.mb_substr($prorector_appointment['Subscriber']['Patronymic'], 0, 1).'.', | 337 | 'prorector' => $prorector_appointment['Subscriber']['Lastname'].' '.mb_substr($prorector_appointment['Subscriber']['Firstname'], 0, 1).'.'.mb_substr($prorector_appointment['Subscriber']['Patronymic'], 0, 1).'.', |
302 | - 'attorney-date' => '«___» __________ 20___г', | 338 | + 'attorney-date' => $attorney_date, |
303 | - 'attorney-code' => '_____________', | 339 | + 'attorney-code' => $attorney_code, |
304 | 340 | ||
305 | 'of-unit' => $unitName, | 341 | 'of-unit' => $unitName, |
306 | 'unit-head' => $unitHead, | 342 | 'unit-head' => $unitHead, |
-
Please register or login to post a comment