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

?>

<div  align=left >
<?php

$form_row_count=50;


if($_REQUEST["posting_date"]=="")
{

  $_REQUEST["posting_date"]=date("Y-m-d");


}


echo "<section class='view_toolbar'>";
    echo "<div class='view_toolbar_left' style='width:80%;'>";
		echo "<font size=5 ><span class='fa fa-exchange fa-1x'></span> <b>Stock Transfer (Multi)</b></font>";
    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>";



$cell_width="50";

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




$query_pdt_count="select count(pdt_id) as total,
			pdt_category_code
			from t_".$key_table_prefix."_product
			group by pdt_category_code ; ";
$result_pdt_count =mysqli_query($dbconn,$query_pdt_count);
while($line_pdt_count = mysqli_fetch_array($result_pdt_count,MYSQLI_ASSOC))
{
	$category_product_count[$line_pdt_count["pdt_category_code"]]=$line_pdt_count["total"];
}



$query_warehouse = "select *
                  from t_".$key_table_prefix."_warehouse
                  where whs_status = 'ACTIVE'
                   ";
$result_warehouse = mysqli_query($dbconn, $query_warehouse);
while($line_warehouse = mysqli_fetch_array($result_warehouse, MYSQLI_ASSOC))
{


    $lib_warehouse[$line_warehouse["whs_id"]] = $line_warehouse;



}



$query_get_balance = "select * from t_".$key_table_prefix."_balance
                        where bal_warehouse_id = '".$_REQUEST["warehouse_from_id"]."' " ;
$result_get_balance = mysqli_query($dbconn, $query_get_balance);
while($line_get_balance = mysqli_fetch_array($result_get_balance, MYSQLI_ASSOC))
{
    $balance[$line_get_balance["bal_product_code"]]["BAL"] = $line_get_balance["bal_quantity"];

}

//print_r($balance);




if ($_SERVER[REQUEST_METHOD] == 'POST') {


      if($_REQUEST["user_action"]=="CONFIRM")
      {



              $error_msg = "";


              if($_REQUEST["posting_date"]=="")
              {

                    $error_msg = $error_msg."<li>Posting Date is empty</li>";

              }





              for($row=1;$row<=$form_row_count;$row++)
              {


                      $code_found =false;

                      if($_REQUEST["cd_".$row]!="")
                      {
                          $code_found = true;

                          //verify code :


                          $query_check_product = "select * from t_".$key_table_prefix."_product
                                                  where pdt_barcode = '".$_REQUEST["cd_".$row]."' ";
                          $result_check_product = mysqli_query($dbconn, $query_check_product);
                          if($line_check_product = mysqli_fetch_array($result_check_product, MYSQLI_ASSOC))
                          {

                          }else {

                                $error_msg = $error_msg."<li>Invalid Product barcode: ".$_REQUEST["cd_".$row]." at row ".$row."</li>";

                          }



                      }
                      else {


                      }


                      //echo $_REQUEST["cd_".$row];
                      //echo $_REQUEST["nm_".$row];
                      //echo $_REQUEST["cs_".$row];

                      $qty_found =false;


                      foreach($lib_warehouse as $whs_id => $whs_data)
                      {

                              if($_REQUEST["warehouse_from_id"]==$whs_id)
                              {

                              }
                              else {



                                  //echo $_REQUEST["q_".$whs_id."_".$row];

                                  if($_REQUEST["q_".$whs_id."_".$row]!="")
                                  {

                                    if(is_numeric($_REQUEST["q_".$whs_id."_".$row]))
                                    {
                                        if($_REQUEST["q_".$whs_id."_".$row]>0)
                                        {
                                            $qty_found =true;



                                            if($_REQUEST["cd_".$row]!="")
                                            {

                                                  $posting_data[$whs_id][$row]["code"] = $_REQUEST["cd_".$row];
                                                  $posting_data[$whs_id][$row]["name"] = $_REQUEST["nm_".$row];
                                                  $posting_data[$whs_id][$row]["cost"] = $_REQUEST["cs_".$row];
                                                  $posting_data[$whs_id][$row]["quantity"] = $_REQUEST["q_".$whs_id."_".$row];


                                            }


                                        }
                                        else {

                                          $error_msg = $error_msg."<li>Quantity must be positive at row ".$row."</li>";
                                        }

                                    }else {

                                        $error_msg = $error_msg."<li>Quantity must be numeric at row ".$row."</li>";
                                    }

                                  }




                              }
                      }


                      if($code_found)
                      {

                          if($qty_found)
                          {

                          }
                          else {

                            $error_msg = $error_msg."<li>No Quantity found at row ".$row."</li>";


                          }

                      }









              }


          if($error_msg=="")
          {


                $this_doc_prefix="ST";
                $this_doc_number_module_code="ST";
                $this_module="STOCK_TRANSFER";
                $this_inventory_posting_type="MINUS";
                $this_inventory_posting_type2="PLUS";




                //get warehouse (from):
                $query_whs="select * from t_".$key_table_prefix."_warehouse
                  where whs_id  = '".$_REQUEST["warehouse_from_id"]."' ";
                $result_whs  = mysqli_query($dbconn,$query_whs);
                if($line_whs = mysqli_fetch_array($result_whs,MYSQLI_ASSOC))
                {
                      $this_warehouse_from_id = $line_whs["whs_id"];
                      $this_warehouse_from_code = $line_whs["whs_code"];
                }







                foreach($posting_data as $to_whs_id => $data_value1)
                {

                      // echo '<hr>';
                      // echo 'Warehouse: '.$to_whs_id;
                      // echo '<br>';


                      //get warehouse (to):
                      $query_whs="select * from t_".$key_table_prefix."_warehouse
                        where whs_id  ='".$to_whs_id."' ";
                      $result_whs  = mysqli_query($dbconn,$query_whs);
                      if($line_whs = mysqli_fetch_array($result_whs,MYSQLI_ASSOC))
                      {
                        $this_warehouse_to_id = $line_whs["whs_id"];
                        $this_warehouse_to_code = $line_whs["whs_code"];

                      }



                      $this_doc_no = mon_register_document_number($this_doc_number_module_code);

                      $posted_document_list[$this_doc_no]=$this_doc_no;


                      $this_customer_code="";
                      $this_customer_name="";

                      $this_vendor_code="";
                      $this_vendor_name="";




                      $header_before_gst_amount = 0;
                      $header_gst_amount = 0;
                      $header_total_amount = 0;



                      foreach($posting_data[$to_whs_id] as $entry_row => $data_value2)
                      {

                            $this_row_cost = $posting_data[$to_whs_id][$entry_row]["cost"] * $posting_data[$to_whs_id][$entry_row]["quantity"];


                            $header_before_gst_amount = $header_before_gst_amount + $this_row_cost;
                            $header_total_amount = $header_total_amount + $this_row_cost;


                            // echo 'Code:'.$posting_data[$to_whs_id][$entry_row]["code"].'<br>';
                            // echo 'Name:'.$posting_data[$to_whs_id][$entry_row]["name"].'<br>';
                            // echo 'Cost:'.$posting_data[$to_whs_id][$entry_row]["cost"].'<br>';
                            // echo 'QTY:'.$posting_data[$to_whs_id][$entry_row]["quantity"].'<br>';

                      }





                      $query="insert into t_".$key_table_prefix."_stock_transaction_header
                                  (
                                  sth_doc_prefix  ,
                                  sth_doc_no  ,
                                  sth_module  ,
                                  sth_date ,

                                  sth_warehouse_code  ,
                                  sth_warehouse_id  ,

                                  sth_warehouse_code2  ,
                                  sth_warehouse_id2  ,

                                  sth_customer_code  ,
                                  sth_customer_name  ,
                                  sth_vendor_code  ,
                                  sth_vendor_name  ,
                                  sth_reference_no  ,
                                  sth_remark  ,
                                  sth_status  ,
                                  sth_before_gst_amount ,
                                  sth_gst_amount  ,
                                  sth_total_amount  ,
                                  created_date  ,
                                  created_by  ,
                                  modified_date  ,
                                  modified_by  ,
                                  client_id
                                  )
                                  values
                                  (
                                  '".$this_doc_prefix."'  ,
                                  '".$this_doc_no."'  ,
                                  '".$this_module."'  ,
                                  '".$_REQUEST["posting_date"]."' ,

                                  '".$this_warehouse_from_code."' ,
                                  '".$this_warehouse_from_id."'  ,

                                  '".$this_warehouse_to_code."' ,
                                  '".$this_warehouse_to_id."'  ,


                                  '".$this_customer_code."'  ,
                                  '".$this_customer_name."'  ,
                                  '".$this_vendor_code."'  ,
                                  '".$this_vendor_name."'  ,
                                  '".$_REQUEST["reference_no"]."'  ,
                                  '".$_REQUEST["remark"]."'  ,
                                  'POSTED'  ,
                                  '".($header_before_gst_amount+0)."' ,
                                  '".($header_gst_amount+0)."' ,
                                  '".($header_total_amount+0)."' ,
                                  '".date("Y-m-d H:i:s")."'  ,
                                  '".$CurrentUserID."'  ,
                                  '".date("Y-m-d H:i:s")."'  ,
                                  '".$CurrentUserID."'  ,
                                  '0'
                                  )

                                  ";

                                //  echo $query;

                      $result = mysqli_query($dbconn,$query) or die("Error insert Header".mysqli_error($dbconn).$query);
                      $header_id  = mysqli_insert_id($dbconn);




                      foreach($posting_data[$to_whs_id] as $entry_row => $data_value2)
                      {

                                    // echo 'Code:'.$posting_data[$to_whs_id][$entry_row]["code"].'<br>';
                                    // echo 'Name:'.$posting_data[$to_whs_id][$entry_row]["name"].'<br>';
                                    // echo 'Cost:'.$posting_data[$to_whs_id][$entry_row]["cost"].'<br>';
                                    // echo 'QTY:'.$posting_data[$to_whs_id][$entry_row]["quantity"].'<br>';




                                      $query_product = "select *
                                            from t_".$key_table_prefix."_product
                                            where pdt_barcode = '".$posting_data[$to_whs_id][$entry_row]["code"]."' ";
                                      $result_product = mysqli_query($dbconn,$query_product);
                                      if($line_product = mysqli_fetch_array($result_product,MYSQLI_ASSOC))
                                      {


                                                $query_item="insert into t_".$key_table_prefix."_stock_transaction_item
                                                    (

                                                      sti_header_id  ,
                                                      sti_doc_prefix  ,
                                                      sti_doc_no  ,
                                                      sti_module  ,
                                                      sti_date  ,
                                                      sti_warehouse_code  ,
                                                      sti_warehouse_id  ,

                                                      sti_warehouse_code2  ,
                                                      sti_warehouse_id2  ,


                                                      sti_stock_code  ,
                                                      sti_barcode  ,
                                                      sti_factory_code  ,
                                                      sti_stock_name  ,
                                                      sti_color  ,
                                                      sti_size  ,
                                                      sti_pattern  ,
                                                      sti_uom  ,
                                                      sti_base_uom  ,
                                                      sti_quantity  ,
                                                      sti_base_quantity  ,
                                                      sti_conversion  ,
                                                      sti_unit_cost  ,
                                                      sti_base_unit_cost  ,
                                                      sti_total_cost  ,
                                                      sti_gst_mode  ,
                                                      sti_gst_code  ,
                                                      sti_gst_percentage  ,
                                                      sti_remark  ,
                                                      sti_status  ,
                                                      sti_before_gst_amount  ,
                                                      sti_gst_amount  ,
                                                      sti_total_amount  ,

                                                      sti_storage_location  ,
                                                      sti_storage_location2  ,


                                                      created_date  ,
                                                      created_by  ,
                                                      modified_date  ,
                                                      modified_by  ,
                                                      client_id
                                                    )
                                                    values
                                                    (
                                                    '".$header_id."'  ,

                                                    '".$this_doc_prefix."'  ,
                                                    '".$this_doc_no."'  ,
                                                    '".$this_module."'  ,
                                                    '".$_REQUEST["posting_date"]."' ,
                                                    '".$this_warehouse_from_code."' ,
                                                    '".$this_warehouse_from_id."'  ,

                                                    '".$this_warehouse_to_code."' ,
                                                    '".$this_warehouse_to_id."'  ,

                                                      '".$line_product["pdt_code"]."'  ,
                                                      '".$posting_data[$to_whs_id][$entry_row]["code"]."'  ,

                                                        ''  ,
                                                        '".$posting_data[$to_whs_id][$entry_row]["name"]."'  ,
                                                        ''  ,
                                                        ''  ,
                                                        ''  ,
                                                        '".$line_product["pdt_uom"]."'  ,
                                                        '".$line_product["pdt_uom"]."'  ,
                                                        '".($posting_data[$to_whs_id][$entry_row]["quantity"]+0)."'  ,
                                                        '".($posting_data[$to_whs_id][$entry_row]["quantity"]+0)."'  ,
                                                        '1'  ,
                                                        '".($posting_data[$to_whs_id][$entry_row]["cost"]+0)."'  ,
                                                        '".($posting_data[$to_whs_id][$entry_row]["cost"]+0)."'  ,
                                                        '".(($posting_data[$to_whs_id][$entry_row]["cost"]*$posting_data[$to_whs_id][$entry_row]["quantity"])+0)."'  ,
                                                        ''  ,
                                                        ''  ,
                                                        '".(0)."'  ,
                                                        ''  ,
                                                        'POSTED'  ,
                                                        '".(($posting_data[$to_whs_id][$entry_row]["cost"]*$posting_data[$to_whs_id][$entry_row]["quantity"])+0)."'  ,
                                                        '".(0)."'  ,
                                                        '".(($posting_data[$to_whs_id][$entry_row]["cost"]*$posting_data[$to_whs_id][$entry_row]["quantity"])+0)."'  ,


                                                        ''  ,
                                                        ''  ,

                                                        '".date("Y-m-d H:i:s")."'  ,

                                                        '".$CurrentUserID."'  ,
                                                        '".date("Y-m-d H:i:s")."'  ,
                                                        '".$CurrentUserID."'  ,
                                                        '0'

                                                    );
                                                    ";

                                                $result_item = mysqli_query($dbconn,$query_item) or die("Error Insert ITEM".mysqli_error($dbconn));
                                                $last_item_id = mysqli_insert_id($dbconn);


                                        //------------------------Part 1: minus:-------------------------
                                        post_inventory_balance(
                                                      'SERVER',
                                                      $_REQUEST["posting_date"],
                                                      $this_doc_no,
                                                      $last_item_id,

                                                      $this_module,

                                                      $this_inventory_posting_type,
                                                      $this_warehouse_from_code,
                                                      $line_product["pdt_code"],
                                                      $line_product["pdt_uom"],
                                                      $posting_data[$to_whs_id][$entry_row]["quantity"],
                                                      "",
                                                      "",
                                                      ""
                                                      );




                                        //------------------------Part 2: plus:-------------------------
                                        post_inventory_balance(
                                                      'SERVER',
                                                      $_REQUEST["posting_date"],
                                                      $this_doc_no,
                                                      $last_item_id,

                                                      $this_module,

                                                      $this_inventory_posting_type2,
                                                      $this_warehouse_to_code,
                                                      $line_product["pdt_code"],
                                                      $line_product["pdt_uom"],
                                                      $posting_data[$to_whs_id][$entry_row]["quantity"],
                                                      "",
                                                      "",
                                                      ""
                                            );





                                      }//end query product








                      }







                }




                // echo '<pre>';
                // print_r($posting_data);
                // echo '</pre>';




                if(count($posted_document_list))
                {


                      echo '<br><br><br>';
                      echo '<div style="border:1px solid #00AA00;background:#eeffee;margin:20px;width:500px;padding:10px;border-radius:6px;">';
                        echo 'Document Posted:<br>';

                          foreach($posted_document_list as $posted_document_no)
                          {
                              echo '<li>'.$posted_document_no.'</li>';
                          }

                      echo '</div>';




                            $_REQUEST["posting_date"]=date("Y-m-d");
                            $_REQUEST["reference_no"]="";
                            $_REQUEST["remark"]="";


                            for($row=1;$row<=$form_row_count;$row++)
                            {
                                $_REQUEST["cd_".$row] = "";
                                $_REQUEST["nm_".$row] = "";
                                $_REQUEST["cs_".$row] = "";

                                  foreach($lib_warehouse as $whs_id => $whs_data)
                                  {
                                        $_REQUEST["q_".$whs_id."_".$row] = "";
                                  }
                            }





                            displaymessage("Created","CREATED");

                }
                else {

                  displaymessage("Nothing Posted","FAIL");
                }








          }else{

              displaymessage("Error","FAIL");



          }






      }

}






echo '<div style="width:96%;padding:2%;">'  ;

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

      echo '<input type="hidden" name="user_action" value="" >';




            if($error_msg=="")
            {

            }else{

              echo '<div style="border:1px solid #ff0000;background:#ffeeee;margin:20px;width:500px;padding:10px;border-radius:6px;">';
                echo 'Error<br>';
              echo $error_msg;
              echo '</div>';
            }





      			echo "<br><br> <input type=button class='button button-blue' name='post_button'  value='Post Transfer'
                      onclick=\"
                              document.form_stock_transfer_multi.user_action.value='CONFIRM';
                              mon_submit_form('form_stock_transfer_multi','".$this_url."');
                            \"
                        >";

      			echo "<br><br>";



            echo '<table>';
                  echo '<tr>';
                        echo '<td>';
                              echo 'Date';
                        echo '</td>';

                        echo '<td>';
                              echo '<input type="text" class="textbox textbox-s" name="posting_date" value="'.$_REQUEST["posting_date"].'" >';
                              echo "<a href=\"javascript:void(0)\" onclick=\"if(self.gfPop)gfPop.fPopCalendar(document.form_stock_transfer_multi.posting_date);"."return false;\" HIDEFOCUS>";
                      				echo " <span class='fa fa-calendar fa-lg' style='color:#000;'></span>";
                      				echo "</a>";
                        echo '</td>';
                  echo '</tr>';


                  echo '<tr>';
                        echo '<td>';
                              echo 'Reference No.';
                        echo '</td>';

                        echo '<td>';
                              echo '<input type="text" class="textbox textbox-l" name="reference_no" value="'.$_REQUEST["reference_no"].'" >';
                        echo '</td>';
                  echo '</tr>';


                  echo '<tr>';
                        echo '<td valign=top >';
                              echo 'Remark';
                        echo '</td>';

                        echo '<td>';
                              echo '<textarea  class="textarea" name="remark" rows=5 >'.$_REQUEST["remark"].'</textarea>';
                        echo '</td>';
                  echo '</tr>';


            echo '</table>';


            echo '<br><br>';



            echo '<table style="width:auto;" bgcolor=#c8c8c8 cellspacing=1 cellpadding=8 >';

                echo '<tr>';

                    echo '<td bgcolor=#eeeeee width=10 rowspan=2  >';
                          echo '<b>No.</b>';
                    echo '</td>';


                    echo '<td bgcolor=#eeeeee rowspan=2 >';
                          echo '<b>Barcode </b>';
                    echo '</td>';


                    echo '<td bgcolor=#eeeeee rowspan=2 >';
                          echo '<b>Name </b>';
                    echo '</td>';



                    echo '<td bgcolor=#eeeeee rowspan=2 >';
                          echo '<b>Unit Cost</b>';
                    echo '</td>';


                    echo '<td bgcolor=#eeeeee rowspan=2 >';
                          echo '<b>From Warehouse</b>';


                          echo '<br>';
                          echo '<select name="warehouse_from_id" class="dropdown dropdown-auto"
                                onchange="
                                    mon_submit_form(\'form_stock_transfer_multi\',\''.$this_url.'\');
                                ">';
                          $query_warehouse_from = "select * from t_".$key_table_prefix."_warehouse where whs_status = 'ACTIVE' ";
                          $result_warehouse_from = mysqli_query($dbconn, $query_warehouse_from);
                          while($line_warehouse_from = mysqli_fetch_array($result_warehouse_from,MYSQLI_ASSOC))
                          {

                              if($_REQUEST["warehouse_from_id"]==$line_warehouse_from["whs_id"])
                              {
                                echo '<option value="'.$line_warehouse_from["whs_id"].'" selected >';
                              }else {
                                echo '<option value="'.$line_warehouse_from["whs_id"].'">';
                              }

                                echo $line_warehouse_from["whs_name"];
                              echo '</option>';

                          }

                          echo '</select>';

                          echo '<br>';
                          echo '<br>';

                          echo '<input type="button" class="button button-grey"
                                value="Refresh Balance"
                                onclick="
                                          mon_submit_form(\'form_stock_transfer_multi\',\''.$this_url.'\');
                                          " >';

                    echo '</td>';


                    echo '<td bgcolor=#eeeeee colspan="'.count($lib_warehouse).'">';
                          echo '<b>To Warehouse(s)</b>';
                    echo '</td>';


              echo '</tr>';

              echo '<tr>';


                    foreach($lib_warehouse as $whs_id => $whs_data)
                    {

                          echo '<td bgcolor=#f8f8f8 >';
                                echo '<b>'.$whs_data["whs_name"].'</b>';
                          echo '</td>';

                    }



                echo '</tr>';


                for($row=1;$row<=$form_row_count;$row++)
                {





                      echo '<tr>';

                          echo '<td bgcolor=#ffffff >';
                                echo ''.$row  ;
                          echo '</td>';

                          echo '<td bgcolor=#ffffff >';
                                echo '<input type="text" class="textbox textbox-l" name="cd_'.$row.'" value="'.$_REQUEST["cd_".$row].'" id="id_cd_'.$row.'" >';


                                echo "<div class='fa-stack fa-lg'  style='cursor:pointer;float:right;'  onclick=\"open_page('mod/stock_transfer_multi/search.php?row=".$row."&search='+document.getElementById('id_cd_".$row."').value)\" >";
                        			    echo "<i class='fa fa-square fa-stack-2x color_grey'   ></i><i class='fa fa-search fa-stack-1x color_white' ></i>";
                        		    echo "</div>";

                          echo '</td>';


                          echo '<td bgcolor=#ffffff >';
                                if($_REQUEST["cd_".$row]!="")
                                {

                                      if($_REQUEST["nm_".$row]=="")
                                      {



                                            $query_product = "select *
                                                  from t_".$key_table_prefix."_product
                                                  where pdt_code = '".$_REQUEST["cd_".$row]."' ";
                                            $result_product = mysqli_query($dbconn,$query_product);
                                            if($line_product = mysqli_fetch_array($result_product,MYSQLI_ASSOC))
                                            {
                                                  $_REQUEST["nm_".$row] = $line_product["pdt_name"];


                                            }

                                      }

                                      if($_REQUEST["cs_".$row]=="")
                                      {



                                            $query_product = "select *
                                                  from t_".$key_table_prefix."_product
                                                  where pdt_code = '".$_REQUEST["cd_".$row]."' ";
                                            $result_product = mysqli_query($dbconn,$query_product);
                                            if($line_product = mysqli_fetch_array($result_product,MYSQLI_ASSOC))
                                            {
                                                  $_REQUEST["cs_".$row] = $line_product["pdt_cost"]+0;


                                            }

                                      }

                                }




                                echo '<input type="text" class="textbox textbox-l" name="nm_'.$row.'" value="'.$_REQUEST["nm_".$row].'" >';
                          echo '</td>';



                          echo '<td bgcolor=#ffffff >';
                                echo '<input type="text" class="textbox textbox-m" name="cs_'.$row.'" value="'.$_REQUEST["cs_".$row].'" >';
                          echo '</td>';


                          echo '<td bgcolor=#ffffff align=right >';
                                echo ($balance[$_REQUEST["cd_".$row]]["BAL"]+0);
                          echo '</td>';



                          foreach($lib_warehouse as $whs_id => $whs_data)
                          {

                            echo '<td bgcolor=#ffffff >';


                            if($_REQUEST["warehouse_from_id"]==$whs_id)
                            {
                              echo '<input type="text" disabled style="background:#eeeeee;" class="textbox textbox-s" name="q_'.$whs_id.'_'.$row.'" value="" >';
                            }else {
                              echo '<input type="text" class="textbox textbox-s" name="q_'.$whs_id.'_'.$row.'" value="'.$_REQUEST["q_".$whs_id."_".$row].'" >';
                            }


                            echo '</td>';





                          }



                      echo '</tr>';
                }


            echo '</table>';





echo "</form>";
echo '</div>';






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



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

?>
