예제 #1
0
function getListOfUsersFromAutoSmoke()
{
    // Function get associated array of IDs with logins (used for listbox)*/
    return getTwoColumnsMap("SELECT userID,NTID FROM users where NTID != 'UNKNOWN' ORDER BY NTID");
}
예제 #2
0
######################################################################
// Get form values
$build = isset($_POST['buildField']) ? $_POST['buildField'] : "";
$catFilterID = isset($_POST['catField']) ? $_POST['catField'] : 0;
$compFilterID = isset($_POST['compField']) ? $_POST['compField'] : 0;
$sip = isset($_POST['sipField']) ? $_POST['sipField'] : "";
$su = isset($_POST['suField']) ? $_POST['suField'] : "";
$sp = isset($_POST['spField']) ? $_POST['spField'] : "";
$sdb = isset($_POST['sdbField']) ? $_POST['sdbField'] : "";
$dip = isset($_POST['dipField']) ? $_POST['dipField'] : "";
$du = isset($_POST['duField']) ? $_POST['duField'] : "";
$dp = isset($_POST['dpField']) ? $_POST['dpField'] : "";
$ddb = isset($_POST['ddbField']) ? $_POST['ddbField'] : "";
######################################################################
if ($catFilterID != 0) {
    $compFilterArr = array(0 => "All Components") + getTwoColumnsMap("select componentID, component " . "from components where component != 'VOID' and " . "component != 'UNKNOWN' and " . "categoryID =" . $catFilterID . " " . "order by component");
    $noneDisplay = "";
} else {
    $noneDisplay = "none";
}
if ($_POST['Save'] == "Merge") {
    $dbArr = array("source" => array($sip, $sdb, $su, $sp), "target" => array($dip, $ddb, $du, $dp));
    $catFilterID = $_POST['catField'];
    $compFilterID = $_POST['compField'];
    $userQuery = "35,30";
    $remoteArr = getRemoteData($build, $userQuery, $dbArr);
    $log = storeRemoteData($build, $remoteArr, $catFilterID, $compFilterID, $dbArr);
}
#######################################################################
$smarty = new TLSmarty();
$smarty->assign("catFilterArr", $catFilterArr);