Guest User

Untitled

a guest
Jun 24th, 2018
165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.42 KB | None | 0 0
  1. <html>
  2. <head>
  3. <style type="text/css">
  4. #parent_div {
  5.     width:1200px;
  6.     padding:6px 0;
  7.     border:1px solid #000;
  8.     margin:auto;
  9.     vertical-align:text-top;
  10.  }
  11. #parent_div:after {
  12.     content:'';
  13.     display:block;
  14.     clear:both;
  15.  }
  16. #left_child {
  17.     float:left;
  18.     display:inline; /*required by IE6*/
  19.     width:610px;
  20.     border:1px solid #999;
  21.     margin:0 3px 0 6px;
  22.  }
  23. #right_child {
  24.     float:right;
  25.     display:inline; /*required by IE6*/
  26.     width:200px;
  27.     border:1px solid #999;
  28.     margin:0 0 0 0;
  29.     vertical-align:text-top;
  30.  }
  31. </style>
  32. </head>
  33. <body>
  34.  
  35. <div id="parent_div">
  36.  
  37.     <div id="left_child">
  38.         <?PHP $BulletinName = "2012.01.29 Bulletin.pdf" ?>
  39.  
  40.             <object data="<?PHP echo $BulletinName; ?> " type="application/pdf" width="600" height="920">
  41.                 alt : <a href="/bulletins/2012.01.29 Bulletin.pdf">test.pdf</a>
  42.             </object>
  43.     </div>
  44.  
  45.     <div id="right_child">
  46.         <center><h1>bulletins</h1></center>
  47.         <?php
  48.             //path to directory to scan
  49.             $directory = "../bulletins/";
  50.  
  51.             //get all pdf files with a .pdf extension.
  52.             $bulletins = glob($directory . "*.pdf");
  53.             if(count($bulletins) > 0)
  54.             {
  55.                 //print each file name
  56.                 foreach($bulletins as $bulletin)
  57.                 {
  58.                     echo "<a href='" . $bulletin . "'>" . $bulletin . "<br>";
  59.                 }
  60.             }
  61.             else
  62.             {
  63.                 // no matches
  64.                 echo "Sorry, no bulletins found.";
  65.             }
  66.         ?>
  67.     </div>
  68.  
  69. </div>
  70.  
  71. </body>
  72. </html>
Add Comment
Please, Sign In to add comment