if ($i === $from || $i > $from && $projects[$i - 1]->direction_id != $project->direction_id) { if ($i != $from) { $content .= '<hr>'; } $content .= '<div align="left" style="padding: 15px; background-color: #eeeeee;">'; $content .= Language::Word('direction') . ': ' . Direction::FetchByID($project->direction_id)->LinkToThis(); $content .= '</div><hr>'; } $content .= $project->ToHTMLAutoShortForTable(GetUserPrivileges()); } } else { $content .= ToPageHeader(Language::Word('no projects'), 'h3', 'black'); } $header .= Language::PublicMenu('projects'); } } } else { //Manage articles $content .= MenuButton(Language::PublicMenu('articles'), $_SERVER['PHP_SELF'] . '?content_type=' . $content_types_short['articles']); //Manage directions $content .= MenuButton(Language::PublicMenu('directions'), $_SERVER['PHP_SELF'] . '?content_type=' . $content_types_short['directions']); //Manage projects $content .= MenuButton(Language::PublicMenu('projects'), $_SERVER['PHP_SELF'] . '?content_type=' . $content_types_short['projects']); } } $pagination = ''; if ($size) { require $link_to_pagination_show_template; $content .= $pagination; } include $link_to_public_template;
} $content .= '</tbody>'; $content .= '</table>'; $content .= '</div>'; $content .= '</div>'; } else { $content .= ToPageHeader(Language::Word('absense'), 'h3', 'black'); } $header .= ' :' . Language::PublicMenu('about_us'); } } } } $prev_page = $link_to_admin_manage_content; } else { //Manage articles $content .= MenuButton(Language::PublicMenu('articles'), $_SERVER['PHP_SELF'] . '?content_type=' . $content_types_short['articles'], 'btn-default', '', 'get'); //Manage directions $content .= MenuButton(Language::PublicMenu('directions'), $_SERVER['PHP_SELF'] . '?content_type=' . $content_types_short['directions'], 'btn-default', '', 'get'); //Manage projects $content .= MenuButton(Language::PublicMenu('projects'), $_SERVER['PHP_SELF'] . '?content_type=' . $content_types_short['projects'], 'btn-default', '', 'get'); if (GetUserPrivileges() === admin_user_id) { $content .= MenuButton(Language::PublicMenu('about_us'), $_SERVER['PHP_SELF'] . '?content_type=' . $content_types_short['about_us'], 'btn-default', '', 'get'); } } $pagination = ''; if ($size) { require $link_to_pagination_show_template; $content .= $pagination; } include $link_to_admin_template;
if ($content_type != 'all_reps') { $ids = ''; for ($i = 0, $cnt = count($target); $i < $cnt; ++$i) { $ids .= '(id = ' . $target[$i] . ')'; if ($i < $cnt - 1) { $ids .= ' OR'; } } $reports = Report::FetchBy(['where_addition' => $ids, 'limit' => $limit, 'offset' => $from, 'order_by' => 'id DESC']); } else { $reports = Report::FetchBy(['limit' => $limit, 'offset' => $from, 'order_by' => 'id DESC']); } for ($i = 0; $i < $limit; ++$i) { $content .= $reports[$i]->ToHTMLAutoShortForTable(GetUserPrivileges()); } $content .= '</tbody>'; $content .= '</table>'; $content .= '</div>'; $content .= '</div>'; require $link_to_pagination_show_template; $content .= $pagination; } else { $content .= ToPageHeader(Language::Word('absense'), "h3", "black"); } default: break; } } else { $content = MenuButton(Language::Word('reports'), $link_to_admin_bookkeeping . '?content_type=' . $content_types_short['reports'], 'btn-default', '', 'get'); } include_once $link_to_admin_template;
$is_public = false; include_once 'utility_lgmis_lib.php'; include_once $link_to_utility_authorization; $header = ''; $content = ''; $footer = ''; $on_start_page = true; $header .= Language::Word('main admin page'); $user = User::FetchBy(['select_list' => 'position', 'eq_conds' => ['id' => GetUserID()], 'is_unique' => true]); if (GetUserPrivileges() == admin_user_id) { //Manage staff $content .= MenuButton(Language::Word('staff management'), $link_to_admin_manage_staff, 'btn-default', '', 'get'); //Manage content $content .= MenuButton(Language::Word('content management'), $link_to_admin_manage_content, 'btn-default', '', 'get'); //Requests on register $content .= MenuButton(Language::Word('requests on register'), $link_to_admin_requests_on_register, 'btn-default', '', 'get'); } else { //Manage staff $content .= MenuButton(Language::Word('our collective'), $link_to_admin_manage_staff, 'btn-default', '', 'get'); //Manage content $content .= MenuButton(Language::Word('our content'), $link_to_admin_manage_content, 'btn-default', '', 'get'); } $content .= MenuButton(Language::Word('file manager'), $link_to_admin_file_manager, 'btn-default', '', 'get'); if ($user->GetPositionNum() != NotEmployeeNum) { $content .= MenuButton(Language::Word('bookkeeping'), $link_to_admin_bookkeeping, 'btn-default', '', 'get'); } include $link_to_admin_template; if ($need_to_show_timer) { echo 'secs: ' . (microtime(true) - $start_timer__); }