本文整理汇总了PHP中osCommerce\OM\Core\ApplicationAbstract::setPageContent方法的典型用法代码示例。如果您正苦于以下问题:PHP ApplicationAbstract::setPageContent方法的具体用法?PHP ApplicationAbstract::setPageContent怎么用?PHP ApplicationAbstract::setPageContent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类osCommerce\OM\Core\ApplicationAbstract
的用法示例。
在下文中一共展示了ApplicationAbstract::setPageContent方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: execute
public static function execute(ApplicationAbstract $application)
{
$OSCOM_ShoppingCart = Registry::get('ShoppingCart');
$OSCOM_Service = Registry::get('Service');
$OSCOM_Breadcrumb = Registry::get('Breadcrumb');
$OSCOM_Template = Registry::get('Template');
$OSCOM_Customer = Registry::get('Customer');
global $osC_oiAddress;
// HPDL
$application->setPageTitle(OSCOM::getDef('shipping_method_heading'));
$application->setPageContent('shipping.php');
if ($OSCOM_Service->isStarted('Breadcrumb')) {
$OSCOM_Breadcrumb->add(OSCOM::getDef('breadcrumb_checkout_shipping'), OSCOM::getLink(null, null, 'Shipping', 'SSL'));
}
// load shipping address page if no default address exists
if (!$OSCOM_ShoppingCart->hasShippingAddress()) {
$application->setPageTitle(OSCOM::getDef('shipping_address_heading'));
$application->setPageContent('shipping_address.php');
$OSCOM_Template->addJavascriptFilename(OSCOM::getPublicSiteLink('javascript/checkout_shipping_address.js'));
$OSCOM_Template->addJavascriptPhpFilename(OSCOM::BASE_DIRECTORY . 'Core/Site/Shop/assets/form_check.js.php');
if (!$OSCOM_Customer->isLoggedOn()) {
$osC_oiAddress = new ObjectInfo($OSCOM_ShoppingCart->getShippingAddress());
}
} else {
$OSCOM_Template->addJavascriptFilename(OSCOM::getPublicSiteLink('javascript/checkout_shipping.js'));
// load all enabled shipping modules
Registry::set('Shipping', new ShippingClass(), true);
}
}
示例2: execute
public static function execute(ApplicationAbstract $application)
{
$OSCOM_ShoppingCart = Registry::get('ShoppingCart');
$OSCOM_Service = Registry::get('Service');
$OSCOM_Breadcrumb = Registry::get('Breadcrumb');
$OSCOM_Template = Registry::get('Template');
global $osC_oiAddress;
// HPDL
$application->setPageTitle(OSCOM::getDef('payment_method_heading'));
$application->setPageContent('billing.php');
if ($OSCOM_Service->isStarted('Breadcrumb')) {
$OSCOM_Breadcrumb->add(OSCOM::getDef('breadcrumb_checkout_payment'), OSCOM::getLink(null, null, 'Billing', 'SSL'));
}
// load billing address page if no default address exists
if (!$OSCOM_ShoppingCart->hasBillingAddress()) {
$application->setPageTitle(OSCOM::getDef('payment_address_heading'));
$application->setPageContent('billing_address.php');
$OSCOM_Template->addJavascriptFilename(OSCOM::getPublicSiteLink('javascript/checkout_payment_address.js'));
$OSCOM_Template->addJavascriptPhpFilename(OSCOM::BASE_DIRECTORY . 'Core/Site/Shop/assets/form_check.js.php');
if (!$OSCOM_Customer->isLoggedOn()) {
$osC_oiAddress = new ObjectInfo($OSCOM_ShoppingCart->getBillingAddress());
}
} else {
$OSCOM_Template->addJavascriptFilename(OSCOM::getPublicSiteLink('javascript/checkout_payment.js'));
// load all enabled payment modules
$OSCOM_Payment = Registry::get('Payment');
$OSCOM_Payment->loadAll();
$OSCOM_Template->addJavascriptBlock($OSCOM_Payment->getJavascriptBlocks());
}
// HPDL
// if (isset($_GET['payment_error']) && is_object(${$_GET['payment_error']}) && ($error = ${$_GET['payment_error']}->get_error())) {
// $OSCOM_MessageStack->add('CheckoutBilling', $error['error'], 'error');
// }
}
示例3: execute
public static function execute(ApplicationAbstract $application) {
if ( isset($_GET['id']) && is_numeric($_GET['id']) ) {
$application->setPageContent('edit.php');
} else {
$application->setPageContent('new.php');
}
}
示例4: execute
public static function execute(ApplicationAbstract $application)
{
$OSCOM_Customer = Registry::get('Customer');
$OSCOM_NavigationHistory = Registry::get('NavigationHistory');
$OSCOM_Language = Registry::get('Language');
$OSCOM_Service = Registry::get('Service');
$OSCOM_Breadcrumb = Registry::get('Breadcrumb');
if ($OSCOM_Customer->isLoggedOn() === false) {
$OSCOM_NavigationHistory->setSnapshot();
osc_redirect(OSCOM::getLink(null, null, 'LogIn', 'SSL'));
}
$application->setPageTitle(OSCOM::getDef('orders_heading'));
$application->setPageContent('orders.php');
$OSCOM_Language->load('order');
if ($OSCOM_Service->isStarted('Breadcrumb')) {
$OSCOM_Breadcrumb->add(OSCOM::getDef('breadcrumb_my_orders'), OSCOM::getLink(null, null, 'Orders', 'SSL'));
if (is_numeric($_GET['Orders'])) {
$OSCOM_Breadcrumb->add(sprintf(OSCOM::getDef('breadcrumb_order_information'), $_GET['Orders']), OSCOM::getLink(null, null, 'Orders=' . $_GET['Orders'], 'SSL'));
}
}
if (is_numeric($_GET['Orders'])) {
if (Order::getCustomerID($_GET['Orders']) !== $OSCOM_Customer->getID()) {
osc_redirect(OSCOM::getLink(null, null, null, 'SSL'));
}
$application->setPageTitle(sprintf(OSCOM::getDef('order_information_heading'), $_GET['Orders']));
$application->setPageContent('orders_info.php');
}
}
示例5: execute
public static function execute(ApplicationAbstract $application)
{
$OSCOM_Customer = Registry::get('Customer');
$OSCOM_NavigationHistory = Registry::get('NavigationHistory');
$OSCOM_MessageStack = Registry::get('MessageStack');
$OSCOM_Service = Registry::get('Service');
$OSCOM_Breadcrumb = Registry::get('Breadcrumb');
if (ALLOW_GUEST_TO_TELL_A_FRIEND == '-1' && $OSCOM_Customer->isLoggedOn() === false) {
$OSCOM_NavigationHistory->setSnapshot();
osc_redirect(OSCOM::getLink(null, 'Account', 'LogIn', 'SSL'));
}
$requested_product = null;
$product_check = false;
if (count($_GET) > 3) {
$requested_product = basename(key(array_slice($_GET, 3, 1, true)));
if ($requested_product == 'Write') {
unset($requested_product);
if (count($_GET) > 4) {
$requested_product = basename(key(array_slice($_GET, 4, 1, true)));
}
}
}
if (isset($requested_product)) {
if (Product::checkEntry($requested_product)) {
$product_check = true;
}
}
if ($product_check === false) {
$application->setPageContent('not_found.php');
return false;
}
Registry::set('Product', new Product($requested_product));
$OSCOM_Product = Registry::get('Product');
if (empty($_POST['from_name'])) {
$OSCOM_MessageStack->add('TellAFriend', OSCOM::getDef('error_tell_a_friend_customers_name_empty'));
}
if (!osc_validate_email_address($_POST['from_email_address'])) {
$OSCOM_MessageStack->add('TellAFriend', OSCOM::getDef('error_tell_a_friend_invalid_customers_email_address'));
}
if (empty($_POST['to_name'])) {
$OSCOM_MessageStack->add('TellAFriend', OSCOM::getDef('error_tell_a_friend_friends_name_empty'));
}
if (!osc_validate_email_address($_POST['to_email_address'])) {
$OSCOM_MessageStack->add('TellAFriend', OSCOM::getDef('error_tell_a_friend_invalid_friends_email_address'));
}
if ($OSCOM_MessageStack->size('TellAFriend') < 1) {
$email_subject = sprintf(OSCOM::getDef('email_tell_a_friend_subject'), osc_sanitize_string($_POST['from_name']), STORE_NAME);
$email_body = sprintf(OSCOM::getDef('email_tell_a_friend_intro'), osc_sanitize_string($_POST['to_name']), osc_sanitize_string($_POST['from_name']), $OSCOM_Product->getTitle(), STORE_NAME) . "\n\n";
if (!empty($_POST['message'])) {
$email_body .= osc_sanitize_string($_POST['message']) . "\n\n";
}
$email_body .= sprintf(OSCOM::getDef('email_tell_a_friend_link'), OSCOM::getLink(null, null, $OSCOM_Product->getKeyword(), 'NONSSL', false)) . "\n\n" . sprintf(OSCOM::getDef('email_tell_a_friend_signature'), STORE_NAME . "\n" . HTTP_SERVER . DIR_WS_CATALOG . "\n");
osc_email(osc_sanitize_string($_POST['to_name']), osc_sanitize_string($_POST['to_email_address']), $email_subject, $email_body, osc_sanitize_string($_POST['from_name']), osc_sanitize_string($_POST['from_email_address']));
$OSCOM_MessageStack->add('header', sprintf(OSCOM::getDef('success_tell_a_friend_email_sent'), $OSCOM_Product->getTitle(), osc_output_string_protected($_POST['to_name'])), 'success');
osc_redirect(OSCOM::getLink(null, null, $OSCOM_Product->getKeyword()));
}
$application->setPageTitle($OSCOM_Product->getTitle());
$application->setPageContent('tell_a_friend.php');
}
示例6: execute
public static function execute(ApplicationAbstract $application)
{
$OSCOM_Service = Registry::get('Service');
$OSCOM_Breadcrumb = Registry::get('Breadcrumb');
$application->setPageTitle(sprintf(OSCOM::getDef('index_heading'), STORE_NAME));
$application->setPageContent('product_listing.php');
if (is_numeric($_GET['Manufacturers'])) {
Registry::set('Manufacturer', new Manufacturer($_GET['Manufacturers']));
$OSCOM_Manufacturer = Registry::get('Manufacturer');
$application->setPageTitle($OSCOM_Manufacturer->getTitle());
// HPDL $application->setPageImage('manufacturers/' . $OSCOM_Manufacturer->getImage());
if ($OSCOM_Service->isStarted('Breadcrumb')) {
$OSCOM_Breadcrumb->add($OSCOM_Manufacturer->getTitle(), OSCOM::getLink());
}
Registry::set('Products', new Products());
$OSCOM_Products = Registry::get('Products');
$OSCOM_Products->setManufacturer($OSCOM_Manufacturer->getID());
if (isset($_GET['filter']) && is_numeric($_GET['filter']) && $_GET['filter'] > 0) {
$OSCOM_Products->setCategory($_GET['filter']);
}
if (isset($_GET['sort']) && !empty($_GET['sort'])) {
if (strpos($_GET['sort'], '|d') !== false) {
$OSCOM_Products->setSortBy(substr($_GET['sort'], 0, -2), '-');
} else {
$OSCOM_Products->setSortBy($_GET['sort']);
}
}
} else {
osc_redirect(OSCOM::getLink(OSCOM::getDefaultSite(), OSCOM::getDefaultSiteApplication()));
}
}
示例7: execute
public static function execute(ApplicationAbstract $application)
{
$OSCOM_Service = Registry::get('Service');
$OSCOM_Breadcrumb = Registry::get('Breadcrumb');
$application->setPageTitle(OSCOM::getDef('info_shipping_heading'));
$application->setPageContent('shipping.php');
if ($OSCOM_Service->isStarted('Breadcrumb')) {
$OSCOM_Breadcrumb->add(OSCOM::getDef('breadcrumb_shipping'), OSCOM::getLink(null, null, 'Shipping'));
}
}
示例8: execute
public static function execute(ApplicationAbstract $application)
{
$OSCOM_Template = Registry::get('Template');
$OSCOM_NavigationHistory = Registry::get('NavigationHistory');
// HPDL
$OSCOM_Template->setHasHeader(false);
$OSCOM_Template->setHasFooter(false);
$OSCOM_Template->setHasBoxModules(false);
$OSCOM_Template->setHasContentModules(false);
$OSCOM_Template->setShowDebugMessages(false);
$OSCOM_NavigationHistory->removeCurrentPage();
$requested_product = null;
$product_check = false;
if (count($_GET) > 2) {
$requested_product = basename(key(array_slice($_GET, 2, 1, true)));
if ($requested_product == OSCOM::getSiteApplication()) {
unset($requested_product);
if (count($_GET) > 3) {
$requested_product = basename(key(array_slice($_GET, 3, 1, true)));
}
}
}
if (isset($requested_product)) {
if (!$application->siteApplicationActionExists($requested_product)) {
if (Product::checkEntry($requested_product)) {
$product_check = true;
Registry::set('Product', new Product($requested_product));
$OSCOM_Product = Registry::get('Product');
$OSCOM_Template->addPageTags('keywords', $OSCOM_Product->getTitle());
$OSCOM_Template->addPageTags('keywords', $OSCOM_Product->getModel());
if ($OSCOM_Product->hasTags()) {
$OSCOM_Template->addPageTags('keywords', $OSCOM_Product->getTags());
}
$application->setPageTitle($OSCOM_Product->getTitle());
$application->setPageContent('images.php');
}
}
}
if ($product_check === false) {
$application->setPageTitle(OSCOM::getDef('product_not_found_heading'));
$application->setPageContent('not_found.php');
}
}
示例9: execute
public static function execute(ApplicationAbstract $application)
{
$OSCOM_Service = Registry::get('Service');
$OSCOM_Breadcrumb = Registry::get('Breadcrumb');
$OSCOM_Template = Registry::get('Template');
$OSCOM_MessageStack = Registry::get('MessageStack');
if ($OSCOM_Service->isStarted('Breadcrumb')) {
$OSCOM_Breadcrumb->add(OSCOM::getDef('breadcrumb_address_book_add_entry'), OSCOM::getLink(null, null, 'AddressBook&Create', 'SSL'));
}
$application->setPageTitle(OSCOM::getDef('address_book_add_entry_heading'));
$application->setPageContent('address_book_process.php');
$OSCOM_Template->addJavascriptPhpFilename(OSCOM::BASE_DIRECTORY . 'Core/Site/Shop/assets/form_check.js.php');
if (AddressBook::numberOfEntries() >= MAX_ADDRESS_BOOK_ENTRIES) {
$OSCOM_MessageStack->add('AddressBook', OSCOM::getDef('error_address_book_full'));
$application->setPageTitle(OSCOM::getDef('address_book_heading'));
$application->setPageContent('address_book.php');
return true;
}
}
示例10: execute
public static function execute(ApplicationAbstract $application)
{
if (!isset($_GET['log']) || empty($_GET['log'])) {
OSCOM::redirect(OSCOM::getLink());
}
if (!CoreUpdate::logExists($_GET['log'])) {
Registry::get('MessageStack')->add(null, OSCOM::getDef('ms_error_log_file_does_not_exist'), 'error');
OSCOM::redirect(OSCOM::getLink());
}
$application->setPageContent('view_log.php');
}
示例11: execute
public static function execute(ApplicationAbstract $application)
{
$OSCOM_Customer = Registry::get('Customer');
$OSCOM_NavigationHistory = Registry::get('NavigationHistory');
$OSCOM_Template = Registry::get('Template');
$OSCOM_Service = Registry::get('Service');
$OSCOM_Breadcrumb = Registry::get('Breadcrumb');
$requested_product = null;
$product_check = false;
if (count($_GET) > 3) {
$requested_product = basename(key(array_slice($_GET, 3, 1, true)));
if ($requested_product == 'Write') {
unset($requested_product);
if (count($_GET) > 4) {
$requested_product = basename(key(array_slice($_GET, 4, 1, true)));
}
}
}
if (isset($requested_product)) {
if (Product::checkEntry($requested_product)) {
$product_check = true;
}
}
if ($product_check === false) {
$application->setPageContent('not_found.php');
return false;
}
if ($OSCOM_Customer->isLoggedOn() === false && SERVICE_REVIEW_ENABLE_REVIEWS == 1) {
$OSCOM_NavigationHistory->setSnapshot();
osc_redirect(OSCOM::getLink(null, 'Account', 'LogIn', 'SSL'));
}
Registry::set('Product', new Product($requested_product));
$OSCOM_Product = Registry::get('Product');
$application->setPageTitle($OSCOM_Product->getTitle());
$application->setPageContent('reviews_write.php');
$OSCOM_Template->addJavascriptPhpFilename('templates/' . $OSCOM_Template->getCode() . '/javascript/products/reviews_new.php');
if ($OSCOM_Service->isStarted('Breadcrumb')) {
$OSCOM_Breadcrumb->add($OSCOM_Product->getTitle(), OSCOM::getLink(null, null, 'Reviews&' . $OSCOM_Product->getKeyword()));
$OSCOM_Breadcrumb->add(OSCOM::getDef('breadcrumb_reviews_new'), OSCOM::getLink(null, null, 'Reviews&Write&' . $OSCOM_Product->getKeyword()));
}
}
示例12: execute
public static function execute(ApplicationAbstract $application)
{
$OSCOM_Template = Registry::get('Template');
$OSCOM_Service = Registry::get('Service');
$OSCOM_Breadcrumb = Registry::get('Breadcrumb');
$application->setPageTitle(OSCOM::getDef('password_forgotten_heading'));
$application->setPageContent('password_forgotten.php');
$OSCOM_Template->addJavascriptPhpFilename(OSCOM::BASE_DIRECTORY . 'Core/Site/Shop/assets/form_check.js.php');
if ($OSCOM_Service->isStarted('Breadcrumb')) {
$OSCOM_Breadcrumb->add(OSCOM::getDef('breadcrumb_password_forgotten'), OSCOM::getLink(null, null, 'PasswordForgotten', 'SSL'));
}
}
示例13: execute
public static function execute(ApplicationAbstract $application)
{
$OSCOM_Service = Registry::get('Service');
$OSCOM_Breadcrumb = Registry::get('Breadcrumb');
$review_check = false;
if (is_numeric($_GET['View'])) {
if (Reviews::exists($_GET['View'])) {
$review_check = true;
Registry::set('Product', new Product(Reviews::getProductID($_GET['View'])));
$OSCOM_Product = Registry::get('Product');
$application->setPageTitle($OSCOM_Product->getTitle());
$application->setPageContent('reviews_view.php');
if ($OSCOM_Service->isStarted('Breadcrumb')) {
$OSCOM_Breadcrumb->add($OSCOM_Product->getTitle(), OSCOM::getLink(null, null, 'Reviews&View=' . $_GET['View'] . '&' . $OSCOM_Product->getKeyword()));
}
}
}
if ($review_check === false) {
$application->setPageContent('reviews_not_found.php');
}
}
示例14: execute
public static function execute(ApplicationAbstract $application)
{
$OSCOM_Customer = Registry::get('Customer');
$OSCOM_NavigationHistory = Registry::get('NavigationHistory');
$OSCOM_Service = Registry::get('Service');
$OSCOM_Breadcrumb = Registry::get('Breadcrumb');
$OSCOM_Template = Registry::get('Template');
if ($OSCOM_Customer->isLoggedOn() === false) {
$OSCOM_NavigationHistory->setSnapshot();
osc_redirect(OSCOM::getLink(null, null, 'LogIn', 'SSL'));
}
$application->setPageTitle(OSCOM::getDef('address_book_heading'));
$application->setPageContent('address_book.php');
if ($OSCOM_Service->isStarted('Breadcrumb')) {
$OSCOM_Breadcrumb->add(OSCOM::getDef('breadcrumb_address_book'), OSCOM::getLink(null, null, 'AddressBook', 'SSL'));
}
if ($OSCOM_Customer->hasDefaultAddress() === false) {
$application->setPageTitle(OSCOM::getDef('address_book_add_entry_heading'));
$application->setPageContent('address_book_process.php');
$OSCOM_Template->addJavascriptPhpFilename('includes/form_check.js.php');
}
}
示例15: execute
public static function execute(ApplicationAbstract $application)
{
$OSCOM_Service = Registry::get('Service');
$OSCOM_Breadcrumb = Registry::get('Breadcrumb');
if ($OSCOM_Service->isStarted('Reviews') === false) {
osc_redirect(OSCOM::getLink(null, OSCOM::getDefaultSiteApplication()));
}
$application->setPageTitle(OSCOM::getDef('reviews_heading'));
$application->setPageContent('reviews.php');
if ($OSCOM_Service->isStarted('Breadcrumb')) {
$OSCOM_Breadcrumb->add(OSCOM::getDef('breadcrumb_reviews'), OSCOM::getLink(null, null, 'Reviews'));
}
$requested_product = null;
$product_check = false;
if (count($_GET) > 2) {
$requested_product = basename(key(array_slice($_GET, 2, 1, true)));
if ($requested_product == OSCOM::getSiteApplication()) {
unset($requested_product);
if (count($_GET) > 3) {
$requested_product = basename(key(array_slice($_GET, 3, 1, true)));
}
}
}
if (isset($requested_product)) {
if (Product::checkEntry($requested_product)) {
$product_check = true;
Registry::set('Product', new Product($requested_product));
$OSCOM_Product = Registry::get('Product');
$application->setPageTitle($OSCOM_Product->getTitle());
$application->setPageContent('reviews_product.php');
if ($OSCOM_Service->isStarted('Breadcrumb')) {
$OSCOM_Breadcrumb->add($OSCOM_Product->getTitle(), OSCOM::getLink(null, null, 'Reviews&' . $OSCOM_Product->getKeyword()));
}
}
if ($product_check === false) {
$application->setPageContent('not_found.php');
}
}
}