Re: (RESOLVED) View Failed Fax in AvantFax Outbox

Tom Le <[email protected]>
Newsgroups gmane.comp.telephony.fax.hylafax.user
Message-ID <[email protected]>
Hi Pat

I made the few changes to the outbox.tpl and outbox.php to get the 
desire result.  It may not be elegant but it works.  Below are the 
changes if someone would like the same thing

========================================
in outbox.tpl,
========================================


         <td>{$queue[r].tts}</td>
         <td>{$queue[r].status}</td>

#### I added the line below
         <td>{$queue[r].docfile}</td>
#########

         <td>
             <span title="{$LANG.MODIFY_FAXJOB}"><input type="button" 
value="&radic;" class="inputsubmit" id="fabtn_{$queue[
r].jid}" onclick="dialogFaxAlter({$queue[r].jid},0,'{$queue[r].owner}')" 
/></span>
             <span title="{$LANG.KILL_JOB}"><input type="button" 
value="X" class="inputsubmit" onclick="if (confirm ('{$LANG
.KILL_JOB} {$queue[r].jid}')) {literal}{{/literal}this.disabled = true; 
location.href='outbox.php?kill={$queue[r].jid}'{lit
eral}}{/literal}" /></span>
         </td>

#### I added the line below
     <td align="right">
         <a href="{$failed_queue[r].docfile}" target="_blank"><img 
src="images/pdf-sm.png" border=0 title="{$LANG.DOWNLOAD_P
DF}" /></a>
     </td>
#########
========================================



========================================
in outbox.php
========================================

     $failed_faxqueue    = array();

     if (is_array($failed_queue)) {
         foreach ($failed_queue as $q) {
             $q['company'] = $q['number'];

             if ($addressbook->loadbyfaxnum($q['number'], $mult)) {
                 $q['company'] = $addressbook->get_company();
             }

#### I added the line below

             $file = '/var/spool/hylafax/doneq/q' . $q['jid']; // get 
the q file associate with the job id
             if( file_exists( $file ) )
             {

                 $file = escapeshellarg($file);
                 $line = `tail -n 1 $file`; // the last line in the q 
file so that we can get the pdf file

                 $q['docfile'] = substr($line, strpos($line, "docq")); 
// get the string from docq to the end of line, which reference to pdf file

             }
#########

             $failed_faxqueue[] = $q;
         }
     }

     $INC_LIST = "<meta http-equiv=\"refresh\" 
content=\"$refresh_timeout;URL=outbox.php\" />";

==========================================


And now, my outbox has a link the pdf file that suppose to be send out.  
Hope this helps somebody else, that would
like to view the failed fax like me

If there is another way, then please let me know.


Thanks












On 11/26/2015 08:02 PM, Tom Le wrote:
> Hi Pat, and Lee
>
> Can you guys give me some guidance on how to achieve this?  I tried to 
> change the outbox.php and outbox.tpl to have the download link like 
> the refax and archive, but i can seem to get the fid correctly.  in 
> the outbox.php/tpl I only get the jid, which does not link to the pdf 
> file in the pdfpath.
>
> Please advise.
>
> Thanks
>
>
>
> On 10/23/2015 07:53 PM, Pat Rohe wrote:
>> Problem is that John Hart died suddenly August 13th and he didn't 
>> leave much documentation so I am trying to put the pieces together.  
>> Can you let me know what your company provides in service to Custom 
>> it would be helpful.
>>
>> We did replace both UBS for the servers.
>>
>> Pat
>>
>> Sent from my iPhone
>>
>>> On Oct 23, 2015, at 7:55 PM, Tom Le <[email protected]> wrote:
>>>
>>> Hi all,
>>>
>>> I am not sure if this is the right forum,  and if it is not then 
>>> please point me to the right one, but here is my problem
>>> I cannot view the failed fax to see the recipient info to contact 
>>> them.  I can view them using Yajhfc client, but I don't want to 
>>> install 50 pc.
>>>
>>> Thanks for your help.
>>>
>>>
>>>
>>> ____________________ HylaFAX(tm) Users Mailing List 
>>> _______________________
>>> To subscribe/unsubscribe, click 
>>> http://lists.hylafax.org/cgi-bin/lsg2.cgi
>>> On UNIX: mail -s unsubscribe [email protected] < 
>>> /dev/null
>>> *To learn about commercial HylaFAX(tm) support, mail [email protected].*
>>>
>


____________________ HylaFAX(tm) Users Mailing List _______________________
  To subscribe/unsubscribe, click http://lists.hylafax.org/cgi-bin/lsg2.cgi
 On UNIX: mail -s unsubscribe [email protected] < /dev/null
  *To learn about commercial HylaFAX(tm) support, mail [email protected].*
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.