if (isset($_GET['id'])) { $id = COM_sanitizeID($_GET['id']); } else { $id = COM_applyFilter(COM_getArgument('id')); } $display = PAYPAL_siteHeader(); $T = new Template(PAYPAL_PI_PATH . '/templates'); $T->set_file('title', 'paypal_title.thtml'); $T->set_var('title', $LANG_PP['main_title']); $display .= $T->parse('', 'title'); if (!empty($msg)) { //msg block $display .= COM_startBlock('', '', 'blockheader-message.thtml'); $display .= $msg; $display .= COM_endBlock('blockfooter-message.thtml'); } $display .= PAYPAL_userMenu($LANG_PP['product_list']); $content = ''; if (!empty($id)) { USES_paypal_class_product(); $P = new Product($id); if ($P->id == $id) { $content = $P->Detail(); } } if (empty($content)) { $content = PAYPAL_errorMessage($LANG_PP['invalid_product_id']); } $display .= $content; $display .= PAYPAL_siteFooter(); echo $display;
$content .= $ppGCart->View(true); break; case 'productlist': default: if (isset($_REQUEST['category'])) { $content .= PAYPAL_ProductList($_REQUEST['category']); } else { $content .= PAYPAL_ProductList(); } $menu_opt = $LANG_PP['product_list']; break; case 'none': // Add nothing, useful if the view is handled by the action above break; } $display = PAYPAL_siteHeader(); $T = new Template(PAYPAL_PI_PATH . '/templates'); $T->set_file('title', 'paypal_title.thtml'); $T->set_var('title', $LANG_PP['main_title']); $display .= $T->parse('', 'title'); if (!empty($msg)) { //msg block $display .= COM_startBlock('', '', 'blockheader-message.thtml'); $display .= $msg; $display .= COM_endBlock('blockfooter-message.thtml'); } $display .= LGLIB_showAllMessages(); $display .= PAYPAL_userMenu($menu_opt); $display .= $content; $display .= PAYPAL_siteFooter(); echo $display;