frame.php 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. <html>
  2. <head>
  3. <title>SLOODLE Rezzer Configuration</title>
  4. <script language="JavaScript">
  5. <?php
  6. // The rezzer configuration screen div at the bottom of the page should be visible if we're not already on the rezzer configuration screen.
  7. // Once we get there, it should hide itself.
  8. ?>
  9. function togglePageResetDiv(currentURL) {
  10. var rightPlacePattern = '/mod/sloodle/mod/set-1.0/shared_media/index.php';
  11. // This will be null or undefined if the user has browsed to a different site.
  12. // Make sure we have a string so indexOf comparisons don't break.
  13. if (!currentURL || !currentURL.indexOf) {
  14. currentURL = '';
  15. document.getElementById('back_to_rezzer_bar').style.display = 'none';
  16. return;
  17. }
  18. if ( (currentURL.indexOf(rightPlacePattern) == -1) && (currentURL.indexOf('/login/index.php') == -1) ) {
  19. <?php
  20. // Hide the bottom bar if we're on the user login page, as it won't help us anyway.
  21. // If you have a different login flow caused by another plugin or something it will still show up
  22. // ...which isn't ideal, but isn't too terrible either.
  23. ?>
  24. document.getElementById('back_to_rezzer_bar').style.display = 'block';
  25. } else {
  26. document.getElementById('back_to_rezzer_bar').style.display = 'none';
  27. }
  28. }
  29. </script>
  30. </head>
  31. <body style="overflow:hidden;margin:0px;">
  32. <iframe id="main_frame" onLoad="togglePageResetDiv(this.contentWindow.location.href);" name="main" style="width:100%;height:100%;border:0px;overflow:auto;" src="index.php?<?php echo $_SERVER['QUERY_STRING']; ?>">
  33. Loading
  34. </iframe>
  35. <div id="back_to_rezzer_bar" style="width:100%;position:absolute;bottom:0px;background-color:gray;z-index:10;margin:0px;display:none"><a style="font-family:Helvetica;font-weight:bold;font-size:28px;color:white;margin-left:10px;margin:4px;text-decoration:none" target="main" href="index.php?<?php echo $_SERVER['QUERY_STRING']; ?>">&lt; Back To Rezzer Configuration Screen</a></div>
  36. </body>
  37. </html>