<?php

/**
* @version 2.8.10
* @package Joomla 2.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 $DT_config;
 
 $config = $this->getModel('config');

 $jomsocial = $this->getModel('jomsocial');

 $currency= $this->getModel('currency');

 $dateformat=&$this->getModel('dateformat');

 $buttoncolor=&$this->getModel('buttoncolor');

 ?>

 <table class="adminlist" width="100%" cellpadding="10" cellspacing="10">

    <tr align="center" valign="middle">
	
	    <td align="left" valign="top"><strong><?php echo JText::_( 'DT_PROFILE_INTEGRATION' );?>:</strong></td>

		<td align="left" valign="top">

				<?php

						$options=array();

						$options[]=JHTML::_('select.option', '0', JText::_( 'DT_NO' ));

						$options[]=JHTML::_('select.option', '1', JText::_( 'DT_COMMUNITY_BUILDER' ));

						if($jomsocial->jomsocialInstall()){

							$options[]=JHTML::_('select.option', '2', JText::_( 'DT_JOMSOCIAL' ));

							}elseif($config->getGlobal('cb_integrated')==2){

								$cb_integrated = 0;

							}  

							echo JHTML::_('select.genericlist', $options,'config[cb_integrated]',"class = 'inputbox'",'value','text',$config->getGlobal('cb_integrated'));

						?>

		</td>

		<td align="center"><?php echo JHTML::tooltip((JText::_( 'DT_PROFILE_INTEGRATION_HELP' )), '', 'tooltip.png', '', '');?> </td>
								
	</tr>

    <tr>

		<td align="left" valign="top"><strong><?php echo JText::_( 'DT_CB_VIEW_ONLY' );?>:</strong></td>

        <td>

           <?php

					$options=array();

					$options[]=JHTML::_('select.option', '0', JText::_( 'DT_NO' ));

					$options[]=JHTML::_('select.option', '1', JText::_( 'DT_YES' ));

					echo JHTML::_('select.genericlist', $options,'config[cbviewonly]',"class = 'inputbox'",'value','text',$config->getGlobal('cbviewonly'));

			?>

		</td>

		<td align="center"><?php echo JHTML::tooltip((JText::_( 'DT_CB_VIEW_ONLY_HELP' )), '', 'tooltip.png', '', ''); ?> </td>

	</tr>
    
     <tr>

		<td align="left" valign="top"><strong><?php echo JText::_( 'DT_TAX_EXEMPTION' );?>:</strong></td>

        <td>

           <?php
		   

					$options=array();

					$options[]=JHTML::_('select.option', '0', JText::_( 'DT_NO' ));

					$options[]=JHTML::_('select.option', '1', JText::_( 'DT_YES' ));

					echo JHTML::_('select.genericlist', $options,'config[tax_exemption]',"class = 'inputbox'",'value','text',$config->getGlobal('tax_exemption',0));

			?>

		</td>

		<td align="center"><?php echo JHTML::tooltip((JText::_( 'DT_TAX_EXEMPTION_HELP' )), '', 'tooltip.png', '', ''); ?> </td>

	</tr>
    
    <tr>

		<td align="left" valign="top"><strong><?php echo JText::_( 'DT_DEFAULT_GROUP' );?>:</strong></td>

        <td>

           <?php

					$options= TableJUser::getUserGroupOptions();
					echo JHTML::_('select.genericlist', $options,'config[default_group][]',"class = 'inputbox' multiple",'value','text',$config->getGlobal('default_group'));

			?>

		</td>

		<td align="center"><?php echo JHTML::tooltip((JText::_( 'DT_DEFAULT_GROUP_HELP' )), '', 'tooltip.png', '', ''); ?> </td>

	</tr>
    
	<tr align="center" valign="middle">

	    <td align="left" valign="top"><strong><?php echo JText::_( 'DT_SAVE_PAYMENT_INFO' );?>:</strong></td>

		<td align="left" valign="top">

			<?php

					$options=array();

					$options[]=JHTML::_('select.option', '0', JText::_( 'DT_NO' ));

					$options[]=JHTML::_('select.option', '1', JText::_( 'DT_YES' ));

					echo JHTML::_('select.genericlist', $options,'config[save_payment_info]',"class = 'inputbox'",'value','text',$config->getGlobal('save_payment_info'));

			?>

		</td>

		<td align="center"><?php echo JHTML::tooltip((JText::_( 'DT_SAVE_PAYMENT_INFO_TIP' )), '', 'tooltip.png', '', ''); ?> </td>

	</tr>

    <tr>

		<td align="left" valign="top"><strong><?php echo JText::_( 'DT_PRIVATE_EVENT_NOTIFICATION' );?>:</strong></td>

        <td>

             <?php

					$options=array();

                    $options[]=JHTML::_('select.option', 'onscreen', JText::_( 'DT_ONSCREEN' ));

					$options[]=JHTML::_('select.option', 'redirect', JText::_( 'DT_REDIRECT' ));

					echo JHTML::_('select.genericlist', $options,'config[private_event_notification]',"class = 'inputbox'",'value','text',$config->getGlobal('private_event_notification'));

			  ?>

		</td>

		<td align="center"><?php echo JHTML::tooltip((JText::_( 'DT_PRIVATE_EVENT_NOTIFICATION_HELP' )), '', 'tooltip.png', '', ''); ?> </td>

	</tr>

    <tr>

		<td align="left" valign="top"><strong><?php echo JText::_( 'DT_PRIVATE_EVENT_REDIRECT' );?>:</strong></td>

        <td>

                 <input class="inputbox" name="config[private_event_redirect]" id="private_event_redirect" value="<?php echo $config->getGlobal('private_event_redirect'); ?>" size="40" type="text" />

		</td>

		<td align="center"><?php echo JHTML::tooltip((JText::_( 'DT_PRIVATE_EVENT_REDIRECT_HELP' )), '', 'tooltip.png', '', ''); ?> </td>

	</tr>

        <?php

                    $status_options = array();	

	                $status_options[] = JHTML::_('select.option', 1, JText::_('DT_ACTIVE'));

	                $status_options[] = JHTML::_('select.option', -1, JText::_('DT_CANCELLED'));

	                $status_options[] = JHTML::_('select.option', 0, JText::_('DT_PENDING'));

	   ?>

   <tr>

		<td align="left" valign="top"><strong><?php echo JText::_( 'DT_PAID_DEFAULT_STATUS' );?>:</strong></td>

        <td>

            <?php			  

                echo JHTML::_('select.genericlist', $status_options,'config[paid_default_status]',"class = 'inputbox'", 'value','text',$config->getGlobal('paid_default_status'));

				  ?>

		</td>

		<td align="center"><?php echo JHTML::tooltip((JText::_( 'DT_PAID_DEFAULT_STATUS_HELP' )), '', 'tooltip.png', '', ''); ?> </td>

	</tr>

    <tr>

		<td align="left" valign="top"><strong><?php echo JText::_( 'DT_PARTIAL_DEFAULT_STATUS' );?>:</strong></td>

        <td>

                  <?php

                 echo JHTML::_('select.genericlist', $status_options,'config[partial_default_status]',"class = 'inputbox'", 'value','text',$config->getGlobal('partial_default_status'));

				  ?>

		</td>

		<td align="center"><?php echo JHTML::tooltip((JText::_( 'DT_PARTIAL_DEFAULT_STATUS_HELP' )), '', 'tooltip.png', '', ''); ?> </td>

     </tr>

     <tr>

		<td align="left" valign="top"><strong><?php echo JText::_( 'DT_PAYLATER_DEFAULT_STATUS' );?>:</strong></td>

        <td>

            <?php

				$paylater_default_status = (!isset($paylater_default_status))?0:$paylater_default_status;

                echo JHTML::_('select.genericlist', $status_options,'config[paylater_default_status]',"class = 'inputbox'", 'value','text',$config->getGlobal('paylater_default_status'));

		    ?>

		</td>

		<td align="center"><?php echo JHTML::tooltip((JText::_( 'DT_PAYLATER_DEFAULT_STATUS_HELP' )), '', 'tooltip.png', '', ''); ?> </td>

	</tr>
			
	<tr>
		<td align="left" valign="top"><strong><?php echo JText::_( 'DT_MULTI_EVENT_CART_OPTION' );?>:</strong></td>
		<td>
			<?php
				$options=array();
				$options[]=JHTML::_('select.option', '0', JText::_( 'DT_DISABLE' ));
				$options[]=JHTML::_('select.option', '1', JText::_( 'DT_ENABLE' ));
			    echo JHTML::_('select.genericlist', $options,'config[disable_cart]',"class = 'inputbox'",'value','text',$config->getGlobal('disable_cart'));
			?>
		</td>
	    <td align="center"><?php echo JHTML::tooltip((JText::_( 'DT_MULTI_EVENT_CART_OPTION_HELP' )), '', 'tooltip.png', '', ''); ?> </td>
	</tr>

    <tr>
		<td align="left" valign="top"><strong><?php echo JText::_( 'DT_MINIMUM_CART_EVENT' );?>:</strong></td>
         <td>
				<input type="text" id="minimum_cart_event" size="5" name="config[minimum_cart_event]" value="<?php echo $config->getGlobal('minimum_cart_event',0); ?>" />
        </td>
		<td align="center"><?php echo JHTML::tooltip((JText::_( 'DT_MINIMUM_CART_EVENT_HELP' )), '', 'tooltip.png', '', ''); ?> </td>
	</tr>
     <tr>
				<td align="left" valign="top"><strong><?php echo JText::_( 'DT_MAXIMUM_CART_EVENT' );?>:</strong></td>
		         <td>
						<input type="text" id="maximum_cart_event" size="5" name="config[maximum_cart_event]" value="<?php echo $config->getGlobal('maximum_cart_event'); ?>" />
		        </td>
				<td align="center"><?php echo JHTML::tooltip((JText::_( 'DT_MAXIMUM_CART_EVENT_HELP' )), '', 'tooltip.png', '', ''); ?> </td>
			</tr>
    <tr>

		<td align="left" valign="top"><strong><?php echo JText::_( 'DT_CONFIRM_NUMBER_TYPE' );?>:</strong></td>

        <td>

             <?php

				$confirm_number_type = (!isset($confirm_number_type))?'random':$confirm_number_type ;

				$confirm_number_type_options = array();

				$confirm_number_type_options[] = JHTML::_('select.option', 'random', JText::_('DT_RANDOM'));

				$confirm_number_type_options[] = JHTML::_('select.option', 'sequential', JText::_('DT_SEQUENTIAL'));

                echo JHTML::_('select.genericlist', $confirm_number_type_options,'config[confirm_number_type]',"class = 'inputbox'", 'value','text',$config->getGlobal('confirm_number_type'));

			?>

		</td>

		<td align="center"><?php echo JHTML::tooltip((JText::_( 'DT_CONFIRM_NUMBER_TYPE_HELP' )), '', 'tooltip.png', '', ''); ?> </td>

	</tr>

    <tr>

		<td align="left" valign="top"><strong><?php echo JText::_( 'DT_CONFIRM_NUMBER_PREFIX' );?>:</strong></td>

        <td>

                  <?php $confirm_number_prefix = (!isset($confirm_number_prefix))?'':$confirm_number_prefix; ?>

                   <input type="text" id="confirm_number_prefix" name="config[confirm_number_prefix]" value="<?php echo $config->getGlobal('confirm_number_prefix'); ?>" />

		</td>

		<td align="center"><?php echo JHTML::tooltip((JText::_( 'DT_CONFIRM_NUMBER_PREFIX_HELP' )), '', 'tooltip.png', '', ''); ?> </td>

	</tr>

    <tr>

		<td align="left" valign="top"><strong><?php echo JText::_( 'DT_CONFIRM_NUMBER_START' );?>:</strong></td>

        <td>

            <?php $confirm_number_start = (!isset($confirm_number_start))?'':$confirm_number_start;

			?>

            <input type="text" name="config[confirm_number_start]" id="confirm_number_start" value="<?php echo $config->getGlobal('confirm_number_start') ; ?>" />

		</td>

		<td align="center"><?php echo JHTML::tooltip((JText::_( 'DT_CONFIRM_NUMBER_START_HELP' )), '', 'tooltip.png', '', ''); ?> </td>

	</tr>
<tr>
      <td><strong><?php echo JText::_( 'DT_CONFIRM_NUMBER_MEMBER' );?>:</strong></td>
      <td>
      		 <?php

			 $options=array();

			 $options[]=JHTML::_('select.option', '0', JText::_( 'DT_NO' ));

			 $options[]=JHTML::_('select.option', '1', JText::_( 'DT_YES' ));

			 echo JHTML::_('select.genericlist', $options,'config[member_confirmnum]','','value','text',$config->getGlobal('member_confirmnum',0));

			 ?>
</td>
      <td align="center"><?php echo JHTML::tooltip((JText::_( 'DT_CONFIRM_NUMBER_MEMBER_HELP' )), '', 'tooltip.png', '', ''); ?> </td>
    </tr>
    <tr>

		<td align="left" valign="top"><strong><?php echo JText::_( 'DT_CSV_SEPARATOR' );?>:</strong></td>

        <td>         

             <input type="text" name="config[csv_separator]" id="csv_separator" size="5" value="<?php echo $config->getGlobal('csv_separator',','); ?>" />

		</td>

		<td align="center"><?php echo JHTML::tooltip((JText::_( 'DT_CSV_SEPARATOR_HELP' )), '', 'tooltip.png', '', ''); ?> </td>

	</tr>
				
	<tr align="center" valign="middle">
		
		  <td align="left" valign="top"><strong><?php echo JText::_( 'DT_REGISTERED_PREVENT_DUPLICATION' );?>:</strong></td>

          <td align="left" valign="top">

			<?php

					$options=array();

				    $options[]=JHTML::_('select.option', '0', JText::_( 'DT_NO' ));

					$options[]=JHTML::_('select.option', '1', JText::_( 'DT_YES' ));

					echo JHTML::_('select.genericlist', $options,'config[prevent_duplication]',"class = 'inputbox'",'value','text',$config->getGlobal('prevent_duplication'));

			?>

		</td>

		<td align="center"><?php echo JHTML::tooltip((JText::_( 'DT_REGISTERED_PREVENT_DUPLICATION_HELP' )), '', 'tooltip.png', '', '');?> </td>

	</tr>
						
	<tr>

		<td align="left" valign="top"><strong><?php echo JText::_( 'DT_TIME_CHECK' );?>:</strong></td>

        <td>

             <?php

				$options=array();

				$options[]=JHTML::_('select.option', '0', JText::_( 'DT_NO' ));

				$options[]=JHTML::_('select.option', '1', JText::_( 'DT_YES' ));

				echo JHTML::_('select.genericlist', $options,'config[timecheck]',"class = 'inputbox'",'value','text',$config->getGlobal('timecheck'));

			  ?>

		</td>

		<td align="center"><?php echo JHTML::tooltip((JText::_( 'DT_TIME_CHECK_HELP' )), '', 'tooltip.png', '', ''); ?> </td>

	</tr>

    <tr>

        <td align="left" valign="top"><strong><?php echo JText::_( 'DT_PREREQUISITE_PAID' );?>:</strong></td>

        <td>

             <?php

				$options=array();

				$options[]=JHTML::_('select.option', '0', JText::_( 'DT_NO' ));

				$options[]=JHTML::_('select.option', '1', JText::_( 'DT_YES' ));

				echo JHTML::_('select.genericlist', $options,'config[prerequisite_paid]',"class = 'inputbox'",'value','text',$config->getGlobal('prerequisite_paid'));

			?>

		</td>

	    <td align="center"><?php echo JHTML::tooltip((JText::_( 'DT_PREREQUISITE_PAID_HELP' )), '', 'tooltip.png', '', ''); ?> </td>

	</tr>

	<tr>

	   <td align="left" valign="top"><strong><?php echo JText::_( 'DT_PREREQUISITE_ATTEND' );?>:</strong></td>

       <td>

            <?php

			$options=array();

			$options[]=JHTML::_('select.option', '0', JText::_( 'DT_NO' ));

			$options[]=JHTML::_('select.option', '1', JText::_( 'DT_YES' ));

			echo JHTML::_('select.genericlist', $options,'config[prerequisite_attend]',"class = 'inputbox'",'value','text',$config->getGlobal('prerequisite_attend'));

			?>

		</td>

		<td align="center"><?php echo JHTML::tooltip((JText::_( 'DT_PREREQUISITE_ATTEND_HELP' )), '', 'tooltip.png', '', ''); ?> </td>

	</tr>
	 <tr>

	   <td align="left" valign="top"><strong><?php echo JText::_( 'DT_SESSION_LENGTH' );?>:</strong></td>

       <td>
           <input class="inputbox" size="5" name="config[register_timeout]" value="<?php echo $config->getGlobal('register_timeout' , 60 ); ?>" />
           
		</td>

		<td align="center"><?php echo JHTML::tooltip((JText::_( 'DT_SESSION_LENGTH_TIP' )), '', 'tooltip.png', '', ''); ?> </td>

	</tr>
	
	<tr align="center" valign="middle">

	    <td align="left" valign="top"><strong><?php echo JText::_( 'DT_PRINT_OPTION' );?>:</strong></td>

		<td align="left" valign="top">

			<?php

					$options=array();

					$options[]=JHTML::_('select.option', '0', JText::_( 'DT_NO' ));

					$options[]=JHTML::_('select.option', '1', JText::_( 'DT_YES' ));

					echo JHTML::_('select.genericlist', $options,'config[print_option]',"class = 'inputbox'",'value','text',$config->getGlobal('print_option',0));

			?>

		</td>

		<td align="center"><?php echo JHTML::tooltip((JText::_( 'DT_PRINT_OPTION_TIP' )), '', 'tooltip.png', '', ''); ?> </td>

	</tr>
	
    <tr align="center" valign="middle">
	
	<td align="left" valign="top"><strong><?php echo JText::_( 'DT_DISCOUNT_CODE_COUNTING' );?>:</strong></td>

       <td align="left" valign="top">

							   <?php

							   $options=array();

							   $options[]=JHTML::_('select.option', 'per_event', JText::_( 'DT_PER_EVENT' ));

							   $options[]=JHTML::_('select.option', 'global', JText::_( 'DT_ALL_EVENT' ));

							   echo JHTML::_('select.genericlist', $options,'config[discount_code_use_per_event]','','value','text',$config->getGlobal('discount_code_use_per_event','per_event'));

							   ?>

						   </td>

							<td align="center"><?php echo JHTML::tooltip((JText::_( 'DT_DISCOUNT_CODE_COUNTING_HELP' )), '', 'tooltip.png', '', ''); ?> </td>

    </tr>
	
	<tr>		 	 

        <td colspan="3" class="dt_heading"><?php echo JText::_( 'DT_DISPLAY');?></td>

    </tr>
	
	<tr align="center" valign="middle">
		
		<td align="left" valign="top"><strong><?php echo JText::_( 'DT_SECURITY_IMAGE_CHECK' );?>:</strong></td>

        <td align="left" valign="top">

			<?php

				$options=array();

				$options[]=JHTML::_('select.option', '0', JText::_( 'DT_NO' ));

				$options[]=JHTML::_('select.option', '1', JText::_( 'DT_YES' ));

				echo JHTML::_('select.genericlist', $options,'config[security_image_check]',"class = 'inputbox'",'value','text',$config->getGlobal('security_image_check'));

			?>

		</td>

		<td align="center"><?php echo JHTML::tooltip((JText::_( 'DT_SECURITY_IMAGE_CHECK_HELP' )), '', 'tooltip.png', '', ''); ?> </td>

	</tr>

	<tr align="center" valign="middle">
		
		<td align="left" valign="top"><strong><?php echo JText::_( 'DT_TERMS_CONDITIONS' );?>:</strong></td>

		<td align="left" valign="top">

			<?php

					$options=array();

					$options[]=JHTML::_('select.option', '0', JText::_( 'DT_NO' ));

					$options[]=JHTML::_('select.option', '1', JText::_( 'DT_YES' ));

				    echo JHTML::_('select.genericlist', $options,'config[terms_conditions]',"class = 'inputbox'",'value','text',$config->getGlobal('terms_conditions'));

			?>

		</td>

		<td align="center"><?php echo JHTML::tooltip((JText::_( 'DT_TERMS_CONDITIONS_HELP' )), '', 'tooltip.png', '', ''); ?> </td>

	</tr>
    
    <tr>

        <td align="left" valign="top"><strong><?php echo JText::_( 'DT_REGISTRANT_BUTTON_COLOR' ); ?>:</strong></td>

        <td>

             <?php

                     $options=DtHtml::options($buttoncolor->getColors());

                     $button_color = isset($button_color)?$button_color:'blue';

                     echo JHTML::_('select.genericlist', $options, 'config[button_color]',"class = 'inputbox'",'value','text',$config->getGlobal('button_color'));

			?>

        </td>

        <td align="center"><?php echo JHTML::tooltip((JText::_( 'DT_REGISTRANT_BUTTON_COLOR_HELP' )), '', 'tooltip.png', '', ''); ?> </td>

    </tr>
    
    <tr align="center" valign="middle">
	  
	    <td align="left" valign="top"><strong><?php echo JText::_( 'DT_DATE_FORMAT' ) ?>:</strong></td>

		<td align="left" valign="top">

			 <?php

                    $options=DtHtml::options($dateformat->getformats());

					if($config->getGlobal('date_format')==""){$date_format='%m-%d-%Y';}else{

					   $date_format = $config->getGlobal('date_format');   

					}

					echo JHTML::_('select.genericlist',$options,"config[date_format]","class = 'inputbox'",'value','text',$date_format);

			?>

	    </td>

		<td align="center"><?php echo JHTML::tooltip((JText::_( 'DT_DATE_FORMAT_HELP' )), '', 'tooltip.png', '', ''); ?></td>

	</tr>
    
    <tr>

		<td align="left" valign="top"><strong><?php echo JText::_( 'DT_EVENT_SHOW_DATE' );?>:</strong></td>

        <td>

            <?php

				$options=array();

				$options[]=JHTML::_('select.option', '0', JText::_( 'DT_NO' ));

				$options[]=JHTML::_('select.option', '1', JText::_( 'DT_YES' ));

			    echo JHTML::_('select.genericlist', $options,'config[event_show_date]',"class = 'inputbox'",'value','text', $config->getGlobal('event_show_date'));

			?>

		</td>

		<td align="center"><?php echo JHTML::tooltip((JText::_( 'DT_EVENT_SHOW_DATE_HELP' )), '', 'tooltip.png', '', ''); ?> </td>

	</tr>
      <tr align="center" valign="middle">

							   	<td align="left" valign="top"><strong><?php echo JText::_( 'DT_TIMEZONE_ENABLE' );?>:</strong></td>

							      <td align="left" valign="top">

								   <?php

								   $options=array();

								   $options[]=JHTML::_('select.option', '0', JText::_( 'DT_NO' ));

								   $options[]=JHTML::_('select.option', '1', JText::_( 'DT_YES' ));

								   echo JHTML::_('select.genericlist', $options,'config[timezone_enable]','','value','text',$config->getGlobal('timezone_enable'));

								   ?>

							   </td>

							   		<td align="center"><?php echo JHTML::tooltip((JText::_( 'DT_TIMEZONE_ENABLE_TIP' )), '', 'tooltip.png', '', ''); ?> </td>

							   </tr>
         <tr align="center" valign="middle">

							   		<td align="left" valign="top"><strong><?php echo JText::_( 'DT_DEFAULT_TIMEZONE' );?>:</strong></td>

							      <td align="left" valign="top">

								   <?php
                                 $value = $config->getGlobal('timezone');
								 if (class_exists("DateTimeZone")){
									$zones = DateTimeZone::listIdentifiers();
									static $options;
									if (!isset($options)){
										$options = array();
										
										$options[] = JHTML::_('select.option', '', '- '.JText::_('DT_SELECT_TIMEZONE').' -');
									
										foreach ($zones as $zone) {
											if (strpos($zone,"/")===false) continue;
											if (strpos($zone,"Etc")===0) continue;
											$options[]	= JHTML::_('select.option', $zone, $zone);
										}
									}
									echo JHTML::_('select.genericlist',  $options, 'config[timezone]', 'class="inputbox"', 'value', 'text', $value);
								}
								else {
								    
									/*
									* Required to avoid a cycle of encoding &
									* html_entity_decode was used in place of htmlspecialchars_decode because
									* htmlspecialchars_decode is not compatible with PHP 4
									*/
									$value = htmlspecialchars(html_entity_decode($value, ENT_QUOTES), ENT_QUOTES);
						
									echo '<input type="text" name="config[timezone]" id="configtimezone" value="'.$value.'" class="inputbox" />';
								}
								   ?>

							   </td>

							   		<td align="center"><?php echo JHTML::tooltip((JText::_( 'DT_DEFAULT_TIMEZONE_TIP' )), '', 'tooltip.png', '', ''); ?> </td>

							   </tr>
     <tr>

		<td align="left" valign="top"><strong><?php echo JText::_( 'DT_FORM_FIELD_STYLING' );?>:</strong></td>

        <td>

              <?php

				$options=array();

				$options[]=JHTML::_('select.option', '0', JText::_( 'DT_STYLED_TEMPLATE' ));

				$options[]=JHTML::_('select.option', '1', JText::_( 'DT_STYLED_TEMPLATE_DTREGISTER' ));

				echo JHTML::_('select.genericlist', $options,'config[form_field_style]',"class = 'inputbox'",'value','text', $config->getGlobal('form_field_style'));

				?>

			</td>

			<td align="center"><?php echo JHTML::tooltip((JText::_( 'DT_FORM_FIELD_STYLING_HELP' )), '', 'tooltip.png', '', ''); ?> </td>

	</tr>               
    <tr align="center" valign="middle">
		
		<td align="left" valign="top"><strong><?php echo JText::_( 'DT_SHOW_FEE_BREAKDOWN' );?>:</strong></td>

        <td align="left" valign="top">

			<?php

				$options=array();

				$options[]=JHTML::_('select.option', '0', JText::_( 'DT_NO' ));

				$options[]=JHTML::_('select.option', '1', JText::_( 'DT_YES' ));

				echo JHTML::_('select.genericlist', $options,'config[show_fee_breakdown]',"class = 'inputbox'",'value','text',$config->getGlobal('show_fee_breakdown'));

			?>

		</td>

		<td align="center"><?php echo JHTML::tooltip((JText::_( 'DT_SHOW_FEE_BREAKDOWN_HELP' )), '', 'tooltip.png', '', ''); ?> </td>

	</tr>
	
	<tr>

		<td align="left" valign="top"><strong><?php echo JText::_( 'DT_HIDE_FULL_EVENT' );?>:</strong></td>

        <td>

           <?php

					$options=array();

					$options[]=JHTML::_('select.option', '0', JText::_( 'DT_NO' ));

					$options[]=JHTML::_('select.option', '1', JText::_( 'DT_YES' ));

					echo JHTML::_('select.genericlist', $options,'config[hide_full_event]',"class = 'inputbox'",'value','text',$config->getGlobal('hide_full_event'),0);

			?>

		</td>

		<td align="center"><?php echo JHTML::tooltip((JText::_( 'DT_HIDE_FULL_EVENT_HELP' )), '', 'tooltip.png', '', ''); ?> </td>

	</tr>
	
    <tr>		 	 

        <td colspan="3" class="dt_heading"><?php echo JText::_( 'DT_GROUP_REGISTRATION');?></td>

    </tr>

     <tr>

		<td align="left" valign="top"><strong><?php echo JText::_( 'DT_SEND_EMAIL_TO_GROUP' );?>:</strong></td>

        <td>

           <?php

					$options=array();

					$options[]=JHTML::_('select.option', '0', JText::_( 'DT_NO' ));

					$options[]=JHTML::_('select.option', '1', JText::_( 'DT_YES' ));

				    echo JHTML::_('select.genericlist', $options,'config[sendEmailToGroup]',"class = 'inputbox'",'value','text',$config->getGlobal('sendEmailToGroup'));

			?>

		</td>

		<td align="center"><?php echo JHTML::tooltip((JText::_( 'DT_SEND_EMAIL_TO_GROUP_HELP' )), '', 'tooltip.png', '', ''); ?> </td>

	</tr>

     <tr>

                                <td align="left"><strong><?php echo JText::_( 'DT_GROUP_SIZE_WARNING_LABEL' ); ?>:</strong></td>

                                <td>

                                <?php
    			                $options = array();

							    $options[1] = JText::_('DT_ALWAYS');
								$options[100] = JText::sprintf('DT_LESS_THAN',100);
								$options[75] = JText::sprintf('DT_LESS_THAN',75);
								$options[50] = JText::sprintf('DT_LESS_THAN',50);
								$options[30] = JText::sprintf('DT_LESS_THAN',30);
								$options[20] = JText::sprintf('DT_LESS_THAN',20);
								$options[10] = JText::sprintf('DT_LESS_THAN',10);
								$options[5] = JText::sprintf('DT_LESS_THAN',5);
								$options[0] = JText::_('DT_NEVER');

							    echo JHTML::_('select.genericlist', DtHtml::options($options),'config[group_size_warning]',"class = 'inputbox'",'value','text',$config->getGlobal('group_size_warning',1));

								?>

                        		    <td align="center"><?php echo JHTML::tooltip((JText::_( 'DT_GROUP_SIZE_WARNING_LABEL_HELP' )), '', 'tooltip.png', '', ''); ?> </td>

                              </tr>
     <tr align="center" valign="middle">
		
		<td align="left" valign="top"><strong><?php echo JText::_( 'DT_APPLY_DISCOUNT_CODE' );?>:</strong></td>

        <td align="left" valign="top">

								   <?php

								   $options=array();

								   $options[]=JHTML::_('select.option', 'group', JText::_( 'DT_GROUP' ));

								   $options[]=JHTML::_('select.option', 'eachmember', JText::_( 'DT_EACH_MEMBER' ));

								   echo JHTML::_('select.genericlist', $options,'config[discount_code_group_reg]','','value','text',$config->getGlobal('discount_code_group_reg'));

								   ?>

							   </td>

								<td align="center"><?php echo JHTML::tooltip((JText::_( 'DT_APPLY_DISCOUNT_CODE_HELP' )), '', 'tooltip.png', '', ''); ?> </td>

	</tr>
    
     <tr align="center" valign="middle">
		
		<td align="left" valign="top"><strong><?php echo JText::_( 'DT_APPLY_LATE_FEE' );?>:</strong></td>

        <td align="left" valign="top">

								   <?php

								   $options=array();

								     $options[]=JHTML::_('select.option', 'group', JText::_( 'DT_GROUP' ));

								   $options[]=JHTML::_('select.option', 'eachmember', JText::_( 'DT_EACH_MEMBER' ));


								   echo JHTML::_('select.genericlist', $options,'config[late_fee_group_reg]','','value','text',$config->getGlobal('late_fee_group_reg'));

								   ?>

							   </td>

								<td align="center"><?php echo JHTML::tooltip((JText::_( 'DT_APPLY_LATE_FEE_HELP' )), '', 'tooltip.png', '', ''); ?> </td>

	</tr>

    <tr align="center" valign="middle">
		
		<td align="left" valign="top"><strong><?php echo JText::_( 'DT_APPLY_MEMBER_DISCOUNT' );?>:</strong></td>

        <td align="left" valign="top">

								   <?php

								   $options=array();

								   $options[]=JHTML::_('select.option', 'group', JText::_( 'DT_GROUP' ));

								   $options[]=JHTML::_('select.option', 'eachmember', JText::_( 'DT_EACH_MEMBER' ));

								   echo JHTML::_('select.genericlist', $options,'config[member_discount_group_reg]','','value','text',$config->getGlobal('member_discount_group_reg'));

								   ?>

							   </td>

								<td align="center"><?php echo JHTML::tooltip((JText::_( 'DT_APPLY_MEMBER_DISCOUNT_HELP' )), '', 'tooltip.png', '', ''); ?> </td>

	</tr>	
    
     <tr align="center" valign="middle">
		
		<td align="left" valign="top"><strong><?php echo JText::_( 'DT_APPLY_BIRD_DISCOUNT' );?>:</strong></td>

        <td align="left" valign="top">

								   <?php

								   $options=array();

								   $options[]=JHTML::_('select.option', 'group', JText::_( 'DT_GROUP' ));

								   $options[]=JHTML::_('select.option', 'eachmember', JText::_( 'DT_EACH_MEMBER' ));
								   
								   echo JHTML::_('select.genericlist', $options,'config[bird_discount_group_reg]','','value','text',$config->getGlobal('bird_discount_group_reg'));

								   ?>

							   </td>

								<td align="center"><?php echo JHTML::tooltip((JText::_( 'DT_APPLY_BIRD_DISCOUNT_HELP' )), '', 'tooltip.png', '', ''); ?> </td>

	</tr>	
    
     <tr align="center" valign="middle">
		
		<td align="left" valign="top"><strong><?php echo JText::_( 'DT_APPLY_PARTIAL_PAYMENT' );?>:</strong></td>

        <td align="left" valign="top">

								   <?php

								   $options=array();

								   $options[]=JHTML::_('select.option', 'group', JText::_( 'DT_GROUP' ));

								   $options[]=JHTML::_('select.option', 'eachmember', JText::_( 'DT_EACH_MEMBER' ));

								   echo JHTML::_('select.genericlist', $options,'config[partial_payment_group_reg]','','value','text',$config->getGlobal('partial_payment_group_reg'));

								   ?>

							   </td>

								<td align="center"><?php echo JHTML::tooltip((JText::_( 'DT_APPLY_PARTIAL_PAYMENT_HELP' )), '', 'tooltip.png', '', ''); ?> </td>

	</tr>
	
    <tr>		 	 

        <td colspan="3" class="dt_heading"><?php echo JText::_( 'DT_DEFAULT_MEMBER_DISCOUNTS');?></td>

    </tr>
	
    <tr align="center" valign="middle">

        <td align="left" valign="top"><strong><?php echo JText::_( 'DT_DISCOUNT_TYPE' ); ?>:</strong></td>

	    <td align="left" valign="top">

	    <?php

	    $options=array();

	    $options[]=JHTML::_('select.option',"0",JText::_( 'DT_NONE'));

	    $options[]=JHTML::_('select.option',"1",JText::_( 'DT_AMOUNT'));

	    $options[]=JHTML::_('select.option',"2",JText::_( 'DT_PERCENTAGE'));

        echo JHTML::_('select.genericlist', $options,"config[member_discount_type]","","value","text",$config->getGlobal('member_discount_type',0));

	    ?>

	    </td>

	    <td align="center"><?php echo JHTML::tooltip((JText::_( 'DT_DEFAULT_DISCOUNT_TYPE_HELP' )), '', 'tooltip.png', '', ''); ?></td>

	 </tr>
     <?php
	   $member_discount_amounts = $config->getGlobal('member_discount_amount',array()); 
       if(count($member_discount_amounts)) {
		   $member_discount_groups = $config->getGlobal('member_discount_group',array());
		   $member_discount_groups = array_values($member_discount_groups);
		   $member_discount_amounts = array_values($member_discount_amounts);
		   
		   foreach($member_discount_amounts as $key => $discount) {
		       
	 ?>
     <tr align="center" valign="middle" class="addmorerate1">
          
        <td align="left" valign="top"><strong><?php echo JText::_( 'DT_DISCOUNT_AMOUNT' ); ?>:</strong></td>
          
        <td align="left" valign="top">
		     <input type="text" size="5" name="config[member_discount_amount][]" value="<?php echo $discount; ?>" />
                  
             <?php 
                    
               echo JHTML::_('select.genericlist',$this->getUserGroups(),"config[member_discount_group][]","","value","text", $member_discount_groups[$key]);  
              ?>
         </td>
          
         <td align="center"><?php echo JHTML::tooltip((JText::_( 'DT_DEFAULT_DISCOUNT_AMOUNT_HELP' )), '', 'tooltip.png', '', ''); ?></td>
          
     </tr>
     <?php
			   
		   }
	   } else {
	 ?>
	  <tr align="center" valign="middle" class="addmorerate1">

	  	<td align="left" valign="top"><strong><?php echo JText::_( 'DT_DISCOUNT_AMOUNT' ); ?>:</strong></td>

    	<td align="left" valign="top">
		    <input type="text" size="5" name="config[member_discount_amount][]" value="<?php ?>" size="5" />
        
        <?php 
		  
		    echo JHTML::_('select.genericlist',$this->getUserGroups(),"config[member_discount_group][]","","value","text");  
	    ?>
        </td>

		<td align="center"><?php echo JHTML::tooltip((JText::_( 'DT_DEFAULT_DISCOUNT_AMOUNT_HELP' )), '', 'tooltip.png', '', ''); ?></td>

	</tr>
    <?php
	   }
	?>
		
</table>

 <script type="text/javascript">
 DTjQuery(".addmorerate1").EnableMultiField(
  {linkText:'<?php echo JText::_('DT_ADD_MORE')?>',
		  removeLinkText:'<?php echo JText::_('DT_REMOVE');?>',
		  confirmationMsgOnRemove : '<?php echo JText::_('DT_CONFIRM_MEMBER_DISCOUNT_REMOVAL'); ?>'});
							  DTjQuery('#configprivate_event_notification').live('change',function(){

								  if(DTjQuery(this).val()=='redirect'){

								      DTjQuery('#private_event_redirect').removeAttr('disabled');

								  }else{

									  DTjQuery('#private_event_redirect').attr('disabled',true);

								  }

							  })

							   DTjQuery('#configprivate_event_notification').trigger('change');

							   DTjQuery('#configconfirm_number_type').live('change',function(){

								  if(DTjQuery(this).val()=='sequential'){

								      DTjQuery('#confirm_number_start').removeAttr('disabled');

								  }else{

									  DTjQuery('#confirm_number_start').attr('disabled',true);

								  }							  

							  })

							   DTjQuery('#configconfirm_number_type').trigger('change');
							
							   DTjQuery('#configdisable_cart').live('change',function(){

								  if(DTjQuery(this).val()=='1'){

								      DTjQuery('#minimum_cart_event').removeAttr('disabled');

								  }else{
                                     DTjQuery('#minimum_cart_event').val('');
									  DTjQuery('#minimum_cart_event').attr('disabled',true);

								  }							  

							  })

							   DTjQuery('#configdisable_cart').trigger('change');		

							</script>