<?php
include('../simplate.class.php');
/**
* Creates a new template for the user's profile.
* Fills it with mockup data just for testing.
*/
$user_tpl = new Simplate('templates/', 'user_profile.tpl');
$user_tpl->username = 'KingSlayer';
$user_tpl->image_url = 'images/koala.jpg';
$user_tpl->firstname = 'Jamie';
$user_tpl->lastname = 'Lanister';
$user_tpl->email = 'kslayer@thelanisters.com';
/**
* Loads our layout template, settings its title and content.
*/
$main_tpl = new Simplate('templates/', 'layout.tpl');
$main_tpl->title = $user_tpl->username. '\'s profile';
$main_tpl->content = $user_tpl->parse();
/**
* Outputs the page with the user's profile.
*/
echo $main_tpl->parse();
?>
|