@@ -12,12 +12,12 @@ 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 'submit': |
| 18 | 18 | $ret = $category->update($_POST["id"], $_POST["status"], $_POST["description"], |
| 19 | 19 | $_POST["disablepreview"], $_POST["minsizetoformrelease"], $_POST["maxsizetoformrelease"]); |
| 20 | - header("Location:".WWW_TOP."/category-list.php"); |
|
| 20 | + header("Location:" . WWW_TOP . "/category-list.php"); |
|
| 21 | 21 | break; |
| 22 | 22 | case 'view': |
| 23 | 23 | default: |
@@ -35,8 +35,8 @@ discard block |
||
| 35 | 35 | break; |
| 36 | 36 | } |
| 37 | 37 | |
| 38 | -$page->smarty->assign('status_ids', array(Category::STATUS_ACTIVE,Category::STATUS_INACTIVE)); |
|
| 39 | -$page->smarty->assign('status_names', array( 'Yes', 'No')); |
|
| 38 | +$page->smarty->assign('status_ids', array(Category::STATUS_ACTIVE, Category::STATUS_INACTIVE)); |
|
| 39 | +$page->smarty->assign('status_names', array('Yes', 'No')); |
|
| 40 | 40 | |
| 41 | 41 | $page->content = $page->smarty->fetch('category-edit.tpl'); |
| 42 | 42 | $page->render(); |
@@ -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-inactive.php?".$groupsearch."offset="); |
|
| 25 | +$groupsearch = ($gname != "") ? 'groupname=' . $gname . '&' : ''; |
|
| 26 | +$page->smarty->assign('pagerquerybase', WWW_TOP . "/group-list-inactive.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, 0); |
| 31 | 31 | |
| 32 | -$page->smarty->assign('grouplist',$grouplist); |
|
| 32 | +$page->smarty->assign('grouplist', $grouplist); |
|
| 33 | 33 | |
| 34 | 34 | $page->title = "Group List"; |
| 35 | 35 | |
@@ -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/music/".$id.'.jpg'; |
|
| 29 | + $coverLoc = WWW_DIR . "covers/music/" . $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 | } |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | |
| 45 | 45 | $music->update($id, $_POST["title"], $_POST['asin'], $_POST['url'], $_POST["salesrank"], $_POST["artist"], $_POST["publisher"], $_POST["releasedate"], $_POST["year"], $_POST["tracks"], $_POST["cover"], $_POST["genre"]); |
| 46 | 46 | |
| 47 | - header("Location:".WWW_TOP."/music-list.php"); |
|
| 47 | + header("Location:" . WWW_TOP . "/music-list.php"); |
|
| 48 | 48 | die(); |
| 49 | 49 | break; |
| 50 | 50 | case 'view': |
@@ -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 | case 'submit': |
| 16 | 16 | if ($_POST["group_regex"] == "") { |
| 17 | 17 | $page->smarty->assign('error', "Group regex must not be empty!"); |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | $regexes->updateRegex($_POST); |
| 39 | 39 | } |
| 40 | 40 | |
| 41 | - header("Location:".WWW_TOP."/release_naming_regexes-list.php"); |
|
| 41 | + header("Location:" . WWW_TOP . "/release_naming_regexes-list.php"); |
|
| 42 | 42 | break; |
| 43 | 43 | |
| 44 | 44 | case 'view': |
@@ -55,8 +55,8 @@ discard block |
||
| 55 | 55 | break; |
| 56 | 56 | } |
| 57 | 57 | |
| 58 | -$page->smarty->assign('status_ids', array(Category::STATUS_ACTIVE,Category::STATUS_INACTIVE)); |
|
| 59 | -$page->smarty->assign('status_names', array( 'Yes', 'No')); |
|
| 58 | +$page->smarty->assign('status_ids', array(Category::STATUS_ACTIVE, Category::STATUS_INACTIVE)); |
|
| 59 | +$page->smarty->assign('status_names', array('Yes', 'No')); |
|
| 60 | 60 | |
| 61 | 61 | $page->content = $page->smarty->fetch('release_naming_regexes-edit.tpl'); |
| 62 | 62 | $page->render(); |
@@ -6,11 +6,11 @@ |
||
| 6 | 6 | |
| 7 | 7 | // login check |
| 8 | 8 | $admin = new AdminPage; |
| 9 | -$regex = new ReleaseRegex(); |
|
| 9 | +$regex = new ReleaseRegex(); |
|
| 10 | 10 | |
| 11 | 11 | if (isset($_GET['action']) && $_GET['action'] == "2") |
| 12 | 12 | { |
| 13 | - $id = (int)$_GET['regex_id']; |
|
| 13 | + $id = (int)$_GET['regex_id']; |
|
| 14 | 14 | $regex->delete($id); |
| 15 | 15 | print "Regex $id deleted."; |
| 16 | 16 | } |
@@ -14,7 +14,7 @@ |
||
| 14 | 14 | $reggrouplist = $reg->getGroupsForSelect(); |
| 15 | 15 | $page->smarty->assign('reggrouplist', $reggrouplist); |
| 16 | 16 | |
| 17 | -$group=".*"; |
|
| 17 | +$group = ".*"; |
|
| 18 | 18 | if (isset($_REQUEST["group"])) |
| 19 | 19 | $group = $_REQUEST["group"]; |
| 20 | 20 | |
@@ -11,8 +11,7 @@ |
||
| 11 | 11 | } |
| 12 | 12 | |
| 13 | 13 | switch ((isset($_REQUEST['action']) ? $_REQUEST['action'] : 'view')) { |
| 14 | - case 'add': |
|
| 15 | - $page->title = "User Roles Add"; |
|
| 14 | + case 'add' : $page->title = "User Roles Add"; |
|
| 16 | 15 | $role = [ |
| 17 | 16 | 'id' => '', |
| 18 | 17 | 'name' => '', |
@@ -12,8 +12,8 @@ discard block |
||
| 12 | 12 | // set the current action |
| 13 | 13 | $toggle = isset($_REQUEST['toggle']) ? $_REQUEST['toggle'] : 'view'; |
| 14 | 14 | |
| 15 | -if ( (isset($_GET["toggle"])) && (isset($_GET["id"])) ) { |
|
| 16 | - $spotnab->toggleSource($_GET["id"],$_GET["toggle"]); |
|
| 15 | +if ((isset($_GET["toggle"])) && (isset($_GET["id"]))) { |
|
| 16 | + $spotnab->toggleSource($_GET["id"], $_GET["toggle"]); |
|
| 17 | 17 | } |
| 18 | 18 | |
| 19 | 19 | $page->title = "Spotnab Sources List"; |
@@ -21,6 +21,6 @@ discard block |
||
| 21 | 21 | //get the list of Sources |
| 22 | 22 | $spotnab = $spotnab->getSources(); |
| 23 | 23 | |
| 24 | -$page->smarty->assign('spotnab',$spotnab); |
|
| 24 | +$page->smarty->assign('spotnab', $spotnab); |
|
| 25 | 25 | $page->content = $page->smarty->fetch('spotnab-list.tpl'); |
| 26 | 26 | $page->render(); |
@@ -17,7 +17,7 @@ |
||
| 17 | 17 | |
| 18 | 18 | $regex = false; |
| 19 | 19 | |
| 20 | -switch($type) { |
|
| 20 | +switch ($type) { |
|
| 21 | 21 | case 'info': |
| 22 | 22 | $regex = '/\[INFO\]/'; |
| 23 | 23 | break; |