Location: PHPKode > projects > Pratt Content-Management-System (CMS) > prattcms/variables/template.var.php

This file is (C) Copyright 2003 by the Pratt Museum and licensed under the GPL.
Please see the README for details.

File: $root/variables/template.var.php
Description: variables from the template table

//the query: select everything from the template table...
$sql_template = "SELECT * FROM template";

//run the query
$query_template = $db->getAll($sql_template);
//error handling again
if (DB::iserror($query_template)) {
	$error = new Error;

foreach ($query_template as $value) {
	$config['template'][$value[1]] = $value[2];

//include files...
$config['template']['bottom_include'] = $templates_dir . "/bottomofpage.inc.php";
$config['template']['contact_include'] = "contact.inc.php";
$config['template']['top_include'] = $templates_dir . "/topofpage.inc.php";
$config['bgcolor'] = $config['template']['bgcolor'];

Return current item: Pratt Content-Management-System (CMS)