<?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_comments.inc.php
  Description: Comments Class
  New in v2.0

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


class comments extends genericOptions {
  
var $prefix;

// Update comments..
function update($DATA)
{
  // Use callback function to prepare data for importing..
  $DATA = array_map(array($this,'safe_import'),$DATA);
  
  mysql_query("UPDATE ".$this->prefix."comments SET
               name      = '{$DATA['name']}',
               email     = '{$DATA['email']}',
               comments  = '{$DATA['comments']}'
               WHERE id  = '{$DATA['id']}'
               LIMIT 1
               ") or die(mysql_error());
}

// Delete comments..
function delete($id) 
{
  mysql_query("DELETE FROM ".$this->prefix."comments WHERE id = '{$id}' LIMIT 1") or die(mysql_error());
}

}

?>
