Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion class/OfflineTrans.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public static function byTransId($trans_id){
LIMIT 1;
"))
$row = $result->fetch_assoc();
$off_trans_id = $row['off_trans_id'];
$off_trans_id = @$row['off_trans_id'];
return $off_trans_id;
}
}
11 changes: 8 additions & 3 deletions class/StorageBox.php
Original file line number Diff line number Diff line change
Expand Up @@ -263,9 +263,14 @@ public function cell($td_values) {
$rowspan = $this->span[0] + 1;
$width = 50 * $colspan;

$td_values["id"] = str_replace("__unit__", $this->unit_indicator, $td_values["id"]);
$td_values["label"] = $td_values["label"] ? str_replace("__unit__", $this->unit_indicator, $td_values["label"]) : $this->unit_indicator;
$td_values["onclick"] = str_replace("__unit__", $this->unit_indicator, $td_values["onclick"]);
$td_values["id"] = str_replace("__unit__", $this->unit_indicator, $td_values["id"] ?? "");
$td_values["label"] = str_replace("__unit__", $this->unit_indicator, $td_values["label"] ?? $this->unit_indicator);
$td_values["onclick"] = str_replace("__unit__", $this->unit_indicator, $td_values["onclick"] ?? "");
$td_values["class"] ??= "";
$td_values["style"] ??= "";
$td_values["onclick"] ??= "";
$td_values["onmouseover"] ??= "";
$td_values["onmouseout"] ??= "";

return "<td id='$td_values[id]' class='$td_values[class]' colspan='$colspan' rowspan='$rowspan' style='width:${width}px;$td_values[style]'
onclick='$td_values[onclick]' onmouseover='$td_values[onmouseover]' onmouseout='$td_values[onmouseout]' align='center'>$td_values[label]</td>";
Expand Down
16 changes: 8 additions & 8 deletions class/Users.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,21 +78,21 @@ public function createWithID($operator){
Limit 1;
")){
$row = $result->fetch_assoc();
if (strcmp($row['operator'], "") != 0){
if (strcmp(@$row['operator'], "") != 0){
$this->setOperator($row['operator']);
$this->setRoleID($row['r_id']);
} else {
$this->setOperator($operator);
$this->setRoleID(2);
}

$this->setAccounts($operator);
$this->setAdj_date($row['adj_date']);
$this->setExp_date($row['exp_date']);
$this->icon = $row['icon'] ? $row['icon'] : "fas fa-user";
$this->setLong_close ($row['long_close']);
$this->setNotes ($row['notes']);
$this->setRfid_no($row['rfid_no']);
$this->setAdj_date(@$row['adj_date']);
$this->setExp_date(@$row['exp_date']);
$this->icon = $row['icon'] ?? "fas fa-user";
$this->setLong_close (@$row['long_close']);
$this->setNotes (@$row['notes']);
$this->setRfid_no(@$row['rfid_no']);
} else {
echo $mysqli->error;
return false;
Expand Down