echo "<td class='watch'>"; if($tplHelper->isBeingWatched($spot)) { echo "<a onclick=\"removeWatchSpot('".$spot['messageid']."',".$spot['id'].")\" id='watched_".$spot['id']."'><img src='templates_we1rdo/img/fav.png' alt='Verwijder uit watchlist' title='Verwijder uit watchlist'/></a>"; echo "<a onclick=\"addWatchSpot('".$spot['messageid']."',".$spot['id'].")\" style='display: none;' id='watch_".$spot['id']."'><img src='templates_we1rdo/img/fav_light.png' alt='Plaats in watchlist' title='Plaats in watchlist' /></a>"; } else { echo "<a onclick=\"removeWatchSpot('".$spot['messageid']."',".$spot['id'].")\" style='display: none;' id='watched_".$spot['id']."'><img src='templates_we1rdo/img/fav.png' alt='Verwijder uit watchlist' title='Verwijder uit watchlist'/></a>"; echo "<a onclick=\"addWatchSpot('".$spot['messageid']."',".$spot['id'].")\" id='watch_".$spot['id']."'><img src='templates_we1rdo/img/fav_light.png' alt='Plaats in watchlist' title='Plaats in watchlist' /></a>"; } echo "</td>"; if ($settings['retrieve_comments']) { echo "<td class='comments'><a href='" . $tplHelper->makeSpotUrl($spot) . "#comments' title='" . $tplHelper->getCommentCount($spot) . " comments bij \"" . $spot['title'] . "\"' class='spotlink'>" . $tplHelper->getCommentCount($spot) . "</a></td>"; } # if echo "<td>" . SpotCategories::Cat2Desc($spot['category'], $spot['subcat' . SpotCategories::SubcatNumberFromHeadcat($spot['category'])]) . "</td>" . "<td>" . $spot['poster'] . "</td>" . "<td>" . $tplHelper->formatDate($spot['stamp'], 'spotlist') . "</td>"; # only display the NZB button from 24 nov or later if ($spot['stamp'] > 1290578400 ) { if ($settings['show_nzbbutton']) { echo "<td><a href='" . $tplHelper->makeNzbUrl($spot) . "' title ='Download NZB' class='nzb'>NZB"; if ($tplHelper->hasBeenDownloaded($spot)) { echo '*'; } # if echo "</a></td>"; } # if
<?php $count = 0; foreach ($spots as $spot) { # fix the sabnzbdurl en searchurl $spot['sabnzbdurl'] = $tplHelper->makeSabnzbdUrl($spot); $spot['searchurl'] = $tplHelper->makeSearchUrl($spot); if ($tplHelper->newSinceLastVisit($spot)) { $newSpotClass = 'new'; } else { $newSpotClass = ''; } # else $subcatFilter = SpotCategories::SubcatToFilter($spot['category'], $spot['subcata']); $count++; echo "\t\t\t\t\t\t\t"; echo "<tr class='" . $tplHelper->cat2color($spot) . ' ' . ($count % 2 ? "even" : "odd") . $spot['subcata'] . $spot['subcatb'] . $spot['subcatc'] . $spot['subcatd'] . "'>" . "<td class='category'><a href='?search[tree]=" . $subcatFilter . "' title='Ga naar de categorie \"" . SpotCategories::Cat2ShortDesc($spot['category'], $spot['subcata']) . "\"'>" . SpotCategories::Cat2ShortDesc($spot['category'], $spot['subcata']) . "</a></td>" . "<td class='title " . $newSpotClass . "'><a href='?page=getspot&messageid=" . $spot['messageid'] . "' title='" . $spot['title'] . "' class='spotlink'>" . $spot['title'] . "</a></td>" . "<td class='comments'><a href='?page=getspot&messageid=" . $spot['messageid'] . "#comments' title='" . $tplHelper->getCommentCount($spot) . " comments bij \"" . $spot['title'] . "\"' class='spotlink'>" . $tplHelper->getCommentCount($spot) . "</a></td>" . "<td>" . SpotCategories::Cat2Desc($spot['category'], $spot['subcat' . SpotCategories::SubcatNumberFromHeadcat($spot['category'])]) . "</td>" . "<td>" . $spot['poster'] . "</td>" . "<td>" . $tplHelper->formatDate($spot['stamp'], 'spotlist') . "</td>"; # only display the NZB button from 24 nov or later if ($spot['stamp'] > 1290578400) { if ($settings['show_nzbbutton']) { echo "<td><a href='?page=getnzb&messageid=" . $spot['messageid'] . "' title ='Download NZB' class='nzb'>NZB"; if ($tplHelper->hasBeenDownloaded($spot)) { echo '*'; } # if echo "</a></td>"; } # if # display the sabnzbd button if (!empty($spot['sabnzbdurl'])) { //echo "<td><a target='_blank' href='" . $spot['sabnzbdurl'] . "' title='Voeg spot toe aan SabNZBd+ queue'><img height='16' width='16' class='sabnzbd-button' src='images/download-small.png'></a></td>"; echo "<td><a class='sabnzbd-button' target='_blank' href='" . $spot['sabnzbdurl'] . "' title='Add NZB to SabNZBd queue'><img height='16' width='16' class='sabnzbd-button' src='images/download-small.png'></a></td>";
<?php foreach ($watchlist as $watch) { $watch['sabnzbdurl'] = $tplHelper->makeSabnzbdUrl($watch); $watch['searchurl'] = $tplHelper->makeSearchUrl($watch); if ($tplHelper->isModerated($watch)) { $markSpot = '<span class="markSpot">!</span>'; } else { $markSpot = ''; } echo "<tr class='" . $tplHelper->cat2color($watch) . "'>" . "<td class='category'><a href='?search[tree]=" . $subcatFilter . "' title='Ga naar de categorie \"" . SpotCategories::Cat2ShortDesc($watch['category'], $watch['subcata']) . "\"'>" . SpotCategories::Cat2ShortDesc($watch['category'], $watch['subcata']) . "</a></td>" . "<td class='title " . $newSpotClass . "'><a href='" . $tplHelper->makeSpotUrl($watch) . "' title='" . $watch['title'] . "' class='spotlink'>" . $watch['title'] . $markSpot . "</a></td>"; if ($settings['retrieve_comments']) { echo "<td class='comments'><a href='" . $tplHelper->makeSpotUrl($watch) . "#comments' title='" . $tplHelper->getCommentCount($watch) . " comments bij \"" . $watch['title'] . "\"' class='spotlink'>" . $tplHelper->getCommentCount($watch) . "</a></td>"; } # if echo "<td>" . SpotCategories::Cat2Desc($watch['category'], $watch['subcat' . SpotCategories::SubcatNumberFromHeadcat($watch['category'])]) . "</td>" . "<td>" . $watch['poster'] . "</td>" . "<td>" . $tplHelper->formatDate($watch['stamp'], 'spotlist') . "</td>"; # only display the NZB button from 24 nov or later if ($watch['stamp'] > 1290578400) { if ($settings['show_nzbbutton']) { echo "<td><a href='" . $tplHelper->makeNzbUrl($watch) . "' title ='Download NZB' class='nzb'>NZB"; if ($tplHelper->hasBeenDownloaded($watch)) { echo '*'; } # if echo "</a></td>"; $multispotid = htmlspecialchars($watch['messageid']); echo "<td>"; echo "<input type='checkbox' name='" . htmlspecialchars('messageid[]') . "' value='" . $multispotid . "'>"; echo "</td>"; } # if
if ($tplHelper->isBeingWatched($spot) == false) { echo " style='display: none;'"; } echo " id='watchremove_" . $spot['id'] . "'><img src='templates/we1rdo/img/fav.png' alt='Verwijder uit watchlist' title='Verwijder uit watchlist'/></a>"; echo "<a onclick=\"toggleWatchSpot('" . $spot['messageid'] . "','add'," . $spot['id'] . ")\""; if ($tplHelper->isBeingWatched($spot) == true) { echo " style='display: none;'"; } echo " id='watchadd_" . $spot['id'] . "'><img src='templates/we1rdo/img/fav_light.png' alt='Plaats in watchlist' title='Plaats in watchlist' /></a>"; echo "</td>"; } if ($settings['retrieve_comments']) { echo "<td class='comments'><a href='" . $tplHelper->makeSpotUrl($spot) . "#comments' title='" . $tplHelper->getCommentCount($spot) . " comments bij \"" . $spot['title'] . "\"' class='spotlink'>" . $tplHelper->getCommentCount($spot) . "</a></td>"; } # if echo "<td>" . SpotCategories::Cat2Desc($spot['category'], $spot['subcat' . SpotCategories::SubcatNumberFromHeadcat($spot['category'])]) . "</td>" . "<td><a href='" . $tplHelper->makePosterUrl($spot) . "' title='Zoek spots van " . $spot['poster'] . "'>" . $spot['poster'] . "</a></td>" . "<td>" . $tplHelper->formatDate($spot['stamp'], 'spotlist') . "</td>"; # only display the NZB button from 24 nov or later if ($spot['stamp'] > 1290578400) { if ($settings['show_nzbbutton']) { echo "<td><a href='" . $tplHelper->makeNzbUrl($spot) . "' title ='Download NZB' class='nzb'>NZB"; if ($tplHelper->hasBeenDownloaded($spot)) { echo '*'; } # if echo "</a></td>"; } # if if ($settings['show_multinzb']) { $multispotid = htmlspecialchars($spot['messageid']); echo "<td>"; echo "<input type='checkbox' name='" . htmlspecialchars('messageid[]') . "' value='" . $multispotid . "'>";
function formatSpotHeader($spot) { /* $spot['sabnzbdurl'] = ''; $spot['searchurl'] = ''; $spot['spoturl'] = ''; $spot['caturl'] = ''; $spot['subcaturl'] = ''; $spot['posterurl'] = ''; $spot['title'] = ''; $spot['poster'] = ''; $spot['catshortdesc'] = ''; $spot['catdesc'] = ''; $spot['hasbeendownloaded'] = ($spot['downloadstamp'] != NULL); $spot['isbeingwatched'] = ($spot['watchstamp'] != NULL); return $spot; */ # fix the sabnzbdurl, searchurl, sporturl, subcaturl, posterurl $spot['sabnzbdurl'] = $this->makeSabnzbdUrl($spot); $spot['searchurl'] = $this->makeSearchUrl($spot); $spot['spoturl'] = $this->makeSpotUrl($spot); $spot['caturl'] = $this->makeCatUrl($spot); $spot['subcaturl'] = $this->makeSubCatUrl($spot, $spot['subcat' . SpotCategories::SubcatNumberFromHeadcat($spot['category'])]); $spot['posterurl'] = $this->makePosterUrl($spot); // title escapen $spot['title'] = htmlentities($spot['title'], ENT_QUOTES, 'UTF-8'); $spot['title'] = html_entity_decode($spot['title'], ENT_COMPAT, 'UTF-8'); $spot['title'] = strip_tags($this->remove_extensive_dots($spot['title'])); $spot['poster'] = htmlspecialchars(strip_tags($spot['poster']), ENT_QUOTES, 'UTF-8'); // we zetten de short description van de category bij $spot['catshortdesc'] = SpotCategories::Cat2ShortDesc($spot['category'], $spot['subcata']); $spot['catdesc'] = SpotCategories::Cat2Desc($spot['category'], $spot['subcat' . SpotCategories::SubcatNumberFromHeadcat($spot['category'])]); // commentcount en rating altijd teruggeven $spot['commentcount'] = (int) $spot['commentcount']; $spot['rating'] = (int) $spot['rating']; // is deze spot al eens gedownload? $spot['hasbeendownloaded'] = $spot['downloadstamp'] != NULL; // is deze spot al eens bekeken? $spot['hasbeenseen'] = $spot['seenstamp'] != NULL; // zit deze spot in de watchlist? $spot['isbeingwatched'] = $spot['watchstamp'] != NULL; return $spot; }
<?php if (isset($settings['sabnzbd']['apikey'])) { ?> <th> sabnzbd </th> <?php } ?> </tr> <?php $count = 0; foreach ($spots as $spot) { $count++; echo "\t\t\t\t\t"; echo "<tr class='" . ($count % 2 ? "even" : "odd") . "' >" . "<td>" . SpotCategories::Cat2Desc($spot['category'], $spot['subcata']) . "</td>" . "<td>" . SpotCategories::HeadCat2Desc($spot['category']) . "</td>" . "<td><a href='?page=getspot&messageid=" . $spot['messageid'] . "'>" . $spot['title'] . "</a></td>" . "<td>" . SpotCategories::Cat2Desc($spot['category'], $spot['subcat' . SpotCategories::SubcatNumberFromHeadcat($spot['category'])]) . "</td>" . "<td>" . $spot['poster'] . "</td>" . "<td>" . strftime("%a, %d-%b-%Y (%H:%M)", $spot['stamp']) . "</td>"; # only display the NZB button from 24 nov or later if ($spot['stamp'] > 1290578400) { if ($settings['show_nzbbutton']) { echo "<td><a href='?page=getnzb&messageid=" . $spot['messageid'] . "'>NZB</a></td>"; } # if # display the sabnzbd button if (!empty($spot['sabnzbdurl'])) { echo "<td><a target='_blank' href='" . $spot['sabnzbdurl'] . "' ><img height='16 widt='16' class='sabnzbd-button' src='images/download-small.png'></a></td>"; } # if } else { if ($settings['show_nzbbutton']) { echo "<td> </td>"; }