@@ -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 |
@@ -10,8 +10,7 @@ |
||
10 | 10 | // set the current action |
11 | 11 | $action = isset($_REQUEST['action']) ? $_REQUEST['action'] : 'view'; |
12 | 12 | |
13 | -switch($action) |
|
14 | -{ |
|
13 | +switch($action) { |
|
15 | 14 | case 'submit': |
16 | 15 | if (isset($_POST['groupfilter']) && !empty($_POST['groupfilter'])) { |
17 | 16 | $groups = new Groups; |
@@ -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); |
@@ -25,8 +25,8 @@ discard block |
||
25 | 25 | |
26 | 26 | switch($action) |
27 | 27 | { |
28 | - case 'submit': |
|
29 | - $coverLoc = WWW_DIR."covers/book/".$id.'.jpg'; |
|
28 | + case 'submit': |
|
29 | + $coverLoc = WWW_DIR."covers/book/".$id.'.jpg'; |
|
30 | 30 | |
31 | 31 | if($_FILES['cover']['size'] > 0) |
32 | 32 | { |
@@ -43,10 +43,10 @@ discard block |
||
43 | 43 | $book->update($id, $_POST["title"], $_POST['asin'], $_POST['url'], $_POST["author"], $_POST["publisher"], $_POST["publishdate"], $_POST["cover"]); |
44 | 44 | |
45 | 45 | header("Location:".WWW_TOP."/book-list.php"); |
46 | - die(); |
|
47 | - break; |
|
48 | - case 'view': |
|
49 | - default: |
|
46 | + die(); |
|
47 | + break; |
|
48 | + case 'view': |
|
49 | + default: |
|
50 | 50 | $page->title = "Book Edit"; |
51 | 51 | $page->smarty->assign('book', $b); |
52 | 52 | break; |
@@ -23,16 +23,16 @@ discard block |
||
23 | 23 | $page->show404(); |
24 | 24 | } |
25 | 25 | |
26 | - switch($action) |
|
26 | + switch ($action) |
|
27 | 27 | { |
28 | 28 | case 'submit': |
29 | - $coverLoc = WWW_DIR."covers/book/".$id.'.jpg'; |
|
29 | + $coverLoc = WWW_DIR . "covers/book/" . $id . '.jpg'; |
|
30 | 30 | |
31 | - if($_FILES['cover']['size'] > 0) |
|
31 | + if ($_FILES['cover']['size'] > 0) |
|
32 | 32 | { |
33 | 33 | $tmpName = $_FILES['cover']['tmp_name']; |
34 | 34 | $file_info = getimagesize($tmpName); |
35 | - if(!empty($file_info)) |
|
35 | + if (!empty($file_info)) |
|
36 | 36 | { |
37 | 37 | move_uploaded_file($_FILES['cover']['tmp_name'], $coverLoc); |
38 | 38 | } |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | $_POST['publishdate'] = (empty($_POST['publishdate']) || !strtotime($_POST['publishdate'])) ? $con['publishdate'] : date("Y-m-d H:i:s", strtotime($_POST['publishdate'])); |
43 | 43 | $book->update($id, $_POST["title"], $_POST['asin'], $_POST['url'], $_POST["author"], $_POST["publisher"], $_POST["publishdate"], $_POST["cover"]); |
44 | 44 | |
45 | - header("Location:".WWW_TOP."/book-list.php"); |
|
45 | + header("Location:" . WWW_TOP . "/book-list.php"); |
|
46 | 46 | die(); |
47 | 47 | break; |
48 | 48 | case 'view': |
@@ -14,8 +14,7 @@ discard block |
||
14 | 14 | // set the current action |
15 | 15 | $action = isset($_REQUEST['action']) ? $_REQUEST['action'] : 'view'; |
16 | 16 | |
17 | -if (isset($_REQUEST["id"])) |
|
18 | -{ |
|
17 | +if (isset($_REQUEST["id"])) { |
|
19 | 18 | $id = $_REQUEST["id"]; |
20 | 19 | $mus = $music->getMusicInfo($id); |
21 | 20 | |
@@ -23,17 +22,14 @@ discard block |
||
23 | 22 | $page->show404(); |
24 | 23 | } |
25 | 24 | |
26 | - switch($action) |
|
27 | - { |
|
25 | + switch($action) { |
|
28 | 26 | case 'submit': |
29 | 27 | $coverLoc = WWW_DIR."covers/music/".$id.'.jpg'; |
30 | 28 | |
31 | - if($_FILES['cover']['size'] > 0) |
|
32 | - { |
|
29 | + if($_FILES['cover']['size'] > 0) { |
|
33 | 30 | $tmpName = $_FILES['cover']['tmp_name']; |
34 | 31 | $file_info = getimagesize($tmpName); |
35 | - if(!empty($file_info)) |
|
36 | - { |
|
32 | + if(!empty($file_info)) { |
|
37 | 33 | move_uploaded_file($_FILES['cover']['tmp_name'], $coverLoc); |
38 | 34 | } |
39 | 35 | } |
@@ -18,74 +18,56 @@ |
||
18 | 18 | } else { |
19 | 19 | print 'Deactivated site ' . $_GET['site_ID']; |
20 | 20 | } |
21 | -} |
|
22 | - |
|
23 | -else if (isset($_GET['enabled_status'])) { |
|
21 | +} else if (isset($_GET['enabled_status'])) { |
|
24 | 22 | $db->queryExec(sprintf('UPDATE sharing SET enabled = %d', $_GET['enabled_status'])); |
25 | 23 | if ($_GET['enabled_status'] == 1) { |
26 | 24 | print 'Enabled sharing!'; |
27 | 25 | } else { |
28 | 26 | print 'Disabled sharing!'; |
29 | 27 | } |
30 | -} |
|
31 | - |
|
32 | -else if (isset($_GET['posting_status'])) { |
|
28 | +} else if (isset($_GET['posting_status'])) { |
|
33 | 29 | $db->queryExec(sprintf('UPDATE sharing SET posting = %d', $_GET['posting_status'])); |
34 | 30 | if ($_GET['posting_status'] == 1) { |
35 | 31 | print 'Enabled posting!'; |
36 | 32 | } else { |
37 | 33 | print 'Disabled posting!'; |
38 | 34 | } |
39 | -} |
|
40 | - |
|
41 | -else if (isset($_GET['fetching_status'])) { |
|
35 | +} else if (isset($_GET['fetching_status'])) { |
|
42 | 36 | $db->queryExec(sprintf('UPDATE sharing SET fetching = %d', $_GET['fetching_status'])); |
43 | 37 | if ($_GET['fetching_status'] == 1) { |
44 | 38 | print 'Enabled fetching!'; |
45 | 39 | } else { |
46 | 40 | print 'Disabled fetching!'; |
47 | 41 | } |
48 | -} |
|
49 | - |
|
50 | -else if (isset($_GET['auto_status'])) { |
|
42 | +} else if (isset($_GET['auto_status'])) { |
|
51 | 43 | $db->queryExec(sprintf('UPDATE sharing SET auto_enable = %d', $_GET['auto_status'])); |
52 | 44 | if ($_GET['auto_status'] == 1) { |
53 | 45 | print 'Enabled automatic site enabling!'; |
54 | 46 | } else { |
55 | 47 | print 'Disabled automatic site enabling!'; |
56 | 48 | } |
57 | -} |
|
58 | - |
|
59 | -else if (isset($_GET['hide_status'])) { |
|
49 | +} else if (isset($_GET['hide_status'])) { |
|
60 | 50 | $db->queryExec(sprintf('UPDATE sharing SET hide_users = %d', $_GET['hide_status'])); |
61 | 51 | if ($_GET['hide_status'] == 1) { |
62 | 52 | print 'Enabled hiding of user names!'; |
63 | 53 | } else { |
64 | 54 | print 'Disabled hiding of user names!'; |
65 | 55 | } |
66 | -} |
|
67 | - |
|
68 | -else if (isset($_GET['start_position'])) { |
|
56 | +} else if (isset($_GET['start_position'])) { |
|
69 | 57 | $db->queryExec(sprintf('UPDATE sharing SET start_position = %d', $_GET['start_position'])); |
70 | 58 | if ($_GET['start_position'] == 1) { |
71 | 59 | print 'Enabled fetching from start of group!'; |
72 | 60 | } else { |
73 | 61 | print 'Disabled fetching from start of group!'; |
74 | 62 | } |
75 | -} |
|
76 | - |
|
77 | -else if (isset($_GET['toggle_all'])) { |
|
63 | +} else if (isset($_GET['toggle_all'])) { |
|
78 | 64 | $db->queryExec(sprintf('UPDATE sharing_sites SET enabled = %d', $_GET['toggle_all'])); |
79 | -} |
|
80 | - |
|
81 | -else if (isset($_GET['reset_settings'])) { |
|
65 | +} else if (isset($_GET['reset_settings'])) { |
|
82 | 66 | $guid = $db->queryOneRow('SELECT site_guid FROM sharing'); |
83 | 67 | $guid = ($guid === false ? '' : $guid['site_guid']); |
84 | 68 | (new Sharing(['Settings' => $admin->settings]))->initSettings($guid); |
85 | 69 | print 'Re-initiated sharing settings!'; |
86 | -} |
|
87 | - |
|
88 | -else if (isset($_GET['purge_site'])) { |
|
70 | +} else if (isset($_GET['purge_site'])) { |
|
89 | 71 | $guid = $db->queryOneRow(sprintf('SELECT site_guid FROM sharing_sites WHERE id = %d', $_GET['purge_site'])); |
90 | 72 | if ($guid === false) { |
91 | 73 | print 'Error purging site ' . $_GET['purge_site'] . '!'; |
@@ -17,19 +17,19 @@ |
||
17 | 17 | $offset = isset($_REQUEST["offset"]) ? $_REQUEST["offset"] : 0; |
18 | 18 | $groupname = (isset($_REQUEST['groupname']) && !empty($_REQUEST['groupname'])) ? $_REQUEST['groupname'] : ''; |
19 | 19 | |
20 | -$page->smarty->assign('groupname',$groupname); |
|
21 | -$page->smarty->assign('pagertotalitems',$groupcount); |
|
22 | -$page->smarty->assign('pageroffset',$offset); |
|
23 | -$page->smarty->assign('pageritemsperpage',ITEMS_PER_PAGE); |
|
20 | +$page->smarty->assign('groupname', $groupname); |
|
21 | +$page->smarty->assign('pagertotalitems', $groupcount); |
|
22 | +$page->smarty->assign('pageroffset', $offset); |
|
23 | +$page->smarty->assign('pageritemsperpage', ITEMS_PER_PAGE); |
|
24 | 24 | |
25 | -$groupsearch = ($gname != "") ? 'groupname='.$gname.'&' : ''; |
|
26 | -$page->smarty->assign('pagerquerybase', WWW_TOP."/group-list-active.php?".$groupsearch."offset="); |
|
25 | +$groupsearch = ($gname != "") ? 'groupname=' . $gname . '&' : ''; |
|
26 | +$page->smarty->assign('pagerquerybase', WWW_TOP . "/group-list-active.php?" . $groupsearch . "offset="); |
|
27 | 27 | $pager = $page->smarty->fetch("pager.tpl"); |
28 | 28 | $page->smarty->assign('pager', $pager); |
29 | 29 | |
30 | 30 | $grouplist = $groups->getRange($offset, ITEMS_PER_PAGE, $gname, 1); |
31 | 31 | |
32 | -$page->smarty->assign('grouplist',$grouplist); |
|
32 | +$page->smarty->assign('grouplist', $grouplist); |
|
33 | 33 | |
34 | 34 | $page->title = "Group List"; |
35 | 35 |