public function ToHTMLDel() { global $link_to_utility_interceptor; $res = '<div class="row">'; $res .= '<div class="' . ColAllTypes(6) . '">'; $argsdel = array('action_link' => $link_to_utility_interceptor, 'action_type' => 'del', 'obj_type' => RequestOnRegister::$type, 'id' => $this->id, 'btn_text' => 'Отклонить', 'info' => 'Вы уверены, что хотите отклонить запрос пользователя ' . $this->name . '?', 'method' => 'get'); $res .= ActionButton($argsdel); $res .= '</div>'; $res .= '<div class="' . ColAllTypes(6) . '">'; $argsadd = array('action_link' => $link_to_utility_interceptor, 'action_type' => 'add', 'obj_type' => RequestOnRegister::$type, 'id' => $this->id, 'btn_text' => 'Принять', 'info' => 'Вы уверены, что хотите принять запрос пользователя ' . $this->name . '?', 'method' => 'get'); return $res . ActionButton($argsadd) . '</div></div>'; }
$content = AlertMessage('alert-danger', Language::Word('all languages of this direction is implemented')); } else { $id = User::GetIDByLogin($_SESSION['user_login']); clear_tmp_images_dir(Direction::$type, $id); global $link_to_utility_sql_worker; global $link_to_img_upload; global $link_to_img_browse; global $languages; $content .= '<form method="post" action="' . $link_to_utility_sql_worker . '" enctype="multipart/form-data">'; $content .= PairLabelAndInput(4, 5, Language::Word('header'), 'name', Language::Word('insert header')) . '<br>'; $content .= PairLabelAndInputFile(4, 5, Language::Word('cover'), 'cover'); $content .= PairLabelAndSelect(4, 5, Language::Word('language'), 'language', $free_languages, array(key($free_languages), current($free_languages))); $content .= WrapToHiddenInputs(array('type' => Direction::$type, 'yes' => '', 'id' => $id, 'glob_id' => $direction->id)); $content .= '<div class="row"><h3>' . Language::Word('text') . '</h3></div>'; $content .= '<div class="row">'; $content .= '<div class="' . ColAllTypes(8) . ' ' . ColOffsetAllTypes(2) . '" align="center">'; $content .= '<textarea id="text_block" name="text_block"></textarea>'; $content .= '</div>'; $content .= '</div>'; $content .= '<script>'; $content .= 'CKEDITOR.replace("text_block",'; $content .= '{ filebrowserImageUploadUrl: "' . $link_to_img_upload . '?type=' . Direction::$type . '&id=' . $id . '&add=add&glob_id=' . $direction->id . '",'; $content .= 'filebrowserImageBrowseUrl : "' . $link_to_img_browse . '?type=' . Direction::$type . '&id=' . $direction->id . '&edit=edit",'; $content .= 'contentsCss: [CKEDITOR.basePath + "contents.css", "css/styles.css", "css/bootstrap.min.css"],'; $content .= 'allowedContent: true, });'; $content .= 'CKEDITOR.config.height = 400;'; $content .= '</script>'; $content .= '<div class="row">'; $content .= '<input type="submit" class="btn btn-primary btn-lg" name="add" value="' . Language::Word('save') . '">'; $content .= '</div>'; $content .= '</form>';
<?php $is_public = true; include_once 'utility_lgmis_lib.php'; include_once $link_to_utility_authorization; $header = Language::PublicMenu('contacts'); $content = ''; $footer = ''; $header_type = 'h4'; $title = Language::PublicMenu('contacts'); $content .= '<br><div class="row" align="center">'; $content .= '<div class="' . ColAllTypes(6) . ' vcenter">'; $content .= '<iframe class="google-map" src="https://www.google.com/maps/embed?pb=!1m24!1m8!1m3!1d8994.513616455022!2d37.532702!3d55.695448!3m2!1i1024!2i768!4f13.1!4m13!3e2!4m5!1s0x46b54cf533082589%3A0x402540c5efcc4157!2z0KHRgtCw0L3RhtC40Y8g0LzQtdGC0YDQviDCq9Cj0L3QuNCy0LXRgNGB0LjRgtC10YLCuywg0KDQvtGB0YHQuNGP!3m2!1d55.692679999999996!2d37.536882!4m5!1s0x46b54c6129ed4359%3A0xe03aa689c99f60f5!2z0KTQsNC60YPQu9GM0YLQtdGCINCS0JzQmiDQnNCT0KMsINGD0LvQuNGG0LAg0JvQtdCx0LXQtNC10LLQsCwg0KHRgtCw0YDQstC40LvRjCwg0JzQvtGB0LrQvtCy0YHQutCw0Y8g0L7QsdC70LDRgdGC0YwsINCg0L7RgdGB0LjRjw!3m2!1d55.698434999999996!2d37.530196!5e0!3m2!1sru!2sru!4v1432075564575"></iframe>'; $content .= '</div>'; $content .= '<div class="' . ColAllTypes(6) . ' vcenter">' . Language::Address() . '</div>'; $content .= '</div>'; $content .= '<br>'; $users = User::FetchAllEmployes(); $size = count($users); if ($size > 0) { $content .= '<hr><div class="row" align="center">' . ToPageHeader(Language::Word('employees'), 'h4', 'grey') . '</div><hr>'; require $link_to_pagination_init_template; for ($i = $from; $i <= $to; ++$i) { $content .= $users[$i]->ToHTMLAutoShortForTable(GetUserPrivileges()); if ($i != $to) { $content .= '<hr>'; } } require $link_to_pagination_show_template; $content .= $pagination; }
$content .= '</ul>'; $content .= '<div style="position: absolute; left: 10%; top: 40%; text-align: center;" align="center" id="files_area_background_text">'; $content .= '<h1 style="color: #dadada;"><span class="glyphicon glyphicon-paste" aria-hidden="true"></span> ' . Language::Word('file') . '</h1>'; $content .= '</div>'; $content .= '</div>'; $content .= '<input id="files_count" type="hidden" name="files_count" value="0">'; } $content .= '</div>'; $content .= '</div>'; $content .= '<div class="row">'; $content .= '<div class="' . ColAllTypes(9) . '" align="center">'; if ($perms > MyFile::perm_to_all_registered) { $content .= '<button class="btn btn-info btn-lg" onclick="create_folder();">+<span class="glyphicon glyphicon-folder-open" aria-hidden="true"></span> ' . Language::Word('create folder') . '</button>'; } $content .= '</div>'; $content .= '<div class="' . ColAllTypes(3) . '" align="center">'; if ($perms > MyFile::perm_to_all_registered) { $content .= '<button class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal">' . Language::Word("send") . '</button>'; } $content .= '<div class="modal fade" id="folder_create" tabindex="-1" role="dialod">'; $content .= '<div class="modal-dialog" role="document">'; $content .= '<div class="modal-content">'; $content .= '<div class="modal-header">'; $content .= '<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>'; $content .= '<h4 class="modal-title" id="myModalLabel">' . Language::Word('actions') . '</h4>'; $content .= '</div>'; $content .= '<div class="modal-body">'; $content .= PairLabelAndInput(3, 9, Language::Word('name'), 'folder_name'); $content .= PairLabelAndRadio(3, 9, Language::Word('permissions'), 'folder_permissions', [['name' => 'for_employees', 'val' => Language::Word('for employees')], ['name' => 'for_registered', 'val' => Language::Word('for registered')]]); $content .= '</div>'; $content .= '<div class="modal-footer">';
} echo $content; echo '</div>'; echo '</div>'; ?> </div> </div> </div> <div id="push"></div> </div> <?php echo '<div id="footer" align="center">'; echo '<div class="row">'; echo '<div class="' . ColAllTypes(12) . '" align="center">'; require_once $link_to_public_footer_template; echo '</div>'; echo '</div>'; echo '</div>'; ?> </div> <div style="position: absolute; top: 20px; right: 50px;"> <a onclick="changeLanguage('rus');"><img class="lang_flag" src=<?php echo '"' . Link::Get($link_to_service_images) . 'rus_flag.png"'; ?> ></a><a onclick="changeLanguage('eng');"><img class="lang_flag" src=<?php echo '"' . Link::Get($link_to_service_images) . 'eng_flag.png"'; ?> ></a> </div>
public function ToHTMLUserPrivateShortInTable() { $author = User::FetchBy(['select_list' => 'id, name, surname, login', 'eq_conds' => ['id' => $this->author_id], 'is_unique' => true]); $link_to_author = ''; if (Error::IsError($author)) { if (Error::IsType($author, Error::not_found)) { $link_to_author = Language::Word('not found'); } else { return AlertMessage('Error while fethching author of report: ' . Error::ToString($author)); } } else { $link_to_author = $author->LinkToThis(); } $users = ''; $receivers = User::FetchBy(['select_list' => 'id, name, surname', 'where_addition' => '(received_reports LIKE "%\\"' . $this->id . '\\"%")']); foreach ($receivers as $key => $user) { $users .= '<div class="row">'; $users .= '<div class="' . ColAllTypes(12) . '">'; $users .= $user->LinkToThis(); $users .= '</div>'; $users .= '</div>'; } $res = '<tr>'; $res .= '<td>' . $link_to_author . '</td>'; $res .= '<td>' . $users . '</td>'; $res .= '<td>' . htmlspecialchars($this->GetName()) . '</td>'; $res .= '<td>' . $this->GetCreatingDate() . '</td>'; $res .= '<td>'; $res .= '<div class="row">'; $author_login = ''; if (is_a($author, 'User')) { $author_login = $author->GetLogin(); } else { $author_login = ''; } if (GetUserLogin() === 'admin') { $res .= '<div class="' . ColAllTypes(4) . '">'; } else { $res .= '<div class="' . ColAllTypes(12) . '">'; } $res .= $this->ToHTMLFullVers(); $res .= '</div>'; if (GetUserLogin() === 'admin') { $res .= '<div class="' . ColAllTypes(4) . '">'; $res .= $this->ToHTMLEdit(); $res .= '</div>'; $res .= '<div class="' . ColAllTypes(4) . '">'; $res .= $this->ToHTMLDel(); $res .= '</div>'; } $res .= '</div>'; $res .= '</td>'; $res .= '</tr>'; return $res; }
$content .= '<div class="' . ColAllTypes(4) . '"><img src="' . Link::Get($user->GetPathToPhoto()) . '" class="img-avatar"></div>'; $content .= '<div class="' . ColAllTypes(8) . '">'; $content .= '<br><div class="row" align="center">'; $content .= '<div class="' . ColAllTypes(6) . '" align="right"><font color="grey">' . Language::Word('position') . ':</font></div>'; $content .= '<div class="' . ColAllTypes(6) . '" align="left">' . $user->GetPosition() . '</div>'; $content .= '</div>'; $articles = Article::FetchCountOf(['where' => 'author_id = ' . $user->GetID()]); $content .= '<div class="row" align="center">'; $content .= '<div class="' . ColAllTypes(6) . '" align="right"><font color="grey">' . Language::Word('news published') . ':</font></div>'; $content .= '<div class="' . ColAllTypes(6) . '" align="left">' . $articles . '</div>'; $content .= '</div>'; $content .= '<hr>'; $content .= ToPageHeader(Language::PublicMenu('contacts'), 'h4', 'grey'); $content .= '<div class="row" align="center">'; $content .= '<div class="' . ColAllTypes(6) . '" align="right"><font color="grey">' . Language::Word('mail') . ':</font></div>'; $content .= '<div class="' . ColAllTypes(6) . '" align="left"><a href="mailto:' . $user->GetEmail() . '">' . $user->GetEmail() . '</a></div>'; $content .= '</div>'; $content .= '</div>'; $content .= '</div>'; $content .= '<hr>'; $blocks = UserBlock::FetchAllByAuthorID($user->GetID()); $size = count($blocks); if ($size) { require $link_to_pagination_init_template; for ($i = $from; $i <= $to; ++$i) { $content .= $blocks[$i]->ToHTMLAutoFull(GetUserPrivileges()) . '<hr>'; } require $link_to_pagination_show_template; $content .= $pagination; } $no_content_center = true;
if ($content_type === 'received_reps') { $received = $user->GetReceivedReports(); $size = count($received); } else { if ($content_type === 'sended_reps') { $sended = $user->GetSendedReports(); $size = count($sended); } else { $size = Report::GetCount(); } } if ($size) { require $link_to_pagination_init_template; $content .= '<div class="row">'; $content .= '<div class="' . ColAllTypes(1) . ' center-block"></div>'; $content .= '<div class="' . ColAllTypes(10) . ' center-block">'; $content .= '<table class="table table-striped text-center">'; $content .= '<thead>'; $content .= '<tr>'; $content .= '<th class="text-center">' . Language::Word('author') . '</th>'; $content .= '<th class="text-center">' . Language::Word('receivers') . '</th>'; $content .= '<th class="text-center" width="30%">' . Language::Word('header') . '</th>'; $content .= '<th class="text-center">' . Language::Word('date') . '</th>'; $content .= '<th class="text-center">' . Language::Word('actions') . '</th>'; $content .= '</tr>'; $content .= '</thead>'; $content .= '<tbody>'; $target = NULL; if ($content_type === 'received_reps') { $target = $received; } else {
public function ToHTMLUserPrivateShortInTable() { global $content_types_full; $res = '<tr>'; $res .= '<td>' . htmlspecialchars($this->name) . '</td>'; $res .= '<td>' . User::FetchBy(['eq_conds' => ['id' => $this->author_id], 'select_list' => 'id, name, surname', 'is_unique' => true])->LinkToThis() . '</td>'; $res .= '<td>' . date('d : m : Y - H : i', $this->creating_date) . '</td>'; $res .= '<td>' . htmlspecialchars($content_types_full[$this->role]) . '</td>'; $res .= '<td>'; $res .= '<div class="row">'; $res .= '<div class="' . ColAllTypes(4) . '">'; $res .= $this->ToHTMLFullVers(); $res .= '</div>'; $res .= '<div class="' . ColAllTypes(4) . '">'; $res .= $this->ToHTMLEdit(); $res .= '</div>'; $res .= '<div class="' . ColAllTypes(4) . '">'; $res .= $this->ToHTMLDel(); $res .= '</div>'; $res .= '</div>'; $res .= '</td>'; $res .= '</tr>'; return $res; }
public function ToHTMLUserPublicFull() { $res = ''; $res .= '<div align="left">' . ToPageHeader($this->name, 'h4', 'grey') . '</div>'; $res .= '<div class="row"><div class="' . ColAllTypes(12) . '">'; $res .= $this->text_block; $res .= '</div></div>'; return $res; }
<?php $is_public = true; include_once 'utility_lgmis_lib.php'; include_once $link_to_utility_authorization; $header = Language::PublicMenu('about_us'); $content = ''; $footer = ''; $header_type = 'h4'; $title = $header; $txt_parts = TextPart::FetchByRole('about_us'); $size = count($txt_parts); if ($size > 0) { $records_on_page_old = $records_on_page; $records_on_page = 1; require $link_to_pagination_init_template; for ($i = $from; $i <= $to; ++$i) { $content .= '<div class="row">'; $content .= '<div class="' . ColAllTypes(12) . '">'; $content .= $txt_parts[$i]->GetTextBlock(); $content .= '</div>'; $content .= '</div>'; } require $link_to_pagination_show_template; $content .= $pagination; $records_on_page = $records_on_page_old; } $no_content_center = true; include $link_to_public_template;
public function ToHTMLUserPublicShortInTable() { $res = '<div class="row" style="color: grey;">'; $res .= '<div class="' . ColAllTypes(4) . '" style="padding-right: 0px;">'; $res .= '<img class="img-article-cover" src="' . Link::Get($this->GetPathToImage()) . '">'; $res .= '</div>'; $res .= '<div class="' . ColAllTypes(8) . '">'; $res .= '<div class="row">'; $res .= '<div class="' . ColAllTypes(12) . '">'; $res .= ToPageHeader($this->GetName(), 'h5', 'grey', 'normal'); $res .= '</div>'; $res .= '</div>'; $res .= '<hr>'; $res .= '<div class="row" align="left">'; $res .= '<div class="' . ColAllTypes(12) . '">'; $res .= htmlspecialchars($this->GetAnnotation()); $res .= '</div>'; $res .= '</div>'; $res .= '</div>'; $res .= '</div>'; $author = User::FetchBy(['select_list' => 'id, name, surname', 'is_unique' => true, 'eq_conds' => ['id' => $this->GetAuthorID()]]); $res .= '<div class="row"><div class="' . ColAllTypes(12) . '"><hr></div></div>'; $res .= '<div class="row" style="font-size: 11px">'; $res .= '<div class="' . ColAllTypes(4) . '">'; $res .= $this->GetCreatingDateStr(); $res .= '</div>'; $res .= '<div class="' . ColAllTypes(4) . '" align="left">'; $res .= '<font color="black">Автор:</font> ' . $author->LinkToThis('btn-sm'); $res .= '</div>'; $res .= '<div class="' . ColAllTypes(4) . '" align="right" style="padding-right: 30px;">'; $res .= $this->ToHTMLFullVers(); $res .= '</div>'; $res .= '</div>'; return $res; }
public function ToHTMLUserPrivateShortInTable() { $author = User::FetchBy(['eq_conds' => ['id' => $this->author_id], 'select_list' => 'id, name, surname, login', 'is_unique' => true]); $res = '<tr>'; $res .= '<td>' . htmlspecialchars($this->name) . '</td>'; $res .= '<td>' . date('d : m : Y - H : i', $this->creating_date) . '</td>'; $res .= '<td>' . $author->LinkToThis() . '</td>'; $res .= '<td>'; $res .= '<div class="row">'; if (GetUserLogin() === $author->GetLogin() || GetUserLogin() === 'admin') { $res .= '<div class="' . ColAllTypes(4) . '">'; } else { $res .= '<div class="' . ColAllTypes(12) . '">'; } $res .= $this->ToHTMLFullVers(); $res .= '</div>'; if (GetUserLogin() === $author->GetLogin() || GetUserLogin() === 'admin') { $res .= '<div class="' . ColAllTypes(4) . '">'; $res .= $this->ToHTMLEdit(); $res .= '</div>'; $res .= '<div class="' . ColAllTypes(4) . '">'; $res .= $this->ToHTMLDel(); $res .= '</div>'; } $res .= '</div>'; $res .= '</td>'; $res .= '</tr>'; return $res; }
include_once $link_to_utility_authorization; if (isset($_POST['id']) && isset($_GET['id']) && $_POST['id'] !== $_GET['id']) { $content = AlertMessage('alert-danger', 'Неоднозначные id'); } else { $project = Project::FetchByID($_REQUEST['id']); $header = ''; $content = ''; $footer = ''; $header_type = 'h4'; if ($project === NULL) { $title = Language::Word('error'); $header = $title; $content = Language::Word('internal server error'); } else { if ($project === Error::no_translation) { $title = Language::Word('error'); $header = Language::Word('sorry'); $content = Language::Word('no translation for this project'); } else { $title = $project->name; $header = htmlspecialchars($project->name); $content .= '<br><div class="row" align="center">'; $content .= Language::Word('direction of project') . ': ' . Direction::FetchByID($project->direction_id)->LinkToThis(); $content .= '</div>'; $content .= '<br><hr>'; $content .= '<div class="row"><div class="' . ColAllTypes(12) . '">' . $project->text_block . '</div></div>'; $no_content_center = true; } } } include $link_to_public_template;
public function ToHTMLEditing() { global $user_blocks_in_db; global $link_to_admin_user_block; global $positions; global $link_to_utility_sql_worker; $positions = Language::GetPositions(); $res = ''; $res .= '<form method="post" action="' . $link_to_utility_sql_worker . '" enctype="multipart/form-data">'; $res .= '<div class="row">'; $res .= '<div class="' . ColAllTypes(1) . '"></div>'; $res .= '<div class="' . ColAllTypes(5) . ' vcenter" align="right">'; $res .= '<div class="row">'; $res .= '<img src="' . $this->path_to_photo . '" class="img-rounded img-avatar">'; $res .= '</div>'; $res .= '<div class="row">'; $res .= PairLabelAndInputFile(3, 5, Language::Word('upload image'), 'img'); $res .= '</div>'; $res .= '</div>'; $res .= '<div class="' . ColAllTypes(5) . ' vcenter" align="left">'; $res .= PairLabelAndInput(2, 10, Language::Word('name'), 'name', Language::Word('insert name'), $this->name); $res .= PairLabelAndInput(2, 10, Language::Word('surname'), 'surname', Language::Word('insert surname'), $this->surname); $res .= PairLabelAndInput(2, 10, Language::Word('fathername'), 'fathername', Language::Word('insert fathername'), $this->fathername); if ($this->login != 'admin' && GetUserLogin() == 'admin') { $tmp = User::FetchAllByPosition(DirectorPositionNum); if (($tmp != NULL || GetUserLogin() != 'admin') && $this->position != DirectorPositionNum) { unset($positions[DirectorPositionNum]); } $res .= PairLabelAndSelect(2, 10, Language::Word('position'), 'position', $positions, $selected_field = array($this->position, $positions[$this->position])); } else { $res .= PairLabelAndPanel(2, 10, Language::Word('position'), htmlspecialchars(Language::Position($this->position))); } $res .= PairLabelAndInput(2, 10, Language::Word('mail'), 'email', Language::Word('insert mail'), $this->email); $res .= PairLabelAndInput(2, 10, Language::Word('telephone'), 'telephone', Language::Word('insert telephone'), $this->telephone); if ($this->login == GetUserLogin() && $this->login != 'admin') { $res .= PairLabelAndInput(2, 10, Language::Word('login'), 'login', Language::Word('insert login'), $this->login); } else { $res .= PairLabelAndPanel(2, 10, Language::Word('login'), $this->login); } $res .= PairLabelAndInput(2, 10, Language::Word('birthday'), 'birth_day', 'dd', date('j', $this->birthday)); $res .= PairLabelAndInput(2, 10, Language::Word('birthmonth'), 'birth_month', 'mm', date('n', $this->birthday)); $res .= PairLabelAndInput(2, 10, Language::Word('birthyear'), 'birth_year', 'yyyy', date('Y', $this->birthday)); if ($this->login == GetUserLogin()) { $res .= PairLabelAndPassword(4, 8, Language::Word('old password'), 'password_old', Language::Word('only for password changing')); $res .= PairLabelAndPassword(4, 8, Language::Word('new password'), 'password_new1', Language::Word('only for password changing')); $res .= PairLabelAndPassword(4, 8, Language::Word('repeat new password'), 'password_new2', Language::Word('only for password changing')); } $res .= '</div>'; $res .= '</div>'; $res .= DialogInputsYesNo('edit', $_POST['type'], $_POST['id'], Language::Word('save'), Language::Word('cancel')); $res .= '</form>'; return $res; }
function PairLabelAndImage($labes_width, $img_width, $image_attrs, $label) { $res = ''; $res .= '<div class="row">'; $res .= '<div class="' . ColAllTypes($labes_width) . ' vcenter" align="right">'; $res .= '<b>' . $label . '</b>'; $res .= '</div>'; $res .= '<div class="' . ColAllTypes($img_width) . ' vcenter" align="center">'; $res .= '<img ' . $image_attrs . '>'; $res .= '</div>'; $res .= '</div>'; return $res; }