public function get_showplan() { return Showplans::get_by_id($showplanid); }
$item->set_script($script); $item->set_position($showplan->get_end_position()); $item->set_length($script->get_length()); $item->set_showplan($showplan); $item->save(); echo json_encode(array("response" => "success")); break; case "showplan-remove": $item = ShowplanItems::get_by_id($_REQUEST["id"]); $item->delete(); echo json_encode(array("response" => "success")); break; case "showplan-clear": $location->get_config("next_on_showplan")->set_val(""); $location->get_config("current_showitems_id")->set_val(""); $showplan = Showplans::get_by_id($location->get_config("default_showplan")->get_val()); $showplan->clear(); echo json_encode(array("response" => "success")); break; case "set-current": if (!is_numeric($_REQUEST["id"])) { exit(json_encode(array("response" => "error"))); } $item = ShowplanItems::get_by_id($_REQUEST["id"]); $location->get_config("next_on_showplan")->set_val($item->get_audio()->get_md5()); $location->get_config("current_showitems_id")->set_val($item->get_id()); echo json_encode(array("response" => "success", "id" => $item->get_id())); break; case "set-user-audiowall": if (!is_numeric($_REQUEST["id"])) { exit(json_encode(array("response" => "error")));