mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-29 01:08:56 +00:00
Fix admin area
This commit is contained in:
@@ -199,6 +199,7 @@ class Contents
|
||||
|
||||
/**
|
||||
* @param $content
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function data_update($content): int
|
||||
|
||||
@@ -211,7 +211,7 @@ class BasePage
|
||||
*/
|
||||
public function show403($from_admin = false): void
|
||||
{
|
||||
header(
|
||||
request()->header(
|
||||
'Location: '.
|
||||
($from_admin ? str_replace('/admin', '', WWW_TOP) : WWW_TOP).
|
||||
'/login?redirect='.
|
||||
|
||||
@@ -45,7 +45,7 @@ switch ($action) {
|
||||
$content = $contents->update(request()->all());
|
||||
$returnid = $content['id'];
|
||||
}
|
||||
header('Location:content-add.php?id='.$returnid);
|
||||
header('Location:'.WWW_TOP.'/content-add.php?id='.$returnid);
|
||||
break;
|
||||
|
||||
case 'view':
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
</script>
|
||||
{/literal}
|
||||
<form id="release" action="{$smarty.const.WWW_TOP}/ajax_release-admin/?action=doedit" method="get">
|
||||
{{csrf_field()}}
|
||||
{foreach from=$idArr item=id}
|
||||
<input type="hidden" name="id[]" value="{$id}" />
|
||||
{/foreach}
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
<div class="well well-sm">
|
||||
|
||||
<form enctype="multipart/form-data" action="{$SCRIPT_NAME}?action=submit" method="POST">
|
||||
{{csrf_field()}}
|
||||
|
||||
<input type="hidden" name="from" value="{$smarty.get.from}" />
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
<div style="float:right;">
|
||||
|
||||
<form name="anidbsearch" action="">
|
||||
{{csrf_field()}}
|
||||
<label for="animetitle">Title</label>
|
||||
<input id="animetitle" type="text" name="animetitle" value="{$animetitle}" size="15" />
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
{/if}
|
||||
<div class="well well-sm">
|
||||
<form action="{$SCRIPT_NAME}?action=submit" method="POST">
|
||||
{{csrf_field()}}
|
||||
<table class="input">
|
||||
<tr>
|
||||
<td>Group:</td>
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
<div class="well well-sm">
|
||||
<form enctype="multipart/form-data" action="{$SCRIPT_NAME}?action=submit" method="post">
|
||||
{{csrf_field()}}
|
||||
|
||||
<input type="hidden" name="id" value="{$book.id}" />
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
<div class="well well-sm">
|
||||
<a class="btn btn-success" href="{$smarty.const.WWW_TOP}/category-list.php"><i class="fa fa-arrow-left"></i> Go back</a>
|
||||
<form action="{$SCRIPT_NAME}?action=submit" method="POST">
|
||||
{{csrf_field()}}
|
||||
|
||||
<table class="input data table table-striped responsive-utilities jambo-table">
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
<div class="well well-sm">
|
||||
<a class="btn btn-success" href="{$smarty.const.WWW_TOP}/category_regexes-list.php"><i class="fa fa-arrow-left"></i> Go back</a>
|
||||
<form action="{$SCRIPT_NAME}?action=submit" method="POST">
|
||||
{{csrf_field()}}
|
||||
<table class="input data table table-striped responsive-utilities jambo-table">
|
||||
<tr>
|
||||
<td><label for="group_regex">Group:</label></td>
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
<div id="message"></div>
|
||||
|
||||
<form name="groupsearch" action="" style="margin-bottom:5px;">
|
||||
{{csrf_field()}}
|
||||
<label for="group">Search a group:</label>
|
||||
<input id="group" type="text" name="group" value="{$group}" size="15" />
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
<div class="well well-sm">
|
||||
<a class="btn btn-success" href="{$smarty.const.WWW_TOP}/collection_regexes-list.php"><i class="fa fa-arrow-left"></i> Go back</a>
|
||||
<form action="{$SCRIPT_NAME}?action=submit" method="POST">
|
||||
{{csrf_field()}}
|
||||
<table class="input data table table-striped responsive-utilities jambo-table">
|
||||
<tr>
|
||||
<td><label for="group_regex">Group:</label></td>
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
<div id="message"></div>
|
||||
|
||||
<form name="groupsearch" action="" style="margin-bottom:5px;">
|
||||
{{csrf_field()}}
|
||||
<label for="group">Search a group:</label>
|
||||
<input id="group" type="text" name="group" value="{$group}" size="15" />
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<p>This page is used for testing regex for grouping usenet collections.<br />Enter the group name to test and a regex. Limit is how many collections to show max on the page, 0 for no limit(slow).</p>
|
||||
|
||||
<form name="search" action="" method="post" style="margin-bottom:5px;">
|
||||
{{csrf_field()}}
|
||||
<label for="group" style="padding-right:1px">Group:</label>
|
||||
<input id="group" type="text" name="group" value="{$group|htmlentities}" size="20" /><br />
|
||||
<label for="regex" style="padding-right:1px">Regex:</label>
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<div class="well well-sm">
|
||||
<a class="btn btn-success" href="{$smarty.const.WWW_TOP}/console-list.php"><i class="fa fa-arrow-left"></i> Go back</a>
|
||||
<form enctype="multipart/form-data" action="{$SCRIPT_NAME}?action=submit" method="post">
|
||||
{{csrf_field()}}
|
||||
|
||||
<input type="hidden" name="id" value="{$console.id}" />
|
||||
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
<div class="well well-sm">
|
||||
<h1>{$page->title}</h1>
|
||||
<a class="btn btn-success" href="{$smarty.const.WWW_TOP}/content-list.php"><i class="fa fa-arrow-left"></i> Go back</a>
|
||||
<form action="{$SCRIPT_NAME}?action=submit" method="POST">
|
||||
<form action="{$SCRIPT_NAME}?action=submit" method="post">
|
||||
{{csrf_field()}}
|
||||
<table class="input data table table-striped responsive-utilities jambo-table">
|
||||
<tr>
|
||||
<td><label for="title">Title:</label></td>
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
<h1>{$page->title}</h1>
|
||||
<a class="btn btn-success" href="{$smarty.const.WWW_TOP}/game-list.php"><i class="fa fa-arrow-left"></i> Go back</a>
|
||||
<form enctype="multipart/form-data" action="{$SCRIPT_NAME}?action=submit" method="post">
|
||||
{{csrf_field()}}
|
||||
<input type="hidden" name="id" value="{$game.id}" />
|
||||
<table class="input data table table-striped responsive-utilities jambo-table">
|
||||
<tr>
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
<p>Regex of groups to add to the site.</p>
|
||||
|
||||
<form action="{$SCRIPT_NAME}?action=submit" method="POST">
|
||||
{{csrf_field()}}
|
||||
<table class="input">
|
||||
|
||||
<tr>
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
<h1>{$page->title}</h1>
|
||||
<a class="btn btn-success" href="{$smarty.const.WWW_TOP}/group-list.php"><i class="fa fa-arrow-left"></i> Go back</a>
|
||||
<form action="{$SCRIPT_NAME}?action=submit" method="POST">
|
||||
{{csrf_field()}}
|
||||
<table class="input data table table-striped responsive-utilities jambo-table">
|
||||
<tr>
|
||||
<td>Name:</td>
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
{if $grouplist}
|
||||
<div style="position:relative;margin-bottom:5px;">
|
||||
<form name="groupsearch" action="" style="margin-bottom:5px;">
|
||||
{{csrf_field()}}
|
||||
<label for="groupname">Group</label>
|
||||
<input id="groupname" type="text" name="groupname" value="{$groupname}" size="15" />
|
||||
|
||||
@@ -66,6 +67,7 @@
|
||||
</div>
|
||||
<div style="text-align:center;">
|
||||
<form name="groupsearch" action="" style="margin-bottom:5px;">
|
||||
{{csrf_field()}}
|
||||
<label for="groupname">Group</label>
|
||||
<input id="groupname" type="text" name="groupname" value="{$groupname}" size="15" />
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
<h1>{$page->title}</h1>
|
||||
<a class="btn btn-success" href="{$smarty.const.WWW_TOP}/menu-list.php"><i class="fa fa-arrow-left"></i> Go back</a>
|
||||
<form action="{$SCRIPT_NAME}?action=submit" method="POST">
|
||||
{{csrf_field()}}
|
||||
|
||||
<table class="input data table table-striped responsive-utilities jambo-table">
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
<h1>{$page->title}</h1>
|
||||
|
||||
<form enctype="multipart/form-data" action="{$SCRIPT_NAME}" method="post">
|
||||
{{csrf_field()}}
|
||||
|
||||
|
||||
<table class="input data table table-striped responsive-utilities jambo-table">
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
<h1>{$page->title}</h1>
|
||||
<a class="btn btn-success" href="{$smarty.const.WWW_TOP}/movie-list.php"><i class="fa fa-arrow-left"></i> Go back</a>
|
||||
<form enctype="multipart/form-data" action="{$SCRIPT_NAME}?action=submit" method="post">
|
||||
{{csrf_field()}}
|
||||
|
||||
<input type="hidden" name="id" value="{$movie.imdbid}" />
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
<h1>{$page->title}</h1>
|
||||
<a class="btn btn-success" href="{$smarty.const.WWW_TOP}/music-list.php"><i class="fa fa-arrow-left"></i> Go back</a>
|
||||
<form enctype="multipart/form-data" action="{$SCRIPT_NAME}?action=submit" method="post">
|
||||
{{csrf_field()}}
|
||||
|
||||
<input type="hidden" name="id" value="{$music.id}" />
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@ If you are exporting a large number of nzb files, run this script from the comma
|
||||
|
||||
|
||||
<form action="{$SCRIPT_NAME}" method="POST">
|
||||
{{csrf_field()}}
|
||||
|
||||
<table class="input data table table-striped responsive-utilities jambo-table">
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
<fieldset>
|
||||
<legend>Import From Directory</legend>
|
||||
<form action="{$SCRIPT_NAME}#results" method="POST">
|
||||
{{csrf_field()}}
|
||||
<table class="input data table table-striped responsive-utilities jambo-table">
|
||||
<tr>
|
||||
<td style="width:100px;"><label for="folder">Folder:</label></td>
|
||||
@@ -49,6 +50,7 @@
|
||||
<fieldset>
|
||||
<legend>Import From Browser</legend>
|
||||
<form action="{$SCRIPT_NAME}#results" method="POST" enctype="multipart/form-data">
|
||||
{{csrf_field()}}
|
||||
<table class="input data table table-striped responsive-utilities jambo-table">
|
||||
<tr>
|
||||
<td style="width:100px;"><label for="uploadedfiles[]">File:</label></td>
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
<h1>{$page->title}</h1>
|
||||
<a class="btn btn-success" href="{$smarty.const.WWW_TOP}/posters-list.php"><i class="fa fa-arrow-left"></i> Go back</a>
|
||||
<form action="{$SCRIPT_NAME}?action=submit" method="POST">
|
||||
{{csrf_field()}}
|
||||
<table class="input data table table-striped responsive-utilities jambo-table">
|
||||
<tr>
|
||||
<td>Poster name:</td>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<h1>{$page->title}</h1>
|
||||
<div class="well well-sm">
|
||||
<form name="presearch" method="get" action="{$smarty.const.WWW_TOP}/predb.php" id="custom-search-form"
|
||||
{{csrf_field()}}
|
||||
class="form-inline form-horizontal col-4 col-lg-4 pull-right">
|
||||
<div id="search" class="input-group col-12 col-lg-12">
|
||||
<input type="text" class="form-control" placeholder="Search predb" id="presearch" name="presearch"
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
<h1>{$page->title}</h1>
|
||||
<a class="btn btn-success" href="{$smarty.const.WWW_TOP}/release-list.php"><i class="fa fa-arrow-left"></i> Go back</a>
|
||||
<form action="{$SCRIPT_NAME}?action=submit" method="POST">
|
||||
{{csrf_field()}}
|
||||
<table class="input data table table-striped responsive-utilities jambo-table">
|
||||
<tr>
|
||||
<td><label for="name">Original Name:</label></td>
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
{/if}
|
||||
<a class="btn btn-success" href="{$smarty.const.WWW_TOP}/release_naming_regexes-list.php"><i class="fa fa-arrow-left"></i> Go back</a>
|
||||
<form action="{$SCRIPT_NAME}?action=submit" method="POST">
|
||||
{{csrf_field()}}
|
||||
<table class="input data table table-striped responsive-utilities jambo-table">
|
||||
<tr>
|
||||
<td><label for="group_regex">Group:</label></td>
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
<div id="message"></div>
|
||||
|
||||
<form name="groupsearch" action="" style="margin-bottom:5px;">
|
||||
{{csrf_field()}}
|
||||
<label for="group">Search a group:</label>
|
||||
<input id="group" type="text" name="group" value="{if isset($group)}{$group}{else}{/if}" size="15" />
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
</p>
|
||||
|
||||
<form name="search" action="" method="post" style="margin-bottom:5px;">
|
||||
{{csrf_field()}}
|
||||
<table class="input data table table-striped responsive-utilities jambo-table">
|
||||
<tr>
|
||||
<td><label for="group" style="padding-right:1px">Group:</label>
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
<a class="btn btn-success" href="{$smarty.const.WWW_TOP}/role-list.php"><i class="fa fa-arrow-left"></i> Go back</a>
|
||||
<form action="{$SCRIPT_NAME}?action=submit" method="POST">
|
||||
{{csrf_field()}}
|
||||
|
||||
<table class="input data table table-striped responsive-utilities jambo-table">
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
<div id="message" style="width:717px;">msg</div>
|
||||
{if $local}
|
||||
<form action="{$SCRIPT_NAME}" method="post">
|
||||
{{csrf_field()}}
|
||||
<fieldset style="width:717px;">
|
||||
<legend>Local sharing settings.</legend>
|
||||
<table class="input data table table-striped responsive-utilities jambo-table">
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
<h1>{$page->title}</h1>
|
||||
<a class="btn btn-success" href="{$smarty.const.WWW_TOP}/show-list.php"><i class="fa fa-arrow-left"></i> Go back</a>
|
||||
<form enctype="multipart/form-data" action="{$SCRIPT_NAME}?action=submit" method="POST">
|
||||
{{csrf_field()}}
|
||||
<input type="hidden" name="from" value="{$smarty.get.from}" />
|
||||
<table class="input data table table-striped responsive-utilities jambo-table">
|
||||
<tr>
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
{if $tvshowlist}
|
||||
<div style="float:right;">
|
||||
<form name="showsearch" action="">
|
||||
{{csrf_field()}}
|
||||
<label for="showname">Title</label>
|
||||
<input id="showname" type="text" name="showname" value="{$showname}" size="15" />
|
||||
|
||||
|
||||
+1543
-1338
File diff suppressed because it is too large
Load Diff
@@ -2,6 +2,7 @@
|
||||
<h1>{$page->title}</h1>
|
||||
|
||||
<form action="{$SCRIPT_NAME}?action=submit" method="post">
|
||||
{{csrf_field()}}
|
||||
|
||||
{if isset($error) && $error != ''}
|
||||
<div class="error">{$error}</div>
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
{/if}
|
||||
<a class="btn btn-success" href="{$smarty.const.WWW_TOP}/user-list.php">Go back</a>
|
||||
<form action="{$SCRIPT_NAME}?action=submit" method="POST">
|
||||
{{csrf_field()}}
|
||||
<table class="input data table table-striped responsive-utilities jambo-table">
|
||||
<tr>
|
||||
<td>Name:</td>
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
<div style="float:right;">
|
||||
|
||||
<form name="usersearch" action="">
|
||||
{{csrf_field()}}
|
||||
<label for="username">username</label>
|
||||
<input id="username" type="text" name="username" value="{$username}" size="10"/>
|
||||
|
||||
|
||||
+11
-1
@@ -15,6 +15,16 @@ Route::get('/', function () {
|
||||
redirect('/');
|
||||
});
|
||||
|
||||
/*
|
||||
|
|
||||
| We need to allow the post route to '/'
|
||||
| as admin area needs the permission
|
||||
|
|
||||
*/
|
||||
Route::post('/', function () {
|
||||
redirect('/');
|
||||
})->middleware('auth');
|
||||
|
||||
Auth::routes();
|
||||
|
||||
Route::get('/login', function () {
|
||||
@@ -155,4 +165,4 @@ Route::post('/rss', function () {
|
||||
redirect('/rss');
|
||||
})->middleware('auth', 'api');
|
||||
|
||||
Route::get('/logout', 'Auth\LoginController@logout')->name('logout');
|
||||
Route::get('/logout', 'Auth\LoginController@logout')->name('logout');
|
||||
Reference in New Issue
Block a user