public function get_html_url_in_public_images() { $image_row = $this->get_element(); $html_url = new HTMLTags_URL(); $html_url->set_file('/hc-database-img-cache/' . $image_row->get_id() . '.' . $image_row->get_file_extension()); return $html_url; }
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 static function get_frame_png_thumbnail_img(Oedipus_Frame $frame, $max_width = 250, $max_height = 185) { $url = new HTMLTags_URL(); $url->set_file('/frames/images/thumbnails/frame-' . $frame->get_id() . '_' . $max_width . 'x' . $max_height . '.png'); $img = new HTMLTags_IMG(); $img->set_src($url); $img->set_alt($frame->get_name()); return $img; }
public function get_admin_section_home_page_href() { $admin_section_home_page_href = new HTMLTags_URL(); $admin_section_home_page_href_str = '/admin/hpi/'; $admin_section_home_page_href_str .= $this->get_identifying_name(); $admin_section_home_page_href_str .= '/home.html'; $admin_section_home_page_href->set_file($admin_section_home_page_href_str); return $admin_section_home_page_href; }
public static function get_home_page_url() { $url = new HTMLTags_URL(); $url->set_file('/'); return $url; // return self // ::get_oo_page_url( // '/' // ); }
private function get_oedipus_png_frame(Oedipus_Frame $frame) { $max_width = 100; $max_height = 100; $url = new HTMLTags_URL(); $url->set_file('/frames/images/thumbnails/option-frame-' . $frame->get_id() . '_' . $max_width . 'x' . $max_height . '.png'); $img = new HTMLTags_IMG(); $img->set_src($url); return $img; }
public function get_image_img() { $img = new HTMLTags_IMG(); $url = new HTMLTags_URL(); $url->set_file($this->image_url); $img->set_src($url); $img->set_attribute_str('alt', $this->get_name()); $img->set_attribute_str('title', $this->get_description()); return $img; }
public static function get_spans($str_to_split, $num_displayed_char) { $spans = array(); $str_to_split_shortened = ''; # Shorten the string if it needs it $max_length = $num_displayed_char; if (strlen($str_to_split) > $max_length) { # $str_to_split_shortened = substr($str_to_split, 0, $max_length); # $pos = strrpos($str_to_split, " "); # # if($pos === false) { # $str_to_split_shortened = substr($str_to_split, 0, $max_length)."..."; # # } # #$str_to_split_shortened = substr($str_to_split, 0, $pos)."..."; $str_to_split_shortened = substr($str_to_split, 0, $max_length); $truncated_span = new HTMLTags_Span(); $truncated_span->set_attribute_str('class', 'truncated'); $truncated_span->append_str_to_content($str_to_split_shortened); $truncated_span->append_str_to_content(' '); $truncated_span_show_link = new HTMLTags_A('More...'); #$truncated_span_show_link->set_attribute_str('onclick', 'javascript: showInline('); $truncated_span_show_link->set_attribute_str('class', 'show'); $truncated_span_show_link->set_attribute_str('title', 'Show the rest of this text'); $truncated_span_show_location = new HTMLTags_URL(); $truncated_span_show_location->set_file('#'); $truncated_span_show_link->set_href($truncated_span_show_location); $truncated_span->append_tag_to_content($truncated_span_show_link); array_push($spans, $truncated_span); $full_span = new HTMLTags_Span(); $full_span->set_attribute_str('class', 'full'); $full_span->append_str_to_content($str_to_split); $full_span->append_str_to_content(' '); $full_span_hide_link = new HTMLTags_A('...Hide'); $full_span_hide_link->set_attribute_str('class', 'hide'); $full_span_hide_link->set_attribute_str('title', 'hide the rest of this text'); $full_span_hide_location = new HTMLTags_URL(); $full_span_hide_location->set_file('#'); $full_span_hide_link->set_href($full_span_hide_location); $full_span->append_tag_to_content($full_span_hide_link); array_push($spans, $full_span); } else { $full_span = new HTMLTags_Span(); $full_span->append_str_to_content($str_to_split); array_push($spans, $full_span); } return $spans; }
/** * Just because I was getting bored of typing out this minchia all the time... * * No error checking at this point, is it necessary or desirable? * * If the section is 'project-specific', the module should be set to NULL. */ public static function get_url($section, $module, $page, $type) { $url = new HTMLTags_URL(); $url->set_file('/'); $url->set_get_variable('section', 'haddock'); $url->set_get_variable('module', 'admin'); $url->set_get_variable('page', 'admin-includer'); $url->set_get_variable('type', $type); $url->set_get_variable('admin-section', $section); if (isset($module)) { $url->set_get_variable('admin-module', $module); } $url->set_get_variable('admin-page', $page); return $url; }
public static function get_base_url() { $url = new HTMLTags_URL(); #$ph_cm = Configuration_ConfigManagerHelper # ::get_config_manager( # 'haddock', # 'public-html' # ); #if ($ph_cm->server_has_mod_rewrite()) { if (PublicHTML_ServerCapabilitiesHelper::has_mod_rewrite()) { $url->set_file('/'); } else { $url->set_file('/haddock/public-html/public-html/index.php'); } return $url; }
public function get_body_div_header() { /* * Create the HTML tags objects. */ $div_header = new HTMLTags_Div(); $div_header->set_attribute_str('id', 'header'); /* * Project Logo IMG, * for filename look in config, * default should be some haddock fish */ $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(); /* * The admin module has been moved to the plug-ins directory. * * RFI 2009-10-08 */ #$config_manager = $cmf->get_config_manager('haddock', 'admin'); $config_manager = $cmf->get_config_manager('plug-ins', '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); $div_header->append($image_div); /* * There are two headers: * Project Title Link (H1) * and Page Title (H2) */ $h1_title = new HTMLTags_Heading(1); $h1_title->append_str_to_content($this->get_body_div_header_project_heading_content()); $div_header->append_tag_to_content($h1_title); $h2_title = new HTMLTags_Heading(2); $h2_title->append_str_to_content($this->get_body_div_header_heading_content()); $div_header->append_tag_to_content($h2_title); $div_header->append($this->get_log_in_state_div()); $div_header->append($this->get_admin_header_navigation_link_div()); return $div_header; }
protected function do_actions() { if (isset($_GET['action'])) { /* * The action name. */ $an = $_GET['action']; $amm = $this->get_action_method_map(); /* * The acton method name. */ if (isset($amm[$an])) { $amn = $amm[$an]; } else { throw new Exception("Unknown action '{$an}'!"); } /* * Do it. */ try { ObjectOrientation_NamedMethodCaller::call_method_by_name($this, $amn); /* * Is this actually necessary? * * They will all get set again when the user is taken * back to the page. * * Does no harm and the user might be returning to a page * other than the standard crud. */ if (isset($_SESSION['select-vars'])) { unset($_SESSION['select-vars']); } #} catch (ReflectionException $e) { # echo $e->getMessage(); # exit; } catch (Database_CRUDException $e) { /* * If there was a problem changing the database, * go back to whence we came. * * Hope that the session vars have been set for * any forms. * * Also hope that the browser isn't playing silly buggars with * the HTTP_REFERER field. */ $return_to = HTMLTags_URL::parse_and_make_url($_SERVER['HTTP_REFERER']); $return_to->set_get_variable('error', urlencode($e->getMessage())); #print_r($return_to); exit; $this->set_return_to($return_to->get_as_string()); } } else { throw new Exception('No action set for Database_CRUDAdminRedirectScript!'); } }
public static function redirect_to_url(HTMLTags_URL $url) { #throw new Exception('Testing exception handling'); #print_r($url); $url_as_string = $url->get_as_string(); #echo "\$url_as_string: $url_as_string\n"; # #exit; #/* # * See http://uk.php.net/manual/en/function.header.php#73583 # */ #header('Pragma: private'); #header('Cache-control: private, must-revalidate'); $header_directive = 'Location: ' . $url_as_string; #echo "\$header_directive: $header_directive\n"; #exit; header($header_directive); exit; }
public static function get_db_page_url($page_name) { #$ph_cm = Configuration_ConfigManagerHelper # ::get_config_manager( # 'haddock', # 'public-html' # ); # #if ($ph_cm->server_has_mod_rewrite()) { if (PublicHTML_ServerCapabilitiesHelper::has_mod_rewrite()) { #echo "has mod_rewrite!\n"; $url = new HTMLTags_URL(); $url->set_file("/db-pages/{$page_name}.html"); } else { $url = PublicHTML_URLHelper::get_base_url(); $url->set_get_variable('oo-page'); $url->set_get_variable('pcro-factory', 'DBPages_PCROFactory'); $url->set_get_variable('page', $page_name); } return $url; }
/** * Makes a local URL. * * Assumes that you want an OO page. */ public static function make_local_url($page_class, $get_variables = NULL) { $url = new HTMLTags_URL(); #if (isset($get_variables)) { # $url->set_file('/'); # # $url->set_get_variable('oo-page'); # $url->set_get_variable('page-class', $page_class); # # foreach ($get_variables as $k => $v) { # $url->set_get_variable($k, $v); # } #} else { # $url->set_file("/$page_class"); #} $url->set_file('/'); $url->set_get_variable('oo-page'); $url->set_get_variable('page-class', $page_class); if (isset($get_variables)) { foreach ($get_variables as $k => $v) { $url->set_get_variable($k, $v); } } return $url; }
public function get_admin_page_html_table_tr() { $page_row = $this->get_element(); $admin_pages_html_table_tr = new HTMLTags_TR(); $name_td = new HTMLTags_TD(); $name_td->append_str_to_content($page_row->get_name()); $admin_pages_html_table_tr->append_tag_to_content($name_td); $author_td = new HTMLTags_TD(); $author_td->append_str_to_content($page_row->get_author()); $admin_pages_html_table_tr->append_tag_to_content($author_td); $title_td = new HTMLTags_TD(); #$title_td->append_str_to_content($page_row->get_title()); $title_td->append_tag_to_content($this->get_title_a()); $admin_pages_html_table_tr->append_tag_to_content($title_td); /* * The actions */ $confirmation_url_base = new HTMLTags_URL(); $confirmation_url_base->set_file('/'); $confirmation_url_base->set_get_variable('section', 'haddock'); $confirmation_url_base->set_get_variable('module', 'admin'); $confirmation_url_base->set_get_variable('page', 'admin-includer'); $confirmation_url_base->set_get_variable('type', 'html'); $confirmation_url_base->set_get_variable('admin-section', 'haddock'); $confirmation_url_base->set_get_variable('admin-module', 'database'); /* * Edit the page's details. */ $edit_td = new HTMLTags_TD(); $edit_url = clone $confirmation_url_base; $edit_url->set_get_variable('admin-page', 'edit-page'); $edit_url->set_get_variable('page_id', $page_row->get_id()); $edit_a = new HTMLTags_A('Edit'); $edit_a->set_href($edit_url); $edit_td->append_tag_to_content($edit_a); $admin_pages_html_table_tr->append_tag_to_content($edit_td); /* * Delete the page. */ $delete_td = new HTMLTags_TD(); $delete_url = clone $confirmation_url_base; $delete_url->set_get_variable('admin-page', 'delete-page'); $delete_url->set_get_variable('page_id', $page_row->get_id()); $delete_a = new HTMLTags_A('Delete'); $delete_a->set_href($delete_url); $delete_td->append_tag_to_content($delete_a); $admin_pages_html_table_tr->append_tag_to_content($delete_td); return $admin_pages_html_table_tr; }
public static function get_link_a_with_span($node) { $span = new HTMLTags_Span(); $span->append($node['url_title']); $a = new HTMLTags_A(); $a->append($span); $a->set_href(HTMLTags_URL::parse_and_make_url($node['url_href'])); $a->set_attribute_str('title', $node['url_title']); if ($node['open_in_new_window'] == 'Yes') { #echo ' target="_blank" '; $a->set_attribute_str('target', '_blank'); } return $a; }
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 get_current_url() { $current_url = new HTMLTags_URL(); if ($_SERVER['HTTPS']) { $current_url->set_scheme('https'); } else { $current_url->set_scheme('http'); } if (preg_match('/([-\\w.]+):(\\d+)/', $_SERVER['HTTP_HOST'], $matches)) { $current_url->set_domain($matches[1]); $current_url->set_port($matches[2]); } else { $current_url->set_domain($_SERVER['HTTP_HOST']); } $file = $_SERVER['REQUEST_URI']; if (preg_match('/(.*)\\?/', $file, $matches)) { $file = $matches[1]; } $current_url->set_file($file); foreach (array_keys($_GET) as $get_var_key) { $current_url->set_get_variable($get_var_key, $_GET[$get_var_key]); } return $current_url; }
public function get_as_string() { $pretty_urls = 1; //$pretty_urls = 0; if ($pretty_urls) { $get_variables = $this->get_get_variables(); //print_r($get_variables);exit; $video_page = VideoLibrary_URLHelper::get_video_page_class_name(); $tags_page = 'VideoLibrary_TagsPage'; switch ($get_variables['page-class']) { case $video_page: $url = '/videos/'; $url .= $get_variables['video_id']; if (isset($get_variables['external_video_provider_id'])) { $url .= '/channels/' . $get_variables['external_video_provider_id']; } break; case $tags_page: $url = '/tags/'; if (isset($get_variables['external_video_library_id'])) { $url .= 'libraries/' . $get_variables['external_video_library_id']; } break; default: return parent::get_as_string(); } if (isset($get_variables['start'])) { $url .= '/' . $get_variables['start']; } if (isset($get_variables['duration'])) { $url .= '/' . $get_variables['duration']; } return $url; } else { return parent::get_as_string(); } }
protected function get_admin_url() { $admin_url = new HTMLTags_URL(); $admin_url->set_file('/'); $admin_url->set_get_variable('section', 'haddock'); $admin_url->set_get_variable('module', 'admin'); $admin_url->set_get_variable('page', 'admin-includer'); $admin_url->set_get_variable('admin-section', 'haddock'); $admin_url->set_get_variable('admin-module', 'database'); $admin_url->set_get_variable('admin-page', 'table'); $table = $this->get_element(); $admin_url->set_get_variable('table', $table->get_name()); return $admin_url; }
public function get_edited_confirmation_div() { $order = $this->get_element(); $product = $order->get_product(); $confirmation_div = new HTMLTags_Div(); $confirmation_text = <<<TXT You have changed the amount of TXT; $confirmation_text .= $product->get_name(); $confirmation_text .= <<<TXT in your Shopping Basket. 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 All Products'); // $all_products_link->set_attribute_str('class', 'all_products'); $all_products_location = new HTMLTags_URL(); $all_products_location->set_file('/products.html'); // $all_products_location->set_get_variable('page', 'orders'); $all_products_link->set_href($all_products_location); $confirmation_div->append_tag_to_content($all_products_link); return $confirmation_div; }
/** * The skeleton of the add and edit ('create' - c and 'update' - u) * forms. */ protected function render_cu_form($name, HTMLTags_URL $action_rsu, HTMLTags_URL $clear_rsu, $title, $ol, $submit_text, $render_opening_tag_method_name) { /* * Use a little reflection magic to be able to alter the method * called to render the opening tag of the form. */ $cn = get_class($this); $rc = new ReflectionClass($cn); $crm = $rc->getMethod($render_opening_tag_method_name); $crm->invoke($this, $name, $action_rsu); ?> <fieldset> <legend><?php echo $title; ?> </legend> <?php echo $ol; ?> </fieldset> <div class="submit_buttons_div"> <input type="submit" value="<?php echo $submit_text; ?> " class="submit" /> <input type="button" value="Cancel" onclick="document.location.href=('<?php echo $clear_rsu->get_as_string(); ?> ')" class="submit" /> </div> </form> <?php }
# COMMENT ADDING FORM #-------------------------------- $comment_form_div = new HTMLTags_Div(); $comment_form_div->set_attribute_str('class', 'comment-form'); $form_notification_div = new HTMLTags_Div(); $form_notification_div->set_attribute_str('id', 'form_notification_div'); if (isset($_GET['last_added_id'])) { $form_notification_div->append_tag_to_content(new HTMLTags_P('Thank you for your comment.<br /> Comments can take up to 24 hours to appear in the guestbook.')); } if (isset($_GET['form_incomplete'])) { $form_notification_div->append_tag_to_content(new HTMLTags_P('Please complete name, email and comment')); } $comment_form_div->append_tag_to_content($form_notification_div); $comment_adding_action_url = new HTMLTags_URL(); $comment_adding_action_url->set_file('/'); $comment_adding_action_url->set_get_variable('section', 'plug-ins'); $comment_adding_action_url->set_get_variable('module', 'shop'); $comment_adding_action_url->set_get_variable('page', 'product'); $comment_adding_action_url->set_get_variable('type', 'redirect-script'); $comment_adding_action_url->set_get_variable('product_id', $_GET['product_id']); $cancel_location = new HTMLTags_URL(); $cancel_location->set_file('/'); $cancel_location->set_get_variable('section', 'plug-ins'); $cancel_location->set_get_variable('module', 'shop'); $cancel_location->set_get_variable('page', 'product'); $cancel_location->set_get_variable('product_id', $_GET['product_id']); $comment_adding_form = new HTMLTags_SimpleOLForm('comment_adding'); $comment_adding_form->set_attribute_str('class', 'cmxform'); $comment_adding_form->set_attribute_str('id', 'comment-form');
public function get_log_out_url() { $log_out_url = new HTMLTags_URL(); $log_out_url->set_file('/'); $log_out_url->set_get_variable('section', 'haddock'); $log_out_url->set_get_variable('module', 'admin'); $log_out_url->set_get_variable('page', 'log-out'); $log_out_url->set_get_variable('type', 'redirect-script'); return $log_out_url; }
/* * If a MySQL user for this project has not yet been created, * ask the user if they want to create one now. */ if (!$root_mysql_user->has_user_for_this_project()) { $db_user_not_yet_p = new HTMLTags_P(); $db_user_not_yet_p->set_attribute_str('class', 'error'); $db_user_not_yet_p->append_str_to_content('The database user for this project does not exist yet!'); $content_div->append_tag_to_content($db_user_not_yet_p); /* * ------------------------------------------------------------- */ $create_db_user_p = new HTMLTags_P(); $create_db_user_p->append_str_to_content('Click '); $create_db_user_a = new HTMLTags_A('here'); $create_db_user_url = new HTMLTags_URL(); $create_db_user_url->set_file('/admin/redirect-script.php'); $create_db_user_url->set_get_variable('module', 'database'); $create_db_user_url->set_get_variable('page', 'user-management'); $create_db_user_url->set_get_variable('create_db_user'); $create_db_user_a->set_href($create_db_user_url); $create_db_user_p->append_tag_to_content($create_db_user_a); $create_db_user_p->append_str_to_content(' to create it.'); $content_div->append_tag_to_content($create_db_user_p); } else { $db_user_already_p = new HTMLTags_P(); $db_user_already_p->append_str_to_content('The database user for this project exists.'); $content_div->append_tag_to_content($db_user_already_p); } } }
<?php /** * Title div for the header of an admin-includer page. * * @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"; //
<?php /** * The p the link to the page for all the products. * * @copyright Clear Line Web Design, 2007-07-26 */ $all_products_link = new HTMLTags_A('See 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_link->set_href($all_products_location); $all_products_link_p = new HTMLTags_P(); $all_products_link_p->append_tag_to_content($all_products_link); echo $all_products_link_p->get_as_string();
public function get_script_uri() { $script_uri = new HTMLTags_URL(); $script_uri->set_file('/'); $script_uri->set_get_variable('section', $this->get_section()); if ($this->get_section() != 'project-specific') { $script_uri->set_get_variable('module', $this->get_module()); } $script_uri->set_get_variable('page', $this->get_page()); $script_uri->set_get_variable('type', $this->get_type()); return $script_uri; }
$current_page_url = $page_manager->get_script_uri(); $redirect_script_url = clone $current_page_url; $redirect_script_url->set_get_variable('type', 'redirect-script'); $cancel_href = $current_page_url; $mysql_user_factory = Database_MySQLUserFactory::get_instance(); $mysql_user = $mysql_user_factory->get_for_this_project(); $database = $mysql_user->get_database(); $customers_table = $database->get_table('hpi_shop_customers'); $customers_table_renderer = $customers_table->get_renderer(); $customer_regions_table = $database->get_table('hpi_shop_customer_regions'); $shopping_baskets_table = $database->get_table('hpi_shop_shopping_baskets'); $shopping_baskets_table_renderer = $shopping_baskets_table->get_renderer(); $paypal_form_div = new HTMLTags_Div(); $paypal_form_div->set_attribute_str('id', 'paypal_form_div'); $paypal_form = new HTMLTags_Form(); $paypal_form_action = new HTMLTags_URL(); //$paypal_form_action->set_file('https://www.paypal.com/cgi-bin/webscr'); # The real thing $paypal_form_action->set_file('https://www.sandbox.paypal.com/cgi-bin/webscr'); # The sandbox $paypal_form->set_action($paypal_form_action); $paypal_form->set_attribute_str('method', 'post'); // Overall Settings $customer_region = $customer_regions_table->get_row_by_id($_SESSION['customer_region_id']); $currency = $customer_region->get_currency(); $paypal_form->add_hidden_input('cmd', '_cart'); $paypal_form->add_hidden_input('upload', '1'); //$paypal_form->add_hidden_input('business', '*****@*****.**'); # The Real Thing $paypal_form->add_hidden_input('business', '*****@*****.**'); # The Sandbox $paypal_form->add_hidden_input('currency_code', $currency->get_iso_4217_code()); $paypal_form->add_hidden_input('custom', session_id());