consolidated page browsing code; updates #262

and
- fixed page browser display on search results page for last four pages
- set max. page count on all other pages to 15 (from 9 or none)
This commit is contained in:
following
2013-07-14 15:41:59 +02:00
parent afdfc809d3
commit 67f3ae3ce2
16 changed files with 183 additions and 213 deletions

View File

@ -174,64 +174,20 @@ function get_logpics($purpose, $userid=0, $cacheid=0)
}
// set all template variables needed to display log pictures page browser;
// Set all template variables needed to display a browsed log pictures page;
// all displaying is done in res_logpictures.tpl
function set_paged_pics($purpose, $userid, $cacheid, $tpl, $url)
function set_paged_pics($purpose, $userid, $cacheid, $url)
{
global $_REQUEST, $opt;
global $tpl;
$startat = isset($_REQUEST['startat']) ? $_REQUEST['startat']+0 : 0;
$pictures = get_logpics($purpose, $userid, $cacheid);
$tpl->assign('pictures', array_slice($pictures, $startat, MAX_PICTURES_PER_GALLERY_PAGE));
$paging = (count($pictures) > MAX_PICTURES_PER_GALLERY_PAGE);
$tpl->assign('paging', $paging);
if ($paging)
{
$pages = floor((count($pictures) + MAX_PICTURES_PER_GALLERY_PAGE - 1)/MAX_PICTURES_PER_GALLERY_PAGE);
$page = floor($startat/MAX_PICTURES_PER_GALLERY_PAGE) + 1;
$pl = "";
if ($startat > 0)
{
if ($pages > 2)
$pl .= "<a href='" . $url . "&startat=0'><img src='resource2/" . $opt['template']['style'] . "/images/navigation/16x16-browse-first.png' width='16px' height='16px' alt='&lt;&lt;'></a> ";
$pl .= "<a href='" . $url . "&startat=" . ($startat - MAX_PICTURES_PER_GALLERY_PAGE) . "'><img src='resource2/" . $opt['template']['style'] . "/images/navigation/16x16-browse-prev.png' width='16px' height='16px' alt='&lt;'></a> ";
}
else
{
if ($pages > 2)
$pl .= "<a href='" . $url . "&startat=0'><img src='resource2/" . $opt['template']['style'] . "/images/navigation/16x16-browse-first-inactive.png' width='16px' height='16px' alt='&lt;&lt;'></a> ";
$pl .= "<img src='resource2/" . $opt['template']['style'] . "/images/navigation/16x16-browse-prev-inactive.png' width='16px' height='16px' alt='&lt;'> ";
}
for ($p=1; $p<=$pages; $p++)
{
if ($pl != "") $pl .= " ";
if ($p != $page) $pl .= "<a href='" . $url . "&startat=" . (($p-1)*MAX_PICTURES_PER_GALLERY_PAGE) . "'>";
else $pl .= "<strong>";
$pl .= $p;
if ($p != $page) $pl .= "</a>";
else $pl .= "</strong>";
}
if ($startat + MAX_PICTURES_PER_GALLERY_PAGE < count($pictures))
{
$pl .= " <a href='" . $url . "&startat=" . ($startat + MAX_PICTURES_PER_GALLERY_PAGE) . "'><img src='resource2/" . $opt['template']['style'] . "/images/navigation/16x16-browse-next.png' width='16px' height='16px' alt='&gt;'></a> ";
if ($pages > 2)
$pl .= " <a href='" . $url . "&startat=" . ($startat + MAX_PICTURES_PER_GALLERY_PAGE) . "'><img src='resource2/" . $opt['template']['style'] . "/images/navigation/16x16-browse-last.png' width='16px' height='16px' alt='&gt;&gt;'></a> ";
}
else
{
$pl .= " <img src='resource2/" . $opt['template']['style'] . "/images/navigation/16x16-browse-next-inactive.png' width='16px' height='16px' alt='&gt;'>";
if ($pages > 2)
$pl .= " <a href='" . $url . "&startat=" . ($startat + MAX_PICTURES_PER_GALLERY_PAGE) . "'><img src='resource2/" . $opt['template']['style'] . "/images/navigation/16x16-browse-last-inactive.png' width='16px' height='16px' alt='&gt;&gt;'></a> ";
}
$tpl->assign('pagelinks', $pl);
}
$pager = new pager($url . "&startat={offset}");
$pager->make_from_offset($startat, count($pictures), MAX_PICTURES_PER_GALLERY_PAGE);
}
?>

116
htdocs/lib2/pager.class.php Normal file
View File

@ -0,0 +1,116 @@
<?php
/***************************************************************************
* For license information see doc/license.txt
*
* Unicode Reminder メモ
*
* Set template variables for displaying a page browser control.
* Output is formatted by templates2/<style>/res_pager.tpl.
***************************************************************************/
class pager
{
private $link_url;
private $min_pages_shown;
private $max_pages_shown;
// Use {page} in link_url als placeholder for the selected page number
// and/or {offset} for the 0-based data offset of the selected page number.
function __construct($link_url, $min_pages_shown=2, $max_pages_shown=15)
{
global $tpl;
$this->link_url = $link_url;
$this->min_pages_shown = $min_pages_shown;
if (($max_pages_shown % 2) == 0)
$tpl->error("pager: max pages shown must be odd");
$this->max_pages_shown = $max_pages_shown;
}
function make_from_pagenr($current_page, $total_pages, $page_size=false)
{
global $tpl;
if (mb_strpos($this->link_url,'{offset}') && $page_size === false)
{
$tpl->error('page size is not set for offset paging');
}
elseif ($total_pages < $this->min_pages_shown)
{
// not enough pages - disable pager
$tpl->assign('pages_list',false);
}
else
{
$first_page = 1;
$last_page = $total_pages;
$current_page = min(max($current_page,$first_page),$last_page);
if ($current_page == $first_page)
{
$tpl->assign('pages_first_link',false);
$tpl->assign('pages_prev_link',false);
}
else
{
$tpl->assign('pages_first_link', $this->pagelink($first_page,$page_size));
$tpl->assign('pages_prev_link', $this->pagelink($current_page-1,$page_size));
}
$pages = array();
$lrspan = ($this->max_pages_shown-1) / 2;
$from_page = max($first_page, $current_page-$lrspan);
$to_page = min($last_page, max($first_page, $current_page-$lrspan) + $this->max_pages_shown-1);
$from_page = max($first_page, $to_page - 2*$lrspan);
for ($page = $from_page; $page <= $to_page; $page++)
{
if ($page == $current_page)
$pages[$page] = false;
else
$pages[$page] = $this->pagelink($page,$page_size);
}
$tpl->assign('pages_list', $pages);
if ($current_page == $last_page)
{
$tpl->assign('pages_next_link',false);
$tpl->assign('pages_last_link',false);
}
else
{
$tpl->assign('pages_next_link', $this->pagelink($current_page+1,$page_size));
$tpl->assign('pages_last_link', $this->pagelink($last_page,$page_size));
}
if ($last_page-$first_page < 2)
{
$tpl->assign('pages_first_link',null);
$tpl->assign('pages_last_link',null);
}
}
}
function make_from_offset($current_offset, $total_items, $page_size)
{
$this->make_from_pagenr(
floor($current_offset/$page_size) + 1,
ceil($total_items/$page_size),
$page_size);
}
private function pagelink($page,$page_size)
{
return mb_ereg_replace('{page}', $page,
mb_ereg_replace('{offset}', ($page-1) * $page_size,
$this->link_url));
}
}
?>

View File

@ -110,40 +110,9 @@ function search_output()
$tpl->assign('caches', $caches);
// more than one page?
if ($resultcount <= $caches_per_page)
$pages = '';
else
{
if ($startat > 0) // Ocprop: queryid=([0-9]+)
$pages = '<a href="search.php?queryid=' . $options['queryid'] . '&startat=0"><img src="resource2/ocstyle/images/navigation/16x16-browse-first.png" width="16" height="16"></a> <a href="search.php?queryid=' . $options['queryid'] . '&startat=' . ($startat - $caches_per_page) . '"><img src="resource2/ocstyle/images/navigation/16x16-browse-prev.png" width="16" height="16"></a> ';
else
$pages = ' <img src="resource2/ocstyle/images/navigation/16x16-browse-first-inactive.png" width="16" height="16"> <img src="resource2/ocstyle/images/navigation/16x16-browse-prev-inactive.png" width="16" height="16"> ';
$pager = new pager('search.php?queryid=' . $options['queryid'] . '&startat={offset}', 2, 9);
$pager->make_from_offset($startat, $resultcount, $caches_per_page);
$frompage = ($startat / $caches_per_page) - 3;
if ($frompage < 1) $frompage = 1;
$maxpage = ceil($resultcount / $caches_per_page);
$topage = $frompage + 8;
if ($topage > $maxpage) $topage = $maxpage;
for ($i = $frompage; $i <= $topage; $i++)
{
if (($startat / $caches_per_page + 1) == $i)
$pages .= ' <b>' . $i . '</b>';
else
$pages .= ' <a href="search.php?queryid=' . $options['queryid'] . '&startat=' . (($i - 1) * $caches_per_page) . '">' . $i . '</a>';
}
if ($startat / $caches_per_page < ($maxpage - 1))
$pages .= ' <a href="search.php?queryid=' . $options['queryid'] . '&startat=' . ($startat + $caches_per_page) . '"><img src="resource2/ocstyle/images/navigation/16x16-browse-next.png" width="16" height="16"></a> <a href="search.php?queryid=' . $options['queryid'] . '&startat=' . (($maxpage - 1) * $caches_per_page) . '"><img src="resource2/ocstyle/images/navigation/16x16-browse-last.png" width="16" height="16"></a> ';
else
$pages .= ' <img src="resource2/ocstyle/images/navigation/16x16-browse-next-inactive.png" width="16" height="16"> <img src="resource2/ocstyle/images/navigation/16x16-browse-last-inactive.png" width="16" height="16">';
}
//'<a href="search.php?queryid=' . $options['queryid'] . '&startat=20">20</a> 40 60 80 100';
//$caches_per_page
//count($caches) - 1
$tpl->assign('pages', $pages);
$tpl->assign('showonmap', $showonmap);
// downloads

View File

@ -74,7 +74,7 @@
$allpics = isset($_REQUEST['allpics']) && $_REQUEST['allpics'];
$all_pictures = get_logpics(LOGPICS_FOR_MYHOME_GALLERY);
if ($allpics)
set_paged_pics(LOGPICS_FOR_MYHOME_GALLERY, 0, 0, $tpl, "myhome.php?allpics=1");
set_paged_pics(LOGPICS_FOR_MYHOME_GALLERY, 0, 0, "myhome.php?allpics=1");
else
$tpl->assign('pictures',$all_pictures);
$tpl->assign('allpics', $allpics ? 1 : 0);

View File

@ -47,28 +47,12 @@
sql_free_result($rsNewCaches);
$tpl->assign('newCaches', $newCaches);
$count = sql_value_slave('SELECT COUNT(*) `count` FROM `caches` WHERE `caches`.`status`=1', 0);
$maxstart = (ceil($count / $perpage)-1) * $perpage;
$startat = isset($_REQUEST['startat']) ? $_REQUEST['startat']+0 : 0;
$count = sql_value_slave('SELECT COUNT(*) FROM `caches` WHERE `caches`.`status`=1', 0);
if ($startat < 4 * $perpage)
{
$firstpage = 0;
$lastpage = 8 * $perpage;
}
else
{
$firstpage = $startat - 4 * $perpage;
$lastpage = $firstpage + 8 * $perpage;
}
if ($lastpage > $maxstart)
$lastpage = $maxstart;
$pager = new pager("newcaches.php?startat={offset}");
$pager->make_from_offset($startat, $count, 100);
$tpl->assign('firstpage', $firstpage);
$tpl->assign('lastpage', $lastpage);
$tpl->assign('perpage', $perpage);
$tpl->assign('startat', $startat);
$tpl->assign('maxstart', $maxstart);
$tpl->assign('defaultcountry', $opt['template']['default']['country']);
}

View File

@ -1811,8 +1811,6 @@ function outputUniidSelectionForm($uniSql, $options)
{
global $tpl; // settings
global $locline, $secondlocationname;
global $pages_left_inactive, $pages_left, $pages_right_inactive, $pages_right,
$page_selectable, $page_selected;
$urlparamString = prepareLocSelectionForm($options);
@ -1826,44 +1824,11 @@ function outputUniidSelectionForm($uniSql, $options)
$count = sql_value_slave('SELECT COUNT(*) FROM `uniids`',0);
$tpl->assign('resultscount', $count);
// create page numbering
$maxsite = ceil($count / 20) - 1;
$pages = '';
if ($maxsite > 0)
{
if ($locidsite > 0)
$pages .= mb_ereg_replace('{urlparams}', $urlparamString,
mb_ereg_replace('{prevpage}', $locidsite - 1, $pages_left)).' ';
else
$pages .= $pages_left_inactive.' ';
$frompage = $locidsite - 3;
if ($frompage < 1) $frompage = 1;
$topage = $frompage + 8;
if ($topage > $maxsite) $topage = $maxsite + 1;
for ($i = $frompage; $i <= $topage; $i++)
{
if (($locidsite + 1) == $i)
$pages .= mb_ereg_replace('{page}', $i, $page_selected).' ';
else
$pages .= mb_ereg_replace('{urlparams}', $urlparamString,
mb_ereg_replace('{linkpage}', $i-1,
mb_ereg_replace('{showpage}', $i, $page_selectable))).' ';
}
if ($locidsite < $maxsite)
$pages .= mb_ereg_replace('{urlparams}', $urlparamString,
mb_ereg_replace('{nextpage}', $locidsite + 1,
mb_ereg_replace('{lastpage}', $maxsite, $pages_right)));
else
$pages .= $pages_right_inactive;
}
$tpl->assign('pages', $pages);
// create page browser
$pager = new pager('search.php?'.$urlparamString.'&locidsite={offset}');
$pager->make_from_offset($locidsite, ceil($count/20), 1);
// create locations list
$rs = sql_slave('SELECT `gns_locations`.`rc` `rc`, `gns_locations`.`cc1` `cc1`, `gns_locations`.`admtxt1` `admtxt1`, `gns_locations`.`admtxt2` `admtxt2`, `gns_locations`.`admtxt3` `admtxt3`, `gns_locations`.`admtxt4` `admtxt4`, `gns_locations`.`uni` `uni_id`, `gns_locations`.`lon` `lon`, `gns_locations`.`lat` `lat`, `gns_locations`.`full_name` `full_name`, `uniids`.`olduni` `olduni` FROM `gns_locations`, `uniids` WHERE `uniids`.`uni_id`=`gns_locations`.`uni` ORDER BY `gns_locations`.`full_name` ASC LIMIT ' . ($locidsite * 20) . ', 20');
$nr = $locidsite * 20 + 1;
@ -1872,7 +1837,6 @@ function outputUniidSelectionForm($uniSql, $options)
{
$thislocation = $locline;
// locationsdings zusammenbauen
$locString = '';
if ($r['admtxt1'] != '')
{

View File

@ -12,17 +12,7 @@
<table width="100%" class="table">
<tr>
<td colspan="3" class="header-small">
{include file="res_browse_left.tpl" page="newcaches"}
{section name=page start=$firstpage loop=$lastpage+1 step=100}
{if $smarty.section.page.index!=$startat}
<a href="newcaches.php?startat={$smarty.section.page.index}">{$smarty.section.page.index/$perpage+1}</a>
{else}
<b>{$smarty.section.page.index/$perpage+1}</b>
{/if}
{/section}
{include file="res_browse_right.tpl" page="newcaches"}
{include file="res_pager.tpl"}
</td>
</tr>
<tr><td class="spacer"></td></tr>
@ -37,17 +27,7 @@
<tr><td class="spacer"></td></tr>
<tr>
<td colspan="3" class="header-small">
{include file="res_browse_left.tpl" page="newcaches"}
{section name=page start=$firstpage loop=$lastpage+1 step=100}
{if $smarty.section.page.index!=$startat}
<a href="newcaches.php?startat={$smarty.section.page.index}">{$smarty.section.page.index/$perpage+1}</a>
{else}
<b>{$smarty.section.page.index/$perpage+1}</b>
{/if}
{/section}
{include file="res_browse_right.tpl" page="newcaches"}
{include file="res_pager.tpl"}
</td>
</tr>
<tr><td class="spacer"></td></tr>

View File

@ -1,13 +0,0 @@
{***************************************************************************
* You can find the license in the docs directory
*
* Unicode Reminder メモ
***************************************************************************}
{* OCSTYLE *}
{if $startat <= 0}
<img src="resource2/{$opt.template.style}/images/navigation/16x16-browse-first-inactive.png" width="16px" height="16px" alt="&lt;&lt;">
<img src="resource2/{$opt.template.style}/images/navigation/16x16-browse-prev-inactive.png" width="16px" height="16px" alt="&lt;">
{else}
<a href="{$page}.php?startat=0"><img src="resource2/{$opt.template.style}/images/navigation/16x16-browse-first.png" width="16px" height="16px" alt="&lt;&lt;"></a>
<a href="{$page}.php?startat={$startat-$perpage}"><img src="resource2/{$opt.template.style}/images/navigation/16x16-browse-prev.png" width="16px" height="16px" alt="&lt;"></a>
{/if}

View File

@ -1,13 +0,0 @@
{***************************************************************************
* You can find the license in the docs directory
*
* Unicode Reminder メモ
***************************************************************************}
{* OCSTYLE *}
{if $startat<$maxstart}
<a href="{$page}.php?startat={$startat+$perpage}"><img src="resource2/{$opt.template.style}/images/navigation/16x16-browse-next.png" width="16px" height="16px" alt="&gt;"></a>
<a href="{$page}.php?startat={$maxstart}"><img src="resource2/{$opt.template.style}/images/navigation/16x16-browse-last.png" width="16px" height="16px" alt="&gt;&gt;"></a>
{else}
<img src="resource2/{$opt.template.style}/images/navigation/16x16-browse-next-inactive.png" width="16px" height="16px" alt="&gt;">
<img src="resource2/{$opt.template.style}/images/navigation/16x16-browse-last-inactive.png" width="16px" height="16px" alt="&gt;&gt;">
{/if}

View File

@ -1,12 +1,12 @@
{* see lib2/logic/logpics.inc.php for data retreival *}
{* Unicode Reminder メモ *}
{if $paging}
{if $pages_list}
<div class="content2-container">
<table width="100%" cellspacing="0" cellpadding="0">
<tr>
<td><font size="2">{$subtitle}</font></td>
<td class="picpaging">{$pagelinks}</td>
<td class="picpaging">{include file="res_pager.tpl"}</td>
</tr>
</table>
</div>

View File

@ -0,0 +1,37 @@
{***************************************************************************
* For license information see doc/license.txt
*
* Unicode Reminder メモ
*
* Display a page browser; input generated by lib2/pager.class.php.
***************************************************************************}
{* OCSTYLE *}
{if $pages_list}
{if $pages_first_link !==null}
{if $pages_first_link}
<a href="{$pages_first_link}"><img src="resource2/{$opt.template.style}/images/navigation/16x16-browse-first.png" width="16" height="16" alt="&lt;&lt;"></a>
{else}
<img src="resource2/{$opt.template.style}/images/navigation/16x16-browse-first-inactive.png" width="16" height="16" alt="&lt;&lt;">
{/if}
{/if}
{if $pages_prev_link}
<a href="{$pages_prev_link}"><img src="resource2/{$opt.template.style}/images/navigation/16x16-browse-prev.png" width="16" height="16" alt="&lt;"></a>
{else}
<img src="resource2/{$opt.template.style}/images/navigation/16x16-browse-prev-inactive.png" width="16" height="16" alt="&lt;">
{/if}
{foreach from=$pages_list key=page item=pagelink}
{if $pagelink}<a href="{$pagelink}">{$page}</a>{else}<b>{$page}</b>{/if}
{/foreach}
{if $pages_next_link}
<a href="{$pages_next_link}"><img src="resource2/{$opt.template.style}/images/navigation/16x16-browse-next.png" width="16" height="16" alt="&gt;"></a>
{else}
<img src="resource2/{$opt.template.style}/images/navigation/16x16-browse-next-inactive.png" width="16" height="16" alt="&lt;">
{/if}
{if $pages_last_link !==null}
{if $pages_last_link}
<a href="{$pages_last_link}"><img src="resource2/{$opt.template.style}/images/navigation/16x16-browse-last.png" width="16" height="16" alt="&gt;&gt;"></a>
{else}
<img src="resource2/{$opt.template.style}/images/navigation/16x16-browse-last-inactive.png" width="16" height="16" alt="&gt;&gt;">
{/if}
{/if}
{/if}

View File

@ -35,8 +35,8 @@
<td class="header-small" colspan="2">
<table width="98.5%">
<tr>
<td rowspan="1" style="vertical-align:top; width:300px">{$pages}</td>
<td style="text-align:right;">{t}Download{/t}:&nbsp;</td>
<td rowspan="1" style="padding:0; margin:0">{include file="res_pager.tpl"}</td>
<td style="text-align:right; padding:0; margin:0">{t}Download{/t}:&nbsp;</td>
<td><nobr>
<select name="wpdownload-page" class="wpdownload" onChange="location.href=this.options[this.selectedIndex].value">
<option value="#">{t}Results on this page{/t}</option>
@ -88,10 +88,10 @@
</table>
</td>
</tr>
{if $pages != ''}
{if $pages_list}
<tr><td class="spacer" colspan="2">&nbsp;</td></tr>
<tr>
<td colspan="2" class="header-small">{$pages}</td>
<td colspan="2" class="header-small">{include file="res_pager.tpl"}</td>
</tr>
<tr><td style="height:0.6em"></td></tr>
{/if}

View File

@ -29,13 +29,6 @@
$secondlocationname = '&nbsp;<font size="1">({secondlocationname})</font>';
$no_location_coords = _('no coordinates available');
$pages_left_inactive = '<img src="resource2/ocstyle/images/navigation/16x16-browse-first-inactive.png" width="16" height="16"> <img src="resource2/ocstyle/images/navigation/16x16-browse-prev-inactive.png" width="16" height="16">';
$pages_left = '<a href="search.php?{urlparams}&locidsite=0"><img src="resource2/ocstyle/images/navigation/16x16-browse-first.png" width="16" height="16"></a> <a href="search.php?{urlparams}&locidsite={prevpage}"><img src="resource2/ocstyle/images/navigation/16x16-browse-prev.png" width="16" height="16"></a>';
$page_selectable = '<a href="search.php?{urlparams}&locidsite={linkpage}">{showpage}</a>';
$page_selected = '<b>{page}</b>';
$pages_right = '<a href="search.php?{urlparams}&locidsite={nextpage}"><img src="resource2/ocstyle/images/navigation/16x16-browse-next.png" width="16" height="16"></a> <a href="search.php?{urlparams}&locidsite={lastpage}"><img src="resource2/ocstyle/images/navigation/16x16-browse-last.png" width="16" height="16"></a>';
$pages_right_inactive = '<img src="resource2/ocstyle/images/navigation/16x16-browse-next-inactive.png" width="16" height="16"> <img src="resource2/ocstyle/images/navigation/16x16-browse-last-inactive.png" width="16" height="16">';
// search.html.inc.php -> search.result.caches.tpl
$newcache_days = 14; // changed from 7 to 14 -- following 2013/6/17
$caches_newstring = '<b class="newsymbol">&nbsp;' . _('NEW') . '&nbsp;</b>&nbsp;';

View File

@ -9,14 +9,11 @@
<p>{t}For the search criterion no clear result was found. Please choose the desired location:{/t}</p>
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr><td colspan="2" style="margin-bottom:1px;"><p>{$pages}</p></td></tr>
<tr><td colspan="2" style="height:4px"></td></tr>
<tr><td colspan="2"><p>{include file="res_pager.tpl"}</p></td></tr>
<tr><td>&nbsp;</td></td></tr>
</table>
<table border="0" cellspacing="0" cellpadding="0" width="100%">
{$locations}
</table>
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr><td>&nbsp;</td></td></tr>
<tr><td colspan="2" style="margin-top:1px;"><p>{$pages}</p></td></tr>
<tr><td colspan="2" style="height:8px"></td></tr>
<tr><td colspan="2"><p>{include file="res_pager.tpl"}</p></td></tr>
<tr><td>&nbsp;</td></td></tr>
</table>

View File

@ -296,7 +296,7 @@ function getChildWaypoints($cacheid)
$tpl->assign('show_logpics', $logpics ? 1 : 0);
if ($logpics)
{
set_paged_pics(LOGPICS_FOR_CACHE_GALLERY, 0, $cacheid, $tpl, "viewcache.php?cacheid=" . $cacheid . "&logpics=1");
set_paged_pics(LOGPICS_FOR_CACHE_GALLERY, 0, $cacheid, "viewcache.php?cacheid=" . $cacheid . "&logpics=1");
$tpl->assign('subtitle',"&lt;&lt; <a href='viewcache.php?cacheid=" . $cacheid . "'>" .
$translate->t("Back to the cache description", "", "", 0) . "</a>");

View File

@ -130,7 +130,7 @@
$tpl->assign('logpics', get_logpics(LOGPICS_FOR_USER_STAT, $userid));
else
{
set_paged_pics(LOGPICS_FOR_USER_GALLERY, $userid, 0, $tpl, "viewprofile.php?userid=" . $userid . "&allpics=1");
set_paged_pics(LOGPICS_FOR_USER_GALLERY, $userid, 0, "viewprofile.php?userid=" . $userid . "&allpics=1");
$tpl->name = 'viewprofile_pics';
// actually we dont need all the other stuff here ..
}