Login   Register  
PHP Classes
elePHPant
Icontem

File: ClassTestFile/testTemplateManagerDynamic.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Guerrieri Luca  >  PXAServer  >  ClassTestFile/testTemplateManagerDynamic.php  >  Download  
File: ClassTestFile/testTemplateManagerDynamic.php
Role: Example script
Content type: text/plain
Description: Test for Template Manager Class
Class: PXAServer
Library to build applications configured with XML
Author: By
Last change:
Date: 2007-03-16 14:15
Size: 777 bytes
 

Contents

Class file image Download
<?php
/*
 * File di test della classe Template Manager
 */
 //require ('../libreria/global.inc.php');
 
require ('../libreria/libfunz.inc.php');
 
 
$link=db_connect();
 
 
$Qm = new QueryManager;
 
$Qm ->set_query('Q_username');
 
$Qm ->set_placeholders(array('username'));        //imposto i nomi dei placeholders nella query come array
 
$Qm ->set_data(array('luca'));                //imposto i nomi delle variabili nella query come array
 
$Qr = new QueryResult($Qm ->get_dynamic_query(),"assoc",$link);    //rilascia un array con il risultato della query eseguita
 
$query_array $Qr-> result;
 
db_close($link);
 
$tm = new TemplateManager;
  echo 
"la query è : ".$Qm ->get_static_query();
 echo 
$tm->make_dynamic_template('template01','query1.tpl','query1.xml',$query_array);
?>