Пример #1
0
function getSubCategory($collapse_number, $product_category)
{
    global $con;
    $sql = "SELECT * FROM category";
    $unique_brands = getRows('DISTINCT pro_brand', 'products WHERE pro_category="' . $product_category . '"');
    echo '<div class="collapse" id="collapse' . $collapse_number . '">';
    getBrand($product_category, $unique_brands);
    echo '</div>';
}
Пример #2
0
            // The "back" link
            $prevlink = $page > 1 ? '<a href="?action=surveys&page=1" title="First page">&laquo;</a> <a href="?action=surveys&page=' . ($page - 1) . '" title="Previous page">&lsaquo;</a>' : '<span class="disabled">&laquo;</span> <span class="disabled">&lsaquo;</span>';
            // The "forward" link
            $nextlink = $page < $pages ? '<a href="?action=surveys&page=' . ($page + 1) . '" title="Next page">&rsaquo;</a> <a href="?action=surveys&page=' . $pages . '" title="Last page">&raquo;</a>' : '<span class="disabled">&rsaquo;</span> <span class="disabled">&raquo;</span>';
            // Return an iteration from the samples table.
            $samples = getSamplesNew($limit, $offset);
            // Do we have any results?
            if ($samples) {
                foreach ($samples as $row) {
                    ?>

                <form class="form-inline" action="?action=confirmation" method="POST">

              <?php 
                    $questions = getQuestions();
                    $brand_name = getBrand($row['brandID']);
                    $origin_type = getOrigin($row['originID']);
                    ?>

                  <div class="form-group col-sm-12">
                    <h3><?php 
                    print $page . ". " . $brand_name['brandName'] . ' - ' . $origin_type['type'];
                    ?>
 </h3>
                      <?php 
                    foreach ($questions as $question) {
                        ?>
                        <p><?php 
                        print $question['questionText'];
                        ?>
</p>
Пример #3
0
<?php

include 'config/autoload.php';
if (!isset($_GET['id'])) {
    header('Location: brand.php');
}
$brand = getBrand($db, $_GET['id']);
if (isset($_POST['name']) and isset($_POST['brandGroup']) and isset($_POST['continent']) and isset($_POST['country']) and isset($_POST['website']) and isset($_POST['comment'])) {
    updateBrand($db, $_GET['id'], $_POST['name'], $_POST['brandGroup'], $_POST['continent'], $_POST['country'], $_POST['website'], $_POST['comment']);
    header('Location: brand.php');
}
?>

<h3>Gestion des marques</h3>

<form action="editBrand.php?id=<?php 
echo $_GET['id'];
?>
" method="post">
  <fieldset>
    <legend>Edition de la marque :</legend>
    <input type="text" name="name" value="<?php 
echo $brand['name'];
?>
" placeholder="Nom de la marque" required>*
    <input type="text" name="brandGroup" value="<?php 
echo $brand['brand_group'];
?>
" placeholder="Groupe de la marque">
    <hr>
    <input type="text" name="continent" value="<?php 
Пример #4
0
            <div class="row">
              <div class="col-sm-2">
                <input name="action" type="hidden" value="createSample">
                <button type="submit" formaction="." class="btn btn-default">Save sample</button>
              </div>
            </div>

          </form> <!-- end inline form -->


          <div class="createdSamples">
            <ul class="list-group">
             <?php 
    $samples = getSamples();
    foreach ($samples as $sample) {
        $brand_name = getBrand($sample['brandID']);
        $origin_type = getOrigin($sample['originID']);
        ?>
               
                  <li class="list-group-item"><?php 
        print $brand_name['brandName'] . ' | ' . $origin_type['type'] . ' | ' . $sample['batch'];
        ?>
</li>
               <?php 
    }
    ?>
          </ul>
          </div>
            
        
      </div> <!-- end col-12 -->