$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;
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; }