All pastes #608532 Raw Edit

repo

public text v1 · immutable
·published 2007-07-08 11:25 UTC
rendered paste body
folderstructure
repo
	sources
	specs
	templates_c
	index.php
	index.tpl
	Smarty.class.php
	specFileParser.class.php
	
index.php:

<?php
/**
 * Reads specs folder and prints infos about packages
 *
 * @author	   Nicolas Christener <christener@gmail.com>
 * @copyright  Nicolas Christener, 2007
 * @license    GPL
 * @version    0.1
 */



	/**
	 * Initialize some smarty stuff
	 */
	require_once('Smarty.class.php');
	$smarty = new Smarty();
	$smarty->template_dir = 'templates/';
	$smarty->compile_dir = sprintf('%s/templates_c', ini_get('doc_root'));
	$smarty->caching = false;

	/**
	 * Initialize the parser object
	 */
	require_once('specFileParser.class.php');
	$mySpecFileParser = new specFileParser('specs/');
	$specInfos = $mySpecFileParser->getSpecInfos();

	$smarty->assign('specInfos', $specInfos);
	$smarty->display('index.tpl');