Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php if(!defined('access') or !access) die('This file cannot be directly accessed.'); ?>
- <?php G\Render\include_theme_header(); ?>
- <div class="content-width">
- <?php
- // Use CHV magic params
- $list_params = CHV\Listing::getParams();
- $type = 'images';
- try {
- global $list;
- $list = new CHV\Listing;
- $list->setType($type);
- $list->setOffset($list_params['offset']);
- $list->setLimit($list_params['limit']);
- $list->setItemsPerPage($list_params['items_per_page']);
- $list->setSortType($list_params['sort'][0]);
- $list->setSortOrder($list_params['sort'][1]);
- $list->setRequester(CHV\Login::getUser());
- $list->setWhere("WHERE image_user_id=:user_id");
- $list->bind(":user_id", '1');
- $list->exec();
- } catch(Exception $e) {
- G\exception_to_error($e);
- }
- ?>
- <div class="header header-tabs margin-bottom-10 follow-scroll">
- <h1><strong><?php _se('Explore'); ?></strong></h1>
- <?php
- global $tabs; // Define it as a global to bind it on the included tab.php
- $tabs = array(
- 0 => array(
- "list" => true,
- "tools" => true,
- "label" => _s('Most recent'),
- "id" => "list-most-recent",
- "params" => "list=images&sort=date_desc&page=1",
- "current" => $_REQUEST["sort"] == "date_desc" or !$_REQUEST["sort"] ? true : false,
- ),
- 1 => array(
- "list" => true,
- "tools" => true,
- "label" => _s('Oldest'),
- "id" => "list-most-oldest",
- "params" => "list=images&sort=date_asc&page=1",
- "current" => $_REQUEST["sort"] == "date_asc",
- ),
- 2 => array(
- "list" => true,
- "tools" => true,
- "label" => _s('Most viewed'),
- "id" => "list-most-viewed",
- "params" => "list=images&sort=views_desc&page=1",
- "current" => $_REQUEST["sort"] == "views_desc",
- )
- );
- $current = false;
- foreach($tabs as $k => $v) {
- if($v['current']) {
- $current = true;
- }
- $tabs[$k]['type'] = 'images';
- $tabs[$k]["url"] = G\get_base_url("?" . $tabs[$k]["params"]);
- }
- if(!$current) {
- $tabs[0]['current'] = true;
- }
- ?>
- <ul class="content-tabs" data-tabs="content-listing-tabs">
- <?php G\Render\include_theme_file("snippets/tabs"); ?>
- </ul>
- <?php
- if(is_admin()) {
- global $user_items_editor;
- $user_items_editor = false;
- G\Render\include_theme_file("snippets/user_items_editor");
- ?>
- <div class="header-content-right">
- <?php G\Render\include_theme_file("snippets/listing_tools_editor"); ?>
- </div>
- <?php
- }
- ?>
- </div>
- <div id="content-listing-tabs" class="tabbed-listing">
- <?php
- G\Render\include_theme_file("snippets/listing");
- ?>
- </div>
- </div>
- <style>
- #anywhere-upload {
- z-index: 100;
- scroll: auto;
- position: absolute;
- display: block;
- }
- body{
- margin-top: 300px;
- }
- .upload-box-close {
- display: none;
- }
- #top-bar-upload {
- display: none;
- }
- </style>
- <?php G\Render\include_theme_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement