PHP Classes
elePHPant
Icontem

File: inc1.php

Recommend this page to a friend!
  Classes of Prakash Khanchandani  >  List processor  >  inc1.php  >  Download  
File: inc1.php
Role: Auxiliary script
Content type: text/plain
Description: html code for all examples
Class: List processor
List data from arrays in HTML tables
Author: By
Last change:
Date: 3 years ago
Size: 3,571 bytes
 

Contents

Class file image Download
<?php

/**
 * @author Prakash Khanchandani
 * @copyright 2013
 * @program inc1.php
 *
 * includes the html for all the demo programs
 */


$indexFlag = false;
$columnFlag = false;
$basicDemoFlag = false;
$self = strtolower($_SERVER['PHP_SELF']);
if (
strpos($self, 'basicdemo')) {
   
$basicDemoFlag = true;
   
$mainHead = 'List Processor 1.1 - Basic';
   
$prgLbl = 'basicDemo.php';
} elseif (
strpos($self, 'columntotals')) {
   
$columnFlag = true;
   
$mainHead = 'List Processor 1.1 - Generate COLUMN totals';
   
$prgLbl = 'columnTotals.php';
} elseif (
strpos($self, 'controldemo')) {
   
$mainHead = 'List Processor 1.1 - Generate CONTROL totals';
   
$prgLbl = 'controlDemo.php';
} elseif (
strpos($self, 'hyperdemo')) {
   
$mainHead = 'List Processor 1.1 - Generate hyper links';
   
$prgLbl = 'hyperDemo.php';
} elseif (
strpos($self, 'pagedemo')) {
   
$mainHead = 'List Processor 1.1 - Page by page listing';
   
$prgLbl = 'pageDemo.php';
} else {
   
$mainHead = 'List Processor 1.1';
   
$prgLbl = 'index.php';
   
$indexFlag = true;
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
    <meta name="author" content="Prakash Khanchandani">
    <title>list processor</title>
    <link rel="stylesheet" type="text/css" href="pmk.css">
</head>

<body>
    <div id="wrapper">
        <div id="lftHdr"></div>
        <div id="mdlHdr"><h1><?php echo $mainHead; ?></h1></div>
        <div id="rtHdr"></div>
        <div id="dummyClearDiv"></div>
        <div id="lftCol"><?php include "inc2.inc"; ?></div>
        <div id="mdlCol">
<?php
if ($indexFlag) {
?>
<div style="width:60%;">
                <ul>
                    <li>This version of the List Processor can generate column totals.</li>
                    <ul>
                        <li>You can generate totals of any column without defining controls.</li>
                        <li>The max variable has to be set to zero; that is, you have to display the full list.</li>
                        <li>All other variables are to be used as given in the earlier version.</li>
                    </ul>
                    <li>The css file has been cleaned up; it is now limited to the styles and classes used in the demo.</li>
                    <li>The HTML code has been shifted to a different file - the inc1.php file.</li>
                </ul>
            </div>
<?php
} else {
    if (
$basicDemoFlag)
        echo
'<h6>Display of all elements of a row</h6><br>';
    else
        if (
$columnFlag)
            echo
'<h6>Column totals</h6><br>';
    echo
$out;
    if (
$basicDemoFlag) {
        echo
'<br><br><h6>Suppessing branch and productType elements from the same list and changing to Thousands formatting</h6><br>';
        echo
$outShort;
    } else {
        if (
$columnFlag) {
            echo
'<br><br><h6>Column totals on a single, different column</h6><br>';
            echo
$outShort;
        }
    }
}
?>
</div>
        <div id="rtCol">
<?php
if ($indexFlag)
    echo
'The button images accompanying the demo set are by
            <a style="" href="http://www.iconarchive.com/artist/deleket.html" target="_blank">Deleket</a>'
;
else
    echo
'&nbsp;';
?>
</div>
        <div id="dummyClearDiv"></div>
        <div class="push"></div>
    </div>
    <div class="footer">
        <div style="float:left; width:33%; text-align:left;"><?php echo $prgLbl; ?></div>
        <div style="float:left; width:34%; text-align:center;">List Processor</div>
        <div style="float:left; width:33%; text-align:right;">Prakash Khanchandani</div>
    </div>
</body>
</html>