<?php
//
// +---------------------------------------------------------------------------+
// | Nitro :: Module :: ExternalLink |
// +---------------------------------------------------------------------------+
// | Copyright (c) 2006 June Systems BV |
// +---------------------------------------------------------------------------+
// | This library is free software; you can redistribute it and/or modify it |
// | under the terms of the GNU Lesser General Public License as published by |
// | the Free Software Foundation; either version 2.1 of the License, or (at |
// | your option) any later version. |
// | |
// | This library is distributed in the hope that it will be useful, but |
// | WITHOUT ANY WARRANTY; without even the implied warranty of |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser |
// | General Public License for more details. |
// | |
// | You should have received a copy of the GNU Lesser General Public License |
// | along with this library; if not, write to the Free Software Foundation, |
// | Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
// +---------------------------------------------------------------------------+
// | Authors: Siggi Oskarsson <hide@address.com> |
// | Jesper Avot <hide@address.com |
// +---------------------------------------------------------------------------+
//
// $Id: ExternalLink.inc.php 229 2008-04-17 09:20:31Z oli $
//
// Nitro's default External Link handling class
//
/**
* This file contains the Nitro External link module
*
* @author Siggi Oskarsson
* @copyright June Systems BV, 2006
* @version $Revision: 1.4 $
* @package Modules
*/
/**
* Include prototype module class
*/
require_once "Nitro/Module.inc.php";
/**
* External link module class
*
* @package Modules
* @author Siggi Oskarsson <hide@address.com>
* @author Jesper Avot <hide@address.com>
* @copyright June Systems BV, 2006
* @access public
*/
class NitroModuleExternalLink extends NitroModule {
/**
* @var string Module ID string
*/
var $IDString = "NitroModuleExternalLink";
/**
* ExternalLink module constructor function
*
* @param string $ObjectID String with the current ObjectID
* @param mixed $Settings Array with the Module Settings, default is FALSE
* @access public
*/
function NitroModuleExternalLink($ObjectID, $Settings = FALSE)
{
/**
* Call the parent constructor
*/
parent::NitroModule();
/**
* Set ObjectID and ModuleSettings
*/
$this->ObjectID = $ObjectID;
$this->SetModuleSettings($Settings);
}
/**
* GetModuleDataConfiguration function
*
* @return array Array for the form libraries.
*/
function GetModuleDataConfiguration()
{
return Array( "URL" => "TEXT/LABEL=" . Language('External Link') );
}
/**
* Draw function
*/
function Draw()
{
if ($this->Settings["URL"]) {
$this->Sess->SaveToDisk();
Header("Location: " . $this->Settings["URL"]);
exit;
}
}
}
?>