xaionaro

Some updates

... ... @@ -1326,7 +1326,7 @@ foreach ($files as $file) {
default:
$issue_props =
array(
'assigned_to_id' => USERID_DYOKUNEV,
'assigned_to_id' => USERID_AATRUTTSE,
'project_id' => $project_id,
'subject' => $memo_subject,
'description' => $text,
... ... @@ -1407,6 +1407,7 @@ foreach ($files as $file) {
case 'request/voip-softphone':
$redmine_admin->api('issue')->addWatcher($issue_id, USERID_AMGLADTSIN);
$redmine_admin->api('issue')->addWatcher($issue_id, USERID_DYOKUNEV);
$redmine_admin->api('issue')->addWatcher($issue_id, USERID_AATRUTTSE);
break;
case 'request/lanmodern':
// $redmine_admin->api('issue')->addWatcher($issue_id, USERID_PVMAKAROV);
... ...
... ... @@ -195,7 +195,7 @@ switch ($file) {
//print_r($themes);die();
function newFormularData($stfCardId) {
global $themes;
global $themes, $inflect;
$salaries = array(
'1-1' => 7800,
... ... @@ -290,17 +290,53 @@ switch ($file) {
$account = '_____________';
$account_manager = '_________________';
if (!empty($_GET['account'])) {
$account = $_GET['account'];
}
if (!empty($_GET['account-manager'])) {
$account_manager = $_GET['account-manager'];
}
if (!empty($themes[$a['Code']])) {
//$account = $themes[$a['Code']]['theme'];
}
$prorector_appointment = json_decode(file_get_contents('https://voip.mephi.ru/appointments/'.$_GET['prorector-appointment-id'].'.json'), 1)['appointment_selected'];
$prorector_appointment_id = @$_GET['prorector-appointment-id'];
$prorector_appointment = json_decode(file_get_contents('https://voip.mephi.ru/appointments/'.$prorector_appointment_id.'.json'), 1)['appointment_selected'];
$attorney_date = '«___» __________ 20___г';
$attorney_code = '_____________';
switch ((int)$prorector_appointment_id) {
case 155472: // Нагорнов
$attorney_code = '329-17-001/17';
$attorney_date = '«30» декабря 2016г';
break;
case 155480: // Ужва
$attorney_code = '329-17-009/17';
$attorney_date = '«30» декабря 2016г';
break;
case 155706: // Весна
$attorney_code = '329-17-008/17';
$attorney_date = '«30» декабря 2016г';
break;
case 158626: // Каргин
case -27400500:
$attorney_code = '329-17-002/17';
$attorney_date = '«30» декабря 2016г';
break;
}
if (empty($prorector_appointment['Name']) || $prorector_appointment['Name'] == '-') {
$prorector_appointment['Name'] = $prorector_appointment['Description'];
}
return array(
'of-prorector' => '_________________',
'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).'.',
'prorector' => $prorector_appointment['Subscriber']['Lastname'].' '.mb_substr($prorector_appointment['Subscriber']['Firstname'], 0, 1).'.'.mb_substr($prorector_appointment['Subscriber']['Patronymic'], 0, 1).'.',
'attorney-date' => '«___» __________ 20___г',
'attorney-code' => '_____________',
'attorney-date' => $attorney_date,
'attorney-code' => $attorney_code,
'of-unit' => $unitName,
'unit-head' => $unitHead,
... ...