';
}
var $fieldType;
var $duplicate = false;
var $total;
function getRecords() {
$this->record =& iContact::getSettings();
//$this->total = iContact::getRows($this->_records);
//return $this->_records;
}
function getRecord($id) {
//$this->record =& iContact::getFields("","WHERE `id`='".$id."'");
//$this->fieldType = $this->record['type'];
}
function getSelectOptions($field,$fields) {
for ($i=0; $irecord["datatype"] == "Number") {
if ($fields[$i] == $this->record[$field]) {
echo '';
}
else {
echo '';
}
}
else {
if ($fields[$i] == $this->record[$field]) {
echo '';
}
else {
echo '';
}
}
}
}
function getTemplates() {
$dir = "../components/com_icontact/templates/";
$dir_handle = opendir("../components/com_icontact/templates/");
while ($file = readdir($dir_handle)) {
if ($file != "." && $file != "..") {
if (is_dir($dir.$file)) {
if ($this->record['template'] == $file) {
echo '';
}
else {
echo '';
}
}
}
}
}
function saveRecord($data) {
$db =& JFactory::getDBO();
$query = "UPDATE `#__icontact_settings` SET `response_email`='".iContact::clean($data['response_email'])."',`response_subject`='".iContact::clean($data['response_subject'])."',`contact_heading`='".iContact::clean($data['contact_heading'])."',`template`='".iContact::clean($data['template'])."',`instruction_text`='".iContact::clean($data['instruction_text'])."',`confirmation_text`='".iContact::clean($data['confirmation_text'])."',`completed_text`='".iContact::clean($data['completed_text'])."',`meta_key`='".iContact::clean($data['meta_key'])."',`meta_desc`='".iContact::clean($data['meta_desc'])."',`meta_title`='".iContact::clean($data['meta_title'])."' WHERE `id`='1'";
$db->setQuery( $query );
if (!$db->query()) {
echo $db->stderr();
die();
return false;
}
/*$query = "UPDATE `#__icontact_settings` SET `paypal_enabled`='".iContact::clean($data['paypal_enabled'])."',`paypal_required`='".iContact::clean($data['paypal_required'])."',`paypal_label`='".iContact::clean($data['paypal_label'])."',`paypal_email`='".iContact::clean($data['paypal_email'])."',`paypal_currency`='".iContact::clean($data['paypal_currency'])."',`paypal_item_name`='".iContact::clean($data['paypal_item_name'])."',`paypal_item_number`='".iContact::clean($data['paypal_item_number'])."',`paypal_debug`='".iContact::clean($data['paypal_debug'])."',`paypal_price`='".iContact::clean($data['paypal_price'])."' WHERE `id`='1'";
$db->setQuery( $query );
if (!$db->query()) {
echo $db->stderr();
die();
return false;
}*/
}
}
?>