<?php

/*++++++++++++++++++++++++++++++++++++++++

  Script: Maian Events v2.0
  Written by: David Ian Bennett
  E-Mail: support@maianscriptworld.co.uk
  Website: http://www.maianscriptworld.co.uk

  ++++++++++++++++++++++++++++++++++++++++
  
  This File: class_settings.inc.php
  Description: Settings Class

  ++++++++++++++++++++++++++++++++++++++++*/


class settings extends genericOptions {
  
var $prefix;

// Update settings..
function update($DATA)
{
  // Use callback function to prepare data for importing..
  $DATA = array_map(array($this,'safe_import'),$DATA);
  
  mysql_query("UPDATE ".$this->prefix."settings SET
               website     = '{$DATA['website']}',
               email       = '{$DATA['email']}',
               folder      = '{$DATA['folder']}',
               formatdate  = '".($DATA['formatdate'] ? $DATA['formatdate'] : '%e %M %Y')."',
               language    = '{$DATA['language']}',
               theme       = '{$DATA['theme']}',
               modr        = '".(isset($DATA['modr']) ? '1' : '0')."',
               approve     = '".(isset($DATA['approve']) ? '1' : '0')."',
               captcha     = '".(isset($DATA['captcha']) ? '1' : '0')."',
               dayspan     = '".(isset($DATA['dayspan']) ? '1' : '0')."',
               tswitch     = '".(isset($DATA['tswitch']) ? '1' : '0')."',
               meta_keys   = '{$DATA['meta_keys']}',
               meta_desc   = '{$DATA['meta_desc']}',
               smtp        = '".(isset($DATA['smtp']) ? '1' : '0')."',
               smtp_host   = '{$DATA['smtp_host']}',
               smtp_user   = '{$DATA['smtp_user']}',
               smtp_pass   = '{$DATA['smtp_pass']}',
               smtp_port   = '{$DATA['smtp_port']}'
               LIMIT 1
               ") or die(mysql_error());
}

}

?>
