includes/template.php
changeset 91 8079b0288e8e
parent 87 570f68c3fe36
child 98 6457a9b983c6
equal deleted inserted replaced
90:9d29f7e101d6 91:8079b0288e8e
   730       'ADMIN_SID_QUES'=>$asq,
   730       'ADMIN_SID_QUES'=>$asq,
   731       'ADMIN_SID_AMP'=>$asa,
   731       'ADMIN_SID_AMP'=>$asa,
   732       'ADMIN_SID_AMP_HTML'=>$ash,
   732       'ADMIN_SID_AMP_HTML'=>$ash,
   733       'ADMIN_SID_AUTO'=>$as2,
   733       'ADMIN_SID_AUTO'=>$as2,
   734       'ADDITIONAL_HEADERS'=>$this->additional_headers,
   734       'ADDITIONAL_HEADERS'=>$this->additional_headers,
   735       'COPYRIGHT'=>getConfig('copyright_notice'),
   735       'COPYRIGHT'=>RenderMan::parse_internal_links(getConfig('copyright_notice')),
   736       'TOOLBAR_EXTRAS'=>$this->toolbar_menu,
   736       'TOOLBAR_EXTRAS'=>$this->toolbar_menu,
   737       'REQUEST_URI'=>$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'],
   737       'REQUEST_URI'=>$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'],
   738       'STYLE_LINK'=>makeUrlNS('Special', 'CSS'.$p, null, true), //contentPath.$paths->nslist['Special'].'CSS' . $p,
   738       'STYLE_LINK'=>makeUrlNS('Special', 'CSS'.$p, null, true), //contentPath.$paths->nslist['Special'].'CSS' . $p,
   739       'LOGIN_LINK'=>$login_link,
   739       'LOGIN_LINK'=>$login_link,
   740       'LOGOUT_LINK'=>$logout_link,
   740       'LOGOUT_LINK'=>$logout_link,
  1670   function footer()
  1670   function footer()
  1671   {
  1671   {
  1672     global $db, $session, $paths, $template, $plugins; // Common objects
  1672     global $db, $session, $paths, $template, $plugins; // Common objects
  1673     if(!$this->no_headers) {
  1673     if(!$this->no_headers) {
  1674       global $_starttime;
  1674       global $_starttime;
       
  1675       
  1675       $f = microtime(true);
  1676       $f = microtime(true);
  1676       $f = $f - $_starttime;
  1677       $f = $f - $_starttime;
  1677       $f = round($f, 4);
  1678       $f = round($f, 4);
  1678       if(defined('IN_ENANO_INSTALL')) $nq = 'N/A';
  1679       if(defined('IN_ENANO_INSTALL')) $nq = 'N/A';
  1679       else $nq = $db->num_queries;
  1680       else $nq = $db->num_queries;
  1680       if($nq == 0) $nq = 'N/A';
  1681       if($nq == 0) $nq = 'N/A';
  1681       $dbg = 'Time: '.$f.'s  |  Queries: '.$nq;
  1682       $dbg = 'Time: '.$f.'s  |  Queries: '.$nq;
  1682       $t = $this->process_template('footer.tpl');
  1683       $t = $this->process_template('footer.tpl');
  1683       $t = str_replace('[[Stats]]', $dbg, $t);
  1684       $t = str_replace('[[Stats]]', $dbg, $t);
       
  1685       $t = str_replace('[[NumQueries]]', (string)$db->num_queries, $t);
       
  1686       $t = str_replace('[[GenTime]]', (string)$f, $t);
       
  1687       
  1684       echo $t;
  1688       echo $t;
  1685     }
  1689     }
  1686     else return '';
  1690     else return '';
  1687   }
  1691   }
  1688   function getHeader()
  1692   function getHeader()