<?php

/*
/**
* CHRONOFORMS version 1.0 stable
* Copyright (c) 2006 Chrono_Man, ChronoEngine.com. All rights reserved.
* Author: Chrono_Man (ChronoEngine.com)
* See readme.html.
* Visit http://www.ChronoEngine.com for regular update and information.
**/

/* ensure that this file is called from another file */
defined('_JEXEC') or die('Restricted access'); 

jimport( 'joomla.application.component.controller' );


class TableChronoContact extends JTable {
  // Declaration and initialisation of the instantiation variable
  // INT(11) AUTO_INCREMENT
  var $id=null;
  // TEXT
  var $name=null;
  // TEXT
  var $html=null;
  // TEXT
  var $scriptcode=null;
  // TEXT
  var $redirecturl=null;
  // TINYINT(1)
  var $emailresults=null;
  // TEXT
  var $extraemail=null;
  // TEXT
  var $emailsubject=null;
  // TEXT
  var $onsubmitcode=null;
  // TEXT
  var $onsubmitcodeb4=null;
  // TEXT
  var $attformtag=null;
  // TEXT
  var $submiturl=null;
  // TEXT
  var $emailtemplate=null;
  
  var $paramsall = null;
  
  var $titlesall = null;
  
  var $autogenerated = null;
    // TINYINT(1)
  var $published=null;

  // The constructor is called by the instantiation
  function __construct( &$database ) {
    parent::__construct( '#__chrono_contact', 'id', $database );
	global $mosConfig_absolute_path, $chronocontact_params;
	//$database =& JFactory::getDBO();
	/*if( !isset($GLOBALS['chronocontact_params']) || !empty($_REQUEST['chronocontact_params'])) {
			// pull id of letterman component
			$query = "SELECT a.id FROM `#__components` AS a"
			. "\n WHERE `a`.`option` = 'com_chronocontact' AND `parent` = 0";
			$database->setQuery( $query );
			$chronocontact_id = $database->loadResult();
			
			$component = new JComponent( $database );
			$component->load( $chronocontact_id );
			$GLOBALS['chronocontact_params'] = $chronocontact_params = new mosParameters( $component->params );
			
			
		}	*/
  }
}
?>
