<?php
/**
 * Copyright (c) 2016 Serhii Borodai <clarifying@gmail.com>.
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 *  all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 *
 *
 */


/** @var $this \Zend\View\Renderer\PhpRenderer */

/** @var $userSiteStatistic \App\Entity\Statistic\Site */

$this->headScript()
    ->appendFile('/js/script-check-counter.js')
;

$this->headLink()
    ->appendStylesheet('/css/styles-check-counter.css')
;
/** @var \App\Entity\IdentityInterface $identity */
$identity = $this->identity();
$gravatar = $this->gravatar($identity->getEmail());
$gravatar->setDefaultImg(\Zend\View\Helper\Gravatar::DEFAULT_IDENTICON);
$sxml = new SimpleXMLElement(substr($gravatar, 0, -1) . '/>');
$src = $sxml['src'];
?>
<section class="b-content__title">
    <div class="wrapp">
        <!-- Вход произведен -->
        <picture>
            <img src="/img/bg-img-logo.svg" alt="No logo">
        </picture>
        <p class="lead"><?= $identity->getEmail() ?></p>
        <p class="b-content__title-settings">
            <a href="<?= $this->url('user.cabinet.profile', ['lang' => $this->lang]) ?>" title="" class="annotation"><?= _t("Настройки профиля") ?></a>
            <a href="<?= $this->url('logout', ['lang' => $this->lang]) ?>" title="" class="annotation"><?= _t("Выход") ?></a>
        </p>
    </div>
</section>

<section class="b-content__getstats">
    <div class="wrapp">
        <h1><?= _t('Собираем статистику....') ?></h1>
        <p class="text"><?= _t('Вы успешно интегрировали счётчик AddCPM на ваш сайт.') ?><br />
            <?= _t('Статистика по вашему трафику будет доступна через 24 часа после установки') ?></p>

        <!-- Удачная загрузка добавить аттрибут data-successful -->
        <!-- Неудачная загрузка добавить аттрибут data-failure -->
        <!-- data-failure="Счетчик не устновлен" -->
        <!-- data-successful="Cчётчик установлен" -->
        <div
            class="b-content__message b-content__getstats-site annotation"
            data-successful="<?= _t('Cчётчик установлен') ?>"
        >
            <a href="" class="text bold" style="background-image: url('img/temp/icon-site.jpg');" ><?= $this->domain ?></a>
        </div>
        <p class="b-content__help">
            <a href="<?= $this->url('faq', ['lang' => $this->lang]) ?>" title="<?= _t('Помощь') ?>" class="text"><?= _t('Помощь') ?></a>
        </p>
    </div>
</section>

