mirror of
https://github.com/openvk/openvk
synced 2024-12-23 00:51:03 +03:00
Навигация AJAX
This commit is contained in:
parent
8ca3de8afa
commit
93466f6de4
15 changed files with 1066 additions and 459 deletions
|
@ -28,7 +28,12 @@ final class CommentPresenter extends OpenVKPresenter
|
|||
|
||||
if(!is_null($this->user)) $comment->toggleLike($this->user->identity);
|
||||
|
||||
$this->redirect($_SERVER["HTTP_REFERER"]);
|
||||
$currentUrl = $_SERVER["HTTP_REFERER"] ?? "/";
|
||||
$parsedUrl = parse_url($currentUrl);
|
||||
$queryParams = [];
|
||||
parse_str($parsedUrl['query'] ?? '', $queryParams);
|
||||
$queryParams['al'] = '1';
|
||||
$this->redirect("{$parsedUrl['scheme']}://{$parsedUrl['host']}{$parsedUrl['path']}?" . http_build_query($queryParams));
|
||||
}
|
||||
|
||||
function renderMakeComment(string $repo, int $eId): void
|
||||
|
|
|
@ -93,7 +93,7 @@ final class NotesPresenter extends OpenVKPresenter
|
|||
$note->setEdited(time());
|
||||
$note->save();
|
||||
|
||||
$this->redirect("/note" . $this->user->id . "_" . $note->getVirtualId());
|
||||
$this->redirect("/note" . $this->user->id . "_" . $note->getVirtualId() . "?al=1");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -121,7 +121,7 @@ final class NotesPresenter extends OpenVKPresenter
|
|||
$note->setEdited(time());
|
||||
$note->save();
|
||||
|
||||
$this->redirect("/note" . $this->user->id . "_" . $note->getVirtualId());
|
||||
$this->redirect("/note" . $this->user->id . "_" . $note->getVirtualId() . "?al=1");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -140,6 +140,6 @@ final class NotesPresenter extends OpenVKPresenter
|
|||
$name = $note->getName();
|
||||
$note->delete();
|
||||
$this->flash("succ", "Заметка удалена", "Заметка \"$name\" была успешно удалена.");
|
||||
$this->redirect("/notes" . $this->user->id);
|
||||
$this->redirect("/notes" . $this->user->id . "?al=1");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -61,7 +61,6 @@ abstract class OpenVKPresenter extends SimplePresenter
|
|||
} else {
|
||||
$this->flash($type, $title, $message, $code);
|
||||
$referer = $_SERVER["HTTP_REFERER"] ?? "/";
|
||||
|
||||
$this->redirect($referer);
|
||||
}
|
||||
}
|
||||
|
@ -277,6 +276,7 @@ abstract class OpenVKPresenter extends SimplePresenter
|
|||
}
|
||||
}
|
||||
|
||||
$this->template->__isAjax= $this->requestParam("al");
|
||||
parent::onStartup();
|
||||
}
|
||||
|
||||
|
|
|
@ -29,11 +29,11 @@ final class SearchPresenter extends OpenVKPresenter
|
|||
|
||||
function renderIndex(): void
|
||||
{
|
||||
$query = $this->queryParam("query") ?? "";
|
||||
$type = $this->queryParam("type") ?? "users";
|
||||
$sorter = $this->queryParam("sort") ?? "id";
|
||||
$invert = $this->queryParam("invert") == 1 ? "ASC" : "DESC";
|
||||
$page = (int) ($this->queryParam("p") ?? 1);
|
||||
$query = $this->requestParam("query") ?? "";
|
||||
$type = $this->requestParam("type") ?? "users";
|
||||
$sorter = $this->requestParam("sort") ?? "id";
|
||||
$invert = $this->requestParam("invert") == 1 ? "ASC" : "DESC";
|
||||
$page = (int) ($this->requestParam("p") ?? 1);
|
||||
|
||||
$this->willExecuteWriteAction();
|
||||
if($query != "")
|
||||
|
@ -66,27 +66,27 @@ final class SearchPresenter extends OpenVKPresenter
|
|||
}
|
||||
|
||||
$parameters = [
|
||||
"type" => $this->queryParam("type"),
|
||||
"city" => $this->queryParam("city") != "" ? $this->queryParam("city") : NULL,
|
||||
"maritalstatus" => $this->queryParam("maritalstatus") != 0 ? $this->queryParam("maritalstatus") : NULL,
|
||||
"with_photo" => $this->queryParam("with_photo"),
|
||||
"status" => $this->queryParam("status") != "" ? $this->queryParam("status") : NULL,
|
||||
"politViews" => $this->queryParam("politViews") != 0 ? $this->queryParam("politViews") : NULL,
|
||||
"email" => $this->queryParam("email"),
|
||||
"telegram" => $this->queryParam("telegram"),
|
||||
"site" => $this->queryParam("site") != "" ? "https://".$this->queryParam("site") : NULL,
|
||||
"address" => $this->queryParam("address"),
|
||||
"is_online" => $this->queryParam("is_online") == 1 ? 1 : NULL,
|
||||
"interests" => $this->queryParam("interests") != "" ? $this->queryParam("interests") : NULL,
|
||||
"fav_mus" => $this->queryParam("fav_mus") != "" ? $this->queryParam("fav_mus") : NULL,
|
||||
"fav_films" => $this->queryParam("fav_films") != "" ? $this->queryParam("fav_films") : NULL,
|
||||
"fav_shows" => $this->queryParam("fav_shows") != "" ? $this->queryParam("fav_shows") : NULL,
|
||||
"fav_books" => $this->queryParam("fav_books") != "" ? $this->queryParam("fav_books") : NULL,
|
||||
"fav_quote" => $this->queryParam("fav_quote") != "" ? $this->queryParam("fav_quote") : NULL,
|
||||
"hometown" => $this->queryParam("hometown") != "" ? $this->queryParam("hometown") : NULL,
|
||||
"before" => $this->queryParam("datebefore") != "" ? strtotime($this->queryParam("datebefore")) : NULL,
|
||||
"after" => $this->queryParam("dateafter") != "" ? strtotime($this->queryParam("dateafter")) : NULL,
|
||||
"gender" => $this->queryParam("gender") != "" && $this->queryParam("gender") != 2 ? $this->queryParam("gender") : NULL
|
||||
"type" => $this->requestParam("type"),
|
||||
"city" => $this->requestParam("city") != "" ? $this->requestParam("city") : NULL,
|
||||
"maritalstatus" => $this->requestParam("maritalstatus") != 0 ? $this->requestParam("maritalstatus") : NULL,
|
||||
"with_photo" => $this->requestParam("with_photo"),
|
||||
"status" => $this->requestParam("status") != "" ? $this->requestParam("status") : NULL,
|
||||
"politViews" => $this->requestParam("politViews") != 0 ? $this->requestParam("politViews") : NULL,
|
||||
"email" => $this->requestParam("email"),
|
||||
"telegram" => $this->requestParam("telegram"),
|
||||
"site" => $this->requestParam("site") != "" ? "https://".$this->requestParam("site") : NULL,
|
||||
"address" => $this->requestParam("address"),
|
||||
"is_online" => $this->requestParam("is_online") == 1 ? 1 : NULL,
|
||||
"interests" => $this->requestParam("interests") != "" ? $this->requestParam("interests") : NULL,
|
||||
"fav_mus" => $this->requestParam("fav_mus") != "" ? $this->requestParam("fav_mus") : NULL,
|
||||
"fav_films" => $this->requestParam("fav_films") != "" ? $this->requestParam("fav_films") : NULL,
|
||||
"fav_shows" => $this->requestParam("fav_shows") != "" ? $this->requestParam("fav_shows") : NULL,
|
||||
"fav_books" => $this->requestParam("fav_books") != "" ? $this->requestParam("fav_books") : NULL,
|
||||
"fav_quote" => $this->requestParam("fav_quote") != "" ? $this->requestParam("fav_quote") : NULL,
|
||||
"hometown" => $this->requestParam("hometown") != "" ? $this->requestParam("hometown") : NULL,
|
||||
"before" => $this->requestParam("datebefore") != "" ? strtotime($this->requestParam("datebefore")) : NULL,
|
||||
"after" => $this->requestParam("dateafter") != "" ? strtotime($this->requestParam("dateafter")) : NULL,
|
||||
"gender" => $this->requestParam("gender") != "" && $this->requestParam("gender") != 2 ? $this->requestParam("gender") : NULL
|
||||
];
|
||||
|
||||
$repo = $repos[$type] or $this->throwError(400, "Bad Request", "Invalid search entity $type.");
|
||||
|
|
|
@ -191,7 +191,7 @@ final class SupportPresenter extends OpenVKPresenter
|
|||
$comment->setCreated(time());
|
||||
$comment->save();
|
||||
|
||||
$this->redirect("/support/view/" . $id);
|
||||
$this->redirect("/support/view/" . $id . "?al=1");
|
||||
} else {
|
||||
$this->flashFail("err", tr("error"), tr("you_have_not_entered_text"));
|
||||
}
|
||||
|
@ -282,13 +282,21 @@ final class SupportPresenter extends OpenVKPresenter
|
|||
if($ticket->isDeleted())
|
||||
$this->notFound();
|
||||
|
||||
if(!($ticket->getUserId() === $this->user->id && $comment->getUType() === 0))
|
||||
$mode = "view";
|
||||
|
||||
if(!($ticket->getUserId() === $this->user->id && $comment->getUType() === 0)) {
|
||||
$this->assertPermission("openvk\Web\Models\Entities\TicketReply", "write", 0);
|
||||
$mode = "reply";
|
||||
}
|
||||
|
||||
$this->willExecuteWriteAction();
|
||||
|
||||
// $url = "/support/" . !($ticket->getUserId() === $this->user->id && $comment->getUType() === 0) ? "reply" : "view" . "/" . $comment->getTicket()->getId() . "?al=1";
|
||||
$url = "/support/$mode/" . $comment->getTicket()->getId() . "?al=1";
|
||||
$comment->delete();
|
||||
|
||||
$this->flashFail("succ", tr("ticket_changed"), tr("ticket_changed_comment"));
|
||||
$this->flash("succ", tr("ticket_changed"), tr("ticket_changed_comment"));
|
||||
$this->redirect($url);
|
||||
}
|
||||
|
||||
function renderRateAnswer(int $id, int $mark): void
|
||||
|
|
|
@ -382,7 +382,12 @@ final class WallPresenter extends OpenVKPresenter
|
|||
$post->toggleLike($this->user->identity);
|
||||
}
|
||||
|
||||
$this->redirect("$_SERVER[HTTP_REFERER]#postGarter=" . $post->getId());
|
||||
$currentUrl = $_SERVER["HTTP_REFERER"] ?? "/";
|
||||
$queryParams = [];
|
||||
parse_str(parse_url($currentUrl, PHP_URL_QUERY) ?? "", $queryParams);
|
||||
$queryParams['al'] = '1';
|
||||
$updatedUrl = strtok($currentUrl, '?') . '?' . http_build_query($queryParams);
|
||||
$this->redirect($updatedUrl);
|
||||
}
|
||||
|
||||
function renderShare(int $wall, int $post_id): void
|
||||
|
|
387
Web/Presenters/templates/@ajax.xml
Normal file
387
Web/Presenters/templates/@ajax.xml
Normal file
|
@ -0,0 +1,387 @@
|
|||
{var $instance_name = OPENVK_ROOT_CONF['openvk']['appearance']['name']}
|
||||
{if !isset($parentModule) || substr($parentModule, 0, 21) === 'libchandler:absolute.'}
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta n:ifset="$csrfToken" name="csrf" value="{$csrfToken}" />
|
||||
<title>{include title}</title>
|
||||
|
||||
{if $isTimezoned == NULL}
|
||||
{script "js/timezone.js"}
|
||||
{/if}
|
||||
|
||||
{ifset headIncludes}
|
||||
{include headIncludes}
|
||||
{/ifset}
|
||||
</head>
|
||||
<body>
|
||||
<div id="ajaxLoader"
|
||||
style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 9999;">
|
||||
<img id="ajaxLoaderImg" src="/assets/packages/static/openvk/img/loading_mini.gif"
|
||||
style="position: absolute; top: 40%; left: 50%; background: #4C4C4C; padding: 20px 30px; border-radius: 3px; opacity: 0.8;"/>
|
||||
</div>
|
||||
|
||||
<input type="hidden" id="__current_url" value="{=$_SERVER[REQUEST_URI]}" />
|
||||
<div id="sudo-banner" n:if="isset($thisUser) && $userTainted">
|
||||
<p>
|
||||
Вы вошли как <b>{$thisUser->getCanonicalName()}</b>. Пожалуйста, уважайте
|
||||
право на тайну переписки других людей и не злоупотребляйте подменой пользователя.
|
||||
Нажмите <a href="/setSID/unset?hash={rawurlencode($csrfToken)}">здесь</a>, чтобы выйти.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div n:if="OPENVK_ROOT_CONF['openvk']['preferences']['bellsAndWhistles']['testLabel']" id="test-label">FOR TESTING PURPOSES ONLY</div>
|
||||
|
||||
<div class="notifications_global_wrap"></div>
|
||||
<div class="dimmer"></div>
|
||||
|
||||
<div class="articleView">
|
||||
<a id="articleCloseButton" class="button" href="javascript:void(u('body').removeClass('article'));">{_close}</a>
|
||||
<div class="articleView_container">
|
||||
<div class="articleView_info">
|
||||
<div class="articleView_author">
|
||||
<img id="articleAuthorAva" src="" />
|
||||
<div>
|
||||
<span><a id="articleAuthorName"></a></span>
|
||||
<time id="articleTime"></time>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="articleView_link">
|
||||
<a id="articleLink" href="/" class="button">{_aw_legacy_ui}</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="articleView_text" id="articleText">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{if isset($backdrops) && !is_null($backdrops)}
|
||||
<div id="backdrop" style="background-image: url('{$backdrops[0]|noescape}'), url('{$backdrops[1]|noescape}');">
|
||||
<div id="backdropDripper"></div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<div class="toTop">
|
||||
⬆ {_to_top}
|
||||
</div>
|
||||
|
||||
<div class="layout">
|
||||
<div id="xhead" class="dm"></div>
|
||||
<div class="page_header{if $instance_name != OPENVK_DEFAULT_INSTANCE_NAME} page_custom_header{/if}">
|
||||
<a href="/" class="home_button{if $instance_name != OPENVK_DEFAULT_INSTANCE_NAME} home_button_custom{/if}" title="{$instance_name}">{if $instance_name != OPENVK_DEFAULT_INSTANCE_NAME}{$instance_name}{/if}</a>
|
||||
<div n:if="isset($thisUser) ? (!$thisUser->isBanned() XOR !$thisUser->isActivated()) : true" class="header_navigation">
|
||||
{ifset $thisUser}
|
||||
{if $thisUser->isDeactivated()}
|
||||
<div class="link">
|
||||
<a href="/logout?hash={urlencode($csrfToken)}">{_header_log_out}</a>
|
||||
</div>
|
||||
{else}
|
||||
<div class="link dec">
|
||||
<a href="/">{_header_home}</a>
|
||||
</div>
|
||||
<div class="link dec">
|
||||
<a href="/search?type=groups">{_header_groups}</a>
|
||||
</div>
|
||||
<div class="link dec">
|
||||
<a href="/search">{_header_search}</a>
|
||||
</div>
|
||||
<div class="link dec">
|
||||
<a href="/invite">{_header_invite}</a>
|
||||
</div>
|
||||
<div class="link dec">
|
||||
<a href="/support">{_header_help} <b n:if="$ticketAnsweredCount > 0">({$ticketAnsweredCount})</b></a>
|
||||
</div>
|
||||
<div class="link dec">
|
||||
<a href="/logout?hash={urlencode($csrfToken)}">{_header_log_out}</a>
|
||||
</div>
|
||||
{var $atSearch = str_contains($_SERVER['REQUEST_URI'], "/search")}
|
||||
<div id="srch" class="{if $atSearch}nodivider{else}link{/if}">
|
||||
|
||||
{if !$atSearch}
|
||||
<form action="/search" method="get" id="searcher" style="position:relative;">
|
||||
<input autocomplete="off" id="searchInput" oninput="checkSearchTips()" onfocus="expandSearch()" onblur="decreaseSearch()" class="sr" type="search" name="query" placeholder="{_header_search}" style="height: 20px;background: url('/assets/packages/static/openvk/img/search_icon.png') no-repeat 3px 4px; background-color: #fff; padding-left: 18px;width: 120px;" title="{_header_search} [Alt+Shift+F]" accesskey="f" />
|
||||
<select onchange="checkSearchTips()" id="typer" name="type" class="whatFind" style="display:none;top: 0px;">
|
||||
<option value="users">{_s_by_people}</option>
|
||||
<option value="groups">{_s_by_groups}</option>
|
||||
<option value="posts">{_s_by_posts}</option>
|
||||
<option value="comments">{_s_by_comments}</option>
|
||||
<option value="videos">{_s_by_videos}</option>
|
||||
<option value="apps">{_s_by_apps}</option>
|
||||
</select>
|
||||
</form>
|
||||
<div class="searchTips" id="srcht" hidden>
|
||||
<table style="border:none;border-spacing: 0;">
|
||||
<tbody id="srchrr">
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{else}
|
||||
<form action="/search" method="get" id="searcher" style="margin-top: -1px;position:relative;">
|
||||
<input id="searchInput" value="{$_GET['query'] ?? ''}" type="search" class="sr" name="query" placeholder="{_header_search}" style="height: 20px; background-color: #fff; padding-left: 6px;width: 555px;" title="{_header_search} [Alt+Shift+F]" accesskey="f" />
|
||||
<select name="type" class="whatFind">
|
||||
<option value="users" {if str_contains($_SERVER['REQUEST_URI'], "type=users")}selected{/if}>{_s_by_people}</option>
|
||||
<option value="groups" {if str_contains($_SERVER['REQUEST_URI'], "type=groups")}selected{/if}>{_s_by_groups}</option>
|
||||
<option value="posts" {if str_contains($_SERVER['REQUEST_URI'], "type=posts")}selected{/if}>{_s_by_posts}</option>
|
||||
<option value="comments" {if str_contains($_SERVER['REQUEST_URI'], "type=comments")}selected{/if}>{_s_by_comments}</option>
|
||||
<option value="videos" {if str_contains($_SERVER['REQUEST_URI'], "type=videos")}selected{/if}>{_s_by_videos}</option>
|
||||
<option value="apps" {if str_contains($_SERVER['REQUEST_URI'], "type=apps")}selected{/if}>{_s_by_apps}</option>
|
||||
</select>
|
||||
<button class="searchBtn"><span style="color:white;font-weight: 600;font-size:12px;">{_header_search}</span></button>
|
||||
</form>
|
||||
<script>
|
||||
let els = document.querySelectorAll("div.dec")
|
||||
for(const element of els)
|
||||
{
|
||||
element.style.display = "none"
|
||||
}
|
||||
</script>
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
{else}
|
||||
<div class="link">
|
||||
<a href="/login">{_header_login}</a>
|
||||
</div>
|
||||
<div class="link">
|
||||
<a href="/reg">{_header_registration}</a>
|
||||
</div>
|
||||
<div class="link">
|
||||
<a href="/support">{_header_help}</a>
|
||||
</div>
|
||||
{/ifset}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="sidebar">
|
||||
<div class="navigation">
|
||||
{ifset $thisUser}
|
||||
{if !$thisUser->isBanned() XOR !$thisUser->isActivated() XOR $thisUser->isDeactivated()}
|
||||
<a href="/edit" class="link edit-button">{_edit_button}</a>
|
||||
<a href="{$thisUser->getURL()}" class="link" title="{_my_page} [Alt+Shift+.]" accesskey=".">{_my_page}</a>
|
||||
<a href="/friends{$thisUser->getId()}" class="link">{_my_friends}
|
||||
<object type="internal/link" n:if="$thisUser->getFollowersCount() > 0">
|
||||
<a href="/friends{$thisUser->getId()}?act=incoming">
|
||||
(<b>{$thisUser->getFollowersCount()}</b>)
|
||||
</a>
|
||||
</object>
|
||||
</a>
|
||||
<a n:if="$thisUser->getLeftMenuItemStatus('photos')" href="/albums{$thisUser->getId()}" class="link">{_my_photos}</a>
|
||||
<a n:if="$thisUser->getLeftMenuItemStatus('videos')" href="/videos{$thisUser->getId()}" class="link">{_my_videos}</a>
|
||||
<a n:if="$thisUser->getLeftMenuItemStatus('messages')" href="/im" class="link">{_my_messages}
|
||||
<object type="internal/link" n:if="$thisUser->getUnreadMessagesCount() > 0">
|
||||
(<b>{$thisUser->getUnreadMessagesCount()}</b>)
|
||||
</object>
|
||||
</a>
|
||||
<a n:if="$thisUser->getLeftMenuItemStatus('notes')" href="/notes{$thisUser->getId()}" class="link">{_my_notes}</a>
|
||||
<a n:if="$thisUser->getLeftMenuItemStatus('groups')" href="/groups{$thisUser->getId()}" class="link">{_my_groups}</a>
|
||||
<a n:if="$thisUser->getLeftMenuItemStatus('news')" href="/feed" class="link" title="{_my_feed} [Alt+Shift+,]" accesskey=",">{_my_feed}</a>
|
||||
<a href="/notifications" class="link" title="{_my_feedback} [Alt+Shift+N]" accesskey="n">{_my_feedback}
|
||||
{if $thisUser->getNotificationsCount() > 0}
|
||||
(<b>{$thisUser->getNotificationsCount()}</b>)
|
||||
{/if}
|
||||
</a>
|
||||
<a href="/apps?act=installed" class="link">{_my_apps}</a>
|
||||
<a href="/settings" class="link">{_my_settings}</a>
|
||||
|
||||
{var $canAccessAdminPanel = $thisUser->getChandlerUser()->can("access")->model("admin")->whichBelongsTo(NULL)}
|
||||
{var $canAccessHelpdesk = $thisUser->getChandlerUser()->can("write")->model('openvk\Web\Models\Entities\TicketReply')->whichBelongsTo(0)}
|
||||
{var $menuLinksAvaiable = sizeof(OPENVK_ROOT_CONF['openvk']['preferences']['menu']['links']) > 0 && $thisUser->getLeftMenuItemStatus('links')}
|
||||
<div n:if="$canAccessAdminPanel || $canAccessHelpdesk || $menuLinksAvaiable" class="menu_divider"></div>
|
||||
<a href="/admin" class="link" n:if="$canAccessAdminPanel" title="{_admin} [Alt+Shift+A]" accesskey="a">{_admin}</a>
|
||||
<a href="/support/tickets" class="link" n:if="$canAccessHelpdesk">{_helpdesk}
|
||||
{if $helpdeskTicketNotAnsweredCount > 0}
|
||||
(<b>{$helpdeskTicketNotAnsweredCount}</b>)
|
||||
{/if}
|
||||
</a>
|
||||
|
||||
<a n:if="$thisUser->getLeftMenuItemStatus('links')" n:foreach="OPENVK_ROOT_CONF['openvk']['preferences']['menu']['links'] as $menuItem" href="{$menuItem['url']}" target="_blank" class="link">{strpos($menuItem["name"], "@") === 0 ? tr(substr($menuItem["name"], 1)) : $menuItem["name"]}</a>
|
||||
|
||||
<div id="_groupListPinnedGroups">
|
||||
<div n:if="$thisUser->getPinnedClubCount() > 0" class="menu_divider"></div>
|
||||
<a n:foreach="$thisUser->getPinnedClubs() as $club" href="{$club->getURL()}" class="link group_link">{$club->getName()}</a>
|
||||
</div>
|
||||
|
||||
<div n:if="OPENVK_ROOT_CONF['openvk']['preferences']['commerce'] && $thisUser->getCoins() != 0" id="votesBalance">
|
||||
{tr("you_still_have_x_points", $thisUser->getCoins())|noescape}
|
||||
<br /><br />
|
||||
|
||||
<a href="/settings?act=finance">{_top_up_your_account} »</a>
|
||||
</div>
|
||||
|
||||
<a n:if="OPENVK_ROOT_CONF['openvk']['preferences']['adPoster']['enable'] && $thisUser->getLeftMenuItemStatus('poster')" href="{php echo OPENVK_ROOT_CONF['openvk']['preferences']['adPoster']['link']}" >
|
||||
<img src="{php echo OPENVK_ROOT_CONF['openvk']['preferences']['adPoster']['src']}" alt="{php echo OPENVK_ROOT_CONF['openvk']['preferences']['adPoster']['caption']}" class="psa-poster" style="max-width: 100%; margin-top: 10px;" />
|
||||
</a>
|
||||
|
||||
<div class="floating_sidebar">
|
||||
<a id="minilink-friends" class="minilink" href="/friends{$thisUser->getId()}">
|
||||
<object type="internal/link" n:if="$thisUser->getFollowersCount() > 0">
|
||||
<div class="counter">
|
||||
+{$thisUser->getFollowersCount()}
|
||||
</div>
|
||||
</object>
|
||||
<img src="/assets/packages/static/openvk/img/friends.svg">
|
||||
</a>
|
||||
<a id="minilink-albums" class="minilink" href="/albums{$thisUser->getId()}">
|
||||
<img src="/assets/packages/static/openvk/img/photos.svg">
|
||||
</a>
|
||||
<a id="minilink-messenger" class="minilink" href="/im">
|
||||
<object type="internal/link" n:if="$thisUser->getUnreadMessagesCount() > 0">
|
||||
<div class="counter">
|
||||
+{$thisUser->getUnreadMessagesCount()}
|
||||
</div>
|
||||
</object>
|
||||
<img src="/assets/packages/static/openvk/img/messages.svg">
|
||||
</a>
|
||||
<a id="minilink-groups" class="minilink" href="/groups{$thisUser->getId()}">
|
||||
<img src="/assets/packages/static/openvk/img/groups.svg">
|
||||
</a>
|
||||
<a id="minilink-notifications" class="minilink" href="/notifications">
|
||||
<object type="internal/link" n:if="$thisUser->getNotificationsCount() > 0">
|
||||
<div class="counter">
|
||||
+{$thisUser->getNotificationsCount()}
|
||||
</div>
|
||||
</object>
|
||||
<img src="/assets/packages/static/openvk/img/feedback.svg">
|
||||
</a>
|
||||
</div>
|
||||
{elseif !$thisUser->isActivated()}
|
||||
<a href="/logout?hash={urlencode($csrfToken)}" class="link">{_menu_logout}</a>
|
||||
{else}
|
||||
<a href="/support" class="link">{_menu_support}
|
||||
{if $ticketAnsweredCount > 0}
|
||||
(<b>{$ticketAnsweredCount}</b>)
|
||||
{/if}
|
||||
</a>
|
||||
<a href="/logout?hash={urlencode($csrfToken)}" class="link">{_menu_logout}</a>
|
||||
{/if}
|
||||
{else}
|
||||
<form id="fastLogin" action="/login" method="POST" enctype="multipart/form-data">
|
||||
<label for="login"><span>{_email}:</span></label>
|
||||
<input id="login" type="text" name="login" required />
|
||||
<label for="password"><span>{_password}:</span></label>
|
||||
<input id="password" type="password" name="password" required />
|
||||
<input type="hidden" name="jReturnTo" value="{$_SERVER['REQUEST_URI']}" />
|
||||
<input type="hidden" name="hash" value="{$csrfToken}" />
|
||||
<input type="submit" value="{_log_in}" class="button" style="display: inline-block; font-family: Tahoma" />
|
||||
<a href="/reg"><input type="button" value="{_registration}" class="button" style="font-family: Tahoma" /></a><br><br>
|
||||
{if !OPENVK_ROOT_CONF['openvk']['preferences']['security']['disablePasswordRestoring']}<a href="/restore">{_forgot_password}</a>{/if}
|
||||
</form>
|
||||
{/ifset}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="page_body">
|
||||
<div id="wrapH">
|
||||
<div id="wrapHI">
|
||||
<div n:ifcontent class="page_yellowheader">
|
||||
{include header}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{ifset wrap}
|
||||
<div class="msg msg_{$flashMessage->type}" n:ifset="$flashMessage">
|
||||
<b>{$flashMessage->title}</b><br/>
|
||||
{$flashMessage->msg|noescape}
|
||||
</div>
|
||||
|
||||
{include wrap}
|
||||
{else}
|
||||
<div class="wrap2">
|
||||
<div class="wrap1">
|
||||
<div id="auth" class="page-wrap">
|
||||
<div class="page_content">
|
||||
<div class="msg msg_{$flashMessage->type}" n:ifset="$flashMessage">
|
||||
<b>{$flashMessage->title}</b><br/>
|
||||
{$flashMessage->msg|noescape}
|
||||
</div>
|
||||
|
||||
{include content}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/ifset}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="page_footer">
|
||||
{var $dbVersion = \Chandler\Database\DatabaseConnection::i()->getConnection()->getPdo()->getAttribute(\PDO::ATTR_SERVER_VERSION)}
|
||||
|
||||
<div class="navigation_footer">
|
||||
<a href="/about" class="link">{_footer_about_instance}</a>
|
||||
<a href="/terms" class="link">{_footer_rules}</a>
|
||||
<a href="/blog" class="link">{_footer_blog}</a>
|
||||
<a href="/support" class="link">{_footer_help}</a>
|
||||
<a href="/dev" target="_blank" class="link">{_footer_developers}</a>
|
||||
<a href="/privacy" class="link">{_footer_privacy}</a>
|
||||
</div>
|
||||
<p>
|
||||
{var $currentUrl = $_SERVER["REQUEST_URI"]}
|
||||
{foreach array_slice(getLanguages(), 0, 3) as $language}
|
||||
<a href="/language?lg={$language['code']}&hash={urlencode($csrfToken)}&jReturnTo={php echo rawurlencode($currentUrl)}" rel="nofollow" title="{$language['native_name']}" class="link">
|
||||
<img src="/assets/packages/static/openvk/img/flags/{$language['flag']}.gif" alt="{$language['native_name']}">
|
||||
</a>
|
||||
{/foreach}
|
||||
<a href="/language" class="link">all languages »</a>
|
||||
</p>
|
||||
<p>OpenVK <a href="/about:openvk">{php echo OPENVK_VERSION}</a> | PHP: {phpversion()} | DB: {$dbVersion}</p>
|
||||
<p n:ifcontent>
|
||||
{php echo OPENVK_ROOT_CONF["openvk"]["appearance"]["motd"]}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
{if OPENVK_ROOT_CONF['openvk']['preferences']['bellsAndWhistles']['fartscroll']}
|
||||
<script src="https://unpkg.com/fartscroll@1.0.0/fartscroll.js"></script>
|
||||
<script>
|
||||
fartscroll(400);
|
||||
</script>
|
||||
{/if}
|
||||
|
||||
<script>bsdnHydrate();</script>
|
||||
|
||||
<script n:if="OPENVK_ROOT_CONF['openvk']['telemetry']['plausible']['enable']" async defer data-domain="{php echo OPENVK_ROOT_CONF['openvk']['telemetry']['plausible']['domain']}" src="{php echo OPENVK_ROOT_CONF['openvk']['telemetry']['plausible']['server']}js/plausible.js"></script>
|
||||
|
||||
<script n:if="OPENVK_ROOT_CONF['openvk']['telemetry']['piwik']['enable']">
|
||||
{var $piwik = (object) OPENVK_ROOT_CONF['openvk']['telemetry']['piwik']}
|
||||
|
||||
//<![CDATA[
|
||||
(function(window,document,dataLayerName,id){
|
||||
window[dataLayerName]=window[dataLayerName]||[],window[dataLayerName].push({ start:(new Date).getTime(),event:"stg.start" });var scripts=document.getElementsByTagName('script')[0],tags=document.createElement('script');
|
||||
function stgCreateCookie(a,b,c){ var d="";if(c){ var e=new Date;e.setTime(e.getTime()+24*c*60*60*1e3),d=";expires="+e.toUTCString() }document.cookie=a+"="+b+d+";path=/" }
|
||||
var isStgDebug=(window.location.href.match("stg_debug")||document.cookie.match("stg_debug"))&&!window.location.href.match("stg_disable_debug");stgCreateCookie("stg_debug",isStgDebug?1:"",isStgDebug?14:-1);
|
||||
var qP=[];dataLayerName!=="dataLayer"&&qP.push("data_layer_name="+dataLayerName),isStgDebug&&qP.push("stg_debug");var qPString=qP.length>0?("?"+qP.join("&")):"";
|
||||
tags.async=!0,tags.src={$piwik->container . "/"}+id+".js"+qPString,scripts.parentNode.insertBefore(tags,scripts);
|
||||
!function(a,n,i){ a[n]=a[n]||{ };for(var c=0;c<i.length;c++)!function(i){ a[n][i]=a[n][i]||{ },a[n][i].api=a[n][i].api||function(){ var a=[].slice.call(arguments,0);"string"==typeof a[0]&&window[dataLayerName].push({ event:n+"."+i+":"+a[0],parameters:[].slice.call(arguments,1) }) } }(i[c]) }(window,"ppms",["tm","cm"]);
|
||||
})(window,document,{$piwik->layer}, {$piwik->site});
|
||||
//]]>
|
||||
</script>
|
||||
|
||||
<script n:if="OPENVK_ROOT_CONF['openvk']['telemetry']['matomo']['enable']">
|
||||
{var $matomo = (object) OPENVK_ROOT_CONF['openvk']['telemetry']['matomo']}
|
||||
//<![CDATA[
|
||||
var _paq = window._paq = window._paq || [];
|
||||
_paq.push(['trackPageView']);
|
||||
_paq.push(['enableLinkTracking']);
|
||||
(function() {
|
||||
var u="//" + {$matomo->container} + "/";
|
||||
_paq.push(['setTrackerUrl', u+'matomo.php']);
|
||||
_paq.push(['setSiteId', {$matomo->site}]);
|
||||
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
|
||||
g.type='text/javascript'; g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
|
||||
})();
|
||||
//]]>
|
||||
</script>
|
||||
|
||||
<script>initForms();</script>
|
||||
</body>
|
||||
</html>
|
||||
{/if}
|
||||
|
||||
{if isset($parentModule) && substr($parentModule, 0, 21) !== 'libchandler:absolute.'}
|
||||
<!-- INCLUDING TEMPLATE FROM PARENTMODULE: {$parentModule} -->
|
||||
|
||||
{include content}
|
||||
{/if}
|
|
@ -1,421 +1,436 @@
|
|||
{var $instance_name = OPENVK_ROOT_CONF['openvk']['appearance']['name']}
|
||||
{if !isset($parentModule) || substr($parentModule, 0, 21) === 'libchandler:absolute.'}
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>
|
||||
{ifset title}{include title} - {/ifset}{$instance_name}
|
||||
</title>
|
||||
<meta charset="utf-8" />
|
||||
<link rel="shortcut icon" href="/assets/packages/static/openvk/img/icon.ico" />
|
||||
<meta name="application-name" content="{$instance_name}" />
|
||||
<meta n:ifset="$csrfToken" name="csrf" value="{$csrfToken}" />
|
||||
{if $__isAjax}
|
||||
{include "@ajax.xml" with blocks}
|
||||
{else}
|
||||
{var $instance_name = OPENVK_ROOT_CONF['openvk']['appearance']['name']}
|
||||
{if !isset($parentModule) || substr($parentModule, 0, 21) === 'libchandler:absolute.'}
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>
|
||||
{ifset title}{include title} - {/ifset}{$instance_name}
|
||||
</title>
|
||||
<meta charset="utf-8" />
|
||||
<link rel="shortcut icon" href="/assets/packages/static/openvk/img/icon.ico" />
|
||||
<meta name="application-name" content="{$instance_name}" />
|
||||
<meta n:ifset="$csrfToken" name="csrf" value="{$csrfToken}" />
|
||||
|
||||
<script src="/language/{php echo getLanguage()}.js" crossorigin="anonymous"></script>
|
||||
{script "js/node_modules/jquery/dist/jquery.min.js"}
|
||||
{script "js/node_modules/umbrellajs/umbrella.min.js"}
|
||||
{script "js/l10n.js"}
|
||||
{script "js/openvk.cls.js"}
|
||||
<script src="/language/{php echo getLanguage()}.js" crossorigin="anonymous"></script>
|
||||
{script "js/node_modules/jquery/dist/jquery.min.js"}
|
||||
{script "js/node_modules/umbrellajs/umbrella.min.js"}
|
||||
{script "js/l10n.js"}
|
||||
{script "js/openvk.cls.js"}
|
||||
{script "js/st_manager.js"}
|
||||
|
||||
{css "js/node_modules/tippy.js/dist/backdrop.css"}
|
||||
{css "js/node_modules/tippy.js/dist/border.css"}
|
||||
{css "js/node_modules/tippy.js/dist/svg-arrow.css"}
|
||||
{css "js/node_modules/tippy.js/themes/light.css"}
|
||||
{script "js/node_modules/@popperjs/core/dist/umd/popper.min.js"}
|
||||
{script "js/node_modules/tippy.js/dist/tippy-bundle.umd.min.js"}
|
||||
{script "js/node_modules/handlebars/dist/handlebars.min.js"}
|
||||
{css "js/node_modules/tippy.js/dist/backdrop.css"}
|
||||
{css "js/node_modules/tippy.js/dist/border.css"}
|
||||
{css "js/node_modules/tippy.js/dist/svg-arrow.css"}
|
||||
{css "js/node_modules/tippy.js/themes/light.css"}
|
||||
{script "js/node_modules/@popperjs/core/dist/umd/popper.min.js"}
|
||||
{script "js/node_modules/tippy.js/dist/tippy-bundle.umd.min.js"}
|
||||
{script "js/node_modules/handlebars/dist/handlebars.min.js"}
|
||||
|
||||
{if $isTimezoned == NULL}
|
||||
{script "js/timezone.js"}
|
||||
{/if}
|
||||
{if $isTimezoned == NULL}
|
||||
{script "js/timezone.js"}
|
||||
{/if}
|
||||
|
||||
{include "_includeCSS.xml"}
|
||||
{include "_includeCSS.xml"}
|
||||
|
||||
{ifset headIncludes}
|
||||
{include headIncludes}
|
||||
{/ifset}
|
||||
</head>
|
||||
<body>
|
||||
<div id="sudo-banner" n:if="isset($thisUser) && $userTainted">
|
||||
<p>
|
||||
Вы вошли как <b>{$thisUser->getCanonicalName()}</b>. Пожалуйста, уважайте
|
||||
право на тайну переписки других людей и не злоупотребляйте подменой пользователя.
|
||||
Нажмите <a href="/setSID/unset?hash={rawurlencode($csrfToken)}">здесь</a>, чтобы выйти.
|
||||
</p>
|
||||
</div>
|
||||
{ifset headIncludes}
|
||||
{include headIncludes}
|
||||
{/ifset}
|
||||
</head>
|
||||
<body>
|
||||
<div id="bodyContent">
|
||||
<div id="ajaxLoader"
|
||||
style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: none; z-index: 9999;">
|
||||
<img id="ajaxLoaderImg" src="/assets/packages/static/openvk/img/loading_mini.gif"
|
||||
style="position: absolute; top: 40%; left: 50%; background: #4C4C4C; padding: 20px 30px; border-radius: 3px; opacity: 0.8;"/>
|
||||
</div>
|
||||
<div id="sudo-banner" n:if="isset($thisUser) && $userTainted">
|
||||
<p>
|
||||
Вы вошли как <b>{$thisUser->getCanonicalName()}</b>. Пожалуйста, уважайте
|
||||
право на тайну переписки других людей и не злоупотребляйте подменой пользователя.
|
||||
Нажмите <a href="/setSID/unset?hash={rawurlencode($csrfToken)}">здесь</a>, чтобы выйти.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div n:if="OPENVK_ROOT_CONF['openvk']['preferences']['bellsAndWhistles']['testLabel']" id="test-label">FOR TESTING PURPOSES ONLY</div>
|
||||
<div n:if="OPENVK_ROOT_CONF['openvk']['preferences']['bellsAndWhistles']['testLabel']" id="test-label">FOR TESTING PURPOSES ONLY</div>
|
||||
|
||||
<div class="notifications_global_wrap"></div>
|
||||
<div class="dimmer"></div>
|
||||
<div class="notifications_global_wrap"></div>
|
||||
<div class="dimmer"></div>
|
||||
|
||||
<div class="articleView">
|
||||
<a id="articleCloseButton" class="button" href="javascript:void(u('body').removeClass('article'));">{_close}</a>
|
||||
<div class="articleView_container">
|
||||
<div class="articleView_info">
|
||||
<div class="articleView_author">
|
||||
<img id="articleAuthorAva" src="" />
|
||||
<div>
|
||||
<span><a id="articleAuthorName"></a></span>
|
||||
<time id="articleTime"></time>
|
||||
<div class="articleView">
|
||||
<a id="articleCloseButton" class="button" href="javascript:void(u('body').removeClass('article'));">{_close}</a>
|
||||
<div class="articleView_container">
|
||||
<div class="articleView_info">
|
||||
<div class="articleView_author">
|
||||
<img id="articleAuthorAva" src="" />
|
||||
<div>
|
||||
<span><a id="articleAuthorName"></a></span>
|
||||
<time id="articleTime"></time>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="articleView_link">
|
||||
<a id="articleLink" href="/" class="button">{_aw_legacy_ui}</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="articleView_link">
|
||||
<a id="articleLink" href="/" class="button">{_aw_legacy_ui}</a>
|
||||
<div class="articleView_text" id="articleText">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="articleView_text" id="articleText">
|
||||
{if isset($backdrops) && !is_null($backdrops)}
|
||||
<div id="backdrop" style="background-image: url('{$backdrops[0]|noescape}'), url('{$backdrops[1]|noescape}');">
|
||||
<div id="backdropDripper"></div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<div class="toTop">
|
||||
⬆ {_to_top}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{if isset($backdrops) && !is_null($backdrops)}
|
||||
<div id="backdrop" style="background-image: url('{$backdrops[0]|noescape}'), url('{$backdrops[1]|noescape}');">
|
||||
<div id="backdropDripper"></div>
|
||||
</div>
|
||||
{/if}
|
||||
<div class="layout">
|
||||
<div id="xhead" class="dm"></div>
|
||||
<div class="page_header{if $instance_name != OPENVK_DEFAULT_INSTANCE_NAME} page_custom_header{/if}">
|
||||
<a href="/" class="home_button{if $instance_name != OPENVK_DEFAULT_INSTANCE_NAME} home_button_custom{/if}" title="{$instance_name}">{if $instance_name != OPENVK_DEFAULT_INSTANCE_NAME}{$instance_name}{/if}</a>
|
||||
<div n:if="isset($thisUser) ? (!$thisUser->isBanned() XOR !$thisUser->isActivated()) : true" class="header_navigation">
|
||||
{ifset $thisUser}
|
||||
{if $thisUser->isDeactivated()}
|
||||
<div class="link">
|
||||
<a href="/logout?hash={urlencode($csrfToken)}">{_header_log_out}</a>
|
||||
</div>
|
||||
{else}
|
||||
<div class="link dec">
|
||||
<a href="/">{_header_home}</a>
|
||||
</div>
|
||||
<div class="link dec">
|
||||
<a href="/search?type=groups">{_header_groups}</a>
|
||||
</div>
|
||||
<div class="link dec">
|
||||
<a href="/search">{_header_search}</a>
|
||||
</div>
|
||||
<div class="link dec">
|
||||
<a href="/invite">{_header_invite}</a>
|
||||
</div>
|
||||
<div class="link dec">
|
||||
<a href="/support">{_header_help} <b n:if="$ticketAnsweredCount > 0">({$ticketAnsweredCount})</b></a>
|
||||
</div>
|
||||
<div class="link dec">
|
||||
<a href="/logout?hash={urlencode($csrfToken)}">{_header_log_out}</a>
|
||||
</div>
|
||||
{var $atSearch = str_contains($_SERVER['REQUEST_URI'], "/search")}
|
||||
<div id="srch" class="{if $atSearch}nodivider{else}link{/if}">
|
||||
|
||||
<div class="toTop">
|
||||
⬆ {_to_top}
|
||||
</div>
|
||||
|
||||
<div class="layout">
|
||||
<div id="xhead" class="dm"></div>
|
||||
<div class="page_header{if $instance_name != OPENVK_DEFAULT_INSTANCE_NAME} page_custom_header{/if}">
|
||||
<a href="/" class="home_button{if $instance_name != OPENVK_DEFAULT_INSTANCE_NAME} home_button_custom{/if}" title="{$instance_name}">{if $instance_name != OPENVK_DEFAULT_INSTANCE_NAME}{$instance_name}{/if}</a>
|
||||
<div n:if="isset($thisUser) ? (!$thisUser->isBanned() XOR !$thisUser->isActivated()) : true" class="header_navigation">
|
||||
{ifset $thisUser}
|
||||
{if $thisUser->isDeactivated()}
|
||||
{if !$atSearch}
|
||||
<form action="/search" method="get" id="searcher" style="position:relative;">
|
||||
<input autocomplete="off" id="searchInput" oninput="checkSearchTips()" onfocus="expandSearch()" onblur="decreaseSearch()" class="sr" type="search" name="query" placeholder="{_header_search}" style="height: 20px;background: url('/assets/packages/static/openvk/img/search_icon.png') no-repeat 3px 4px; background-color: #fff; padding-left: 18px;width: 120px;" title="{_header_search} [Alt+Shift+F]" accesskey="f" />
|
||||
<select onchange="checkSearchTips()" id="typer" name="type" class="whatFind" style="display:none;top: 0px;">
|
||||
<option value="users">{_s_by_people}</option>
|
||||
<option value="groups">{_s_by_groups}</option>
|
||||
<option value="posts">{_s_by_posts}</option>
|
||||
<option value="comments">{_s_by_comments}</option>
|
||||
<option value="videos">{_s_by_videos}</option>
|
||||
<option value="apps">{_s_by_apps}</option>
|
||||
</select>
|
||||
</form>
|
||||
<div class="searchTips" id="srcht" hidden>
|
||||
<table style="border:none;border-spacing: 0;">
|
||||
<tbody id="srchrr">
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{else}
|
||||
<form action="/search" method="get" id="searcher" style="margin-top: -1px;position:relative;">
|
||||
<input id="searchInput" value="{$_GET['query'] ?? ''}" type="search" class="sr" name="query" placeholder="{_header_search}" style="height: 20px; background-color: #fff; padding-left: 6px;width: 555px;" title="{_header_search} [Alt+Shift+F]" accesskey="f" />
|
||||
<select name="type" class="whatFind">
|
||||
<option value="users" {if str_contains($_SERVER['REQUEST_URI'], "type=users")}selected{/if}>{_s_by_people}</option>
|
||||
<option value="groups" {if str_contains($_SERVER['REQUEST_URI'], "type=groups")}selected{/if}>{_s_by_groups}</option>
|
||||
<option value="posts" {if str_contains($_SERVER['REQUEST_URI'], "type=posts")}selected{/if}>{_s_by_posts}</option>
|
||||
<option value="comments" {if str_contains($_SERVER['REQUEST_URI'], "type=comments")}selected{/if}>{_s_by_comments}</option>
|
||||
<option value="videos" {if str_contains($_SERVER['REQUEST_URI'], "type=videos")}selected{/if}>{_s_by_videos}</option>
|
||||
<option value="apps" {if str_contains($_SERVER['REQUEST_URI'], "type=apps")}selected{/if}>{_s_by_apps}</option>
|
||||
</select>
|
||||
<button class="searchBtn"><span style="color:white;font-weight: 600;font-size:12px;">{_header_search}</span></button>
|
||||
</form>
|
||||
<script>
|
||||
let els = document.querySelectorAll("div.dec")
|
||||
for(const element of els)
|
||||
{
|
||||
element.style.display = "none"
|
||||
}
|
||||
</script>
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
{else}
|
||||
<div class="link">
|
||||
<a href="/logout?hash={urlencode($csrfToken)}">{_header_log_out}</a>
|
||||
<a href="/login">{_header_login}</a>
|
||||
</div>
|
||||
{else}
|
||||
<div class="link dec">
|
||||
<a href="/">{_header_home}</a>
|
||||
<div class="link">
|
||||
<a href="/reg">{_header_registration}</a>
|
||||
</div>
|
||||
<div class="link dec">
|
||||
<a href="/search?type=groups">{_header_groups}</a>
|
||||
<div class="link">
|
||||
<a href="/support">{_header_help}</a>
|
||||
</div>
|
||||
<div class="link dec">
|
||||
<a href="/search">{_header_search}</a>
|
||||
</div>
|
||||
<div class="link dec">
|
||||
<a href="/invite">{_header_invite}</a>
|
||||
</div>
|
||||
<div class="link dec">
|
||||
<a href="/support">{_header_help} <b n:if="$ticketAnsweredCount > 0">({$ticketAnsweredCount})</b></a>
|
||||
</div>
|
||||
<div class="link dec">
|
||||
<a href="/logout?hash={urlencode($csrfToken)}">{_header_log_out}</a>
|
||||
</div>
|
||||
{var $atSearch = str_contains($_SERVER['REQUEST_URI'], "/search")}
|
||||
<div id="srch" class="{if $atSearch}nodivider{else}link{/if}">
|
||||
|
||||
{if !$atSearch}
|
||||
<form action="/search" method="get" id="searcher" style="position:relative;">
|
||||
<input autocomplete="off" id="searchInput" oninput="checkSearchTips()" onfocus="expandSearch()" onblur="decreaseSearch()" class="sr" type="search" name="query" placeholder="{_header_search}" style="height: 20px;background: url('/assets/packages/static/openvk/img/search_icon.png') no-repeat 3px 4px; background-color: #fff; padding-left: 18px;width: 120px;" title="{_header_search} [Alt+Shift+F]" accesskey="f" />
|
||||
<select onchange="checkSearchTips()" id="typer" name="type" class="whatFind" style="display:none;top: 0px;">
|
||||
<option value="users">{_s_by_people}</option>
|
||||
<option value="groups">{_s_by_groups}</option>
|
||||
<option value="posts">{_s_by_posts}</option>
|
||||
<option value="comments">{_s_by_comments}</option>
|
||||
<option value="videos">{_s_by_videos}</option>
|
||||
<option value="apps">{_s_by_apps}</option>
|
||||
</select>
|
||||
</form>
|
||||
<div class="searchTips" id="srcht" hidden>
|
||||
<table style="border:none;border-spacing: 0;">
|
||||
<tbody id="srchrr">
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{else}
|
||||
<form action="/search" method="get" id="searcher" style="margin-top: -1px;position:relative;">
|
||||
<input id="searchInput" value="{$_GET['query'] ?? ''}" type="search" class="sr" name="query" placeholder="{_header_search}" style="height: 20px; background-color: #fff; padding-left: 6px;width: 555px;" title="{_header_search} [Alt+Shift+F]" accesskey="f" />
|
||||
<select name="type" class="whatFind">
|
||||
<option value="users" {if str_contains($_SERVER['REQUEST_URI'], "type=users")}selected{/if}>{_s_by_people}</option>
|
||||
<option value="groups" {if str_contains($_SERVER['REQUEST_URI'], "type=groups")}selected{/if}>{_s_by_groups}</option>
|
||||
<option value="posts" {if str_contains($_SERVER['REQUEST_URI'], "type=posts")}selected{/if}>{_s_by_posts}</option>
|
||||
<option value="comments" {if str_contains($_SERVER['REQUEST_URI'], "type=comments")}selected{/if}>{_s_by_comments}</option>
|
||||
<option value="videos" {if str_contains($_SERVER['REQUEST_URI'], "type=videos")}selected{/if}>{_s_by_videos}</option>
|
||||
<option value="apps" {if str_contains($_SERVER['REQUEST_URI'], "type=apps")}selected{/if}>{_s_by_apps}</option>
|
||||
</select>
|
||||
<button class="searchBtn"><span style="color:white;font-weight: 600;font-size:12px;">{_header_search}</span></button>
|
||||
</form>
|
||||
<script>
|
||||
let els = document.querySelectorAll("div.dec")
|
||||
for(const element of els)
|
||||
{
|
||||
element.style.display = "none"
|
||||
}
|
||||
</script>
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
{else}
|
||||
<div class="link">
|
||||
<a href="/login">{_header_login}</a>
|
||||
</div>
|
||||
<div class="link">
|
||||
<a href="/reg">{_header_registration}</a>
|
||||
</div>
|
||||
<div class="link">
|
||||
<a href="/support">{_header_help}</a>
|
||||
</div>
|
||||
{/ifset}
|
||||
{/ifset}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="sidebar">
|
||||
<div class="navigation">
|
||||
{ifset $thisUser}
|
||||
{if !$thisUser->isBanned() XOR !$thisUser->isActivated() XOR $thisUser->isDeactivated()}
|
||||
<a href="/edit" class="link edit-button">{_edit_button}</a>
|
||||
<a href="{$thisUser->getURL()}" class="link" title="{_my_page} [Alt+Shift+.]" accesskey=".">{_my_page}</a>
|
||||
<a href="/friends{$thisUser->getId()}" class="link">{_my_friends}
|
||||
<object type="internal/link" n:if="$thisUser->getFollowersCount() > 0">
|
||||
<a href="/friends{$thisUser->getId()}?act=incoming">
|
||||
(<b>{$thisUser->getFollowersCount()}</b>)
|
||||
</a>
|
||||
</object>
|
||||
</a>
|
||||
<a n:if="$thisUser->getLeftMenuItemStatus('photos')" href="/albums{$thisUser->getId()}" class="link">{_my_photos}</a>
|
||||
<a n:if="$thisUser->getLeftMenuItemStatus('videos')" href="/videos{$thisUser->getId()}" class="link">{_my_videos}</a>
|
||||
<a n:if="$thisUser->getLeftMenuItemStatus('messages')" href="/im" class="link">{_my_messages}
|
||||
<object type="internal/link" n:if="$thisUser->getUnreadMessagesCount() > 0">
|
||||
(<b>{$thisUser->getUnreadMessagesCount()}</b>)
|
||||
</object>
|
||||
</a>
|
||||
<a n:if="$thisUser->getLeftMenuItemStatus('notes')" href="/notes{$thisUser->getId()}" class="link">{_my_notes}</a>
|
||||
<a n:if="$thisUser->getLeftMenuItemStatus('groups')" href="/groups{$thisUser->getId()}" class="link">{_my_groups}</a>
|
||||
<a n:if="$thisUser->getLeftMenuItemStatus('news')" href="/feed" class="link" title="{_my_feed} [Alt+Shift+,]" accesskey=",">{_my_feed}</a>
|
||||
<a href="/notifications" class="link" title="{_my_feedback} [Alt+Shift+N]" accesskey="n">{_my_feedback}
|
||||
{if $thisUser->getNotificationsCount() > 0}
|
||||
(<b>{$thisUser->getNotificationsCount()}</b>)
|
||||
{/if}
|
||||
</a>
|
||||
<a href="/apps?act=installed" class="link">{_my_apps}</a>
|
||||
<a href="/settings" class="link">{_my_settings}</a>
|
||||
|
||||
{var $canAccessAdminPanel = $thisUser->getChandlerUser()->can("access")->model("admin")->whichBelongsTo(NULL)}
|
||||
{var $canAccessHelpdesk = $thisUser->getChandlerUser()->can("write")->model('openvk\Web\Models\Entities\TicketReply')->whichBelongsTo(0)}
|
||||
{var $menuLinksAvaiable = sizeof(OPENVK_ROOT_CONF['openvk']['preferences']['menu']['links']) > 0 && $thisUser->getLeftMenuItemStatus('links')}
|
||||
<div n:if="$canAccessAdminPanel || $canAccessHelpdesk || $menuLinksAvaiable" class="menu_divider"></div>
|
||||
<a href="/admin" class="link" n:if="$canAccessAdminPanel" title="{_admin} [Alt+Shift+A]" accesskey="a">{_admin}</a>
|
||||
<a href="/support/tickets" class="link" n:if="$canAccessHelpdesk">{_helpdesk}
|
||||
{if $helpdeskTicketNotAnsweredCount > 0}
|
||||
(<b>{$helpdeskTicketNotAnsweredCount}</b>)
|
||||
{/if}
|
||||
</a>
|
||||
|
||||
<a n:if="$thisUser->getLeftMenuItemStatus('links')" n:foreach="OPENVK_ROOT_CONF['openvk']['preferences']['menu']['links'] as $menuItem" href="{$menuItem['url']}" target="_blank" class="link">{strpos($menuItem["name"], "@") === 0 ? tr(substr($menuItem["name"], 1)) : $menuItem["name"]}</a>
|
||||
|
||||
<div id="_groupListPinnedGroups">
|
||||
<div n:if="$thisUser->getPinnedClubCount() > 0" class="menu_divider"></div>
|
||||
<a n:foreach="$thisUser->getPinnedClubs() as $club" href="{$club->getURL()}" class="link group_link">{$club->getName()}</a>
|
||||
</div>
|
||||
|
||||
<div n:if="OPENVK_ROOT_CONF['openvk']['preferences']['commerce'] && $thisUser->getCoins() != 0" id="votesBalance">
|
||||
{tr("you_still_have_x_points", $thisUser->getCoins())|noescape}
|
||||
<br /><br />
|
||||
|
||||
<a href="/settings?act=finance">{_top_up_your_account} »</a>
|
||||
</div>
|
||||
|
||||
<a n:if="OPENVK_ROOT_CONF['openvk']['preferences']['adPoster']['enable'] && $thisUser->getLeftMenuItemStatus('poster')" href="{php echo OPENVK_ROOT_CONF['openvk']['preferences']['adPoster']['link']}" >
|
||||
<img src="{php echo OPENVK_ROOT_CONF['openvk']['preferences']['adPoster']['src']}" alt="{php echo OPENVK_ROOT_CONF['openvk']['preferences']['adPoster']['caption']}" class="psa-poster" style="max-width: 100%; margin-top: 10px;" />
|
||||
</a>
|
||||
|
||||
<div class="floating_sidebar">
|
||||
<a id="minilink-friends" class="minilink" href="/friends{$thisUser->getId()}">
|
||||
<div class="sidebar">
|
||||
<div class="navigation">
|
||||
{ifset $thisUser}
|
||||
{if !$thisUser->isBanned() XOR !$thisUser->isActivated() XOR $thisUser->isDeactivated()}
|
||||
<a href="/edit" class="link edit-button">{_edit_button}</a>
|
||||
<a href="{$thisUser->getURL()}" class="link" title="{_my_page} [Alt+Shift+.]" accesskey=".">{_my_page}</a>
|
||||
<a href="/friends{$thisUser->getId()}" class="link">{_my_friends}
|
||||
<object type="internal/link" n:if="$thisUser->getFollowersCount() > 0">
|
||||
<div class="counter">
|
||||
+{$thisUser->getFollowersCount()}
|
||||
</div>
|
||||
<a href="/friends{$thisUser->getId()}?act=incoming">
|
||||
(<b>{$thisUser->getFollowersCount()}</b>)
|
||||
</a>
|
||||
</object>
|
||||
<img src="/assets/packages/static/openvk/img/friends.svg">
|
||||
</a>
|
||||
<a id="minilink-albums" class="minilink" href="/albums{$thisUser->getId()}">
|
||||
<img src="/assets/packages/static/openvk/img/photos.svg">
|
||||
</a>
|
||||
<a id="minilink-messenger" class="minilink" href="/im">
|
||||
<a n:if="$thisUser->getLeftMenuItemStatus('photos')" href="/albums{$thisUser->getId()}" class="link">{_my_photos}</a>
|
||||
<a n:if="$thisUser->getLeftMenuItemStatus('videos')" href="/videos{$thisUser->getId()}" class="link">{_my_videos}</a>
|
||||
<a n:if="$thisUser->getLeftMenuItemStatus('messages')" href="/im" class="link">{_my_messages}
|
||||
<object type="internal/link" n:if="$thisUser->getUnreadMessagesCount() > 0">
|
||||
<div class="counter">
|
||||
+{$thisUser->getUnreadMessagesCount()}
|
||||
</div>
|
||||
(<b>{$thisUser->getUnreadMessagesCount()}</b>)
|
||||
</object>
|
||||
<img src="/assets/packages/static/openvk/img/messages.svg">
|
||||
</a>
|
||||
<a id="minilink-groups" class="minilink" href="/groups{$thisUser->getId()}">
|
||||
<img src="/assets/packages/static/openvk/img/groups.svg">
|
||||
<a n:if="$thisUser->getLeftMenuItemStatus('notes')" href="/notes{$thisUser->getId()}" class="link">{_my_notes}</a>
|
||||
<a n:if="$thisUser->getLeftMenuItemStatus('groups')" href="/groups{$thisUser->getId()}" class="link">{_my_groups}</a>
|
||||
<a n:if="$thisUser->getLeftMenuItemStatus('news')" href="/feed" class="link" title="{_my_feed} [Alt+Shift+,]" accesskey=",">{_my_feed}</a>
|
||||
<a href="/notifications" class="link" title="{_my_feedback} [Alt+Shift+N]" accesskey="n">{_my_feedback}
|
||||
{if $thisUser->getNotificationsCount() > 0}
|
||||
(<b>{$thisUser->getNotificationsCount()}</b>)
|
||||
{/if}
|
||||
</a>
|
||||
<a id="minilink-notifications" class="minilink" href="/notifications">
|
||||
<object type="internal/link" n:if="$thisUser->getNotificationsCount() > 0">
|
||||
<div class="counter">
|
||||
+{$thisUser->getNotificationsCount()}
|
||||
</div>
|
||||
</object>
|
||||
<img src="/assets/packages/static/openvk/img/feedback.svg">
|
||||
</a>
|
||||
</div>
|
||||
{elseif !$thisUser->isActivated()}
|
||||
<a href="/logout?hash={urlencode($csrfToken)}" class="link">{_menu_logout}</a>
|
||||
{else}
|
||||
<a href="/support" class="link">{_menu_support}
|
||||
{if $ticketAnsweredCount > 0}
|
||||
(<b>{$ticketAnsweredCount}</b>)
|
||||
{/if}
|
||||
</a>
|
||||
<a href="/logout?hash={urlencode($csrfToken)}" class="link">{_menu_logout}</a>
|
||||
{/if}
|
||||
{else}
|
||||
<form id="fastLogin" action="/login" method="POST" enctype="multipart/form-data">
|
||||
<label for="login"><span>{_email}:</span></label>
|
||||
<input id="login" type="text" name="login" required />
|
||||
<label for="password"><span>{_password}:</span></label>
|
||||
<input id="password" type="password" name="password" required />
|
||||
<input type="hidden" name="jReturnTo" value="{$_SERVER['REQUEST_URI']}" />
|
||||
<input type="hidden" name="hash" value="{$csrfToken}" />
|
||||
<input type="submit" value="{_log_in}" class="button" style="display: inline-block; font-family: Tahoma" />
|
||||
<a href="/reg"><input type="button" value="{_registration}" class="button" style="font-family: Tahoma" /></a><br><br>
|
||||
{if !OPENVK_ROOT_CONF['openvk']['preferences']['security']['disablePasswordRestoring']}<a href="/restore">{_forgot_password}</a>{/if}
|
||||
</form>
|
||||
{/ifset}
|
||||
</div>
|
||||
</div>
|
||||
<a href="/apps?act=installed" class="link">{_my_apps}</a>
|
||||
<a href="/settings" class="link">{_my_settings}</a>
|
||||
|
||||
<div class="page_body">
|
||||
<div id="wrapH">
|
||||
<div id="wrapHI">
|
||||
<div n:ifcontent class="page_yellowheader">
|
||||
{include header}
|
||||
{var $canAccessAdminPanel = $thisUser->getChandlerUser()->can("access")->model("admin")->whichBelongsTo(NULL)}
|
||||
{var $canAccessHelpdesk = $thisUser->getChandlerUser()->can("write")->model('openvk\Web\Models\Entities\TicketReply')->whichBelongsTo(0)}
|
||||
{var $menuLinksAvaiable = sizeof(OPENVK_ROOT_CONF['openvk']['preferences']['menu']['links']) > 0 && $thisUser->getLeftMenuItemStatus('links')}
|
||||
<div n:if="$canAccessAdminPanel || $canAccessHelpdesk || $menuLinksAvaiable" class="menu_divider"></div>
|
||||
<a href="/admin" class="link" n:if="$canAccessAdminPanel" title="{_admin} [Alt+Shift+A]" accesskey="a">{_admin}</a>
|
||||
<a href="/support/tickets" class="link" n:if="$canAccessHelpdesk">{_helpdesk}
|
||||
{if $helpdeskTicketNotAnsweredCount > 0}
|
||||
(<b>{$helpdeskTicketNotAnsweredCount}</b>)
|
||||
{/if}
|
||||
</a>
|
||||
|
||||
<a n:if="$thisUser->getLeftMenuItemStatus('links')" n:foreach="OPENVK_ROOT_CONF['openvk']['preferences']['menu']['links'] as $menuItem" href="{$menuItem['url']}" target="_blank" class="link">{strpos($menuItem["name"], "@") === 0 ? tr(substr($menuItem["name"], 1)) : $menuItem["name"]}</a>
|
||||
|
||||
<div id="_groupListPinnedGroups">
|
||||
<div n:if="$thisUser->getPinnedClubCount() > 0" class="menu_divider"></div>
|
||||
<a n:foreach="$thisUser->getPinnedClubs() as $club" href="{$club->getURL()}" class="link group_link">{$club->getName()}</a>
|
||||
</div>
|
||||
|
||||
<div n:if="OPENVK_ROOT_CONF['openvk']['preferences']['commerce'] && $thisUser->getCoins() != 0" id="votesBalance">
|
||||
{tr("you_still_have_x_points", $thisUser->getCoins())|noescape}
|
||||
<br /><br />
|
||||
|
||||
<a href="/settings?act=finance">{_top_up_your_account} »</a>
|
||||
</div>
|
||||
|
||||
<a n:if="OPENVK_ROOT_CONF['openvk']['preferences']['adPoster']['enable'] && $thisUser->getLeftMenuItemStatus('poster')" href="{php echo OPENVK_ROOT_CONF['openvk']['preferences']['adPoster']['link']}" >
|
||||
<img src="{php echo OPENVK_ROOT_CONF['openvk']['preferences']['adPoster']['src']}" alt="{php echo OPENVK_ROOT_CONF['openvk']['preferences']['adPoster']['caption']}" class="psa-poster" style="max-width: 100%; margin-top: 10px;" />
|
||||
</a>
|
||||
|
||||
<div class="floating_sidebar">
|
||||
<a id="minilink-friends" class="minilink" href="/friends{$thisUser->getId()}">
|
||||
<object type="internal/link" n:if="$thisUser->getFollowersCount() > 0">
|
||||
<div class="counter">
|
||||
+{$thisUser->getFollowersCount()}
|
||||
</div>
|
||||
</object>
|
||||
<img src="/assets/packages/static/openvk/img/friends.svg">
|
||||
</a>
|
||||
<a id="minilink-albums" class="minilink" href="/albums{$thisUser->getId()}">
|
||||
<img src="/assets/packages/static/openvk/img/photos.svg">
|
||||
</a>
|
||||
<a id="minilink-messenger" class="minilink" href="/im">
|
||||
<object type="internal/link" n:if="$thisUser->getUnreadMessagesCount() > 0">
|
||||
<div class="counter">
|
||||
+{$thisUser->getUnreadMessagesCount()}
|
||||
</div>
|
||||
</object>
|
||||
<img src="/assets/packages/static/openvk/img/messages.svg">
|
||||
</a>
|
||||
<a id="minilink-groups" class="minilink" href="/groups{$thisUser->getId()}">
|
||||
<img src="/assets/packages/static/openvk/img/groups.svg">
|
||||
</a>
|
||||
<a id="minilink-notifications" class="minilink" href="/notifications">
|
||||
<object type="internal/link" n:if="$thisUser->getNotificationsCount() > 0">
|
||||
<div class="counter">
|
||||
+{$thisUser->getNotificationsCount()}
|
||||
</div>
|
||||
</object>
|
||||
<img src="/assets/packages/static/openvk/img/feedback.svg">
|
||||
</a>
|
||||
</div>
|
||||
{elseif !$thisUser->isActivated()}
|
||||
<a href="/logout?hash={urlencode($csrfToken)}" class="link">{_menu_logout}</a>
|
||||
{else}
|
||||
<a href="/support" class="link">{_menu_support}
|
||||
{if $ticketAnsweredCount > 0}
|
||||
(<b>{$ticketAnsweredCount}</b>)
|
||||
{/if}
|
||||
</a>
|
||||
<a href="/logout?hash={urlencode($csrfToken)}" class="link">{_menu_logout}</a>
|
||||
{/if}
|
||||
{else}
|
||||
<form id="fastLogin" action="/login" method="POST" enctype="multipart/form-data">
|
||||
<label for="login"><span>{_email}:</span></label>
|
||||
<input id="login" type="text" name="login" required />
|
||||
<label for="password"><span>{_password}:</span></label>
|
||||
<input id="password" type="password" name="password" required />
|
||||
<input type="hidden" name="jReturnTo" value="{$_SERVER['REQUEST_URI']}" />
|
||||
<input type="hidden" name="hash" value="{$csrfToken}" />
|
||||
<input type="submit" value="{_log_in}" class="button" style="display: inline-block; font-family: Tahoma" />
|
||||
<a href="/reg"><input type="button" value="{_registration}" class="button" style="font-family: Tahoma" /></a><br><br>
|
||||
{if !OPENVK_ROOT_CONF['openvk']['preferences']['security']['disablePasswordRestoring']}<a href="/restore">{_forgot_password}</a>{/if}
|
||||
</form>
|
||||
{/ifset}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="page_body">
|
||||
<div id="wrapH">
|
||||
<div id="wrapHI">
|
||||
<div n:ifcontent class="page_yellowheader">
|
||||
{include header}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{ifset wrap}
|
||||
<div class="msg msg_{$flashMessage->type}" n:ifset="$flashMessage">
|
||||
<b>{$flashMessage->title}</b><br/>
|
||||
{$flashMessage->msg|noescape}
|
||||
</div>
|
||||
{ifset wrap}
|
||||
<div class="msg msg_{$flashMessage->type}" n:ifset="$flashMessage">
|
||||
<b>{$flashMessage->title}</b><br/>
|
||||
{$flashMessage->msg|noescape}
|
||||
</div>
|
||||
|
||||
{include wrap}
|
||||
{else}
|
||||
<div class="wrap2">
|
||||
<div class="wrap1">
|
||||
<div id="auth" class="page-wrap">
|
||||
<div class="page_content">
|
||||
<div class="msg msg_{$flashMessage->type}" n:ifset="$flashMessage">
|
||||
<b>{$flashMessage->title}</b><br/>
|
||||
{$flashMessage->msg|noescape}
|
||||
{include wrap}
|
||||
{else}
|
||||
<div class="wrap2">
|
||||
<div class="wrap1">
|
||||
<div id="auth" class="page-wrap">
|
||||
<div class="page_content">
|
||||
<div class="msg msg_{$flashMessage->type}" n:ifset="$flashMessage">
|
||||
<b>{$flashMessage->title}</b><br/>
|
||||
{$flashMessage->msg|noescape}
|
||||
</div>
|
||||
|
||||
{include content}
|
||||
</div>
|
||||
|
||||
{include content}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/ifset}
|
||||
{/ifset}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="page_footer">
|
||||
{var $dbVersion = \Chandler\Database\DatabaseConnection::i()->getConnection()->getPdo()->getAttribute(\PDO::ATTR_SERVER_VERSION)}
|
||||
<div class="page_footer">
|
||||
{var $dbVersion = \Chandler\Database\DatabaseConnection::i()->getConnection()->getPdo()->getAttribute(\PDO::ATTR_SERVER_VERSION)}
|
||||
|
||||
<div class="navigation_footer">
|
||||
<a href="/about" class="link">{_footer_about_instance}</a>
|
||||
<a href="/terms" class="link">{_footer_rules}</a>
|
||||
<a href="/blog" class="link">{_footer_blog}</a>
|
||||
<a href="/support" class="link">{_footer_help}</a>
|
||||
<a href="/dev" target="_blank" class="link">{_footer_developers}</a>
|
||||
<a href="/privacy" class="link">{_footer_privacy}</a>
|
||||
<div class="navigation_footer">
|
||||
<a href="/about" class="link">{_footer_about_instance}</a>
|
||||
<a href="/terms" class="link">{_footer_rules}</a>
|
||||
<a href="/blog" class="link">{_footer_blog}</a>
|
||||
<a href="/support" class="link">{_footer_help}</a>
|
||||
<a href="/dev" target="_blank" class="link">{_footer_developers}</a>
|
||||
<a href="/privacy" class="link">{_footer_privacy}</a>
|
||||
</div>
|
||||
<p>
|
||||
{var $currentUrl = $_SERVER["REQUEST_URI"]}
|
||||
{foreach array_slice(getLanguages(), 0, 3) as $language}
|
||||
<a href="/language?lg={$language['code']}&hash={urlencode($csrfToken)}&jReturnTo={php echo rawurlencode($currentUrl)}" rel="nofollow" title="{$language['native_name']}" class="link">
|
||||
<img src="/assets/packages/static/openvk/img/flags/{$language['flag']}.gif" alt="{$language['native_name']}">
|
||||
</a>
|
||||
{/foreach}
|
||||
<a href="/language" class="link">all languages »</a>
|
||||
</p>
|
||||
<p>OpenVK <a href="/about:openvk">{php echo OPENVK_VERSION}</a> | PHP: {phpversion()} | DB: {$dbVersion}</p>
|
||||
<p n:ifcontent>
|
||||
{php echo OPENVK_ROOT_CONF["openvk"]["appearance"]["motd"]}
|
||||
</p>
|
||||
</div>
|
||||
<p>
|
||||
{var $currentUrl = $_SERVER["REQUEST_URI"]}
|
||||
{foreach array_slice(getLanguages(), 0, 3) as $language}
|
||||
<a href="/language?lg={$language['code']}&hash={urlencode($csrfToken)}&jReturnTo={php echo rawurlencode($currentUrl)}" rel="nofollow" title="{$language['native_name']}" class="link">
|
||||
<img src="/assets/packages/static/openvk/img/flags/{$language['flag']}.gif" alt="{$language['native_name']}">
|
||||
</a>
|
||||
{/foreach}
|
||||
<a href="/language" class="link">all languages »</a>
|
||||
</p>
|
||||
<p>OpenVK <a href="/about:openvk">{php echo OPENVK_VERSION}</a> | PHP: {phpversion()} | DB: {$dbVersion}</p>
|
||||
<p n:ifcontent>
|
||||
{php echo OPENVK_ROOT_CONF["openvk"]["appearance"]["motd"]}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
{include "components/cookies.xml"}
|
||||
{include "components/cookies.xml"}
|
||||
|
||||
{script "js/node_modules/msgpack-lite/dist/msgpack.min.js"}
|
||||
{script "js/node_modules/soundjs/lib/soundjs.min.js"}
|
||||
{script "js/node_modules/ky/umd.js"}
|
||||
{script "js/messagebox.js"}
|
||||
{script "js/notifications.js"}
|
||||
{script "js/scroll.js"}
|
||||
{script "js/player.js"}
|
||||
{script "js/al_wall.js"}
|
||||
{script "js/al_api.js"}
|
||||
{script "js/al_mentions.js"}
|
||||
{script "js/al_polls.js"}
|
||||
{script "js/node_modules/msgpack-lite/dist/msgpack.min.js"}
|
||||
{script "js/node_modules/soundjs/lib/soundjs.min.js"}
|
||||
{script "js/node_modules/ky/umd.js"}
|
||||
{script "js/messagebox.js"}
|
||||
{script "js/notifications.js"}
|
||||
{script "js/scroll.js"}
|
||||
{script "js/player.js"}
|
||||
{script "js/al_wall.js"}
|
||||
{script "js/al_api.js"}
|
||||
{script "js/al_mentions.js"}
|
||||
{script "js/al_polls.js"}
|
||||
|
||||
{ifset $thisUser}
|
||||
{script "js/al_notifs.js"}
|
||||
{/ifset}
|
||||
{ifset $thisUser}
|
||||
{script "js/al_notifs.js"}
|
||||
{/ifset}
|
||||
|
||||
{if OPENVK_ROOT_CONF['openvk']['preferences']['bellsAndWhistles']['fartscroll']}
|
||||
<script src="https://unpkg.com/fartscroll@1.0.0/fartscroll.js"></script>
|
||||
<script>
|
||||
fartscroll(400);
|
||||
{if OPENVK_ROOT_CONF['openvk']['preferences']['bellsAndWhistles']['fartscroll']}
|
||||
<script src="https://unpkg.com/fartscroll@1.0.0/fartscroll.js"></script>
|
||||
<script>
|
||||
fartscroll(400);
|
||||
</script>
|
||||
{/if}
|
||||
|
||||
<script>bsdnHydrate();</script>
|
||||
|
||||
<script n:if="OPENVK_ROOT_CONF['openvk']['telemetry']['plausible']['enable']" async defer data-domain="{php echo OPENVK_ROOT_CONF['openvk']['telemetry']['plausible']['domain']}" src="{php echo OPENVK_ROOT_CONF['openvk']['telemetry']['plausible']['server']}js/plausible.js"></script>
|
||||
|
||||
<script n:if="OPENVK_ROOT_CONF['openvk']['telemetry']['piwik']['enable']">
|
||||
{var $piwik = (object) OPENVK_ROOT_CONF['openvk']['telemetry']['piwik']}
|
||||
|
||||
//<![CDATA[
|
||||
(function(window,document,dataLayerName,id){
|
||||
window[dataLayerName]=window[dataLayerName]||[],window[dataLayerName].push({ start:(new Date).getTime(),event:"stg.start" });var scripts=document.getElementsByTagName('script')[0],tags=document.createElement('script');
|
||||
function stgCreateCookie(a,b,c){ var d="";if(c){ var e=new Date;e.setTime(e.getTime()+24*c*60*60*1e3),d=";expires="+e.toUTCString() }document.cookie=a+"="+b+d+";path=/" }
|
||||
var isStgDebug=(window.location.href.match("stg_debug")||document.cookie.match("stg_debug"))&&!window.location.href.match("stg_disable_debug");stgCreateCookie("stg_debug",isStgDebug?1:"",isStgDebug?14:-1);
|
||||
var qP=[];dataLayerName!=="dataLayer"&&qP.push("data_layer_name="+dataLayerName),isStgDebug&&qP.push("stg_debug");var qPString=qP.length>0?("?"+qP.join("&")):"";
|
||||
tags.async=!0,tags.src={$piwik->container . "/"}+id+".js"+qPString,scripts.parentNode.insertBefore(tags,scripts);
|
||||
!function(a,n,i){ a[n]=a[n]||{ };for(var c=0;c<i.length;c++)!function(i){ a[n][i]=a[n][i]||{ },a[n][i].api=a[n][i].api||function(){ var a=[].slice.call(arguments,0);"string"==typeof a[0]&&window[dataLayerName].push({ event:n+"."+i+":"+a[0],parameters:[].slice.call(arguments,1) }) } }(i[c]) }(window,"ppms",["tm","cm"]);
|
||||
})(window,document,{$piwik->layer}, {$piwik->site});
|
||||
//]]>
|
||||
</script>
|
||||
{/if}
|
||||
|
||||
<script>bsdnHydrate();</script>
|
||||
<script n:if="OPENVK_ROOT_CONF['openvk']['telemetry']['matomo']['enable']">
|
||||
{var $matomo = (object) OPENVK_ROOT_CONF['openvk']['telemetry']['matomo']}
|
||||
//<![CDATA[
|
||||
var _paq = window._paq = window._paq || [];
|
||||
_paq.push(['trackPageView']);
|
||||
_paq.push(['enableLinkTracking']);
|
||||
(function() {
|
||||
var u="//" + {$matomo->container} + "/";
|
||||
_paq.push(['setTrackerUrl', u+'matomo.php']);
|
||||
_paq.push(['setSiteId', {$matomo->site}]);
|
||||
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
|
||||
g.type='text/javascript'; g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
|
||||
})();
|
||||
//]]>
|
||||
</script>
|
||||
|
||||
<script n:if="OPENVK_ROOT_CONF['openvk']['telemetry']['plausible']['enable']" async defer data-domain="{php echo OPENVK_ROOT_CONF['openvk']['telemetry']['plausible']['domain']}" src="{php echo OPENVK_ROOT_CONF['openvk']['telemetry']['plausible']['server']}js/plausible.js"></script>
|
||||
{ifset bodyScripts}
|
||||
{include bodyScripts}
|
||||
{/ifset}
|
||||
|
||||
<script n:if="OPENVK_ROOT_CONF['openvk']['telemetry']['piwik']['enable']">
|
||||
{var $piwik = (object) OPENVK_ROOT_CONF['openvk']['telemetry']['piwik']}
|
||||
{script "js/node_modules/requirejs/bin/r.js"}
|
||||
<script>initForms();</script>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
{/if}
|
||||
|
||||
//<![CDATA[
|
||||
(function(window,document,dataLayerName,id){
|
||||
window[dataLayerName]=window[dataLayerName]||[],window[dataLayerName].push({ start:(new Date).getTime(),event:"stg.start" });var scripts=document.getElementsByTagName('script')[0],tags=document.createElement('script');
|
||||
function stgCreateCookie(a,b,c){ var d="";if(c){ var e=new Date;e.setTime(e.getTime()+24*c*60*60*1e3),d=";expires="+e.toUTCString() }document.cookie=a+"="+b+d+";path=/" }
|
||||
var isStgDebug=(window.location.href.match("stg_debug")||document.cookie.match("stg_debug"))&&!window.location.href.match("stg_disable_debug");stgCreateCookie("stg_debug",isStgDebug?1:"",isStgDebug?14:-1);
|
||||
var qP=[];dataLayerName!=="dataLayer"&&qP.push("data_layer_name="+dataLayerName),isStgDebug&&qP.push("stg_debug");var qPString=qP.length>0?("?"+qP.join("&")):"";
|
||||
tags.async=!0,tags.src={$piwik->container . "/"}+id+".js"+qPString,scripts.parentNode.insertBefore(tags,scripts);
|
||||
!function(a,n,i){ a[n]=a[n]||{ };for(var c=0;c<i.length;c++)!function(i){ a[n][i]=a[n][i]||{ },a[n][i].api=a[n][i].api||function(){ var a=[].slice.call(arguments,0);"string"==typeof a[0]&&window[dataLayerName].push({ event:n+"."+i+":"+a[0],parameters:[].slice.call(arguments,1) }) } }(i[c]) }(window,"ppms",["tm","cm"]);
|
||||
})(window,document,{$piwik->layer}, {$piwik->site});
|
||||
//]]>
|
||||
</script>
|
||||
{if isset($parentModule) && substr($parentModule, 0, 21) !== 'libchandler:absolute.'}
|
||||
<!-- INCLUDING TEMPLATE FROM PARENTMODULE: {$parentModule} -->
|
||||
|
||||
<script n:if="OPENVK_ROOT_CONF['openvk']['telemetry']['matomo']['enable']">
|
||||
{var $matomo = (object) OPENVK_ROOT_CONF['openvk']['telemetry']['matomo']}
|
||||
//<![CDATA[
|
||||
var _paq = window._paq = window._paq || [];
|
||||
_paq.push(['trackPageView']);
|
||||
_paq.push(['enableLinkTracking']);
|
||||
(function() {
|
||||
var u="//" + {$matomo->container} + "/";
|
||||
_paq.push(['setTrackerUrl', u+'matomo.php']);
|
||||
_paq.push(['setSiteId', {$matomo->site}]);
|
||||
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
|
||||
g.type='text/javascript'; g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
|
||||
})();
|
||||
//]]>
|
||||
</script>
|
||||
|
||||
{ifset bodyScripts}
|
||||
{include bodyScripts}
|
||||
{/ifset}
|
||||
</body>
|
||||
</html>
|
||||
{/if}
|
||||
|
||||
{if isset($parentModule) && substr($parentModule, 0, 21) !== 'libchandler:absolute.'}
|
||||
<!-- INCLUDING TEMPLATE FROM PARENTMODULE: {$parentModule} -->
|
||||
|
||||
{include content}
|
||||
{include content}
|
||||
{/if}
|
||||
{/if}
|
|
@ -120,7 +120,7 @@
|
|||
<div n:ifset="$thisUser" id="profile_links">
|
||||
{if $club->canBeModifiedBy($thisUser)}
|
||||
<a href="/club{$club->getId()}/edit" id="profile_link">{_edit_group}</a>
|
||||
<a href="/club{$club->getId()}/stats" id="profile_link">{_statistics}</a>
|
||||
<a href="/club{$club->getId()}/stats" target="_blank" id="profile_link">{_statistics}</a>
|
||||
{/if}
|
||||
{if $thisUser->getChandlerUser()->can("access")->model("admin")->whichBelongsTo(NULL)}
|
||||
<a href="/admin/clubs/id{$club->getId()}" id="profile_link">{_manage_group_action}</a>
|
||||
|
|
|
@ -25,9 +25,7 @@
|
|||
|
||||
<a href="/note{$note->getOwner()->getId()}_{$note->getVirtualId()}" class="button">{_cancel}</a>
|
||||
</form>
|
||||
|
||||
{script "js/node_modules/monaco-editor/min/vs/loader.js"}
|
||||
{script "js/node_modules/requirejs/bin/r.js"}
|
||||
<script>
|
||||
require.config({
|
||||
paths: {
|
||||
|
|
|
@ -98,7 +98,7 @@
|
|||
|
||||
</a>
|
||||
<span n:if="isset($thisUser) && $thisUser->getId() === $dat->getOwner()->getId()"> |
|
||||
<a id="_noteDelete" href="/note{$dat->getOwner()->getId()}_{$dat->getId()}/delete">{_delete}</a>
|
||||
<a id="_noteDelete" href="/note{$dat->getOwner()->getId()}_{$dat->getId()}/delete?hash={urlencode($csrfToken)}">{_delete}</a>
|
||||
|
|
||||
<a href="/note{$dat->getOwner()->getId()}_{$dat->getVirtualId()}/edit">{_edit}</a>
|
||||
</span>
|
||||
|
|
|
@ -64,7 +64,7 @@
|
|||
{_no_comments}
|
||||
{/if}
|
||||
<span n:if="isset($thisUser) && $thisUser->getId() === $note->getOwner()->getId()"> |
|
||||
<a id="_noteDelete" href="/note{$note->getOwner()->getId()}_{$note->getId()}/delete">{_delete}</a>
|
||||
<a id="_noteDelete" href="/note{$note->getOwner()->getId()}_{$note->getId()}/delete?hash={urlencode($csrfToken)}">{_delete}</a>
|
||||
|
|
||||
<a href="/note{$note->getOwner()->getId()}_{$note->getVirtualId()}/edit">{_edit}</a>
|
||||
</span>
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
{block title}
|
||||
{tr("search_for_$type")}
|
||||
{if $_GET['query']}
|
||||
- {$_GET['query']}
|
||||
{if $_REQUEST['query']}
|
||||
- {$_REQUEST['query']}
|
||||
{/if}
|
||||
{/block}
|
||||
|
||||
|
@ -29,8 +29,8 @@
|
|||
{block name}
|
||||
{if $type != "apps"}
|
||||
<text style="overflow: hidden;"> {$x->getCanonicalName()}
|
||||
{if $_GET['sort'] == "rating"}({$x->getRating()}%)
|
||||
{elseif $_GET['sort'] == "id"}(id{$x->getId()}){/if}</text>
|
||||
{if $_REQUEST['sort'] == "rating"}({$x->getRating()}%)
|
||||
{elseif $_REQUEST['sort'] == "id"}(id{$x->getId()}){/if}</text>
|
||||
<img n:if="$x->isVerified()"
|
||||
class="name-checkmark"
|
||||
src="/assets/packages/static/openvk/img/checkmark.png"
|
||||
|
@ -44,49 +44,49 @@
|
|||
<table class="ugc-table">
|
||||
<tbody>
|
||||
{if $type === "users"}
|
||||
{if !is_null($_GET['status']) && $_GET['status'] != ""}
|
||||
{if !is_null($_REQUEST['status']) && $_REQUEST['status'] != ""}
|
||||
<tr>
|
||||
<td><span class="nobold">{_status}:</span></td>
|
||||
<td>{$x->getStatus()}</td>
|
||||
</tr>
|
||||
{/if}
|
||||
{if !is_null($_GET['city']) && $_GET['city'] != "" && $x->getPrivacySetting("page.info.read") > 1}
|
||||
{if !is_null($_REQUEST['city']) && $_REQUEST['city'] != "" && $x->getPrivacySetting("page.info.read") > 1}
|
||||
<tr>
|
||||
<td><span class="nobold">{_city}:</span></td>
|
||||
<td>{$x->getCity()}</td>
|
||||
</tr>
|
||||
{/if}
|
||||
{if !is_null($_GET['city']) && $_GET['hometown'] != "" && $x->getPrivacySetting("page.info.read") > 1}
|
||||
{if !is_null($_REQUEST['city']) && $_REQUEST['hometown'] != "" && $x->getPrivacySetting("page.info.read") > 1}
|
||||
<tr>
|
||||
<td><span class="nobold">{_hometown}:</span></td>
|
||||
<td>{$x->getHometown()}</td>
|
||||
</tr>
|
||||
{/if}
|
||||
{if !is_null($_GET['politViews']) && $_GET['politViews'] != 0 && $x->getPrivacySetting("page.info.read") > 1}
|
||||
{if !is_null($_REQUEST['politViews']) && $_REQUEST['politViews'] != 0 && $x->getPrivacySetting("page.info.read") > 1}
|
||||
<tr>
|
||||
<td><span class="nobold">{_politViews}:</span></td>
|
||||
<td>{tr("politViews_".$x->getPoliticalViews())}</td>
|
||||
</tr>
|
||||
{/if}
|
||||
{if !is_null($_GET['email']) && $_GET['email'] != "" && $x->getPrivacySetting("page.info.read") > 1}
|
||||
{if !is_null($_REQUEST['email']) && $_REQUEST['email'] != "" && $x->getPrivacySetting("page.info.read") > 1}
|
||||
<tr>
|
||||
<td><span class="nobold">{_email}:</span></td>
|
||||
<td>{$x->getContactEmail()}</td>
|
||||
</tr>
|
||||
{/if}
|
||||
{if !is_null($_GET['telegram']) && $_GET['telegram'] != "" && $x->getPrivacySetting("page.info.read") > 1}
|
||||
{if !is_null($_REQUEST['telegram']) && $_REQUEST['telegram'] != "" && $x->getPrivacySetting("page.info.read") > 1}
|
||||
<tr>
|
||||
<td><span class="nobold">{_telegram}:</span></td>
|
||||
<td><a href="tg://resolve?domain={$x->getTelegram()}">@{$x->getTelegram()}</a></td>
|
||||
</tr>
|
||||
{/if}
|
||||
{if !is_null($_GET['site']) && $_GET['site'] != "" && $x->getPrivacySetting("page.info.read") > 1}
|
||||
{if !is_null($_REQUEST['site']) && $_REQUEST['site'] != "" && $x->getPrivacySetting("page.info.read") > 1}
|
||||
<tr>
|
||||
<td><span class="nobold">{_personal_website}:</span></td>
|
||||
<td><a href="{$x->getWebsite()}">{$x->getWebsite()}</a></td>
|
||||
</tr>
|
||||
{/if}
|
||||
{if !is_null($_GET['address']) && $_GET['address'] != "" && $x->getPrivacySetting("page.info.read") > 1}
|
||||
{if !is_null($_REQUEST['address']) && $_REQUEST['address'] != "" && $x->getPrivacySetting("page.info.read") > 1}
|
||||
<tr>
|
||||
<td><span class="nobold">{_address}:</span></td>
|
||||
<td>{$x->getPhysicalAddress()}</td>
|
||||
|
@ -230,28 +230,28 @@
|
|||
{block searchOptions}
|
||||
<div class="searchOptions">
|
||||
<ul class="searchList">
|
||||
<li {if $type === "users"} id="used"{/if}><a href="/search?type=users{if $_GET['query']}&query={urlencode($_GET['query'])}{/if}&sort=id"> {_s_people} {if $type === "users"} ({$count}){/if}</a></li>
|
||||
<li {if $type === "groups"} id="used"{/if}><a href="/search?type=groups{if $_GET['query']}&query={urlencode($_GET['query'])}{/if}&sort=id"> {_s_groups} {if $type === "groups"} ({$count}){/if}</a></li>
|
||||
<li {if $type === "comments"}id="used"{/if}><a href="/search?type=comments{if $_GET['query']}&query={urlencode($_GET['query'])}{/if}&sort=id">{_s_comments} {if $type === "comments"}({$count}){/if}</a></li>
|
||||
<li {if $type === "posts"} id="used"{/if}><a href="/search?type=posts{if $_GET['query']}&query={urlencode($_GET['query'])}{/if}&sort=id"> {_s_posts} {if $type === "posts"} ({$count}){/if}</a></li>
|
||||
<li {if $type === "videos"} id="used"{/if}><a href="/search?type=videos{if $_GET['query']}&query={urlencode($_GET['query'])}{/if}&sort=id"> {_s_videos} {if $type === "videos"} ({$count}){/if}</a></li>
|
||||
<li {if $type === "apps"} id="used"{/if}><a href="/search?type=apps{if $_GET['query']}&query={urlencode($_GET['query'])}{/if}&sort=id"> {_s_apps} {if $type === "apps"} ({$count}){/if}</a></li>
|
||||
<li {if $type === "users"} id="used"{/if}><a href="/search?type=users{if $_REQUEST['query']}&query={urlencode($_REQUEST['query'])}{/if}&sort=id"> {_s_people} {if $type === "users"} ({$count}){/if}</a></li>
|
||||
<li {if $type === "groups"} id="used"{/if}><a href="/search?type=groups{if $_REQUEST['query']}&query={urlencode($_REQUEST['query'])}{/if}&sort=id"> {_s_groups} {if $type === "groups"} ({$count}){/if}</a></li>
|
||||
<li {if $type === "comments"}id="used"{/if}><a href="/search?type=comments{if $_REQUEST['query']}&query={urlencode($_REQUEST['query'])}{/if}&sort=id">{_s_comments} {if $type === "comments"}({$count}){/if}</a></li>
|
||||
<li {if $type === "posts"} id="used"{/if}><a href="/search?type=posts{if $_REQUEST['query']}&query={urlencode($_REQUEST['query'])}{/if}&sort=id"> {_s_posts} {if $type === "posts"} ({$count}){/if}</a></li>
|
||||
<li {if $type === "videos"} id="used"{/if}><a href="/search?type=videos{if $_REQUEST['query']}&query={urlencode($_REQUEST['query'])}{/if}&sort=id"> {_s_videos} {if $type === "videos"} ({$count}){/if}</a></li>
|
||||
<li {if $type === "apps"} id="used"{/if}><a href="/search?type=apps{if $_REQUEST['query']}&query={urlencode($_REQUEST['query'])}{/if}&sort=id"> {_s_apps} {if $type === "apps"} ({$count}){/if}</a></li>
|
||||
</ul>
|
||||
|
||||
<div class="searchOption">
|
||||
<div class="searchOptionName" id="n_sort" onclick="hideParams('sort')"><img src="/assets/packages/static/openvk/img/hide.png" class="searchHide">{_s_order_by}</div>
|
||||
<div class="searchOptionBlock" id="s_sort">
|
||||
<select name="sort" form="searcher" id="sortyor">
|
||||
<option value="id" {if $_GET["sort"] == "name"}selected{/if}>{_s_order_by_id}</option>
|
||||
<option value="id" {if $_REQUEST["sort"] == "name"}selected{/if}>{_s_order_by_id}</option>
|
||||
{if $type == "users"}
|
||||
<option value="name" {if $_GET["sort"] == "name"}selected{/if}>{_s_order_by_name}</option>
|
||||
<option value="name" {if $_REQUEST["sort"] == "name"}selected{/if}>{_s_order_by_name}</option>
|
||||
{if OPENVK_ROOT_CONF["openvk"]["preferences"]["commerce"]}
|
||||
<option value="rating" {if $_GET["sort"] == "rating"}selected{/if}>{_s_order_by_rating}</option>
|
||||
<option value="rating" {if $_REQUEST["sort"] == "rating"}selected{/if}>{_s_order_by_rating}</option>
|
||||
{/if}
|
||||
{/if}
|
||||
</select>
|
||||
<div id="invertor">
|
||||
<input type="checkbox" name="invert" value="1" form="searcher" {if !is_null($_GET['invert']) && $_GET['invert'] == "1"}checked{/if}>{_s_order_invert}
|
||||
<input type="checkbox" name="invert" value="1" form="searcher" {if !is_null($_REQUEST['invert']) && $_REQUEST['invert'] == "1"}checked{/if}>{_s_order_invert}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -269,7 +269,7 @@
|
|||
form="searcher"
|
||||
id="bydate"
|
||||
style="width:100%"
|
||||
value="{if !is_null($_GET['datebefore'])}{$_GET['datebefore']}{/if}"
|
||||
value="{if !is_null($_REQUEST['datebefore'])}{$_REQUEST['datebefore']}{/if}"
|
||||
min="2019-11-19"
|
||||
max={date('Y-m-d')}></p>
|
||||
{if $type != "users"}
|
||||
|
@ -281,7 +281,7 @@
|
|||
form="searcher"
|
||||
style="width:100%"
|
||||
id="bydate"
|
||||
value="{if !is_null($_GET['dateafter'])}{$_GET['dateafter']}{/if}"
|
||||
value="{if !is_null($_REQUEST['dateafter'])}{$_REQUEST['dateafter']}{/if}"
|
||||
min="2019-11-18"
|
||||
max={date('Y-m-d')}></p>
|
||||
</div>
|
||||
|
@ -292,19 +292,19 @@
|
|||
<div class="searchOption">
|
||||
<div class="searchOptionName" id="n_main" onclick="hideParams('main')"><img src="/assets/packages/static/openvk/img/hide.png" class="searchHide">{_main}</div>
|
||||
<div class="searchOptionBlock" id="s_main">
|
||||
<input type="text" value="{if !is_null($_GET['status'])}{$_GET['status']}{/if}" form="searcher" placeholder="{_status}" name="status">
|
||||
<input type="text" value="{if !is_null($_GET['city'])}{$_GET['city']}{/if}" form="searcher" placeholder="{_city}" name="city">
|
||||
<input type="text" value="{if !is_null($_GET['hometown'])}{$_GET['hometown']}{/if}" form="searcher" placeholder="{_hometown}" name="hometown">
|
||||
<input name="is_online" type="checkbox" {if !is_null($_GET['is_online']) && $_GET['is_online'] == "1"}checked{/if} form="searcher" value="1">{_s_now_on_site}
|
||||
<input type="text" value="{if !is_null($_REQUEST['status'])}{$_REQUEST['status']}{/if}" form="searcher" placeholder="{_status}" name="status">
|
||||
<input type="text" value="{if !is_null($_REQUEST['city'])}{$_REQUEST['city']}{/if}" form="searcher" placeholder="{_city}" name="city">
|
||||
<input type="text" value="{if !is_null($_REQUEST['hometown'])}{$_REQUEST['hometown']}{/if}" form="searcher" placeholder="{_hometown}" name="hometown">
|
||||
<input name="is_online" type="checkbox" {if !is_null($_REQUEST['is_online']) && $_REQUEST['is_online'] == "1"}checked{/if} form="searcher" value="1">{_s_now_on_site}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="searchOption">
|
||||
<div class="searchOptionName" id="n_gender" onclick="hideParams('gender')"><img src="/assets/packages/static/openvk/img/hide.png" class="searchHide">{_gender}</div>
|
||||
<div class="searchOptionBlock" id="s_gender">
|
||||
<p><input type="radio" form="searcher" id="gend" {if $_GET['gender'] == 0}checked{/if} name="gender" value="0">{_male}</p>
|
||||
<p><input type="radio" form="searcher" id="gend1"{if $_GET['gender'] == 1}checked{/if} name="gender" value="1">{_female}</p>
|
||||
<p><input type="radio" form="searcher" id="gend2"{if $_GET['gender'] == 2 || is_null($_GET['gender'])}checked{/if} name="gender" value="2">{_s_any}</p>
|
||||
<p><input type="radio" form="searcher" id="gend" {if $_REQUEST['gender'] == 0}checked{/if} name="gender" value="0">{_male}</p>
|
||||
<p><input type="radio" form="searcher" id="gend1"{if $_REQUEST['gender'] == 1}checked{/if} name="gender" value="1">{_female}</p>
|
||||
<p><input type="radio" form="searcher" id="gend2"{if $_REQUEST['gender'] == 2 || is_null($_REQUEST['gender'])}checked{/if} name="gender" value="2">{_s_any}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -312,7 +312,7 @@
|
|||
<div class="searchOptionName" id="n_relationship" onclick="hideParams('relationship')"><img src="/assets/packages/static/openvk/img/hide.png" class="searchHide">{ovk_proc_strtr(tr("relationship"), 14)}</div>
|
||||
<div class="searchOptionBlock" id="s_relationship">
|
||||
<select name="maritalstatus" form="searcher">
|
||||
<option n:foreach="range(0, 8) as $i" value="{$i}" {if $_GET['maritalstatus'] == $i}selected{/if} form="searcher">
|
||||
<option n:foreach="range(0, 8) as $i" value="{$i}" {if $_REQUEST['maritalstatus'] == $i}selected{/if} form="searcher">
|
||||
{tr("relationship_".$i)}
|
||||
</option>
|
||||
</select>
|
||||
|
@ -323,7 +323,7 @@
|
|||
<div class="searchOptionName" id="n_politViews" onclick="hideParams('politViews')"><img src="/assets/packages/static/openvk/img/hide.png" class="searchHide">{_politViews}</div>
|
||||
<div class="searchOptionBlock" id="s_politViews">
|
||||
<select name="politViews" form="searcher">
|
||||
<option n:foreach="range(0, 9) as $i" value="{$i}" {if $_GET['politViews'] == $i}selected{/if} form="searcher">
|
||||
<option n:foreach="range(0, 9) as $i" value="{$i}" {if $_REQUEST['politViews'] == $i}selected{/if} form="searcher">
|
||||
{tr("politViews_".$i)}
|
||||
</option>
|
||||
</select>
|
||||
|
@ -333,25 +333,25 @@
|
|||
<div class="searchOption">
|
||||
<div class="searchOptionName" id="n_contacts" onclick="hideParams('contacts')"><img src="/assets/packages/static/openvk/img/hide.png" class="searchHide">{_contacts}</div>
|
||||
<div class="searchOptionBlock" id="s_contacts">
|
||||
<input type="text" name="email" value="{if !is_null($_GET['email'])}{$_GET['email']}{/if}" form="searcher" placeholder="{_email}">
|
||||
<input type="text" name="telegram" value="{if !is_null($_GET['telegram'])}{$_GET['telegram']}{/if}" form="searcher" placeholder="{_telegram}"><br id="contacts">
|
||||
<input type="text" name="site" value="{if !is_null($_GET['site'])}{$_GET['site']}{/if}" form="searcher" placeholder="{_personal_website}"><br id="contacts">
|
||||
<input type="text" name="address" value="{if !is_null($_GET['address'])}{$_GET['address']}{/if}" form="searcher" placeholder="{_address}">
|
||||
<input type="text" name="email" value="{if !is_null($_REQUEST['email'])}{$_REQUEST['email']}{/if}" form="searcher" placeholder="{_email}">
|
||||
<input type="text" name="telegram" value="{if !is_null($_REQUEST['telegram'])}{$_REQUEST['telegram']}{/if}" form="searcher" placeholder="{_telegram}"><br id="contacts">
|
||||
<input type="text" name="site" value="{if !is_null($_REQUEST['site'])}{$_REQUEST['site']}{/if}" form="searcher" placeholder="{_personal_website}"><br id="contacts">
|
||||
<input type="text" name="address" value="{if !is_null($_REQUEST['address'])}{$_REQUEST['address']}{/if}" form="searcher" placeholder="{_address}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="searchOption">
|
||||
<div class="searchOptionName" id="n_interests" onclick="hideParams('interests')"><img src="/assets/packages/static/openvk/img/hide.png" class="searchHide">{_interests}</div>
|
||||
<div class="searchOptionBlock" id="s_interests">
|
||||
<input type="text" value="{if !is_null($_GET['interests'])}{$_GET['interests']}{/if}" form="searcher" placeholder="{_interests}" name="interests">
|
||||
<input type="text" value="{if !is_null($_GET['fav_mus'])}{$_GET['fav_mus']}{/if}" form="searcher" placeholder="{_favorite_music}" name="fav_mus">
|
||||
<input type="text" value="{if !is_null($_GET['fav_films'])}{$_GET['fav_films']}{/if}" form="searcher" placeholder="{_favorite_films}" name="fav_films">
|
||||
<input type="text" value="{if !is_null($_GET['fav_shows'])}{$_GET['fav_shows']}{/if}" form="searcher" placeholder="{_favorite_shows}" name="fav_shows">
|
||||
<input type="text" value="{if !is_null($_GET['fav_books'])}{$_GET['fav_books']}{/if}" form="searcher" placeholder="{_favorite_books}" name="fav_books">
|
||||
<input type="text" value="{if !is_null($_GET['fav_quote'])}{$_GET['fav_quote']}{/if}" form="searcher" placeholder="{_favorite_quotes}" name="fav_quote">
|
||||
<input type="text" value="{if !is_null($_REQUEST['interests'])}{$_REQUEST['interests']}{/if}" form="searcher" placeholder="{_interests}" name="interests">
|
||||
<input type="text" value="{if !is_null($_REQUEST['fav_mus'])}{$_REQUEST['fav_mus']}{/if}" form="searcher" placeholder="{_favorite_music}" name="fav_mus">
|
||||
<input type="text" value="{if !is_null($_REQUEST['fav_films'])}{$_REQUEST['fav_films']}{/if}" form="searcher" placeholder="{_favorite_films}" name="fav_films">
|
||||
<input type="text" value="{if !is_null($_REQUEST['fav_shows'])}{$_REQUEST['fav_shows']}{/if}" form="searcher" placeholder="{_favorite_shows}" name="fav_shows">
|
||||
<input type="text" value="{if !is_null($_REQUEST['fav_books'])}{$_REQUEST['fav_books']}{/if}" form="searcher" placeholder="{_favorite_books}" name="fav_books">
|
||||
<input type="text" value="{if !is_null($_REQUEST['fav_quote'])}{$_REQUEST['fav_quote']}{/if}" form="searcher" placeholder="{_favorite_quotes}" name="fav_quote">
|
||||
</div>
|
||||
</div>
|
||||
<!--<input name="with_photo" type="checkbox" {if !is_null($_GET['with_photo']) && $_GET['with_photo'] == "on"}checked{/if} form="searcher">{_s_with_photo}-->
|
||||
<!--<input name="with_photo" type="checkbox" {if !is_null($_REQUEST['with_photo']) && $_REQUEST['with_photo'] == "on"}checked{/if} form="searcher">{_s_with_photo}-->
|
||||
{/if}
|
||||
<input class="button" type="button" id="dnt" value="{_reset}" onclick="resetSearch()">
|
||||
</div>
|
||||
|
|
|
@ -113,9 +113,7 @@
|
|||
<div id="gp_container" style="width: 200px; margin-right: 39px;">
|
||||
<h4>{_open_new_group}</h4>
|
||||
<span>{_open_group_desc}</span>
|
||||
<form action="/groups_create">
|
||||
<button class="button">{_create_group}</button>
|
||||
</form>
|
||||
<a href="/groups_create" class="button">{_create_group}</a>
|
||||
</div>
|
||||
<div id="gp_container" style="width: 344px;">
|
||||
<h4>{_search_group}</h4>
|
||||
|
|
191
Web/static/js/st_manager.js
Normal file
191
Web/static/js/st_manager.js
Normal file
|
@ -0,0 +1,191 @@
|
|||
function executeScripts(html) {
|
||||
let tempContainer = document.createElement('div');
|
||||
tempContainer.innerHTML = html;
|
||||
|
||||
let scripts = tempContainer.querySelectorAll('script');
|
||||
scripts.forEach((script) => {
|
||||
if (!isScriptAlreadyLoaded(script)) {
|
||||
let newScript = document.createElement('script');
|
||||
if (script.src) {
|
||||
newScript.src = script.src;
|
||||
} else {
|
||||
newScript.textContent = script.textContent;
|
||||
}
|
||||
document.body.appendChild(newScript);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function isScriptAlreadyLoaded(script) {
|
||||
if (script.src) {
|
||||
let existingScript = document.querySelector(`script[src="${script.src.split('?')[0]}"]`);
|
||||
return !!existingScript;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// Функция для выполнения стилей в переданном HTML-коде
|
||||
function executeStyles(html) {
|
||||
let tempContainer = document.createElement('div');
|
||||
tempContainer.innerHTML = html;
|
||||
|
||||
let styles = tempContainer.querySelectorAll('link[rel="stylesheet"]');
|
||||
styles.forEach((style) => {
|
||||
if (!isStyleAlreadyLoaded(style)) {
|
||||
let newStyle = document.createElement('link');
|
||||
newStyle.rel = 'stylesheet';
|
||||
newStyle.href = style.href;
|
||||
document.head.appendChild(newStyle);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function isStyleAlreadyLoaded(style) {
|
||||
if (style.href) {
|
||||
let styleHref = style.href.split('?')[0]; // Извлечь URL без query параметров
|
||||
let existingStyle = document.querySelector(`link[rel="stylesheet"][href="${styleHref}"]`);
|
||||
return !!existingStyle;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function cleanAndLoadContent(html) {
|
||||
let tempContainer = document.createElement('div');
|
||||
tempContainer.innerHTML = html;
|
||||
|
||||
let scripts = tempContainer.querySelectorAll('script');
|
||||
let styles = tempContainer.querySelectorAll('link[rel="stylesheet"]');
|
||||
|
||||
scripts.forEach((script) => {
|
||||
if (isScriptAlreadyLoaded(script)) {
|
||||
script.parentNode.removeChild(script);
|
||||
}
|
||||
});
|
||||
|
||||
styles.forEach((style) => {
|
||||
if (isStyleAlreadyLoaded(style)) {
|
||||
style.parentNode.removeChild(style);
|
||||
}
|
||||
});
|
||||
return tempContainer.innerHTML;
|
||||
}
|
||||
|
||||
async function goto(url, ps = true, isRedirect = false) {
|
||||
$("#ajaxLoader").show();
|
||||
|
||||
try {
|
||||
await $.ajax({
|
||||
url: url,
|
||||
data: {
|
||||
al: 1
|
||||
},
|
||||
dataType: 'html',
|
||||
complete: async (data, textStatus) => {
|
||||
console.log(data);
|
||||
let cleanedContent = cleanAndLoadContent(data.responseText);
|
||||
document.getElementById("bodyContent").innerHTML = cleanedContent;
|
||||
const redirectUrl = data.getResponseHeader('Location');
|
||||
if (redirectUrl) {
|
||||
console.log("REDIRECT", redirectUrl);
|
||||
goto(redirectUrl, true);
|
||||
} else {
|
||||
initForms();
|
||||
executeScripts(data.responseText);
|
||||
executeStyles(data.responseText);
|
||||
|
||||
$("title").text($(data.responseText).filter('title').text());
|
||||
}
|
||||
}
|
||||
});
|
||||
} catch (error) {
|
||||
console.error("goto", url, ps, "ERROR", error);
|
||||
MessageBox("Ошибка", "Не удалось загрузить эту страницу", ["OK"], [Function.noop]);
|
||||
}
|
||||
|
||||
if (ps) {
|
||||
history.pushState(null, null, ($("#__current_url").val().replace(/[?&]al=1(?=$|&)/, '') || url));
|
||||
}
|
||||
|
||||
$("#ajaxLoader").hide();
|
||||
}
|
||||
|
||||
document.addEventListener("click", async (e) => {
|
||||
console.log(e);
|
||||
let target = e.target;
|
||||
|
||||
while (target && target.tagName !== "A") {
|
||||
target = target.parentNode;
|
||||
}
|
||||
|
||||
if (target) {
|
||||
const url = target.getAttribute("href");
|
||||
if (url) {
|
||||
if (target.tagName.toLowerCase() === "a" && target.getAttribute("target") !== "_blank" && !url.startsWith("javascript:")) {
|
||||
e.preventDefault();
|
||||
goto(url);
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
async function submitAjaxForm(url, formData) {
|
||||
if (!url) url = window.location.href;
|
||||
const separator = url.includes('?') ? '&' : '?';
|
||||
const newUrl = url + separator + 'al=1';
|
||||
|
||||
try {
|
||||
await $.ajax({
|
||||
type: 'POST', // Может быть GET, POST, и т.д.
|
||||
url: newUrl,
|
||||
data: formData,
|
||||
processData: false,
|
||||
contentType: false,
|
||||
success: async (data, textStatus, jqXHR) => {
|
||||
const redirectUrl = jqXHR.getResponseHeader('Location') || (jqXHR.status === 301 || jqXHR.status === 302);
|
||||
if (redirectUrl) {
|
||||
history.pushState(null, null, redirectUrl);
|
||||
submitAjaxForm(redirectUrl, formData);
|
||||
} else {
|
||||
const bodyContent = $("#bodyContent");
|
||||
bodyContent.html(data);
|
||||
$("#ajaxLoader").hide();
|
||||
|
||||
history.pushState(null, null, $("#__current_url").val().replace(/[?&]al=1(?=$|&)/, ''));
|
||||
$("title").text($(data.responseText).filter('title').text());
|
||||
}
|
||||
},
|
||||
error: async (error) => {
|
||||
console.error(error);
|
||||
// Обработка ошибки
|
||||
MessageBox("Ошибка", "При загрузке страницы произошла ошибка", ["OK :("], [Function.noop]);
|
||||
}
|
||||
});
|
||||
} catch (error) {
|
||||
console.error("submitAjaxForm ERROR", error);
|
||||
MessageBox("Ошибка", "При загрузке страницы произошла ошибка", ["OK :("], [Function.noop]);
|
||||
}
|
||||
}
|
||||
|
||||
function initForms() {
|
||||
// Удаляем старые обработчики событий на формах
|
||||
$("form").off("submit");
|
||||
|
||||
// Обходим все формы и добавляем обработчик на событие отправки
|
||||
$("form").on("submit", async function (event) {
|
||||
event.preventDefault();
|
||||
const form = event.target;
|
||||
const url = form.getAttribute("action");
|
||||
|
||||
const formData = new FormData(form);
|
||||
|
||||
$("#ajaxLoader").show();
|
||||
|
||||
await submitAjaxForm(url, formData);
|
||||
});
|
||||
}
|
||||
|
||||
// Обработка события popstate (браузерная навигация назад/вперед)
|
||||
window.addEventListener('popstate', async function (event) {
|
||||
event.preventDefault();
|
||||
goto(location.href, false);
|
||||
});
|
Loading…
Reference in a new issue