Skip to content
Permalink
Browse files

added recommendation column in own and other users rec overview list

  • Loading branch information...
Slini11 committed Aug 27, 2015
1 parent 2f24ae1 commit a22a4a37a93cd76c840e8ed0492811ad496291b3
Binary file not shown.
@@ -37,9 +37,10 @@
}
}
$rs = sql("SELECT `cache_rating`.`cache_id` AS `cacheid`, `cache_rating`.`rating_date`, `caches`.`wp_oc` AS `wp`, `caches`.`name` AS `cachename`, `caches`.`type` AS `type`, `caches`.`status` AS `status`, `ca`.`attrib_id` IS NOT NULL AS `oconly`
$rs = sql("SELECT `cache_rating`.`cache_id` AS `cacheid`, `cache_rating`.`rating_date`, `caches`.`wp_oc` AS `wp`, `caches`.`name` AS `cachename`, `caches`.`type` AS `type`, `caches`.`status` AS `status`, `ca`.`attrib_id` IS NOT NULL AS `oconly`, `stat_caches`.`toprating` AS `countrating`
FROM `cache_rating`
INNER JOIN `caches` ON `cache_rating`.`cache_id`=`caches`.`cache_id`
LEFT JOIN `stat_caches` ON `stat_caches`.`cache_id`=`cache_rating`.`cache_id`
LEFT JOIN `caches_attributes` `ca` ON `ca`.`cache_id`=`caches`.`cache_id` AND `ca`.`attrib_id`=6
WHERE `cache_rating`.`user_id`='&1'
ORDER BY `rating_date` DESC", $login->userid);
@@ -24,16 +24,19 @@
<tr class="cachelistheader">
<th width="50px">{t}Type{/t}</th>
<th width="50px">{t}State{/t}</th>
<th width="500px">{t}Name{/t}</th>
<th width="450px">{t}Name{/t}</th>
<th width="50px" style="text-align:center"><img src="images/rating-star-shadow.png" title="{t}total recommendations{/t}" width="14" height="13" style="margin-top: -3px; "/></th>
<th width="100px"><nobr>{t}Recommended on{/t}</nobr></th>
<th></th>
</tr>

{foreach from=$ratings item=ratingItem}
{cycle assign=listcolor values="listcolor1,listcolor2"}
<tr class="cachelistitem">
<td class="{$listcolor}">{include file="res_cacheicon_22.tpl" cachetype=$ratingItem.type|escape}</td>
<td class="{$listcolor}">{include file="res_cachestatus.tpl" status=$ratingItem.status}</td>
<td class="{$listcolor}"><span style="{include file="res_cachestatus_span.tpl" status=$ratingItem.status}"><a href="viewcache.php?wp={$ratingItem.wp}">{$ratingItem.cachename|escape}</a></span> {include file="res_oconly.tpl" oconly=$ratingItem.oconly}</td>
<td class="{$listcolor}" style="text-align:center">{$ratingItem.countrating}</td>
<td class="{$listcolor}" style="text-align:center">{$ratingItem.rating_date|date_format:$opt.format.date}</td>
<td class="{$listcolor}"><nobr>[<a href="javascript:if(confirm('{t escape=js}Do you really want to remove this recommendation?{/t}'))location.href='mytop5.php?action=delete&amp;cacheid={$ratingItem.cacheid}'">{t}Remove recommendation{/t}</a>]</nobr></td>
</tr>
@@ -9,20 +9,22 @@
{t 1=$userid 2=$username|escape}Recommendations of <a href="viewprofile.php?userid=%1">%2</a>{/t}
</div>

<table class="table">
<table class="null" border="0" cellspacing="0" width="98%">
<tr>
<td colspan="2">
<table class="table" border="0" cellspacing="0" width="100%">
<tr class="cachelistheader">
<th width="30px">{t}Type{/t}</th>
<th width="620px">{t}Name{/t}</th>
<th width="570px">{t}Name{/t}</th>
<th width="50px" style="text-align:center"><img src="images/rating-star-shadow.png" title="{t}total recommendations{/t}" width="14" height="13" style="margin-top: -3px; "/></th>
<th width="50px">{t}State{/t}</th>
</tr>
{foreach from=$ratings item=ratingItem}
{cycle assign=listcolor values="listcolor1,listcolor2"}
<tr class="cachelistitem">
<td class="{$listcolor}">{include file="res_cacheicon_22.tpl" cachetype=$ratingItem.type|escape}</td>
<td class="{$listcolor}"><span style="{include file="res_cachestatus_span.tpl" status=$ratingItem.status}"><a href="viewcache.php?cacheid={$ratingItem.cacheid}">{$ratingItem.cachename|escape}</a></span> {include file="res_oconly.tpl" oconly=$ratingItem.oconly} {t 1=$ratingItem.ownername|escape}by %1{/t}</td>
<td class="{$listcolor}" style="text-align:center">{$ratingItem.countrating}</td>
<td class="{$listcolor}">{include file="res_cachestatus.tpl" status=$ratingItem.status}</td>
</tr>
{foreachelse}
@@ -20,11 +20,12 @@
$tpl->assign('username', $sUsername);
$tpl->assign('oconly',$oconly);
$rs = sql("SELECT `cache_rating`.`cache_id` AS `cacheid`, `caches`.`name` AS `cachename`, `user`.`username` AS `ownername`, `caches`.`type` AS `type`, `caches`.`status` AS `status`, `ca`.`attrib_id` IS NOT NULL AS `oconly`
$rs = sql("SELECT `cache_rating`.`cache_id` AS `cacheid`, `caches`.`name` AS `cachename`, `user`.`username` AS `ownername`, `caches`.`type` AS `type`, `caches`.`status` AS `status`, `ca`.`attrib_id` IS NOT NULL AS `oconly`, `stat_caches`.`toprating` AS `countrating`
FROM `cache_rating`
INNER JOIN `caches` ON `cache_rating`.`cache_id` = `caches`.`cache_id`
INNER JOIN `user` ON `caches`.`user_id`=`user`.`user_id`
INNER JOIN `cache_status` ON `caches`.`status`=`cache_status`.`id`
LEFT JOIN `stat_caches` ON `stat_caches`.`cache_id`=`cache_rating`.`cache_id`
LEFT JOIN `caches_attributes` `ca` ON `ca`.`cache_id`=`caches`.`cache_id` AND `ca`.`attrib_id`=6
WHERE `cache_status`.`allow_user_view`=1
AND `cache_rating`.`user_id`='&1'

0 comments on commit a22a4a3

Please sign in to comment.
You can’t perform that action at this time.