// $caption = new HTMLTags_Caption( // 'Products' // ); // $rows_html_table->append_tag_to_content($caption); if (isset($_GET['product_category_id'])) { if ($_GET['product_category_id'] == 'all') { $caption = new HTMLTags_Caption('All Products'); $caption->append_str_to_content(' (' . $products_table->count_products() . ')'); } else { $product_categories_table = $database->get_table('hpi_shop_product_categories'); $product_category = $product_categories_table->get_row_by_id($_GET['product_category_id']); $caption = new HTMLTags_Caption('Products in Category ' . $product_category->get_name()); $caption->append_str_to_content(' (' . $product_category->count_products() . ')'); } } else { $caption = new HTMLTags_Caption('All Products'); $caption->append_str_to_content(' (' . $products_table->count_products() . ')'); } $rows_html_table->append_tag_to_content($caption); /** * The Heading Row. */ $sort_href = clone $current_page_url; $sort_href->set_get_variable('limit', LIMIT); $heading_row = new Database_SortableHeadingTR($sort_href, DIRECTION); #$fields = $products_table->get_fields(); # #foreach ($fields as $field) { # $heading_row->append_sortable_field_name($field->get_name()); #} $field_names = explode(' ', 'added name');
*/ $rows_html_table = new HTMLTags_Table(); $rows_html_table->set_attribute_str('class', 'table_pages'); /** * The caption. */ if (isset($_GET['status'])) { if ($_GET['status'] == 'all') { $caption = new HTMLTags_Caption('All Orders'); $caption->append_str_to_content(' (' . $orders_table->count_orders() . ')'); } else { $caption = new HTMLTags_Caption('Orders ' . ucfirst($_GET['status'])); $caption->append_str_to_content(' (' . $orders_table->count_orders_for_status($_GET['status']) . ')'); } } else { $caption = new HTMLTags_Caption('Orders Paid'); $caption->append_str_to_content(' (' . $orders_table->count_orders_for_status('paid') . ')'); } $rows_html_table->append_tag_to_content($caption); /** * The Heading Row. */ $sort_href = new HTMLTags_URL(); $sort_href->set_file('/haddock/public-html/public-html/index.php'); $sort_href->set_get_variable('section', 'haddock'); $sort_href->set_get_variable('module', 'admin'); $sort_href->set_get_variable('page', 'admin-includer'); $sort_href->set_get_variable('type', 'html'); $sort_href->set_get_variable('admin-section', 'plug-ins'); $sort_href->set_get_variable('admin-module', 'shop'); $sort_href->set_get_variable('admin-page', 'orders');
/** * The caption. */ if (isset($_GET['status'])) { if ($_GET['status'] == 'moderation') { $caption = new HTMLTags_Caption('Comments in Moderation'); } else { $caption = new HTMLTags_Caption(ucfirst($_GET['status']) . ' Comments'); } if ($_GET['status'] == 'all') { $caption->append_str_to_content(' (' . $comments_table->count_comments() . ')'); } else { $caption->append_str_to_content(' (' . $comments_table->count_comments_for_status($_GET['status']) . ')'); } } else { $caption = new HTMLTags_Caption('New Comments'); $caption->append_str_to_content(' (' . $comments_table->count_comments_for_status('new') . ')'); } $rows_html_table->append_tag_to_content($caption); /** * The Heading Row. */ $sort_href = clone $current_page_url; $sort_href->set_get_variable('limit', LIMIT); $heading_row = new Database_SortableHeadingTR($sort_href, DIRECTION); $field_names = explode(' ', 'added modified status front_page'); foreach ($field_names as $field_name) { $heading_row->append_sortable_field_name($field_name); } $product_header = new HTMLTags_TH('Product'); $heading_row->append_tag_to_content($product_header);