Exemple #1
0
                
            </div>
             </div>
            
            
            <div data-role="footer"
                 data-position="fixed"
                 >
             <div data-role="navbar">   
                 <a href="manifest.php" data-role="button">All</a>   
                 <a href="manifest.php?type=1" data-role="button">Electrics</a>   
             <a href="manifest.php?type=2" data-role="button">Material</a>
             <a href="manifest.php?type=3" data-role="button">Bric-a-Brac</a>
             </div><!--END OF NAVBAR ELEMENT-->
            <?php 
get_size_of_manifest($sql_load);
// echo $SIZE_VISIBLE;
//  echo "</BR>";
//    echo $SIZE_VISIBLE_AND_ACTIVE;
//   echo "</br>";
//    echo $SIZE_VISIBLE_AND_STANDARD;
//     echo $SIZE_OF_MANIFEST;
show_last_add();
?>
 
            </div>
            
            
        </div> <!--manifest site-->
    </body>
</html>
Exemple #2
0
function construct_table_draw_table($sql_load)
{
    //here we get all parameters needed to set a size of manifests
    $PARAMETER = "true";
    //just something
    get_size_of_manifest($sql_load);
    //yes here only once. Lets change it
    //ok no global db cause before connect local db glob
    connect_dbi();
    //here this query should be prepered and keep as one global passed to functons. Reference add to db needs to read first counter
    //* $sql="SELECT * from sub_cat ORDER BY id_c DESC";
    $sql = $sql_load;
    $NUM_DRAW = 0;
    echo '<table data-filter="true">';
    $result = query_selecti($sql);
    $counter_grid = 0;
    echo "<tr>";
    while ($rek = mysqli_fetch_array($result, MYSQL_BOTH)) {
        //here shall be checked counter_grid and a Size_of_manifest if any discrepancies than communicate. Serious error. This means that what is visible on manifest
        //is different of that what was logicly received from manifest size function that is the main one needes for calculation
        $counter_grid++;
        $NUM_DRAW++;
        //This variable is local to draw function and is used to get ordered row in table
        $rcvd_qtty = qtty_rcvd_manifest_counter_no_delay(extract_session_manifest_reg(), $rek['id_c']);
        $sub_cat_item_name = $rek['Name_sub'];
        //this is name of subcategory.
        $placeholder_sub_cat = $sub_cat_item_name;
        $placeholder_sub_cat .= "...QTTY...";
        /*   
           if(($counter_grid%2==0))
           echo '<td>1'; 
           else if($counter_grid%2==1)
           echo '<td>2';
        * 
        */
        //was #manifest
        echo '<td>';
        echo '<form action="" id="manifest' . $NUM_DRAW . '" method="POST" data-ajax="false" data-prefetch="false">';
        //taken numeric value out
        //$rek['id_c']." ".
        echo $rek['Name_sub'] . " " . visible($rek['kind']) . " " . get_weight($rek['id_c']) . " kgs ";
        echo ' QTTY: ' . $rcvd_qtty . ' </p>';
        echo '<input type="hidden" name="num_sub_cat_un" value="' . $rek['id_c'] . '">';
        //this hidden variable is used to generate universal post sub_category number and send it
        echo '<input type="hidden" name="no-delay" value="' . $rcvd_qtty . '">';
        //temoporary to send qtty without delay
        echo '<input type="submit" value="+" name="plus' . $NUM_DRAW . '" data-role="button" data-transition="flip" data-inline="true">';
        echo '<input type="submit" value="-" name="minus' . $NUM_DRAW . '" data-role="button" data-inline="true">';
        echo '<input type="text" name="qtty' . $NUM_DRAW . '" value="" placeholder="' . $placeholder_sub_cat . '"  >';
        echo '</td>';
        if ($counter_grid % 3 == 0) {
            echo '<tr></tr>';
        }
        echo '</form>';
    }
    echo '</table>';
}