public function noPage()
 {
     include "core/lib/page.php";
     $p = new Page();
     $p->setupPage();
     $p->setContentTitle("Page Not Found - Error 404");
     $p->setContent(file_get_contents("core/fragments/404.phtml"));
     $p->displayPage();
 }
Example #2
0
                $context->setPageID("login");
                require_once './lib/Site/LoginBody.php';
                $pageBody = new LoginBody($context);
            } else {
                if ($context->getPageID() == "createInsertion") {
                    require_once './lib/Site/CreateInsertBody.php';
                    $pageBody = new CreateInsertBody($context);
                } else {
                    if ($context->getPageID() == "myInserts") {
                        require_once './lib/Site/MyInsertsBody.php';
                        $pageBody = new MyInsertsBody();
                    } else {
                        if ($context->getPageID() == "myAccount") {
                            require_once './lib/Site/MyAccountBody.php';
                            $pageBody = new MyAccountBody($context);
                        } else {
                            $context->setPageID("home");
                            require_once './lib/Site/HomeBody.php';
                            $pageBody = new HomeBody();
                        }
                    }
                }
            }
        }
    }
}
$pageNavigation = new StandardNavigation($context);
$layout = new StandardLayout($pageNavigation, $pageBody);
$page = new Page(0, $layout);
$page->displayPage();
Database::Close();
Example #3
0
<?php

session_start();
if (isset($_GET["product"])) {
    $product_id = $_GET["product"];
    //get prod id what was clicked on 'add to cart'
} else {
    $product_id = "";
}
/* idea is to make to options of using the cart:
		1. User not specified(not logged in). This guest user may add items to the cart during 
			browsing the website. For keeping truck of items added to the cart I think to use 
			the session variable(as the session starts when you open this website). At the end user 
			may buy items by completing appropriate form(after user went through the purchase it is offered 
			to make an account based on this purchase form).
		2. User is logged in. He can log in straight away or later(so this means what user may add items 
			to the cart before log in). When user log in, script checks in db for any previously added items
			and adds them to the current). On log off or closing the website(IF POSSIBLE) the final result of 
			items is saved to db.*/
include "mainPageClass.php";
$accountPage = new Page();
if (isset($_SESSION["activeUser"])) {
    $accountPage->content = "session: " . $_SESSION["activeUser"]["userEmail"];
} else {
    $accountPage->content = $product_id;
}
$accountPage->active = "Cart";
$accountPage->displayPage();
Example #4
0
<?php

session_start();
include "mainPageClass.php";
$deliveryPage = new Page();
if (isset($_SESSION["activeUser"])) {
    $deliveryPage->content = "session: " . $_SESSION["activeUser"]["userEmail"];
}
$deliveryPage->active = "Delivery";
$deliveryPage->displayPage();