includes/template.php
changeset 98 6457a9b983c6
parent 91 8079b0288e8e
child 102 d807dcd7aed7
equal deleted inserted replaced
97:293148ad7a70 98:6457a9b983c6
  1680       else $nq = $db->num_queries;
  1680       else $nq = $db->num_queries;
  1681       if($nq == 0) $nq = 'N/A';
  1681       if($nq == 0) $nq = 'N/A';
  1682       $dbg = 'Time: '.$f.'s  |  Queries: '.$nq;
  1682       $dbg = 'Time: '.$f.'s  |  Queries: '.$nq;
  1683       $t = $this->process_template('footer.tpl');
  1683       $t = $this->process_template('footer.tpl');
  1684       $t = str_replace('[[Stats]]', $dbg, $t);
  1684       $t = str_replace('[[Stats]]', $dbg, $t);
  1685       $t = str_replace('[[NumQueries]]', (string)$db->num_queries, $t);
  1685       if ( is_object($db) )
       
  1686       {
       
  1687         $t = str_replace('[[NumQueries]]', (string)$db->num_queries, $t);
       
  1688       }
       
  1689       else
       
  1690       {
       
  1691         $t = str_replace('[[NumQueries]]', '0', $t);
       
  1692       }
  1686       $t = str_replace('[[GenTime]]', (string)$f, $t);
  1693       $t = str_replace('[[GenTime]]', (string)$f, $t);
  1687       
  1694       
  1688       echo $t;
  1695       echo $t;
  1689     }
  1696     }
  1690     else return '';
  1697     else return '';