<?php

/**
* @version 2.7.18
* @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
*/

  $editor =& JFactory::getEditor();
  $document =& JFactory::getDocument();

  $document->addScript( JURI::root(true).'/components/com_dtregister/assets/js/dt_jquery.js');
  $document->addScript( JURI::root(true).'/components/com_dtregister/assets/js/jquery-ui.js');
  $document->addStyleSheet(JURI::root(true).'/components/com_dtregister/assets/css/south-street/jquery-ui.css');

?>

<?php echo JText::_('DT_CRON_JOB_INSTRUCTIONS');?><br /><br />

<strong><?php echo JText::_('DT_CRON_COMMAND');?>:</strong> [<?php echo  JText::_('DT_PHP_PATH') ?>]/php -f <?php echo JPATH_SITE."/components/com_dtregister/cron.php"?> <br /><br />
<span class="reminders" >
 Loading...
</span>
 <script type="text/javascript">
     
     DTjQuery(function(){
		 DTjQuery("a[onclick*='add']").attr('onclick' ,null);
		 	 DTjQuery(".reminders").load("index.php?option=com_dtregister&controller=reminder&task=reminders&format=raw");
	 	 DTjQuery(".icon-32-new").live('click',function(e){		

		e.preventDefault();

		var horizontalPadding = 30;

		var verticalPadding = 30;
        
		DTjQuery('<iframe  class="externalSite" src="index.php?option=com_dtregister&controller=reminder&task=add&tmpl=component" />').dialog({

			title: '<?php echo JText::_('DT_ADD_REMINDER')?>',

			autoOpen: true,

			width: 800,

			height: 560,

			modal: true,

			resizable: true,

			autoResize: true,
            close: function(event, ui) { DTjQuery(".reminders").load("index.php?option=com_dtregister&controller=reminder&task=reminders&format=raw"); },
			overlay: {

				opacity: 0.5,

				background: "black"

			}

		}).width(800 - horizontalPadding).height(560 - verticalPadding);

			     });
		 DTjQuery(".colorbox").live('click',function(e){		

		e.preventDefault();

		var horizontalPadding = 30;

		var verticalPadding = 30;

		DTjQuery('<iframe  class="externalSite" src="'+DTjQuery(this).attr('href')+'" />').dialog({

			title:  DTjQuery(this).attr('title'),

			autoOpen: true,

			width: 800,

			height: 560,

			modal: true,

			resizable: true,

			autoResize: true,
            close: function(event, ui) { DTjQuery(".reminders").load("index.php?option=com_dtregister&controller=reminder&task=reminders&format=raw"); },
			overlay: {

				opacity: 0.5,

				background: "black"

			}

		}).width(800 - horizontalPadding).height(560 - verticalPadding);

			     });		 
		
	 })
	  
</script>
