Beispiel #1
1
 public function sessions($sessions)
 {
     $this->title($this('sessions'));
     $active_sessions = $this->load->library('table')->add_columns(array(array('content' => function ($data) {
         return $data['remember_me'] ? '<i class="fa fa-toggle-on text-green" data-toggle="tooltip" title="' . i18n('persistent_connection') . '"></i>' : '<i class="fa fa-toggle-off text-grey" data-toggle="tooltip" title="' . i18n('nonpersistent_connection') . '"></i>';
     }, 'size' => TRUE, 'align' => 'center'), array('content' => function ($data) {
         return user_agent($data['user_agent']);
     }, 'size' => TRUE, 'align' => 'center'), array('title' => $this('ip_address'), 'content' => function ($data) {
         return geolocalisation($data['ip_address']) . '<span data-toggle="tooltip" data-original-title="' . $data['host_name'] . '">' . $data['ip_address'] . '</span>';
     }), array('title' => $this('reference'), 'content' => function ($data, $loader) {
         return $data['referer'] ? urltolink($data['referer']) : $loader->lang('unknown');
     }), array('title' => $this('initial_session_date'), 'content' => function ($data) {
         return '<span data-toggle="tooltip" title="' . timetostr(NeoFrag::loader()->lang('date_time_long'), $data['date']) . '">' . time_span($data['date']) . '</span>';
     }), array('title' => $this('last_activity'), 'content' => function ($data) {
         return '<span data-toggle="tooltip" title="' . timetostr(NeoFrag::loader()->lang('date_time_long'), $data['last_activity']) . '">' . time_span($data['last_activity']) . '</span>';
     }), array('content' => array(function ($data) {
         if ($data['session_id'] != NeoFrag::loader()->session('session_id')) {
             return button_delete('user/sessions/delete/' . $data['session_id'] . '.html');
         }
     }))))->pagination(FALSE)->data($this->user->get_sessions())->save();
     $sessions_history = $this->table->add_columns(array(array('content' => function ($data) {
         return user_agent($data['user_agent']);
     }, 'size' => TRUE, 'align' => 'center'), array('title' => $this('ip_address'), 'content' => function ($data) {
         return geolocalisation($data['ip_address']) . '<span data-toggle="tooltip" data-original-title="' . $data['host_name'] . '">' . $data['ip_address'] . '</span>';
     }), array('title' => $this('reference'), 'content' => function ($data, $loader) {
         return $data['referer'] ? urltolink($data['referer']) : $loader->lang('unknown');
     }), array('title' => $this('initial_session_date'), 'content' => function ($data) {
         return '<span data-toggle="tooltip" title="' . timetostr(NeoFrag::loader()->lang('date_time_long'), $data['date']) . '">' . time_span($data['date']) . '</span>';
     })))->data($sessions)->no_data($this('no_historic_available'));
     return array(new Panel(array('title' => $this('my_active_sessions'), 'icon' => 'fa-shield', 'content' => $active_sessions->display())), new Panel(array('title' => $this('sessions_historic'), 'icon' => 'fa-power-off', 'content' => $sessions_history->display())), new Button_back('user.html'));
 }
Beispiel #2
0
 public function index()
 {
     $users = $this->title($this('dashboard'))->js('jquery.knob')->js_load('$(\'.knob\').knob();')->load->library('table')->add_columns(array(array('content' => function ($data) {
         return '<a href="mailto:' . $data['email'] . '" data-toggle="tooltip" title="' . $data['email'] . '">' . icon('fa-envelope') . '</a>';
     }), array('content' => function ($data) {
         return NeoFrag::loader()->user->link($data['user_id'], $data['username']);
     }), array('content' => function ($data, $loader) {
         return '<span data-toggle="tooltip" title="' . timetostr($loader->lang('date_time_long'), $data['registration_date']) . '">' . time_span($data['registration_date']) . '</span>';
     }, 'class' => 'text-right')))->data($this->db->from('nf_users')->where('deleted', FALSE)->order_by('user_id DESC')->limit(5)->get())->display();
     return array(new Row(new Col(new Panel_box(array('label' => $this('news', $count = $this->db->select('COUNT(*)')->from('nf_news')->where('published', TRUE)->row()), 'icon' => 'fa-newspaper-o', 'color' => 'bg-aqua', 'count' => $count, 'url' => 'admin/news.html', 'footer' => $this('manage_news') . ' ' . icon('fa-arrow-circle-right'), 'size' => 'col-md-4 col-lg-2'))), new Col(new Panel_box(array('label' => $this('members', $count = $this->db->select('COUNT(*)')->from('nf_users')->where('deleted', FALSE)->row()), 'icon' => 'fa-users', 'color' => 'bg-green', 'count' => $count, 'url' => 'admin/members.html', 'footer' => $this('manage_members') . ' ' . icon('fa-arrow-circle-right'), 'size' => 'col-md-4 col-lg-2'))), new Col(new Panel_box(array('label' => $this('events', $count = 0, $count), 'icon' => 'fa-calendar', 'color' => 'bg-blue', 'count' => $count, 'url' => 'admin/events.html', 'footer' => $this('manage_events') . ' ' . icon('fa-arrow-circle-right'), 'size' => 'col-md-4 col-lg-2'))), new Col(new Panel_box(array('label' => $this('teams', $count = $this->db->select('COUNT(*)')->from('nf_teams')->row(), $count), 'icon' => 'fa-gamepad', 'color' => 'bg-red', 'count' => $count, 'url' => 'admin/teams.html', 'footer' => $this('manage_teams') . ' ' . icon('fa-arrow-circle-right'), 'size' => 'col-md-4 col-lg-2'))), new Col(new Panel_box(array('label' => $this('messages', $count = $this->db->select('COUNT(*)')->from('nf_forum_messages')->row()), 'icon' => 'fa-comments', 'color' => 'bg-teal', 'count' => $count, 'url' => 'admin/forum.html', 'footer' => $this('manage_forum') . ' ' . icon('fa-arrow-circle-right'), 'size' => 'col-md-4 col-lg-2'))), new Col(new Panel_box(array('label' => $this('comments', $count = $this->db->select('COUNT(*)')->from('nf_comments')->row()), 'icon' => 'fa-comments-o', 'color' => 'bg-maroon', 'count' => $count, 'url' => 'admin/comments.html', 'footer' => $this('manage_comments') . ' ' . icon('fa-arrow-circle-right'), 'size' => 'col-md-4 col-lg-2')))), new Row(new Col(new Widget_view(array('widget_id' => 1)), new Panel(array('title' => '<a href="//www.neofrag.com">' . $this('nf_news') . '</a>', 'icon' => 'fa-newspaper-o', 'content' => $this->load->view('nf_news'), 'size' => 'col-md-8'))), new Col(new Panel(array('title' => $this('connected_users'), 'icon' => 'fa-globe', 'content' => $this->load->view('users_online', array('currently' => $this->db->select('COUNT(*)')->from('nf_sessions')->where('last_activity > DATE_SUB(NOW(), INTERVAL 5 MINUTE)')->where('is_crawler', FALSE)->row(), 'max' => statistics('nf_sessions_max_simultaneous'))), 'footer' => '<a href="' . url('admin/members/sessions.html') . '">' . $this('view_all_sessions') . '</a>', 'size' => 'col-md-4')), new Panel(array('title' => $this('last_registrations'), 'icon' => 'fa-users', 'content' => $users, 'size' => 'col-md-4')))));
 }
Beispiel #3
0
 public function index($news)
 {
     $this->title($this('news'))->load->library('table');
     $news = $this->table->add_columns(array(array('content' => function ($data, $loader) {
         return $data['published'] ? '<i class="fa fa-circle" data-toggle="tooltip" title="' . $loader->lang('published') . '" style="color: #7bbb17;"></i>' : '<i class="fa fa-circle-o" data-toggle="tooltip" title="' . $loader->lang('awaiting_publication') . '" style="color: #535353;"></i>';
     }, 'sort' => function ($data) {
         return $data['published'];
     }, 'size' => TRUE), array('title' => $this('title'), 'content' => function ($data) {
         return '<a href="' . url('news/' . $data['news_id'] . '/' . url_title($data['title']) . '.html') . '">' . $data['title'] . '</a>';
     }, 'sort' => function ($data) {
         return $data['title'];
     }, 'search' => function ($data) {
         return $data['title'];
     }), array('title' => $this('category'), 'content' => function ($data) {
         return '<a href="' . url('admin/news/categories/' . $data['category_id'] . '/' . $data['category_name'] . '.html') . '"><img src="' . path($data['category_icon']) . '" alt="" /> ' . $data['category_title'] . '</a>';
     }, 'sort' => function ($data) {
         return $data['category_title'];
     }, 'search' => function ($data) {
         return $data['category_title'];
     }), array('title' => $this('author'), 'content' => function ($data) {
         return NeoFrag::loader()->user->link($data['user_id'], $data['username']);
     }, 'sort' => function ($data) {
         return $data['username'];
     }, 'search' => function ($data) {
         return $data['username'];
     }), array('title' => $this('date'), 'content' => function ($data) {
         return '<span data-toggle="tooltip" title="' . timetostr(NeoFrag::loader()->lang('date_time_long'), $data['date']) . '">' . time_span($data['date']) . '</span>';
     }, 'sort' => function ($data) {
         return $data['date'];
     }), array('title' => '<i class="fa fa-comments-o" data-toggle="tooltip" title="' . i18n('comments') . '"></i>', 'content' => function ($data) {
         return NeoFrag::loader()->library('comments')->admin_comments('news', $data['news_id']);
     }, 'size' => TRUE), array('content' => array(function ($data) {
         return button_edit('admin/news/' . $data['news_id'] . '/' . url_title($data['title']) . '.html');
     }, function ($data) {
         return button_delete('admin/news/delete/' . $data['news_id'] . '/' . url_title($data['title']) . '.html');
     }), 'size' => TRUE)))->sort_by(5, SORT_DESC, SORT_NUMERIC)->data($news)->no_data($this('no_news'))->display();
     $categories = $this->table->add_columns(array(array('content' => function ($data) {
         return '<a href="' . url('admin/news/categories/' . $data['category_id'] . '/' . $data['name'] . '.html') . '"><img src="' . path($data['icon_id']) . '" alt="" /> ' . $data['title'] . '</a>';
     }, 'search' => function ($data) {
         return $data['title'];
     }, 'sort' => function ($data) {
         return $data['title'];
     }), array('content' => array(function ($data) {
         return button_edit('admin/news/categories/' . $data['category_id'] . '/' . $data['name'] . '.html');
     }, function ($data) {
         return button_delete('admin/news/categories/delete/' . $data['category_id'] . '/' . $data['name'] . '.html');
     }), 'size' => TRUE)))->pagination(FALSE)->data($this->model('categories')->get_categories())->no_data($this('no_category'))->display();
     return new Row(new Col(new Panel(array('title' => $this('categories'), 'icon' => 'fa-align-left', 'content' => $categories, 'footer' => button_add('admin/news/categories/add.html', $this('create_category')), 'size' => 'col-md-12 col-lg-3'))), new Col(new Panel(array('title' => $this('list_news'), 'icon' => 'fa-file-text-o', 'content' => $news, 'footer' => button_add('admin/news/add.html', $this('add_news')), 'size' => 'col-md-12 col-lg-9'))));
 }
Beispiel #4
0
$actions = array();
if ($NeoFrag->user() && is_null($data['parent_id'])) {
    $actions[] = '<a class="comment-reply" href="#" data-comment-id="' . $data['comment_id'] . '">' . icon('fa-mail-reply') . ' ' . $NeoFrag->lang('reply') . '</a>';
}
if ($NeoFrag->user('admin') || $NeoFrag->user() && $NeoFrag->user('user_id') == $data['user_id']) {
    $actions[] = button_delete('ajax/comments/delete/' . $data['comment_id'] . '.html');
}
if ($actions) {
    echo '<div class="pull-right">' . implode($actions) . '</div>';
}
?>
		<h4 class="media-heading">
			<?php 
echo $data['user_id'] ? $NeoFrag->user->link($data['user_id'], $data['username']) : i18n('guest');
?>
			<small><?php 
echo icon('fa-clock-o') . ' ' . time_span($data['date']);
?>
</small>
		</h4>
		<?php 
echo $data['content'] ? strtolink(nl2br($data['content']), TRUE) : '<i>' . $NeoFrag->lang('removed_message') . '</i>';
?>
	</div>
</div>
<hr<?php 
if (!is_null($data['parent_id'])) {
    echo ' class="comments-child"';
}
?>
 />
Beispiel #5
0
" class="media-left">
		<img style="width: 48px; height: 48px;" src="<?php 
    echo $NeoFrag->user->avatar($news['avatar'], $news['sex']);
    ?>
" data-toggle="tooltip" title="<?php 
    echo $news['username'];
    ?>
" alt="" />
	</a>
	<div class="media-body">
		<h4 class="media-heading"><a href="<?php 
    echo url('news/' . $news['news_id'] . '/' . url_title($news['title']) . '.html');
    ?>
"><?php 
    echo $news['title'];
    ?>
</a></h4>
		<?php 
    echo icon('fa-clock-o') . ' ' . time_span($news['date']);
    ?>
 <a href="<?php 
    echo url('news/' . $news['news_id'] . '/' . url_title($news['title']) . '.html');
    ?>
#comments"><?php 
    echo icon('fa-comment-o') . ' ' . $NeoFrag->load->library('comments')->count_comments('news', $news['news_id']);
    ?>
</a>
	</div>
</div>
<?php 
}
foreach ($data['users'] as $user) {
    ?>
				<div class="media">
					<div class="media-left">
						<a href="<?php 
    echo url('members/' . $user['user_id'] . '/' . url_title($user['username']) . '.html');
    ?>
">
							<img src="<?php 
    echo $NeoFrag->user->avatar($user['avatar'], $user['sex']);
    ?>
" style="max-width: 40px; max-height: 40px;" alt="" />
						</a>
					</div>
					<div class="media-body">
						<h4 class="media-heading"><?php 
    echo $NeoFrag->user->link($user['user_id'], $user['username']);
    ?>
</h4>
						<?php 
    echo icon('fa-clock-o') . ' ' . time_span($user['last_activity']);
    ?>
					</div>
				</div>
				<?php 
}
?>
			</div>
		</div>
	</div>
</div>
Beispiel #7
0
 public function _sessions($sessions)
 {
     $this->title($this('sessions'))->subtitle($this('list_active_sessions'))->icon('fa-globe')->load->library('table')->preprocessing(function ($row) {
         $user_data = unserialize($row['user_data']);
         $row['date'] = $user_data['session']['date'];
         $row['history'] = array_reverse($user_data['session']['history']);
         $row['user_agent'] = $user_data['session']['user_agent'];
         $row['referer'] = $user_data['session']['referer'];
         unset($row['user_data']);
         return $row;
     })->add_columns(array(array('content' => function ($data) {
         return $data['remember_me'] ? '<i class="fa fa-toggle-on text-green" data-toggle="tooltip" title="Connexion persistante"></i>' : '<i class="fa fa-toggle-off text-grey" data-toggle="tooltip" title="Connexion non persistante"></i>';
     }, 'size' => TRUE, 'align' => 'center'), array('title' => $this('user'), 'content' => function ($data, $loader) {
         return $data['user_id'] ? NeoFrag::loader()->user->link($data['user_id'], $data['username']) : '<i>' . $loader->lang('guest') . '</i>';
     }, 'search' => function ($data, $loader) {
         return $data['user_id'] ? $data['username'] : $loader->lang('guest');
     }, 'sort' => function ($data, $loader) {
         return $data['user_id'] ? $data['username'] : $loader->lang('guest');
     }), array('content' => function ($data) {
         return user_agent($data['user_agent']);
     }, 'size' => TRUE, 'align' => 'center', 'search' => function ($data) {
         return $data['user_agent'];
     }, 'sort' => function ($data) {
         return $data['user_agent'];
     }), array('title' => $this('ip_address'), 'content' => function ($data) {
         return geolocalisation($data['ip_address']) . '<span data-toggle="tooltip" data-original-title="' . $data['host_name'] . '">' . $data['ip_address'] . '</span>';
     }, 'search' => function ($data) {
         return $data['ip_address'];
     }, 'sort' => function ($data) {
         return $data['ip_address'];
     }), array('title' => $this('referer'), 'content' => function ($data, $loader) {
         return $data['referer'] ? urltolink($data['referer']) : $loader->lang('none');
     }, 'search' => function ($data) {
         return $data['user_agent'];
     }, 'sort' => function ($data) {
         return $data['user_agent'];
     }), array('title' => $this('arrival_date'), 'content' => function ($data) {
         return '<span data-toggle="tooltip" title="' . timetostr(NeoFrag::loader()->lang('date_time_long'), $data['date']) . '">' . time_span($data['date']) . '</span>';
     }, 'sort' => function ($data) {
         return $data['date'];
     }), array('title' => $this('last_activity'), 'content' => function ($data) {
         return '<span data-toggle="tooltip" title="' . timetostr(NeoFrag::loader()->lang('date_time_long'), $data['last_activity']) . '">' . time_span($data['last_activity']) . '</span>';
     }, 'sort' => function ($data) {
         return $data['last_activity'];
     }), array('title' => $this('history'), 'content' => function ($data, $loader) {
         $links = implode('<br />', array_map(function ($a) {
             return '<a href="' . url($a) . '">' . $a . '</a>';
         }, $data['history']));
         return '<span data-toggle="popover" title="' . $loader->lang('last_pages_visited') . '" data-content="' . utf8_htmlentities($links) . '" data-placement="auto" data-html="1">' . icon('fa-history') . ' ' . reset($data['history']) . '</span>';
     }), array('content' => array(function ($data) {
         if ($data['user_id'] && $data['session_id'] != NeoFrag::loader()->session('session_id')) {
             return button_delete('admin/members/sessions/delete/' . $data['session_id'] . '.html');
         }
     }))))->data($sessions);
     return new Panel(array('title' => $this('sessions'), 'icon' => 'fa-globe', 'content' => $this->table->display()));
 }
						<a href="<?php 
        echo url('forum/message/delete/' . $message['message_id'] . '/' . url_title($data['title']) . '.html');
        ?>
" class="btn btn-xs btn-primary delete"><?php 
        echo icon('fa-close');
        ?>
</a>
					<?php 
    }
    ?>
					</div>
					<a name="message_<?php 
    echo $message['message_id'];
    ?>
"></a><?php 
    echo icon('fa-clock-o') . ' ' . time_span($message['date']) . ' ' . ($data['last_message_read'] && $message['date'] <= $data['last_message_read'] ? icon('fa-comment-o') . ' ' . i18n('message_read') : icon('fa-comment') . ' ' . i18n('message_unread'));
    ?>
				</div>
				<hr />
				<?php 
    echo !is_null($message['message']) ? bbcode($message['message']) : i18n('message_deleted');
    ?>
				<?php 
    if (!empty($message['signature'])) {
        ?>
				<hr />
				<?php 
        echo bbcode($message['signature']);
        ?>
				<?php 
    }
Beispiel #9
0
</b></td>
			<td class="col-lg-9 col-md-8 col-xs-7"><?php 
echo time_span($data['registration_date']);
?>
</td>
		</tr>
		<?php 
if (!empty($data['last_activity_date']) && $data['last_activity_date'] != '0000-00-00 00:00:00') {
    ?>
		<tr>
			<td class="col-lg-3 col-md-4 col-xs-5"><b><?php 
    echo icon('fa-history') . ' ' . i18n('last_activity');
    ?>
</b></td>
			<td class="col-lg-9 col-md-8 col-xs-7"><?php 
    echo time_span($data['last_activity_date']);
    ?>
</td>
		</tr>
		<?php 
}
?>
		<?php 
if (!empty($data['date_of_birth']) && $data['date_of_birth'] != '0000-00-00') {
    ?>
		<tr>
			<td class="col-lg-3 col-md-4 col-xs-5"><b><?php 
    echo icon('fa-birthday-cake') . ' ' . i18n('birth_date');
    ?>
</b></td>
			<td class="col-lg-9 col-md-8 col-xs-7"><?php 
								<div class="media-left">
									<img class="media-object img-circle" style="max-height: 40px; max-width: 40px;" src="<?php 
            echo $NeoFrag->user->avatar($forum['avatar'], $forum['sex']);
            ?>
" alt="" />
								</div>
								<div class="media-body">
									<h5 class="media-heading"><a href="<?php 
            echo url('forum/topic/' . $forum['topic_id'] . '/' . url_title($forum['last_title']) . ($forum['last_count_messages'] > $NeoFrag->config->forum_messages_per_page ? '/page/' . ceil($forum['last_count_messages'] / $NeoFrag->config->forum_messages_per_page) : '') . '.html#message_' . $forum['last_message_id']);
            ?>
"><i class="fa fa-comment-o"></i> <?php 
            echo str_shortener($forum['last_title'], 40);
            ?>
</a></h5>
									<?php 
            echo icon('fa-user') . ' ' . ($forum['user_id'] ? $NeoFrag->user->link($forum['user_id'], $forum['username']) : '<i>Visiteur</i>') . ' ' . icon('fa-clock-o') . ' ' . time_span($forum['last_message_date']);
            ?>
								</div>
							</div>
							<?php 
        } else {
            ?>
							<div style="margin-top: 15px;">Pas de message</div>
							<?php 
        }
    }
    ?>
						</td>
					</tr>
					<?php 
}
Beispiel #11
0
    ob_start();
    ?>
	<div class="media-body<?php 
    if ($media == 'right') {
        echo ' text-right';
    }
    ?>
">
		<?php 
    if ($NeoFrag->user() && $NeoFrag->user('user_id') == $message['user_id'] || $NeoFrag->access('talks', 'delete', $message['talk_id'])) {
        echo '<div class="pull-' . ($media == 'right' ? 'left' : 'right') . '">' . button_delete('ajax/talks/delete/' . $message['message_id'] . '.html') . '</div>';
    }
    ?>
		<h4 class="media-heading">
		<?php 
    $title = array($message['user_id'] ? $NeoFrag->user->link($message['user_id'], $message['username']) : '<i>' . i18n('guest') . '</i>', '<small>' . icon('fa-clock-o') . ' ' . time_span($message['date']) . '</small>');
    if ($media == 'right') {
        $title = array_reverse($title);
    }
    echo implode(' ', $title);
    ?>
		</h4>
		<?php 
    echo $message['message'] ? strtolink($message['message']) : '<i>' . i18n('removed_message') . '</i>';
    ?>
	</div>
<?php 
    $output = array($avatar, ob_get_clean());
    if ($media == 'right') {
        $output = array_reverse($output);
    }
Beispiel #12
0
</h4>
		<?php 
echo $NeoFrag->groups->user_groups($NeoFrag->user('user_id'));
?>
		<hr />
		<dl class="dl-horizontal">
			<dt><?php 
echo i18n('registration_date');
?>
</dt>
			<dd><?php 
echo time_span($NeoFrag->user('registration_date'));
?>
</dd>
			<dt><?php 
echo i18n('last_activity');
?>
</dt>
			<dd><?php 
echo time_span($NeoFrag->user('last_activity_date'));
?>
. <a href="<?php 
echo url('user/sessions.html');
?>
"><?php 
echo icon('fa-globe') . ' ' . i18n('manage_my_sessions');
?>
</a></dd>
		</dl>
	</div>
</div>
Beispiel #13
0
 public function _edit($gallery_id, $category_id, $image_id, $name, $published, $title, $description, $category_name, $category_title, $category_image, $category_icon)
 {
     $this->css('dropzone.min')->css('admin')->js('dropzone')->js('admin')->js('preview');
     $form_album = $this->subtitle($title)->load->library('form')->add_rules('album', array('title' => $title, 'category_id' => $category_id, 'categories' => $this->model()->get_categories_list(), 'image' => $image_id, 'description' => $description, 'published' => $published, 'gallery_id' => $gallery_id))->add_submit($this('edit'))->add_back('admin/gallery.html')->save();
     $form_image = $this->form->add_rules(array('image' => array('label' => $this('image'), 'type' => 'file', 'upload' => 'gallery', 'info' => $this('file_picture', file_upload_max_size() / 1024 / 1024), 'check' => function ($filename, $ext) {
         if (!in_array($ext, array('gif', 'jpeg', 'jpg', 'png'))) {
             return i18n('select_image_file');
         }
     }, 'rules' => 'required'), 'title' => array('label' => $this('title'), 'type' => 'text'), 'description' => array('label' => $this('description'), 'type' => 'textarea')))->add_submit($this('add_image'))->save();
     $gallery_table = $this->load->library('table')->add_columns(array(array('content' => function ($data, $loader) {
         return '<a class="thumbnail thumbnail-link" data-toggle="tooltip" title="' . $loader->lang('view') . '" data-image="' . path($data['file_id']) . '" data-title="' . $data['title'] . '" data-description="' . $data['description'] . '"><img style="max-width: 80px;" src="' . path($data['thumbnail_file_id']) . '" alt="" /></a>';
     }, 'size' => TRUE), array('title' => $this('title'), 'content' => function ($data) {
         return $data['title'];
     }, 'align' => 'left', 'sort' => function ($data) {
         return $data['title'];
     }, 'search' => function ($data) {
         return $data['title'];
     }), array('title' => $this('date'), 'content' => function ($data) {
         return '<span data-toggle="tooltip" title="' . timetostr(NeoFrag::loader()->lang('date_time_long'), $data['date']) . '">' . time_span($data['date']) . '</span>';
     }, 'align' => 'left', 'sort' => function ($data) {
         return $data['date'];
     }, 'search' => function ($data) {
         return $data['date'];
     }), array('content' => array(function ($data, $loader) {
         return button('gallery/image/' . $data['image_id'] . '/' . url_title($data['title']) . '.html', 'fa-eye', $loader->lang('see_image'));
     }, function ($data) {
         return button_edit('admin/gallery/image/' . $data['image_id'] . '/' . url_title($data['title']) . '.html');
     }, function ($data) {
         return button_delete('admin/gallery/image/delete/' . $data['image_id'] . '/' . url_title($data['title']) . '.html');
     }), 'align' => 'right', 'size' => TRUE)))->data($images = $this->model()->get_images($gallery_id))->no_data($this('no_images'))->save();
     if ($form_album->is_valid($post)) {
         $this->model()->edit_gallery($gallery_id, $post['category'], $post['image'], in_array('on', $post['published']), $post['title'], $post['description'], $this->config->lang);
         //add_alert('success', $this('album_edited'));
         redirect_back('admin/gallery.html');
     } else {
         if ($form_image->is_valid($post)) {
             $this->model()->add_image($post['image'], $gallery_id, $post['title'], $post['description']);
             //add_alert('success', $this('image_added'));
             refresh();
         }
     }
     return new Row(new Col(new Panel(array('title' => $this('edit_album_title'), 'icon' => 'fa-photo', 'content' => $form_album->display(), 'size' => 'col-md-12 col-lg-7'))), new Col(new Panel(array('title' => $this('add_images_title'), 'icon' => 'fa-photo', 'content' => $this->load->view('upload', array('gallery_id' => $gallery_id, 'name' => $name, 'form_image' => $form_image->display())), 'footer' => $this->load->view('admin_gallery', array('images' => $images, 'gallery_table' => $gallery_table->display())), 'size' => 'col-md-12 col-lg-5'))));
 }
        ?>
		<tr>
			<td class="col-md-2 text-center">
				<a href="<?php 
        echo url('members/' . $messages['user_id'] . '/' . url_title($messages['username']) . '.html');
        ?>
">
					<img style="width: 48px; height: 48px;" src="<?php 
        echo $NeoFrag->user->avatar($messages['avatar'], $messages['sex']);
        ?>
" alt="" />
				</a>
			</td>
			<td class="col-md-8 col-xs-7">
				<p><?php 
        echo icon('fa-user') . ' ' . $NeoFrag->user->link($messages['user_id'], $messages['username']) . ' ' . icon('fa-clock-o') . ' ' . time_span($messages['date']);
        ?>
</p>
				<p><?php 
        echo bbcode($messages['content']);
        ?>
</p>
			</td>
			<td class="col-md-2 col-xs-3 text-right">
				<a class="btn btn-primary btn-xs" href="#"><?php 
        echo icon('fa-envelope');
        ?>
</a>
				<a class="btn btn-danger btn-xs" href="#"><?php 
        echo icon('fa-close');
        ?>
Beispiel #15
0
	</a>
	<?php 
    } else {
        ?>
	<div class="media-left">
		<img style="width: 48px; height: 48px;" src="<?php 
        echo $NeoFrag->user->avatar();
        ?>
" data-toggle="tooltip" title="<?php 
        echo i18n('guest');
        ?>
" alt="" />
	</div>
	<?php 
    }
    ?>
	<div class="media-body">
		<p class="media-heading"><a href="<?php 
    echo url('forum/topic/' . $topic['topic_id'] . '/' . url_title($topic['title']) . '.html');
    ?>
"><?php 
    echo $topic['title'];
    ?>
</a></p>
		<?php 
    echo icon('fa-clock-o') . ' ' . time_span($topic['date']) . ' ' . icon('fa-comments-o') . ' ' . $topic['count_messages'];
    ?>
</div>
</div>
<?php 
}
Beispiel #16
0
    echo i18n('views', $topic['views'], $topic['views']);
    ?>
				</td>
				<td>
					<?php 
    if ($topic['count_messages']) {
        ?>
					<div><a href="<?php 
        echo url('forum/topic/' . $topic['topic_id'] . '/' . url_title($topic['title']) . ($topic['count_messages'] > $NeoFrag->config->forum_messages_per_page ? '/page/' . ceil($topic['count_messages'] / $NeoFrag->config->forum_messages_per_page) : '') . '.html#message_' . $topic['last_message_id']);
        ?>
"><?php 
        echo icon('fa-comment-o') . ' ' . str_shortener(strip_tags(str_replace('<br />', ' ', bbcode($topic['message']))), 35);
        ?>
</a></div>
						<div><?php 
        echo icon('fa-user') . ' ' . ($topic['last_user_id'] ? $NeoFrag->user->link($topic['last_user_id'], $topic['last_username']) : '<i>' . i18n('guest') . '</i>') . ' ' . icon('fa-clock-o') . ' ' . time_span($topic['last_message_date']);
        ?>
</div>
					<?php 
    } else {
        ?>
						<?php 
        echo i18n('no_answer');
        ?>
					<?php 
    }
    ?>
				</td>
			</tr>
			<?php 
}
Beispiel #17
0
    ?>
" class="media-left">
		<img style="width: 48px; height: 48px;" src="<?php 
    echo $NeoFrag->user->avatar($message['avatar'], $message['sex']);
    ?>
" data-toggle="tooltip" title="<?php 
    echo $message['username'];
    ?>
" alt="" />
	</a>
	<div class="media-body">
		<p class="media-heading"><a href="<?php 
    echo url('forum/topic/' . $message['topic_id'] . '/' . url_title($message['topic_title']) . '.html');
    ?>
#<?php 
    echo $message['message_id'];
    ?>
" data-toggle="tooltip" title="<?php 
    echo $message['topic_title'];
    ?>
"><?php 
    echo str_shortener(strip_tags(str_replace('<br />', ' ', bbcode($message['message']))), 150);
    ?>
</a></p>
		<?php 
    echo icon('fa-clock-o') . ' ' . time_span($message['date']);
    ?>
	</div>
</div>
<?php 
}
Beispiel #18
0
<ul class="list-group">
	<?php 
foreach ($data['members'] as $member) {
    ?>
	<li class="list-group-item">
		<span class="pull-right"><?php 
    echo icon('fa-clock-o') . ' ' . time_span($member['registration_date']);
    ?>
</span>
		<?php 
    echo $NeoFrag->user->link($member['user_id'], $member['username']);
    ?>
	</li>
	<?php 
}
?>
</ul>