Example #1
0
 /**
  * Prepare HTML DOM link (a href) to user with him name or guest name without link
  * @param int $userId
  * @param string $onEmpty
  * @param string $controllerAction
  * @return string
  */
 public static function parseUserLink($userId = null, $onEmpty = 'guest', $controllerAction = 'profile/show')
 {
     $nick = self::parseUserNick($userId, $onEmpty);
     // new name is not found, lets return default
     if ($nick === $onEmpty || (int) $userId < 1) {
         return $nick;
     }
     return Url::link([$controllerAction, (int) $userId], $nick);
 }
Example #2
0
 /**
  * Validate input data from captcha
  * @param string|null $data
  * @return bool
  */
 public static function validate($data = null)
 {
     // nevertheless what we got in our model, recaptcha is suck and don't allow to change response field name
     $data = App::$Request->get('g-recaptcha-response');
     // make validation
     $request = Request::create('https://www.google.com/recaptcha/api/siteverify', 'GET', ['secret' => self::$secret, 'response' => $data, 'remoteip' => App::$Request->getClientIp()]);
     // make request and parse response
     $url = $request->getSchemeAndHttpHost() . $request->getRequestUri();
     $response = Url::download($url);
     $object = json_decode($response);
     return $object->success;
 }
Example #3
0
 /**
  * Add uri/url item to sitemap builder
  * @param string $uri
  * @param int|string $lastmod
  * @param string $freq
  * @param float $priority
  */
 public function add($uri, $lastmod, $freq = 'weekly', $priority = 0.5)
 {
     // generate multi-language files
     if ($this->langs !== null && Obj::isArray($this->langs) && count($this->langs) > 0) {
         foreach ($this->langs as $lang) {
             // set data to local attribute
             $this->data[$lang][] = ['uri' => Url::standaloneUrl($uri, $lang), 'lastmod' => Date::convertToDatetime($lastmod, 'c'), 'freq' => (string) $freq, 'priority' => (double) $priority];
         }
     } else {
         // only one language, multilanguage is disabled
         $this->data[App::$Properties->get('singleLanguage')][] = ['uri' => Url::standaloneUrl($uri), 'lastmod' => Date::convertToDatetime($lastmod, 'c'), 'freq' => (string) $freq, 'priority' => (double) $priority];
     }
 }
 /**
  * Build notification list as array
  */
 public function make()
 {
     // check if records is not empty
     if ($this->_records === null) {
         return;
     }
     // list records and build response
     foreach ($this->_records as $record) {
         /** @var UserNotification $record */
         $vars = null;
         if (!Str::likeEmpty($record->vars)) {
             $vars = $record->vars;
         }
         if (!$vars !== null && isset($vars['snippet'])) {
             $vars['snippet'] = Url::standaloneLink($vars['snippet'], $record->uri, App::$Request->getLanguage());
         }
         $text = App::$Translate->get('Profile', $record->msg, $vars);
         $this->items[] = ['text' => $text, 'date' => Date::humanize($record->created_at), 'new' => (bool) $record->readed === false];
     }
 }
Example #5
0
<?php

use Ffcms\Core\Helper\HTML\Form;
use Ffcms\Core\Helper\Url;
/** @var $model Apps\Model\Front\Profile\FormPasswordChange */
/** @var $this object */
$this->title = __('Change password');
$this->breadcrumbs = [Url::to('main/index') => __('Home'), Url::to('profile/show', \App::$User->identity()->getId()) => __('Profile'), __('Password')];
?>

<?php 
echo $this->render('profile/_settingsTab');
?>

<h1><?php 
echo __('Change password');
?>
</h1>
<hr />
<?php 
$form = new Form($model, ['class' => 'form-horizontal', 'action' => '', 'method' => 'post']);
echo $form->start();
?>

<?php 
echo $form->field('current', 'password', ['class' => 'form-control'], __('Enter your current account password'));
echo $form->field('new', 'password', ['class' => 'form-control'], __('Enter new password for account'));
echo $form->field('renew', 'password', ['class' => 'form-control'], __('Repeat new password for account'));
?>

<div class="col-md-offset-3 col-md-9"><?php 
Example #6
0
    var first_msg = [];

    window.jQ.push(function(){
        $(function(){
            var userListDom = $('#msg-user').clone();
            var dialogPanelDom = $('#dialog-title').clone();
            var myMsgDom = $('#msg-owner').clone();
            var remMsgDom = $('#msg-remote').clone();

            // load users with active dialog
            $.fn.loadDialogUsers = function() {
                $.getJSON(script_url+'/api/profile/listmessagedialog/'+dialog_offset+'/'+new_dialog+'/?lang='+script_lang, function(response){
                    if (response.status === 1) {
                        if (response.data.length < 1) {
                            $('#msg-layout').after('<p><?php 
echo __('You have no active dialogs. Find users to message with: %u%', ['u' => Url::link(['profile/index', 'all'], __('user list'))]);
?>
</p>');
                            $('#msg-layout').remove();
                            return false;
                        }
                        var userMap = '';
                        $('.media-person').removeClass(cssUserList.active);
                        $.each(response.data, function(key, row){
                            var itemClass = cssUserList.default;
                            if (row.user_id == active_dialog_id) {
                                itemClass += ' '+cssUserList.active;
                            }
                            if (row.user_block == true) {
                                itemClass += ' '+cssUserList.blocked;
                            }
Example #7
0
<?php

use Ffcms\Core\Helper\HTML\Form;
use Ffcms\Core\Helper\Url;
/** @var $model Apps\Model\Admin\Search\FormSettings */
$this->title = __('Search settings');
$this->breadcrumbs = [Url::to('main/index') => __('Main'), Url::to('application/index') => __('Applications'), Url::to('search/index') => __('Search'), __('Settings')];
?>

<h1><?php 
echo __('Search settings');
?>
</h1>
<hr />
<?php 
$form = new Form($model, ['class' => 'form-horizontal', 'action' => '', 'method' => 'post']);
?>

<?php 
echo $form->start();
?>

<?php 
echo $form->field('minLength', 'text', ['class' => 'form-control'], __('Set minimum user search query length. We are strongly recommend set this value more then 2.'));
echo $form->field('itemPerApp', 'text', ['class' => 'form-control'], __('How many founded items would be displayd for each search instance?'));
?>

<div class="col-md-offset-3 col-md-9"><?php 
echo $form->submitButton(__('Save'), ['class' => 'btn btn-primary']);
?>
</div>
Example #8
0
<?php

use Ffcms\Core\Helper\Url;
use Ffcms\Core\Helper\HTML\Table;
/** @var $records Apps\ActiveRecord\Demo */
// set page meta title
$this->title = __('Demo app');
// set breadcrumbs
$this->breadcrumbs = [Url::to('main/index') => __('Home'), __('Demo index')];
?>

<h1><?php 
echo __('Demo app index');
?>
</h1>
<hr />
<p><?php 
echo __('This is a front-end page demoapp package. Here you can see some examples of usage.');
?>
</p>
<p><?php 
echo __('Example of usage ActiveRecord result rendering in table');
?>
:</p>
<?php 
// build items from sql query (activerecord usage)
$items = [];
foreach ($records as $row) {
    $items[] = [['text' => $row->id], ['text' => $row->text]];
}
// display table with specified structure
Example #9
0
<h1><?php 
echo __('Delete comments and answers');
?>
</h1>
<hr />
<?php 
echo __('Are you sure to delete this comments or answers?');
?>

<?php 
$items = [];
foreach ($records as $item) {
    $message = Str::sub(\App::$Security->strip_tags($item->message), 0, 50);
    $author = Simplify::parseUserNick($item->user_id, $item->guest_name);
    if ((int) $item->user_id > 0) {
        $author = Url::link(['user/update', (int) $item->user_id], $author);
    }
    $items[] = [['text' => $item->id], ['text' => $message], ['text' => $author, 'html' => true], ['text' => Date::convertToDatetime($item->created_at, Date::FORMAT_TO_HOUR)]];
}
?>
<div class="table-responsive">
<?php 
echo Table::display(['table' => ['class' => 'table table-bordered'], 'thead' => ['titles' => [['text' => '#'], ['text' => __('Message')], ['text' => __('Author')], ['text' => __('Date')]]], 'tbody' => ['items' => $items]]);
?>
</div>


<?php 
$form = new Form($model, ['class' => 'form-horizontal', 'method' => 'post']);
echo $form->start();
?>
Example #10
0
<hr />
<p class="alert alert-warning"><?php 
echo __('This social account: %profile% used first time in our website. Please, complete form below', ['profile' => $model->profileLink]);
?>
</p>
<?php 
$form = new Form($model, ['class' => 'form-horizontal', 'method' => 'post', 'action' => '']);
?>

<?php 
echo $form->start();
?>

<?php 
echo $form->field('login', 'text', ['class' => 'form-control'], __('Enter your username for future use on the site'));
echo $form->field('email', 'text', ['class' => 'form-control'], __('Enter your e-mail for an account'));
echo $form->field('password', 'password', ['class' => 'form-control'], __('Enter a password for your account. It should be longer than 3 characters'));
echo $form->field('repassword', 'password', ['class' => 'form-control'], __('Repeat your password to be sure it correct'));
?>

<div class="col-md-9 col-md-offset-3">
    <?php 
echo $form->submitButton(__('Register and sign in'), ['class' => 'btn btn-primary']);
?>
    <?php 
echo Url::link(['user/login'], __('Cancel'), ['class' => 'btn btn-default']);
?>
</div>

<?php 
echo $form->finish();
Example #11
0
<?php

/** @var $records object */
/** @var $this object */
/** @var $model \Apps\Model\Admin\Content\FormContentPublish */
use Ffcms\Core\Helper\Date;
use Ffcms\Core\Helper\HTML\Form;
use Ffcms\Core\Helper\HTML\Table;
use Ffcms\Core\Helper\Simplify;
use Ffcms\Core\Helper\Url;
$this->title = __('Content publish');
$this->breadcrumbs = [Url::to('main/index') => __('Main'), Url::to('application/index') => __('Applications'), Url::to('content/index') => __('Contents'), __('Content publish')];
?>

<?php 
echo $this->render('content/_tabs');
?>

<h1><?php 
echo __('Content publish');
?>
</h1>
<hr />
<p><?php 
echo __('Are you sure to make this item public?');
?>
</p>
<?php 
$items = [];
foreach ($records as $record) {
    /** @var $record \Apps\ActiveRecord\Content */
Example #12
0
/assets/img/logo.png" class="img-responsive" style="padding-top: 5px;">
		</div>
		<!-- text logo -->
		<div class="col-md-7">
			<div class="site-name">
                <?php 
echo \Ffcms\Core\Helper\Url::link(['/'], 'FFCMS Demo');
?>
            </div>
			<p>This is a test description of new website.</p>
		</div>
		<!-- Search/language panel -->
		<div class="col-md-4">
			<!-- search panel -->
			<form method="get" action="<?php 
echo \Ffcms\Core\Helper\Url::to('search/index');
?>
" style="padding-top: 20px;">
				<div class="input-group">
					<input id="search-line" type="text" class="form-control" placeholder="<?php 
echo __('search query...');
?>
" name="query" autocomplete="off" required>
					<span class="input-group-btn">
						<button class="btn btn-default" id="search-submit" type="submit"><?php 
echo __('Find');
?>
</button>
					</span>
				</div>
			</form>
Example #13
0
<?php

use Ffcms\Core\Helper\Url;
$this->title = __('Demoapp authorized');
$this->breadcrumbs = [Url::to('main/index') => __('Home'), Url::to('demoapp/index') => __('Demo index'), __('Authorized view')];
?>
<h1>Demoapp - only authorized</h1>
<hr />
<p>Hello! You are authorized user and you can see this page!</p>
<?php 
echo \Ffcms\Core\Helper\HTML\Table::display(['table' => ['class' => 'table table-bordered'], 'thead' => ['titles' => [['text' => 'Param'], ['text' => 'Value']]], 'tbody' => ['items' => [[['type' => 'text', 'text' => 'User ID'], ['type' => 'text', 'text' => \App::$User->identity()->id]], [['type' => 'text', 'text' => 'User email'], ['type' => 'text', 'text' => \App::$User->identity()->email]], [['type' => 'text', 'text' => 'User Login'], ['type' => 'text', 'text' => \App::$User->identity()->login]], [['type' => 'text', 'text' => 'Profile DUMP'], ['type' => 'text', 'text' => \App::$User->identity()->getProfile()]]]]]);
Example #14
0
        $class = 'label-danger';
        $tooltip = __('Location: %loc%. Required permissions: +rw', ['loc' => $dir]);
    }
    echo '<span class="label ' . $class . '" data-toggle="tooltip" title="' . $tooltip . '">' . $dir . '</span> ';
}
?>
                <hr />
                <?php 
echo __('All directories and files in this list required to be readable and writable.');
?>
                <hr />
                <?php 
echo \Ffcms\Core\Helper\Url::link(['main/cache'], __('Clear cache'), ['class' => 'btn btn-warning']);
?>
                <?php 
echo \Ffcms\Core\Helper\Url::link(['main/sessions'], __('Clear sessions'), ['class' => 'btn btn-info']);
?>
            </div>
        </div>
    </div>
    <div class="col-md-4">
        <div class="panel panel-default">
            <div class="panel-heading">
                <?php 
echo __('FFCMS News');
?>
                <a href="https://ffcms.org" class="label label-success" target="_blank"><?php 
echo __('Official website');
?>
</a>
            </div>
Example #15
0
echo __('Feedback message #%id%', ['id' => $post->id]);
?>
</h1>
<?php 
if (\App::$User->isAuth()) {
    echo $this->render('feedback/_authTabs');
} else {
    echo "<hr />";
}
?>

<?php 
if ((int) $post->closed === 0 && \App::$User->isAuth()) {
    $user = App::$User->identity();
    if ($user->getId() === (int) $post->user_id) {
        echo '<div class="pull-right">' . Url::link(['feedback/close', $post->id, $post->hash], __('Close request'), ['class' => 'btn btn-danger']) . '</div>';
    }
}
?>

<div class="row">
    <div class="col-md-12">
        <div class="panel panel-info">
            <div class="panel-heading">
                <strong><?php 
echo $post->name;
?>
 (<?php 
echo $post->email;
?>
)</strong>,
Example #16
0
<h1><?php 
echo __('User list');
?>
</h1>
<hr />
<?php 
$items = [];
foreach ($records as $user) {
    $items[] = [1 => ['text' => $user->id], 2 => ['text' => $user->email], 3 => ['text' => $user->login], 4 => ['text' => $user->getRole()->name], 5 => ['text' => Date::convertToDatetime($user->created_at, Date::FORMAT_TO_DAY)], 6 => ['text' => Url::link(['user/update', $user->id], '<i class="fa fa-pencil fa-lg"></i>') . Url::link(['user/delete', $user->id], ' <i class="fa fa-trash-o fa-lg"></i>'), 'html' => true, 'property' => ['class' => 'text-center']], 'property' => ['class' => 'checkbox-row' . ($user->approve_token != '0' ? ' alert-warning' : null)]];
}
?>

<div class="pull-right">
    <?php 
echo Url::link(['user/invite'], __('Send invite'), ['class' => 'btn btn-primary']);
?>
    <?php 
echo Url::link(['user/update', '0'], __('Add user'), ['class' => 'btn btn-primary']);
?>
</div>

<?php 
echo Table::display(['table' => ['class' => 'table table-bordered'], 'thead' => ['titles' => [['text' => '#'], ['text' => __('Email')], ['text' => __('Login')], ['text' => __('Role')], ['text' => __('Register date')], ['text' => __('Actions')]]], 'tbody' => ['items' => $items], 'selectableBox' => ['attachOrder' => 1, 'form' => ['method' => 'GET', 'class' => 'form-horizontal', 'action' => Url::to('user/delete')], 'selector' => ['type' => 'checkbox', 'name' => 'selected[]', 'class' => 'massSelectId'], 'buttons' => [['type' => 'submit', 'class' => 'btn btn-danger', 'value' => __('Delete selected')]]]]);
?>

<div class="text-center">
    <?php 
echo $pagination->display(['class' => 'pagination pagination-centered']);
?>
</div>
Example #17
0
?>

<h2><?php 
echo __('List of blocked users');
?>
</h2>
<hr />
<?php 
if ($records !== null && $records->count() > 0) {
    ?>
    <?php 
    $items = [];
    foreach ($records as $row) {
        $userProfile = $row->getUser()->getProfile();
        $userNick = \Ffcms\Core\Helper\Simplify::parseUserNick($userProfile->user_id, __('No name'));
        $items[] = [['text' => Url::link(['profile/show', $row->target_id], $userNick, ['target' => '_blank']), 'html' => true], ['text' => $row->comment], ['text' => Date::convertToDatetime($row->created_at, Date::FORMAT_TO_DAY)], ['text' => Url::link(['profile/unblock', $row->target_id], '<i class="fa fa-times"></i>'), 'html' => true, 'property' => ['class' => 'text-center']]];
    }
    ?>


    <?php 
    echo Table::display(['table' => ['class' => 'table table-bordered'], 'thead' => ['titles' => [['text' => __('User')], ['text' => __('Comment')], ['text' => __('Add date')], ['text' => __('Actions')]]], 'tbody' => ['items' => $items]]);
    ?>
    <div class="text-center">
        <?php 
    echo $pagination->display(['class' => 'pagination pagination-centered']);
    ?>
    </div>
<?php 
} else {
    ?>
Example #18
0
<?php

use Ffcms\Core\Helper\HTML\Form;
use Ffcms\Core\Helper\Url;
/** @var \Apps\Model\Admin\Main\EntityUpdate $entityModel */
/** @var \Apps\Model\Admin\Main\FormUpdateDatabase $dbModel */
/** @var \Apps\Model\Admin\Main\FormUpdateDownload $downloadModel */
$this->breadcrumbs = [Url::to('main/index') => __('Main'), __('Updates')];
$this->title = __('Updates');
?>
<h1><?php 
echo __('Update manager');
?>
</h1>
<hr />
<div class="table-responsive">
<?php 
echo \Ffcms\Core\Helper\HTML\Table::display(['table' => ['class' => 'table table-striped table-hover'], 'tbody' => ['items' => [[['text' => __('Scripts version')], ['text' => $entityModel->scriptVersion], 'property' => ['class' => $entityModel->haveRemoteNew ? 'warning' : null]], [['text' => __('Database version')], ['text' => $entityModel->dbVersion], 'property' => ['class' => !$entityModel->versionsEqual ? 'danger' : null]], [['text' => __('Last version')], ['text' => $entityModel->lastVersion], 'property' => ['class' => $entityModel->haveRemoteNew ? 'success' : null]]]]]);
?>
</div>
<?php 
if (!$entityModel->versionsEqual) {
    ?>
    <p><?php 
    echo __('Seems like scripts and database of your website have different versions. You should do update right now or your website can working unstable');
    ?>
</p>
    <p><?php 
    echo __('This updates for database will be applied:');
    ?>
</p>
Example #19
0
#comments-list"><?php 
    echo __('Comments');
    ?>
: <span itemprop="commentCount" id="comment-count-<?php 
    echo $item['id'];
    ?>
">0</span></a>
            </span>
            <span class="pull-right">
            <?php 
    if ((int) $catConfigs['showTags'] === 1 && $item['tags'] !== null && Obj::isArray($item['tags'])) {
        ?>
                <span class="spaced"><i class="fa fa-tags hidden-xs"></i>
                <?php 
        foreach ($item['tags'] as $tag) {
            echo Url::link(['content/tag', $tag], $tag, ['class' => 'label label-default']) . "&nbsp;";
        }
        ?>
                </span>
                <meta itemprop="keywords" content="<?php 
        implode(',', $item['tags']);
        ?>
">
            <?php 
    }
    ?>
            </span>
        </div>
    </article>
	<script>
		contentItemList['path'][<?php 
Example #20
0
<?php

use Ffcms\Core\Helper\Url;
/** @var \Apps\ActiveRecord\ContentTag $records */
?>

<?php 
foreach ($records as $row) {
    echo Url::link(['content/tag', $row['tag']], $row['tag'], ['class' => 'label label-default']) . ' ';
}
Example #21
0
<?php

use Ffcms\Core\Helper\HTML\Form;
use Ffcms\Core\Helper\Url;
/** @var $model \Apps\Model\Admin\Main\EntityDeleteRoute */
$this->breadcrumbs = [Url::to('main/index') => __('Main'), Url::to('main/routing') => __('Routing'), __('Deleting route')];
$this->title = __('Deleting route');
?>

<h1><?php 
echo __('Deleting route');
?>
</h1>
<hr />
<?php 
$form = new Form($model, ['class' => 'form-horizontal', 'method' => 'post', 'action' => '']);
echo $form->start();
?>

<?php 
echo $form->field('type', 'text', ['disabled' => true, 'class' => 'form-control']);
echo $form->field('loader', 'text', ['disabled' => true, 'class' => 'form-control']);
echo $form->field('source', 'text', ['disabled' => true, 'class' => 'form-control']);
?>


<div class="col-md-9 col-md-offset-3"><?php 
echo $form->submitButton(__('Delete this route'), ['class' => 'btn btn-danger']);
?>
</div>
Example #22
0
<?php

use Ffcms\Core\Helper\HTML\Form;
use Ffcms\Core\Helper\Url;
/** @var $model \Apps\Model\Admin\UserSettings */
$this->title = __('Settings');
$this->breadcrumbs = [Url::to('main/index') => __('Main'), Url::to('application/index') => __('Applications'), Url::to('user/index') => __('User list'), __('Settings')];
?>

<?php 
echo $this->render('user/_tabs');
?>

<h1><?php 
echo $this->title;
?>
</h1>
<hr />

<?php 
$form = new Form($model, ['class' => 'form-horizontal', 'method' => 'post', 'action' => '']);
?>

<?php 
echo $form->start();
?>

<?php 
echo $form->field('registrationType', 'select', ['class' => 'form-control', 'options' => ['0' => __('Only invite'), '1' => __('Email approve'), '2' => __('Full opened')], 'optionsKey' => true]);
echo $form->field('captchaOnLogin', 'checkbox', null, __('Show captcha on login form?'));
echo $form->field('captchaOnRegister', 'checkbox', null, __('Show captcha on registration form?'));
Example #23
0
<?php

use Ffcms\Core\Helper\Url;
/** @var object $this */
$this->title = __('Route removed');
?>
<h1><?php 
echo __('Congratulations!');
?>
</h1>
<hr />
<p><?php 
echo __('Route is successful deleted! Wait 5 second to update configurations');
?>
</p>
<?php 
echo Url::link(['main/routing'], __('Reload'), ['class' => 'btn btn-primary']);
?>
<script>
setTimeout(function () {
	window.location.replace("<?php 
echo Url::to('main/routing');
?>
");
 }, 5000);
</script>
Example #24
0
?>

<?php 
echo $this->render('comments/_tabs');
?>

<h1><?php 
echo __('Edit comment/answer');
?>
</h1>
<hr />
<?php 
$form = new Form($model, ['class' => 'form-horizontal', 'method' => 'post']);
echo $form->start();
?>

<?php 
echo $form->field('guestName', 'text', ['class' => 'form-control'], __('Guest name for this comment or answer if defined'));
echo $form->field('message', 'textarea', ['class' => 'form-control wysi-comments', 'html' => true], __('Comment message text'));
?>

<?php 
echo $form->submitButton(__('Save'), ['class' => 'btn btn-primary']);
?>

<?php 
echo Url::link(['comments/read', $model->getCommentId()], __('Back'), ['class' => 'btn btn-warning']);
?>

<?php 
echo $form->finish();
Example #25
0
<?php

use Ffcms\Core\Helper\HTML\Listing;
use Ffcms\Core\Helper\Url;
/** @var \Apps\Model\Front\Profile\EntityNotificationsList $model */
/** @var \Ffcms\Core\Helper\HTML\SimplePagination $pagination */
$this->title = __('My notifications');
$this->breadcrumbs = [Url::to('main/index') => __('Home'), Url::to('profile/show', \App::$User->identity()->id) => __('Profile'), $this->title];
?>
<h1><?php 
echo __('Notifications');
?>
</h1>
<hr />
<div class="row">
    <div class="col-md-12">
        <div class="pull-right">
            <?php 
echo Listing::display(['type' => 'ul', 'property' => ['class' => 'list-inline'], 'items' => [['type' => 'link', 'link' => ['profile/notifications', 'all'], 'text' => __('All')], ['type' => 'link', 'link' => ['profile/notifications', 'unread'], 'text' => __('Unread')]]]);
?>
        </div>
    </div>
</div>
<?php 
if ($model->items === null || count($model->items) < 1) {
    echo '<p class="alert alert-warning">' . __('No notifications available') . '</p>';
    return;
}
foreach ($model->items as $item) {
    ?>
    <div class="notice<?php 
Example #26
0
                    answerField.find('#answer-counter').attr('id', 'answer-counter-'+postId);

                    var addAnswerField = '';
                    if (viewer_id > 0) {
                        addAnswerField = answerField.html();
                    }

                    var answers = '';
                    $.each(json.data, function(idx, row) {
                        // clone general dom element
                        var dom = answerDom.clone();
                        // set avatar src
                        dom.find('#wall-answer-avatar').attr('src', row.user_avatar).removeAttr('id');
                        // set user link
                        dom.find('#wall-answer-userlink').attr('href', '<?php 
echo Url::to('profile/show');
?>
/'+row.user_id).text(row.user_nick).removeAttr('id');
                        // set date
                        dom.find('#wall-answer-date').text(row.answer_date).removeAttr('id');
                        // set message text
                        dom.find('#wall-answer-text').text(row.answer_message);
                        // check if this user can remove answers - answer writer or target user profile
                        if (is_self_profile || row.user_id === viewer_id) {
                            dom.find('#delete-answer').attr('href', '#send-wall-object-'+postId).attr('id', 'delete-answer-'+row.answer_id+'-'+postId).removeClass('hidden');
                        }

                        answers += dom.html();
                    });
                    $('#wall-answer-dom-'+postId).html(addAnswerField + answers);
                })
Example #27
0
<?php

/** @var $this \Ffcms\Core\Arch\View */
/** @var $model \Apps\Model\Front\Sitemap\EntityIndexList */
use Ffcms\Core\Helper\Url;
$this->title = __('Sitemap');
$this->breadcrumbs = [Url::to('main/index') => __('Main'), Url::to('application/index') => __('Applications'), __('Sitemap')];
?>
<h1><?php 
echo __('Sitemap');
?>
</h1>
<hr />
<p><?php 
echo __('Sitemap its a special application to generate sitemap as xml file over sitemap standart for search engines.');
?>
</p>
<p><?php 
echo __('Sitemap main index');
?>
: <a href="<?php 
echo \App::$Alias->scriptUrl . '/sitemap';
?>
" target="_blank">/sitemap</a></p>
<h3><?php 
echo __('Sitemap files');
?>
</h3>
<?php 
$items = [];
if ($model->files === null || count($model->files) < 1) {
Example #28
0
<?php

use Ffcms\Core\Helper\HTML\Form;
use Ffcms\Core\Helper\Simplify;
use Ffcms\Core\Helper\Url;
/** @var $model Apps\Model\Front\Profile\FormIgnoreDelete */
/** @var $this object */
$this->title = __('Blacklist user remove');
$this->breadcrumbs = [Url::to('main/index') => __('Home'), Url::to('profile/show', \App::$User->identity()->getId()) => __('Profile'), Url::to('profile/ignore') => __('Blacklist'), __('Blacklist cleanup')];
?>

<?php 
echo $this->render('profile/_settingsTab');
?>
<h1><?php 
echo __('Remove user from blacklist');
?>
</h1>
<hr />
<?php 
$form = new Form($model, ['class' => 'form-horizontal', 'action' => '', 'method' => 'post']);
echo $form->start();
?>

<div class="row">
    <div class="col-md-3">
        <label class="pull-right"><?php 
echo $model->getLabel('name');
?>
</label>
    </div>
Example #29
0
                <?php 
        echo __('From');
        ?>
: <?php 
        echo $answer->name . '(' . $answer->email . ')' . ((int) $answer->user_id > 0 ? Url::link(['user/update', $answer->user_id], '[id' . $answer->user_id . ']') : null);
        ?>
,
                <?php 
        echo Date::convertToDatetime($answer->created_at, Date::FORMAT_TO_HOUR);
        ?>
                <span class="pull-right">
                    <?php 
        echo Url::link(['feedback/update', 'answer', $answer->id], __('Edit'), ['class' => 'label label-primary']);
        ?>
                    <?php 
        echo Url::link(['feedback/delete', 'answer', $answer->id], __('Delete'), ['class' => 'label label-danger']);
        ?>
                </span>
            </div>
            <div class="panel-body">
                <?php 
        echo Str::replace("\n", "<br />", $answer->message);
        ?>
            </div>
        </div>
    <?php 
    }
}
?>

<?php 
Example #30
0
                <?php 
    echo Url::link(['profile/show', $profile->user_id], Str::likeEmpty($profile->nick) ? __('No name') . '(id' . $profile->user_id . ')' : $profile->nick);
    ?>
            </h3>
            <p><?php 
    echo __('Registered');
    ?>
: <?php 
    echo Date::convertToDatetime($profile->created_at, Date::FORMAT_TO_DAY);
    ?>
</p>
            <?php 
    if (\App::$User->identity() !== null && $profile->user_id !== \App::$User->identity()->getId()) {
        ?>
                <?php 
        echo Url::link(['profile/messages', null, null, ['newdialog' => $profile->user_id]], '<i class="fa fa-pencil-square-o"></i> ' . __('New message'), ['class' => 'btn btn-info']);
        ?>
            <?php 
    }
    ?>
        </div>
        <div class="col-md-2">
            <div class="h3 pull-right">
                <?php 
    $markLabel = 'badge';
    if ($profile->rating > 0) {
        $markLabel = 'alert-success';
    } elseif ($profile->rating < 0) {
        $markLabel = 'alert-danger';
    }
    ?>