<?php
	/*
	** File: admin_sales
	** Description: menu for altering sales prices
	** Version: $Revision: 1.8 $
	** Created: 08/13/1999
	** Author: Leon Atkinson
	** Email: leon@clearink.com
	** CVS Author: $Author: leon $
	** Last Revised: $Date: 1999/12/07 21:45:07 $
	** Log : $Log: admin_sales,v $
	** Log : Revision 1.8  1999/12/07 21:45:07  leon
	** Log : All forms should be using StartForm now...
	** Log :
	** Log : Revision 1.7  1999/11/04 21:35:38  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.6  1999/10/12 23:14:48  leon
	** Log : Moved localization constants into 'english' module.  Added constant to
	** Log : control whether unregistered shoppers may checkout.
	** Log :
	** Log : Revision 1.5  1999/10/12 00:39:08  chris
	** Log : Moving text into constants in preparation of localization support.
	** Log :
	** Log : Revision 1.3  1999/09/24 00:06:43  jj
	** Log : Used ITEMS_IN_MULTIPLE_DEPARTMENTS so that items may or may not belong to multiple departments. Also, got rid of any reference to DepartmentSelectorForItem, since it has been deprecated.
	** Log :
	** Log : Revision 1.2  1999/08/18 22:32:13  leon
	** Log : Returning opening PHP tag to XML-friendly tag
	** Log :
	** Log : Revision 1.1  1999/08/13 18:20:01  leon
	** Log : Added interface for setting sales prices per the requirements specification.
	** Log : (See "Add promotion/discount offers").  Since admin_sales needs to use
	** Log : DepartmentSelector, I tweaked it a bit.
	** Log :
	**
	** Copyright (c) 1999 Working Dogs.  All rights reserved.
	*/

	//get DepartmentSelctor
	include(APPLICATION_ROOT . "/modules/include/department_selector");


	if($UserInfo["Permission"]["Administrate"])
	{

		print("<H3>" . L_ADMINSALES_SALESMENU . "</H3>\n");
	
		//decorative box around form
		print("<TABLE BORDER=\"1\">\n");
		print("<TR>\n");
		print("<TD>");

		print("<A HREF=\"" . ScreenURL("admin_sales") . "&amp;ACTION=CLEAR_SALES\">");
		print(L_ADMINSALES_CLEARALLSALEPRICES);
		print("</A><BR>\n");
		
		print(L_ADMINSALES_THISOPTION);

		print("</TD>");
		print("</TR>\n");
		print("</TABLE>\n");

		print("<BR>\n");


		//decorative box around form
		print("<TABLE BORDER=\"1\">\n");
		print("<TR>\n");
		print("<TD>");
		

		print(StartForm("admin_sales", 'post', 'SET_DEPT_SALES', FALSE));

		print("<TABLE BORDER=\"0\">\n");
		
		print("<TR>\n");
		print("<TD VALIGN=\"top\">" . L_ADMINSALES_DEPARTMENTS . "</TD>\n");
		print("<TD>");
		DepartmentSelector("inputDepartment[]", $itemDepartment, TRUE);
		print("</TD>");
		print("</TR>\n");

		print("<TR>\n");
		print("<TD VALIGN=\"top\">" . L_ADMINSALES_DISCOUNTPERCENTAGE . "</TD>\n");
		print("<TD>");
		print("<INPUT TYPE=\"text\" NAME=\"inputPercentage\" SIZE=\"4\">");
		print("</TD>");
		print("</TR>\n");

		print("<TR>\n");
		print("<TD>&nbsp;</TD>\n");
		print("<TD>");
		print("<INPUT TYPE=\"submit\" VALUE=\"" . L_ADMINSALES_DISCOUNTSELECTED . "\">\n");
		print("</TD>");
		print("</TR>\n");

		print("</TABLE>\n");


		print("</TD>");
		print("</TR>\n");
		print("</TABLE>\n");


	}
	else
	{
		print(L_ADMINSALES_DENIED);
	}	



?>
