mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-09-02 03:08:53 +00:00
Fixed the cart issues.
This commit is contained in:
+2
-2
@@ -14,7 +14,7 @@ if (isset($_GET["add"])) {
|
||||
}
|
||||
|
||||
foreach ($data as $d) {
|
||||
$users->addCart($page->users->currentUserId(), $d["id"]);
|
||||
$page->users->addCart($page->users->currentUserId(), $d["id"]);
|
||||
}
|
||||
} elseif (isset($_REQUEST["delete"])) {
|
||||
if (isset($_GET['delete']) && !empty($_GET['delete'])) {
|
||||
@@ -24,7 +24,7 @@ if (isset($_GET["add"])) {
|
||||
}
|
||||
|
||||
if (isset($ids)) {
|
||||
$users->delCartByGuid($ids, $users->currentUserId());
|
||||
$page->users->delCartByGuid($ids, $page->users->currentUserId());
|
||||
}
|
||||
|
||||
if (!isset($_POST['delete'])) {
|
||||
|
||||
@@ -2,44 +2,40 @@
|
||||
<h1>My Cart</h1>
|
||||
|
||||
<p>
|
||||
Your cart can be downloaded as an <a href="{$smarty.const.WWW_TOP}/rss?t=-2&dl=1&i={$userdata.id}&r={$userdata.rsstoken}&del=1">Rss Feed</a>.
|
||||
Your cart can be downloaded as an <a href="{$smarty.const.WWW_TOP}/rss?t=-2&dl=1&i={$userdata.id}&r={$userdata.rsstoken}&del=1">Rss Feed</a>.
|
||||
</p>
|
||||
|
||||
{if $results|@count > 0}
|
||||
|
||||
<form id="nzb_multi_operations_form" action="get">
|
||||
<form id="nzb_multi_operations_form" action="get">
|
||||
|
||||
<div class="nzb_multi_operations">
|
||||
<small>With Selected:</small>
|
||||
<input type="button" class="nzb_multi_operations_cartdelete" value="Delete" />
|
||||
{if $sabintegrated}<input type="button" class="nzb_multi_operations_cartsab" value="Send To Sab" />{/if}
|
||||
<input type="button" class="nzb_multi_operations_download" value="Download" />
|
||||
</div>
|
||||
<div class="nzb_multi_operations">
|
||||
<small>With Selected:</small>
|
||||
<input type="button" class="nzb_multi_operations_cartdelete" value="Delete" />
|
||||
</div>
|
||||
|
||||
<table style="width:100%;" class="data highlight" id="browsetable">
|
||||
<tr>
|
||||
<th width="50"><input id="chkSelectAll" type="checkbox" class="nzb_check_all" /><label for="chkSelectAll" style="display:none;">Select All</label></th>
|
||||
<th>name</th>
|
||||
<th>added</th>
|
||||
<th>options</th>
|
||||
</tr>
|
||||
<table style="width:100%;" class="data highlight" id="browsetable">
|
||||
<tr>
|
||||
<th width="50"><input id="chkSelectAll" type="checkbox" class="nzb_check_all" /><label for="chkSelectAll" style="display:none;">Select All</label></th>
|
||||
<th>name</th>
|
||||
<th>added</th>
|
||||
<th>options</th>
|
||||
</tr>
|
||||
|
||||
{foreach from=$results item=result}
|
||||
<tr class="{cycle values=",alt"}">
|
||||
<td class="check">
|
||||
<input id="chk{$result.guid|substr:0:7}" type="checkbox" class="nzb_check" value="{$result.guid}" />
|
||||
</td>
|
||||
<td>
|
||||
<a title="View details" href="{$smarty.const.WWW_TOP}/details/{$result.guid}/{$result.searchname|escape:"seourl"}">{$result.searchname|escape:"htmlall"|wordwrap:75:"\n":true}</a>
|
||||
</td>
|
||||
<td class="less" title="Added on {$result.createddate}">{$result.createddate|date_format}</td>
|
||||
<td><a title="Delete from your cart" href="?delete={$result.guid}">delete</a></td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
{foreach from=$results item=result}
|
||||
<tr class="{cycle values=",alt"}">
|
||||
<td class="check"><input id="chk{$result.guid|substr:0:7}" type="checkbox" class="nzb_check" value="{$result.id}" /></td>
|
||||
<td>
|
||||
<a title="View details" href="{$smarty.const.WWW_TOP}/details/{$result.guid}/{$result.searchname|escape:"htmlall"}">{$result.searchname|escape:"htmlall"|wordwrap:75:"\n":true}</a>
|
||||
</td>
|
||||
<td class="less" title="Added on {$result.createddate}">{$result.createddate|date_format}</td>
|
||||
<td><a title="Delete from your cart" href="?delete={$result.id}">delete</a></td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
|
||||
</table>
|
||||
</form>
|
||||
</table>
|
||||
</form>
|
||||
|
||||
{else}
|
||||
<h2>No NZBs in cart</h2>
|
||||
<h2>No NZBs in cart</h2>
|
||||
{/if}
|
||||
Reference in New Issue
Block a user