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')); }
public function index($maps) { $games = $this->load->library('table')->add_columns(array(array('content' => function ($data) { $output = '<img src="' . path($data['icon_id']) . '" alt="" /> ' . $data['title']; return $data['parent_id'] ? '<span style="padding-left: 35px;">' . $output . '</span>' : $output; }, 'search' => function ($data) { return $data['title']; }), array('content' => array(function ($data) { return button_edit('admin/games/' . $data['game_id'] . '/' . $data['name'] . '.html'); }, function ($data) { return button_delete('admin/games/delete/' . $data['game_id'] . '/' . $data['name'] . '.html'); }), 'size' => TRUE)))->data($this->model()->get_games())->no_data($this('no_games'))->pagination(FALSE)->display(); return new Row(new Col(new Panel(array('title' => $this('game_list'), 'icon' => 'fa-gamepad', 'content' => $games, 'footer' => button_add('admin/games/add.html', $this('add_game')), 'size' => 'col-md-12 col-lg-4'))), new Col(new Panel(array('title' => $this('maps_list_title'), 'icon' => 'fa-picture-o', 'content' => $this('unavailable_feature'), 'style' => 'panel-info', 'size' => 'col-md-12 col-lg-8')))); }
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')))); }
public function index($pages) { $this->load->library('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('page_title'), 'content' => function ($data) { return $data['published'] ? '<a href="' . url($data['name'] . '.html') . '">' . $data['title'] . '</a> <small class="text-muted">' . $data['subtitle'] . '</small>' : $data['title']; }, 'sort' => function ($data) { return $data['title']; }, 'search' => function ($data) { return $data['title']; }), array('content' => array(function ($data, $loader) { return $data['published'] ? button($data['name'] . '.html', 'fa-eye', $loader->lang('view_page')) : ''; }, function ($data) { return button_edit('admin/pages/' . $data['page_id'] . '/' . url_title($data['title']) . '.html'); }, function ($data) { return button_delete('admin/pages/delete/' . $data['page_id'] . '/' . url_title($data['title']) . '.html'); }), 'size' => TRUE)))->data($pages)->no_data($this('no_pages')); return new Panel(array('title' => $this('list_pages'), 'icon' => 'fa-align-left', 'content' => $this->table->display(), 'footer' => button_add('admin/pages/add.html', $this('create_page')))); }
public function index($talks) { $this->load->library('table')->add_columns(array(array('title' => $this('talks'), 'content' => function ($data) { return $data['name']; }, 'sort' => function ($data) { return $data['name']; }, 'search' => function ($data) { return $data['name']; }), array('content' => array(function ($data) { if ($data['talk_id'] > 1) { return button_access($data['talk_id'], 'talk'); } }, function ($data) { if ($data['talk_id'] > 1) { return button_edit('admin/talks/' . $data['talk_id'] . '/' . url_title($data['name']) . '.html'); } }, function ($data) { if ($data['talk_id'] > 1) { return button_delete('admin/talks/delete/' . $data['talk_id'] . '/' . url_title($data['name']) . '.html'); } }), 'size' => TRUE)))->data($talks)->no_data($this('no_talks')); return new Panel(array('title' => $this('talks_list'), 'icon' => 'fa-comment-o', 'content' => $this->table->display(), 'footer' => button_add('admin/talks/add.html', $this('create_talk')))); }
/** * render the manage_files action * */ function render(&$event, $param) { global $ID; $perm = auth_quickaclcheck($ID); if ($event->data != 'manage_files') { return; } $event->preventDefault(); if ($perm < AUTH_READ) { echo '<h1>Error</h1><p>You do not have permission to view this page</p>'; return; } $project = Project::project(); if ($project == NULL) { echo '<h1>Error</h1>'; $project = getNS($ID); $path = explode(":", $project); if (!$project || $path[0] != PROJECTS_NAMESPACE) { echo "<p>Projects wiki has to work under the " . PROJECTS_NAMESPACE . " namespace</p>"; return; } $parent = getNS($project); if (!$parent) { echo "<p>The namespace " . PROJECTS_NAMESPACE . " has not been created yet!</p>"; return; } echo "<p>This project does not exist!</p>"; $name = noNS($parent); $link = DOKU_URL . "/doku.php?id={$parent}:{$name}&do=manage_files"; echo "<p>Go back to <a href=\"{$link}\">{$parent}</a>"; return; } echo '<h1>Manage Project ' . $project->name() . '</h1>'; $files = $project->files(); ksort($files); echo "<h1>Manage Files</h1>"; echo "<table>"; foreach (array(SOURCE, TARGET, CROSSLINK) as $type) { $count = 0; $utype = ucfirst($type); echo "<tr><td></td><td></td><td><h2>{$utype} Files</h2></td></tr>"; foreach ($files as $file) { if ($file->type() != $type) { continue; } echo "<tr>"; $name = $file->name(); echo "<td>"; if ($file->is_target() && $perm > AUTH_READ) { echo button_remake($project->id($name)); } echo "</td>"; echo "<td>"; if ($perm >= AUTH_DELETE) { echo button_delete($project->id($name)); } echo "</td>"; echo "<td>"; echo html_wikilink($project->id($name)); if ($project->error($name) != NULL) { echo "<img src=\"" . DOKU_URL . "/lib/images/error.png\"></img>"; } echo "</td>"; echo "</tr>"; $count++; } if ($count == 0) { echo "<tr><td></td><td></td><td>No {$type} files in this project</td></tr>"; } } $files = $project->subprojects(); if ($files) { sort($files); echo "<tr><td></td><td></td><td><h2>Subprojects</h2></td></tr>"; foreach ($files as $file) { $id = $project->name() . ":{$file}"; $link = DOKU_URL . "/doku.php?id={$id}:{$file}&do=manage_files"; echo "<tr><td></td><td></td><td>"; echo "<a href=\"{$link}\">{$file}</a>"; echo "</td>"; echo "</tr>"; } } echo "</table>"; $parent = $project->parent(); if ($parent != NULL) { echo "<h1>Parent project</h1>"; $name = $parent->name(); $file = end(explode(":", $name)); $link = DOKU_URL . "/doku.php?id={$name}:{$file}&do=manage_files"; echo "<a href=\"{$link}\">{$name}</a>"; } if ($perm <= AUTH_READ) { return; } echo "<p/><h1>Create Files</h1>"; $create = new Doku_Form("Create"); $create->addHidden("do", "create"); $create->addHidden("page", "projects_manage_files"); $create->addHidden("id", $ID); $create->startFieldSet('Create a new file'); $create->addElement(form_makeOpenTag("p")); $create->addElement(form_makeField('text', 'File name')); $create->addElement(form_makeCloseTag("p")); $create->addElement(form_makeOpenTag("p")); $create->addElement(form_makeRadioField('Type', SOURCE, "Source", "", "", array('checked' => "true"))); $create->addElement(form_makeRadioField('Type', TARGET, 'Generated')); $create->addElement(form_makeRadioField('Type', CROSSLINK, 'Crosslink')); $create->addElement(form_makeCloseTag("p")); $create->addElement(form_makeButton("submit", '', "Create")); $create->endFieldSet(); echo $create->getForm(); echo "<h1>Create subproject</h1>"; $subproject = new Doku_Form("Subproject"); $subproject->addHidden("do", "create_subproject"); $subproject->addHidden("page", "projects_manage_files"); $subproject->addHidden("id", $ID); $subproject->startFieldSet('Create a new subproject'); $subproject->addElement(form_makeOpenTag("p")); $subproject->addElement(form_makeField('text', 'Project name')); $subproject->addElement(form_makeCloseTag("p")); $subproject->addElement(form_makeButton("submit", '', "Create sub-project")); $subproject->endFieldSet(); echo $subproject->getForm(); echo "<h1>Clean up</h1>"; $clean = new Doku_Form("Clean"); $clean->addHidden("do", "clean"); $clean->addHidden("page", "projects_manage_files"); $clean->addHidden("id", $ID); $clean->startFieldSet('Clean the project'); $clean->addElement(form_makeCheckboxField("Recursive")); $clean->addElement(form_makeButton("submit", "", "Clean")); $clean->endFieldSet(); echo $clean->getForm(); if ($perm < AUTH_ADMIN) { return; } echo "<h1>Rebuild the project</h1>"; $rebuild = new Doku_Form("rebuild"); $rebuild->addHidden("do", "rebuild"); $rebuild->addHidden("page", "projects_manage_files"); $rebuild->addHidden("id", $ID); $rebuild->startFieldSet('Rebuild the project'); $rebuild->addElement(form_makeButton("submit", '', "Rebuild")); $rebuild->endFieldSet(); echo $rebuild->getForm(); }
</label> </td> <td><?php echo $row->getStatusLabel(); ?> </td> <td><?php echo $row->date; ?> </td> <td> <?php echo button_edit('article/edit/' . $row->id); ?> <?php echo button_delete('article/delete/' . $row->id); ?> </td> </tr> <?php } ?> </tbody> </table> </div> </div> <?php custom_script(); ?> <script type="text/javascript">
?> </td> <td><?php echo $media->status_format; ?> </td> <td><?php echo $media->created_at->format('d-m-Y H:i:s'); ?> </td> <td><a href="<?php echo site_url('elibrary/edit/' . $media->id); ?> " class="label label-primary">Review</a></td> <td><?php echo button_delete('elibrary/delete/' . $media->id . '?status=' . $media->status); ?> </td> </tr> <?php } ?> <?php } else { ?> <tr class="warning"> <td colspan="5">Tidak ada media</td> </tr> <?php } ?>
</td> <td><?php echo $prof->gender; ?> </td> <td><?php echo $prof->email; ?> </td> <td><?php echo $prof->address; ?> </td> <td> <?php echo button_edit('user/updateProfile/' . $prof->user_id); ?> <?php echo button_delete('user/delete/' . $prof->user_id); ?> </td> </tr> <?php $no++; } ?> </tbody> </table> </div> </div>
</td> <td> <?php echo button_delete('konsultasi/deletePengampu/' . $category->id); ?> </td> </tr> <?php } else { ?> <tr> <td><?php echo $category->name; ?> </td> <td> <?php echo button_delete('konsultasi/deletePengampu/' . $category->id); ?> </td> </tr> <?php } ?> <?php $i++; } ?> <?php } ?>
public function _edit($team_id, $name, $title, $image_id, $icon_id, $description, $game_id) { $users = $this->db->select('u.user_id', 'u.username', 'tu.user_id IS NOT NULL AS in_team')->from('nf_users u')->join('nf_teams_users tu', 'tu.user_id = u.user_id AND tu.team_id = ' . $team_id)->join('nf_teams_roles r', 'r.role_id = tu.role_id')->where('u.deleted', FALSE)->order_by('r.order', 'r.role_id', 'u.username')->get(); $roles = $this->model('roles')->get_roles(); $form_team = $this->title($this('edit_team'))->subtitle($title)->load->library('form')->add_rules('teams', array('title' => $title, 'game_id' => $game_id, 'games' => $this->model()->get_games_list(), 'image_id' => $image_id, 'icon_id' => $icon_id, 'description' => $description))->add_submit($this('edit'))->add_back('admin/teams.html')->save(); $form_users = $this->form->add_rules(array('user_id' => array('type' => 'select', 'values' => array_filter(array_map(function ($a) { return !$a['in_team'] ? $a['user_id'] : NULL; }, $users)), 'rules' => 'required'), 'role_id' => array('type' => 'select', 'values' => array_map(function ($a) { return $a['role_id']; }, $roles), 'rules' => 'required')))->save(); if ($form_team->is_valid($post)) { $this->model()->edit_team($team_id, $post['title'], $post['game'], $post['image'], $post['icon'], $post['description']); //add_alert('success', $this('edit_team_success_message')); redirect_back('admin/teams.html'); } else { if ($form_users->is_valid($post)) { $this->db->insert('nf_teams_users', array('team_id' => $team_id, 'user_id' => $post['user_id'], 'role_id' => $post['role_id'])); refresh(); } } $this->load->library('table')->add_columns(array(array('content' => function ($data) { return NeoFrag::loader()->user->link($data['user_id'], $data['username']); }), array('content' => function ($data) { return $data['title']; }), array('content' => array(function ($data) use($team_id, $name) { return button_delete('admin/teams/players/delete/' . $team_id . '/' . $name . '/' . $data['user_id'] . '.html'); }), 'size' => TRUE)))->pagination(FALSE)->data($this->db->select('tu.user_id', 'u.username', 'r.title')->from('nf_teams_users tu')->join('nf_users u', 'u.user_id = tu.user_id')->join('nf_teams_roles r', 'r.role_id = tu.role_id')->where('tu.team_id', $team_id)->order_by('r.title', 'u.username')->get())->no_data($this('no_players_on_team')); return new Row(new Col(new Panel(array('title' => $this('edit_team'), 'icon' => 'fa-gamepad', 'content' => $form_team->display(), 'size' => 'col-md-12 col-lg-7'))), new Col(new Panel(array('title' => $this('players'), 'icon' => 'fa-users', 'content' => $this->table->display(), 'footer' => $this->load->view('users', array('users' => $users, 'roles' => $roles, 'form_id' => $form_users->id)), 'size' => 'col-md-12 col-lg-5')))); }
?> </td> <td><?php echo $media->file_type; ?> </td> <td><?php echo $media->file_size_format; ?> </td> <td><?php echo $media->status_format; ?> </td> <td><?php echo button_delete('media/delete/' . $media->id); ?> </td> </tr> <?php } ?> <?php } else { ?> <tr class="warning"> <td colspan="5">Tidak ada media.</td> </tr> <?php } ?>
?> <a href="<?php echo site_url('comment/edit/' . $row->id); ?> " class="label label-info"><i class="fa fa-edit"></i> Moderasi</a> <?php echo button_delete('comment/delete/' . $row->id); ?> <?php } else { ?> <?php echo button_edit('comment/edit/' . $row->id, 'sm'); ?> <?php echo button_delete('comment/delete/' . $row->id); ?> <?php } ?> </td> </tr> <?php } ?> </tbody> </table> </div> </div> </div>
?> </td> <td><?php echo $row->question; ?> </td> <td><?php echo $row->answer; ?> </td> <td> <?php echo button_edit('faq/update/' . $row->id); ?> <?php echo button_delete('faq/delete/' . $row->id); ?> </td> </tr> <?php } ?> </tbody> </table> </div> </div> </div> <script type="text/javascript"> $(document).ready(function() { $('#faq').DataTable();
</td> <td> <?php echo button_delete('elibrary/deletePengampu/' . $category->id); ?> </td> </tr> <?php } else { ?> <tr> <td><?php echo $category->name; ?> </td> <td> <?php echo button_delete('elibrary/deletePengampu/' . $category->id); ?> </td> </tr> <?php } ?> <?php $i++; } ?> <?php } ?> </tbody> </table>
public function _image_edit($image_id, $thumbnail_file_id, $title, $description) { $this->css('admin')->js('dropzone')->js('admin')->js('preview'); $this->subtitle($this('image_', $title))->load->library('form')->add_rules('image', array('image_id' => $image_id, 'image' => $thumbnail_file_id, 'title' => $title, 'description' => $description))->add_submit($this('edit'))->add_back(); if ($this->form->is_valid($post)) { $this->model()->edit_image($image_id, $post['title'], $post['description']); //add_alert('success', $this('image_edited')); redirect_back(); } return new Row(new Col(new Panel(array('title' => $this('edit_image_title'), 'icon' => 'fa-photo', 'content' => $this->form->display(), 'size' => 'col-md-8 col-lg-9'))), new Col(new Panel(array('title' => '<div class="pull-right">' . button_delete('admin/gallery/image/delete/' . $image_id . '/' . url_title($title) . '.html') . '</div>' . $this('preview_image'), 'icon' => 'fa-photo', 'content' => function ($data, $loader) use($image_id, $title, $description) { return '<a class="thumbnail thumbnail-link no-margin" data-toggle="tooltip" title="' . $loader->lang('view') . '" data-image-id="' . $image_id . '" data-image-title="' . url_title($title) . '" data-image-description="' . $description . '"><img src="' . path($thumbnail_file_id) . '" alt="" /></a>'; }, 'size' => 'col-md-4 col-lg-3')))); }
echo $row->url; ?> "><?php echo $row->name; ?> </a></td> <td><?php echo $row->description; ?> </td> <td> <?php echo button_edit('link/update/' . $row->id); ?> <?php echo button_delete('link/delete/' . $row->id); ?> </td> </tr> <?php } ?> </tbody> </table> </div> </div> </div> <script type="text/javascript"> $(document).ready(function() { $('#article').DataTable({
?> </td> <td><?php echo $row->name; ?> </td> <td><?php echo $row->description; ?> </td> <td> <?php echo button_edit('konsultasi/updateKategori/' . $row->id); ?> <?php echo button_delete('konsultasi/deleteKategori/' . $row->id); ?> </td> </tr> <?php $no++; } ?> </tbody> </table> </div> </div> </div> </div> <script type="text/javascript"> $(document).ready(function() {
<li><?php echo button_protect($module, $id, $document->get('is_protected')); ?> </li> <li><?php echo button_merge($module, $id); ?> </li> <?php } ?> <?php if ($has_rights && !$is_archive) { ?> <li><?php echo button_delete($module, $id); ?> </li> <li><?php echo button_delete_culture($module, $id, $document->get('culture')); ?> </li> <?php } ?> <?php if ($has_rights && !$is_archive && !$redirected && $document->get('geom_wkt')) { ?> <li><?php echo button_delete_geom($module, $id); ?>
?> </td> <td><?php echo $row->title; ?> </td> <td><?php echo $row->date; ?> </td> <td> <?php echo button_edit('pages/edit/' . $row->id); ?> <?php echo button_delete('pages/delete/' . $row->id); ?> </td> </tr> <?php } ?> </tbody> </table> </div> </div> </div> <script type="text/javascript"> $(document).ready(function() { $('#article').DataTable({
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())); }
} ?> </div> <?php $avatar = ob_get_clean(); 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>
?> "> <img class="media-object" src="<?php echo $NeoFrag->user->avatar($data['avatar'], $data['sex']); ?> " style="max-width: 64px; max-height: 64px;" alt="" /> </a> </div> <div class="media-body"> <?php $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 i18n('no_message'); ?> <?php } } ?> </td> <?php if ($NeoFrag->config->admin_url) { ?> <td class="col-md-1 text-right"> <?php echo button_edit('admin/forum/' . $forum['forum_id'] . '/' . url_title($forum['title']) . '.html'); ?> <?php echo button_delete('admin/forum/delete/' . $forum['forum_id'] . '/' . url_title($forum['title']) . '.html'); ?> </td> <?php } ?> </tr> <?php } ?> <?php if (empty($data['forums'])) { ?> <tr> <td colspan="4" class="text-center"><h4><?php echo i18n('no_forum');
<td><?php echo $tenagaahli->full_name; ?> <br> <small><?php echo $tenagaahli->email; ?> </small></td> <td rowspan="<?php echo $category->users->count(); ?> "><?php echo button_edit('forum/category/edit/' . $category->id); ?> <?php echo button_delete('forum/category/delete/' . $category->id); ?> </td> <?php } else { ?> <td><?php echo $tenagaahli->full_name; ?> <br> <small><?php echo $tenagaahli->email; ?> </small></td> <?php }
<?php } else { ?> <img class="featured-preview" src="" width="100%" style="display: none;"> <img class="featured-preview-default" src="<?php echo base_url('index.php/assets/admin/img/default_avatar_male.jpg'); ?> "> <?php } ?> <input type="hidden" name="featured" value="<?php echo $artikel->featured_image; ?> "> </div> </div> <div class="form-group"> <input type="file" name="featured" value=""></input> </div> </div> <button type="submit" class="btn btn-sm btn-success"><i class="fa fa-save"></i> Update</button> <?php echo button_delete('dashboard/delete/' . $artikel->id, 'sm'); ?> </div> </div> <?php echo form_close();
echo path($image['thumbnail_file_id']); ?> " alt="" /></a> <div class="actions"> <a href="<?php echo url('admin/gallery/image/' . $image['image_id'] . '/' . url_title($image['title']) . '.html'); ?> " class="btn btn-outline btn-info btn-xs" data-toggle="tooltip" title="<?php echo i18n('edit'); ?> "><?php echo icon('fa-pencil'); ?> </a> <?php echo button_delete('admin/gallery/image/delete/' . $image['image_id'] . '/' . url_title($image['title']) . '.html'); ?> </div> </div> </div> <?php } ?> </div> </div> <?php } else { ?> <div class="alert alert-info text-center no-margin"><?php echo i18n('no_images'); ?>
<?php } ?> <?php echo form_input('published', date('Y-m-d H:i:s'), array('class' => 'form-control input-sm datetimepicker', 'id' => 'published')); ?> <span class="input-group-btn"> <button class="btn btn-default btn-sm close-schedule">No schedule</button> </span> </div> </div> </div> <div class="panel-footer"> <button type="submit" class="btn btn-sm btn-success"><i class="fa fa-save"></i> Update</button> <?php echo button_delete('article/delete/' . $artikel->id, 'md'); ?> </div> </div> <?php if ($artikel->isPublished()) { ?> <div class="panel panel-default"> <div class="panel-heading"> <h4 class="panel-title">Pilihan Editor</h4> </div> <div class="panel-body"> <?php if ($artikel->editor_choice) { ?>
</thead> <tbody> <?php foreach ($categories as $category) { ?> <tr> <td><?php echo anchor('kelasonline/category/edit/' . $category->id, $category->name); ?> </td> <td><?php echo button_edit('kelasonline/category/edit/' . $category->id); ?> <?php echo button_delete('kelasonline/category/delete/' . $category->id); ?> </td> </tr> <?php } ?> </tbody> </table> </div> </div> </div> </div> <script type="text/javascript"> $(document).ready(function() { $('#kelasonline').DataTable();
protected function render_buttons(&$renderer) { global $ID; $renderer->doc .= button_add("Add dependency", USE_TAG); $renderer->doc .= button_delete($this->project->id($this->file_name)); if ($this->project == NULL) { return; } $renderer->doc .= action_button("Manage files", 'manage_files'); }