private function get_frame_view_url() { if (isset($_GET['frame_id'])) { return Oedipus_DramaHelper::get_drama_page_url_for_frame_id($_GET['frame_id']); } return Oedipus_DramaHelper::get_frame_view_drama_page_url_for_scene_id($this->scene_id); }
public static function get_frame_png_thumbnail_img_a(Oedipus_Frame $frame, $max_width = 250, $max_height = 185) { $url = Oedipus_DramaHelper::get_drama_page_url_for_frame_id($frame->get_id()); $a = new HTMLTags_A(); $a->set_href($url); $a->set_attribute_str('title', 'View this Frame'); $img = self::get_frame_png_thumbnail_img($frame, $max_width, $max_height); $a->append_tag_to_content($img); return $a; }
protected function get_return_to_url() { /* *Edit Frame page? */ if (isset($_POST['return_to_get']) || isset($_GET['return_to_get'])) { if ($_POST['return_to_get'] == 'edit_frame' || $_GET['return_to_get'] == 'edit_frame') { $url = Oedipus_DramaHelper::get_edit_frame_drama_page_url_for_frame_id($this->frame_id); } } else { /* *Normal Frame Page */ $url = Oedipus_DramaHelper::get_drama_page_url_for_frame_id($this->frame_id); } /* *Set the Return Message in the Get */ $url->set_get_variable('return_message', $this->get_return_message()); return $url; }
protected function do_actions() { // print_r($_GET);exit; // print_r($_POST);exit; $return_to_url = $this->get_redirect_script_return_url(); if (isset($_POST['add_frame']) && isset($_POST['scene_id']) && isset($_POST['parent_frame_id'])) { /* * Verify Data received? * CURRENTLY UNSAFE */ $scene_id = $_POST['scene_id']; if (isset($_POST['frame_name'])) { $frame_name = $_POST['frame_name']; } else { $frame_name = NULL; } $parent_frame_id = $_POST['parent_frame_id']; $this->add_frame($scene_id, $frame_name, $parent_frame_id); /* * Set the Return to URL, * assuming we're on the DramaPage */ $return_to_url = Oedipus_DramaHelper::get_drama_page_url_for_scene_id($scene_id); } elseif (isset($_POST['scene_name']) && isset($_POST['scene_id'])) { Oedipus_DramaHelper::set_scene_name($_POST['scene_id'], $_POST['scene_name']); //$this->set_return_message('saved scene name'); // $return_to_url = Oedipus_DramaHelper::get_drama_page_url_for_scene_id($_POST['scene_id']); } elseif (isset($_GET['add_frame']) && isset($_GET['scene_id']) && isset($_GET['parent_frame_id'])) { /* * Verify Data received? * CURRENTLY UNSAFE */ $scene_id = $_GET['scene_id']; if (isset($_GET['frame_name'])) { $frame_name = $_GET['frame_name']; } else { $frame_name = NULL; } $parent_frame_id = $_GET['parent_frame_id']; $frame = $this->add_frame($scene_id, $frame_name, $parent_frame_id); /* * Set the Return to URL, * assuming we're on the DramaPage */ $return_to_url = Oedipus_DramaHelper::get_drama_page_url_for_frame_id($frame->get_id()); } elseif (isset($_GET['rebuild_tree']) && isset($_GET['scene_id'])) { /* * Verify Data received? * CURRENTLY UNSAFE */ $scene_id = $_GET['scene_id']; Oedipus_FrameTreeHelper::rebuild_tree_for_scene_id($scene_id); /* * Set the Return to URL, * assuming we're on the DramaPage */ $return_to_url = Oedipus_DramaHelper::get_drama_page_url_for_scene_id($scene_id); } $this->set_return_to_url($return_to_url); }