コード例 #1
0
 private function get_drama_tr(Oedipus_Drama $drama)
 {
     $tr = new HTMLTags_TR();
     //$tr->set_attribute_str('id', 'drama');
     $link = new HTMLTags_A($drama->get_name());
     $link->set_href($this->get_drama_page_url_for_drama($drama));
     $name_td = $this->get_td_with_id($link->get_as_string(), 'name');
     $tr->append($name_td);
     $added_td = $this->get_td_with_id($drama->get_human_readable_added(), 'added');
     $tr->append($added_td);
     return $tr;
 }
コード例 #2
0
 public function get_data_html_table_td_with_image(Database_Field $field)
 {
     $row = $this->get_element();
     if ($field->get_name() == 'image' && $row->has_full_size_image()) {
         #print_r($field);
         $field_renderer = $field->get_renderer();
         $img_tag = $this->get_img_in_public_images();
         #print_r($img_tag);
         $full_a = new HTMLTags_A();
         $full_size_image = $row->get_full_size_image();
         #print_r($full_size_image);
         $full_size_image_renderer = $full_size_image->get_renderer();
         $full_size_image_url = $full_size_image_renderer->get_html_url_in_public_images();
         $full_a->set_href($full_size_image_url);
         $full_a->append_tag_to_content($img_tag);
         $data_html_table_td = $field_renderer->get_data_html_table_td($full_a->get_as_string());
         return $data_html_table_td;
     } else {
         return parent::get_data_html_table_td($field);
     }
 }
コード例 #3
0
 /**
  * Makes the link to the page specified by the action.
  */
 protected function make_content_for_action_td_for_item($name, $get_var_content, $identifiers)
 {
     $c = Formatting_ListOfWordsHelper::capitalise_delimited_string($name, '_');
     $a = new HTMLTags_A($c);
     $url = $this->get_action_url_for_content($get_var_content, $identifiers);
     $a->set_href($url);
     return $a->get_as_string();
 }
コード例 #4
0
<?php

/**
 * Takes the user to a page where they can request for their password to be
 * reset and a new password be sent to their email address.
 *
 * @copyright Clear Line Web Design, 2007-08-21
 */
$log_in_manager = Shop_LogInManager::get_instance();
$password_reset_confirmation_url = $log_in_manager->get_password_reset_confirmation_url();
$password_reset_confirmation_a = new HTMLTags_A('Change your password');
$password_reset_confirmation_a->set_href($password_reset_confirmation_url);
echo $password_reset_confirmation_a->get_as_string();
コード例 #5
0
 /**
  * The content of the heading of the page.
  *
  * You could override this to change the heading in the masthead of
  * a page.
  */
 protected function get_body_div_header_heading_content()
 {
     $home_link = new HTMLTags_A($this->get_body_div_header_link_content());
     $home_link->set_id('home_link');
     $home_link->set_href(new HTMLTags_URL('/'));
     return $home_link->get_as_string();
 }
コード例 #6
0
 /**
  * Makes the content of the action TD.
  *
  * Refactor common elements with
  * 	Database_CRUDAdminPage::make_content_for_action_td_for_item
  *
  */
 public function make_content_for_action_td($action_name, $identifiers)
 {
     #print_r($identifiers);
     #exit;
     switch ($action_name) {
         case 'shift_back':
             $non_link_key = $this->get_key_of_current_max();
             break;
         case 'shift_forward':
             $non_link_key = $this->get_key_of_current_min();
             break;
         default:
             throw new Exception('Unknown action name!');
     }
     #print_r($non_link_key);
     $non_link = TRUE;
     foreach ($non_link_key as $k => $v) {
         if ($identifiers[$k] != $v) {
             $non_link = FALSE;
             break;
         }
     }
     if ($non_link) {
         return '&nbsp;';
     } else {
         $c = Formatting_ListOfWords::capitalise_delimited_string($action_name, '_');
         $a = new HTMLTags_A($c);
         $url = $this->get_action_redirect_script_url($action_name, $identifiers);
         $a->set_href($url);
         return $a->get_as_string();
     }
 }
コード例 #7
0
 protected function get_body_div_header_heading_content()
 {
     $home_link = new HTMLTags_A($this->get_body_div_header_link_content());
     $home_link->set_href(Oedipus_DramaHelper::get_drama_page_url_for_drama_id($this->get_drama()->get_id()));
     return $home_link->get_as_string();
 }
コード例 #8
0
<?php

/**
 * The div with the link to the log-out redirect script.
 *
 * @copyright Clear Line Web Design, 2007-09-24
 */
$log_in_manager = Shop_LogInManager::get_instance();
$log_out_url = $log_in_manager->get_log_out_url();
$log_out_a = new HTMLTags_A('Log Out');
$log_out_a->set_href($log_out_url);
echo $log_out_a->get_as_string();
コード例 #9
0
$muf = Database_MySQLUserFactory::get_instance();
$mu = $muf->get_for_this_project();
$database = $mu->get_database();
$products_table = $database->get_table('hpi_trackit_stock_management_products');
$product_row = $products_table->get_row_by_id($_GET['product_id']);
$photographs_table = $database->get_table('hpi_shop_photographs');
?>
<div id="content">
<h2>Please set the image for Product <?php 
echo $product_row->get('product_id');
?>
</h2>
<?php 
$photographs = $photographs_table->get_all_rows();
echo "<ul>\n";
foreach ($photographs as $photograph) {
    $prr = $photograph->get_renderer();
    echo "<li>\n";
    $url = Admin_AdminIncluderURLFactory::get_url('plug-ins', 'trackit-stock-management', 'set-product-image', 'redirect-script');
    $url->set_get_variable('photograph_id', $photograph->get_id());
    $url->set_get_variable('product_id', $product_row->get_id());
    $link = new HTMLTags_A();
    $link->set_href($url);
    $link->append_tag_to_content($prr->get_thumbnail_img());
    echo $link->get_as_string();
    echo "</li>\n";
}
echo "</ul>\n";
?>
</div>
    public function render_content_to_delete_everything()
    {
        VideoLibrary_DatabaseHelper::delete_all_external_videos_in_frame_grabbing_queue();
        $back_a = new HTMLTags_A('Back to the Queue');
        $back_href = $this->get_current_base_url();
        $back_a->set_href($back_href);
        $back_a_str = $back_a->get_as_string();
        echo <<<HTML
<h2>Remove all External Videos from the Frame Grabbing Queue</h2>
<p>
        All videos have been removed and the queue has been emptied.
</p>
<ul>
        <li>
        {$back_a_str}
        </li>
</ul>
HTML;
    }
コード例 #11
0
<?php

/**
 * Takes the user to a page where they can request for their password to be
 * reset and a new password be sent to their email address.
 *
 * @copyright Clear Line Web Design, 2007-08-21
 */
$gvm = Caching_GlobalVarManager::get_instance();
$page_manager = PublicHTML_PageManager::get_instance();
$current_page_url = $page_manager->get_script_uri();
$customer_region_url = clone $current_page_url;
$customer_region_url->set_get_variable('page', 'customer-details');
$customer_region_a = new HTMLTags_A('Change your address');
$customer_region_a->set_href($customer_region_url);
echo $customer_region_a->get_as_string();