<?php

require_once 'checkSession.php';
require_once '../model/group_products.php';
require_once '../model/extraction.php';
$extraction = new extraction();
$groups = $extraction->getGroup();
include '../view/groupProducts.php';
Beispiel #2
0
    public function printToModify($next)
    {
        $extraction = new extraction();
        $groups = $extraction->getGroup();
        echo '
				<input type="hidden" name="id" value="' . $this->id . '">
				<input type="hidden" name="next" value="' . $next . '">
				<div class="form-group">
					<label for="ref">' . $this->tf->getText(59) . '</label>
					<input name="ref" type="text" class="form-control" value="' . $this->ref . '">
				</div>
				<div class="form-group">
					<label for="name">' . $this->tf->getText(25) . '</label>
					<input name="name" type="text" class="form-control" value="' . $this->name . '">
				</div>
				<div class="form-group">
					<label for="description">' . $this->tf->getText(42) . '</label>
					<input name="description" type="text" class="form-control" value="' . $this->description . '">
				</div>
				<div class="form-group">
					<label for="id_group">' . $this->tf->getText(34) . '</label>
					<select name="id_group" class="form-control">
					';
        foreach ($groups as $group) {
            if ($this->id_group == $group->getId()) {
                echo '<option selected="selected" value="' . $group->getId() . '">' . $group->getName() . '</option>';
            } else {
                echo '<option value="' . $group->getId() . '">' . $group->getName() . '</option>';
            }
        }
        echo '
					</select>
				</div>
				<div class="form-group">
					<label for="description">' . $this->tf->getText(89) . '</label>
					<input name="unit" type="text" class="form-control" value="' . $this->unit . '">
				</div>
				<div class="form-group">
					<label for="description">' . $this->tf->getText(90) . '</label>
					<input name="cost" type="text" class="form-control" value="' . $this->cost . '">
				</div>
				<div class="form-group">
					<label for="description">' . $this->tf->getText(75) . '</label>
					<input name="price" type="text" class="form-control" value="' . $this->price . '">
				</div>
				';
    }