iframe.php 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. <?php
  2. /*
  3. *
  4. * OGP - Open Game Panel
  5. * Copyright (C) 2008 - 2018 The OGP Development Team
  6. *
  7. * http://www.opengamepanel.org/
  8. *
  9. * This program is free software; you can redistribute it and/or
  10. * modify it under the terms of the GNU General Public License
  11. * as published by the Free Software Foundation; either version 2
  12. * of the License, or any later version.
  13. *
  14. * This program is distributed in the hope that it will be useful,
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. * GNU General Public License for more details.
  18. *
  19. * You should have received a copy of the GNU General Public License
  20. * along with this program; if not, write to the Free Software
  21. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  22. *
  23. */
  24. function exec_ogp_module()
  25. {
  26. if(isset($_POST['default']))
  27. {
  28. unset($_SESSION['height']);
  29. unset($_SESSION['width']);
  30. }
  31. if(isset($_SESSION['height']))$height = $_SESSION['height'];
  32. else
  33. {
  34. $height = 420;
  35. $_SESSION['height'] = $height;
  36. }
  37. if(isset($_SESSION['width']))$width = $_SESSION['width'];
  38. else
  39. {
  40. $width = 770;
  41. $_SESSION['width'] = $width;
  42. }
  43. if(isset($_POST['h_bigger']))
  44. {
  45. $_SESSION['height'] = $_SESSION['height'] + 50;
  46. $height = $_SESSION['height'];
  47. }
  48. if(isset($_POST['h_smaller']))
  49. {
  50. $_SESSION['height'] = $_SESSION['height'] - 50;
  51. $height = $_SESSION['height'];
  52. }
  53. if(isset($_POST['w_bigger']))
  54. {
  55. $_SESSION['width'] = $_SESSION['width'] + 50;
  56. $width = $_SESSION['width'];
  57. }
  58. if(isset($_POST['w_smaller']))
  59. {
  60. $_SESSION['width'] = $_SESSION['width'] - 50;
  61. $width = $_SESSION['width'];
  62. }
  63. ?>
  64. <IFRAME SRC="<?php echo $_GET['external_link']; ?>" WIDTH=<?php echo $width; ?> HEIGHT=<?php echo $height; ?> style="border:1px solid transparent;background-color:white" ></IFRAME>
  65. <br>
  66. <table style='text-align:center;'>
  67. <tr>
  68. <td colspan=3><form action="" method=POST><input type='submit' value='-H' name='h_smaller'/></form></td>
  69. </tr>
  70. <tr>
  71. <td><form action="" method=POST><input type='submit' value='-W' name='w_smaller'/></form></td>
  72. <td><form action="" method=POST><input type='submit' value='0' name='default'/></form></td>
  73. <td><form action="" method=POST><input type='submit' value='+W' name='w_bigger'/></form></td>
  74. </tr>
  75. <tr>
  76. <td colspan=3><form action="" method=POST><input type='submit' value='+H' name='h_bigger'/></form></td>
  77. </tr>
  78. <tr>
  79. </tr></table>
  80. <a href="?m=administration&p=main"><?php print_lang('back'); ?></a>
  81. <?php
  82. }
  83. ?>