PHP Classes

File: fwphp/glomodul/z_examples/OOP/index.php

Recommend this page to a friend!
  Classes of Slavko Srakocic   B12 PHP FW   fwphp/glomodul/z_examples/OOP/index.php   Download  
File: fwphp/glomodul/z_examples/OOP/index.php
Role: Example script
Content type: text/plain
Description: Example script
Class: B12 PHP FW
Manage database records with a PDO CRUD interface
Author: By
Last change: Update of fwphp/glomodul/z_examples/OOP/index.php
Date: 1 year ago
Size: 652 bytes
 

Contents

Class file image Download
<?php
//s=script p=class script

require 'autoload_moj.php';

if (isset(
$_GET['s'])) {
 
$script = $_GET['s'];
  require
$script;
  exit;
}

 
$page='Page'; if (isset($_GET['p'])) { $page = $_GET['p']; }
 
$view = lcfirst($page).'_view.php';
 
 
//require($page.'.php'); // should be autoloader
 
 
$page_obj = new $page ; //eg new Page()
 
require($view); // assigns $page_obj->content, $page_obj->view_script
 
$page_obj->Display($view);
 
 
/*
  switch($page) //true
  {
    case 'ServicesPage': require(lcfirst($page).'_view.php'); // home page
    break; //return true

    default: require(lcfirst($page).'_view.php');
  }
  */
 
 
 
?>