public function content()
 {
     $div = new HTMLTags_Div();
     $div->append($this->get_error_message_div());
     $div->append($this->get_registration_div());
     echo $div->get_as_string();
 }
 public function content()
 {
     $div = new HTMLTags_Div();
     $div->append($this->get_log_out_div());
     $div->append($this->get_error_message_div());
     $div->append($this->get_account_div());
     echo $div->get_as_string();
 }
 public function render_body_div_navigation()
 {
     $navigation_div = new HTMLTags_Div();
     $navigation_div->set_attribute_str('id', 'navigation');
     ob_start();
     require PROJECT_ROOT . '/plug-ins/admin/www-includes/html/' . 'body.div.nav-or-error-msg.inc.php';
     $str = ob_get_clean();
     $navigation_div->append_str_to_content($str);
     echo $navigation_div->get_as_string();
 }
 public function content()
 {
     $home_page_div = new HTMLTags_Div();
     $heading = new HTMLTags_Heading(2, 'Drama Theory for Making Decisions');
     $home_page_div->append_tag_to_content($heading);
     $home_page_div->append_tag_to_content($this->get_home_page_welcome_text_div());
     $home_page_div->append_tag_to_content($this->get_external_links_ul());
     $home_page_div->append_tag_to_content($this->get_latest_dramas_div());
     $home_page_div->append_tag_to_content($this->get_google_code_rss_div());
     echo $home_page_div->get_as_string();
 }
 public function render_body_div_footer_nav()
 {
     /*
      *Second Tier Nav - libraries and search
      */
     $footer_nav_div = new HTMLTags_Div();
     $footer_nav_div->set_attribute_str('id', 'footer-nav');
     $footer_nav_div->append($this->get_second_tier_navigation_div());
     $footer_nav_div->append($this->get_external_video_search_div());
     echo $footer_nav_div->get_as_string();
 }
 protected function get_thumbnail_queue_link($id)
 {
     $div = new HTMLTags_Div();
     $u = $this->get_redirect_script_url();
     $u->set_get_variable('action', 'requeue_video_in_thumbnail_queue');
     $u->set_get_variable('id', $id);
     $a = new HTMLTags_A('Refetch Thumbnail');
     $a->set_href($u);
     $div->append($a);
     return $div->get_as_string();
 }
 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 render_xml()
 {
     if (isset($_GET['ajax']) && isset($_GET['related_videos']) && isset($_GET['rewrite_controls'])) {
         $div = new HTMLTags_Div();
         $thumbnails_wrapper_div = new HTMLTags_Div();
         $thumbnails_wrapper_div->set_attribute_str('id', 'thumbnails-wrapper');
         $thumbnails_wrapper_div->append(VideoLibrary_DisplayHelper::get_thumbnails_div($this->get_related_videos()));
         $div->append($thumbnails_wrapper_div);
         $div->append(VideoLibrary_DisplayHelper::get_pager_div($this->get_start(), $this->get_duration(), $this->get_total_related_videos_count(), $this->get_page_url()));
         echo $div->get_as_string();
     } elseif (isset($_GET['ajax']) && isset($_GET['related_videos'])) {
         echo VideoLibrary_DisplayHelper::get_thumbnails_div($this->get_related_videos());
     }
 }
Ejemplo n.º 9
0
 public function content()
 {
     $cmf = HaddockProjectOrganisation_ConfigManagerFactory::get_instance();
     $config_manager = $cmf->get_config_manager('plug-ins', 'admin');
     $widget_classes = $config_manager->get_start_page_widget_classes();
     $div = new HTMLTags_Div();
     $div->set_attribute_str('id', 'StartPageWidgetContainer');
     foreach ($widget_classes as $key => $value) {
         $widget_class_str = trim($value);
         $instance = new $widget_class_str();
         $content = $instance->get_widget_div();
         $div->append($content);
     }
     echo $div->get_as_string();
 }
 public function render_body_div_navigation()
 {
     $navigation_div = new HTMLTags_Div();
     $navigation_div->set_attribute_str('id', 'navigation');
     #$pdf = HaddockProjectOrganisation_ProjectDirectoryFinder::get_instance();
     #$pd = $pdf->get_project_directory_for_this_project();
     #
     #$anxf = $pd->get_admin_navigation_xml_file();
     #
     #$site_map_ul = new Admin_SiteMapUL($anxf);
     #
     #$navigation_div->append_tag_to_content($site_map_ul);
     ob_start();
     require PROJECT_ROOT . '/haddock/admin/www-includes/html/' . 'body.div.nav-or-error-msg.inc.php';
     $str = ob_get_clean();
     $navigation_div->append_str_to_content($str);
     echo $navigation_div->get_as_string();
 }
<?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();
<?php

/**
 * Give the customer a chance to create a new account.
 *
 * @copyright Clear Line Web Design, 2007-09-21
 */
$existing_customer_log_in_div = new HTMLTags_Div();
$existing_customer_log_in_div->set_attribute_str('id', 'existing_customer_log_in_div');
$existing_customer_log_in_p_text = <<<TXT
If you already have a password, please log in here:
TXT;
$existing_customer_log_in_div->append_tag_to_content(new HTMLTags_P($existing_customer_log_in_p_text));
$existing_customer_log_in_link = new HTMLTags_A('Existing Customer Log In');
$existing_customer_log_in_link->set_attribute_str('class', 'cool_button');
$existing_customer_log_in_link->set_attribute_str('id', 'existing_customer_log_in_button');
$existing_customer_log_in_location = new HTMLTags_URL();
$existing_customer_log_in_location->set_file('/');
$existing_customer_log_in_location->set_get_variable('section', 'plug-ins');
$existing_customer_log_in_location->set_get_variable('module', 'shop');
$existing_customer_log_in_location->set_get_variable('page', 'log-in');
$existing_customer_log_in_location->set_get_variable('type', 'html');
if (isset($_GET['return_to'])) {
    $existing_customer_log_in_location->set_get_variable('return_to', $_GET['return_to']);
}
$existing_customer_log_in_link->set_href($existing_customer_log_in_location);
$existing_customer_log_in_div->append_tag_to_content($existing_customer_log_in_link);
echo $existing_customer_log_in_div->get_as_string();
<?php

/**
 * Any messages that you want to appear above the products on the product
 * listing page.
 *
 * @copyright Clear Line Web Design, 2007-07-26
 */
$div_welcome_blurb = new HTMLTags_Div();
$wecome_txt = <<<TXT
Products on sale at this shop.
TXT;
$div_welcome_blurb->append_tag_to_content(new HTMLTags_P($wecome_txt));
echo $div_welcome_blurb->get_as_string();
<?php

/**
 * A div that is displayed if the customer is not logged into a shop.
 *
 * @copyright Clear Line Web Design, 2007-08-21
 */
$not_logged_in_div = new HTMLTags_Div();
$not_logged_in_div->set_attribute_str('id', 'not_logged_in_div');
// Already logged in
// You are logged in as Mr. X.
$p_text = <<<TXT
You are not logged in.
TXT;
$not_logged_in_div->append_tag_to_content(new HTMLTags_P($p_text));
echo $not_logged_in_div->get_as_string();
    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 
    }
Ejemplo n.º 16
0
/*
 * 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();
<?php

/**
 * A div that is displayed if the customer is already logged into a shop.
 *
 * @copyright Clear Line Web Design, 2007-08-21
 */
$log_in_manager = Shop_LogInManager::get_instance();
$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));
echo $already_logged_in_div->get_as_string();
<?php

/**
 * A header to go over the list of all the products.
 * 
 * @copyright Clear Line Web Design, 2007-07-26
 */
$div_content_header = new HTMLTags_Div();
$div_content_header->set_attribute_str('id', 'content_header');
$h = new HTMLTags_Heading(2, 'Products');
$div_content_header->append_tag_to_content($h);
echo $div_content_header->get_as_string();
<?php

/**
 * The div to tell the customer which region they are currently set to.
 *
 * @copyright Clear Line Web Design, 2007-08-23
 */
$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_region = $customer_regions_table->get_row_by_id($_SESSION['customer_region_id']);
if ($customer_regions_table->count_all_rows() > 0) {
    $crn_div = new HTMLTags_Div();
    $customer_region = $customer_regions_table->get_current_customer_region();
    $customer_region_blurb_p = new HTMLTags_P();
    if (isset($_GET['customer_region_session'])) {
        $customer_region_blurb_p->append_str_to_content('You have set your region to&nbsp;');
    } else {
        $customer_region_blurb_p->append_str_to_content('Your region is set to&nbsp;');
    }
    $customer_region_blurb_p->append_str_to_content($customer_region->get_name_with_the());
    $customer_region_blurb_p->append_str_to_content('.');
    $crn_div->append_tag_to_content($customer_region_blurb_p);
    echo $crn_div->get_as_string();
}
$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());
        $customer_region_link_anchor = new HTMLTags_A();
        $customer_region_link_anchor->set_href($customer_region_link_location);
        $customer_region_link_anchor->set_attribute_str('title', 'Change your location to&nbsp;' . $customer_region->get_name());
        $customer_region_link_anchor->append_tag_to_content($customer_region_link_span);
        $customer_region_li->append_tag_to_content($customer_region_link_anchor);
    }
    $customer_regions_ul->append_tag_to_content($customer_region_li);
}
$customer_regions_div->append_tag_to_content($customer_regions_ul);
echo $customer_regions_div->get_as_string();
$protx_form->add_hidden_input('Vendor', $strVSPVendorName);
$protx_form->add_hidden_input('Crypt', $strCrypt);
$protx_submit_input = new HTMLTags_Input();
$protx_submit_input->set_attribute_str('type', 'submit');
$protx_submit_input->set_attribute_str('value', 'Go to Secure Server');
$protx_form->append_tag_to_content($protx_submit_input);
foreach ($protx_form->get_hidden_inputs() as $hidden_input) {
    $protx_form->append_tag_to_content($hidden_input);
}
$protx_form_div->append_tag_to_content($protx_form);
/*
 * Example of ProTx Form
 */
//<form
//        action="https://ukvpstest.protx.com/vspgateway/service/vspform-register.vsp"
//        method="POST" id="VSPForm" name="VSPForm"
//        >
//        <input type="hidden" name="VPSProtocol" value="2.22">
//        <input type="hidden" name="TxType" value="PAYMENT">
//        <input type="hidden" name="Vendor" value="mash ">
//        <input type="hidden" name="Crypt" value="">
//        <input type="submit" name="proceed" src="images/proceed.gif" value="Proceed to VSP Form registration">
/*
 * Example of ProTx Crypt Form
 */
//VendorTxCode=mash60565545&Amount=10.25&Currency=GBP&Description=The best DVDs from mash&SuccessURL=http://dev.protx-sample-kit.ragnar.clearlinewebdesign.com//orderSuccessful.php&FailureURL=http://dev.protx-sample-kit.ragnar.clearlinewebdesign.com//orderFailed.php&CustomerName=Saul Howard&CustomerEMail=saul@saul.com&VendorEMail=robert@clearlinewebdesign.com&eMailMessage=Thank you so very much for your order.&BillingAddress=12 Chesham RdBrighton&BillingPostCode=BN21NB&DeliveryAddress=&DeliveryPostCode=&Basket=2:Nacho Libre:1:7.45:1.30:8.75:8.75:Delivery:1:1.50:---:1.50:1.50&AllowGiftAid=0&ApplyAVSCV2=0&Apply3DSecure=0
if ($strConnectTo !== "LIVE") {
    echo "<table style=\"width:100%;display:block;background-color: #c1c1c1\">\r\n\t\t<tr style=\"width:50em;display:block;\">\r\n\t\t<td class=\"subheader\" align=\"center\">Your VSP Form Crypt Post Contents</td>\r\n\t\t</tr>\r\n\t\t<tr style=\"width:50em;display:block;\">\r\n\t\t<td class=\"smallheader\" align=\"center\">The box below shows the unencrypted contents of the VSP Form\r\n\t\tCrypt field.  This will not be displayed in LIVE mode.  If you wish to view the encrypted and encoded\r\n\t\tcontents view the source of this page and scroll to the bottom.  You'll find the submission FORM there.\r\n\t\t</tr>\r\n\t\t<tr style=\"width:50em;display:block;\">\r\n\t\t<td align=\"left\" style=\"word-wrap:break-word\" width=\"630\" class=\"smalltext\">" . $strPost . "</td>\r\n\t\t</tr>\r\n\t\t</table>";
}
echo $protx_form_div->get_as_string();
 * @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);
        }
    }
}
echo $nav_or_error_msg_div->get_as_string();
//                    <!--
//                    Override the customer’s stored PayPal address
//                    -->
//                    <input type="hidden" name="address_override" value="1">
//                    <!-- Set the prepopulation variables that override the stored address -->
//                   <input type="hidden" name="first_name" value="John">
//                   <input type="hidden" name="last_name" value="Doe">
//                   <input type="hidden" name="address1" value="345 Lark Ave">
//                   <input type="hidden" name="city" value="San Jose">
//                   <input type="hidden" name="state" value="CA">
//                   <input type="hidden" name="zip" value="95121">
//                   <input type="hidden" name="country" value="US">
//                   <input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-
//                   but01.gif" border="0" name="submit" alt="Make payments with PayPal - it's
//                   fast, free and secure!">
//           </form>
/*
 * Example of shopping basket stuff
 */
//            <form action=”https://www.paypal.com/cgi-bin/webscr” method=”post”>
//                    <input type=”hidden” name=”cmd” value=”_cart”>
//                    <input type=”hidden” name=”upload” value=”1”>
//                    <input type=”hidden” name=”business” value=”seller@designerfotos.com”>
//                    <input type=”hidden” name=”item_name_1” value=”Item Name 1”>
//                    <input type=”hidden” name=”amount_1” value=”1.00”>
//                    <input type=”hidden” name=”item_name_2” value=”Item Name 2”>
//                    <input type=”hidden” name=”amount_2” value=”2.00”>
//                   <input type=”submit”” value=”PayPal”>
//           </form>
echo $paypal_form_div->get_as_string();
<?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();
 * @copyright Clear Line Web Design, 2007-08-23
 */
/* Code copied from new style Admin_HTMLPage
 * to give old-style admin pages the same look
 */
$image_div = new HTMLTags_Div();
$image_div->set_attribute_str('id', 'logo_image');
$logo_img = new HTMLTags_IMG();
$logo_src_url = new HTMLTags_URL();
$cmf = HaddockProjectOrganisation_ConfigManagerFactory::get_instance();
$config_manager = $cmf->get_config_manager('haddock', 'admin');
$logo_config_filename = $config_manager->get_logo_image_filename();
$logo_src_url->set_file($logo_config_filename);
$logo_img->set_src($logo_src_url);
$image_div->append($logo_img);
echo $image_div->get_as_string();
$h1_title = new HTMLTags_Heading(1);
$home_link = new HTMLTags_A(HaddockProjectOrganisation_ProjectInformationHelper::get_title());
$home_link->set_href(new HTMLTags_URl('/'));
$h1_title->append_tag_to_content($home_link);
echo $h1_title->get_as_string();
$gvm = Caching_GlobalVarManager::get_instance();
echo "<h2>\n";
//
//echo "Admin\n";
//
//echo "&nbsp;&gt;&nbsp;\n";
#echo $current_module_directory->get_admin_section_title();
#echo "\n";
#print_r($current_admin_page_directory);
//if (isset($current_admin_page_directory)) {
Ejemplo n.º 26
0
 */
$log_in_to_account_div = new HTMLTags_Div();
$log_in_to_account_div->set_attribute_str('id', 'log_in_to_account_div');
if ($log_in_manager->is_logged_in()) {
    // Change Account
    $log_in_to_account_div->append_str_to_content($page_manager->get_inc_file_as_string('body.p.log-out'));
    //$log_in_to_account_div->append_str_to_content(
    //	$page_manager->get_inc_file_as_string('body.a.log-out')
    //);
} else {
    /*
     * Tell the customer about any log in errors.
     */
    if (isset($_GET['error_message'])) {
        $log_in_to_account_div->append_tag_to_content(new HTMLTags_LastActionBoxDiv($message = stripslashes(urldecode($_GET['error_message'])), $no_script_href = '', $status = 'error'));
    }
    /*
     * Log into the customer's account.
     */
    $form_location = PublicHTML_PublicURLFactory::get_url('plug-ins', 'shop', 'log-in', 'html');
    $redirect_script_location = PublicHTML_PublicURLFactory::get_url('plug-ins', 'shop', 'log-in', 'redirect-script');
    $desired_location = PublicHTML_PublicURLFactory::get_url('plug-ins', 'shop', 'products', 'html');
    $cancel_page_location = PublicHTML_PublicURLFactory::get_url('plug-ins', 'shop', 'products', 'html');
    //$login_form_div = $log_in_manager->get_login_form_div();
    $login_form_div = new HTMLTags_Div();
    $login_form_div->set_attribute_str('class', 'cmx-form');
    $login_form_div->append_tag_to_content($log_in_manager->get_log_in_form($form_location, $redirect_script_location, $desired_location, $cancel_page_location));
    $log_in_to_account_div->append_tag_to_content($login_form_div);
}
echo $log_in_to_account_div->get_as_string();
Ejemplo n.º 27
0
     * The comment input.
     */
    $comment_field = $comments_table->get_field('comment');
    $comment_field_renderer = $comment_field->get_renderer();
    $comment_input_tag = $comment_field_renderer->get_form_input();
    $comment_adding_form->add_input_tag('comment', $comment_input_tag);
    /*
     * Hidden product_id input
     */
    $product_id_input = new HTMLTags_Input();
    $product_id_input->set_attribute_str('type', 'hidden');
    $product_id_input->set_attribute_str('name', 'product_id');
    $product_id_input->set_attribute_str('value', $_GET['product_id']);
    $comment_adding_form->add_input_tag('', $product_id_input);
    #$comment_adding_form->add_input_name('url', 'URL');
    #
    #$comment_adding_form->add_input_name('homepage_title');
    /*
     * The add button.
     */
    $comment_adding_form->set_submit_text('Add');
    $comment_adding_form->set_cancel_location($cancel_location);
    $comment_form_div->append_tag_to_content($comment_adding_form);
    $comments_div->append_tag_to_content($comment_form_div);
    $content_div->append_tag_to_content($comments_div);
    #	}
} elseif (!isset($_GET['product_id'])) {
    $header_div->append_str_to_content($page_manager->get_inc_file_as_string('body.div.product_id-missing'));
}
echo $content_div->get_as_string();
<?php

/**
 * The div to tell the customer about which products are available in
 * the selected region in the shop plug-in.
 * 
 * @copyright Clear Line Web Design, 2007-07-26
 */
if (isset($_GET['customer_region_session'])) {
    $div_customer_region_notification = new HTMLTags_Div();
    $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_region = $customer_regions_table->get_row_by_id($_SESSION['customer_region_id']);
    $customer_region_blurb_p = new HTMLTags_P();
    $customer_region_blurb_p->append_str_to_content('These are the products available in&nbsp;');
    $customer_region_blurb_p->append_str_to_content($customer_region->get_name_with_the());
    $customer_region_blurb_p->append_str_to_content('.');
    $div_customer_region_notification->append_tag_to_content($customer_region_blurb_p);
    echo $div_customer_region_notification->get_as_string();
}
<?php

/**
 * the navigation div on the navigation page.
 *
 * @copyright Clear Line Web Design, 2007-08-19
 */
$navigation_div = new HTMLTags_Div();
$navigation_div->set_attribute_str('id', 'navigation');
ob_start();
require PROJECT_ROOT . '/haddock/admin/www-includes/html/' . 'body.div.nav-or-error-msg.inc.php';
$str = ob_get_clean();
$navigation_div->append_str_to_content($str);
echo $navigation_div->get_as_string();
<?php

/**
 * Give the customer a chance to create a new account.
 *
 * @copyright Clear Line Web Design, 2007-09-21
 */
$create_new_customer_div = new HTMLTags_Div();
$create_new_customer_div->set_attribute_str('id', 'create_new_customer_div');
$create_new_customer_link = new HTMLTags_A('Create New Account');
$create_new_customer_link->set_attribute_str('class', 'cool_button');
$create_new_customer_link->set_attribute_str('id', 'create_new_customer_button');
$create_new_customer_location = new HTMLTags_URL();
$create_new_customer_location->set_file('/');
$create_new_customer_location->set_get_variable('section', 'plug-ins');
$create_new_customer_location->set_get_variable('module', 'shop');
#$create_new_customer_location->set_get_variable('page', 'customer-details');
$create_new_customer_location->set_get_variable('page', 'create-new-account');
$create_new_customer_location->set_get_variable('type', 'html');
if (isset($_GET['return_to'])) {
    $create_new_customer_location->set_get_variable('return_to', $_GET['return_to']);
}
$create_new_customer_link->set_href($create_new_customer_location);
$create_new_customer_div->append_tag_to_content($create_new_customer_link);
echo $create_new_customer_div->get_as_string();