Advertisement
Guest User

Untitled

a guest
Dec 11th, 2016
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.62 KB | None | 0 0
  1. <html>
  2. <head>
  3.  
  4. <?php
  5. $dbIP = 'localhost';
  6. $db = 'gimmesne_home';
  7. $dbusername = 'gimmesne_home';
  8. $dbpass = 'X';
  9.  
  10. $starttime = explode(' ', microtime());
  11. $starttime = $starttime[1] + $starttime[0];
  12.  
  13. ?>
  14.  
  15. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  16. <script type="text/javascript">
  17. <!--
  18.  
  19. function updateClock ( )
  20. {
  21. var currentTime = new Date ( );
  22.  
  23. var currentHours = currentTime.getHours ( );
  24. var currentMinutes = currentTime.getMinutes ( );
  25. var currentSeconds = currentTime.getSeconds ( );
  26.  
  27. // Pad the minutes and seconds with leading zeros, if required
  28. currentMinutes = ( currentMinutes < 10 ? "0" : "" ) + currentMinutes;
  29. currentSeconds = ( currentSeconds < 10 ? "0" : "" ) + currentSeconds;
  30.  
  31. // Choose either "AM" or "PM" as appropriate
  32. var timeOfDay = ( currentHours < 12 ) ? "AM" : "PM";
  33.  
  34. // Convert the hours component to 12-hour format if needed
  35. currentHours = ( currentHours > 12 ) ? currentHours - 12 : currentHours;
  36.  
  37. // Convert an hours component of "0" to "12"
  38. currentHours = ( currentHours == 0 ) ? 12 : currentHours;
  39.  
  40. // Compose the string for display
  41. var currentTimeString = currentHours + ":" + currentMinutes + ":" + currentSeconds + " " + timeOfDay;
  42.  
  43. // Update the time display
  44. document.getElementById("clock").firstChild.nodeValue = currentTimeString;
  45. }
  46.  
  47. // -->
  48. </script>
  49. <style>
  50. #KiesGebruiker {
  51. border: 1px solid red;
  52. text-align: center;
  53. font-size: 3.9vw;
  54. }
  55. #thumbs {
  56. display: flex;
  57. justify-content:space-between;
  58. }
  59. .fotos {
  60. width:auto;
  61. height:auto;
  62. max-width:100%;
  63. max-height:90vh;
  64. }
  65. </style>
  66. </head>
  67. <body onload="updateClock(); setInterval('updateClock()', 1000 )">
  68. <?php $startScriptTime=microtime(TRUE); ?>
  69. <div id="KiesGebruiker">Het is <span id="clock">&nbsp;</span>! <br> <i>Druk op jezelf om je aan te melden</i> <hr> Pagina geladen in <?php $load = microtime();print (number_format($load,2));?> seconds. <?php
  70. $loadtime = explode(' ', microtime()); $loadtime = $loadtime[0]+$loadtime[1]-$starttime; echo '<br>Piek geheugen gebruik: ',round(memory_get_peak_usage()/1048576, 2), 'MB';
  71. ?>
  72. </div>
  73.  
  74. <div id="thumbs">
  75. <?php
  76.  
  77. function CreateLoginWithName($name) {
  78. $image = $name . ".JPG";
  79. $href = "auth.php?username=" . $name;
  80. echo "<a class='fotos' href='$href'><figure><img width='100px' src='$image' alt='$name'/></a>";
  81. echo "<center><figcaption>$name</figcaption></center></figure>";
  82. }?>
  83.  
  84. <?php
  85.  
  86. CreateLoginWithName('Tycho');
  87. CreateLoginWithName('Helen');
  88. CreateLoginWithName('Algemeen');
  89. CreateLoginWithName('Timo');
  90. CreateLoginWithName('Anton');?>
  91. </div>
  92.  
  93.  
  94.  
  95.  
  96. </body>
  97. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement