Gentics Portal.Node PHP API
 All Classes Namespaces Functions Variables Pages
redirect.php
1 <!DOCTYPE html>
2 <html>
3  <head>
4  <script type="text/javascript">
5  <?php
6  $code = 'if (window.opener) {';
7  $code .= 'window.close();';
8  if ($redirect)
9  $code .= 'window.opener.location = \''.addslashes($url).'\';';
10  $code .= '}';
11  $code .= 'else {';
12  if ($redirect)
13  $code .= 'window.location = \''.addslashes($url).'\';';
14  $code .= '}';
15  echo $code;
16  ?>
17  </script>
18  </head>
19  <body>
20  <h2 id="title" style="display:none;">Redirecting back to the application...</h2>
21  <h3 id="link"><a href="<?php echo $url; ?>">Click here to return to the application.</a></h3>
22  <script type="text/javascript">
23  document.getElementById('title').style.display = '';
24  document.getElementById('link').style.display = 'none';
25  </script>
26  </body>
27 </html>