Exemple #1
0
 protected function OnOutput()
 {
     // Подключаем вложенный шаблон
     $vars = array('data' => $this->data);
     $this->content = $this->Template($this->tpl, $vars);
     parent::OnOutput();
 }
Exemple #2
0
 protected function OnOutput()
 {
     $mUsers = M_Users::Instance();
     $mType = M_Type::Instance();
     $mDocument = M_Document::Instance();
     $tpl = 'tpl_edittype.php';
     $typeall = $mType->Alltype();
     //все типы вообще
     $vars = array('canUseSecretFunctions' => $mUsers->Can('USE_SECRET_FUNCTIONS'), 'docid' => 1, 'typeall' => $typeall, 'result' => $this->id);
     // Менеджеры.
     // Генерация содержимого страницы Welcome.
     $this->content = $this->View($tpl, $vars);
     //собираем и выводим данные для левой колонки
     if ($sid = $mUsers->GetSid()) {
         $listdoc = $mUsers->Get_idoc_user($sid);
         //запрашиваем последние выбранные документы для SID
         $sidresult = true;
     }
     $vars2 = array('var' => $listdoc, 'sidresult' => $sidresult);
     //тестовая строка);
     $this->leftcontent = $this->View('tpl_leftlistdoc.php', $vars2);
     //собираем и выводим данные для правого меню
     $vars2 = array('var' => array('пользователи' => 'index.php?c=listuser', 'Редактировать Теги' => 'index.php?c=editteg'));
     $this->rightmenu = $this->View('tpl_rightmenu.php', $vars2);
     // C_Base.
     parent::OnOutput();
 }
Exemple #3
0
 protected function OnOutput()
 {
     // Генерация содержимого формы входа.
     $vars = array('login' => $this->login);
     $this->content = $this->View('tpl_login.php', $vars);
     // C_Base.
     parent::OnOutput();
 }
Exemple #4
0
 protected function OnOutput()
 {
     // Генерация содержимого формы входа.
     $vars = array('alert' => $this->alert);
     $this->content = $this->View('tpl_restore.php', $vars);
     // C_Base.
     parent::OnOutput();
 }
Exemple #5
0
 protected function OnOutput()
 {
     // Генерация содержимого страницы
     $vars = array('alert' => $this->alert, 'user' => $this->user, 'grup' => $this->mRasp->all_grup(), 'lecturer' => $this->mRasp->all_lecturer(), 'linkAuthVk' => "https://oauth.vk.com/authorize?client_id=" . CLIENT_ID . "&scope=" . SCOPE . "&redirect_uri=" . PATH . "index.php?c=setting" . "&response_type=code&v=5.0");
     $this->content = $this->View(THEME . '/tpl_setting.php', $vars);
     // C_Base.
     parent::OnOutput();
 }
Exemple #6
0
 protected function OnOutput()
 {
     if ($this->txt != '') {
         $vars = array('Senname' => findBySenname($this->txt), 'InNum' => findByInNum($this->txt), 'OutNum' => findByOutNum($this->txt), 'Date' => findByDate($this->txt), 'ContactName' => findByContactName($this->txt), 'CNumber' => findByContactNumber($this->txt), 'txt' => $this->txt);
     } else {
         $vars = array();
     }
     $this->content = $this->Template('application/views/search.php', $vars);
     parent::OnOutput();
 }
Exemple #7
0
 protected function OnOutput()
 {
     if (isClosed($this->id) && $_SESSION['role'] == '2') {
         $vars = array('claim' => $this->claiminfo, 'comment' => getComments($this->id));
         $this->content = $this->Template('application/views/claims/close.php', $vars);
     } else {
         $com = getComments($this->id);
         $vars = array('claim' => $this->claiminfo, 'comment' => $com);
         $this->content = $this->Template('application/views/claims/editclaim.php', $vars);
     }
     parent::OnOutput();
 }
Exemple #8
0
 protected function OnOutput()
 {
     $vars = array('types' => $this->types, 'departments' => $this->departments);
     $this->content = $this->Template('application/views/claims/addclaim.php', $vars);
     parent::OnOutput();
 }
Exemple #9
0
 protected function OnOutput()
 {
     $vars = array('contact' => $this->contact);
     $this->content = $this->Template('application/views/contacts/editcontact.php', $vars);
     parent::OnOutput();
 }
Exemple #10
0
 protected function OnOutput()
 {
     $mUsers = M_Users::Instance();
     $mType = M_Type::Instance();
     $alltype = $mType->alltype();
     //массив для выпадающего меню
     $mDocument = M_Document::Instance();
     //$result	= $mDocument->getresult();
     $result = $this->result;
     //$error	= $mDocument->geterror();
     $error = $this->error;
     switch ($result) {
         case 'ok':
             header("Location:index.php?c=viewdoc&id={$this->id}");
             exit;
             break;
         case 'okcopy':
             header("Location:index.php?c=newteg&id={$this->id}");
             //копируется описание с похожего документа
             exit;
             break;
         default:
             $tpl = 'tpl_newdoc.php';
             $vars = array('input' => 'dffd', 'error' => $error, 'date' => $this->date, 'svar' => $this->svar, 'alltype' => $alltype, 'canUseSecretFunctions' => $mUsers->Can('USE_SECRET_FUNCTIONS'));
     }
     // Менеджеры.
     // Генерация содержимого страницы Welcome.
     $this->content = $this->View($tpl, $vars);
     //собираем и выводим данные для левой колонки
     if ($sid = $mUsers->GetSid()) {
         $listdoc = $mUsers->Get_idoc_user($sid);
         //запрашиваем последние выбранные документы для SID
         $sidresult = true;
     }
     $vars2 = array('var' => $listdoc, 'sidresult' => $sidresult);
     //тестовая строка);
     $this->leftcontent = $this->View('tpl_leftlistdoc.php', $vars2);
     //собираем и выводим данные для правого меню
     $vars2 = array('var' => array('список всех документов' => 'index.php?c=listdoc', 'вернутся в главное меню' => 'index.php'));
     $this->rightmenu = $this->View('tpl_rightmenu.php', $vars2);
     // C_Base.
     parent::OnOutput();
 }
 protected function OnOutput()
 {
     $vars = array('book' => $this->book);
     $this->content = $this->Template('v/v_edit_book.php', $vars);
     parent::OnOutput();
 }
Exemple #12
0
 protected function OnOutput()
 {
     $vars = array('costs' => $this->cost_name, 'incomings' => $this->incomings);
     $this->content = $this->Template('application/views/costs/incomings.php', $vars);
     parent::OnOutput();
 }
Exemple #13
0
 protected function OnOutput()
 {
     $vars = array('medicine' => $this->medicine_name, 'incomings' => $this->incomings);
     $this->content = $this->Template('application/views/medicines/incoming.php', $vars);
     parent::OnOutput();
 }
Exemple #14
0
 public function OnOutput()
 {
     $vars = array('costs' => $this->costs);
     $this->content = $this->Template('application/views/costs/all.php', $vars);
     parent::OnOutput();
 }
Exemple #15
0
 /**
  * Передача всех данных Видеопроектору, для отображения.
  * Отображение.
  */
 protected function OnOutput()
 {
     $archive = array('error' => nl2br($this->_error), 'article' => $this->_article);
     $this->_content = $this->_viewer->render("v/v_new.tpl", $archive);
     parent::OnOutput();
 }
 protected function OnOutput()
 {
     $vars = array('author' => $this->author);
     $this->content = $this->Template('v/v_edit_author.php', $vars);
     parent::OnOutput();
 }
Exemple #17
0
 protected function OnOutput()
 {
     $masVK = $this->mSmsRasp->verVKMailing($this->user);
     $masSMS = $this->mSmsRasp->verSMSMailing($this->user);
     if (count($masVK) != 0) {
         $vk = $masVK[0];
     }
     if (count($masSMS) != 0) {
         $sms = $masSMS[0];
     }
     // Генерация содержимого страницы.
     $vars = array('user' => $this->user, 'grup' => $this->mRasp->all_grup(), 'lecturer' => $this->mRasp->all_lecturer(), 'alertOk' => $this->alertOk, 'alertFail' => $this->alertFail, 'alertNotif' => $this->alertNotif, 'person' => $this->user[person], 'sms' => $sms, 'vk' => $vk);
     $this->content = $this->View(THEME . '/tpl_sms_vk_rasp.php', $vars);
     // C_Base.
     parent::OnOutput();
 }
Exemple #18
0
 protected function OnOutput()
 {
     $mUsers = M_Users::Instance();
     $mTeg = M_Teg::Instance();
     $mSv = M_Sv::Instance();
     $mDocument = M_Document::Instance();
     $mType = M_Type::Instance();
     if ($this->resultget != null) {
         $id = $this->docid;
         $doc = $mDocument->getdocument($id);
         //полная информация о документе
         $docpart = $mType->getpart($doc[0]['type']);
         $doctypename = $mType->getname($doc[0]['type']);
         $typeall = $mType->Alltype();
         //все типы вообще
         $tegdoc = $mSv->getteg($id);
         //все теги касающиеся документа
         $tegall = $mTeg->allteg();
         //все теги вообще
         $error = $mDocument->geterror();
         //$tegid=$teg[0]['id'];
         //передаем информацию на страницу
         $docdate = $doc[0]['date'];
         $tpl = 'tpl_editdoc.php';
         $vars = array('doc' => $doc[0], 'docpart' => $docpart, 'doctypename' => $doctypename, 'docdate' => $docdate, 'tegdoc' => $tegdoc, 'tegall' => $tegall, 'textteg' => $this->textteg, 'error' => $error, 'alltype' => $typeall, 'canUseSecretFunctions' => $mUsers->Can('USE_SECRET_FUNCTIONS'));
     } else {
         $tpl = 'tpl_welcome.php';
         $vars = array('canUseSecretFunctions' => $mUsers->Can('USE_SECRET_FUNCTIONS'), 'result' => 'ничего');
     }
     // Менеджеры.
     // Генерация содержимого страницы Welcome.
     $this->content = $this->View($tpl, $vars);
     //собираем и выводим данные для левой колонки
     if ($sid = $mUsers->GetSid()) {
         $listdoc = $mUsers->Get_idoc_user($sid);
         //запрашиваем последние выбранные документы для SID
         $sidresult = true;
     }
     $vars2 = array('var' => $listdoc, 'sidresult' => $sidresult);
     //тестовая строка);
     $this->leftcontent = $this->View('tpl_leftlistdoc.php', $vars2);
     //собираем и выводим данные для правого меню
     $vars2 = array('var' => array('список всех документов' => 'index.php?c=listdoc', 'Загрузка новых документов' => 'index.php?c=newdoc', 'вернутся к просмотру' => "index.php?c=viewdoc&id={$id}", 'редактировать типы загружаемых файлов' => 'index.php?c=edittype', 'Дубликат' => "index.php?c=newdoc&idcopy={$id}"));
     $this->rightmenu = $this->View('tpl_rightmenu.php', $vars2);
     // C_Base.
     parent::OnOutput();
     // echo $this->content;
 }
Exemple #19
0
 protected function OnOutput()
 {
     if ($this->person == 'lecturer') {
         $sel_person = $this->sel_lecturer;
     } else {
         $sel_person = $this->sel_grup;
     }
     $this->mas_rasp = $this->mRasp->rasp($this->sel_week, 'week', $this->person, $sel_person);
     $this->title = "Расписание " . $sel_person . " на " . $this->sel_week . " неделю.";
     // Генерация содержимого страницы Rasp.
     $vars = array('sel_grup' => $this->sel_grup, 'sel_lecturer' => $this->sel_lecturer, 'sel_week' => $this->sel_week, 'sel_person' => $sel_person, 'person' => $_COOKIE['person'], 'grup' => $this->mRasp->all_grup(), 'lecturer' => $this->mRasp->all_lecturer(), 'rasp' => $this->mas_rasp, 'day1' => $this->day1, 'week' => 52, 'now_week' => $this->now_week);
     $this->content = $this->View(THEME . '/tpl_rasp.php', $vars);
     parent::OnOutput();
 }
Exemple #20
0
 protected function OnOutput()
 {
     $vars = array('allmedicines' => $this->allmedicines);
     $this->content = $this->Template('application/views/medicines/allmedicines.php', $vars);
     parent::OnOutput();
 }
Exemple #21
0
 protected function OnOutput()
 {
     $vars = array('claim' => $this->claims);
     $this->content = $this->Template('application/views/claims/input.php', $vars);
     parent::OnOutput();
 }
Exemple #22
0
 protected function OnOutput()
 {
     // Менеджеры.
     $mUsers = M_Users::Instance();
     $mDocument = M_Document::Instance();
     $mTeg = M_Teg::Instance();
     $mType = M_Type::Instance();
     $mSv = M_Sv::Instance();
     $alltype = $mType->alltype();
     //массив для выпадающего меню
     //собираем в массив данные из переменных класса , для подстановки в запрос SQL
     $strseach = $this->strseach;
     //передаем обратно на страницу в неизменном виде, для возможности повторения запроса
     $teg = $this->teg;
     $type = mysql_real_escape_string($this->type . '');
     $tegall = $mTeg->allteg();
     //все теги вообще
     //добавить пустые строки, для выпадающих списков
     array_unshift($tegall, array("id" => "", "name" => ""));
     array_unshift($alltype, array("id" => "", "name" => "", "part" => ""));
     //перебираем все пары полей выбора
     $docsp = array();
     $flag = '';
     $nmas = 0;
     //начальные значения
     for ($i = 1; $i <= $this->colpol; $i++) {
         $strseach[$i] = mysql_real_escape_string($strseach[$i] . '');
         $teg[$i] = mysql_real_escape_string($teg[$i] . '');
         //перебираем пары ТЕГ-Значение, для разных вариантов заполнения, начинаем формировать условие для SQL запроса
         $textsql = '';
         $doclist = array();
         if ($strseach[$i] != NULL and $teg[$i] != NULL) {
             $textsql = "o_sv.text LIKE '%{$strseach[$i]}%' AND o_sv.tegid = '{$teg[$i]}'";
             $tegreturn[$i]['id'] = $teg[$i];
             $tegreturnname = $mTeg->getteg_id($teg[$i]);
             $tegreturn[$i]['name'] = $tegreturnname[0]['name'];
             //текущее название тега для последнего запроса;
         } elseif ($strseach[$i] != NULL and $teg[$i] == NULL) {
             $textsql = "o_sv.text LIKE '%{$strseach[$i]}%'";
         } elseif ($strseach[$i] == NULL and $teg[$i] != NULL) {
             $textsql = "o_sv.tegid = '{$teg[$i]}'";
             $tegreturn[$i]['id'] = $teg[$i];
             $tegreturnname = $mTeg->getteg_id($teg[$i]);
             $tegreturn[$i]['name'] = $tegreturnname[0]['name'];
             //текущее название тега для последнего запроса;
         }
         //если  в поиске участвует еще и тип документа то добавляем в условие и его, или только его, если другие критерии отсутствуют
         if ($type != NULL) {
             if ($textsql == NULL) {
                 if ($flag == NULL) {
                     $textsql = "o_document.type = '{$type}'";
                     $flag = 1;
                 }
             } else {
                 $textsql = "({$textsql}) AND o_document.type = '{$type}'";
                 $flag = 1;
             }
             $typereturn['id'] = $type;
             $typereturn['part'] = $mType->getpart($type);
             $typereturn['name'] = $mType->getname($type);
             //не забываем вернуть информацию о последнем запрашиваем типе документов обратно не страницу
         }
         //получаем из базы массив id документов для каждого из условий, находим их пересечение с предыдущим результатом
         //если условие всего одно - возвращаем результат только для него
         //если условия нет вообще возвращаем "заглушку" возврата по документов по умолчанию
         if ($textsql == NULL) {
             $textsql = "1=3";
             //заглушка
         } else {
             $doclist = $mDocument->getdoc($textsql, $this->date_selection);
             if ($doclist != null) {
                 if ($nmas == 0) {
                     $docsp = $doclist;
                     $nmas = 1;
                 } else {
                     $docsp = array_intersect($docsp, $doclist);
                     //пересечение массивов
                     //$docsp = array_uintersect ($docsp, $doclist);//пересечение массивов
                 }
             } else {
                 $docsp = array();
                 break;
             }
         }
     }
     //получаем всю информацию о выбранных документов
     $doc1 = array();
     foreach ($docsp as $k => $v) {
         $doc1 = $mDocument->getdocument($v);
         $doc[$k] = $doc1[0];
         $doc[$k]['part'] = $mType->getpart($doc1[0]['type']);
     }
     //при отсутсвии результатов можно задать условие
     if ($docsp == null) {
         $this->result = false;
     } else {
         if ($sid = $mUsers->GetSid()) {
             $mUsers->Add_datauser($sid, 'id_doc', $docsp);
             //запоминаем выборку, и в дальнейшем с ней работаем
             $sidresult = true;
         }
     }
     // Генерация содержимого страницы Welcome.
     $vars = array('result' => $this->result, 'doc' => $doc, 'strseach' => $strseach, 'typereturn' => $typereturn, 'tegreturn' => $tegreturn, 'tegall' => $tegall, 'alltype' => $alltype, 'colpol' => $this->colpol, 'date_selection' => $this->date_selection, 'minLength' => MINLENGTH, 'num_year_search' => NUM_YEAR_SEARCH, 'canUseSecretFunctions' => $mUsers->Can('USE_SECRET_FUNCTIONS'));
     $this->content = $this->View('tpl_listdoc.php', $vars);
     //собираем и выводим данные для левой колонки
     if ($sidresult) {
         $listdoc = $mUsers->Get_idoc_user($sid);
         //запрашиваем последние выбранные документы для SID
     }
     $vars2 = array('var' => $listdoc, 'sidresult' => $sidresult);
     //тестовая строка);
     $this->leftcontent = $this->View('tpl_leftlistdoc.php', $vars2);
     //собираем и выводим данные для правого меню
     $vars2 = array('var' => array('новый документ' => 'index.php?c=newdoc', 'типы загружаемых файлов' => 'index.php?c=edittype'));
     $this->rightmenu = $this->View('tpl_rightmenu.php', $vars2);
     //// C_Base.
     parent::OnOutput();
 }
 protected function OnOutput()
 {
     $vars = array();
     $this->content = $this->Template('v/v_editor_library.php', $vars);
     parent::OnOutput();
 }
Exemple #24
0
 protected function OnOutput()
 {
     $vars = array('medicine' => $this->medicine_name, 'expences' => $this->expences, 'patients' => $this->patients);
     $this->content = $this->Template('application/views/medicines/expences.php', $vars);
     parent::OnOutput();
 }
 protected function OnOutput()
 {
     $vars = array();
     $this->content = $this->Template('v/v_index.php', $vars);
     parent::OnOutput();
 }
Exemple #26
0
 protected function OnOutput()
 {
     $vars = array('cost' => $this->cost, 'month' => $this->month, 'year' => $this->year, 'incomings' => $this->incomings, 'expences' => $this->expences);
     $this->content = $this->Template('application/views/costs/filter.php', $vars);
     parent::OnOutput();
 }
Exemple #27
0
 protected function OnOutput()
 {
     $mUsers = M_Users::Instance();
     $mDocument = M_Document::Instance();
     $tpl = 'tpl_edituser.php';
     $userinfo = $mUsers->getuserinfo($this->id);
     //все пользователи вообще
     $vars = array('canUseSecretFunctions' => $mUsers->Can('USE_SECRET_FUNCTIONS'), 'id' => $this->id, 'userinfo' => $userinfo, 'result' => $this->id);
     // Менеджеры.
     // Генерация содержимого страницы Welcome.
     $this->content = $this->View($tpl, $vars);
     //собираем и выводим данные для левой колонки
     if ($sid = $mUsers->GetSid()) {
         $listdoc = $mUsers->Get_idoc_user($sid);
         //запрашиваем последние выбранные документы для SID
         $sidresult = true;
     }
     $vars2 = array('var' => $listdoc, 'sidresult' => $sidresult);
     //тестовая строка);
     $this->leftcontent = $this->View('tpl_leftlistdoc.php', $vars2);
     // C_Base.
     parent::OnOutput();
 }
 protected function OnOutput()
 {
     $vars = array('result' => $this->result);
     $this->content = $this->Template('v/v_search.php', $vars);
     parent::OnOutput();
 }
Exemple #29
0
 protected function OnOutput()
 {
     $vars = array('contacts' => $this->allcontacts);
     $this->content = $this->Template('application/views/files/addfile.php', $vars);
     parent::OnOutput();
 }
Exemple #30
0
 public function OnOutput()
 {
     $vars = array('patientId' => $this->id, 'month' => $this->month, 'year' => $this->year, 'expences' => $this->expenced, 'cexpences' => $this->costExpenced);
     $this->content = $this->Template("application/views/patients/report.php", $vars);
     parent::OnOutput();
 }