PHP Classes

File: preproc.php

Recommend this page to a friend!
  Classes of Dave Smith   Amp Frame   preproc.php   Download  
File: preproc.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: Amp Frame
MVC framework for developing Web applications
Author: By
Last change:
Date: 5 years ago
Size: 878 bytes
 

Contents

Class file image Download
<?php
/*
AMP Frame ver 1.0.1
preproc.php
Pre Process Scripting
*/
if( !defined('AFALLOW') ){
    die(
'direct access not allowed');
}

//*start the session*//
if( empty( session_id() ) ){
   
session_start();
}

//*manually set script root*//
#define('AFROOT', '/');

//*START Global Functions*//
function returnMenuLink( $route=null, $control=null, $kvp=null ){

   
$return = AFURL;
    if(
AFCLEANURL ){
       
$return .= ( empty($route) ) ? '' : $route.'/';
       
$return .= ( empty($control) ) ? '' : $control.'/';
       
$return .= ( empty($kvp) ) ? '' : '?'.$kvp;
    }else{
       
$return .= ( empty($route) ) ? '' : '?'.AFROUTE.'='.$route;
       
$return .= ( empty($control) ) ? '' : '&'.AFCONTROL.'='.$control;
       
$return .= ( empty($kvp) ) ? '' : '&'.$kvp;
    }

    return
$return;

}
//*END Global Functions*//

?>