Fixed bug where the shifts weren't being shown in the existing techs table.

This commit is contained in:
2026-02-18 12:37:45 -05:00
parent 5396f3367b
commit 1a4c9a9c2a

View File

@@ -794,7 +794,7 @@ switch($table) {
$shiftrow=mysqli_query($db,"select * from shifts"); $shiftrow=mysqli_query($db,"select * from shifts");
while ($shiftitem=mysqli_fetch_assoc($shiftrow)) { while ($shiftitem=mysqli_fetch_assoc($shiftrow)) {
if ($shiftitem["status"] == 1) { if ($shiftitem["status"] == 1) {
if ($shiftitem["shiftid"]==$customshiftnum) { if ($shiftitem["shiftid"]==$shift) {
printf("<option value=\"%s\" selected>%s</option>",$shiftitem["shiftid"],$shiftitem["shiftname"]); printf("<option value=\"%s\" selected>%s</option>",$shiftitem["shiftid"],$shiftitem["shiftname"]);
} else { } else {
printf("<option value=\"%s\">%s</option>",$shiftitem["shiftid"],$shiftitem["shiftname"]); printf("<option value=\"%s\">%s</option>",$shiftitem["shiftid"],$shiftitem["shiftname"]);
@@ -830,7 +830,7 @@ switch($table) {
} else { } else {
$statdef="<img src=\"icons/cross.png\" title=\"inactive\" alt=\"inactive\">"; $statdef="<img src=\"icons/cross.png\" title=\"inactive\" alt=\"inactive\">";
} }
$shiftname=dblookup($db,"shifts","shiftname","shiftid",$shift); $shiftname=dblookup($db,"shifts","shiftid","shiftname",$tablerow["shift"]);
printf(" printf("
<tr> <tr>
<td><a href=\"admin.php?table=$table&edit=1&id=%s\">%s</a></td> <td><a href=\"admin.php?table=$table&edit=1&id=%s\">%s</a></td>