コード例 #1
0
ファイル: blog.php プロジェクト: adilbk/youp
 public function post($id = NULL)
 {
     // Getting data
     $website = WebsiteManagement::get_website();
     $menu = PageManagement::get_pages();
     $post = BlogManagement::get_post($id);
     $this->load->view('front/header', array('website' => $website));
     $this->load->view('front/blog_post', array('menu' => $menu, 'post' => $post));
     $this->load->view('front/footer', array('website' => $website));
 }
コード例 #2
0
ファイル: portfolio.php プロジェクト: adilbk/youp
 public function index()
 {
     // Getting data
     $website = WebsiteManagement::get_website();
     $menu = PageManagement::get_pages();
     $portfolio = PortfolioManagement::get_portfolio();
     PageManagement::add_visit(3);
     $this->load->view('front/header', array('website' => $website));
     $this->load->view('front/portfolio_content', array('website' => $website, 'menu' => $menu, 'portfolio' => $portfolio));
     $this->load->view('front/footer', array('website' => $website));
 }
コード例 #3
0
ファイル: Contact.php プロジェクト: adilbk/youp
 public function index()
 {
     // Getting data
     $website = WebsiteManagement::get_website();
     $menu = PageManagement::get_pages();
     PageManagement::add_visit(5);
     $this->load->view('front/header', array('website' => $website));
     $this->load->view('front/menu', array('menu' => $menu));
     $this->load->view('front/contact_content', array());
     $this->load->view('front/footer', array('website' => $website));
 }
コード例 #4
0
ファイル: Who_are_we.php プロジェクト: adilbk/youp
 public function index()
 {
     // Getting data
     $website = WebsiteManagement::get_website();
     $menu = PageManagement::get_pages();
     $slider = SliderManagement::get_slider();
     PageManagement::add_visit(2);
     $this->load->view('front/header', array('website' => $website));
     $this->load->view('front/menu', array('menu' => $menu));
     $this->load->view('front/who_are_we', array('website' => $website));
     $this->load->view('front/footer', array('website' => $website));
 }
コード例 #5
0
ファイル: handler.php プロジェクト: karbassi/Page-Management
<?php

session_start();
// Stop any calls not from the main page.
if (empty($_REQUEST)) {
    header("Location: ./");
    exit;
}
// Load PageManagement Class.
require_once 'lib/pm.php';
// Create a new PageManagement instance.
$pm = new PageManagement();
// Handle which function gets called.
switch ($_REQUEST['func']) {
    case 'post':
        // Make sure you're not trying to create when you want to update.
        if (!empty($_POST['id'])) {
            $_REQUEST['func'] = 'update';
            // break;
        } else {
            unset($_POST['func']);
            $id = $pm->postNewContent($_POST);
            if ($id) {
                $message = "Content create.";
            } else {
                $message = "Content NOT created. Try again in a few minutes.";
            }
            echo json_encode(array("id" => $id, "message" => $message));
            break;
        }
    case 'update':