<?php 
	/*
	** File: side
	** Description: side navigation
	** Version: $Revision: 1.14 $
	** Created: 04/22/1999
	** Author: Leon Atkinson
	** Email: leon@clearink.com
	** CVS Author: $Author: leon $
	** Last Revised: $Date: 2000/02/03 17:11:19 $
	**
	** Log : $Log: side,v $
	** Log : Revision 1.14  2000/02/03 17:11:19  leon
	** Log : Fixing SearchType value.
	** Log :
	** Log : Revision 1.13  2000/02/02 18:59:48  leon
	** Log : Fixing bugs reported by Ted Henigson.
	** Log :
	** Log : Revision 1.12  2000/02/01 18:56:08  leon
	** Log : Added code from Isaac Reuben that does better tests for javascript.
	** Log :
	** Log : Revision 1.11  1999/12/09 21:53:41  leon
	** Log : Fixed old $Applicaton_Root still hanging around.
	** Log :
	** Log : Revision 1.10  1999/12/01 17:33:22  jj
	** Log : Used function StartForm rather than doing it by hand.
	** Log :
	** Log : Revision 1.9  1999/11/15 19:23:24  leon
	** Log : Localized nav modules
	** Log :
	** Log : Revision 1.8  1999/10/04 22:41:49  leon
	** Log : Added context-sensitive help.  New directory modules/help may have a file
	** Log : that matches a screen module.  If it exists, then a help link appears in
	** Log : the navigation.  This opens a smaller window with the contents of the
	** Log : help file.
	** Log :
	** Log : Revision 1.7  1999/08/10 20:56:42  jj
	** Log : Added a link to "edit_user" so that the user can edit his own address and login information.
	** Log :
	** Log : Revision 1.6  1999/08/09 23:01:40  leon
	** Log : Added new quick_order screen, added it to side nav, added link to attribute
	** Log : admin back to admin menu, and removed references to batches from build.sql
	** Log :
	** Log : Revision 1.5  1999/08/03 20:01:23  leon
	** Log : Updated search functionality
	** Log : You can now search on screens.  A constant controls whether you want
	** Log : to pull screen modules into memory to search on the contents.  Otherwise
	** Log : the search is only made on the meta tags as defined in ScreenInfo.
	** Log :
	** Log : Revision 1.4  1999/07/28 19:27:27  leon
	** Log : Mass update based on code donation from a live project
	** Log :
	** Copyright (c) 1999 Working Dogs.  All rights reserved.
	*/

	print("<A HREF=\"" . ScreenURL("welcome") . "\">");
	print(L_NAV_SIDE_HOME);
	print("</A><BR>\n");

	print("<A HREF=\"" . ScreenURL("department") . "\">");
	print(L_NAV_SIDE_DEPT);
	print("</A><BR>\n");

	print("<A HREF=\"" . ScreenURL("quick_order") . "\">");
	print(L_NAV_SIDE_QUICK);
	print("</A><BR>\n");

	//help link
	if(file_exists(APPLICATION_ROOT . "/modules/help/$SCREEN"))
	{
 		print("<A HREF=\"".ScreenURL("help", FALSE, array('topic'=>$SCREEN))."\" ");
 		if((GENERATE_BROWSER_CONSTANTS) AND (BROWSER_JAVASCRIPTOK))
 		{
 			print("onClick=\"popupwindow(this.href); return false;\" ");
 		}
 		print("TARGET=\"help\">");
		print(L_NAV_SIDE_HELP);
		print("</A><BR>\n");
	}

	//mini search form
	print(StartForm("search_results", "POST", "", FALSE, array("SearchType"=>"simple")));
	print("<INPUT TYPE=\"text\" NAME=\"inputKeywords\" VALUE=\"\" SIZE=\"12\">\n");
	print("<INPUT TYPE=\"submit\" value=\"" . L_NAV_SIDE_SEARCH . "\">");
	print("</FORM>\n");

	print("<A HREF=\"" . ScreenURL("search_form") . "\">");
	print(L_NAV_SIDE_ADVSEARCH);
	print("</A><BR>\n");


	//login or logout depending on if user is logged in
	if((isset($UserInfo["ID"])) AND ($UserInfo["ID"] > 0))
	{
		print("<A HREF=\"" . ScreenURL("welcome") . "&ACTION=LOGOUT_USER\">");
		print(L_NAV_SIDE_LOGOUT);
		print("</A><BR>\n");
		
		print("<A HREF=\"" . ScreenURL("wishlist") . "\">");
		print(L_NAV_SIDE_WISHLIST);
		print("</A><BR>\n");

		print("<A HREF=\"" . ScreenURL("order_history") . "\">");
		print(L_NAV_SIDE_HISTORY);
		print("</A><BR>\n");
		
		print("<A HREF=\"" . ScreenURL("edit_user") . "\">");
		print(L_NAV_SIDE_PROFILE);
		print("</A><BR>\n");
	}
	else
	{
		print("<A HREF=\"" . ScreenURL("login") . "\">");
		print(L_NAV_SIDE_LOGIN);
		print("</A><BR>\n");

		print("<A HREF=\"" . ScreenURL("create_account") . "\">");
		print(L_NAV_SIDE_REGISTER);
		print("</A><BR>\n");
	}
	
?>
