/** * The constructor sets the instance variables to usable defaults. */ private function __construct() { $this->redirect_script_url = PublicHTML_URLHelper::get_oo_page_url('OrderedTables_AdminCRUDShiftRedirectScript'); $this->ordering_field_name = 'sort_order'; $this->key_fields = array('id'); $this->table_name = NULL; }
public function get_url() { if (!isset($this->url)) { if ($this->has_page_class()) { $this->url = PublicHTML_URLHelper::get_oo_page_url($this->get_page_class()); } else { $this->url = new HTMLTags_URL(); $this->url->set_file('/'); $this->url->set_get_variable('section', 'plug-ins'); $this->url->set_get_variable('module', 'admin'); $this->url->set_get_variable('page', 'admin-includer'); $this->url->set_get_variable('type', 'html'); if ($this->has_special_page() && $this->get_special_page() == 'db-table-xml') { $this->url->set_get_variable('admin-section', 'plug-ins'); $this->url->set_get_variable('admin-module', 'database'); $this->url->set_get_variable('admin-page', 'table-xml'); $this->url->set_get_variable('db-section', $this->get_section()); $this->url->set_get_variable('db-xml-file', $this->get_page()); if ($this->has_module()) { $this->url->set_get_variable('db-module', $this->get_module()); } } else { $this->url->set_get_variable('admin-section', $this->get_section()); $this->url->set_get_variable('admin-page', $this->get_page()); if ($this->has_module()) { $this->url->set_get_variable('admin-module', $this->get_module()); } } } } return $this->url; }
/** * Makes a local URL. * * Assumes that you want an OO page. * * DEPREACATED!! */ public static function make_local_url($page_class, $get_variables = NULL) { #$url = new HTMLTags_URL(); #if (isset($get_variables)) { # $url->set_file('/'); # # $url->set_get_variable('oo-page'); # $url->set_get_variable('page-class', $page_class); # # foreach ($get_variables as $k => $v) { # $url->set_get_variable($k, $v); # } #} else { # $url->set_file("/$page_class"); #} # #$url->set_file('/'); # #$url->set_get_variable('oo-page'); #$url->set_get_variable('page-class', $page_class); # #if (isset($get_variables)) { # foreach ($get_variables as $k => $v) { # $url->set_get_variable($k, urlencode($v)); # } #} # #return $url; return PublicHTML_URLHelper::get_oo_page_url($page_class, $get_variables); }
public static function set_session_and_get_exception_page_url(Exception $e) { if (DEBUG) { echo DEBUG_DELIM_OPEN; echo '__METHOD__: ' . __METHOD__ . "\n"; echo '__LINE__: ' . __LINE__ . "\n"; echo DEBUG_DELIM_CLOSE; } $_SESSION['exception'] = $e; $cmf = HaddockProjectOrganisation_ConfigManagerFactory::get_instance(); if (DEBUG) { echo DEBUG_DELIM_OPEN; echo '__METHOD__: ' . __METHOD__ . "\n"; echo '__LINE__: ' . __LINE__ . "\n"; echo DEBUG_DELIM_CLOSE; } $phcm = $cmf->get_config_manager('plug-ins', 'public-html'); if (DEBUG) { echo DEBUG_DELIM_OPEN; echo '__METHOD__: ' . __METHOD__ . "\n"; echo '__LINE__: ' . __LINE__ . "\n"; echo DEBUG_DELIM_CLOSE; } $exception_page_class_name = $phcm->get_exception_page_class_name(); $exception_page_url = PublicHTML_URLHelper::get_oo_page_url($exception_page_class_name); if (DEBUG) { echo DEBUG_DELIM_OPEN; echo '__METHOD__: ' . __METHOD__ . "\n"; echo '__LINE__: ' . __LINE__ . "\n"; echo DEBUG_DELIM_CLOSE; } return $exception_page_url; }
public static function set_session_and_get_exception_page_url(Exception $e) { $_SESSION['exception'] = $e; $cmf = HaddockProjectOrganisation_ConfigManagerFactory::get_instance(); $phcm = $cmf->get_config_manager('haddock', 'public-html'); $exception_page_class_name = $phcm->get_exception_page_class_name(); $exception_page_url = PublicHTML_URLHelper::get_oo_page_url($exception_page_class_name); return $exception_page_url; }
protected function get_return_to_url() { $url = PublicHTML_URLHelper::get_oo_page_url('Oedipus_DramaPage', $this->get_variables); /* *Set the Return Message in the Get */ $url->set_get_variable('return_message', $this->get_return_message()); return $url; }
protected function get_admin_header_navigation_link_div() { $div = new HTMLTags_Div(); $div->set_attribute_str('id', 'admin_header_navigation_link'); $url = PublicHTML_URLHelper::get_oo_page_url('Admin_StartPage'); $a = new HTMLTags_A('Start Page'); $a->set_href($url); $div->append($a); return $div; }
private function get_delete_option_url() { $get_variables = array("frame_id" => $this->frame->get_id(), "option_id" => $this->option->get_id(), "delete_option" => 1); /* *If we're on the edit_frame section of Drama Page, * pass this on to set the return to correctly */ if (isset($_GET['edit_frame'])) { $get_variables['return_to_get'] = 'edit_frame'; } return PublicHTML_URLHelper::get_oo_page_url('Oedipus_EditFrameRedirectScript', $get_variables); }
public static function get_view_page_url(Oedipus_Drama $drama = NULL) { if (isset($drama)) { # $url = new HTMLTags_URL(); # $url->set_file('/dramas/'. $drama->get_unique_name()); #// $url->set_get_variable('oo-page', 1); #// $url->set_get_variable('page-class', 'Oedipus_DramaEditorPage'); # #// $url->set_get_variable('drama_unique_name', ); return PublicHTML_URLHelper::get_oo_page_url('Oedipus_DramaPage', array('drama_id' => $drama->get_id())); return $url; } else { return PublicHTML_URLHelper::get_oo_page_url('Oedipus_DramaPage'); } }
private function get_share_drama_url() { $get_variables = array("drama_id" => $this->drama->get_id()); return PublicHTML_URLHelper::get_oo_page_url('Oedipus_ShareDramaPage', $get_variables); }
public static function get_log_in_redirect_script_url() { return PublicHTML_URLHelper::get_oo_page_url('Oedipus_LoginValidator', array('attempt_submit' => 1)); }
private function get_edit_drama_status_form_cancel_url() { return PublicHTML_URLHelper::get_oo_page_url('Oedipus_ShareDramaPage'); }
public static function get_admin_disassociate_product_photo_redirect_script_url($product_id, $photograph_id) { return PublicHTML_URLHelper::get_oo_page_url('Shop_AdminDisassociateProductPhotoRedirectScript', array('product_id' => $product_id, 'photograph_id' => $photograph_id)); }
public static function get_reorder_table_admin_page($xml_config_file_name) { return PublicHTML_URLHelper::get_oo_page_url('OrderedTables_ReorderTableAdminPage', array('xml_config_file' => $xml_config_file_name)); }
public static function get_admin_page_edit_language_post_url() { return PublicHTML_URLHelper::get_oo_page_url('SiteTexts_EditSiteTextRedirectScript'); }
private function get_scene_note_editor_form_action_url() { return PublicHTML_URLHelper::get_oo_page_url('Oedipus_EditSceneNoteRedirectScript'); }
public function get_drama_url_for_frame(Oedipus_Frame $frame) { return PublicHTML_URLHelper::get_oo_page_url('Oedipus_DramaPage', array('drama_id' => $frame->get_drama_id())); }
private function get_new_frame_form_action_url() { return PublicHTML_URLHelper::get_oo_page_url('Oedipus_EditSceneRedirectScript'); }
private function get_scene_editor_form_cancel_url() { $get_variables = array("scene_id" => $this->scene->get_id()); return PublicHTML_URLHelper::get_oo_page_url('Oedipus_DramaPage', $get_variables); }
public static function get_account_page_url() { return PublicHTML_URLHelper::get_oo_page_url(self::get_config_manager()->get_account_page_class_name()); }
private function get_add_node_a(Oedipus_Frame $frame) { $a = new HTMLTags_A('Add a Frame...'); $a->set_attribute_str('class', 'add-frame'); $a->set_attribute_str('title', 'Add a Frame...'); $url = PublicHTML_URLHelper::get_oo_page_url('Oedipus_EditSceneRedirectScript', array('add_frame' => 1, 'frame_name' => 'New Frame', 'scene_id' => $frame->get_scene_id(), 'parent_frame_id' => $frame->get_id())); $a->set_href($url); return $a; }
public static function get_users_page_url($user_id) { return PublicHTML_URLHelper::get_oo_page_url('Oedipus_UserPage', array('user_id' => $user_id)); // $url = new HTMLTags_URL(); // // $url->set_file("/users/$user_id"); return $url; }
public static function get_add_scene_url($act_id) { $get_variables = array("add_scene" => '1', "act_id" => $act_id); return PublicHTML_URLHelper::get_oo_page_url('Oedipus_EditActRedirectScript', $get_variables); }
private function get_redirect_script_return_url() { return PublicHTML_URLHelper::get_oo_page_url('Oedipus_DramaPage'); }
private function get_new_drama_form_cancel_url() { return PublicHTML_URLHelper::get_oo_page_url('Oedipus_DramaPage'); }
private function get_frame_editor_form_cancel_url() { $get_variables = array("frame_id" => $this->frame->get_id()); return PublicHTML_URLHelper::get_oo_page_url('Oedipus_EditFramePage', $get_variables); }
public static function get_edit_section_admin_page_url($page_name, $section_name) { return PublicHTML_URLHelper::get_oo_page_url('DBPages_ManagePagesAdminPage', array('content' => 'edit_something', 'page' => $page_name, 'section' => $section_name)); }
public function get_stated_intention_tile(Oedipus_StatedIntention $stated_intention, Oedipus_Actor $actor) { // <a href="#" class="si-tile" id="actor1-option1">0</a> if ($this->edit_mode) { $html_tile_link = PublicHTML_URLHelper::get_oo_page_url('Oedipus_TableEditorRedirectScript', array('table_id' => $this->table->get_id(), 'edit_stated_intention' => 1, 'stated_intention_id' => $stated_intention->get_id(), 'stated_intention_tile' => $stated_intention->get_tile(), 'stated_intention_doubt' => $stated_intention->get_doubt())); } else { $html_tile_link = new HTMLTags_URL(); $html_tile_link->set_file('#'); } $html_tile = new HTMLTags_A($stated_intention->get_tile() . $stated_intention->get_doubt()); $html_tile->set_href($html_tile_link); $html_tile->set_attribute_str('class', 'si-tile'); $html_tile_id = $actor->get_color() . $stated_intention->get_tile() . $this->add_q_to_doubt($stated_intention->get_doubt()); $html_tile->set_attribute_str('id', $html_tile_id); return $html_tile; }
protected function get_base_redirect_script_url() { return PublicHTML_URLHelper::get_oo_page_url('OrderedTables_ReorderTableAdminRedirectScript', array('xml_config_file' => $this->reorder_table_admin_page_config_file->basename())); }
public function get_stated_intention_tile(Oedipus_StatedIntention $stated_intention, Oedipus_Character $character, $explanation) { // <a href="#" class="si-tile" id="character1-option1">0</a> if ($this->frame->is_editable()) { $html_tile_link = PublicHTML_URLHelper::get_oo_page_url('Oedipus_EditFrameRedirectScript', array('frame_id' => $this->frame->get_id(), 'edit_stated_intention' => 1, 'stated_intention_id' => $stated_intention->get_id(), 'stated_intention_tile' => $stated_intention->get_tile(), 'stated_intention_doubt' => $stated_intention->get_doubt())); if (isset($_GET['edit_frame'])) { $html_tile_link->set_get_variable('return_to_get', 'edit_frame'); } } else { $html_tile_link = new HTMLTags_URL(); $html_tile_link->set_file('#'); } $html_tile = new HTMLTags_A($stated_intention->get_tile() . $stated_intention->get_doubt()); $html_tile->set_href($html_tile_link); /** * An explanation for the position is set here in the * title attribute, for the javascript to use as a * cool -tip */ $html_tile->set_attribute_str('title', Oedipus_LanguageHelper::get_possessive($character->get_name()) . " Stated Intention" . '|' . $explanation); $html_tile->set_attribute_str('class', 'si-tile'); $html_tile_id = $character->get_color() . $stated_intention->get_tile() . $this->add_q_to_doubt($stated_intention->get_doubt()); $html_tile->set_attribute_str('id', $html_tile_id); return $html_tile; }