public function get_rss_titles_ul(RSS_RSS $rss, $limit = 10) { // print_r($rss->get_xml());exit; $items = $rss->get_items(); $tempCounter = 0; $ul = new HTMLTags_UL(); $ul->set_attribute_str('class', 'rss'); foreach ($items as $item) { # DISPLAY ONLY 10 ITEMS. if ($tempCounter < $limit + 1) { $li = new HTMLTags_LI(); if ($tempCounter % 2 == 0) { $li->set_attribute_str('class', 'odd'); } $a = new HTMLTags_A(); $url = new HTMLTags_URL(); $url->set_file($item->get_url_filename()); $a->set_href($url); $a->append($item->get_title()); $li->append($a); $ul->append($li); } $tempCounter += 1; } return $ul; }
public function get_html_ul() { $ul = new HTMLTags_UL(); foreach ($this->get_option_button_tags() as $obt) { $li = new HTMLTags_LI(); $li->append_tag_to_content($obt); $ul->add_li($li); } return $ul; }
public function get_active_product_categories_ul_in_public() { $product_categories_table = $this->get_element(); $product_categories = $product_categories_table->get_active_product_categories(); $product_categories_ul = new HTMLTags_UL(); foreach ($product_categories as $product_category) { $product_category_renderer = $product_category->get_renderer(); $product_categories_ul->append_tag_to_content($product_category_renderer->get_product_category_li_in_public()); } return $product_categories_ul; }
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(); }
public function __construct(HTMLTags_URL $link_href, $offset, $limit, $row_count) { #echo "Start: Database_PreviousNextUL::__construct()\n"; parent::__construct(); $this->set_attribute_str('class', 'inline_list'); #$this->table = $table; $this->link_href = $link_href; if ($offset < 0) { throw new Exception('The offset for a Database_PreviousNextUL cannot be negative!'); } $this->offset = $offset; if ($limit < 1) { throw new Exception('The limit for a Database_PreviousNextUL must be at least 1!'); } $this->limit = $limit; if ($this->offset % $this->limit > 0) { throw new Exception('The offset should be a multiple of the limit in a Database_PreviousNextUL!'); } #if ($row_count < 1) { # throw new Exception( # 'The maximum number of links either side of the current page must be at least one in a Database_PreviousNextUL!' # ); #} $this->row_count = $row_count; #echo "End: Database_PreviousNextUL::__construct()\n"; }
public function __construct(HaddockProjectOrganisation_ProjectDirectory $project_directory) { parent::__construct(); $m_w_a_ss = $project_directory->get_modules_with_admin_sections(); foreach ($m_w_a_ss as $m_w_a_s) { $module_li = new HTMLTags_LI(); $module_a = new HTMLTags_A(); //$module_href = new HTMLTags_URL(); #if ( # is_a( # $m_w_a_s, # 'HaddockProjectOrganisation_ProjectSpecificDirectory' # ) #) { # $module_name = 'project-specific'; #} else { # $module_name_l_o_ws = $m_w_a_s->get_module_name_as_l_o_w(); # $module_name = $module_name_l_o_ws->get_words_as_delimited_lc_string('-'); #} //$module_name = $m_w_a_s->get_admin_section_directory_name(); // //#$module_href->set_file('/admin/' . $module_name . '/home.html'); //$module_href->set_file('/admin/hc/' . $module_name . '/home.html'); $module_href = $m_w_a_s->get_admin_section_home_page_href(); $module_a->set_href($module_href); $module_config_file = $m_w_a_s->get_module_config_file(); $module_span = new HTMLTags_Span($module_config_file->get_admin_section_title()); $module_a->append_tag_to_content($module_span); $module_li->append_tag_to_content($module_a); $this->add_li($module_li); } }
public function __construct() { parent::__construct(); $dramas = Oedipus_DramaEditorHelper::get_all_dramas(); $this->set_attribute_str('class', 'all-dramas'); foreach ($dramas as $drama) { $drama_li = $this->get_drama_li($drama); $this->append_tag_to_content($drama_li); } }
/** * This takes a space separated list of tags and returns * a UL containing the products that have been tagged that way. * * For example, products that should be displayed on the front page * might get tagged 'front_page'. */ public function get_products_for_product_tags_ul_in_public($product_tags_space_separated_str) { $products_table = $this->get_element(); $database = $products_table->get_database(); $product_tags_table = $database->get_table('hpi_shop_product_tags'); $already_displayed_products = array(); $products_ul = new HTMLTags_UL(); $products_ul->set_attribute_str('id', 'products'); $product_tags_strs = $products_table->explode_tags($product_tags_space_separated_str); #print_r($product_tags_strs); exit; foreach ($product_tags_strs as $product_tag_str) { $conditions['tag'] = $product_tag_str; $product_tags = array(); $product_tags = $product_tags_table->get_rows_where($conditions); #print_r($product_tags); exit; if (count($product_tags) > 0) { $products = $product_tags[0]->get_product_rows(); #print_r($products); exit; foreach ($products as $product) { if ($product->is_active()) { $already_displayed = FALSE; foreach ($already_displayed_products as $already_displayed_product) { if ($product->get_id() == $already_displayed_product->get_id() || $product->get_style_id() == $already_displayed_product->get_style_id()) { $already_displayed = TRUE; } } if ($already_displayed == FALSE) { $product_renderer = $product->get_renderer(); $product_description_li = $product_renderer->get_product_description_li(); $product_description_li->set_attribute_str('id', 'product'); $products_ul->append_tag_to_content($product_description_li); $already_displayed_products[] = $product; } } else { #echo "Inactive\n"; } } #exit; } } return $products_ul; }
public static function get_login_status_ul() { $user_login_manager = UserLogin_LoginManager::get_instance(); $ul = new HTMLTags_UL(); if (!$user_login_manager->is_logged_in()) { $login_li = new HTMLTags_LI(); $login_url = UserLogin_URLHelper::get_login_page_url(); $login_a = new HTMLTags_A('Login'); $login_a->set_href($login_url); $login_li->append($login_a); $ul->append($login_li); $register_li = new HTMLTags_LI(); $register_url = UserLogin_URLHelper::get_registration_page_url(); $register_a = new HTMLTags_A('Register'); $register_a->set_href($register_url); $register_li->append($register_a); $ul->append($register_li); } else { $name_li = new HTMLTags_LI(); $name_li->set_attribute_str('id', 'user-name'); $name_li->append($user_login_manager->get_name()); $ul->append($name_li); $log_out_li = new HTMLTags_LI(); $log_out_li->append($user_login_manager->get_log_out_a()); $ul->append($log_out_li); } return $ul; }
public static function get_gallery_div_for_images($images) { $div = new HTMLTags_Div(); $div->set_attribute_str('class', 'gallery_div'); $main_image_div = new HTMLTags_Div(); $main_image_div->set_attribute_str('id', 'main_image'); $div->append($main_image_div); $ul = new HTMLTags_UL(); $ul->set_attribute_str('class', 'gallery_demo_unstyled'); $first = TRUE; foreach ($images as $image) { $li = new HTMLTags_LI(); if ($first) { $li->set_attribute_str('class', 'active'); $first = FALSE; } $li->append($image->get_image_img()); $ul->append($li); } $div->append($ul); return $div; }
public function get_short_address_ul() { $address = $this->get_element(); $address_ul = new HTMLTags_UL($address_text); if ($address->has_post_office_box()) { $p_o_li = new HTMLTags_LI($address->get_post_office_box()); $address_ul->append_tag_to_content($p_o_li); } if ($address->has_extended_address()) { $extended_address_li = new HTMLTags_LI($address->get_extended_address()); $address_ul->append_tag_to_content($extended_address_li); } $address_ul->append_tag_to_content(new HTMLTags_LI($address->get_street_address())); $address_ul->append_tag_to_content(new HTMLTags_LI($address->get_locality())); $address_ul->append_tag_to_content(new HTMLTags_LI($address->get_region())); $address_ul->append_tag_to_content(new HTMLTags_LI($address->get_postal_code())); $address_ul->append_tag_to_content(new HTMLTags_LI($address->get_country_name())); return $address_ul; }
public function get_first_tier_navigation_ul() { $pages = $this->get_pages_for_first_tier_navigation(); $ul = new HTMLTags_UL(); foreach ($pages as $page) { $li = new HTMLTags_LI(); if (($this->get_current_page_class_string() == 'VideoLibrary_SearchPage' || $this->get_current_page_class_string() == 'VideoLibrary_HomePage') && $page['name'] == 'home' || $this->get_current_page_class_string() == 'VideoLibrary_TagsPage' && $page['name'] == 'tags') { $li->set_attribute_str('class', 'selected'); } $a = new HTMLTags_A(); $url = new HTMLTags_URL(); $url->set_file($page['href']); $a->set_href($url); if ($page['open-in-new-window'] == 'yes') { $a->set_attribute_str('target', '_blank'); } $span = new HTMLTags_Span($page['title']); $a->append($span); $li->append($a); $ul->append($li); } return $ul; }
public function __construct(Oedipus_Frame $frame, $edit_frame_option = TRUE) { parent::__construct(); $this->frame = $frame; $this->set_attribute_str('class', 'frame-options'); if ($edit_frame_option) { // Link to edit the frame $edit_li = $this->get_edit_li(); $this->append_tag_to_content($edit_li); } // Link to png_image the frame $png_image_li = $this->get_png_image_li(); $this->append_tag_to_content($png_image_li); }
/** * The purpose of this div is to tell the customer which * the stage of the checkout process they have reached. * * A short explanation of the stage is also given. */ public function get_checkout_status_div() { // accounts >> shipping-details >> payment-options $checkout_status = $this->get_checkout_status(); #echo $checkout_status; exit; $checkout_status_div = new HTMLTags_Div(); $checkout_status_div->set_attribute_str('id', 'checkout_status_div'); $checkout_status_ul = new HTMLTags_UL(); switch ($checkout_status) { case 'accounts': $status_step_one_li = new HTMLTags_LI(); $status_step_one_li->append_tag_to_content(new HTMLTags_Em('Log In')); $checkout_status_ul->append_tag_to_content($status_step_one_li); $status_step_two_li = new HTMLTags_LI(); $status_step_two_li->append_str_to_content('Shipping Details'); $checkout_status_ul->append_tag_to_content($status_step_two_li); $status_step_three_li = new HTMLTags_LI(); $status_step_three_li->append_str_to_content('Go to Secure Server'); $checkout_status_ul->append_tag_to_content($status_step_three_li); $p_text = <<<TXT Please complete this form and create an account with us. Alternatively, log in with your existing email address and password. TXT; break; case 'shipping-details': $status_step_one_li = new HTMLTags_LI(); $status_step_one_li->append_str_to_content('Log In'); $checkout_status_ul->append_tag_to_content($status_step_one_li); $status_step_two_li = new HTMLTags_LI(); $status_step_two_li->append_tag_to_content(new HTMLTags_Em('Shipping Details')); $checkout_status_ul->append_tag_to_content($status_step_two_li); $status_step_three_li = new HTMLTags_LI(); $status_step_three_li->append_str_to_content('Go to Secure Server'); $checkout_status_ul->append_tag_to_content($status_step_three_li); $p_text = <<<TXT Please enter or confirm your shipping address, this must be the same as your billing address. TXT; break; case 'payment-options': $status_step_one_li = new HTMLTags_LI(); $status_step_one_li->append_str_to_content('Log In'); $checkout_status_ul->append_tag_to_content($status_step_one_li); $status_step_two_li = new HTMLTags_LI(); $status_step_two_li->append_str_to_content('Shipping Details'); $checkout_status_ul->append_tag_to_content($status_step_two_li); $status_step_three_li = new HTMLTags_LI(); $status_step_three_li->append_tag_to_content(new HTMLTags_Em('Go to Secure Server')); $checkout_status_ul->append_tag_to_content($status_step_three_li); $p_text = <<<TXT Check your shipping details and shopping basket. TXT; $p2_text = <<<TXT When you're happy, click the button below to be transfered to a secure server where you can enter your credit card details to complete the payment. TXT; break; } $checkout_status_div->append_tag_to_content($checkout_status_ul); $checkout_status_div->append_tag_to_content(new HTMLTags_P($p_text)); if (isset($p2_text)) { $checkout_status_div->append_tag_to_content(new HTMLTags_P($p2_text)); } return $checkout_status_div; }
public static function get_mailing_list_links_ul() { $links = array("Mailing List" => "/?section=haddock&module=admin&page=admin-includer&type=html&admin-section=plug-ins&admin-page=mailing-list&admin-module=mailing-list", "People CSV" => "/MailingList_ListAddressesAdminPage"); $ul = new HTMLTags_UL(); $ul->set_attribute_str('class', 'inline'); foreach ($links as $key => $value) { $li = new HTMLTags_LI(); $url = new HTMLTags_URL(); $url->set_file($value); $a = new HTMLTags_A($key); $a->set_href($url); $li->append($a); $ul->append($li); } return $ul; }
public static function get_pager_div($start, $duration, $total_videos_count, $results_page_url) { $div = new HTMLTags_Div(); $div->set_attribute_str('class', 'pager'); //print_r($total_videos_count . ' || ' . $duration);exit; /* * Find how many pages, any remainder has to count as a new page */ $pages = ceil($total_videos_count / $duration); if ($pages > 1) { /* * Find current page */ if ($start > 0) { $current_page = ceil($start / $duration) + 1; } else { $current_page = 1; } //print_r($start . ' || ' . $duration . "\n"); //print_r($pages . ' || ' . $current_page);exit; $ul = new HTMLTags_UL(); $first = TRUE; /* * Previous Link */ if ($current_page > 1) { $prev_li = new HTMLTags_LI(); $prev_li->set_attribute_str('class', 'prev'); $prev_a = new HTMLTags_A('Previous'); $prev_a->set_href(VideoLibrary_URLHelper::get_results_page_url($results_page_url, ($current_page - 2) * $duration, $duration)); $prev_li->append($prev_a); $ul->append($prev_li); } /* * Middle Links: * * (if there are 7 pages) * << 1 2 3 4 5 6 7>> * * (if we're on page 5 of 8) * << 1 2 ... 4 5 6 7 8 >> * * (if we're on page 50 of 100) * << 1 2 ... 49 50 51 ... 99 100 >> * */ $ellipsis = 0; $previous_line_was_ellipsis = FALSE; for ($page = 1; $page <= $pages; $page++) { if ($pages <= 9 or $page == 1 or $page == 2 or $page == $current_page or $page == $pages - 1 or $page == $pages or $page == $current_page - 1 or $page == $current_page + 1) { $li = new HTMLTags_LI(); $li_class = ""; if ($first) { $li_class .= 'first '; $first = FALSE; } elseif ($page == $pages) { $li_class .= 'last '; } if ($page == $current_page) { $li_class .= 'selected '; $span = new HTMLTags_Span($page); $li->append($span); } else { $a = new HTMLTags_A($page); $a->set_href(VideoLibrary_URLHelper::get_results_page_url($results_page_url, ($page - 1) * $duration, $duration)); $li->append($a); } $li->set_attribute_str('class', trim($li_class)); $ul->append($li); $previous_line_was_ellipsis = FALSE; } elseif (!$previous_line_was_ellipsis && $ellipsis <= 1) { $li = new HTMLTags_LI(); $li->set_attribute_str('class', 'ellipsis'); $li->append('<span>…</span>'); $ul->append($li); $ellipsis++; $previous_line_was_ellipsis = TRUE; } } /* * Next page link */ if ($current_page < $pages) { $next_li = new HTMLTags_LI(); $next_li->set_attribute_str('class', 'next'); $next_a = new HTMLTags_A('Next'); $next_a->set_href(VideoLibrary_URLHelper::get_results_page_url($results_page_url, $current_page * $duration, $duration)); $next_li->append($next_a); $ul->append($next_li); } $div->append($ul); //print_r($div->get_as_string());exit; } return $div; }
public function __construct() { parent::__construct(); $this->set_attribute_str('class', 'frame-options'); }
if (isset($_GET['last_deleted_id'])) { $message = 'Deleted product_brand id: ' . $_GET['last_deleted_id']; } elseif (isset($_GET['last_edited_id'])) { $message = 'Edited product_brand id: ' . $_GET['last_edited_id']; } elseif (isset($_GET['last_added_id'])) { $message = 'Added product_brand id: ' . $_GET['last_added_id']; } $last_error_box_div = new HTMLTags_LastActionBoxDiv($message, $current_page_url->get_as_string(), 'message'); $content_div->append_tag_to_content($last_error_box_div); } /** * Links to other pages in the admin section. */ $page_options_div = new HTMLTags_Div(); $page_options_div->set_attribute_str('id', 'page-options'); $other_pages_ul = new HTMLTags_UL(); /** * Link to the add row form. */ $add_row_li = new HTMLTags_LI(); $add_row_a = new HTMLTags_A('Add New Product Brand'); $add_row_href = clone $current_page_url; $add_row_href->set_get_variable('add_row'); $add_row_a->set_href($add_row_href); $add_row_li->append_tag_to_content($add_row_a); $other_pages_ul->append_tag_to_content($add_row_li); /** * Link to the delete all confirmation page. */ #$delete_all_li = new HTMLTags_LI(); #
public static function get_project_specific_1d_ul($tree_name, $class_name = NULL) { if (!isset($class_name)) { $class_name = 'navigation'; } $nodes = Navigation_ListsHelper::get_project_specific_1d_tree_nodes($tree_name); $ul = new HTMLTags_UL(); $ul->set_class($class_name); foreach ($nodes as $node) { $li = new HTMLTags_LI(); $li->append(Navigation_NodesHelper::get_link_a($node)); $ul->add_li($li); } return $ul; }
$message = 'Succesfully deleted all of your transactions! (Not really - feature disabled)'; } else { $message = 'Failed to delete all of your transactions.'; } } $last_error_box_div = new HTMLTags_LastActionBoxDiv($message, $current_page_url->get_as_string(), 'message'); $content_div->append_tag_to_content($last_error_box_div); } /** * Links to other pages in the admin section. */ $page_options_div = new HTMLTags_Div(); $page_options_div->set_attribute_str('id', 'page-options'); $other_pages_ul = new HTMLTags_UL(); /** * Link to the refresh page. */ $refresh_page_li = new HTMLTags_LI(); $refresh_page_a = new HTMLTags_A('Check for new transactions'); $refresh_page_a->set_href($current_page_url); $refresh_page_li->append_tag_to_content($refresh_page_a); $other_pages_ul->append_tag_to_content($refresh_page_li); $page_options_div->append_tag_to_content($other_pages_ul); $content_div->append_tag_to_content($page_options_div); #################################################################### # # Display some of the data in the table. # ####################################################################
public function get_content() { $content = new HTMLTags_TagContent(); /* * Build the LI for each section. */ foreach ($this->anxf->get_sections() as $section) { if ($this->anxf->has_access_permission_for_section($section, $this->admin_user_level)) { $section_li = new HTMLTags_LI(); /* * Append the section title. */ $section_title = $this->anxf->get_section_title($section); $section_title_h3 = new HTMLTags_Heading(3, $section_title); $section_title_h3->set_attribute_str('id', 'section-title'); $section_li->append_tag_to_content($section_title_h3); /* * We deal with the project-specific section differently * as it doesn't have modules. */ if ($section == 'project-specific') { $pages = $this->anxf->get_pages_in_section($section); $section_ul = new HTMLTags_UL(); $section_ul->set_attribute_str('class', 'section-pages-list'); foreach ($pages as $page) { if ($this->anxf->has_access_permission_for_page_in_section($page, $section, $this->admin_user_level)) { $page_li = new HTMLTags_LI(); $page_title = $this->anxf->get_title_for_page_in_section($page, $section); $page_a = new HTMLTags_A($page_title); $page_url = $this->anxf->get_url_for_page_in_section($page, $section); $page_a->set_href($page_url); $page_li->append_tag_to_content($page_a); $section_ul->add_li($page_li); } } $section_li->append_tag_to_content($section_ul); } else { $modules = $this->anxf->get_modules_in_section($section); $section_ul = new HTMLTags_UL(); foreach ($modules as $module) { if ($this->anxf->has_access_permission_for_module_in_section($module, $section, $this->admin_user_level)) { $module_li = new HTMLTags_LI(); $module_title = $this->anxf->get_module_title_in_section($module, $section); #$module_li->append_str_to_content($module); $module_title_h4 = new HTMLTags_Heading(4, $module_title); $module_title_h4->set_attribute_str('id', 'module-title'); $module_li->append_tag_to_content($module_title_h4); $module_ul = new HTMLTags_UL(); $module_ul->set_attribute_str('class', 'module-pages-list'); $pages = $this->anxf->get_pages_in_module($module, $section); #echo 'count($pages): ' . count(\$pages) . "\n"; foreach ($pages as $page) { if ($this->anxf->has_access_permission_for_page_in_module_in_section($page, $module, $section, $this->admin_user_level)) { $page_li = new HTMLTags_LI(); $page_title = $this->anxf->get_title_for_page_in_module_in_section($page, $module, $section); $page_a = new HTMLTags_A($page_title); $page_url = $this->anxf->get_url_for_page_in_module_in_section($page, $module, $section); $page_a->set_href($page_url); $page_li->append_tag_to_content($page_a); $module_ul->add_li($page_li); } } $module_li->append_tag_to_content($module_ul); $section_ul->add_li($module_li); } } $section_li->append_tag_to_content($section_ul); } $content->append_tag($section_li); } } return $content; }
public function get_share_links_ul_in_public() { $share_links_ul = new HTMLTags_UL(); $share_product_link = new HTMLTags_A('Spread the word!'); $share_product_location = $this->get_product_page_url(); $share_product_location->set_get_variable('share_product', '1'); $share_product_link->set_href($share_product_location); $share_product_li = new HTMLTags_LI(); $share_product_li->append_tag_to_content($share_product_link); $share_links_ul->append_tag_to_content($share_product_li); return $share_links_ul; }
<?php /** * The customer regions div. * * @copyright Clear Line Web Design, 2007-07-26 */ $page_manager = PublicHTML_PageManager::get_instance(); $mysql_user_factory = Database_MySQLUserFactory::get_instance(); $mysql_user = $mysql_user_factory->get_for_this_project(); $database = $mysql_user->get_database(); $customer_regions_table = $database->get_table('hpi_shop_customer_regions'); $customer_regions = $customer_regions_table->get_all_rows('sort_order', 'ASC'); $customer_regions_div = new HTMLTags_Div(); $customer_regions_div->set_attribute_str('id', 'tabs'); $customer_regions_ul = new HTMLTags_UL(); foreach ($customer_regions as $customer_region) { $customer_region_li = new HTMLTags_LI(); $customer_region_link_span = new HTMLTags_Span($customer_region->get_name()); if ($customer_region->get_id() == $_SESSION['customer_region_id']) { $double_span = new HTMLTags_Span(); $double_span->set_attribute_str('class', 'current'); $double_span->append_tag_to_content($customer_region_link_span); $customer_region_li->append_tag_to_content($double_span); } else { //$customer_region_link_file = '/'; //$customer_region_link_location = new HTMLTags_URL(); //$customer_region_link_location->set_file($customer_region_link_file); //$customer_region_link_location->set_get_variable('page', $page_manager->get_page()); $customer_region_link_location = $page_manager->get_script_uri(); $customer_region_link_location->set_get_variable('customer_region_session', $customer_region->get_id());
private function get_next_navigation_div(Oedipus_Frame $frame, $child_frames) { $div = new HTMLTags_Div(); $div->set_attribute_str('id', 'next-frames'); $div->append(new HTMLTags_Heading(4, 'Next Frames')); $ul = new HTMLTags_UL(); foreach ($child_frames as $child) { $li = new HTMLTags_LI(); $li->append(new HTMLTags_Heading(5, $child->get_name())); $li->append(Oedipus_FrameImageHelper::get_frame_png_thumbnail_img_a($child, 150, 100)); $ul->append($li); } if ($frame->is_editable()) { $li = new HTMLTags_LI(); $li->append(self::get_add_node_a($frame)); $ul->append($li); } $div->append($ul); return $div; }
* @copyright Clear Line Web Design, 2007-05-15 */ $content_div = new HTMLTags_Div(); $content_div->set_attribute_str('id', 'content'); $project_directory_finder = HaddockProjectOrganisation_ProjectDirectoryFinder::get_instance(); $project_directory = $project_directory_finder->get_project_directory_for_this_project(); /* * The core modules. */ $core_module_directories = $project_directory->get_core_module_directories(); $content_div->append_tag_to_content(new HTMLTags_Heading(3, 'Core Modules')); $c_m_ul = new HTMLTags_UL(); foreach ($core_module_directories as $c_m_d) { $c_m_d_li = new HTMLTags_LI(); $c_m_d_li->append_str_to_content($c_m_d->basename()); $c_m_ul->add_li($c_m_d_li); } $content_div->append_tag_to_content($c_m_ul); /* * The plug-in modules. */ $plug_in_module_directories = $project_directory->get_plug_in_module_directories(); $content_div->append_tag_to_content(new HTMLTags_Heading(3, 'Plug-in Modules')); $pi_m_ul = new HTMLTags_UL(); foreach ($plug_in_module_directories as $pi_m_d) { $pi_m_d_li = new HTMLTags_LI(); $pi_m_d_li->append_str_to_content($pi_m_d->basename()); $pi_m_ul->add_li($pi_m_d_li); } $content_div->append_tag_to_content($pi_m_ul); echo $content_div->get_as_string();
# $row_adding_action->set_file('/admin/redirect-script.php'); # # $row_adding_action->set_get_variable('module', 'database'); # $row_adding_action->set_get_variable('page', 'table'); # $row_adding_action->set_get_variable('table', $table->get_name()); $row_adding_action = clone $redirect_script_url; $row_adding_action->set_get_variable('add_row'); $row_adding_form = $table_renderer->get_row_adding_form($row_adding_action, $cancel_href); $content_div->append_tag_to_content($row_adding_form); } else { //echo "Listing some of the rows of the table.\n"; #exit; /* * Links to other pages in the admin section. */ $other_pages_ul = new HTMLTags_UL(); /** * Link back to the table list. */ $tables_list_li = new HTMLTags_LI(); $tables_list_a = new HTMLTags_A('Tables List'); $tables_list_href = new HTMLTags_URL(); $tables_list_href->set_file('/admin/hc/database/tables-list.html'); $tables_list_a->set_href($tables_list_href); $tables_list_li->append_tag_to_content($tables_list_a); $other_pages_ul->append_tag_to_content($tables_list_li); /** * Link to the add row form. */ $add_row_li = new HTMLTags_LI(); $add_row_a = new HTMLTags_A('Add Row');
/** * Renders a UL that contains links to other pages * to do with this one. * e.g. the 'delete_everything' version of this page. */ protected function render_other_pages_ul() { $page_options_div = new HTMLTags_Div(); $page_options_div->set_attribute_str('id', 'page-options'); $other_pages_ul = new HTMLTags_UL(); /** * Link to the add row form. */ $add_row_li = new HTMLTags_LI(); $add_row_a = new HTMLTags_A($this->get_add_something_link_text()); $add_row_href = $this->get_add_something_page_url(); $add_row_a->set_href($add_row_href); $add_row_li->append_tag_to_content($add_row_a); $other_pages_ul->append_tag_to_content($add_row_li); /** * Link to the delete all confirmation page. */ $delete_all_li = new HTMLTags_LI(); $delete_all_a = new HTMLTags_A($this->get_delete_everything_link_text()); $delete_all_href = $this->get_current_base_url(); $delete_all_href->set_get_variable('content', 'delete_everything'); $delete_all_a->set_href($delete_all_href); $delete_all_li->append_tag_to_content($delete_all_a); $other_pages_ul->append_tag_to_content($delete_all_li); $page_options_div->append_tag_to_content($other_pages_ul); echo $page_options_div->get_as_string(); }
* Form altered by RFI 2007-07-13 */ $form_action = new HTMLTags_URL(); $form_action->set_file('/'); $form_action->set_get_variable('section', 'plug-ins'); $form_action->set_get_variable('module', 'mailing-list'); $form_action->set_get_variable('page', 'mailing-list'); $form_action->set_get_variable('type', 'redirect-script'); $form_action->set_get_variable('add_person'); $form_action->set_get_variable('return_to', urlencode('/?section=project-specific&page=mailing-list')); #echo 'action="' . $form_action->get_as_string() . "\"\n"; $form_email_adding->set_action($form_action); $form_email_adding->set_attribute_str('method', 'POST'); // method="POST" //> $ul_inputs = new HTMLTags_UL(); $li_name = new HTMLTags_LI(); // <label for="name">Name:</label> $label_name = new HTMLTags_Label('Name: '); $label_name->set_attribute_str('for', 'name'); $li_name->append_tag_to_content($label_name); // <input class="name" name="name" type="text" id="name" value=" $input_name = new HTMLTags_Input(); $input_name->set_attribute_str('id', 'name'); $input_name->set_attribute_str('name', 'name'); $input_name->set_attribute_str('type', 'text'); // if ($_SESSION['name']) { // echo $_SESSION['name']; // } $input_name->set_attribute_str('value', isset($_SESSION['name']) ? $_SESSION['name'] : ''); //" size="17" />
public static function get_tags_empty_links_list($tags) { $ul = new HTMLTags_UL(); $ul->set_attribute_str('class', 'tags-empty-links-list'); foreach ($tags as $tag) { $li = new HTMLTags_LI(); $li->set_attribute_str('tag', $tag['tag']); $li->append($tag['tag']); $ul->append($li); } return $ul; }
<?php /** * A div that is displayed if the customer is already logged into a shop. * * @copyright Clear Line Web Design, 2007-08-21 */ $checkout_process_div = new HTMLTags_Div(); $checkout_process_div->set_attribute_str('id', 'checkout_process_div'); $checkout_process_ul = new HTMLTags_UL(); $process_step_one_li = new HTMLTags_LI(); $process_step_one_li->append_tag_to_content(new HTMLTags_Em('Step 1')); $checkout_process_ul->append_tag_to_content($process_step_one_li); $process_step_two_li = new HTMLTags_LI(); $process_step_two_li->append_str_to_content('Step 2'); $checkout_process_ul->append_tag_to_content($process_step_two_li); $process_step_three_li = new HTMLTags_LI(); $process_step_three_li->append_str_to_content('Step 3'); $checkout_process_ul->append_tag_to_content($process_step_three_li); $checkout_process_div->append_tag_to_content($checkout_process_ul); // Already logged in // You are logged in as Mr. X. $p_text = <<<TXT Step 1 on the Checkout process TXT; $checkout_process_div->append_tag_to_content(new HTMLTags_P($p_text)); echo $checkout_process_div->get_as_string();