$nMax = sizeof($arrSlots); for ($nIndex = 0; $nIndex < $nMax; $nIndex++) { $arrSlot = $arrSlots[$nIndex]; $nSlotID = $arrSlot['nID']; $strSlot = $arrSlot['strName']; $strQuery = "SELECT * FROM cf_slottouser WHERE nMailingListId = '{$nMailinglistID}' AND nSlotId = '{$nSlotID}' ORDER BY nPosition ASC"; $nResult = mysql_query($strQuery, $nConnection); if ($nResult) { if (mysql_num_rows($nResult) > 0) { $bSearchStation = true; while (($arrRow = mysql_fetch_array($nResult)) && $bSearchStation) { $arrUser = $arrUsers[$nUserID]; $nUserID = $arrRow['nUserId']; $nPosition = $arrRow['nPosition']; if ($nUserID != -2) { $arrUserDetails = $objCirculation->getUserById($nUserID); } else { $arrUserDetails = $arrSender; } $nUserID = $arrUserDetails['nID']; // check if we have reached the selected Station if ($nSlotID == $nChoosenSlotId && $nUserID == $nChoosenUserId && $nPosition == $nChoosenPosition) { // the current User is the selected Station // this will be the next user $arrNextUser[0] = $nUserID; $arrNextUser[1] = $nSlotID; // stop the search cause we found it $bSearchStation = false; $nIndex = $nMax; } else { // the current user is before the selected Station
require_once '../../language_files/language.inc.php'; require_once '../../pages/CCirculation.inc.php'; header("Content-Type: text/xml; charset={$DEFAULT_CHARSET}"); $strFiter = strip_tags($_REQUEST['strFilter']); $strFiter = ltrim(unescape($strFiter, $DEFAULT_CHARSET)); $objCirculation = new CCirculation(); $arrIndex = $objCirculation->filterUsers($strFiter); ?> <table cellpadding="2" cellspacing="0" style="background-color:white;" width="100%"> <tbody id="AvailableUsers"> <?php $nMax = sizeof($arrIndex); for ($nIndex = 0; $nIndex < $nMax; $nIndex++) { $arrCurIndex = $arrIndex[$nIndex]; $nUserId = $arrCurIndex['user_id']; $arrUser = $objCirculation->getUserById($nUserId); $sid = $nUserId; ?> <tr onMouseOver="this.style.background = '#ddd;'" onMouseOut="this.style.background = '#fff;'" onClick="document.getElementById('receiver_<?php echo $sid; ?> ').checked = 'true'; setReceiver(<?php echo $sid; ?> );" style="cursor: pointer;"> <td width="16px" style="border-top:1px solid Silver;" valign="middle"> <input type="radio" name="receiver" id="receiver_<?php echo $sid; ?> " value="<?php echo $sid;
$bIndividualSubsTime = $arrRow['bUseGeneralSubstituteConfig']; $bIndividualEmail = $arrRow['bUseGeneralEmailConfig']; } } } if ($nSubstituteId == -2) { // user has one or more substitutes - the DB table "cf_substitute" has to be checked $arrResult = $objCirculation->getSubstitutes($_REQUEST['userid']); $nMax = sizeof($arrResult); for ($nIndex = 0; $nIndex < $nMax; $nIndex++) { $nCurSubstituteId = $arrResult[$nIndex]['substitute_id']; if ($nCurSubstituteId == -3) { $arrSubstitutes[$nIndex]['name'] = $SELF_DELEGATE_USER; $arrSubstitutes[$nIndex]['id'] = -3; } else { $arrUser = $objCirculation->getUserById($nCurSubstituteId); $arrSubstitutes[$nIndex]['name'] = $arrUser['strLastName'] . ', ' . $arrUser['strFirstName']; $arrSubstitutes[$nIndex]['id'] = $nCurSubstituteId; } } } } } } else { $EMAIL_FORMAT = 'HTML'; $EMAIL_VALUES = 'IFRAME'; } ?> <body><br> <span style="font-size: 14pt; color: #ffa000; font-family: Verdana; font-weight: bold;"> <?php