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;
 }
 /**
  * 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);
 }
Ejemplo n.º 3
0
 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;
 }
 /**
  * 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;
 }
 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;
 }
 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;
 }
Ejemplo n.º 7
0
 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');
     }
 }
 public static function get_email_adding_redirect_script()
 {
     #$form_action = new HTMLTags_URL();
     #
     #$form_action->set_file('/');
     $form_action = PublicHTML_URLHelper::get_base_url();
     #$form_action->set_get_variable('section', 'plug-ins');
     #$form_action->set_get_variable('module', 'mailing-list');
     #$form_action->set_get_variable('page', 'sign-up');
     #$form_action->set_get_variable('type', 'redirect-script');
     #$form_action->set_get_variable('add_person');
     $form_action->set_get_variable('oo-page');
     $form_action->set_get_variable('pcro-factory', 'MailingList_PCROFactory');
     $form_action->set_get_variable('page', 'sign-up');
     $form_action->set_get_variable('type', 'redirect-script');
     $form_action->set_get_variable('add_person');
     return $form_action;
 }
 public static function get_db_page_url($page_name)
 {
     #$ph_cm = Configuration_ConfigManagerHelper
     #	::get_config_manager(
     #		'haddock',
     #		'public-html'
     #	);
     #
     #if ($ph_cm->server_has_mod_rewrite()) {
     if (PublicHTML_ServerCapabilitiesHelper::has_mod_rewrite()) {
         #echo "has mod_rewrite!\n";
         $url = new HTMLTags_URL();
         $url->set_file("/db-pages/{$page_name}.html");
     } else {
         $url = PublicHTML_URLHelper::get_base_url();
         $url->set_get_variable('oo-page');
         $url->set_get_variable('pcro-factory', 'DBPages_PCROFactory');
         $url->set_get_variable('page', $page_name);
     }
     return $url;
 }
 private function get_scene_note_editor_form_action_url()
 {
     return PublicHTML_URLHelper::get_oo_page_url('Oedipus_EditSceneNoteRedirectScript');
 }
 private function get_new_drama_form_cancel_url()
 {
     return PublicHTML_URLHelper::get_oo_page_url('Oedipus_DramaPage');
 }
 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_share_drama_url()
 {
     $get_variables = array("drama_id" => $this->drama->get_id());
     return PublicHTML_URLHelper::get_oo_page_url('Oedipus_ShareDramaPage', $get_variables);
 }
 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);
 }
 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;
 }
 private function get_redirect_script_return_url()
 {
     return PublicHTML_URLHelper::get_oo_page_url('Oedipus_DramaPage');
 }
 private function get_new_frame_form_action_url()
 {
     return PublicHTML_URLHelper::get_oo_page_url('Oedipus_EditSceneRedirectScript');
 }
 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 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;
 }
 public static function get_admin_page_edit_language_post_url()
 {
     return PublicHTML_URLHelper::get_oo_page_url('SiteTexts_EditSiteTextRedirectScript');
 }
 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 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 function get_login_script_url()
 {
     #$login_url = new HTMLTags_URL();
     /*
      * Require HTTPS?
      */
     #$login_url->set_file('/');
     #
     #$login_url->set_get_variable('section', 'haddock');
     #$login_url->set_get_variable('module', 'admin');
     #$login_url->set_get_variable('page', 'login');
     #$login_url->set_get_variable('type', 'redirect-script');
     #
     #$login_url->set_get_variable('login');
     #return $login_url;
     $login_url = PublicHTML_URLHelper::get_pm_page_url('login', 'redirect-script', 'haddock', 'admin');
     $login_url->set_get_variable('login');
     return $login_url;
 }
 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 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_edit_drama_status_form_cancel_url()
 {
     return PublicHTML_URLHelper::get_oo_page_url('Oedipus_ShareDramaPage');
 }
 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 static function get_account_page_url()
 {
     return PublicHTML_URLHelper::get_oo_page_url(self::get_config_manager()->get_account_page_class_name());
 }