private function get_oedipus_frame_div()
 {
     $frame_div = new HTMLTags_Div();
     $frame_div->set_attribute_str('class', 'oedipus-frame');
     $frame_div->append_tag_to_content($this->get_oedipus_html_frame());
     //$frame_div->append_tag_to_content($this->get_oedipus_png_frame($frame));
     $frame_div->append_tag_to_content($this->get_oedipus_html_frame_options());
     return $frame_div;
 }
 private function get_all_dramas_div()
 {
     $div = new HTMLTags_Div();
     $div->set_attribute_str('class', 'my-dramas-list');
     $html = $this->get_all_dramas_ul();
     $div->append_tag_to_content(new HTMLTags_Heading(3, 'Dramas created by me'));
     $div->append_tag_to_content($html);
     return $div;
 }
 public function get_tag_cloud_div($current_url, $javascript = FALSE)
 {
     $tags_table = $this->get_element();
     #$database = $productgraph_row->get_database();
     #$tags_table = $database->get_table('hpi_shop_product_tags');
     #$productgraph_row = $productgraphs_table->get_row_by_id($_GET['productgraph_id']);
     #$database = $productgraph_row->get_database();
     $tag_cloud_div = new HTMLTags_Div();
     $tag_cloud_div->set_attribute_str('id', 'tag_cloud_div');
     $tag_cloud_heading = new HTMLTags_Heading(3);
     $tag_cloud_heading->append_str_to_content('All Tags');
     $tag_cloud_div->append_tag_to_content($tag_cloud_heading);
     $tag_cloud_list = new HTMLTags_OL();
     $tags = $tags_table->get_tags_with_counts('hpi_shop_product_tags.tag', 'ASC');
     foreach ($tags as $tag) {
         $tag_cloud_line = new HTMLTags_LI();
         $tag_cloud_href = clone $current_url;
         $tag_cloud_href->set_get_variable('tag_id', $tag->get_id());
         $tag_cloud_link = new HTMLTags_A();
         $tag_cloud_link->set_href($tag_cloud_href);
         $tag_cloud_link->set_attribute_str('id', $tag->get_id());
         if ($javascript) {
             $onclick = 'javascript:return tagsOnClick(this);';
             $tag_cloud_link->set_attribute_str('onclick', $onclick);
         }
         #tag_cloud_link->set_attribute_str('id', 'productgraph_page_link');
         #echo $tag->get_product_count();
         /*
          * RFI 2007-03-27
          * 
          * Is this the right way around?
          *
          * Aren't tags with a lower product count less popular?
          */
         #if ($tag->get_product_count() > 3) {
         #    $tag_cloud_link->set_attribute_str('class', 'not-very-popular');
         #}
         $popularity_css_class = $tag->get_popularity_css_class();
         #echo "\$popularity_css_class: $popularity_css_class\n\n";
         $tag_cloud_link->set_attribute_str('class', $popularity_css_class);
         $tag_cloud_link->set_attribute_str('rel', 'tag');
         $tag_product_count = $tag->get_product_count();
         if ($tag_product_count == 1) {
             $tag_product_count_span_text = $tag_product_count . ' product is tagged with ';
         } else {
             $tag_product_count_span_text = $tag_product_count . ' products are tagged with ';
         }
         $tag_cloud_link_span = new HTMLTags_Span($tag_product_count_span_text);
         $tag_cloud_link->append_tag_to_content($tag_cloud_link_span);
         $tag_cloud_link->append_str_to_content($tag->get_tag());
         $tag_cloud_line->append_tag_to_content($tag_cloud_link);
         $tag_cloud_list->append_tag_to_content($tag_cloud_line);
     }
     $tag_cloud_div->append_tag_to_content($tag_cloud_list);
     return $tag_cloud_div;
 }
 public function get_html_div()
 {
     $html_div = new HTMLTags_Div();
     $html_div->set_attribute_str('id', 'payment_option_buttons');
     $html_div->append_tag_to_content($this->get_html_ul());
     return $html_div;
 }
 public function __construct(HTMLTags_Tag $fluid_box_content, $style = 'text_box')
 {
     parent::__construct();
     $this->set_attribute_str('class', 'dialog_black');
     $this->set_attribute_str('id', $style);
     $fluid_box_hd = new HTMLTags_Div();
     $fluid_box_hd->set_attribute_str('class', 'hd');
     $fluid_box_hd_c = new HTMLTags_Div();
     $fluid_box_hd_c->set_attribute_str('class', 'c');
     $fluid_box_hd->append_tag_to_content($fluid_box_hd_c);
     $this->append_tag_to_content($fluid_box_hd);
     $fluid_box_bd = new HTMLTags_Div();
     $fluid_box_bd->set_attribute_str('class', 'bd');
     $fluid_box_c = new HTMLTags_Div();
     $fluid_box_c->set_attribute_str('class', 'c');
     $fluid_box_s = new HTMLTags_Div();
     $fluid_box_s->set_attribute_str('class', 's');
     $fluid_box_s->append_tag_to_content($fluid_box_content);
     $fluid_box_c->append_tag_to_content($fluid_box_s);
     $fluid_box_bd->append_tag_to_content($fluid_box_c);
     $this->append_tag_to_content($fluid_box_bd);
     $fluid_box_ft = new HTMLTags_Div();
     $fluid_box_ft->set_attribute_str('class', 'ft');
     $fluid_box_ft_c = new HTMLTags_Div();
     $fluid_box_ft_c->set_attribute_str('class', 'c');
     $fluid_box_ft->append_tag_to_content($fluid_box_ft_c);
     $this->append_tag_to_content($fluid_box_ft);
     return $this;
 }
 public function __construct($item_reviewed, $review, $reviewer, $date_reviewed)
 {
     parent::__construct();
     $this->set_attribute_str('class', 'hreview');
     $item_div = new HTMLTags_Div();
     $item_div->set_attribute_str('class', 'item');
     $item_div->append_str_to_content($item_reviewed);
     $this->append_tag_to_content($item_div);
     $description_div = new HTMLTags_Div();
     $description_div->set_attribute_str('class', 'description');
     $description_p = new HTMLTags_P($review);
     $description_div->append_tag_to_content($description_p);
     $this->append_tag_to_content($description_div);
     $reviewer_vcard_span = new HTMLTags_Span();
     $reviewer_vcard_span->set_attribute_str('class', 'reviewer vcard');
     $reviewer_fn_span = new HTMLTags_Span();
     $reviewer_fn_span->set_attribute_str('class', 'fn');
     $reviewer_fn_span->append_str_to_content($reviewer);
     $reviewer_vcard_span->append_tag_to_content($reviewer_fn_span);
     $random_br_tag = new HTMLTags_BR();
     $reviewer_vcard_span->append_tag_to_content($random_br_tag);
     $date_reviewed_abbr = new HTMLTags_Abbr();
     $date_reviewed_abbr->set_attribute_str('class', 'dtreviewed');
     $datetime_iso8601 = Formatting_DateTime::datetime_to_ISO8601($date_reviewed);
     $date_reviewed_abbr->set_attribute_str('title', $datetime_iso8601);
     $datetime_human_readable = Formatting_DateTime::datetime_to_human_readable($date_reviewed);
     $date_reviewed_abbr->append_str_to_content($datetime_human_readable);
     $reviewer_vcard_span->append_tag_to_content($date_reviewed_abbr);
     $this->append_tag_to_content($reviewer_vcard_span);
     return $this;
 }
 private function get_external_links_ul()
 {
     $welcome_div = new HTMLTags_Div();
     $welcome_div->set_attribute_str('class', 'external-links');
     $welcome_div->append_tag_to_content(Navigation_HTMLListsHelper::get_1d_ul('External Links'));
     return $welcome_div;
 }
 protected function get_content_div()
 {
     $div = new HTMLTags_Div();
     /*
      * Show the ShareDrama Toolbar with view 
      * drama and share links
      */
     $div->append(new Oedipus_ShareDramaToolBarUL($this->get_drama()));
     /*
      * Edit status Settings
      */
     if ($this->get_drama()->is_editable()) {
         $div->append_tag_to_content($this->get_edit_drama_status_form());
     }
     /*
      * Drama URL display
      */
     $div->append_tag_to_content($this->get_drama_url_div());
     return $div;
 }
 protected function render_top_links_ul()
 {
     $page_options_div = new HTMLTags_Div();
     $page_options_div->set_attribute_str('id', 'page-options');
     $other_pages_ul = new HTMLTags_UL();
     foreach ($this->get_top_links_as() as $a) {
         $li = new HTMLTags_LI();
         $li->append_tag_to_content($a);
         $other_pages_ul->append_tag_to_content($li);
     }
     $page_options_div->append_tag_to_content($other_pages_ul);
     echo $page_options_div->get_as_string();
 }
 protected function get_scene_content_div()
 {
     $div = new HTMLTags_Div();
     # The left and right column divs
     $left_div = new HTMLTags_Div();
     $left_div->set_attribute_str('class', 'left-column');
     /*
      * Tree View Div
      */
     $left_div->append(Oedipus_FrameTreeHelper::get_frame_tree_div($this->get_scene()));
     $div->append_tag_to_content($left_div);
     $right_div = new HTMLTags_Div();
     $right_div->set_attribute_str('class', 'right-column');
     /*
      * Scene Note Div
      */
     $right_div->append(Oedipus_DramaHelper::get_scene_notes_div($this->get_scene()));
     $div->append_tag_to_content($right_div);
     $clear_div = new HTMLTags_Div();
     $clear_div->set_attribute_str('class', 'clear-columns');
     $div->append_tag_to_content($clear_div);
     return $div;
 }
예제 #11
0
 public function get_log_in_state_div()
 {
     $log_in_state_div = new HTMLTags_Div();
     $log_in_state_div->set_attribute_str('id', 'log-in-state');
     $logged_in_as_p = new HTMLTags_P();
     $logged_in_as_p->set_attribute_str('id', 'logged_in_as');
     $alm = Admin_LoginManager::get_instance();
     $logged_in_as_p->append_str_to_content('<em>User:</em> ' . $alm->get_name());
     $logged_in_as_p->append_str_to_content('&nbsp;');
     $logged_in_as_p->append_str_to_content('<em>Type:</em> ' . $alm->get_type());
     $log_in_state_div->append($logged_in_as_p);
     $log_out_div = new HTMLTags_Div();
     $log_out_div->set_attribute_str('id', 'log_out');
     $log_out_div->append_tag_to_content($alm->get_log_out_a());
     $log_in_state_div->append($log_out_div);
     return $log_in_state_div;
 }
$project_directory_finder = HaddockProjectOrganisation_ProjectDirectoryFinder::get_instance();
$project_directory = $project_directory_finder->get_project_directory_for_this_project();
$p_d_row = new HTMLTags_TR();
$p_d_row->append_tag_to_content(new HTMLTags_TD('Project Directory'));
$p_d_d_u = $project_directory->get_disk_usage();
$p_d_d_u /= pow(2, 10);
$p_d_row->append_tag_to_content(new HTMLTags_TD(sprintf("%.3f", $p_d_d_u)));
$d_u_table->append_tag_to_content($p_d_row);
/*
 * The disk usage of the database.
 */
$d_b_row = new HTMLTags_TR();
$d_b_row->append_tag_to_content(new HTMLTags_TD('Databases'));
$mysql_user = $project_directory->get_mysql_user();
$database = $mysql_user->get_database();
$d_b_d_u = $database->get_disk_usage();
$d_b_d_u /= pow(2, 10);
$d_b_row->append_tag_to_content(new HTMLTags_TD(sprintf("%.3f", $d_b_d_u)));
$d_u_table->append_tag_to_content($d_b_row);
/*
 * The total disk usage.
 */
$total_row = new HTMLTags_TR();
$total_row->append_tag_to_content(new HTMLTags_TD('Total'));
$total_row->append_tag_to_content(new HTMLTags_TD(sprintf("%.3f", $p_d_d_u + $d_b_d_u)));
$d_u_table->append_tag_to_content($total_row);
$content_div->append_tag_to_content($d_u_table);
/*
 * Display the content div.
 */
echo $content_div->get_as_string();
    $u_t_tr->append_tag_to_content(new HTMLTags_TD($count_passed_tests));
    $count_test_functions = $u_t_p_c_f->count_test_functions();
    $total_tests += $count_test_functions;
    $u_t_tr->append_tag_to_content(new HTMLTags_TD($count_test_functions));
    $passes_all_tests = $u_t_p_c_f->passes_all_tests();
    if ($everything_passes && !$passes_all_tests) {
        $everything_passes = FALSE;
    }
    $result_td = new HTMLTags_TD($passes_all_tests ? 'Pass' : 'Fail');
    $result_td->set_attribute_str('class', $passes_all_tests ? 'pass' : 'fail');
    $u_t_tr->append_tag_to_content($result_td);
    $total_test_time = $u_t_p_c_f->get_total_test_time();
    $total_time_all_tests += $total_test_time;
    $u_t_tr->append_tag_to_content(new HTMLTags_TD(sprintf('%.5f', $total_test_time)));
    $unit_tests_html_table->append_tag_to_content($u_t_tr);
}
$summary_tr = new HTMLTags_TR();
$summary_tr->set_attribute_str('class', 'summary');
$summary_tr->append_tag_to_content(new HTMLTags_TD('Summary'));
$summary_tr->append_tag_to_content(new HTMLTags_TD($total_passes));
$summary_tr->append_tag_to_content(new HTMLTags_TD($total_tests));
$result_td = new HTMLTags_TD($everything_passes ? 'Pass' : 'Fail');
$result_td->set_attribute_str('class', $everything_passes ? 'pass' : 'fail');
$summary_tr->append_tag_to_content($result_td);
$summary_tr->append_tag_to_content(new HTMLTags_TD(sprintf('%.5f', $total_time_all_tests)));
$unit_tests_html_table->append_tag_to_content($summary_tr);
$content_div->append_tag_to_content($unit_tests_html_table);
/*
 * -----------------------------------------------------------------------------
 */
echo $content_div->get_as_string();
 * @copyright Clear Line Web Design, 2007-04-30
 */
/*
 * Define the necessary classes.
 */
require_once PROJECT_ROOT . '/project-specific/classes/' . 'ServerAdminScripts_LocalControlCentre.inc.php';
require_once PROJECT_ROOT . '/haddock/html-tags/classes/standard/' . 'HTMLTags_Div.inc.php';
require_once PROJECT_ROOT . '/haddock/html-tags/classes/standard/' . 'HTMLTags_Heading.inc.php';
require_once PROJECT_ROOT . '/haddock/html-tags/classes/standard/' . 'HTMLTags_Table.inc.php';
require_once PROJECT_ROOT . '/haddock/html-tags/classes/standard/' . 'HTMLTags_TR.inc.php';
require_once PROJECT_ROOT . '/haddock/html-tags/classes/standard/' . 'HTMLTags_TH.inc.php';
require_once PROJECT_ROOT . '/haddock/html-tags/classes/standard/' . 'HTMLTags_TD.inc.php';
$control_centre = new ServerAdminScripts_LocalControlCentre();
$content_div = new HTMLTags_Div();
$content_div->set_attribute_str('id', 'content');
$content_div->append_tag_to_content(new HTMLTags_Heading(2, 'Current Tasks'));
$tasks_table = new HTMLTags_Table();
$tasks_tr = new HTMLTags_TR();
$tasks_tr->append_tag_to_content(new HTMLTags_TH('Task Event ID'));
$tasks_tr->append_tag_to_content(new HTMLTags_TH('Host'));
$tasks_tr->append_tag_to_content(new HTMLTags_TH('System'));
$tasks_tr->append_tag_to_content(new HTMLTags_TH('Task'));
$tasks_tr->append_tag_to_content(new HTMLTags_TH('Start'));
$tasks_table->append_tag_to_content($tasks_tr);
$current_task_events = $control_centre->get_current_task_events();
foreach ($current_task_events as $current_task_event) {
    $tasks_tr = new HTMLTags_TR();
    $tasks_tr->append_tag_to_content(new HTMLTags_TD($current_task_event->get('ps_task_events.id')));
    $tasks_tr->append_tag_to_content(new HTMLTags_TD($current_task_event->get('ps_hosts.name')));
    $tasks_tr->append_tag_to_content(new HTMLTags_TD($current_task_event->get('ps_systems.name')));
    $tasks_tr->append_tag_to_content(new HTMLTags_TD($current_task_event->get('ps_tasks.name')));
//        $cancel_link = new HTMLTags_A('Cancel');
//        $cancel_link->set_href($cancel_href);
//        $cancel_link->set_attribute_str('class', 'cool_button');
//        $cancel_link->set_attribute_str('id', 'inline');
//        $answer_p->append_tag_to_content($cancel_link);
//        $content_div->append_tag_to_content($answer_p);
if (isset($_GET['edit_row']) && isset($_GET['supplier_id']) && isset($_GET['product_category_id'])) {
    /**
     * Row editing.
     */
    $editing_action_url = clone $redirect_script_url;
    $editing_action_url->set_get_variable('edit_row');
    $editing_action_url->set_get_variable('supplier_id', $_GET['supplier_id']);
    $editing_action_url->set_get_variable('product_category_id', $_GET['product_category_id']);
    $row_editing_form = $table_renderer->get_supplier_shipping_price_editing_form($_GET['supplier_id'], $_GET['product_category_id'], $editing_action_url, $cancel_href);
    $content_div->append_tag_to_content($row_editing_form);
    //        } elseif (isset($_GET['add_row'])) {
    //                /**
    //                 * Row Adding.
    //                 */
    //                $redirect_script_url = new HTMLTags_URL();
    //                $redirect_script_url->set_file('/admin/redirect-script.php');
    //                $redirect_script_url->set_get_variable('module', 'shop');
    //                $redirect_script_url->set_get_variable('page', 'supplier-shipping-prices');
    //                $redirect_script_url->set_get_variable('add_row');
    //                $row_adding_form = $table_renderer->get_supplier_shipping_price_adding_form($redirect_script_url, $cancel_href);
    //                $content_div->append_tag_to_content($row_adding_form);
} else {
    /**
     * LAST ACTION BOX DIV
     *
$product_brands_table_renderer = $product_brands_table->get_renderer();
/*
 * Cloned repeatedly throughout.
 */
$current_page_url = $gvm->get('current_page_admin_url');
$redirect_script_url = $gvm->get('redirect_script_admin_url');
$cancel_href = $current_page_url;
if (isset($_GET['delete_id'])) {
    /**
     * Confirm deleting a row.
     */
    $row = $product_brands_table->get_row_by_id($_GET['delete_id']);
    $question_p = new HTMLTags_P();
    $question_p->set_attribute_str('class', 'question');
    $question_p->append_str_to_content('Are you sure that you want to delete this product brand?');
    $content_div->append_tag_to_content($question_p);
    /**
     * Show the user the data in the row.
     */
    $row_renderer = $row->get_renderer();
    $content_div->append_tag_to_content($row_renderer->get_admin_product_brand_html_table());
    # ------------------------------------------------------------------
    $answer_p = new HTMLTags_P();
    $answer_p->set_attribute_str('class', 'answer');
    $delete_link = new HTMLTags_A('DELETE');
    $delete_href = clone $redirect_script_url;
    $delete_href->set_get_variable('delete_id', $row->get_id());
    $delete_link->set_href($delete_href);
    $delete_link->set_attribute_str('class', 'cool_button');
    $delete_link->set_attribute_str('id', 'inline');
    $answer_p->append_tag_to_content($delete_link);
 public function get_order_editing_form_div(HTMLTags_URL $redirect_script_url, HTMLTags_URL $cancel_url)
 {
     $order_editing_div = new HTMLTags_Div();
     $order_editing_div->append_tag_to_content($this->get_order_editing_form($redirect_script_url, $cancel_url));
     $order_editing_div->append_tag_to_content($this->get_order_description_div());
     $order_editing_div->append_str_to_content($this->get_products_table_as_str());
     $order_editing_div->append_tag_to_content($this->get_order_editing_description_p());
     return $order_editing_div;
 }
$product_row_renderer = $product_row->get_renderer();
/*
 * Start assembling the display.
 */
$content_div = new HTMLTags_Div();
$content_div->set_attribute_str('id', 'content');
if (isset($_GET['product_id'])) {
    #	if (isset($_GET['share_product']))
    #	{
    #		$share_product_div = $product_row_renderer->get_share_product_div_in_public();
    #		$content_div->append_tag_to_content($share_product_div);
    #	}
    #	else
    #	{
    $full_product_div = $product_row_renderer->get_full_product_div_in_public();
    $content_div->append_tag_to_content($full_product_div);
    #		$share_links_ul = $product_row_renderer->get_share_links_ul_in_public();
    #		$share_links_ul->set_attribute_str('class', 'share-links');
    #		$content_div->append_tag_to_content($share_links_ul);
    $product_links_ul = $product_row_renderer->get_product_links_ul_in_public();
    $content_div->append_tag_to_content($product_links_ul);
    // Comments Div
    $comments_div = new HTMLTags_Div();
    $comments_div->set_attribute_str('id', 'product-comments');
    $comments_anchor = new HTMLTags_A();
    $comments_anchor->set_attribute_str('name', 'comments');
    $comments_div->append_tag_to_content($comments_anchor);
    if ($product_row->count_comments() > 0) {
        $comments_div_h = new HTMLTags_Heading(3, 'Comments');
        $comments_div->append_tag_to_content($comments_div_h);
        $product_comments_div = $product_row_renderer->get_paged_public_all_comments_div($current_page_url);
    public function get_changed_confirmation_div()
    {
        $customer_region = $this->get_element();
        $confirmation_div = new HTMLTags_Div();
        $confirmation_text = <<<TXT
You have changed your region to&nbsp;
TXT;
        $confirmation_text .= $customer_region->get_name_with_the();
        $confirmation_text .= <<<TXT
.
TXT;
        $confirmation_text_p = new HTMLTags_P($confirmation_text);
        $confirmation_div->append_tag_to_content($confirmation_text_p);
        $all_products_link = new HTMLTags_A('View Products Available in&nbsp;' . $customer_region->get_name_with_the());
        //            $all_products_link->set_attribute_str('class', 'all_products');
        $all_products_location = new HTMLTags_URL();
        $all_products_location->set_file('/');
        $all_products_location->set_get_variable('section', 'plug-ins');
        $all_products_location->set_get_variable('module', 'shop');
        $all_products_location->set_get_variable('page', 'products');
        $all_products_location->set_get_variable('type', 'html');
        $all_products_location->set_get_variable('customer_region_session', $customer_region->get_id());
        $all_products_link->set_href($all_products_location);
        $confirmation_div->append_tag_to_content($all_products_link);
        return $confirmation_div;
    }
$database = $mysql_user->get_database();
// CONTENT DIV
$content_div = new HTMLTags_Div();
$content_div->set_attribute_str('id', 'content');
//$logo_span = new HTMLTags_Span();
//$logo_span->set_attribute_str('class', 'logo');
//$content_div->append_tag_to_content($logo_span);
/*
 *  HEADER
 */
$main_page_header_id = 'home';
$main_page_header_title = 'Home';
$main_page_header_h = new HTMLTags_Heading(2, $main_page_header_title);
$main_page_header_h->set_attribute_str('class', 'logo');
$main_page_header_h->set_attribute_str('id', $main_page_header_id);
$content_div->append_tag_to_content($main_page_header_h);
/*
 * Welcome DIV
 */
$welcome_div = new HTMLTags_Div();
$welcome_div->set_attribute_str('id', 'welcome');
// IF LOGGED IN MESSAGE
if ($logged_in) {
    $welcome_div->append_str_to_content($page_manager->get_inc_file_as_string('body.p.logged-in-salutation'));
}
// WELCOME MESSAGE
$welcome_div->append_str_to_content($page_manager->get_inc_file_as_string('body.p.welcome-message'));
/*
 *  CONNECTED FILMS SHOP IMAGE
 */
//$home_img = new HTMLTags_IMG();
 public function get_public_front_page_comments_div($page)
 {
     $comments_table = $this->get_element();
     $short_comments_div = new HTMLTags_Div();
     # ------------------------------------------------------------------
     /**
      * The table.
      */
     $rows_html_table = new HTMLTags_Table();
     $rows_html_table->set_attribute_str('class', 'table_short');
     $conditions['front_page'] = 'yes';
     $conditions['status'] = 'accepted';
     $rows = $comments_table->get_rows_where($conditions, ORDER_BY, DIRECTION, OFFSET, LIMIT);
     foreach ($rows as $row) {
         $row_renderer = $row->get_renderer();
         #$data_tr = $row_renderer->get_admin_database_tr();
         $data_tr = $row_renderer->get_public_comments_hreview_tr();
         $rows_html_table->append_tag_to_content($data_tr);
     }
     # ------------------------------------------------------------------
     $short_comments_div->append_tag_to_content($rows_html_table);
     return $short_comments_div;
 }
//$shopping_baskets_table = $database->get_table('hpi_shop_shopping_baskets');
//$shopping_baskets_table_renderer = $shopping_baskets_table->get_renderer();
// CONTENT DIV
//$wrapper_div = new HTMLTags_Div();
//$wrapper_div->set_attribute_str('id', 'wrapper');
$content_div = new HTMLTags_Div();
$content_div->set_attribute_str('id', 'content');
// Show The Header
$main_page_header_id = 'login';
$main_page_header_title = 'Login';
$main_page_header_class = 'login';
$main_page_header_h = new HTMLTags_Heading(2);
$main_page_header_h->set_attribute_str('class', $main_page_header_class);
$main_page_header_h->set_attribute_str('id', $main_page_header_id);
$main_page_header_h->append_tag_to_content(new HTMLTags_Span($main_page_header_title));
$content_div->append_tag_to_content($main_page_header_h);
// Already Logged in?
#if ($logged_in) {
if ($log_in_manager->is_logged_in()) {
    $already_logged_in_div = new HTMLTags_Div();
    $already_logged_in_div->set_attribute_str('id', 'already_logged_in_div');
    // Already logged in
    // You are logged in as Mr. X.
    $p_text = <<<TXT
You are logged in as&nbsp;
TXT;
    $p_text .= $log_in_manager->get_login_name();
    $already_logged_in_div->append_tag_to_content(new HTMLTags_P($p_text));
    $content_div->append_tag_to_content($already_logged_in_div);
}
// Log into existing account (if already logged in - change account)
<?php

/**
 * Links to the admin pages for the other modules.
 *
 * @copyright Clear Line Web Design, 2007-01-08
 */
/**
 * The contents of this panel.
 */
$tabs_div = new HTMLTags_Div();
$tabs_div->set_attribute_str('id', 'tabs');
$project_directory_finder = HaddockProjectOrganisation_ProjectDirectoryFinder::get_instance();
$project_directory = $project_directory_finder->get_project_directory_for_this_project();
$module_links_ul = new Admin_ModuleLinksUL($project_directory);
$tabs_div->append_tag_to_content($module_links_ul);
echo $tabs_div->get_as_string();
/*
 * -----------------------------------------------------------------------------
 */
$content_div = new HTMLTags_Div();
$content_div->set_attribute_str('id', 'content');
/*
 * Make sure that a password file exists.
 */
$project_directory_finder = HaddockProjectOrganisation_ProjectDirectoryFinder::get_instance();
$project_directory = $project_directory_finder->get_project_directory_for_this_project();
$project_specific_directory = $project_directory->get_project_specific_directory();
if (!$project_specific_directory->has_passwords_file()) {
    $demand_pw_f_p = new HTMLTags_P();
    $demand_pw_f_p->set_attribute_str('class', 'error');
    $demand_pw_f_p->append_str_to_content('This project doesn\'t have a passwords file yet!');
    $content_div->append_tag_to_content($demand_pw_f_p);
    $create_pw_f_p = new HTMLTags_P();
    $create_pw_f_p->append_str_to_content('Click ');
    $create_pw_f_a = new HTMLTags_A('here');
    $create_pw_f_url = new HTMLTags_URL('/admin/database/passwords-file-management.html');
    $create_pw_f_a->set_href($create_pw_f_url);
    $create_pw_f_p->append_tag_to_content($create_pw_f_a);
    $create_pw_f_p->append_str_to_content(' to create one.');
    $content_div->append_tag_to_content($create_pw_f_p);
} else {
    /*
     * Make sure that the root password
     * has been entered by the user and has
     * been saved in a session variable.
     */
    $mysql_user_factory = Database_MySQLUserFactory::get_instance();
예제 #25
0
#$config_file = $project_directory->get_config_file();
/*
 * Find the module config manager.
 */
$cmf = HaddockProjectOrganisation_ConfigManagerFactory::get_instance();
$config_manager = $cmf->get_config_manager('haddock', 'haddock-project-organisation');
/*
 * Create the HTML tags objects.
 */
$div_header = new HTMLTags_Div();
$div_header->set_attribute_str('id', 'header');
$h1_title = new HTMLTags_Heading(1);
#$home_link = new HTMLTags_A($config_file->get_project_title());
#$element_names = array('project', 'name');
#
#if ($config_manager->has_nested_config_variable($element_names)) {
#	$home_link = new HTMLTags_A($config_manager->get_nested_config_variable($element_names));
#
#	$home_link->set_href(new HTMLTags_URl('/'));
#
#	$h1_title->append_tag_to_content($home_link);
#
#	$div_header->append_tag_to_content($h1_title);
#
#	echo $div_header->get_as_string();
#}
$home_link = new HTMLTags_A($config_manager->get_project_name());
$home_link->set_href(new HTMLTags_URL('/'));
$h1_title->append_tag_to_content($home_link);
$div_header->append_tag_to_content($h1_title);
echo $div_header->get_as_string();
 * Create the singleton objects.
 */
$page_manager = PublicHTML_PageManager::get_instance();
$log_in_manager = Shop_LogInManager::get_instance();
$mysql_user_factory = Database_MySQLUserFactory::get_instance();
$mysql_user = $mysql_user_factory->get_for_this_project();
$database = $mysql_user->get_database();
/*
 * Create the HTML tags objects.
 */
$content_div = new HTMLTags_Div();
$content_div->set_attribute_str('id', 'content');
/*
 * The title of the page.
 */
$content_div->append_tag_to_content(new HTMLTags_Heading(2, 'Payment Confirmed'));
if (isset($_GET['crypt']) && isset($_GET['session'])) {
    $strCrypt = $_GET['crypt'];
    $session_id = $_GET['session'];
    // Now decode the Crypt field and extract the results
    $strDecoded = Shop_ProtxPayments::simpleXor(Shop_ProtxPayments::Base64Decode($strCrypt), $strEncryptionPassword);
    //                print_r($strDecoded);exit;
    $values = Shop_ProtxPayments::getToken($strDecoded);
    // Split out the useful information into variables we can use
    $strStatus = $values['Status'];
    $strStatusDetail = $values['StatusDetail'];
    $strVendorTxCode = $values["VendorTxCode"];
    $strVPSTxId = $values["VPSTxId"];
    $strTxAuthNo = $values["TxAuthNo"];
    $strAmount = $values["Amount"];
    $strAVSCV2 = $values["AVSCV2"];
    protected function render_limit_previous_next_div()
    {
        ?>
<!-- Start of a limit_previous_next div -->
<?php 
        /*
         * DIV for limits and previous and nexts.
         */
        $limit_previous_next_div = new HTMLTags_Div();
        $limit_previous_next_div->set_attribute_str('class', 'table_pages_div');
        /*
         * To allow the user to set the number of extras to show at a time.
         */
        $limit_action = $this->get_current_url_just_file();
        #$limit_form = new Database_LimitForm(
        #	$limit_action,
        #	$this->get_current_limit(),
        #	'10 20 50'
        #);
        $limit_form = new Database_LimitForm($limit_action, $this->get_current_limit(), $this->get_limits_str());
        $cbu = $this->get_current_base_url();
        foreach ($cbu->get_get_variables() as $key => $value) {
            $limit_form->add_hidden_input($key, $value);
        }
        $limit_form->add_hidden_input('order_by', $this->get_current_order_by());
        $limit_form->add_hidden_input('direction', $this->get_current_direction());
        $limit_form->add_hidden_input('offset', $this->get_current_offset());
        $limit_previous_next_div->append_tag_to_content($limit_form);
        /*
         * Go the previous or next list of extras.
         */
        $previous_next_url = clone $cbu;
        $previous_next_url->set_get_variable('order_by', $this->get_current_order_by());
        $previous_next_url->set_get_variable('direction', $this->get_current_direction());
        $row_count = $this->get_total_matching_row_count();
        if ($row_count > 0) {
            $previous_next_ul = new Database_PreviousNextUL($previous_next_url, $this->get_current_offset(), $this->get_current_limit(), $row_count);
            $limit_previous_next_div->append_tag_to_content($previous_next_ul);
        }
        echo $limit_previous_next_div->get_as_string();
        ?>
<!-- End of a limit_previous_next div -->
<?php 
    }
$address = $customer->get_address();
$paypal_form->add_hidden_input('address_override', '1');
$paypal_form->add_hidden_input('first_name', $customer->get_first_name());
$paypal_form->add_hidden_input('last_name', $customer->get_last_name());
$paypal_form->add_hidden_input('address1', $address->get_street_address());
$paypal_form->add_hidden_input('city', $address->get_locality());
$paypal_form->add_hidden_input('zip', $address->get_postal_code());
$paypal_form->add_hidden_input('country', $address->get_country_name());
$paypal_submit_input = new HTMLTags_Input();
$paypal_submit_input->set_attribute_str('type', 'submit');
$paypal_submit_input->set_attribute_str('value', 'Go to PayPal');
$paypal_form->append_tag_to_content($paypal_submit_input);
foreach ($paypal_form->get_hidden_inputs() as $hidden_input) {
    $paypal_form->append_tag_to_content($hidden_input);
}
$paypal_form_div->append_tag_to_content($paypal_form);
/*
 * Example of address override
 */
//            <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
//                    <input type="hidden" name="cmd" value="_xclick">
//                    <input type="hidden" name="business" value="*****@*****.**">
//                    <input type="hidden" name="item_name" value="Memorex 256MB Memory Stick">
//                    <input type="hidden" name="item_number" value="MEM32507725">
//                    <input type="hidden" name="amount" value="3">
//                    <input type="hidden" name="tax" value="1">
//                    <input type="hidden" name="quantity" value="1">
//                    <input type="hidden" name="no_note" value="1">
//                    <input type="hidden" name="currency_code" value="USD">
//                    <!--
//                    Override the customer’s stored PayPal address
 * Included by the content of the navigation page for the admin section
 * and on each page in the navigation div.
 * 
 * @copyright Clear Line Web Design, 2007-10-21
 * @copyright 2009-10-10, Robert Impey
 */
$nav_or_error_msg_div = new HTMLTags_Div();
$nav_or_error_msg_div->set_attribute_str('id', 'nav-or-error-msg');
$pdf = HaddockProjectOrganisation_ProjectDirectoryFinder::get_instance();
$pd = $pdf->get_project_directory_for_this_project();
$psd = $pd->get_project_specific_directory();
$alm = Admin_LoginManager::get_instance();
if ($psd->has_admin_navigation_xml_file()) {
    $anxf = $psd->get_admin_navigation_xml_file();
    $site_map_ul = new Admin_SiteMapUL($anxf, $alm->get_type());
    $nav_or_error_msg_div->append_tag_to_content($site_map_ul);
} else {
    $cmf = HaddockProjectOrganisation_ConfigManagerFactory::get_instance();
    $cm = $cmf->get_config_manager('plug-ins', 'admin');
    /*
     * Get the file not found message and turn it into paragraphs.
     * 
     * The first paragraph should set its CSS class to 'error'.
     */
    $fnfm_str = $cm->get_navigation_file_not_found_msg();
    $ps = HTMLTags_BLSeparatedPFactory::get_ps_from_str($fnfm_str);
    if (count($ps) > 0) {
        $ps[0]->set_attribute_str('class', 'error');
        foreach ($ps as $p) {
            $nav_or_error_msg_div->append_tag_to_content($p);
        }
 public function get_body_div_header()
 {
     /*
      * Create the HTML tags objects.
      */
     $div_header = new HTMLTags_Div();
     $div_header->set_attribute_str('id', 'header');
     $h1_title = new HTMLTags_Heading(1);
     $h1_title->append_str_to_content($this->get_body_div_header_heading_content());
     $div_header->append_tag_to_content($h1_title);
     return $div_header;
 }