PHP Classes

File: example

Recommend this page to a friend!
  Classes of Mohammed Q. Hussain   Smarty Template Control   example   Download  
File: example
Role: Example script
Content type: text/plain
Description: example for class
Class: Smarty Template Control
Web interface to create and edit text files
Author: By
Last change: Small changes
Date: 19 years ago
Size: 763 bytes
 

Contents

Class file image Download
<?php

   
include('includes/STControl.php');

   
$STC = new STControl;

   
$STC->tdir = 'style/template/';
   
$STC->mainpath = 'test.php?action=index';
   
$STC->defualtex = '.tpl';

    if (empty(
$_GET['action'])) { $action = 'index'; }

    if (
$action == 'index')
        {
       
$STC->editpath = 'test.php?action=show';
       
$STC->GetTemplate();
    }

    if (
$_GET['action'] == 'show')
        {
       
$STC->starteditpath = 'test.php?action=startedit';
       
$STC->EditTemplate($D1);
    }

    if (
$_GET['action'] == 'startedit')
        {
       
$STC->StartEdit($S1);
    }

    if (
$_GET['action'] == 'add')
        {
       
$STC->addpath = 'test.php?action=startadd';
       
$STC->AddTemplate();
    }

    if (
$_GET['action'] == 'startadd')
        {
       
$STC->StartAdd();
    }

?>