Пример #1
0
    if ($nMyIndex == 0) {
        echo "<option value=\"0\" selected>- - - " . $arrSlot["strName"] . " - - -</option>";
        $nMyIndex = 1;
    } else {
        echo "<option value=\"0\">- - - " . $arrSlot["strName"] . " - - -</option>";
    }
    $nSlotID = $arrSlot["nID"];
    $strQuery = "SELECT * FROM cf_slottouser WHERE nMailingListId = '{$nMailinglistID}' AND nSlotId=" . $arrSlot["nID"] . " ORDER BY nPosition ASC";
    $nResult = mysql_query($strQuery, $nConnection);
    if ($nResult) {
        if (mysql_num_rows($nResult) > 0) {
            while ($arrRow = mysql_fetch_array($nResult)) {
                $arrUser = $arrUsers[$nUserID];
                $nUserID = $arrRow['nUserId'];
                if ($nUserID != -2) {
                    $strUser = $objMyCirculation->getUsername($nUserID);
                    /*echo "<pre>";
                    		print_r($objMyCirculation);
                    		echo "</pre>";*/
                } else {
                    $strUser = $SELF_DELEGATE_USER;
                }
                $nPosition = $arrRow['nPosition'];
                $nCurKey = $nMy2Index . '---' . $nSlotID . '---' . $nUserID . '---' . $nPosition;
                echo "<option value=\"{$nCurKey}\">{$strUser}</option>";
                $nMy2Index++;
            }
        }
    }
}
?>
Пример #2
0
//--- output the user inbetween the range (start to end)
foreach ($arrUsers as $arrRow) {
    $style = "background-color: #efefef;";
    if ($nRunningNumber % 2 == 1) {
        $style = "background-color: #fff;";
    }
    $strImage = '../images/inactive.gif';
    if (($arrRow["nAccessLevel"] & 2) == 2) {
        $strImage = '../images/active.gif';
    }
    if ($arrRow["nSubstitudeId"] == -2) {
        $arrSubstitutes = $objCirculation->getSubstitutes($arrRow['nID']);
        if ($arrSubstitutes[0]['substitute_id'] == -3) {
            $strSubstitute = $SELF_DELEGATE_USER;
        } else {
            $strSubstitute = $objCirculation->getUsername($arrSubstitutes[0]['substitute_id']);
        }
    } elseif ($arrRow["nSubstitudeId"] != 0) {
        $strSubstitute = $objCirculation->getUsername($arrRow['nSubstitudeId']);
    } else {
        $strSubstitute = '-';
    }
    $strOnlineState = '';
    if ($arrRow['tsLastAction'] + $USER_TIMEOUT > time()) {
        $strOnlineState = '<img src="../images/flag_green.gif">';
    }
    ?>
				<tr valign="top" style="<?php 
    echo $style;
    ?>
">