<?php include "../../includes/start_ajax.php";

?>

<div  align=left >
<?php



echo "<section class='view_toolbar'>";
    echo "<div class='view_toolbar_left' style='width:80%;'>";
		echo "<font size=5 ><span class='fa fa-file-text-o fa-1x'></span> <b>Stock Card Display</b></font>";

		echo "<br>";
	    
    echo "</div>";
    echo "<div class='view_toolbar_right'>";
    
		    echo "<div class='fa-stack fa-lg'  style='cursor:pointer;float:right;'  onclick=\"mon_refresh_tab(mon_current_selected_tab);\" >";
			    echo "<i class='fa fa-square fa-stack-2x color_red'   ></i><i class='fa fa-refresh fa-stack-1x color_white' ></i>";
		    echo "</div>";
			    
   
    echo "</div>";
echo "</section>";



$this_url="mod/stock_card_display/index.php";



if($_REQUEST["filter_stock_card_warehouse"]!="")
{
	$_SESSION["list_filter"]["filter_stock_card_warehouse"] = $_REQUEST["filter_stock_card_warehouse"];
		
}


if($_REQUEST["filter_stock_card_product"]!="")
{
	$_SESSION["list_filter"]["filter_stock_card_product"] = $_REQUEST["filter_stock_card_product"];
		
}




//----------------------lib-----------------------------------------
$query_device = "select * from t_".$key_table_prefix."_device ";
$result_device = mysqli_query($dbconn, $query_device);
while($line_device = mysqli_fetch_array($result_device,MYSQLI_ASSOC))
{
	
	$lib_device[$line_device["dev_android_id"]] = $line_device["dev_name"];
	
}




echo "<form name='form_stock_card' >";


	
	
	echo "<section class='view_toolbar' >";
		echo "<div class='view_toolbar_search_field'>";
			echo "<span class='fa fa-cube fa-lg'></span> Product";
		echo "</div>";
		
		echo "<div class='view_toolbar_search_button'>";
		
		
			echo "<select class='dropdown dropdown-auto' name='filter_stock_card_product' >";
			//onchange=\"mon_send_get('mod/stock_card_display/index.php','?filter_stock_card_product='+this.value,'div_main')\"
		
			echo "<option value=''>-- Select Product --</option>";
		
			$query_pdt="select * from t_".$key_table_prefix."_product order by pdt_code ; ";
			$result_pdt =mysqli_query($dbconn,$query_pdt);
			
			while($line_pdt = mysqli_fetch_array($result_pdt,MYSQLI_ASSOC))
			{
				
				if($_SESSION["list_filter"]["filter_stock_card_product"]==$line_pdt["pdt_code"])
				{
					echo "<option value='".$line_pdt["pdt_code"]."' selected >";
				}
				else {
					echo "<option value='".$line_pdt["pdt_code"]."' >";
				}
				
					echo $line_pdt["pdt_code"];
					echo " - ";
					echo $line_pdt["pdt_name"];
				echo "</option>";
				
			}
	
	
		
			echo "</select>";
		echo "</div>";
		echo "<div class='view_toolbar_action_button'>";
				echo "<br>";
		echo "</div>";
			
	echo "</section>";
	
	
	
	


//----------------------filters 1-------------------------------------------------------------


echo "<section class='view_toolbar' >";
	echo "<div class='view_toolbar_search_field'>";
		echo "<span class='fa fa-filter fa-lg'></span> Warehouse";
	echo "</div>";
	echo "<div class='view_toolbar_search_button'>";
		
		echo "<select class='dropdown dropdown-auto' name='filter_stock_card_warehouse' >";
		//onchange=\"mon_send_get('mod/stock_card_display/index.php','?filter_stock_card_warehouse='+this.value,'div_main')\"
			
			
			
			
			echo "<option value=''>-- Select Warehouse --</option>";
			
			
			$query_whs="select * from t_".$key_table_prefix."_warehouse order by whs_code ; ";
			$result_whs =mysqli_query($dbconn,$query_whs);
			
			while($line_whs = mysqli_fetch_array($result_whs,MYSQLI_ASSOC))
			{
				
				if($_SESSION["list_filter"]["filter_stock_card_warehouse"]==$line_whs["whs_code"])
				{
					echo "<option value='".$line_whs["whs_code"]."' selected >";
				}
				else {
					echo "<option value='".$line_whs["whs_code"]."' >";
				}
				
					echo $line_whs["whs_code"];
					echo " - ";
					echo $line_whs["whs_name"];
				echo "</option>";
				
			}


		
			echo "</select>";
	
	
	echo "</div>";
	echo "<div class='view_toolbar_action_button'>";
		echo "<br>";
	echo "</div>";
		
echo "</section>";






echo "<section class='view_toolbar' >";
	echo "<div class='view_toolbar_search_field'>";
		echo "<span class='fa fa-calendar fa-lg'></span> Start Date";
	echo "</div>";
	echo "<div class='view_toolbar_search_button'>";
			if($_REQUEST["start_date"]=="")
			{
				$_REQUEST["start_date"] = date("Y-m-01");	
			}
			echo "<input type=text class='textbox textbox-s' name='start_date' value='".$_REQUEST["start_date"]."' onfocus=blur() >";
			echo "<a href=\"javascript:void(0)\" onclick=\"if(self.gfPop)gfPop.fStartPop(document.form_stock_card.start_date,document.form_stock_card.end_date);"."return false;\" HIDEFOCUS>";
			//echo "<img class=\"PopcalTrigger\" align=\"absmiddle\" "."src=".$addon_path.$theme_path."icon/calendar.gif border=0>";
			echo " <span class='fa fa-calendar fa-lg'></font>";
			echo "</a>"; 
			
			
	echo "</div>";
	echo "<div class='view_toolbar_action_button'>";
		echo "<br>";
	echo "</div>";
		
echo "</section>";



echo "<section class='view_toolbar' >";
	echo "<div class='view_toolbar_search_field'>";
		echo "<span class='fa fa-calendar fa-lg'></span> End Date";
	echo "</div>";
	echo "<div class='view_toolbar_search_button'>";
		
			if($_REQUEST["end_date"]=="")
			{
				$_REQUEST["end_date"] = date("Y-m-d");
			}
			echo "<input type=text class='textbox textbox-s' name='end_date' value='".$_REQUEST["end_date"]."' onfocus=blur() >";
			echo "<a href=\"javascript:void(0)\" onclick=\"if(self.gfPop)gfPop.fEndPop(document.form_stock_card.start_date,document.form_stock_card.end_date);"."return false;\" HIDEFOCUS>";
			//echo "<img class=\"PopcalTrigger\" align=\"absmiddle\" "."src=".$addon_path.$theme_path."icon/calendar.gif border=0>";
			echo " <span class='fa fa-calendar fa-lg'></font>";
			echo "</a>"; 
	
	
	echo "</div>";
	echo "<div class='view_toolbar_action_button'>";
		echo "<br>";
	echo "</div>";
		
echo "</section>";




//--------------------------

echo "<section class='view_toolbar' >";
	echo "<div class='view_toolbar_search_field'>";
		
	echo "</div>";
	echo "<div class='view_toolbar_search_button'>";
	
	
		echo "  <input type=button class='button button-blue' name='Display Stock Card'  value='Display Stock Card' onclick=\"mon_submit_form('form_stock_card','mod/stock_card_display/index.php');\">";
	
		echo "  <input type=button class='button button-grey' value='Print Stock Card' onclick=\"print_page('print/stock_card_report/index.php?warehouse='+encodeURIComponent(document.form_stock_card.filter_stock_card_warehouse.value.replace(/&/g, '%26'))+'&product='+document.form_stock_card.filter_stock_card_product.value+'&start_date='+document.form_stock_card.start_date.value+'&end_date='+document.form_stock_card.end_date.value)\">";
		
	echo "</div>";
	echo "<div class='view_toolbar_action_button'>";
			echo "<br>";
	echo "</div>";
		
echo "</section>";



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


$col_width[1]="80";
$col_width[2]="100";
$col_width[3]="150";
$col_width[4]="150";
$col_width[5]="150";
$col_width[6]="100";
$col_width[7]="100";
$col_width[8]="100";





echo "<div class='data_display_content'>";	




	echo "<div class='view_list_title_row'>";
		echo "<div class='view_list_title_content'>";
			
			echo "<div style='width:".$col_width[1]."px;' class='view_list_title_content_object'  >";
				echo "<b>Date</b>";
			echo "</div>";
			
			
			echo "<div style='width:".$col_width[2]."px;' class='view_list_title_content_object'  >";
				echo "<b>Transaction Type</b>";
			echo "</div>";
			
			
			echo "<div style='width:".$col_width[3]."px;' class='view_list_title_content_object'  >";
				echo "<b>Document</b>";
			echo "</div>";
			
			
			echo "<div style='width:".$col_width[4]."px;' class='view_list_title_content_object'  >";
				echo "<b>Color/Size/Pattern/Remark</b>";
			echo "</div>";
			
			echo "<div style='width:".$col_width[5]."px;' class='view_list_title_content_object'  >";
				echo "<b>Device</b>";
			echo "</div>";
			
			echo "<div style='width:".$col_width[6]."px;' class='view_list_title_content_object'  >";
				echo "<b>Plus(+)</b>";
			echo "</div>";
			
			
			echo "<div style='width:".$col_width[7]."px;' class='view_list_title_content_object'  >";
				echo "<b>Minus(-)</b>";
			echo "</div>";
			
			echo "<div style='width:".$col_width[8]."px;' class='view_list_title_content_object'  >";
				echo "<b>Balance</b>";
			echo "</div>";
			
		echo "</div>";
	echo "</div>";
			
	
	

	$query_pdt="select * from t_".$key_table_prefix."_product  ";		
	$query_pdt=$query_pdt." where pdt_code = '".$_SESSION["list_filter"]["filter_stock_card_product"]."' ";
	$result_pdt =mysqli_query($dbconn,$query_pdt);
	if($line_pdt = mysqli_fetch_array($result_pdt,MYSQLI_ASSOC))
	{
		
		$this_product_decimal = 5;
		
		
		$this_balance =0 ;
		
		$query_balance="select 
					sum(bal_quantity) as total_quantity 
					from t_".$key_table_prefix."_balance
					where bal_product_code = '".$_SESSION["list_filter"]["filter_stock_card_product"]."'
					";
		if($_SESSION["list_filter"]["filter_stock_card_warehouse"]!="ALL")		 
		{
			$query_balance = $query_balance." and bal_warehouse_code = '".$_SESSION["list_filter"]["filter_stock_card_warehouse"]."' ";
		}
		
		
		$result_balance=mysqli_query($dbconn,$query_balance);
		if($line_balance=mysqli_fetch_array($result_balance,MYSQLI_ASSOC))
		{
			$this_balance = $line_balance["total_quantity"];
			
			
		}
		
		
		$total_cards_quantity=0;
		
		$query_card="select 
				sum(abs(stc_base_quantity)) as total_quantity,
				stc_type
		
				from t_".$key_table_prefix."_stock_card 
				where  stc_date >= '".$_REQUEST["start_date"]."'
				and  stc_date <= '".$_REQUEST["end_date"]."'
				
				and stc_warehouse_code = '".$_REQUEST["filter_stock_card_warehouse"]."'
				and stc_stock_code = '".$_REQUEST["filter_stock_card_product"]."'
				
				group by stc_type 
				";
		
		$result_card =mysqli_query($dbconn,$query_card);
		while($line_card = mysqli_fetch_array($result_card,MYSQLI_ASSOC))
		{
			if($line_card["stc_type"]=="PLUS")
			{
				$total_cards_quantity  =  $total_cards_quantity + $line_card["total_quantity"];
			}
			
			if($line_card["stc_type"]=="MINUS")
			{
				$total_cards_quantity  =  $total_cards_quantity - $line_card["total_quantity"];
			}
			
			
		}
		
		
		$this_open_balance = $this_balance - $total_cards_quantity;
		$this_running_balance = $this_open_balance;
		
		
		//==============top=====================================
			
			echo "<div class='view_row'>";
			
			
				echo "<div style='width:".$col_width[1]."px;text-align:left;' class='view_row_content_object'  >";
					echo "<font class='view_row_content_label'>Date</font>";
					echo "<font class='view_row_content_text'>";
						echo "<font color=#000><b>".$_REQUEST["start_date"]."</b></font> ";
					echo "</font><br>";			
				echo "</div>";
				
				echo "<div style='width:".$col_width[2]."px;text-align:left;' class='view_row_content_object'  >";
					echo "<font class='view_row_content_label'></font>";
					echo "<font class='view_row_content_text'>";
						echo "<font color=#000><b>Openning</b></font> ";
					echo "</font><br>";			
				echo "</div>";
				
				
				echo "<div style='width:".$col_width[3]."px;text-align:left;' class='view_row_content_object'  >";
					echo "<font class='view_row_content_label'></font>";
					echo "<font class='view_row_content_text'>";
						echo "<font color=#000></font> ";
					echo "</font><br>";			
				echo "</div>";
				
				
				echo "<div style='width:".$col_width[4]."px;text-align:left;' class='view_row_content_object'  >";
					echo "<font class='view_row_content_label'></font>";
					echo "<font class='view_row_content_text'>";
						echo "<font color=#000></font> ";
					echo "</font><br>";			
				echo "</div>";
				
				echo "<div style='width:".$col_width[5]."px;text-align:left;' class='view_row_content_object'  >";
					echo "<font class='view_row_content_label'></font>";
					echo "<font class='view_row_content_text'>";
						echo "<font color=#000></font> ";
					echo "</font><br>";			
				echo "</div>";
				
				
				
				echo "<div style='width:".$col_width[6]."px;text-align:left;' class='view_row_content_object'  >";
					echo "<font class='view_row_content_label'></font>";
					echo "<font class='view_row_content_text'>";
						echo "<font color=#000></font> ";
					echo "</font><br>";			
				echo "</div>";
				
				
				echo "<div style='width:".$col_width[7]."px;text-align:left;' class='view_row_content_object'  >";
					echo "<font class='view_row_content_label'></font>";
					echo "<font class='view_row_content_text'>";
						echo "<font color=#000></font> ";
					echo "</font><br>";			
				echo "</div>";
				
				
				echo "<div style='width:".$col_width[8]."px;text-align:right;' class='view_row_content_object'  >";
					echo "<font class='view_row_content_label'>Balance</font>";
					echo "<font class='view_row_content_text'>";
						echo "<font color=#0000aa><b>".number_format($this_open_balance,$this_product_decimal,".",",")."</b></font> ";
					echo "</font><br>";			
				echo "</div>";
				
			echo "</div>";
			
			
		
		
		
		//==============card=====================================
		
		$query_card="select * from t_".$key_table_prefix."_stock_card 
				where  stc_date >= '".$_REQUEST["start_date"]."'
				and  stc_date <= '".$_REQUEST["end_date"]."'
				
				and stc_warehouse_code = '".$_REQUEST["filter_stock_card_warehouse"]."'
				and stc_stock_code = '".$_REQUEST["filter_stock_card_product"]."'
				
				order by stc_date , stc_id 
				";
		
		$result_card =mysqli_query($dbconn,$query_card);
		while($line_card = mysqli_fetch_array($result_card,MYSQLI_ASSOC))
		{
		

			echo "<div class='view_row'>";
			
			
				echo "<div style='width:".$col_width[1]."px;text-align:left;' class='view_row_content_object'  >";
					echo "<font class='view_row_content_label'>Date</font>";
					echo "<font class='view_row_content_text'>";
						echo "<font color=#000>".$line_card["stc_date"]."</font> ";
					echo "</font><br>";			
				echo "</div>";
			
			
				echo "<div style='width:".$col_width[2]."px;text-align:left;' class='view_row_content_object'  >";
					echo "<font class='view_row_content_label'>Transaction Type</font>";
					echo "<font class='view_row_content_text'>";
						echo "<font color=#000>".$line_card["stc_module"]."</font> ";
					echo "</font><br>";			
				echo "</div>";
				
				
				echo "<div style='width:".$col_width[3]."px;text-align:left;' class='view_row_content_object'  >";
					echo "<font class='view_row_content_label'>Document</font>";
					echo "<font class='view_row_content_text'>";
					
					if($line_card["stc_module"]=="SALES")
					{
						echo "<a href='#' onclick=\"mon_send_get('mod/transaction/display.php','?ivh_doc_no=".$line_card["stc_doc_no"]."','div_display')\" >";
						echo "<font color=#0000ff>";
						echo "".$line_card["stc_doc_no"]." <span class='fa fa-external-link' ></span></font>";
						echo "</a> ";
					}
					elseif($line_card["stc_module"]=="RETURN") {
						echo "<a href='#' onclick=\"mon_send_get('mod/transaction_return/display.php','?rth_doc_no=".$line_card["stc_doc_no"]."','div_display')\" >";
						echo "<font color=#0000ff>";
						echo "".$line_card["stc_doc_no"]."</font>";
						echo "</a> ";
					}
					elseif(($line_card["stc_module"]=="STOCK_IN") or ($line_card["stc_module"]=="STOCK_OUT") or ($line_card["stc_module"]=="STOCK_TRANSFER")) {
						echo "<a href='#' onclick=\"mon_send_get('mod/stock_transaction/display.php','?sth_doc_no=".$line_card["stc_doc_no"]."','div_display')\" >";
						echo "<font color=#0000ff>";
						echo "".$line_card["stc_doc_no"]."</font>";
						echo "</a> ";
					}
					elseif($line_card["stc_module"]=="STOCK_ADJUST") {
						
						echo "<font color=#D35400>";
						echo "".$line_card["stc_doc_no"]."</font>";
						echo "</a> ";
					}
					
					

					
					else{
						echo "<font color=#000>";
						echo "".$line_card["stc_doc_no"]."</font>";
						
						
					}	
						
					echo "</font><br>";			
				echo "</div>";
				
				
				
				echo "<div style='width:".$col_width[4]."px;text-align:left;' class='view_row_content_object'  >";
					echo "<font class='view_row_content_label'>Color/Size/Pattern/Remark</font>";
					echo "<font class='view_row_content_text'>";
					
						echo "<font color=#000>";
						
						
						
						
						
						
						
						
						
						
						$this_text="";
						if($line_card["stc_color"]!="")
						{
							if($this_text=="")
							{
								$this_text=$line_card["stc_color"];
							}
							else {
								$this_text=$this_text."./".$line_card["stc_color"];
							}
							
						}
					
						if($line_card["stc_size"]!="")
						{
							if($this_text=="")
							{
								$this_text=$line_card["stc_size"];
							}
							else {
								$this_text=$this_text."./".$line_card["stc_size"];
							}
							
						}
						
						
						if($line_card["stc_pattern"]!="")
						{
							if($this_text=="")
							{
								$this_text=$line_card["stc_pattern"];
							}
							else {
								$this_text=$this_text."./".$line_card["stc_pattern"];
							}
						}
						
						
						
						
						//get remark:
						
						if(($line_card["stc_module"]=="STOCK_IN") or ($line_card["stc_module"]=="STOCK_OUT") or ($line_card["stc_module"]=="STOCK_TRANSFER")) {
							
							
							$query_document = "select * from t_".$key_table_prefix."_stock_transaction_header
										where sth_doc_no = '".$line_card["stc_doc_no"]."'  ";
							$result_document = mysqli_query($dbconn, $query_document);
							
							if($line_document = mysqli_fetch_array($result_document,MYSQLI_ASSOC))
							{
								
								if($this_text=="")
								{
									$this_text=$line_document["sth_remark"];
								}
								else {
									$this_text=$this_text."./".$line_document["sth_remark"];
								}
								
								
							}	
							
						}
						
						
						echo $this_text;
						
						
					echo "</font><br>";			
				echo "</div>";
				
				
				echo "<div style='width:".$col_width[5]."px;text-align:left;' class='view_row_content_object'  >";
					echo "<font class='view_row_content_label'>Device</font>";
					echo "<font class='view_row_content_text'>";
					
						if(isset($lib_device[$line_card["device_id"]]))
						{
							echo "<font color=#000>".$lib_device[$line_card["device_id"]]."</font> ";
						}
						else {
							echo "<font color=#000>".$line_card["device_id"]."</font> ";
						}
						
					echo "</font><br>";			
				echo "</div>";
				
				
				
				if($line_card["stc_type"]=="PLUS")
				{
					echo "<div style='width:".$col_width[6]."px;text-align:right;' class='view_row_content_object'  >";
						echo "<font class='view_row_content_label'>Plus(+)</font>";
						echo "<font class='view_row_content_text'>";
							echo "<font color=#00bb00>".number_format($line_card["stc_base_quantity"],$this_product_decimal,".",",")."</font> ";
						echo "</font><br>";			
					echo "</div>";
				
					echo "<div style='width:".$col_width[7]."px;text-align:right;' class='view_row_content_object'  >";
						echo "<font class='view_row_content_label'>Minus(-)</font>";
						echo "<font class='view_row_content_text'>";
							echo "<font color=#000></font> ";
						echo "</font><br>";			
					echo "</div>";
					
					$this_running_balance = $this_running_balance  + abs($line_card["stc_base_quantity"]);
					
				}
				
				if($line_card["stc_type"]=="MINUS")
				{
					echo "<div style='width:".$col_width[6]."px;text-align:right;' class='view_row_content_object'  >";
						echo "<font class='view_row_content_label'>Plus(+)</font>";
						echo "<font class='view_row_content_text'>";
							echo "<font color=#000></font> ";
						echo "</font><br>";			
					echo "</div>";
					
					echo "<div style='width:".$col_width[7]."px;text-align:right;' class='view_row_content_object'  >";
						echo "<font class='view_row_content_label'>Minus(-)</font>";
						echo "<font class='view_row_content_text'  >";
							echo "<font color=#ee0000>".number_format($line_card["stc_base_quantity"],$this_product_decimal,".",",")."</font> ";
						echo "</font><br>";			
					echo "</div>";
					
					$this_running_balance = $this_running_balance  - abs($line_card["stc_base_quantity"]);
					
				}
				
				
				
				
				
				echo "<div style='width:".$col_width[8]."px;text-align:right;' class='view_row_content_object'  >";
					echo "<font class='view_row_content_label'>Balance</font>";
					echo "<font class='view_row_content_text'  >";
						echo "<font color=#0000aa>".number_format($this_running_balance,$this_product_decimal,".",",")."</font> ";
					echo "</font><br>";			
				echo "</div>";
				
				
				
			echo "</div>";
	
		}
		
		
		
		
		
		
		
		
		//==============bottom=====================================
			echo "<div class='view_row'>";
			
			
				echo "<div style='width:".$col_width[1]."px;text-align:left;' class='view_row_content_object'  >";
					echo "<font class='view_row_content_label'>Date</font>";
					echo "<font class='view_row_content_text'>";
						echo "<font color=#000><b>".$_REQUEST["end_date"]."</b></font> ";
					echo "</font><br>";			
				echo "</div>";
				
				echo "<div style='width:".$col_width[2]."px;text-align:left;' class='view_row_content_object'  >";
					echo "<font class='view_row_content_label'></font>";
					echo "<font class='view_row_content_text'>";
						echo "<font color=#000><b>Closing</b></font> ";
					echo "</font><br>";			
				echo "</div>";
				
				echo "<div style='width:".$col_width[3]."px;text-align:left;' class='view_row_content_object'  >";
					echo "<font class='view_row_content_label'></font>";
					echo "<font class='view_row_content_text'>";
						echo "<font color=#000></font> ";
					echo "</font><br>";			
				echo "</div>";
				
				
				echo "<div style='width:".$col_width[4]."px;text-align:left;' class='view_row_content_object'  >";
					echo "<font class='view_row_content_label'></font>";
					echo "<font class='view_row_content_text'>";
						echo "<font color=#000></font> ";
					echo "</font><br>";			
				echo "</div>";
				
				
				echo "<div style='width:".$col_width[5]."px;text-align:left;' class='view_row_content_object'  >";
					echo "<font class='view_row_content_label'></font>";
					echo "<font class='view_row_content_text'>";
						echo "<font color=#000></font> ";
					echo "</font><br>";			
				echo "</div>";
				
				
				echo "<div style='width:".$col_width[6]."px;text-align:left;' class='view_row_content_object'  >";
					echo "<font class='view_row_content_label'></font>";
					echo "<font class='view_row_content_text'>";
						echo "<font color=#000></font> ";
					echo "</font><br>";			
				echo "</div>";
				
				
				echo "<div style='width:".$col_width[8]."px;text-align:left;' class='view_row_content_object'  >";
					echo "<font class='view_row_content_label'></font>";
					echo "<font class='view_row_content_text'>";
						echo "<font color=#000></font> ";
					echo "</font><br>";			
				echo "</div>";
				
				
				
				
				
				
				
				echo "<div style='width:".$col_width[7]."px;text-align:right;' class='view_row_content_object'  >";
					echo "<font class='view_row_content_label'></font>";
					echo "<font class='view_row_content_text'>";
						echo "<font color=#0000aa><b>".$this_balance."</b></font> ";
					echo "</font><br>";			
				echo "</div>";
				
				
				
				
			echo "</div>";
				
		
	}//end product







echo "</div>"; //display content









echo "<div style='float:left;height:200px;'></div>";

echo "</form>";
?>
</div>
<?php include "../../includes/end_ajax.php";

?>
