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(); while ($row = $objTestbedList->rNext()) { $objElegibleTb = new lockElegibleTb(); $objElegibleTb->addWhere("testbed='TB:" . $row->testbed . "'"); $objElegibleTb->getElegibleTbList("TB:" . $row->testbed); $qualify_flag = 1; // if no entry found for this TB in queue table, automatically qualifies if ($objElegibleTb->rTotal() != 0) { $objElegibleTb->rReset(); while ($item = $objElegibleTb->rNext()) {
<?php include 'config.php'; include PRJ_ROOT_PATH . 'lang/lg_en.php'; include PRJ_CLASS_PATH . 'tzn_generic.php'; include PRJ_CLASS_PATH . TZN_DB_CLASS; include PRJ_CLASS_PATH . 'pkg_jobQueue.php'; $objUserList = new Username(); $objUserList->loadList(); $objTestbedList = new TestbedLocked(); $objTestbedList->addWhere("lockInitiatorID=userID"); //$objTestbedList->addWhere("launchServerID!=0"); $objTestbedList->addWhere("launchServerID > 0"); $objTestbedList->addWhere("lockStatus='Y'"); $objTestbedList->loadlist(); $Error = '<p style="font-size: 13pt; font-weight: bold; color: green;" id="msg"></p>'; if (isset($_GET[saveSelection])) { if ($_GET[password] == 'only4auto') { $IDs = array(); 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; } }