index_GD_old.php 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. <html>
  2. <head>
  3. <title>KATRIN Spectrometer and Detector Section Status Overview</title>
  4. <style type="text/css">
  5. body { font-family:Calibri,Arial; }
  6. a:link { text-decoration:none; }
  7. a:visited { text-decoration:none; }
  8. a:hover { text-decoration:none; }
  9. a:active { text-decoration:none; }
  10. a:focus { text-decoration:none; }
  11. </style>
  12. <head>
  13. <link rel="stylesheet" href="pics/beamline_noMoS.png" />
  14. <link rel="stylesheet" href="pics/spectrometer.png" />
  15. <link rel="stylesheet" href="pics/katrin_logo.jpg" />
  16. <link rel="stylesheet" href="pics/newEmail.png" />
  17. </head>
  18. <?php
  19. // get client ip adress to check whether computer is on-site or not
  20. if (!empty($_SERVER['HTTP_CLIENT_IP'])) {
  21. $ip = $_SERVER['HTTP_CLIENT_IP'];
  22. } elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {
  23. $ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
  24. } else { $ip = $_SERVER['REMOTE_ADDR']; }
  25. $onsite = false;
  26. $slowrefresh = false;
  27. if (substr($ip, 0, 6) == "141.52")
  28. { if (substr($ip, 0, 9) == "141.52.16")
  29. { echo '<meta http-equiv="refresh" content="10">'; $onsite = true; }
  30. else echo '<meta http-equiv="refresh" content="30">'; $onsite = true; }
  31. else { echo '<meta http-equiv="refresh" content="120">'; $slowrefresh= true; }
  32. ?>
  33. </head>
  34. <body>
  35. <?php
  36. // include helper functions
  37. include "SDS_status_functions.php";
  38. // include channel list
  39. include "SDS_status_channels.php";
  40. // read cached ADEI data
  41. $valuesincluded = 0;
  42. $loop = 0;
  43. $includeflag = 0;
  44. do {
  45. $includeflag = include 'ADEIvalues.php';
  46. $loop++;
  47. if ($valuesincluded == 0) usleep(100000);
  48. }
  49. while (($loop < 21) && ($includeflag+$valuesincluded < 2));
  50. if ($valuesincluded == 0) $extraction_time = "Request timed out!".PHP_EOL;
  51. //echo $loop." ".$includeflag." ".$valuesincluded.PHP_EOL;
  52. // ########## TIME STAMP ##########
  53. echo '<font size="6" color="#000000"><b>KATRIN Spectrometer and Detector Section Status Overview</b></font><br>';
  54. echo '<font size="4" color="#000000">Page refreshed:&emsp;' . date(DATE_RFC822) . '</font><br>';
  55. echo '<font size="4" color="#000000">Data extracted:&ensp;&thinsp;&thinsp;&thinsp;' . $extraction_time . ' </font><br>';
  56. echo '<font size="4" color="#FFFFFF">&emsp; &emsp; &emsp; Client IP:' . $ip . ' </font><br>';
  57. //('. date("s", time() - $extraction_timestamp).'&thinsp;s old data)<br>';
  58. if ($errorcount >0) echo "<br> <br> <br> <br>".$errormessage;
  59. ?>
  60. <div style="position:absolute; top:150px; left:0px">
  61. <img src="pics/beamline_noMoS.png">
  62. <div style="position:absolute; top:20px; left:315px">
  63. <img src="pics/spectrometer.png" width="1130" height="596">
  64. </div>
  65. <div style="position:absolute; top:-140px; left:1585px">
  66. <img src="pics/katrin_logo.jpg" width="100" height="100">
  67. </div>
  68. <div style="position:absolute; top:-150px; left:800px">
  69. <img src="pics/60graphic.gif" width="194" height="145">
  70. </div>
  71. <div style="position:absolute; top: 200px; left:680px">
  72. <img src="pics/congratulations.png" width="400" height="117">
  73. </div>
  74. <!--
  75. <div style="position: absolute; top: 60px; left:1670px">
  76. <iframe src="https://uhr.ptb.de" scrolling="no" style="height: 230px; border: 0px none; width: 230px; margin-bottom: 0px; margin-left: 0px;">
  77. </iframe>
  78. </div>
  79. -->
  80. <a href="mailto:thuemmler@kit.edu">
  81. <div title="send email to Thomas Thuemmler" style="position:absolute; top:-50px; left:8px">
  82. <img src="pics/newEmail.png" width="23" height="23">
  83. </div>
  84. </a>
  85. <?php
  86. // include SDS status main page
  87. if ($valuesincluded == 1) include "SDS_status_main.php";
  88. ?>
  89. </body>
  90. </html>