<td><?php echo htmlentities($arrUsers[$arrCirculationForm["nSenderId"]]["strLastName"] . "," . $arrUsers[$arrCirculationForm["nSenderId"]]["strFirstName"] . " (" . $arrUsers[$arrCirculationForm["nSenderId"]]["strUserId"] . ")"); ?> </td> </tr> <tr> <td><img src="<?php echo $CUTEFLOW_SERVER; ?> /images/calendar.gif"></td> <td><?php echo htmlentities($CIRCDETAIL_SENDDATE); ?> </td> <td><?php echo convertDateFromDB($arrCirculationHistory["dateSending"]); ?> </td> </tr> </table> <?php $strSearchBrowserInfo = $_SERVER['HTTP_USER_AGENT']; $bThunderbird = substr_count($strSearchBrowserInfo, 'Thunderbird'); //echo $strSearchBrowserInfo.' ff: '.$bFirefox.' ie: '.$bMSIE; $bIsEmail = 0; if ($bThunderbird) { $bIsEmail = 1; } if ($bIsEmail) { ?>
//----------------------------------------------- $strQuery = "SELECT strLastName, strFirstName FROM `cf_user` WHERE nID={$nSenderID}"; $nResult = mysql_query($strQuery, $nConnection); if ($nResult) { while ($row = mysql_fetch_array($nResult)) { $arrSenderDetails[] = $row["strLastName"]; $arrSenderDetails[] = $row["strFirstName"]; } } //----------------------------------------------- //--- get the sending date //----------------------------------------------- $strQuery = "SELECT dateSending FROM `cf_circulationhistory` WHERE nCirculationFormId={$nCirculationId}"; $nResult = mysql_query($strQuery, $nConnection); if ($nResult) { if (mysql_num_rows($nResult) > 0) { $arrSendingDateResult = mysql_fetch_array($nResult); $strMySendingDate = $arrSendingDateResult["dateSending"]; $strSendingDate = convertDateFromDB($strMySendingDate); } } } } //init vars $CurLang = $_REQUEST["language"]; $SENDER = $arrSenderDetails[0] . ", " . $arrSenderDetails[1]; $SENDDATE = $strSendingDate . "\n"; $strParams = 'cpid=' . $Circulation_cpid . '&language=' . $CurLang; $strEncyrptedParams = $objURL->encryptURL($strParams); $strEncryptedBrowserview = $CUTEFLOW_SERVER . '/pages/editworkflow_standalone.php?key=' . $strEncyrptedParams; $strMessage = "\n{$MAIL_HEADER_PRE} {$Circulation_Name}\n{$CIRCDETAIL_DESCRIPTION} {$Circulation_AdditionalText}\n\n{$CIRCDETAIL_SENDER}\t{$SENDER} \n{$CIRCDETAIL_SENDDATE}\t{$SENDDATE}\n\n\n{$MAIL_LINK_DESCRIPTION}\n{$strEncryptedBrowserview}\n\n\n\n{$strMessage}\npowered by\nCuteflow v {$CUTEFLOW_VERSION}";
function printUser($arrRow, $bIsSubstitute, $nUserId, $bLastUser) { global $arrUsers, $_REQUEST; global $CIRCDETAIL_RECEIVE, $CIRCDETAIL_STATE_WAITING, $CIRCDETAIL_STATE_OK, $CIRCDETAIL_STATE_STOP; global $CIRCDETAIL_STATE_SKIPPED, $CIRCDETAIL_STATE_SUBSTITUTE, $CIRCDETAIL_PROCESS_DURATION; global $CIRCDETAIL_DAYS, $CIRCDETAIL_STATE_DENIED, $nMailingListID, $SELF_DELEGATE_USER; echo "<tr style=\"height:22px;\">\n"; if ($bIsSubstitute == false) { if ($nUserId != -2) { echo "<td width=\"20px\"><img src=\"../images/singleuser.gif\" height=\"16\" width=\"16\"></td>\n"; echo "<td width=\"140px\">" . $arrUsers[$nUserId]["strUserId"] . "</td>\n"; } else { echo "<td width=\"20px\"><img src=\"../images/user_green.gif\" height=\"16\" width=\"16\"></td>\n"; echo "<td width=\"140px\">" . $SELF_DELEGATE_USER . "</td>\n"; } } else { ?> <td width="20" align="right"><img src="../images/right.png" height="16" width="16"></td> <td width="140"><img src="../images/singleuser2.gif" height="16" width="16" align="absmiddle" style="margin-right: 6px;"><?php echo $arrUsers[$arrRow['nUserId']]['strUserId']; ?> </td> <?php } //--- The receiving date $dateReceive = convertDateFromDB($arrRow["dateInProcessSince"]); if (0 == $arrRow["dateInProcessSince"]) { $dateReceive = "-"; echo "<td width=\"150px\"> </td>\n"; } else { echo "<td width=\"150px\" nowrap>" . $dateReceive . "</td>\n"; } //--- The process state if (!$arrRow) { echo "<td width=\"16px\"> </td>\n"; echo "<td width=\"110px\"> </td>\n"; } else { switch ($arrRow["nDecissionState"]) { case 0: $strImage = "state_wait.gif"; $strText = $CIRCDETAIL_STATE_WAITING; break; case 1: $strImage = "state_ok.png"; $strText = $CIRCDETAIL_STATE_OK; break; case 2: $strImage = "state_stop.png"; $strText = "<strong style=\"color:Red;\">{$CIRCDETAIL_STATE_DENIED}</strong>"; break; case 4: $strImage = "state_skip.png"; $strText = $CIRCDETAIL_STATE_SKIPPED; break; case 8: $strImage = "state_skip.png"; $strText = $CIRCDETAIL_STATE_SUBSTITUTE; break; case 16: $strImage = "stop.gif"; $strText = "<strong style=\"color:Red;\">{$CIRCDETAIL_STATE_STOP}</strong>"; break; } echo "<td width=\"16px\">"; echo "<img src=\"../images/{$strImage}\" height=\"16\" width=\"16\">"; echo "</td>\n"; echo "<td width=\"200px\" nowrap>{$strText}</td>\n"; } //--- the working duration if ($dateReceive != "-") { if ($arrRow["nDecissionState"] == 0) { $diff = abs(time() - $arrRow["dateInProcessSince"]); $nDays = floor($diff / (60 * 60 * 24)); } else { if ($arrRow["nDecissionState"] != 16) { $dateDecission = $arrRow["dateDecission"]; $diff = abs($dateDecission - $arrRow["dateInProcessSince"]); $nDays = floor($diff / (60 * 60 * 24)); } else { $nDays = "-"; } } echo "<td nowrap><strong style=\"color:" . getDelayColor($nDays) . ";\">{$nDays}</strong> {$CIRCDETAIL_DAYS}</td>\n"; } else { echo "<td> </td>\n"; } //--- the actions global $objURL; echo "<td nowrap>"; if ($_SESSION["SESSION_CUTEFLOW_ACCESSLEVEL"] == 2 || $_SESSION["SESSION_CUTEFLOW_ACCESSLEVEL"] == 8) { if ($dateReceive != "-") { $nState = $arrRow["nDecissionState"]; if ($nState == 0 || $nState == 2) { $strParams = 'circid=' . $_REQUEST['circid'] . '&language=' . $_REQUEST['language'] . '&cpid=' . $arrRow['nID'] . '&start=' . $_REQUEST['start'] . '&sortby=' . $_REQUEST['sortby'] . '&archivemode=' . $_REQUEST['archivemode']; $strEncyrptedParams = $objURL->encryptURL($strParams); ?> <a onMouseOver="tip('retry_station')" onMouseOut="untip()" href="retryuser.php?key=<?php echo $strEncyrptedParams; ?> "> <img src="../images/retry.png" border="0" height="16" width="16" style="margin-right: 4px;"> </a> <a onMouseOver="tip('skip_station')" onMouseOut="untip()" href="skipuser.php?key=<?php echo $strEncyrptedParams; ?> "> <img src="../images/stepover_co.png" border="0" height="16" width="16"> </a> <?php if ($bIsSubstitute == false) { ?> <a onMouseOver="tip('change_substitute')" onMouseOut="untip()" href="javascript:BrowseUserlist_Subs('<?php echo $_REQUEST['circid']; ?> ', '<?php echo $_REQUEST['language']; ?> ', '<?php echo $arrRow['nID']; ?> ', '<?php echo $nMailingListID; ?> ')"> <img src="../images/cs_subs.jpg" border="0" height="16" width="16" style="margin-left: 4px;"> </a> <?php } ?> <a onMouseOver="tip('change_station')" onMouseOut="untip()" href="javascript:BrowseUserlist('<?php echo $_REQUEST['circid']; ?> ', '<?php echo $_REQUEST['language']; ?> ', '<?php echo $arrRow['nID']; ?> ', '<?php echo $nMailingListID; ?> ')"> <img src="../images/cs.jpg" border="0" height="16" width="16" style="margin-left: 4px;"> </a> <?php } /*else if (($bLastUser == true) && ($bIsSubstitute == false) && ($nState != 16) && ($nState != 8)) { $strParams = 'circid='.$_REQUEST['circid'].'&language='.$_REQUEST['language'].'&cpid='.$arrRow['nID'].'&start='.$_REQUEST['start'].'&sortby='.$_REQUEST['sortby'].'&archivemode='.$_REQUEST['archivemode']; $strEncyrptedParams = $objURL->encryptURL($strParams); ?> <a onMouseOver="tip('retry_station')" onMouseOut="untip()" href="retryuser.php?key=<?php echo $strEncyrptedParams ?>"> <img src="../images/retry.png" border="0" height="16" width="16"> </a> <?php }*/ } } echo " </td>"; echo "</tr>\n"; }