<?

/*
FlexCMS (http://www.flexcms.com)
Flexible, Powerful, Affordable.

Contents of this file are protected by the copyright
notice found at http://www.flexcms.com/flex/pages/copyright.html,
and its usage is subject to the terms of the licensing agreement 
available at http://www.flexcms.com/flex/pages/license.html
*/



	// ========================================================================================
	
	// ========================================================================================
	
	$PageTitle = '<img src="'.$ImagesURL.'/admin/admincp_ecom.gif" width="20" height="21" align="middle"> '.$MsgText[9][39];
	$BrowserTitle = $MsgText[9][39];
	$LocationBar = '<a href="'.$IndexURL.'">'.$MsgText[0][1].'</a> > <a href="' . $MainURL . '/options.html">'.$MsgText[0][4].'</a> > <a href="'.$MainURL.'/admin/store-products.html">'.$MsgText[9][3].'</a> > '.$MsgText[9][39];
	
	if ($LoggedIn == 'y') {
		
		ReadPermissions();
		Global $Permissions;
		
		if ($Permissions[901] == 'y') {
		
			$query = "select * from `".$Settings['DBPrefix']."ec-Settings`";
			$result = mysql_query($query) or die (mysql_error());
			while ($row = mysql_fetch_array($result)) {
				$ecSettings[$row['Name']] = $row['Value'];
			}
			
			
			
			if ($ecSettings['CurrencyLocation'] == '' || $ecSettings['CurrencyLocation'] == 'b') {
				if ($ecSettings['Currency'] == '') {
					$CurrencyBefore = '$';
				}
				else {
					$CurrencyBefore = $ecSettings['Currency'];
				}
			}
			else {
				if ($ecSettings['Currency'] == '') {
					$CurrencyAfter = '$';
				}
				else {
					$CurrencyAfter = $ecSettings['Currency'];
				}
			}
	
	
	
			if ($ecSettings['PriceDecimals'] == '') {
				$ecSettings['PriceDecimals'] = 2;
			}
	
			
			if ($ecSettings['DecimalSymbol'] == '') {
				$ecSettings['DecimalSymbol'] = '.';
			}
	
	
			if ($ecSettings['ThousandsSep'] == '') {
				$ecSettings['ThousandsSep'] = ',';
			}
			
		
		
			$ProductNumber = intval($Arguments3);
			
			$query4 = "select * from `".$Settings['DBPrefix']."ec-Products` where RecordNumber='".$ProductNumber."' limit 1";
			$result4 = mysql_query($query4) or die (mysql_error());
			$row4 = mysql_fetch_array($result4);
			
			
			$query = "select * from `".$Settings['DBPrefix']."ec-Categories` ORDER BY Name ASC, RecordNumber ASC";
			$result = mysql_query($query) or die (mysql_error());
			while ($row = mysql_fetch_array($result)) { 
				$CategoryIDsArray[$row['Parent']][] = $row['RecordNumber'];
				$CategoryNamesArray[$row['Parent']][] = $row['Name'];
				$CategoryExists[$row['RecordNumber']] = 'y';
			}
			
			
			$CurrentPageCategory = $row4['Category'];
			$CurrentPageCategory2 = $row4['Category2'];
			$CurrentPageCategory3 = $row4['Category3'];
			$CurrentPageCategory4 = $row4['Category4'];
			$CurrentPageCategory5 = $row4['Category5'];
			
			
			
			$CatParent5 = 0;
			$LastParentAbove5 = '0';
			$CatLevel5['0'] = 0;
									
			function SpiderCategories5($CatParent5) {
							
				Global $CategoryIDsArray, $CategoryNamesArray, $CategoryDropdown, $CategoryDropdown2, $CategoryDropdown3, $CategoryDropdown4, $CategoryDropdown5, $LastParent5, $LastParentAbove5, $CatSpacersArray5, $CatLevel5, $CatsCount5, $CurrentPageCategory, $CurrentPageCategory2, $CurrentPageCategory3, $CurrentPageCategory4, $CurrentPageCategory5, $MainURL, $CategoriesPrint, $ProductIDsArray, $ProductNamesArray, $LastProductParent;
							
				for ($i = 0; $i < count($CategoryIDsArray[$CatParent5]); $i++) {
								
					$LastParentAboveB5 = $LastParentAbove5;
					$LastParentB5 = $LastParent5;
								
					$CatLevel5[$CategoryIDsArray[$CatParent5][$i]] = $CatLevel5[$CatParent5];
					if ($CatParent5 != $LastParent5 && $CatParent5 == $LastParentAbove5) {
							
						$CatLevel5[$CategoryIDsArray[$CatParent5][$i]] = $CatLevel5[$CatParent5] + 1;
						$CatLevel5[$CatParent5]++;
															
						$CatsCount5[$CatLevel5[$CatParent5]] = 0;
							
					}
								
					$LastParent5 = $CatParent5;
					$LastParentAbove5 = $CategoryIDsArray[$CatParent5][$i];
								
					$CatsCount5[$CatLevel5[$CatParent5]]++;
								
										
					$CatSpacer5 = '';
					for ($x = 0; $x < $CatLevel5[$CatParent5]; $x++) {
									
						if ($CatsCount5[$CatLevel5[$CatParent5]] == count($CategoryIDsArray[$CatParent5]) && $x == $CatLevel5[$CatParent5]-1) {
							$CatSpacersArray5[$CatLevel5[$CatParent5]] = '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
							$ResetAfter5 = 'y';
						}
						else if ($CatsCount5[$CatLevel5[$CatParent5]] == count($CategoryIDsArray[$CatParent5])) {
							$CatSpacersArray5[$CatLevel5[$CatParent5]] = '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
						}
						else {
							if ($x < $CatLevel5[$CatParent5]) {
								$CatSpacersArray5[$CatLevel5[$CatParent5]] = '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
								$ResetAfter5 = 'y2';
							}
							else {
								$CatSpacersArray5[$CatLevel5[$CatParent5]] = '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
							}
						}
						
							
						$CatSpacer5 .= $CatSpacersArray5[$x+1];
						
						if ($ResetAfter5 == 'y') {
							$CatSpacersArray5[$CatLevel5[$CatParent5]] = '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
							$ResetAfter5 = 'n';
						}
						else if ($ResetAfter5 == 'y2') {
							$CatSpacersArray5[$CatLevel5[$CatParent5]] = '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
							$ResetAfter5 = 'n';
						}
													
					}
					
					
					
					$CategoryID = $CategoryIDsArray[$CatParent5][$i];
				
					if ($CategoryID == $CurrentPageCategory) {
						$CategoryDropdown .= '<option value="'.$CategoryID.'"'.$ElementStyle.' selected>&nbsp;'.$CatSpacer5.' '.$CategoryNamesArray[$CatParent5][$i].$AsteriskAdded.'&nbsp;</option>';
					}
					else {
						$CategoryDropdown .= '<option value="'.$CategoryID.'"'.$ElementStyle.'>&nbsp;'.$CatSpacer5.' '.$CategoryNamesArray[$CatParent5][$i].$AsteriskAdded.'&nbsp;</option>';
					}
					
					
					if ($CategoryID == $CurrentPageCategory2) {
						$CategoryDropdown2 .= '<option value="'.$CategoryID.'"'.$ElementStyle.' selected>&nbsp;'.$CatSpacer5.' '.$CategoryNamesArray[$CatParent5][$i].$AsteriskAdded.'&nbsp;</option>';
					}
					else {
						$CategoryDropdown2 .= '<option value="'.$CategoryID.'"'.$ElementStyle.'>&nbsp;'.$CatSpacer5.' '.$CategoryNamesArray[$CatParent5][$i].$AsteriskAdded.'&nbsp;</option>';
					}
					
					
					if ($CategoryID == $CurrentPageCategory3) {
						$CategoryDropdown3 .= '<option value="'.$CategoryID.'"'.$ElementStyle.' selected>&nbsp;'.$CatSpacer5.' '.$CategoryNamesArray[$CatParent5][$i].$AsteriskAdded.'&nbsp;</option>';
					}
					else {
						$CategoryDropdown3 .= '<option value="'.$CategoryID.'"'.$ElementStyle.'>&nbsp;'.$CatSpacer5.' '.$CategoryNamesArray[$CatParent5][$i].$AsteriskAdded.'&nbsp;</option>';
					}
					
					
					if ($CategoryID == $CurrentPageCategory4) {
						$CategoryDropdown4 .= '<option value="'.$CategoryID.'"'.$ElementStyle.' selected>&nbsp;'.$CatSpacer5.' '.$CategoryNamesArray[$CatParent5][$i].$AsteriskAdded.'&nbsp;</option>';
					}
					else {
						$CategoryDropdown4 .= '<option value="'.$CategoryID.'"'.$ElementStyle.'>&nbsp;'.$CatSpacer5.' '.$CategoryNamesArray[$CatParent5][$i].$AsteriskAdded.'&nbsp;</option>';
					}
					
					
					if ($CategoryID == $CurrentPageCategory5) {
						$CategoryDropdown5 .= '<option value="'.$CategoryID.'"'.$ElementStyle.' selected>&nbsp;'.$CatSpacer5.' '.$CategoryNamesArray[$CatParent5][$i].$AsteriskAdded.'&nbsp;</option>';
					}
					else {
						$CategoryDropdown5 .= '<option value="'.$CategoryID.'"'.$ElementStyle.'>&nbsp;'.$CatSpacer5.' '.$CategoryNamesArray[$CatParent5][$i].$AsteriskAdded.'&nbsp;</option>';
					}
					
						
					$CategoriesPrint .= '<br>'.$CatSpacer5.' '.$CategoryNamesArray[$CatParent5][$i];
						
						
						
					for ($j = 0; $j < count($ProductIDsArray[$CategoryID]); $j++) {
						$CategoriesPrint .= '<br>'.$CatSpacer5.'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- <a href="'.$MainURL.'/admin/store-products_edit/'.$ProductIDsArray[$CategoryID][$j].'.html">'.$ProductNamesArray[$CategoryID][$j].'</a>';
					}	
					
								
												
					
					if (count($CategoryIDsArray[$CategoryIDsArray[$CatParent5][$i]]) > 0) {
						SpiderCategories5($CategoryIDsArray[$CatParent5][$i]);
					}
							
				}
							
							
			}
			
			SpiderCategories5('0');
			
			
			
			if (function_exists("gd_info")) {
				$GDInfo = @gd_info();
			}
			if ($GDInfo['GIF Create Support'] == true) {
				$MsgText[0][314] = $MsgText[0][537];
			}
			else {
				$JPEGPNGOnly = '<br>('.$MsgText[0][313].')';
			}
			
			
			$RowSpacer = '<tr><td colspan="11"><img src="'.$ImagesURL.'/admin/spacer.gif" width="1" height="3" alt="" border="0"></td></tr><tr><td colspan="11" bgcolor="'.$Colors['Text'].'"><img src="'.$ImagesURL.'/admin/spacer.gif" width="1" height="1" alt="" border="0"></td></tr><tr><td colspan="11"><img src="'.$ImagesURL.'/admin/spacer.gif" width="1" height="3" alt="" border="0"></td></tr>';
			
			
			$query8 = "select * from `".$Settings['DBPrefix']."ec-Items` where Product='".$row4['RecordNumber']."' ORDER BY Option1 ASC, Option2 ASC, Price1 ASC";
			$result8 = mysql_query($query8) or die (mysql_error());
			while ($row8 = mysql_fetch_array($result8)) {
			
				if ($row8['PriceQty2'] < 2 || $row8['Price2'] == 0.00) {
					$PriceSection = $CurrencyBefore.number_format($row8['Price1'],$ecSettings['PriceDecimals'], $ecSettings['DecimalSymbol'], $ecSettings['ThousandsSep']).$CurrencyAfter;
				}
				else {
					$MinPrice = 10000000000;
					$MaxPrice = 0;
				
					for ($i = 1; $i <= 10; $i++) {
						if ($row8['Price'.$i] > 0) {
						
							if ($row8['Price'.$i] < $MinPrice) {
								$MinPrice = $row8['Price'.$i];
							}
							if ($row8['Price'.$i] > $MaxPrice) {
								$MaxPrice = $row8['Price'.$i];
							}
						
							//$PricesList[] = $row2['Price'.$i];
							//$PriceQuantitiesList[] = $row2['PriceQty'.$i];
						
						}
					}
					
					$PriceSection = $CurrencyBefore.number_format($MinPrice,$ecSettings['PriceDecimals'], $ecSettings['DecimalSymbol'], $ecSettings['ThousandsSep']).$CurrencyAfter.' - '.$CurrencyBefore.number_format($MaxPrice,$ecSettings['PriceDecimals'], $ecSettings['DecimalSymbol'], $ecSettings['ThousandsSep']).$CurrencyAfter;
				}
				
				if ($row8['Stock'] == -1) {
					$row8['Stock'] = '';
				}
			
				$ItemsList .= $RowSpacer.'<tr><td><font face="'.$FontFace.'" size="'.$FontSize.'">'.$row8['ItemID'].'</font></td><td>&nbsp;&nbsp;&nbsp;</td><td><font face="'.$FontFace.'" size="'.$FontSize.'">'.$row8['Option1'].'</font></td><td>&nbsp;&nbsp;&nbsp;</td><td><font face="'.$FontFace.'" size="'.$FontSize.'">'.$row8['Option2'].'</font></td><td>&nbsp;&nbsp;&nbsp;</td><td align="center"><font face="'.$FontFace.'" size="'.$FontSize.'">'.$PriceSection.'</font></td><td>&nbsp;&nbsp;&nbsp;</td><td align="center"><font face="'.$FontFace.'" size="'.$FontSize.'">'.$row8['Stock'].'</font></td><td>&nbsp;&nbsp;&nbsp;</td><td align="center"><font face="'.$FontFace.'" size="'.$FontSize.'"><a href="'.$MainURL.'/admin/store-items_edit/'.$row8['RecordNumber'].'.html">'.$MsgText[9][40].'</a></font></td></tr>';

			}
			
			if ($ItemsList != '') {
				$ItemsSection = '<br><br><b>'.$MsgText[9][41].':</b><br><img src="'.$ImagesURL.'/admin/spacer.gif" width="1" height="5" alt="" border="0"><br><table width="90%" cellpadding="0" cellspacing="0" border="0"><tr><td><font face="'.$FontFace.'" size="'.$FontSize.'"><b>'.$MsgText[9][42].'</b></font></td><td>&nbsp;&nbsp;&nbsp;</td><td><font face="'.$FontFace.'" size="'.$FontSize.'"><b>'.$row4['Option1Title'].'</b></font></td><td>&nbsp;&nbsp;&nbsp;</td><td><font face="'.$FontFace.'" size="'.$FontSize.'"><b>'.$row4['Option2Title'].'</b></font></td><td>&nbsp;&nbsp;&nbsp;</td><td align="center"><font face="'.$FontFace.'" size="'.$FontSize.'"><b>'.$MsgText[9][43].'</b></font></td><td>&nbsp;&nbsp;&nbsp;</td><td align="center"><font face="'.$FontFace.'" size="'.$FontSize.'"><b>'.$MsgText[9][44].'</b></font></td><td>&nbsp;&nbsp;&nbsp;</td><td align="center"><font face="'.$FontFace.'" size="'.$FontSize.'"><b>'.$MsgText[9][45].'</b></font></td></tr>'.$ItemsList.$RowSpacer.'</table><br><b><a href="'.$MainURL.'/admin/store-items_new/'.$Arguments3.'.html">'.$MsgText[9][46].'</a></b><br>';
			}
			else {
				$ItemsSection = '<br><b>'.$MsgText[9][41].':</b><br><img src="'.$ImagesURL.'/admin/spacer.gif" width="1" height="5" alt="" border="0"><br><b><a href="'.$MainURL.'/admin/store-items_new/'.$Arguments3.'.html">'.$MsgText[9][47].'</a></b><br>';
			}
			
			
			
			
			$ImageExtension[1] = '.gif';
			$ImageExtension[2] = '.jpg';
			$ImageExtension[3] = '.png';
	
			$ThumbImageExtension[1] = '-thumb.gif';
			$ThumbImageExtension[2] = '-thumb.jpg';
			$ThumbImageExtension[3] = '-thumb.png';
			
			
			if ($row4['ImageType'] > 0) {
				$ExistingImage1 = '<br><a href="'.$ImagesURL.'/store/store_'.$row4['RecordNumber'].$ImageExtension[$row4['ImageType']].'" target="_blank"><img src="'.$ImagesURL.'/store/store_'.$row4['RecordNumber'].$ThumbImageExtension[$row4['ImageType']].'" alt="" border="0"></a><br><input type="checkbox" name="DeleteImage1" value="yes"> '.$MsgText[0][156].'<br><img src="'.$ImagesURL.'/admin/spacer.gif" width="1" height="2" alt="" border="0"><br>'.$MsgText[3][66].':<br>';
				$ExistingImage2 = '<br>';
			}
			if ($row4['ImageType2'] > 0) {
				$ExistingImage2 = '<br><a href="'.$ImagesURL.'/store/store_'.$row4['RecordNumber'].'_2'.$ImageExtension[$row4['ImageType2']].'" target="_blank"><img src="'.$ImagesURL.'/store/store_'.$row4['RecordNumber'].'_2'.$ThumbImageExtension[$row4['ImageType2']].'" alt="" border="0"></a><br><input type="checkbox" name="DeleteImage2" value="yes"> '.$MsgText[0][156].'<br><img src="'.$ImagesURL.'/admin/spacer.gif" width="1" height="2" alt="" border="0"><br>'.$MsgText[3][66].':<br>';
				$ExistingImage3 = '<br>';
			}
			if ($row4['ImageType3'] > 0) {
				$ExistingImage3 = '<br><a href="'.$ImagesURL.'/store/store_'.$row4['RecordNumber'].'_3'.$ImageExtension[$row4['ImageType3']].'" target="_blank"><img src="'.$ImagesURL.'/store/store_'.$row4['RecordNumber'].'_3'.$ThumbImageExtension[$row4['ImageType3']].'" alt="" border="0"></a><br><input type="checkbox" name="DeleteImage3" value="yes"> '.$MsgText[0][156].'<br><img src="'.$ImagesURL.'/admin/spacer.gif" width="1" height="2" alt="" border="0"><br>'.$MsgText[3][66].':<br>';
				$ExistingImage4 = '<br>';
			}
			if ($row4['ImageType4'] > 0) {
				$ExistingImage4 = '<br><a href="'.$ImagesURL.'/store/store_'.$row4['RecordNumber'].'_4'.$ImageExtension[$row4['ImageType4']].'" target="_blank"><img src="'.$ImagesURL.'/store/store_'.$row4['RecordNumber'].'_4'.$ThumbImageExtension[$row4['ImageType4']].'" alt="" border="0"></a><br><input type="checkbox" name="DeleteImage4" value="yes"> '.$MsgText[0][156].'<br><img src="'.$ImagesURL.'/admin/spacer.gif" width="1" height="2" alt="" border="0"><br>'.$MsgText[3][66].':<br>';
				$ExistingImage5 = '<br>';
			}
			if ($row4['ImageType5'] > 0) {
				$ExistingImage5 = '<br><a href="'.$ImagesURL.'/store/store_'.$row4['RecordNumber'].'_5'.$ImageExtension[$row4['ImageType5']].'" target="_blank"><img src="'.$ImagesURL.'/store/store_'.$row4['RecordNumber'].'_5'.$ThumbImageExtension[$row4['ImageType5']].'" alt="" border="0"></a><br><input type="checkbox" name="DeleteImage5" value="yes"> '.$MsgText[0][156].'<br><img src="'.$ImagesURL.'/admin/spacer.gif" width="1" height="2" alt="" border="0"><br>'.$MsgText[3][66].':<br>';
			}
			
			
					
			$PageContents = '<form action="'.$MainURL.'/admin/store-products_edit_save" method="post" enctype="multipart/form-data">

				<input type="hidden" name="MAX_FILE_SIZE" value="'.number_format(($ecSettings['MaxImageFileSize']*1024),0,'','').'">
				<input type="hidden" name="ProductIDToEdit" value="'.$row4['RecordNumber'].'">
			
			<b>'.$MsgText[9][24].':</b> ('.$MsgText[0][418].')<br><input type="text" name="ProductID" size="40" style="'.$FormStyle.'" value="'.$row4['ProductID'].'"><br><font size="1">('.$MsgText[9][25].')</font><br><br><b>'.$MsgText[9][26].':</b><br><input type="text" name="ProductName" size="55" style="'.$FormStyle.' width:400;" value="'.str_replace('"','&#34;',$row4['Name']).'"><br><br><b>'.$MsgText[9][27].':</b> ('.$MsgText[0][418].')<br><textarea name="ShortDescription" cols="40" rows="2" wrap="virtual" style="'.$FormStyle.' width:400;">'.str_replace('</textarea>','&lt;/textarea>',$row4['ShortDescription']).'</textarea><br><br><b>'.$MsgText[9][28].':</b> ('.$MsgText[0][418].')<br><textarea name="ProductDescription" cols="40" rows="6" wrap="virtual" style="'.$FormStyle.' width:400;">'.str_replace('</textarea>','&lt;/textarea>',$row4['Description']).'</textarea><br><br><b>'.$MsgText[9][29].':</b> ('.$MsgText[0][418].')<br><input type="hidden" name="MAX_FILE_SIZE" value="'.number_format(($ecSettings['MaxImageFileSize']*1024),0,'','').'">'.$ExistingImage1.'<input type="file" size="30" name="FileData" style="'.$FormStyle.'"><br>'.$ExistingImage2.'<input type="file" size="30" name="FileData2" style="'.$FormStyle.'"><br>'.$ExistingImage3.'<input type="file" size="30" name="FileData3" style="'.$FormStyle.'"><br>'.$ExistingImage4.'<input type="file" size="30" name="FileData4" style="'.$FormStyle.'"><br>'.$ExistingImage5.'<input type="file" size="30" name="FileData5" style="'.$FormStyle.'"><br><font face="Arial" size="1">('.$MsgText[0][311].': '.number_format($ecSettings['MaxImageFileSize'],0,'','').' KBytes)</font><br><br><b>'.$MsgText[9][30].':</b><br><select name="Parent" style="'.$FormStyle.'"><option value="0">'.$MsgText[0][248].'</option>'.$CategoryDropdown.'</select><br><select name="Category2" style="'.$FormStyle.'"><option value="0"></option><option value="0">'.$MsgText[0][248].'</option>'.$CategoryDropdown2.'</select><br><select name="Category3" style="'.$FormStyle.'"><option value="0"></option><option value="0">'.$MsgText[0][248].'</option>'.$CategoryDropdown3.'</select><br><select name="Category4" style="'.$FormStyle.'"><option value="0"></option><option value="0">'.$MsgText[0][248].'</option>'.$CategoryDropdown4.'</select><br><select name="Category5" style="'.$FormStyle.'"><option value="0"></option><option value="0">'.$MsgText[0][248].'</option>'.$CategoryDropdown5.'</select><br><br><br><b>'.$MsgText[9][49].':</b><br>'.$MsgText[9][50].': <input type="text" name="Option1Title" size="35" style="'.$FormStyle.' width:200;" value="'.str_replace('"','&#34;',$row4['Option1Title']).'"><br>'.$MsgText[9][51].': <input type="text" name="Option2Title" size="35" style="'.$FormStyle.' width:200;" value="'.str_replace('"','&#34;',$row4['Option2Title']).'"><br><br><br><input type="checkbox" name="DeleteProduct" value="yes"> '.$MsgText[9][52].'<br><br><br><input type="submit" value="'.$MsgText[0][123].'" style="'.$FormStyle.'"></form>';


			$PageContents .= $ItemsSection.'<br><br><form action="'.$MainURL.'/admin/store-products_new_items_bulk" method="post"><table width="400" cellpadding="1" cellspacing="0" border="0"><tr><td align="center" bgcolor="'.$Colors['Text'].'"><table width="100%" cellpadding="10" cellspacing="0" border="0"><tr><td bgcolor="'.$Colors['BG'].'"><font face="'.$FontFace.'" size="2"><input type="hidden" name="ProductID" value="'.$ProductNumber.'">'.$MsgText[9][53].' <input type="text" name="NumItems" size="2" style="'.$FormStyle.'"> '.$MsgText[9][54].'

<br><br><input type="submit" value="'.$MsgText[9][55].'" style="'.$FormStyle.'">
</font>

</td></tr></table></td></tr></table></form>';
			
			
		
		}
		else {
		
			$PageContents = $MsgText[0][97];
		
		}

	}
	else {
	
		RedirectToLogin();
	
	}

	// ========================================================================================




?>
