Exemple #1
0
             </td>
         <td rowspan="2">
            <a href="#" onclick="fillXQuantitiesWithXItems(document.getElementById('quantity').value, document.getElementById('num_items').value);">Fill Your Values</a>
     </td>
         <td>
             <div id="infos"><p id="return_from_makeSum" style="margin-bottom: 0;"></p></div>
         </td>
     </tr>
     </table>
</div>
<div id="main">
    <form method="post" name="the_form">
<?php 
require_once '../Manager/DatabaseManager.php';
$dbm = new \Manager\DatabaseManager();
$outputDBM = $dbm->fetchTampoonInfos();
foreach ($outputDBM as $rows) {
    $icon = '../icon' . IC::DS . $rows['reference'] . '.jpg';
    echo '<div class="container_icon" id="container_' . $rows['reference'] . '"><table><tr><td><img class="icon" src="' . $icon . '" /></td></tr>';
    echo '<tr><td>' . $rows['reference'] . '</td></tr>';
    echo '<tr><td>';
    echo '<input placeholder="' . $rows['quantity'] . '" type="number" min="0" max="' . $rows['quantity'] . '" id="' . $rows['reference'] . '" name="' . $rows['reference'] . '" onclick="makeSum();" ';
    echo 'onchange="if(this.value == 0) document.getElementById(\'container_' . $rows['reference'] . '\').style.cssText=\'border: none;\';" onfocus="if(document.getElementById(\'checkvalues\').style.visibility === \'visible\') document.getElementById(\'checkvalues\').style.visibility = \'hidden\';"/>';
    echo '&nbsp;dispo</td></tr>';
    echo '</table></div>';
}
?>
        </form>
    </div>
</body>
</html><?php 
Exemple #2
0
?>
</label><input type="radio" value="27" name="display_unit" >
        <label>45 <?php 
echo UNITS;
?>
</label><input type="radio" value="45" name="display_unit" >
    </div>
    <div id="infos"><p id="return_from_makeSum" style="margin-bottom: 0;"></p></div>

</div>
<div id="main">
    <form method="post" name="the_form">
<?php 
require_once '../Manager/DatabaseManager.php';
$dbm = new \Manager\DatabaseManager();
$outputDBM = $dbm->fetchTampoonInfos(FALSE);
foreach ($outputDBM as $rows) {
    if ($rows['quantity'] > 0) {
        $icon = '../icon' . IC::DS . $rows['reference'] . '.jpg';
        echo '<div class="container_icon" id="container_' . $rows['reference'] . '"><table><tr><td><img class="icon" src="' . $icon . '" /></td></tr>';
        echo '<tr><td>' . $rows['reference'] . '</td></tr>';
        echo '<tr><td>';
        echo '<input placeholder="' . $rows['quantity'] . '" type="number" min="0" max="' . $rows['quantity'] . '" id="' . $rows['reference'] . '" name="' . $rows['reference'] . '" onclick="makeSum();" ';
        echo 'onchange="switchDivDisplay(this.value, \'container_' . $rows['reference'] . '\')" ';
        echo 'onfocus="if(document.getElementById(\'checkvalues\').style.visibility === \'visible\') document.getElementById(\'checkvalues\').style.visibility = \'hidden\';"/>';
        echo '&nbsp;dispo</td></tr>';
        echo '</table></div>';
    } else {
        $unavailableItems[] = $rows;
    }
}