现在主要是想统计下载的总点数,其实方法是很简单的!列表模板要勾选支持程序代码!切记!改造方法如下:
downpath字段如果在副表:
downpath字段如果在副表:
downpath如果在主表:
- $ff=$empire->fetch1("select downpath from{$dbtbpre}ecms_download_data_'$r[stb]' where id='$r[id]' limit 1");
- $down=explode(egetzy('rn'),$ff['downpath']);
- $count = count($down);
- $sum = 0;
- for($i = 0; $i <$count; $i++) {
- $fr = explode("::::::", $down[$i]);
- $sum += $fr[3];
- }
- $listtemp=' <li><a href="[!--titleurl--]" title="[!--title--]'.$sum.'" target="_blank"><img class="lazy" data-original="[!--titlepic--]" width="500" height="330" alt=""/><span>[!--title--]'.$count.'</span></a></li>';
- $down=explode(egetzy('rn'),$r['downpath']);
- $count = count($down);
- $sum = 0;
- for($i = 0; $i <$count; $i++) {
- $fr = explode("::::::", $down[$i]);
- $sum += $fr[3];
- }
- $listtemp=' <li><a href="[!--titleurl--]" title="[!--title--]'.$sum.'" target="_blank"><img class="lazy" data-original="[!--titlepic--]" width="500" height="330" alt=""/><span>[!--title--]'.$count.'</span></a></li>';