Example #1
0
<?php

error_reporting(0);
include '../config/conn.php';
include '../functions/preload.php';
include '../functions/data.php';
$path = parse_path();
if (!isset($path['call_parts'][0]) || $path['call_parts'][0] == '') {
    $screen = 'default';
} else {
    $screen = $path['call_parts'][0];
}
$s = data_screen($dbc, $screen);
?>
<!doctype html>
<html>
<head>
  
  <!-- Meta Data -->
  <meta charset="utf-8">
  <meta http-equiv="x-ua-compatible" content="ie=edge" />
  <meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1" />
  
  <meta name="description" content="">
  <!-- END Meta Data -->

  <title>Presenter 0.1</title> 
  <link rel="icon" type="image/png" href="../logo.png">
  <!-- Google Web Fonts -->
  <link rel="stylesheet" type="text/css" href='http://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,700,800,600,300'>
  
Example #2
0
// Database Connections.
include 'functions/preload.php';
// Functions needed to initialize.
include 'config/global.php';
// Constants
$path = parse_path();
############################################################
## Site Functions
############################################################
include 'functions/tools.php';
// Utility Functions.
include 'functions/data.php';
// Data Functions.
include 'functions/sandbox.php';
// Sandbox Functions (yet to be organized).
############################################################
## Page Initialization
############################################################
if (!isset($path['call_parts'][0]) || $path['call_parts'][0] == '') {
    //$path['call_parts'][0] = 'home'; // Set $path[call_parts][0] to equal the value given in the URL
    header('Location: home');
    $view = 'home';
} else {
    $view = $path['call_parts'][0];
}
if (!isset($path['call_parts'][1]) || $path['call_parts'][1] == '') {
    $screen = data_screen($dbc, 'default');
} else {
    $screen = data_screen($dbc, $path['call_parts'][1]);
}
$screens = data_screens($dbc);