{ if (!$this->validate()) { return FALSE; } $vDB = GetDB(); $vValues = $this->getSubmitValues(TRUE); // $vId = $vValues['id']; $vRecord = array(); if (!empty($vValues['id'])) { $vRecord['id'] = $vValues['id']; } CopyRecordStrValue($vRecord, $vValues, 'name'); $vResult = $vDB->InsertOrUpdateById('rb_directions', $vRecord); // var_dump($vRecord); // var_dump($vDB); return $vResult; } } $vId = array_key_exists('id', $_GET) ? $_GET['id'] : ''; $vForm = new TEditor($vId); if (!$vForm->Save()) { $vTemplate =& CreateTemplate(); $vRenderer =& CreateRenderer($vTemplate); $vForm->accept($vRenderer); $vView =& new TBaseView(); $vView->form = $vRenderer->toObject(); $vTemplate->compile('refs/direction_edit.html'); $vTemplate->outputObject($vView); } else { RedirectToList('directions.html'); }
{ if (!$this->validate()) { return FALSE; } $vDB = GetDB(); $vValues = $this->getSubmitValues(TRUE); // $vId = $vValues['id']; $vRecord = array(); if (!empty($vValues['id'])) { $vRecord['id'] = $vValues['id']; } CopyRecordStrValue($vRecord, $vValues, 'name'); $vResult = $vDB->InsertOrUpdateById('rb_trauma_types', $vRecord); // var_dump($vRecord); // var_dump($vDB); return $vResult; } } $vId = array_key_exists('id', $_GET) ? $_GET['id'] : ''; $vForm = new TEditor($vId); if (!$vForm->Save()) { $vTemplate =& CreateTemplate(); $vRenderer =& CreateRenderer($vTemplate); $vForm->accept($vRenderer); $vView =& new TBaseView(); $vView->form = $vRenderer->toObject(); $vTemplate->compile('refs/trauma_type_edit.html'); $vTemplate->outputObject($vView); } else { RedirectToList('trauma_types.html'); }
$vRecord = array(); if (!empty($vId)) { $vRecord['id'] = $vId; } else { $vRecord['create_time'] = $vDB->ConvertToDateTime(time()); $vRecord['next_visit_date'] = $vDB->ConvertToDate(time()); } $vRecord['modify_time'] = $vDB->ConvertToDateTime(time()); CopyRecordStrValue($vRecord, $vValues, 'last_name'); CopyRecordStrValue($vRecord, $vValues, 'first_name'); CopyRecordStrValue($vRecord, $vValues, 'patr_name'); /* Здесь нужна проверка введенных данных в поле ПОЛИС СМО*/ $vResult = $vDB->InsertOrUpdateById('emst_cases', $vRecord); // var_dump($vRecord); // var_dump($vDB); return $vResult; } } $vId = @$_GET['id']; $vForm = new TEditor($vId); if (!$vForm->Save()) { $vTemplate =& CreateTemplate(); $vRenderer =& CreateRenderer($vTemplate); $vForm->accept($vRenderer); $vView =& new TBaseView(); $vView->form = $vRenderer->toObject(); $vTemplate->compile('reg/case_edit.html'); $vTemplate->outputObject($vView); } else { RedirectToList('cases.html'); }
$vValues = $this->getSubmitValues(TRUE); // $vId = $vValues['id']; $vRecord = array(); if (!empty($vValues['id'])) { $vRecord['id'] = $vValues['id']; } CopyRecordStrValue($vRecord, $vValues, 'login'); CopyRecordStrValue($vRecord, $vValues, 'full_name'); CopyRecordStrValue($vRecord, $vValues, 'password'); CopyRecordStrValue($vRecord, $vValues, 'eisCode'); CopyRecordSelValue($vRecord, $vValues, 'roles'); CopyRecordBoolValue($vRecord, $vValues, 'retired'); $vResult = $vDB->InsertOrUpdateById('users', $vRecord); // var_dump($vRecord); // var_dump($vDB); return $vResult; } } $vId = array_key_exists('id', $_GET) ? $_GET['id'] : ''; $vForm = new TEditor($vId); if (!$vForm->Save()) { $vTemplate =& CreateTemplate(); $vRenderer =& CreateRenderer($vTemplate); $vForm->accept($vRenderer); $vView =& new TBaseView(); $vView->form = $vRenderer->toObject(); $vTemplate->compile('refs/user_edit.html'); $vTemplate->outputObject($vView); } else { RedirectToList('users.html'); }
{ if (!$this->validate()) { return FALSE; } $vDB = GetDB(); $vValues = $this->getSubmitValues(TRUE); $vRecord = array(); if (!empty($vValues['id'])) { $vRecord['id'] = $vValues['id']; } CopyRecordStrValue($vRecord, $vValues, 'name'); CopyRecordBoolValue($vRecord, $vValues, 'can_skip_ill_doc_on_disability'); CopyRecordBoolValue($vRecord, $vValues, 'can_use_ill_doc_in_ability'); CopyRecordBoolValue($vRecord, $vValues, 'req_epicrisis'); $vResult = $vDB->InsertOrUpdateById('rb_clinical_outcomes', $vRecord); return $vResult; } } $vId = array_key_exists('id', $_GET) ? $_GET['id'] : ''; $vForm = new TEditor($vId); if (!$vForm->Save()) { $vTemplate =& CreateTemplate(); $vRenderer =& CreateRenderer($vTemplate); $vForm->accept($vRenderer); $vView =& new TBaseView(); $vView->form = $vRenderer->toObject(); $vTemplate->compile('refs/clinical_outcome_edit.html'); $vTemplate->outputObject($vView); } else { RedirectToList('clinical_outcomes.html'); }
{ if (!$this->validate()) { return FALSE; } $vDB = GetDB(); $vValues = $this->getSubmitValues(TRUE); // $vId = $vValues['id']; $vRecord = array(); if (!empty($vValues['id'])) { $vRecord['id'] = $vValues['id']; } CopyRecordStrValue($vRecord, $vValues, 'name'); $vResult = $vDB->InsertOrUpdateById('rb_antitetanus', $vRecord); // var_dump($vRecord); // var_dump($vDB); return $vResult; } } $vId = array_key_exists('id', $_GET) ? $_GET['id'] : ''; $vForm = new TEditor($vId); if (!$vForm->Save()) { $vTemplate =& CreateTemplate(); $vRenderer =& CreateRenderer($vTemplate); $vForm->accept($vRenderer); $vView =& new TBaseView(); $vView->form = $vRenderer->toObject(); $vTemplate->compile('refs/antitetanus_edit.html'); $vTemplate->outputObject($vView); } else { RedirectToList('antitetanus.html'); }
function Save() { if (!$this->validate()) { return FALSE; } $vDB = GetDB(); $vValues = $this->getSubmitValues(TRUE); // $vId = $vValues['id']; $vRecord = array(); if (!empty($vValues['id'])) { $vRecord['id'] = $vValues['id']; } CopyRecordStrValue($vRecord, $vValues, 'name'); CopyRecordBoolValue($vRecord, $vValues, 'need_ill_doc'); $vResult = $vDB->InsertOrUpdateById('rb_employment_categories', $vRecord); return $vResult; } } $vId = array_key_exists('id', $_GET) ? $_GET['id'] : ''; $vForm = new TEditor($vId); if (!$vForm->Save()) { $vTemplate =& CreateTemplate(); $vRenderer =& CreateRenderer($vTemplate); $vForm->accept($vRenderer); $vView =& new TBaseView(); $vView->form = $vRenderer->toObject(); $vTemplate->compile('refs/employment_category_edit.html'); $vTemplate->outputObject($vView); } else { RedirectToList('employment_categories.html'); }
{ if (!$this->validate()) { return FALSE; } $vDB = GetDB(); $vValues = $this->getSubmitValues(TRUE); // $vId = $vValues['id']; $vRecord = array(); if (!empty($vValues['id'])) { $vRecord['id'] = $vValues['id']; } CopyRecordStrValue($vRecord, $vValues, 'name'); $vResult = $vDB->InsertOrUpdateById('rb_vistit_targets', $vRecord); // var_dump($vRecord); // var_dump($vDB); return $vResult; } } $vId = array_key_exists('id', $_GET) ? $_GET['id'] : ''; $vForm = new TEditor($vId); if (!$vForm->Save()) { $vTemplate =& CreateTemplate(); $vRenderer =& CreateRenderer($vTemplate); $vForm->accept($vRenderer); $vView =& new TBaseView(); $vView->form = $vRenderer->toObject(); $vTemplate->compile('refs/vistit_target_edit.html'); $vTemplate->outputObject($vView); } else { RedirectToList('vistit_targets.html'); }
if (!$this->validate()) { return FALSE; } $vDB = GetDB(); $vValues = $this->getSubmitValues(TRUE); // $vId = $vValues['id']; $vRecord = array(); if (!empty($vValues['id'])) { $vRecord['id'] = $vValues['id']; } CopyRecordStrValue($vRecord, $vValues, 'name'); CopyRecordBoolValue($vRecord, $vValues, 'is_plaster'); $vResult = $vDB->InsertOrUpdateById('rb_manipulations', $vRecord); // var_dump($vRecord); // var_dump($vDB); return $vResult; } } $vId = array_key_exists('id', $_GET) ? $_GET['id'] : ''; $vForm = new TEditor($vId); if (!$vForm->Save()) { $vTemplate =& CreateTemplate(); $vRenderer =& CreateRenderer($vTemplate); $vForm->accept($vRenderer); $vView =& new TBaseView(); $vView->form = $vRenderer->toObject(); $vTemplate->compile('refs/manipulation_edit.html'); $vTemplate->outputObject($vView); } else { RedirectToList('manipulations.html'); }
{ if (!$this->validate()) { return FALSE; } $vDB = GetDB(); $vValues = $this->getSubmitValues(TRUE); // $vId = $vValues['id']; $vRecord = array(); if (!empty($vValues['id'])) { $vRecord['id'] = $vValues['id']; } CopyRecordStrValue($vRecord, $vValues, 'name'); $vResult = $vDB->InsertOrUpdateById('rb_dynamics', $vRecord); // var_dump($vRecord); // var_dump($vDB); return $vResult; } } $vId = array_key_exists('id', $_GET) ? $_GET['id'] : ''; $vForm = new TEditor($vId); if (!$vForm->Save()) { $vTemplate =& CreateTemplate(); $vRenderer =& CreateRenderer($vTemplate); $vForm->accept($vRenderer); $vView =& new TBaseView(); $vView->form = $vRenderer->toObject(); $vTemplate->compile('refs/dynamic_edit.html'); $vTemplate->outputObject($vView); } else { RedirectToList('dynamics.html'); }
{ if (!$this->validate()) { return FALSE; } $vDB = GetDB(); $vValues = $this->getSubmitValues(TRUE); // $vId = $vValues['id']; $vRecord = array(); if (!empty($vValues['id'])) { $vRecord['id'] = $vValues['id']; } CopyRecordStrValue($vRecord, $vValues, 'name'); $vResult = $vDB->InsertOrUpdateById('rb_insurance_companies', $vRecord); // var_dump($vRecord); // var_dump($vDB); return $vResult; } } $vId = array_key_exists('id', $_GET) ? $_GET['id'] : ''; $vForm = new TEditor($vId); if (!$vForm->Save()) { $vTemplate =& CreateTemplate(); $vRenderer =& CreateRenderer($vTemplate); $vForm->accept($vRenderer); $vView =& new TBaseView(); $vView->form = $vRenderer->toObject(); $vTemplate->compile('refs/insurance_company_edit.html'); $vTemplate->outputObject($vView); } else { RedirectToList('insurance_companies.html'); }
{ if (!$this->validate()) { return FALSE; } $vDB = GetDB(); $vValues = $this->getSubmitValues(TRUE); // $vId = $vValues['id']; $vRecord = array(); if (!empty($vValues['id'])) { $vRecord['id'] = $vValues['id']; } CopyRecordStrValue($vRecord, $vValues, 'name'); $vResult = $vDB->InsertOrUpdateById('rb_doc_types', $vRecord); // var_dump($vRecord); // var_dump($vDB); return $vResult; } } $vId = array_key_exists('id', $_GET) ? $_GET['id'] : ''; $vForm = new TEditor($vId); if (!$vForm->Save()) { $vTemplate =& CreateTemplate(); $vRenderer =& CreateRenderer($vTemplate); $vForm->accept($vRenderer); $vView =& new TBaseView(); $vView->form = $vRenderer->toObject(); $vTemplate->compile('refs/doc_type_edit.html'); $vTemplate->outputObject($vView); } else { RedirectToList('doc_types.html'); }