Esempio n. 1
0
        $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();
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();