<?php

require_once 'config.php';

$products = getProductsArray();

$tmpl = startTemplate('index.tmpl');
$tmpl->setLoop('products', $products);

if (function_exists('onIndex'))
  call_user_func('onIndex', $tmpl, $products);

$tmpl->pparse();

?>