示例#1
0
 public static function display()
 {
     $data = AFormatter::objectiveSettings(Applum::find(1));
     View::make('site/head/head');
     View::make("site/body/header/header");
     IntroController::intro($data);
     FeatureController::feature($data);
     AppController::app($data);
     SubscribeController::subscribe($data);
     GalleryController::gallery($data);
     TestimonialController::testimonial($data);
     PricingController::pricing($data);
     ContactController::contact($data);
     FooterController::footer($data);
 }
require_once 'Autoloader.php';
// handle GET requests for the backend
if ($_SERVER["REQUEST_METHOD"] == "GET") {
    if (isset($_GET["lang"])) {
        echo OutlineController::handleLanguageRequest();
    }
}
// handle POST requests for the backend
if ($_SERVER["REQUEST_METHOD"] == "POST") {
    // if a language change was posted, let a OutlineController instance handling it.
    if (isset($_POST["lang"])) {
        echo OutlineController::handleLanguageChange($_POST["lang"]);
    } else {
        if (isset($_POST["logout"])) {
            echo FooterController::logout();
        } else {
            if (isset($_POST["productId"]) && isset($_POST["command"])) {
                $id = intval($_POST["productId"]);
                $cmd = $_POST["command"];
                $data = isset($_POST["data"]) ? $_POST["data"] : null;
                switch ($cmd) {
                    case CartModel::CMD_ADD:
                        CartController::addById($id, $data);
                        break;
                    case CartModel::CMD_REMOVE:
                        CartController::removeById($id);
                        break;
                    default:
                        Logger::error("unknown command '" . $cmd . "' for cart received!");
                }
	/**
	 * @return OasisToolbarService
	 */
	protected function getToolbarService() {
		if (empty(self::$toolbarService)) {
			self::$toolbarService = new OasisToolbarService();
		}
		return self::$toolbarService;
	}
示例#4
0
 function _print_footer()
 {
     trace('Enter');
     $footer = new FooterController($this->api);
     $footer->show($this->get_current_forum_id());
     trace('Leave');
 }