示例#1
0
include_once 'utility_lgmis_lib.php';
include_once $link_to_utility_authorization;
clear_tmp_files_dir(MyFile::$type, 0);
$perms = MyFile::perm_to_only_empls;
$user = User::FetchBy(['select_list' => 'position', 'eq_conds' => ['id' => GetUserID()], 'is_unique' => true]);
if ($user->GetPositionNum() == NotEmployeeNum) {
    $perms = MyFile::perm_to_all_registered;
}
$header = '';
$content = '';
$footer = '';
if ($perms > MyFile::perm_to_all_registered) {
    $head_addition = '<script type="text/javascript" src="js/files_upload.js"></script>';
}
$head_addition .= '<script type="text/javascript" src="js/file_manager.js"></script>';
$head_addition .= MakeScript('files_type="' . MyFile::$type . '"; author_id=' . GetUserID() . '; max_files=10; files_action="add";');
$content .= '<div style="display: table; width: 100%; height: 80%;">';
$content .= '<div class="row" style="height: 100%; display: table-row;">';
$col_width = 8;
if ($perms <= MyFile::perm_to_all_registered) {
    $col_width = 12;
}
$content .= '<div class="' . ColAllTypes($col_width) . ' modal-open" style="border: 3px solid #dadada; display: table-cell; float: none;">';
$content .= '<ol class="breadcrumb" id="current_manager_path" align="left">';
$content .= '<li><a href="#" onclick="goUpDir(0);">Home</a></li>';
$content .= '</ol>';
$content .= '<div class="row" id="files_place"></div>';
$content .= '<div id="file_backdrop_area" align="center"></div>';
$content .= '</div>';
if ($perms > MyFile::perm_to_all_registered) {
    $content .= '<div id="files_area" class="' . ColAllTypes(4) . '" style="border: 3px dashed #dadada; display: table-cell; float: none;">';
示例#2
0
 $ob = Report::FetchBy(['eq_conds' => ['id' => $ob_id], 'is_unique' => true]);
 $receivers = User::FetchBy(['select_list' => 'id, name, surname', 'where_addition' => '(received_reports LIKE ("%\\"' . $ob_id . '\\"%"))']);
 $users = '';
 foreach ($receivers as $key => $user) {
     $users .= '<div class="row">';
     $users .= '<div class="' . ColAllTypes(12) . '">';
     $users .= $user->LinkToThis();
     $users .= '</div>';
     $users .= '</div>';
 }
 if (Error::IsError($ob)) {
     $content = AlertMessage('alert-danger', 'Error occured during fetching: ' . Error::ToString($ob));
 } else {
     $path_to_file = $ob->GetPathToFile();
     $author_id = GetUserID();
     $head_addition .= MakeScript('files_type = "' . Report::$type . '"; files_action = "edit"; owner_id = ' . $ob->GetID() . '; max_files = 1; author_id = ' . $author_id . ';');
     $content .= '<form method="post" action="' . $link_to_utility_sql_worker . '" enctype="multipart/form-data">';
     $content .= PairLabelAndPanel(4, 5, Language::Word('current receivers'), $users);
     $content .= '<div class="row">';
     $content .= '<div class="' . ColAllTypes(4) . ' vcenter" align="right">';
     $content .= '<b>' . Language::Word('change receivers') . '</b>';
     $content .= '</div>';
     $content .= '<div class="' . ColAllTypes(5) . ' vcenter" align="center">';
     $content .= '<div class="dropdown">';
     $content .= '<input onkeyup="showUsers(this);" placeholder="' . Language::Word('start to insert name') . '" class="form-control margin-sm dropdown-toggle" type="text" id="recipient_input" name="recipient_input" aria-haspopup="true" value="">';
     $content .= '<ul class="dropdown-menu" id="users_list">';
     $content .= '</ul>';
     $content .= '<input type="hidden" id="recipient_ids" name="recipient_ids" value="">';
     $content .= '<div style="font-size: 19px;" id="recipients"></div>';
     $content .= '</div>';
     $content .= '</div>';
示例#3
0
文件: index.php 项目: Gerold103/lgmis
$header = '';
$content = '';
$footer = '';
$size = 0;
$from = -1;
$to = -1;
$pages = -1;
$cur_page = -1;
$need_pagination = true;
$head_addition = '';
//----D I S P L A Y----
//----A R T I C L E S----
if (!isset($_GET['content_type']) || $_GET['content_type'] == $content_types_short['articles']) {
    $size = Article::FetchCountOf();
    if ($size) {
        $head_addition = MakeScript('window_bottom_callbacks.push(Article.WindowBottomCallback);');
        $need_pagination = false;
        require $link_to_pagination_init_template;
        $limit = $to - $from + 1;
        $articles = Article::FetchBy(['limit' => $limit, 'offset' => $from, 'order_by' => 'id DESC']);
        $content .= '<div onscroll="scrolled(this);" id="articles_list">';
        for ($i = 0; $i < $limit; ++$i) {
            $atricle = $articles[$i];
            $content .= '<div class="pbl_article">' . $atricle->ToHTMLAutoShortForTable(GetUserPrivileges()) . '</div>';
            if ($i != $to) {
                $content .= '<hr><div style="background-color: #eeeeee;"><br></div><hr>';
            }
        }
        $content .= '</div>';
    } else {
        $content .= ToPageHeader(Language::Word('no news'), "h3", "black");