function __construct($id) { // Get the Quest (Skill) based on the id if (is_numeric($id)) { $mission_row = get_mission($id); $this->build($mission_row); } }
function process_new_pano() { // Create a new pano using the post data $pano_xml = stripslashes($_POST['pano_xml']); $pano_name = $_POST['pano_name']; $pano_title = $_POST['pano_title']; $pano_description = $_POST['pano_description']; $show_desc_onload = $_POST['pano_onload'] == true ? 1 : 0; // Get the id $pano_id = create_pano($pano_xml, $pano_title, $pano_description, $show_desc_onload); $quest_id = create_quest($pano_id); $mission_exists = get_mission($pano_id); if (!isset($mission_exists)) { $id = create_mission($pano_title, $pano_description, "<mission>" . $pano_title . "</mission>", $pano_id, "NA", $quest_id, 0); fix_mission_id($id, $pano_id); } create_prereq($pano_id, 0, NULL, NULL); wp_redirect(admin_url('admin.php?page=upload_zip_setting&id=' . $pano_id)); }
function build_mission() { // Gets the domain name associated with the mission $mission = get_mission($this->mission_id); $this->mission_name = $mission->name; }