<?php

include './connection_sql.php';
?>





<?php

require_once("config.inc.php");
	require_once("DBConnector.php");
	$db = new DBConnector(); $dbinv = $db->GetConnection();
	

include 'barcode_source.php';



$mid = $_GET["txtSTK_NO"];



$sql1 = "SELECT * FROM s_mas where STK_NO = '" . $mid . "'";  
$result1 =$db->RunQuery($sql1);
 $row1 = $result1->fetch();
 
    echo "<table>";
                        echo "<tr><td> </td><td> </td><td> </td><td> </td></tr>"; 
                        
                        echo "</table>";
                         echo "<table>";
                        echo "<tr><td> </td><td> </td><td> </td><td> </td></tr>"; 
                        
                        echo "</table>"; echo "<table>";
                        echo "<tr><td> </td><td> </td><td> </td><td> </td></tr>"; 
                        
                        echo "</table>"; echo "<table>";
                        echo "<tr><td> </td><td> </td><td> </td><td> </td></tr>"; 
                        
                        echo "</table>";
                echo "<center><table width=1000 border=0>";

                $i = 1;
                 for ($X =0; $X < $_GET["barcount"]; $X++) {
 

                        if ($i % 3 == 1) {
                            echo "<tr><td width=\"30%\">";
                        }
                        if (($i % 3 == 2) or ( $i % 3 == 0)) {
                            echo "<td width=\"30%\">";
                        } 
                        echo "<table>";
                        echo "<tr><td><b>".bar128(stripcslashes( $row1['STK_NO']  ))."</b></td></tr>"; 
                        echo "</table>";

                        if (($i % 3 == 1) or ( $i % 3 == 2)) {
                            echo "</td>";
                        }
                        if ($i % 3 == 0) {
                            echo "</td></tr>";
                        }
                        $i = $i + 1;
                   
                    //echo $sql_cus1;
                }
                echo "</table></center>";

?>






