<?php /** * Created by : PhpStorm. * User : sam * Company : Jeeble * Date : 7/21/15 * Time : 11:56 AM */ require_once "assets/includes/includes.php"; confirm_pirate_auth_login(); $page = get_page($_GET['id']); $latest_page = get_latest_page($page['id']); if ($page['original_id'] != '0') { $latest_page = get_latest_page($page['original_id']); } $no_logo = true; get_partial('header'); ?> <?php if (can_current_user('edit') && $page['state'] == 'draft' || can_current_user('create') && $page['state'] == "published") { ?> <div class="admin-bar"><?php if ($page['state'] == "draft") { ?> <a href="editpage.php?id=<?php echo $page['id']; ?> ">Edit Page</a><?php } else {
<div class="container"> <h1 class="page-header">Welcome to <?php echo get_setting('site_title'); ?> , <?php echo ucwords(pirate_auth_current_user('username')); ?> </h1> <table class="table table-striped table-bordered"> <thead><th>Title</th><th>Author</th><th>Date Created</th><th class="hidden-xs">Requires Confirmation</th><th class="hidden-xs">Confirmed</th><th>Version</th></thead> <?php $pages = get_original_pages(pirate_auth_current_user('id')); while ($spage = mysqli_fetch_array($pages)) { $page = get_latest_page($spage['id']); if ((pirate_auth_current_user('rank') != 'user' || $page['visibility'] == 'public') && $page['state'] != 'draft') { ?> <tr> <td><a href="viewpage.php?id=<?php echo $page['id']; ?> "><?php echo $page['title']; ?> </a></td> <td><?php echo pirate_auth_get_user_by_id($page['author_id'])['first_name'] . " " . pirate_auth_get_user_by_id($page['author_id'])['last_name']; ?> </td> <td><?php