<?php
// check tha vars passed back from the rendered appl page
// These control the content for this instance of the script/application
if(isset($id)){ // link clicked for an individual data record
$cacheid = "contactsid$id";
$cachesecs = $idsecs = 180;
}elseif(isset($letter) ){ // link clicked to view a subset/categ of data
$cacheid = "contactsletter$letter";
$cachesecs = 80;
$pagelabel = "The $letter's ";
}else{
$cacheid = "contactsall"; // DEFAULT show all for default view
$cachesecs = 0;
$pagelabel = "All contacts ";
}
$TBS = new clsTinyButStrong ;
//$TBS->LoadTemplate('basic_page2.html') ;
$TBS->LoadTemplate(basename($_SERVER['SCRIPT_NAME'], ".php").".html") ;
//$TBS->Render(TBS_NOTHING);
// == here's the tricky bit ==
// Creating different cache files based on vars above
if (!$TBS->CacheAction($cacheid, $cachesecs)) { // to check cache
// do all the sql and merges here
$TBS->Show
} // end the if(cache) test
?>
|