@@ -58,17 +58,17 @@ |
||
58 | 58 | |
59 | 59 | switch($action) |
60 | 60 | { |
61 | - case 'test': |
|
62 | - if (isset($_REQUEST["regex"])) |
|
61 | + case 'test': |
|
62 | + if (isset($_REQUEST["regex"])) |
|
63 | 63 | { |
64 | - $matches = $reg->testRegex($_REQUEST['regex'], $group, $poster, $unreleased, $matchagainstbins); |
|
64 | + $matches = $reg->testRegex($_REQUEST['regex'], $group, $poster, $unreleased, $matchagainstbins); |
|
65 | 65 | |
66 | - $offset = isset($_REQUEST["offset"]) ? $_REQUEST["offset"] : 0; |
|
66 | + $offset = isset($_REQUEST["offset"]) ? $_REQUEST["offset"] : 0; |
|
67 | 67 | $page->smarty->assign('pagertotalitems',sizeof($matches)); |
68 | 68 | $page->smarty->assign('pageroffset',$offset); |
69 | 69 | $page->smarty->assign('pageritemsperpage',ITEMS_PER_PAGE); |
70 | - $page->smarty->assign('pagerquerybase', WWW_TOP."/regex-test.php?action=test&groupname={$groupname}&groupID={$groupID}®ex=".urlencode($regex)."&poster=".urlencode($poster)."&unreleased={$unreleased}&matchagainstbins={$matchagainstbins}&offset="); |
|
71 | - $pager = $page->smarty->fetch("pager.tpl"); |
|
70 | + $page->smarty->assign('pagerquerybase', WWW_TOP."/regex-test.php?action=test&groupname={$groupname}&groupID={$groupID}®ex=".urlencode($regex)."&poster=".urlencode($poster)."&unreleased={$unreleased}&matchagainstbins={$matchagainstbins}&offset="); |
|
71 | + $pager = $page->smarty->fetch("pager.tpl"); |
|
72 | 72 | $page->smarty->assign('pager', $pager); |
73 | 73 | |
74 | 74 | $matches = array_slice($matches, $offset, ITEMS_PER_PAGE); |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | $matchagainstbins = isset($_REQUEST['matchagainstbins']) ? $_REQUEST['matchagainstbins'] : ''; |
31 | 31 | $numarticles = (isset($_REQUEST['numarticles']) && !empty($_REQUEST['numarticles'])) ? $_REQUEST['numarticles'] : $numarticlesdefault; |
32 | 32 | $clearexistingbins = isset($_REQUEST['clearexistingbins']) ? true : false; |
33 | -foreach($groupList as $grp) |
|
33 | +foreach ($groupList as $grp) |
|
34 | 34 | { |
35 | 35 | $gid[$grp["id"]] = $grp["id"]; |
36 | 36 | $gnames[$grp["id"]] = $grp["name"]; |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | $page->smarty->assign('matchagainstbins', $matchagainstbins); |
57 | 57 | $page->smarty->assign('numarticles', $numarticles); |
58 | 58 | |
59 | -switch($action) |
|
59 | +switch ($action) |
|
60 | 60 | { |
61 | 61 | case 'test': |
62 | 62 | if (isset($_REQUEST["regex"])) |
@@ -64,10 +64,10 @@ discard block |
||
64 | 64 | $matches = $reg->testRegex($_REQUEST['regex'], $group, $poster, $unreleased, $matchagainstbins); |
65 | 65 | |
66 | 66 | $offset = isset($_REQUEST["offset"]) ? $_REQUEST["offset"] : 0; |
67 | - $page->smarty->assign('pagertotalitems',sizeof($matches)); |
|
68 | - $page->smarty->assign('pageroffset',$offset); |
|
69 | - $page->smarty->assign('pageritemsperpage',ITEMS_PER_PAGE); |
|
70 | - $page->smarty->assign('pagerquerybase', WWW_TOP."/regex-test.php?action=test&groupname={$groupname}&groupID={$groupID}®ex=".urlencode($regex)."&poster=".urlencode($poster)."&unreleased={$unreleased}&matchagainstbins={$matchagainstbins}&offset="); |
|
67 | + $page->smarty->assign('pagertotalitems', sizeof($matches)); |
|
68 | + $page->smarty->assign('pageroffset', $offset); |
|
69 | + $page->smarty->assign('pageritemsperpage', ITEMS_PER_PAGE); |
|
70 | + $page->smarty->assign('pagerquerybase', WWW_TOP . "/regex-test.php?action=test&groupname={$groupname}&groupID={$groupID}®ex=" . urlencode($regex) . "&poster=" . urlencode($poster) . "&unreleased={$unreleased}&matchagainstbins={$matchagainstbins}&offset="); |
|
71 | 71 | $pager = $page->smarty->fetch("pager.tpl"); |
72 | 72 | $page->smarty->assign('pager', $pager); |
73 | 73 |
@@ -30,20 +30,19 @@ discard block |
||
30 | 30 | $matchagainstbins = isset($_REQUEST['matchagainstbins']) ? $_REQUEST['matchagainstbins'] : ''; |
31 | 31 | $numarticles = (isset($_REQUEST['numarticles']) && !empty($_REQUEST['numarticles'])) ? $_REQUEST['numarticles'] : $numarticlesdefault; |
32 | 32 | $clearexistingbins = isset($_REQUEST['clearexistingbins']) ? true : false; |
33 | -foreach($groupList as $grp) |
|
34 | -{ |
|
33 | +foreach($groupList as $grp) { |
|
35 | 34 | $gid[$grp["id"]] = $grp["id"]; |
36 | 35 | $gnames[$grp["id"]] = $grp["name"]; |
37 | 36 | } |
38 | 37 | |
39 | 38 | $group = $groupname; |
40 | -if ($group == '') |
|
41 | -{ |
|
42 | - if ($groupID == 0) |
|
43 | - $group = 0; |
|
44 | - else |
|
45 | - $group = $gnames[$groupID]; |
|
46 | -} |
|
39 | +if ($group == '') { |
|
40 | + if ($groupID == 0) { |
|
41 | + $group = 0; |
|
42 | + } else { |
|
43 | + $group = $gnames[$groupID]; |
|
44 | + } |
|
45 | + } |
|
47 | 46 | |
48 | 47 | $page->smarty->assign('gid', $gid); |
49 | 48 | $page->smarty->assign('gnames', $gnames); |
@@ -56,11 +55,9 @@ discard block |
||
56 | 55 | $page->smarty->assign('matchagainstbins', $matchagainstbins); |
57 | 56 | $page->smarty->assign('numarticles', $numarticles); |
58 | 57 | |
59 | -switch($action) |
|
60 | -{ |
|
58 | +switch($action) { |
|
61 | 59 | case 'test': |
62 | - if (isset($_REQUEST["regex"])) |
|
63 | - { |
|
60 | + if (isset($_REQUEST["regex"])) { |
|
64 | 61 | $matches = $reg->testRegex($_REQUEST['regex'], $group, $poster, $unreleased, $matchagainstbins); |
65 | 62 | |
66 | 63 | $offset = isset($_REQUEST["offset"]) ? $_REQUEST["offset"] : 0; |
@@ -6,15 +6,15 @@ |
||
6 | 6 | |
7 | 7 | $page = new AdminPage(); |
8 | 8 | |
9 | -if (isset($_GET['id'])) |
|
10 | -{ |
|
9 | +if (isset($_GET['id'])) { |
|
11 | 10 | $releases = new Releases(['Settings' => $page->settings]); |
12 | 11 | $releases->deleteMultiple($_GET['id']); |
13 | 12 | } |
14 | 13 | |
15 | -if (isset($_GET['from'])) |
|
14 | +if (isset($_GET['from'])) { |
|
16 | 15 | $referrer = $_GET['from']; |
17 | -else |
|
16 | +} else { |
|
18 | 17 | $referrer = $_SERVER['HTTP_REFERER']; |
18 | +} |
|
19 | 19 | header("Location: " . $referrer); |
20 | 20 |
@@ -19,19 +19,19 @@ |
||
19 | 19 | $animecount = $AniDB->getAnimeCount($aname); |
20 | 20 | |
21 | 21 | $offset = isset($_REQUEST["offset"]) ? $_REQUEST["offset"] : 0; |
22 | -$asearch = ($aname != "") ? 'animetitle='.$aname.'&' : ''; |
|
22 | +$asearch = ($aname != "") ? 'animetitle=' . $aname . '&' : ''; |
|
23 | 23 | |
24 | -$page->smarty->assign('pagertotalitems',$animecount); |
|
25 | -$page->smarty->assign('pageroffset',$offset); |
|
26 | -$page->smarty->assign('pageritemsperpage',ITEMS_PER_PAGE); |
|
27 | -$page->smarty->assign('pagerquerybase', WWW_TOP."/anidb-list.php?".$asearch."&offset="); |
|
24 | +$page->smarty->assign('pagertotalitems', $animecount); |
|
25 | +$page->smarty->assign('pageroffset', $offset); |
|
26 | +$page->smarty->assign('pageritemsperpage', ITEMS_PER_PAGE); |
|
27 | +$page->smarty->assign('pagerquerybase', WWW_TOP . "/anidb-list.php?" . $asearch . "&offset="); |
|
28 | 28 | $pager = $page->smarty->fetch("pager.tpl"); |
29 | 29 | $page->smarty->assign('pager', $pager); |
30 | 30 | |
31 | -$page->smarty->assign('animetitle',$aname); |
|
31 | +$page->smarty->assign('animetitle', $aname); |
|
32 | 32 | |
33 | 33 | $anidblist = $AniDB->getAnimeRange($offset, ITEMS_PER_PAGE, $aname); |
34 | -$page->smarty->assign('anidblist',$anidblist); |
|
34 | +$page->smarty->assign('anidblist', $anidblist); |
|
35 | 35 | |
36 | 36 | $page->content = $page->smarty->fetch('anidb-list.tpl'); |
37 | 37 | $page->render(); |
@@ -13,8 +13,9 @@ |
||
13 | 13 | $page->title = "AniDB List"; |
14 | 14 | |
15 | 15 | $aname = ""; |
16 | -if (isset($_REQUEST['animetitle']) && !empty($_REQUEST['animetitle'])) |
|
16 | +if (isset($_REQUEST['animetitle']) && !empty($_REQUEST['animetitle'])) { |
|
17 | 17 | $aname = $_REQUEST['animetitle']; |
18 | +} |
|
18 | 19 | |
19 | 20 | $animecount = $AniDB->getAnimeCount($aname); |
20 | 21 |
@@ -11,7 +11,7 @@ discard block |
||
11 | 11 | // Set the current action. |
12 | 12 | $action = isset($_REQUEST['action']) ? $_REQUEST['action'] : 'view'; |
13 | 13 | |
14 | -switch($action) |
|
14 | +switch ($action) |
|
15 | 15 | { |
16 | 16 | case 'submit': |
17 | 17 | $error = ""; |
@@ -32,31 +32,31 @@ discard block |
||
32 | 32 | $page->smarty->assign('yesno_ids', array(1, 0)); |
33 | 33 | $page->smarty->assign('yesno_names', array('yes', 'no')); |
34 | 34 | |
35 | -$page->smarty->assign('backfill_ids', array(0,4,2,1)); |
|
35 | +$page->smarty->assign('backfill_ids', array(0, 4, 2, 1)); |
|
36 | 36 | $page->smarty->assign('backfill_names', array('Disabled', 'Safe', 'All', 'Interval')); |
37 | -$page->smarty->assign('backfill_group_ids', array(1,2,3,4,5,6)); |
|
37 | +$page->smarty->assign('backfill_group_ids', array(1, 2, 3, 4, 5, 6)); |
|
38 | 38 | $page->smarty->assign('backfill_group', array('Newest', 'Oldest', 'Alphabetical', 'Alphabetical - Reverse', 'Most Posts', 'Fewest Posts')); |
39 | 39 | $page->smarty->assign('backfill_days', array('Days per Group', 'Safe Backfill day')); |
40 | -$page->smarty->assign('backfill_days_ids', array(1,2)); |
|
41 | -$page->smarty->assign('dehash_ids', array(0,1,2,3)); |
|
40 | +$page->smarty->assign('backfill_days_ids', array(1, 2)); |
|
41 | +$page->smarty->assign('dehash_ids', array(0, 1, 2, 3)); |
|
42 | 42 | $page->smarty->assign('dehash_names', array('Disabled', 'Decrypt Hashes', 'Predb', 'All')); |
43 | -$page->smarty->assign('import_ids', array(0,1,2)); |
|
43 | +$page->smarty->assign('import_ids', array(0, 1, 2)); |
|
44 | 44 | $page->smarty->assign('import_names', array('Disabled', 'Import - Do Not Use Filenames', 'Import - Use Filenames')); |
45 | -$page->smarty->assign('releases_ids', array(0,1,2)); |
|
45 | +$page->smarty->assign('releases_ids', array(0, 1, 2)); |
|
46 | 46 | $page->smarty->assign('releases_names', array('Disabled', 'Update Releases', 'Update Releases Threaded')); |
47 | -$page->smarty->assign('post_ids', array(0,1,2,3)); |
|
47 | +$page->smarty->assign('post_ids', array(0, 1, 2, 3)); |
|
48 | 48 | $page->smarty->assign('post_names', array('Disabled', 'PostProcess Additional', 'PostProcess NFOs', 'All')); |
49 | 49 | $page->smarty->assign('fix_crap_radio_ids', array('Disabled', 'All', 'Custom')); |
50 | 50 | $page->smarty->assign('fix_crap_radio_names', array('Disabled', 'All', 'Custom')); |
51 | 51 | $page->smarty->assign('fix_crap_check_ids', array('blacklist', 'blfiles', 'executable', 'gibberish', 'hashed', 'installbin', 'passworded', 'passwordurl', 'sample', 'scr', 'short', 'size', 'huge', 'codec')); |
52 | 52 | $page->smarty->assign('fix_crap_check_names', array('blacklist', 'blfiles', 'executable', 'gibberish', 'hashed', 'installbin', 'passworded', 'passwordurl', 'sample', 'scr', 'short', 'size', 'huge', 'codec')); |
53 | -$page->smarty->assign('sequential_ids', array(0,1,2)); |
|
53 | +$page->smarty->assign('sequential_ids', array(0, 1, 2)); |
|
54 | 54 | $page->smarty->assign('sequential_names', array('Disabled', 'Basic Sequential', 'Complete Sequential')); |
55 | -$page->smarty->assign('binaries_ids', array(0,1,2)); |
|
55 | +$page->smarty->assign('binaries_ids', array(0, 1, 2)); |
|
56 | 56 | $page->smarty->assign('binaries_names', array('Disabled', 'Simple Threaded Update', 'Complete Threaded Update')); |
57 | -$page->smarty->assign('lookup_reqids_ids', array(0,1,2)); |
|
57 | +$page->smarty->assign('lookup_reqids_ids', array(0, 1, 2)); |
|
58 | 58 | $page->smarty->assign('lookup_reqids_names', array('Disabled', 'Lookup Request IDs', 'Lookup Request IDs Threaded')); |
59 | -$page->smarty->assign('predb_ids', array(0,1)); |
|
59 | +$page->smarty->assign('predb_ids', array(0, 1)); |
|
60 | 60 | $page->smarty->assign('predb_names', array('Disabled', 'Enabled')); |
61 | 61 | |
62 | 62 |
@@ -11,8 +11,7 @@ |
||
11 | 11 | // Set the current action. |
12 | 12 | $action = isset($_REQUEST['action']) ? $_REQUEST['action'] : 'view'; |
13 | 13 | |
14 | -switch($action) |
|
15 | -{ |
|
14 | +switch($action) { |
|
16 | 15 | case 'submit': |
17 | 16 | $error = ""; |
18 | 17 | $ret = $tmux->update($_POST); |
@@ -5,7 +5,7 @@ discard block |
||
5 | 5 | use nntmux\Groups; |
6 | 6 | |
7 | 7 | $admin = new AdminPage; |
8 | -$group = new Groups(['Settings' => $admin->settings]); |
|
8 | +$group = new Groups(['Settings' => $admin->settings]); |
|
9 | 9 | |
10 | 10 | // session_write_close(); allows the admin to use the site while the ajax request is being processed. |
11 | 11 | if (isset($_GET['action']) && $_GET['action'] == "2") { |
@@ -33,11 +33,11 @@ discard block |
||
33 | 33 | } else { |
34 | 34 | if (isset($_GET['group_id'])) { |
35 | 35 | $id = (int)$_GET['group_id']; |
36 | - if(isset($_GET['group_status'])) { |
|
36 | + if (isset($_GET['group_status'])) { |
|
37 | 37 | $status = isset($_GET['group_status']) ? (int)$_GET['group_status'] : 0; |
38 | 38 | print $group->updateGroupStatus($id, $status); |
39 | 39 | } |
40 | - if(isset($_GET['backfill_status'])) { |
|
40 | + if (isset($_GET['backfill_status'])) { |
|
41 | 41 | $status = isset($_GET['backfill_status']) ? (int)$_GET['backfill_status'] : 0; |
42 | 42 | print $group->updateBackfillStatus($id, $status); |
43 | 43 | } |
@@ -12,17 +12,17 @@ |
||
12 | 12 | $id = (int)$_GET['group_id']; |
13 | 13 | session_write_close(); |
14 | 14 | $group->delete($id); |
15 | - print "Group $id deleted."; |
|
15 | + print "group $id deleted."; |
|
16 | 16 | } else if (isset($_GET['action']) && $_GET['action'] == "3") { |
17 | 17 | $id = (int)$_GET['group_id']; |
18 | 18 | session_write_close(); |
19 | 19 | $group->reset($id); |
20 | - print "Group $id reset."; |
|
20 | + print "group $id reset."; |
|
21 | 21 | } else if (isset($_GET['action']) && $_GET['action'] == "4") { |
22 | 22 | $id = (int)$_GET['group_id']; |
23 | 23 | session_write_close(); |
24 | 24 | $group->purge($id); |
25 | - print "Group $id purged."; |
|
25 | + print "group $id purged."; |
|
26 | 26 | } else if (isset($_GET['action']) && $_GET['action'] == "5") { |
27 | 27 | $group->resetall(); |
28 | 28 | print "All groups reset."; |
@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | // Set the current action. |
13 | 13 | $action = isset($_REQUEST['action']) ? $_REQUEST['action'] : 'view'; |
14 | 14 | |
15 | -switch($action) { |
|
15 | +switch ($action) { |
|
16 | 16 | case 'submit': |
17 | 17 | if ($_POST["id"] == "") { |
18 | 18 | // Add a new group. |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | // Update an existing group. |
25 | 25 | $groups->update($_POST); |
26 | 26 | } |
27 | - header("Location:".WWW_TOP."/group-list.php"); |
|
27 | + header("Location:" . WWW_TOP . "/group-list.php"); |
|
28 | 28 | break; |
29 | 29 | |
30 | 30 | case 'view': |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | break; |
53 | 53 | } |
54 | 54 | |
55 | -$page->smarty->assign('yesno_ids', [1,0]); |
|
55 | +$page->smarty->assign('yesno_ids', [1, 0]); |
|
56 | 56 | $page->smarty->assign('yesno_names', ['Yes', 'No']); |
57 | 57 | |
58 | 58 | $page->content = $page->smarty->fetch('group-edit.tpl'); |
@@ -6,18 +6,14 @@ |
||
6 | 6 | |
7 | 7 | $page = new AdminPage(); |
8 | 8 | |
9 | -if (isset($_GET['id'])) |
|
10 | -{ |
|
9 | +if (isset($_GET['id'])) { |
|
11 | 10 | $users = new Users(); |
12 | 11 | $users->delete($_GET['id']); |
13 | 12 | } |
14 | 13 | |
15 | -if (isset($_GET['redir'])) |
|
16 | -{ |
|
14 | +if (isset($_GET['redir'])) { |
|
17 | 15 | header("Location: " . $_GET['redir']); |
18 | -} |
|
19 | -else |
|
20 | -{ |
|
16 | +} else { |
|
21 | 17 | $referrer = $_SERVER['HTTP_REFERER']; |
22 | 18 | header("Location: " . $referrer); |
23 | 19 | } |
@@ -3,7 +3,7 @@ |
||
3 | 3 | |
4 | 4 | use nntmux\Videos; |
5 | 5 | |
6 | -$page = new AdminPage(); |
|
6 | +$page = new AdminPage(); |
|
7 | 7 | $tv = new Videos(['Settings' => $page->settings]); |
8 | 8 | |
9 | 9 | $page->title = "TV Shows List"; |
@@ -14,8 +14,8 @@ discard block |
||
14 | 14 | |
15 | 15 | switch($action) |
16 | 16 | { |
17 | - case 'add': |
|
18 | - $page->title = "Spotnab Source Add"; |
|
17 | + case 'add': |
|
18 | + $page->title = "Spotnab Source Add"; |
|
19 | 19 | $source = []; |
20 | 20 | $source["description"] = ''; |
21 | 21 | $row = $spotnab->getDefaultValue('spotnabsources','username'); |
@@ -27,20 +27,20 @@ discard block |
||
27 | 27 | $source["publickey"] = ''; |
28 | 28 | $page->smarty->assign('source', $source); |
29 | 29 | break; |
30 | - case 'submit': |
|
31 | - if ($_POST["id"] == "") |
|
32 | - { |
|
30 | + case 'submit': |
|
31 | + if ($_POST["id"] == "") |
|
32 | + { |
|
33 | 33 | $ret = $spotnab->addSource($_POST['description'], $_POST['username'], $_POST['useremail'], $_POST['usenetgroup'], $_POST['publickey']); |
34 | 34 | header("Location:".WWW_TOP."/spotnab-list.php"); |
35 | - } |
|
36 | - else |
|
37 | - { |
|
35 | + } |
|
36 | + else |
|
37 | + { |
|
38 | 38 | $ret = $spotnab->updateSource($_POST['id'],$_POST['description'], $_POST['username'], $_POST['useremail'], $_POST['usenetgroup'], $_POST['publickey']); |
39 | 39 | header("Location:".WWW_TOP."/spotnab-list.php"); |
40 | 40 | } |
41 | - break; |
|
42 | - case 'view': |
|
43 | - default: |
|
41 | + break; |
|
42 | + case 'view': |
|
43 | + default: |
|
44 | 44 | |
45 | 45 | if (isset($_GET["id"])) |
46 | 46 | { |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | $page->smarty->assign('source', $source); |
51 | 51 | } |
52 | 52 | |
53 | - break; |
|
53 | + break; |
|
54 | 54 | } |
55 | 55 | |
56 | 56 | $page->content = $page->smarty->fetch('spotnab-edit.tpl'); |
@@ -12,17 +12,17 @@ discard block |
||
12 | 12 | // set the current action |
13 | 13 | $action = isset($_REQUEST['action']) ? $_REQUEST['action'] : 'view'; |
14 | 14 | |
15 | -switch($action) |
|
15 | +switch ($action) |
|
16 | 16 | { |
17 | 17 | case 'add': |
18 | 18 | $page->title = "Spotnab Source Add"; |
19 | 19 | $source = []; |
20 | 20 | $source["description"] = ''; |
21 | - $row = $spotnab->getDefaultValue('spotnabsources','username'); |
|
21 | + $row = $spotnab->getDefaultValue('spotnabsources', 'username'); |
|
22 | 22 | $source["username"] = $row[0]["Default"]; |
23 | - $row = $spotnab->getDefaultValue('spotnabsources','useremail'); |
|
23 | + $row = $spotnab->getDefaultValue('spotnabsources', 'useremail'); |
|
24 | 24 | $source["useremail"] = $row[0]["Default"]; |
25 | - $row = $spotnab->getDefaultValue('spotnabsources','usenetgroup'); |
|
25 | + $row = $spotnab->getDefaultValue('spotnabsources', 'usenetgroup'); |
|
26 | 26 | $source["usenetgroup"] = $row[0]["Default"]; |
27 | 27 | $source["publickey"] = ''; |
28 | 28 | $page->smarty->assign('source', $source); |
@@ -31,12 +31,12 @@ discard block |
||
31 | 31 | if ($_POST["id"] == "") |
32 | 32 | { |
33 | 33 | $ret = $spotnab->addSource($_POST['description'], $_POST['username'], $_POST['useremail'], $_POST['usenetgroup'], $_POST['publickey']); |
34 | - header("Location:".WWW_TOP."/spotnab-list.php"); |
|
34 | + header("Location:" . WWW_TOP . "/spotnab-list.php"); |
|
35 | 35 | } |
36 | 36 | else |
37 | 37 | { |
38 | - $ret = $spotnab->updateSource($_POST['id'],$_POST['description'], $_POST['username'], $_POST['useremail'], $_POST['usenetgroup'], $_POST['publickey']); |
|
39 | - header("Location:".WWW_TOP."/spotnab-list.php"); |
|
38 | + $ret = $spotnab->updateSource($_POST['id'], $_POST['description'], $_POST['username'], $_POST['useremail'], $_POST['usenetgroup'], $_POST['publickey']); |
|
39 | + header("Location:" . WWW_TOP . "/spotnab-list.php"); |
|
40 | 40 | } |
41 | 41 | break; |
42 | 42 | case 'view': |
@@ -12,8 +12,7 @@ discard block |
||
12 | 12 | // set the current action |
13 | 13 | $action = isset($_REQUEST['action']) ? $_REQUEST['action'] : 'view'; |
14 | 14 | |
15 | -switch($action) |
|
16 | -{ |
|
15 | +switch($action) { |
|
17 | 16 | case 'add': |
18 | 17 | $page->title = "Spotnab Source Add"; |
19 | 18 | $source = []; |
@@ -28,13 +27,10 @@ discard block |
||
28 | 27 | $page->smarty->assign('source', $source); |
29 | 28 | break; |
30 | 29 | case 'submit': |
31 | - if ($_POST["id"] == "") |
|
32 | - { |
|
30 | + if ($_POST["id"] == "") { |
|
33 | 31 | $ret = $spotnab->addSource($_POST['description'], $_POST['username'], $_POST['useremail'], $_POST['usenetgroup'], $_POST['publickey']); |
34 | 32 | header("Location:".WWW_TOP."/spotnab-list.php"); |
35 | - } |
|
36 | - else |
|
37 | - { |
|
33 | + } else { |
|
38 | 34 | $ret = $spotnab->updateSource($_POST['id'],$_POST['description'], $_POST['username'], $_POST['useremail'], $_POST['usenetgroup'], $_POST['publickey']); |
39 | 35 | header("Location:".WWW_TOP."/spotnab-list.php"); |
40 | 36 | } |
@@ -42,8 +38,7 @@ discard block |
||
42 | 38 | case 'view': |
43 | 39 | default: |
44 | 40 | |
45 | - if (isset($_GET["id"])) |
|
46 | - { |
|
41 | + if (isset($_GET["id"])) { |
|
47 | 42 | $page->title = "Spotnab Source Edit"; |
48 | 43 | $id = $_GET["id"]; |
49 | 44 | $source = $spotnab->getSourceByID($id); |