if ($_GET[password] == 'only4auto') { $IDs = array(); $objTestbedList->rReset(); while ($row = $objTestbedList->rNext()) { if ($_GET['box' . $row->testbedID] == "on") { array_push($IDs, $row->testbedID); } } $stringIDs = implode(",", $IDs); while ($row = $objUserList->rNext()) { if ($row->NTID == $_GET[userName]) { $initiatorID = $row->userID; break; } } $updateStatus = $objTestbedList->updateMulti($stringIDs, $initiatorID, "Y"); $Error = $updateStatus ? '<p style="font-size: 13pt; font-weight: bold; color: green;" id="msg">Successfully Updated Lock Status</p>' : '<p style="font-size: 13pt; font-weight: bold; color: red;" id="msg">Failed to update Lock Status</p>'; } else { $Error = '<p style="font-size: 13pt; font-weight: bold; color: red;" id="msg">Wrong Password!</p>'; } } // After updating the lock status, refresh the list of unlocked testbeds $objUserList = new Username(); $objUserList->loadList(); $objTestbedList = new TestbedLocked(); $objTestbedList->addWhere("lockInitiatorID=userID"); //$objTestbedList->addWhere("launchServerID!=0"); $objTestbedList->addWhere("launchServerID > 0"); $objTestbedList->addWhere("lockStatus='N'"); $objTestbedList->loadlist(); $testbeds = array();