Commit adda1a86 authored by Estéban Ristich's avatar Estéban Ristich
Browse files

Closes #71 Rename $equipment_blacklist

parent 3b2d2597
......@@ -37,7 +37,7 @@ if ($pdo = connect_db()) {
if ($equipment_selected['loanable'] == 1)
$loan = get_loans_all_not_return_by_equipment($pdo, $id_equipment);
$equipment_blacklist = get_loans_all_by_equipment_borrowed($pdo, $id_equipment);
$loan_borrow = get_loans_all_by_equipment_borrowed($pdo, $id_equipment);
$equipment_loan_reserved = get_loan_all_last_returned($pdo, $id_equipment);
en_tete('Caract&eacute;ristiques de l\'appareil : <b>'.$equipment_selected['nom'].'</b>');
......@@ -216,7 +216,7 @@ en_tete('Caract&eacute;ristiques de l\'appareil : <b>'.$equipment_selected['nom'
if ($logged_level >= 3) {echo '</a>';}
echo '</span>'.PHP_EOL;
loan_list_container($pdo, $loan, $equipment_loan_reserved, $equipment_blacklist, $logged_level);
loan_list_container($pdo, $loan, $equipment_loan_reserved, $loan_borrow, $logged_level);
} else {
echo '<span class="option-right">';
if ($logged_level >= 3) {echo '<a href="loan-edit.php?equipment='.$equipment_selected['id'].'&mode=loan">';}
......@@ -228,7 +228,7 @@ en_tete('Caract&eacute;ristiques de l\'appareil : <b>'.$equipment_selected['nom'
if ($logged_level >= 3) {echo '</a>';} */
echo '</span>'.PHP_EOL;
loan_list_container($pdo, $loan, $equipment_loan_reserved, $equipment_blacklist, $logged_level);
loan_list_container($pdo, $loan, $equipment_loan_reserved, $loan_borrow, $logged_level);
}
} else { echo 'Non'.PHP_EOL; } ?>
</td>
......
......@@ -52,11 +52,11 @@ if ($mode == 'Modifier') {
}
$num_line = 0;
$equipment_selected = get_equipment_listshort_by_id($pdo, $equipment_id);
$equipment_blacklist = get_loans_all_by_equipment_borrowed($pdo, $equipment_id);
$equipment_borrow = get_loans_all_by_equipment_borrowed($pdo, $equipment_id);
$equipment_loans = get_loans_all_not_return_by_equipment($pdo, $equipment_selected['id']);
$equipment_loan_reserved = get_loan_all_last_returned($pdo, $equipment_id);
loan_list_container($pdo, $equipment_loans, $equipment_loan_reserved, $equipment_blacklist, $logged_level);?>
loan_list_container($pdo, $equipment_loans, $equipment_loan_reserved, $loan_borrow, $logged_level);?>
<div class="space-between"></div>
......
......@@ -238,7 +238,7 @@ function redirect($link='index.php') {
// ---------------------------------------------------------------------
function loan_list_container($pdo, $equipment_loans, $equipment_loan_reserved=false, $equipment_blacklist=false, $logged_level) {
function loan_list_container($pdo, $equipment_loans, $equipment_loan_reserved=false, $loan_borrow=false, $logged_level) {
?>
<div class="loan-list-container">
<?php if ($equipment_loan_reserved) { ?>
......@@ -268,7 +268,7 @@ function loan_list_container($pdo, $equipment_loans, $equipment_loan_reserved=fa
echo '<a href="loan-del.php?id='.$loan_current['id'].'">';
echo ICON_LOAN_RETURNED;
}
if ($logged_level >= 3 && $loan_current["status"] == STATUS_LOAN_RESERVED && $equipment_blacklist == false) {
if ($logged_level >= 3 && $loan_current["status"] == STATUS_LOAN_RESERVED && $loan_borrow == false) {
echo '<a href="loan-process.php?id='.$loan_current["id"].'&mode=loan">'.ICON_LOAN_BORROWED.'</a>';
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment