Advertisement
Guest User

Untitled

a guest
Apr 20th, 2014
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.27 KB | None | 0 0
  1. exec('C:xampphtdocsisitipresetationconvertpdf2swf.exe docsK1.pdf -o docsK1.swf -f -T 9 -t -s storeallcharacters');
  2.  
  3. <?php
  4. // Connect to the database
  5. $host="localhost"; // Host name
  6. $username="root"; // Mysql username
  7. $password=""; // Mysql password
  8. $db_name="is"; // Database name
  9. $tbl_name="presentation"; // Table name
  10.  
  11. if(isset($_GET["id"]))
  12. {
  13. $id =$_GET["id"];
  14.  
  15.  
  16. $con=mysql_connect("localhost","root","");
  17. mysql_select_db("is");
  18. if (mysqli_connect_errno($con))
  19. {
  20. echo "Failed to connect to MySQL: " . mysqli_connect_error();
  21. }
  22.  
  23. $result = mysql_query("SELECT * FROM presentation where slide_id='$id'");
  24. $row = mysql_fetch_array($result);
  25. $slide = $row['slide'];//content of database store here
  26.  
  27. exec('C:xampphtdocsisitipresetationconvertpdf2swf.exe docsK1.pdf -o docsK1.swf -f -T 9 -t -s storeallcharacters');
  28.  
  29.  
  30. echo '<script type="text/javascript">
  31. window.location.href="../presentation/?id='.$id.'";
  32. </script>';
  33. }
  34. else
  35. {
  36. echo'<script type="text/javascript">
  37. alert("id failed")
  38. </script>';
  39.  
  40. }
  41. ?>
  42.  
  43. <script type="text/javascript">
  44. function getDocumentUrl(document){
  45. return "php/services/view.php?doc={doc}&format={format}&page={page}".replace("{doc}",document);
  46. }
  47.  
  48. var startDocument = "Paper";
  49.  
  50. $('#documentViewer').FlexPaperViewer(
  51. { config : {
  52.  
  53. SWFFile : 'docs/a1.swf',//how to put the converted .swf file here
  54.  
  55. Scale : 0.6,
  56. ZoomTransition : 'easeOut',
  57. ZoomTime : 0.5,
  58. ZoomInterval : 0.2,
  59. FitPageOnLoad : true,
  60. FitWidthOnLoad : false,
  61. FullScreenAsMaxWindow : false,
  62. ProgressiveLoading : false,
  63. MinZoomSize : 0.2,
  64. MaxZoomSize : 5,
  65. SearchMatchAll : false,
  66. InitViewMode : 'Portrait',
  67. RenderingOrder : 'flash',
  68. StartAtPage : '',
  69.  
  70. ViewModeToolsVisible : true,
  71. ZoomToolsVisible : true,
  72. NavToolsVisible : true,
  73. CursorToolsVisible : true,
  74. SearchToolsVisible : true,
  75. WMode : 'window',
  76. localeChain: 'en_US'
  77. }}
  78. );
  79. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement