Originariamente inviato da Santino83_02
non conosco il componente, ma immagino che questa richiesta sia equivalente ad:
(...)
detto in pseudocodice.
Sì, ma non lo so applicare
Vi illustro lo schema che utilizzo (codice non scritto da me, purtroppo).
Lista dei fax inviati
Codice PHP:
Set objFaxServer = CreateObject("FaxComEx.FaxServer")
objFaxServer.Connect ""
Prefetch=2000
Set objFolder = objFaxServer.Folders
Set objOutgoingArchive = objFolder.OutgoingArchive
'Refresh the archive
objFaxServer.Folders.OutgoingArchive.Refresh
Set objFaxOutgoingMessageIterator = objFaxServer.Folders.OutgoingArchive.GetMessages(Prefetch)
on error resume next
(...Intestazione della tabella HTML di resoconto)
For i = 1 To Prefetch
'Get the message
If objFaxOutgoingMessageIterator.AtEOF = True Then
' NULL
else
Set objFaxOutgoingMessage = objFaxOutgoingMessageIterator.Message
(...Popolamento righe tabella html...)
end if
objFaxOutgoingMessageIterator.MoveNext
Next
PEr i fax in coda invece, tralasciando il codice che identifica il motivo per cui l'invio è andato in errore, questo è il codice
Lista fax In errore (scrivo anche il contenuto della tabella html)
Codice PHP:
Set objFaxServer = CreateObject("FaxComEx.FaxServer")
objFaxServer.Connect ""
Set objFolder = objFaxServer.Folders
Set objOutgoingArchive = objFolder.OutgoingArchive
'Connect to the fax server
objFaxServer.Connect ""
'Get the outgoing queue object
Set objFaxOutgoingQueue = objFaxServer.Folders.OutgoingQueue
'Refresh the queue object
objFaxOutgoingQueue.Refresh
n = objFaxOutgoingQueue.GetJobs.Count
<tr class="intesta">
<td width="14%" align="center">
[b]Pagine[/b]
</td>
<td width="14%" align="center">
[b]Stato[/b]
</td>
<td width="14%" align="center">
[b]Tentativi[/b] </td>
<td width="14%" align="center">
[b]Invia[/b]
</td>
<td width="14%" align="center">
[b]Elimina[/b]
</td>
</tr>
<td width="14%" align="center" class="testolista">
<%=objFaxOutgoingJob.Pages %>
</td>
<td width="14%" align="center" class="testolista">
<%=statofaxx(objFaxOutgoingJob.ExtendedStatusCode)%>
</td>
<td width="14%" align="center" class="testolista">
<%=objFaxOutgoingJob.Retries%>
</td>
<td width="14%" align="center" class="testolista"><a href="javascript:f_confinvi('procedure/pr_invifaxx.asp?vc_numefaxx=<%=objFaxOutgoingJob.Id%>')">
[img]fax.gif[/img]</a>
</td>
<td width="14%" align="center" class="testolista"><a href="javascript:f_deleinvi('procedure/pr_delefaxx.asp?vc_numefaxx=<%=objFaxOutgoingJob.Id%>')">
[img]images/Icons/Delete.gif[/img]</a>
</td>
Next
dove procedure/pr_invifaxx.asp contiene
Codice PHP:
<%
Set objFaxServer = CreateObject("FaxComEx.FaxServer")
objFaxServer.Connect ""
Set objFolder = objFaxServer.Folders
Set objOutgoingArchive = objFolder.OutgoingArchive
'Connect to the fax server
objFaxServer.Connect ""
'Get the outgoing queue object
Set objFaxOutgoingQueue = objFaxServer.Folders.OutgoingQueue
'Refresh the queue object
objFaxOutgoingQueue.Refresh
n = objFaxOutgoingQueue.GetJobs.Count
'Get the job based on the item number
'response.write n&" totale
"
For i = 1 To n
Set objFaxOutgoingJob = objFaxOutgoingQueue.GetJobs.Item(i)
if err.Number <> 0 then
else
if objFaxOutgoingJob.Id=request("vc_numefaxx") then
objFaxOutgoingJob.Restart
end if
end if
Next
%>
<script language="JavaScript">
window.opener.location.reload();
this.close();
</script>
Secondo voi come andrebbe modificato?
edit: Andrebbe aggiunto un bottone del tipo "invia tutti"