<?php

/**
* @version 2.6.7
* @package Joomla 1.5
* @subpackage DT Register
* @copyright Copyright (C) 2006 DTH Development
* @copyright contact dthdev@dthdevelopment.com
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
*/
    global $xhtml_url , $amp, $DT_CONFIG ,  $configpass;
	
	if($configpass !==1){
	  $configpass = 0 ;
	}
	$xhtml_url = false ;
	$amp = $xhtml_url?'&amp;':'&' ;
	$database = &JFactory::getDBO();
    //$configpass = 0 ;
	if($configpass===0){
	  $sql="Select id , config_key,config_value From #__dtregister_config";

		$database->setQuery($sql);
		
		//echo  "<br />".$database->getQuery();
	
		$rowConfigs=$database->loadObjectList();
		
		foreach($rowConfigs as $dconfig){
		   $DT_CONFIG[$dconfig->config_key] = $dconfig ;
		} 
		
		$configpass = 1 ;
	}else{
	   $rowConfigs  = $DT_CONFIG ;
	 
	}
	
	foreach($rowConfigs  as $rowConfig)

	{

		//$rowConfig=$rowConfigs[$i];

		$name=$rowConfig->config_key;

		$value=$rowConfig->config_value;

        $str = " global \$".$name.";";

		 eval($str);

		//Set the name

      // echo "<br />".$name;
 
        if(!isset($$name) && $$name==""){

		  $$name=$value;
		  
		 }

	}
   
  global $sign_up_redirect , $Itemid ; 
if($private_event_notification=='redirect'){
   $sign_up_redirect = $private_event_redirect;
}else{
   $sign_up_redirect = "index.php?option=com_dtregister&Itemid=$Itemid&task=sign_up";
}

?>