[ Index ]

PHP Cross Reference of Nuke-Evolution v2.0.5

title

Body

[close]

/includes/ -> meta.php (source)

   1  <?php
   2  /*=======================================================================
   3   Nuke-Evolution Basic: Enhanced PHP-Nuke Web Portal System
   4   =======================================================================*/
   5  
   6  /************************************************************************/
   7  /* PHP-NUKE: Web Portal System                                          */
   8  /* ===========================                                          */
   9  /*                                                                      */
  10  /* Copyright (c) 2002 by Francisco Burzi                                */
  11  /* http://phpnuke.org                                                   */
  12  /*                                                                      */
  13  /* This program is free software. You can redistribute it and/or modify */
  14  /* it under the terms of the GNU General Public License as published by */
  15  /* the Free Software Foundation; either version 2 of the License.       */
  16  /************************************************************************/
  17  
  18  /*****[CHANGES]**********************************************************
  19  -=[Base]=-
  20        Nuke Patched                             v3.1.0       06/26/2005
  21        Caching System                           v1.0.0       11/19/2005
  22   ************************************************************************/
  23  
  24  if (!defined('NUKE_EVO')) {
  25      die("You can't access this file directly...");
  26  }
  27  
  28  global $db, $prefix, $cache;
  29  
  30  ##################################################
  31  # Load dynamic meta tags from database           #
  32  ##################################################
  33  
  34  /*****[BEGIN]******************************************
  35   [ Base:    Caching System                     v3.0.0 ]
  36   ******************************************************/
  37  if(($metatags = $cache->load('metatags', 'config')) === false) {
  38  /*****[END]********************************************
  39   [ Base:    Caching System                     v3.0.0 ]
  40   ******************************************************/
  41    $metatags = array();
  42    $sql = 'SELECT meta_name, meta_content FROM '.$prefix.'_meta';
  43    $result = $db->sql_query($sql, true);
  44    $i=0;
  45    while(list($meta_name, $meta_content) = $db->sql_fetchrow($result, SQL_NUM)) {
  46        $metatags[$i] = array();
  47        $metatags[$i]['meta_name'] = $meta_name;
  48        $metatags[$i]['meta_content'] = $meta_content;
  49        $i++;
  50    }
  51    unset($i);
  52    $db->sql_freeresult($result);
  53  /*****[BEGIN]******************************************
  54   [ Base:    Caching System                     v3.0.0 ]
  55   ******************************************************/
  56    $cache->save('metatags', 'config', $metatags);
  57  }
  58  /*****[END]********************************************
  59   [ Base:    Caching System                     v3.0.0 ]
  60   ******************************************************/
  61  
  62  ##################################################
  63  # Finally output the meta tags                   #
  64  ##################################################
  65  
  66  $metastring = "<meta http-equiv=\"Content-Type\" content=\"text/html; charset="._CHARSET."\">\n";
  67  $metastring .= "<meta http-equiv=\"Content-Language\" content=\""._LANGCODE."\">\n";
  68  
  69  for($i=0,$j=count($metatags);$i<$j;$i++) {
  70      $metatag = $metatags[$i];
  71      $metastring .= "<meta name=\"".$metatag['meta_name']."\" content=\"".$metatag['meta_content']."\">\n";
  72  }
  73  
  74  ###############################################
  75  # DO NOT REMOVE THE FOLLOWING COPYRIGHT LINE! #
  76  # YOU'RE NOT ALLOWED TO REMOVE NOR EDIT THIS. #
  77  ###############################################
  78  
  79  // IF YOU REALLY NEED TO REMOVE IT AND HAVE MY WRITTEN AUTHORIZATION CHECK: http://phpnuke.org/modules.php?name=Commercial_License
  80  // PLAY FAIR AND SUPPORT THE DEVELOPMENT, PLEASE!
  81  $metastring .= "<meta name=\"generator\" content=\"PHP-Nuke Copyright (c) 2006 by Francisco Burzi. This is free software, and you may redistribute it under the GPL (http://phpnuke.org/files/gpl.txt). PHP-Nuke comes with absolutely no warranty, for details, see the license (http://phpnuke.org/files/gpl.txt). Powered by Nuke-Evolution (http://www.nuke-evolution.com).\">\n";
  82  
  83  echo $metastring;
  84  
  85  ?>


Generated: Wed Jun 6 11:38:01 2007 Cross-referenced by PHPXref 0.7