small change
This commit is contained in:
+8
-22
@@ -552,32 +552,18 @@ include('include/trfqueryscript.php'); ?>
|
||||
if (!empty($rows)) {
|
||||
|
||||
foreach ($rows as $row) {
|
||||
// Controllo se l'idarticletype è uguale a 4
|
||||
if ($row['idarticletype'] == 4) {
|
||||
// Mostra l'opzione solo se l'utente è admin o superuser
|
||||
if (Auth::user()->hasRole('Admin') || Auth::user()->hasRole('Superuser')) {
|
||||
|
||||
// Mostra normalmente gli altri articletype
|
||||
?>
|
||||
<option value="<?php echo $row['idarticletype']; ?>" <?php if (!(strcmp($row['idarticletype'], ($trfnumberfinal->getColumnVal("idarticletype"))))) {
|
||||
echo "selected=\"selected\"";
|
||||
} ?>>
|
||||
<?php
|
||||
echo ($_SESSION['langselect'] == 'it') ? $row['name_articletype'] : $row['name_articletypeeng'];
|
||||
?>
|
||||
</option>
|
||||
<option value="<?php echo $row['idarticletype']; ?>" <?php if (!(strcmp($row['idarticletype'], ($trfnumberfinal->getColumnVal("idarticletype"))))) {
|
||||
echo "selected=\"selected\"";
|
||||
} ?>>
|
||||
<?php
|
||||
}
|
||||
} else {
|
||||
// Mostra normalmente gli altri articletype
|
||||
echo ($_SESSION['langselect'] == 'it') ? $row['name_articletype'] : $row['name_articletypeeng'];
|
||||
?>
|
||||
<option value="<?php echo $row['idarticletype']; ?>" <?php if (!(strcmp($row['idarticletype'], ($trfnumberfinal->getColumnVal("idarticletype"))))) {
|
||||
echo "selected=\"selected\"";
|
||||
} ?>>
|
||||
<?php
|
||||
echo ($_SESSION['langselect'] == 'it') ? $row['name_articletype'] : $row['name_articletypeeng'];
|
||||
?>
|
||||
</option>
|
||||
</option>
|
||||
<?php
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user