index.php
<?php
require('libs/Smarty.class.php');
require('cfg.php');
$smarty = new Smarty;
$_GET['id'];
$smarty->assign("site", $_GET['id']);
$smarty->display('index.tpl');
?>
index.tpl
<!doctype html public "-//w3c//dtd html 4.01 transitional//en">
<meta http-equiv="content-type" content="text/html; charset=utf-8"> <meta name="generator" content="pspad editor, www.pspad.com"> <link rel="stylesheet" type="text/css" href="templates/style.css" /> {include_php file="login.php"}
<div style="padding-left: 35px;"> <table cellspacing="0" cellpadding="0"><tr> <td><a href="index.php?id=news"><img border="0" src="templates/images/aktualnosci.jpg"></a></td><td><img border="0" src="templates/images/kreska.jpg"></td> <td><a href="index.php?id=comments"><img border="0" src="templates/images/multimedia.jpg"></a></td><td><img border="0" src="templates/images/kreska.jpg"></td> <td><a href="#"><img border="0" src="templates/images/download.jpg"></a></td><td><img border="0" src="templates/images/kreska.jpg"></td> <td><a href="#"><img border="0" src="templates/images/artykuly.jpg"></a></td><td><img border="0" src="templates/images/kreska.jpg"></td> <td><a href="#"><img border="0" src="templates/images/forum.jpg"></a></td><td><img border="0" src="templates/images/kreska.jpg"></td> <td><a href="#"><img border="0" src="templates/images/faq.jpg"></a></td><td><img border="0" src="templates/images/kreska.jpg"></td> <td><a href="#"><img border="0" src="templates/images/kontakt.jpg"></a></td>
{if $site ==""}
{$site}
zmienna site jest pusta
{include_php file="news.php"}
{/if}
{if $site !=""}
{$site}
zmienna site posiada wartosc
{include_php file="`$site`.php"}
{/if}