<?php
/**
 * $Source: /home/cvs/nukescripts/googletapsg/GoogleTap_SG.php,v $
 * $Revision: 1.10 $
 * $Author: cyril $
 * $Date: 2006/03/16 19:28:15 $
 */
/************************************************************************/
/* Maximus CMS: Web Portal System                                       */
/* ==============================                                       */
/*                                                                      */
/* Copyright (c) 2002 - 2006                                            */
/* http://www.php-maximus.org                                           */
/* webmaster@nukescripts.fr                                             */
/* Cyril Levert www.nukescripts.fr                                      */
/* Support PHPNuke : www.nukescripts.fr                                 */
/* Support Maximus : www.php-maximus.org                                */
/*                                                                      */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License.       */
/************************************************************************/
/* Based on PHP-NUKE: Web Portal System                                 */
/************************************************************************/
defined('MAXIMUS') or die ('Access denied GoogleTap SG MAXIMUS directly...');

define ('GOOGLETAP_SG',true);

// GoogleTap SG - Second Generation by Cyril Levert www.nukescripts.fr
// Original version dedicate to Maximus Project      www.php-maximus.org
// GoogleTap SG is based on GoogleTap Project        www.nukecops.com

// Configuration: GoogleTap SG
$GTv2_Path   = './kernel/GoogleTap_SG';   // Path: Name of Directory to GoogleTap Files.
$GTv2_active = true;                      // true = active GoogleTap SG - false = deactive GoogleTap SG
$GTv2_pref   = 'GoogleTap_SG';            // You can customize this $var


function GTv2_header() {
global  $GTv2_active;

if ( $GTv2_active === true ) {
          ob_start();
	}
}

function GTv2_footer() {
global  $GTv2_active, $name, $GTv2_Path, $GTv2_pref;

if ( $GTv2_active === true ) {

if (file_exists("".$GTv2_Path."/url_".$name.".php")) {
	include_once("".$GTv2_Path."/url_".$name.".php");
	} else {
		include_once("".$GTv2_Path."/url.php");
}

          $getGTv2 = ob_get_contents();
          ob_end_clean();

if (file_exists("".$GTv2_Path."/url_blocks.php")) {
	include_once("".$GTv2_Path."/url_blocks.php");
}

$getGTv2     = preg_replace($urlin, $urlout, $getGTv2);
$RewriteGTv2 = preg_replace($urlin_blocks, $urlout_blocks, $getGTv2);

          echo $RewriteGTv2;
          return;

	}
}