<?
/*
--------------------------------------------------------------
FALCON v1.3.0 - Ultralight Content Managment (class version)
descrizione:
Si tratta di uno script leggero per la gestione di un mini
sito, senza l'uso di un database MySQL.
project chief: Carlo Antonio Denaro a.k.a. Blackout
blackout@...
project coder: Bogar Boris a.k.a. Eddie
eddie@...
web: www.promisestudios.net
--------------------------------------------------------------
*/
@ob_start();
class template {
////////////////////////////////
// Declare variabile
// -----------------------------
var $html;
var $list;
////////////////////////////////
// Get a specific template
// -----------------------------
function get_template ($skin){
$a = fopen("themes/$skin/index.htm", "r");
$this->html= fread($a, filesize("themes/$skin/index.htm"));
fclose($a);
unset($a);
}
/////////////////////////////////
// Retrieve list of all skins
// ------------------------------
function list_template ($folder){
if ($dp = opendir($folder)) {
while (($file = readdir($dp)) !== false)
if($file != "." && $file != ".." && is_dir($folder.$file)
== true){
$this->list[]=$file;
}
closedir($dp);
}
}
}
$falcon_skin= new template(); // Declare a template class
$falcon_skin->list_template("./themes/"); // Get list of template
/////////////////////////////////////////////////////
// Get a template
// --------------------------------------------------
// DEBUG : $falcon_skin->get_template("aqua");
// DEBUG : echo $falcon_skin->html;
// DEBUG : print_r($falcon_skin->list);
/////////////////////////////////////////////////////
// Print list of all template
// --------------------------------------------------
/*
foreach ($falcon_skin->list as $temp){
echo $temp."<br/>";
}
*/
/*
--------------------------------------------------------------
2004 (C) PROMISE STUDIOS www.promisestudios.net
--------------------------------------------------------------
*/
@ob_end_flush();
?>
--
ricordo che si tratta di sorgenti GPL, per critiche consigli e/o
commenti pastate pure