Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <style type="text/css">
- #parent_div {
- width:1200px;
- padding:6px 0;
- border:1px solid #000;
- margin:auto;
- vertical-align:text-top;
- }
- #parent_div:after {
- content:'';
- display:block;
- clear:both;
- }
- #left_child {
- float:left;
- display:inline; /*required by IE6*/
- width:610px;
- border:1px solid #999;
- margin:0 3px 0 6px;
- }
- #right_child {
- float:right;
- display:inline; /*required by IE6*/
- width:200px;
- border:1px solid #999;
- margin:0 0 0 0;
- vertical-align:text-top;
- }
- </style>
- </head>
- <body>
- <div id="parent_div">
- <div id="left_child">
- <?PHP $BulletinName = "2012.01.29 Bulletin.pdf" ?>
- <object data="<?PHP echo $BulletinName; ?> " type="application/pdf" width="600" height="920">
- alt : <a href="/bulletins/2012.01.29 Bulletin.pdf">test.pdf</a>
- </object>
- </div>
- <div id="right_child">
- <center><h1>bulletins</h1></center>
- <?php
- //path to directory to scan
- $directory = "../bulletins/";
- //get all pdf files with a .pdf extension.
- $bulletins = glob($directory . "*.pdf");
- if(count($bulletins) > 0)
- {
- //print each file name
- foreach($bulletins as $bulletin)
- {
- echo "<a href='" . $bulletin . "'>" . $bulletin . "<br>";
- }
- }
- else
- {
- // no matches
- echo "Sorry, no bulletins found.";
- }
- ?>
- </div>
- </div>
- </body>
- </html>
Add Comment
Please, Sign In to add comment