[Isis-users] [DKIM] External PHP

Francisco Tamor fttamor at yahoo.com
Sat Feb 11 15:04:14 CET 2023


 Hi Roger,
I have attached the full PFT and PHP files together with the video of the entire search activity.
Thank you.
Francisco

    On Saturday, 11 February 2023 at 02:38:44 pm GMT+8, Francisco Tamor <fttamor at yahoo.com> wrote:  
 
  Hi Roger,
My apologies, it,s not  "if npost(['theses'],  but actually "if nocc(['theses'],,'PD_'v990*4)=1 then" .
Regards,
Francisco
    On Saturday, 11 February 2023 at 02:19:59 am SGT, Roger Guilherme <memoria.info at gmail.com> wrote:  
 
 
Hi, Francisco

Something tells me that the problem is in this line "if npost(['theses'],'PD_'v990*4)=1 then", but only by seeing the result of 'PD_'v990*4 to be sure.

Another thing that catches my eye is the "display:none" in the pdffile input. My opinion: change the input to "hidden" and remove the inline css.

Here is my version of the code and let me know if it improves anything.


'<form action="/viewer.php" method="POST" target="_blank">
<input type="hidden" name="pdffile" value="/bases/theses/pdf/'v990*4'">
<font face=arial size=2 align="left"><b> View PDF:  </b><input type="submit" value="'v990*4'"></font>
</form>'

Best regards,
Roger


Em sex., 10 de fev. de 2023 às 13:25, Francisco Tamor <fttamor at yahoo.com> escreveu:

Guillermo,
Yes, PHP is not triggered on the first result but others starting from the second result display the pdf in a viewerr I made.
Sent from Yahoo Mail on Android 
 
  On Fri, Feb 10, 2023 at 17:59, Roger Guilherme<memoria.info at gmail.com> wrote:   

Dear Francisco

I don't think I quite understand what is going on. Correct me if I got it wrong.

- In the result list, isn't the link to the PDF displayed from the second result?

- In the first result of the list PHP is not being triggered?

best regards,
Roger
 
 
 -------- Doorgestuurd bericht -------- 
| Onderwerp:  | [DKIM] [Isis-users] External PHP |
| Datum:  | Thu, 9 Feb 2023 06:40:04 +0000 (UTC) |
| Van:  | Francisco Tamor <fttamor at yahoo.com> |
| Aan:  | Isis-users <isis-users at iccisis.org> |

 
 
  Dear Colleagues; 
   I have created and external PHP file to view my pdf filest. However, all the first records  after the search result do not display the pdf file. Other file will show the pdf but not the first record. Hope somebody could help me in this. Attached are the display format and PHP code I used. 
  Thank you. 
  
  ----------------
  Viewer.php 
   <?php
 session_start();
 $_SESSION=array();
 include("central/config.php");
 include("$app_path/common/get_post.php");
 $new_window=time();
 //foreach ($arrHttp as $var=>$value) echo "$var = $value<br>";
 
 if (isset($_SESSION["lang"])){
     $arrHttp["lang"]=$_SESSION["lang"];
 }else{
     $arrHttp["lang"]=$lang;
     $_SESSION["lang"]=$lang;
 }
 include ("$app_path/lang/admin.php");
 include ("$app_path/lang/lang.php");
 ?>
 
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
 <html lang="pt-br" xmlns="http://www.w3.org/1999/xhtml" xml:lang="pt-br">
 
 <head profile="http://www.w3.org/2005/10/profile">
         <meta http-equiv="Expires" content="-1" />
         <meta http-equiv="pragma" content="no-cache" />
         <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
         <meta http-equiv="Content-Language" content="pt-br" />
         <meta name="robots" content="all" />
         <meta http-equiv="keywords" content="" />
         <meta http-equiv="description" content="" />
                 <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" sizes="16x16">
 
         <title>PDF View</title>
 
 
   
 </head>
 <body onload="disableContextMenu();" oncontextmenu="return false">
     <div class="wrapper">
     <div id="result"></div>
         
         <iframe id="pdfframe" src=<?php if(isset($_POST["pdffile"])) { echo $_POST["pdffile"].'#toolbar=0';} ?>  width="100%" height="800px"></iframe>
         
         <div class="embed-cover"></div>
     </div>
     
     
 </body>
 </html> 
  
  ----------------------------------
  Dislpay Format (opac.pft) - for v990
  
 
 if npost(['theses'],'PD_'v990*4)=1 then
 '<form action="/viewer.php" method="POST" target="_blank"><font face=arial size=2 color="#000080"><b><input type="text" name="pdffile" value="/bases/theses/pdf/'v990*4'" style="display:none";></b><font face=arial size=2 align="left"><b> View PDF:  </b><input type="submit" value="'v990*4'"></form>' 
 fi, '<br><br>'
 
  
  
  
  Search Result Display
     
  

    
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.iccisis.org/pipermail/isis-users/attachments/20230211/8483bf78/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: opac.pft
Type: application/octet-stream
Size: 3382 bytes
Desc: not available
URL: <http://lists.iccisis.org/pipermail/isis-users/attachments/20230211/8483bf78/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: viewer.php
Type: application/octet-stream
Size: 1841 bytes
Desc: not available
URL: <http://lists.iccisis.org/pipermail/isis-users/attachments/20230211/8483bf78/attachment-0003.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: video_20230211_212556_edit.avi
Type: video/avi
Size: 7476958 bytes
Desc: not available
URL: <http://lists.iccisis.org/pipermail/isis-users/attachments/20230211/8483bf78/attachment-0001.bin>


More information about the isis-users mailing list