<?php
	/*
	** File: ADD_COUPON
	** Description: add coupon to the coupon table
	** Version: $Revision: 1.5 $
	** Created: 10/20/1999
	** Author: Chris Bellew
	** Email: chris@clearink.com
	** CVS Author: $Author: leon $
	** Last Revised: $Date: 2000/01/03 21:22:25 $
	**
	** Log : $Log: ADD_COUPON,v $
	** Log : Revision 1.5  2000/01/03 21:22:25  leon
	** Log : Adding a bit of error checking
	** Log :
	** Log : Revision 1.4  1999/12/09 23:23:16  leon
	** Log : Changed ActionResults use so that it's an array instead of a
	** Log : continually-growing string.  Note the little function in standard_library
	** Log : for printing out all the action results.
	** Log :
	** Log : Revision 1.3  1999/11/09 21:47:10  leon
	** Log : More localization.
	** Log :
	** Log : Revision 1.2  1999/11/02 20:35:41  leon
	** Log : Cleaned up coupon code a bit.
	** Log :
	** Log : Revision 1.1  1999/11/02 18:23:04  chris
	** Log : Added support for coupons.
	** Log :
	*/

	//Prepare query
	//Start coupon in the past, so it won't be active
	$Query = "INSERT into coupon (Name,  PercentageOff, StartDate, EndDate) ";
	$Query .= "VALUES ('New Coupon', 0, '2000-01-01', '2000-01-01') ";
	
	if(!($DatabaseResult = mysql_query($Query, $DatabaseLink)) )
	{
		$ActionResults[] = mysql_errno() . ":  " . mysql_error() . 
			"   Query was $Query";
		$continueScript = FALSE;
	}
	else
	{
		$ActionResults[] = L_ADDCOUPON_SUCCESS;
	}

?>