Example #1
0
$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;
}
$no_content_center = true;
include $link_to_public_template;
Example #2
0
                $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>';
                $title = Language::Word('language adding');
                $header = $title;
            }
        } else {
            if (!isset($_REQUEST['id'])) {
                echo 'user id is unset';
                exit;
            }
            $direction = Direction::FetchByID($_REQUEST['id']);
            $title = Language::Word('direction');
            $header = htmlspecialchars($direction->name);
            $content = $direction->ToHTMLAutoFull(GetUserPrivileges());
        }
    }
}
include_once $link_to_admin_template;
Example #3
0
    $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;
}
include $link_to_public_template;
Example #4
0
            $content .= 'allowedContent: true, });';
            $content .= 'CKEDITOR.config.height = 400;';
            $content .= '</script>';
            $content .= '<div class="row">';
            $content .= DialogInputsYesNo('edit', $_POST['type'], $ob_id, Language::Word('save'), Language::Word('cancel'));
            $content .= '</div>';
            $content .= '</form>';
            $title = Language::Word('report editing');
            $header = $title;
        }
    } else {
        if (!isset($_REQUEST['id'])) {
            echo 'user id is unset';
            exit;
        }
        $ob = Report::FetchBy(['eq_conds' => ['id' => $_REQUEST['id']], 'is_unique' => true]);
        $user_id = GetUserID();
        $user = User::FetchBy(['eq_conds' => ['id' => $user_id], 'is_unique' => true, 'select_list' => 'received_reports']);
        if ($user_id !== $ob->GetAuthorID() && !in_array($ob->GetID(), $user->GetReceivedReports()) && GetUserPrivileges() !== admin_user_id) {
            $content = AlertMessage('alert-danger', Language::Word('access denied'));
        } else {
            $title = '';
            $header = '';
            $content = '';
            $title = Language::Word('report');
            $header = htmlspecialchars($ob->GetName());
            $content = $ob->ToHTMLAutoFull(GetUserPrivileges());
        }
    }
}
include_once $link_to_admin_template;
Example #5
0
                $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=' . Project::$type . '&id=' . $id . '&add=add&glob_id=' . $project->id . '",';
                $content .= 'filebrowserImageBrowseUrl : "' . $link_to_img_browse . '?type=' . Project::$type . '&id=' . $project->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>';
                $title = Language::Word('language adding');
                $header = $title;
            }
        } else {
            if (!isset($_REQUEST['id'])) {
                echo 'user id is unset';
                exit;
            }
            $project = Project::FetchByID($_REQUEST['id']);
            $title = Language::Word('project');
            $header = htmlspecialchars($project->name);
            $content = $project->ToHTMLAutoFull(GetUserPrivileges());
        }
    }
}
include_once $link_to_admin_template;
Example #6
0
                 }
             }
             $size = count($projects);
             if ($size) {
                 require $link_to_pagination_init_template;
                 for ($i = $from; $i <= $to; ++$i) {
                     $project = $projects[$i];
                     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']);
 }
Example #7
0
                $content .= '<script>';
                $content .= 'CKEDITOR.replace("text_block",';
                $content .= '{ filebrowserImageUploadUrl: "' . $link_to_img_upload . '?type=' . TextPart::$type . '&id=' . $id . '&add=add&glob_id=' . $text_part->GetID() . '",';
                $content .= 'filebrowserImageBrowseUrl : "' . $link_to_img_browse . '?type=' . TextPart::$type . '&id=' . $text_part->GetID() . '&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>';
                $title = Language::Word('language adding');
                $header = $title;
            }
        } else {
            if (!isset($_REQUEST['id'])) {
                echo 'user id is unset';
                exit;
            }
            $text_part = TextPart::FetchByID($_REQUEST['id']);
            $title = '';
            $header = '';
            $content = '';
            $title = Language::Word('text block');
            $header = htmlspecialchars($text_part->GetName());
            $content = $text_part->ToHTMLAutoFull(GetUserPrivileges());
        }
    }
}
include_once $link_to_admin_template;
Example #8
0
                $content .= 'filebrowserImageBrowseUrl : "' . $link_to_img_browse . '?' . http_build_query($assoc) . '",';
                $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>';
            }
        } else {
            if (!isset($_REQUEST['full'])) {
                echo 'action_type is unset. Must be "full"';
                exit;
            }
            if (!isset($_REQUEST['type'])) {
                echo 'object type is unset. Must be "user"';
                exit;
            }
            if (!isset($_REQUEST['id'])) {
                echo 'user id is unset';
                exit;
            }
            $user_block = UserBlock::FetchByID($_REQUEST['id']);
            $title = Language::Word('user block');
            $header = htmlspecialchars($user_block->name);
            $content = $user_block->ToHTMLAutoFull(GetUserPrivileges());
        }
    }
}
include_once $link_to_admin_template;
Example #9
0
                        }
                        $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;
Example #10
0
 public function ToHTMLUserPrivateFull()
 {
     $res = '';
     $author = User::FetchBy(['eq_conds' => ['id' => $this->author_id], 'select_list' => 'id, name, surname, login', 'is_unique' => true]);
     $res .= '<div class="form-horizontal">';
     $res .= '<div class="row">';
     $res .= '<label class="' . ColAllTypes(3) . ' vcenter control-label">' . Language::Word('creating date') . '</label>';
     $res .= '<div class="' . ColAllTypes(5) . ' vcenter">';
     $res .= SimplePanel(date('d : m : Y - H : i', $this->creating_date));
     $res .= '</div>';
     $res .= '</div>';
     $res .= '<div class="row">';
     $res .= '<label class="' . ColAllTypes(3) . ' vcenter control-label">' . Language::Word('author') . '</label>';
     $res .= '<div class="' . ColAllTypes(5) . ' vcenter">';
     $res .= SimplePanel($author->LinkToThis());
     $res .= '</div>';
     $res .= '</div>';
     $res .= '<div class="row">';
     $res .= '<label class="' . ColAllTypes(3) . ' vcenter control-label">' . Language::Word('cover') . '</label>';
     $res .= '<div class="' . ColAllTypes(5) . ' vcenter">';
     $res .= '<img src="' . $this->path_to_image . '" class="img-article-cover">';
     $res .= '</div>';
     $res .= '</div>';
     $res .= '<hr>';
     $res .= '<div class="row" align="center">';
     $res .= '<label class="control-label">' . Language::Word('text') . '</label>';
     $res .= '</div>';
     $res .= '<div class="row" align="left">';
     $res .= '<div class="' . ColAllTypes(8) . ' ' . ColOffsetAllTypes(2) . '">';
     $res .= SimplePanel($this->text_block);
     $res .= '</div>';
     $res .= '</div>';
     $res .= '<div class="row">';
     if (GetUserLogin() == $author->GetLogin() || GetUserLogin() == 'admin') {
         $res .= '<div class="' . ColAllTypes(4) . '" align="right">';
         $res .= '<div class="margin-sm">' . $this->ToHTMLEdit() . '</div>';
         $res .= '</div>';
         $res .= '<div class="' . ColAllTypes(4) . '" align="center">';
         $res .= '<div class="margin-sm">' . $this->ToHTMLDel() . '</div>';
         $res .= '</div>';
         $res .= '<div class="' . ColAllTypes(4) . '" align="left">';
     } else {
         $res .= '<div class="' . ColAllTypes(12) . '" align="center">';
     }
     $res .= '<div class="margin-sm">' . $this->ToHTMLAddLanguage() . '</div>';
     $res .= '</div>';
     $res .= '</div>';
     $needed_projs = Project::FetchByDirectionID($this->id);
     $size = count($needed_projs);
     if ($size === 0) {
         return $res;
     }
     $page = 1;
     $cur_page = 1;
     $from = -1;
     $to = -1;
     global $link_to_pagination_init_template;
     require $link_to_pagination_init_template;
     $res .= '<hr>';
     $res .= '<div class="row">' . ToPageHeader(Language::Word('linked projects'), 'h3') . '</div>';
     $res .= '<div class="row">';
     $res .= '<div class="' . ColAllTypes(1) . ' center-block"></div>';
     $res .= '<div class="' . ColAllTypes(10) . ' center-block">';
     $res .= '<table class="table table-striped text-center">';
     $res .= '<thead>';
     $res .= '<tr>';
     $res .= '<th class="text-center" width="20%">' . Language::Word('direction') . '</th>';
     $res .= '<th class="text-center">' . Language::Word('object name') . '</th>';
     $res .= '<th class="text-center">' . Language::Word('date') . '</th>';
     $res .= '<th class="text-center">' . Language::Word('author') . '</th>';
     $res .= '<th class="text-center">' . Language::Word('actions') . '</th>';
     $res .= '</tr>';
     $res .= '</thead>';
     $res .= '<tbody>';
     for ($i = $from; $i <= $to; ++$i) {
         $res .= $needed_projs[$i]->ToHTMLAutoShortForTable(GetUserPrivileges());
     }
     $res .= '</tbody>';
     $res .= '</table>';
     $res .= '</div>';
     $res .= '</div>';
     $pagination = '';
     global $link_to_pagination_show_template;
     require $link_to_pagination_show_template;
     $res .= $pagination;
     return $res;
 }
    $content .= '<tr>';
    $content .= '<th class="text-center">' . Language::Word('full name') . '</th>';
    $content .= '<th class="text-center">' . Language::Word('date') . '</th>';
    $content .= '<th class="text-center">' . Language::Word('comment') . '</th>';
    $content .= '<th class="text-center">' . Language::Word('mail') . '</th>';
    $content .= '<th class="text-center">' . Language::Word('telephone') . '</th>';
    $content .= '<th class="text-center">' . Language::Word('actions') . '</th>';
    $content .= '</tr>';
    $content .= '</thead>';
    $content .= '<tbody>';
    $from = -1;
    $to = -1;
    require $link_to_pagination_init_template;
    for ($i = $from; $i <= $to; ++$i) {
        $request = $reg_requests[$i];
        if ($request == NULL) {
            echo 'error on ' . $i . '<br>';
        } else {
            $content .= $request->ToHTMLAutoShortForTable(GetUserPrivileges());
        }
    }
    $content .= '</tbody>';
    $content .= '</table>';
    $content .= '</div>';
    $pagination = '';
    require $link_to_pagination_show_template;
    $content .= $pagination;
} else {
    $content = ToPageHeader(Language::Word('absense'), "h3", "black");
}
include $link_to_admin_template;
Example #12
0
 public function GetLinkToEdit()
 {
     $click = 'editFile(' . $this->id . ');';
     $class = 'btn btn-default';
     $user_id = GetUserID();
     if ($user_id != $this->owner_id && GetUserPrivileges() != admin_user_id) {
         $class .= ' disabled';
         $click = '';
     }
     return '<a href="#" class="' . $class . '" onclick="' . $click . '">' . Language::ActionTypeToText('edit') . '</a>';
 }
Example #13
0
 public function ToHTMLPrivateFull()
 {
     global $user_blocks_in_db;
     global $link_to_admin_user_block;
     global $link_to_admin_bookkeeping;
     global $positions;
     $res = '';
     $res .= '<div class="row">';
     $res .= '<div class="' . ColAllTypes(1) . '"></div>';
     $res .= '<div class="' . ColAllTypes(5) . ' vcenter" align="right">';
     $res .= '<img src="' . $this->path_to_photo . '" class="img-rounded img-avatar">';
     $res .= '</div>';
     $res .= '<div class="' . ColAllTypes(5) . ' vcenter" align="left">';
     $res .= PairLabelAndPanel(2, 10, Language::Word('full name'), Language::Translit(htmlspecialchars($this->surname . ' ' . $this->name . ' ' . $this->fathername)));
     $res .= PairLabelAndPanel(2, 10, Language::Word('position'), htmlspecialchars(Language::Position($this->position)));
     $res .= PairLabelAndPanel(2, 10, Language::Word('mail'), htmlspecialchars($this->email));
     $res .= PairLabelAndPanel(2, 10, Language::Word('telephone'), htmlspecialchars($this->telephone));
     $res .= PairLabelAndPanel(2, 10, Language::Word('birthday'), htmlspecialchars($this->GetBirthday()));
     if (GetUserLogin() === $this->login || GetUserLogin() === 'admin') {
         $actions = '<div class="row">';
         $actions .= '<div class="' . ColAllTypes(6) . '">' . $this->ToHTMLDel() . '</div>';
         $actions .= '<div class="' . ColAllTypes(6) . '">' . $this->ToHTMLEdit() . '</div>';
         $actions .= '</div>';
         $res .= PairLabelAndPanel(2, 10, Language::Word('actions'), $actions);
     }
     $res .= '</div>';
     $res .= '</div>';
     if (GetUserLogin() === $this->login || GetUserLogin() === 'admin') {
         $res .= '<div class="row" align="center">';
         $res .= '<div class="' . ColAllTypes(1) . '"></div>';
         $res .= '<div class="' . ColAllTypes(10) . '">';
         $args = array('action_link' => $link_to_admin_user_block, 'action_type' => 'add', 'obj_type' => UserBlock::$type, 'id' => $this->id, 'btn_text' => Language::Word('add block'), 'btn_size' => 'btn-lg');
         $res .= '<span style="margin: 3px;">' . ActionButton($args) . '</span>';
         $res .= '</div>';
         $res .= '</div>';
     }
     $my_blocks = UserBlock::FetchAllByAuthorID($this->id);
     $size = count($my_blocks);
     if ($size === 0) {
         return $res;
     }
     $from = -1;
     $to = -1;
     global $link_to_pagination_init_template;
     require $link_to_pagination_init_template;
     for ($i = $from; $i <= $to; ++$i) {
         $res .= $my_blocks[$i]->ToHTMLAutoShortForTable(GetUserPrivileges());
     }
     $pagination = '';
     global $link_to_pagination_show_template;
     require $link_to_pagination_show_template;
     $res .= $pagination;
     return $res;
 }