예제 #1
0
    echo $Language->g('Posted By') . ' ' . $Post->user('username') . ' ' . $Post->date();
    ?>
</p>
                </div>

                <!-- Plugins Post End -->
                <?php 
    Theme::plugins('postEnd');
    ?>

                <hr>

            <?php 
}
?>

            <!-- Pager -->
            <ul class="pager">
            <?php 
if (Paginator::get('showNewer')) {
    echo '<li class="previous"><a href="' . HTML_PATH_ROOT . '?page=' . Paginator::get('prevPage') . '">Previous</a></li>';
}
if (Paginator::get('showOlder')) {
    echo '<li class="next"><a href="' . HTML_PATH_ROOT . '?page=' . Paginator::get('nextPage') . '">Next</a></li>';
}
?>
            </ul>

        </div>
    </div>
</div>
예제 #2
0
    $status = false;
    if ($Post->scheduled()) {
        $status = $Language->g('Scheduled');
    } elseif (!$Post->published()) {
        $status = $Language->g('Draft');
    }
    echo '<tr>';
    echo '<td><a href="' . HTML_PATH_ADMIN_ROOT . 'edit-post/' . $Post->key() . '">' . ($status ? '<span class="label-draft">' . $status . '</span>' : '') . ($Post->title() ? $Post->title() : '<span class="label-empty-title">' . $Language->g('Empty title') . '</span> ') . '</a></td>';
    echo '<td class="uk-text-center">' . $Post->dateRaw() . '</td>';
    echo '<td><a target="_blank" href="' . $Post->permalink() . '">' . $Url->filters('post') . '/' . $Post->key() . '</a></td>';
    echo '</tr>';
}
echo '
</tbody>
</table>
';
?>

<div id="paginator">
<ul>
<?php 
if (Paginator::get('showNewer')) {
    echo '<li class="previous"><a href="' . HTML_PATH_ADMIN_ROOT . 'manage-posts?page=' . Paginator::get('prevPage') . '">« ' . $Language->g('Prev page') . '</a></li>';
}
echo '<li class="list">' . (Paginator::get('currentPage') + 1) . ' / ' . (Paginator::get('numberOfPages') + 1) . '</li>';
if (Paginator::get('showOlder')) {
    echo '<li class="next"><a href="' . HTML_PATH_ADMIN_ROOT . 'manage-posts?page=' . Paginator::get('nextPage') . '">' . $Language->g('Next page') . ' »</a></li>';
}
?>
</ul>
</div>
예제 #3
0
파일: home.php 프로젝트: hxii/bludit-themes
		<?php 
    $tags = $Post->tags(true);
    foreach ($tags as $tagKey => $tagName) {
        echo '<li><a href="' . HTML_PATH_ROOT . $Url->filters('tag') . '/' . $tagKey . '">' . $tagName . '</a></li>';
    }
    ?>
		</ul>
	</footer>

	<!-- Plugins Post End -->
	<?php 
    Theme::plugins('postEnd');
    ?>

</article>

<?php 
}
?>

<!-- Pagination -->
<ul class="actions pagination">
<?php 
if (Paginator::get('showNewer')) {
    echo '<li><a href="' . HTML_PATH_ROOT . '?page=' . Paginator::get('prevPage') . '" class="button big previous">Previous Page</a></li>';
}
if (Paginator::get('showOlder')) {
    echo '<li><a href="' . HTML_PATH_ROOT . '?page=' . Paginator::get('nextPage') . '" class="button big next">Next Page</a></li>';
}
?>
</ul>
예제 #4
0
 /**
  * search 
  * 
  * @return Response
  */
 public function search()
 {
     $query = Input::get('q');
     $page = Input::get('page');
     $posts = [];
     if ($query) {
         $posts = Post::search($query);
     }
     if (count($posts)) {
         $url = sprintf('/search?q=%s&page=:page', rawurlencode($query));
         $paginator = Paginator::get($posts, $page, $url);
     } else {
         $paginator = null;
     }
     $html = Layout::find('search')->render(['search' => true, 'query' => $query, 'paginator' => $paginator]);
     return Response::make($html);
 }
예제 #5
0
    $tags = $Post->tags(true);
    foreach ($tags as $tagKey => $tagName) {
        echo '<li><a href="' . HTML_PATH_ROOT . $Url->filters('tag') . '/' . $tagKey . '">' . $tagName . '</a></li>';
    }
    ?>
		</ul>
	</footer>

	<!-- Plugins Post End -->
	<?php 
    Theme::plugins('postEnd');
    ?>

</article>

<?php 
}
?>

<!-- Pagination -->
<ul class="actions pagination">
<?php 
if (Paginator::get('showNewer')) {
    echo '<li><a href="' . Paginator::urlPrevPage() . '" class="button previous">Previous Page</a></li>';
}
if (Paginator::get('showOlder')) {
    echo '<li><a href="' . Paginator::urlNextPage() . '" class="button next">Next Page</a></li>';
}
?>
</ul>
예제 #6
0
 /**
  * look
  * 
  * @param string $current
  * @param string $itype
  * @param string $down
  * @return string
  */
 public function look($current = '', $itype = '', $down = '')
 {
     if (self::$_instance->is_link($current)) {
         $link = self::$_instance->readlink($current);
         $current = $link[1] . '/';
     }
     if (!self::$_instance->is_dir($current)) {
         return ListData::getListNotFoundData();
     }
     if (!self::$_instance->is_readable($current)) {
         return ListData::getListDenyData();
     }
     $add = isset($_GET['add_archive']) ? $_GET['add_archive'] : '';
     $pg = isset($_GET['pg']) ? $_GET['pg'] : 1;
     $html = ListData::getListData($current, $itype, $down, $pg, $add);
     if ($html) {
         if ($itype == 'time') {
             $out = '&amp;time';
         } elseif ($itype == 'type') {
             $out = '&amp;type';
         } elseif ($itype == 'size') {
             $out = '&amp;size';
         } elseif ($itype == 'chmod') {
             $out = '&amp;chmod';
         } elseif ($itype == 'uid') {
             $out = '&amp;uid';
         } elseif ($itype == 'gid') {
             $out = '&amp;gid';
         } else {
             $out = '';
         }
         $out .= $down ? '&amp;down' : '&amp;up';
         return $html . Paginator::get($pg, ListData::$getListCountPages, '&amp;c=' . $current . $out . $add);
     } else {
         return ListData::getListEmptyData();
     }
 }
예제 #7
0
 public function testEmpty()
 {
     $res = Paginator::get([]);
     $this->assertNull($res['next_url']);
 }