<?php
	/*
	** File: PURGE_INVOICE
	** Description: Delete a user's incomplete invoice, all SKUs, and
	**   all address for SKUs. This does not require admin rights.
	** Version: $Revision: 1.6 $
	** Created: 06/24/1999
	** Author: Leon Atkinson
	** Email: leon@clearink.com
	** CVS Author: $Author: leon $
	** Last Revised: $Date: 1999/11/04 21:35:30 $
	**
	** Log : $Log: PURGE_INVOICE,v $
	** Log : Revision 1.6  1999/11/04 21:35:30  leon
	** Log : Cleaned up the use of paths.  Paths are now all set in index.php3 as
	** Log : constants.  Example settings for Apache/Unix, Apache/Win32, and IIS.
	** Log :
	** Log : Revision 1.5  1999/10/11 23:03:59  leon
	** Log : Removed all require()'s, added block to stop double include()'s
	** Log :
	** Log : Require wasn't giving any performance advantage because it was always
	** Log : being called with a variable.  Futhermore, using return inside a
	** Log : require()'d file does not work in PHP4.
	** Log :
	** Log : Revision 1.4  1999/10/04 22:09:50  leon
	** Log : Removed getInvoiceID.  The active invoice is now added to $UserInfo
	** Log : by the check sid functionality in init.
	** Log :
	** Log : Revision 1.3  1999/08/18 22:31:50  leon
	** Log : Returning opening PHP tag to XML-friendly tag
	** Log :
	** Log : Revision 1.2  1999/08/11 23:37:14  leon
	** Log : Added support for automatically purging invoices created by anonymous
	** Log : shoppers that were never completed.  As a side effect, the functionality
	** Log : of the PURGE_INVOICE action modules was wrapped into a function,
	** Log : purgeInvoice().  Two new constants control how often checks are made
	** Log : and how old an invoice has to be to be purged.
	** Log :
	** Log : Revision 1.1  1999/07/28 19:41:04  leon
	** Log : Mass update based on code donation from a live project
	** Log :
	**
	** Copyright (c) 1999 Working Dogs.  All rights reserved.
	*/

	//get purgeInvoice() function
	include(APPLICATION_ROOT . "/modules/include/purgeInvoice");

	purgeInvoice($UserInfo['Invoice']);
	$UserInfo['Invoice'] = 0;

?>
