LoggedIn())header('location: login.php'); $Err1=""; $Err2=""; if(isset($_POST["Save"]) && $_POST["Save"]==1){ $ChanID=$App->SaveChannel($_POST); $Data=$App->GetChannel($ChanID); $AudioIDs = explode(",", $Data["AudioID"]); if(isset($_POST["SaveRestart"]) && $_POST["SaveRestart"] == "Save & Restart"){ $App->StopDownload(array("ChanID" => $ChanID)); $App->StartDownload(array("ChanID" => $ChanID)); } }else{ $ChanID = intval($_POST["ID"]); if($ChanID == 0){ $ChanID = intval($_GET["id"]); } if($ChanID > 0){ $Data=$App->GetChannel($ChanID); $AudioIDs = explode(",", $Data["AudioID"]); }else{ $Data=$_POST; $AudioIDs = $_POST["AudioIDs"]; } } ?>