Advertisement
mesmariusz

slider_form

May 25th, 2018
234
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.00 KB | None | 0 0
  1. <html>
  2. <head>
  3. <style>
  4. .slidecontainer {
  5. width: 100%;
  6. }
  7.  
  8. .slider {
  9. -webkit-appearance: none;
  10. width: 100%;
  11. height: 15px;
  12. border-radius: 5px;
  13. background: #d3d3d3;
  14. outline: none;
  15. opacity: 0.7;
  16. -webkit-transition: .2s;
  17. transition: opacity .2s;
  18. }
  19.  
  20. .slider:hover {
  21. opacity: 1;
  22. }
  23.  
  24. .slider::-webkit-slider-thumb {
  25. -webkit-appearance: none;
  26. appearance: none;
  27. width: 75px;
  28. height: 75px;
  29. border-radius: 50%;
  30. background: #4CAF50;
  31. cursor: pointer;
  32. }
  33.  
  34. .slider::-moz-range-thumb {
  35. width: 145px;
  36. height: 145px;
  37. border-radius: 50%;
  38. background: #4CAF50;
  39. cursor: pointer;
  40. }
  41. </style>
  42. </head>
  43.  
  44. <body>
  45. <center>
  46.  
  47. <div style="width: 720px">
  48. <div style="margin-left: auto; width: 720px; margin-left: auto; align: center; font-size: 40px; font-family: verdana">
  49. <?php
  50. ini_set( 'display_errors', 'On' );
  51. error_reporting( E_ALL );
  52.  
  53. include("serial.conf.php");
  54. $room = "$_GET[room]";
  55. $device = "$_GET[device]";
  56. $room_long_name = "$_GET[room_long_name]";
  57. $room_php_name = "$_GET[room_php_name]";
  58. $picture_name = $room_long_name . "_" . $device . ".jpg";
  59. //$location = "device.php?room_long_name=" . $room_long_name . "&room=" . $room . "&device=" . $device;
  60. $location = "device.php?room_php_name=" . $room_php_name . "&room_long_name=" . $room_long_name . "&room=" . $room . "&device=" . $device;
  61. echo "<img src=\"http://192.168.1.115/serial/images/$picture_name\" border=\"0\" width=\"720\" height=\"540\"></br></br>
  62.  
  63. <form method=\"post\" action=\"$location\">
  64. <input type=\"submit\" value=\"on\" name=\"on\" style=\"border: 1; width: 180px; height: 93px; font-size: 32px;\"/>&nbsp;
  65. <input type=\"submit\" value=\"off\" name=\"off\" style=\"border: 1; width: 180px; height: 93px; font-size: 32px;\"/>&nbsp;
  66. <input type=\"submit\" value=\"switch\" name=\"switch\" style=\"border: 1; width: 180px; height: 93px; font-size: 32px;\"/>&nbsp;<br><br><br>
  67. <input type=\"range\" name=\"brightness\" min=\"10\" max=\"90\" class=\"slider\" id=\"myRange\">
  68. <p>Brightness: <span id=\"demo\"></span>&nbsp;<input type=\"submit\" value=\"set\" name=\"set\" style=\"border: 1; width: 180px; height: 93px; font-size: 32px;\"/></p><br>
  69.  
  70. <script>
  71. var slider = document.getElementById(\"myRange\");
  72. var output = document.getElementById(\"demo\");
  73. output.innerHTML = slider.value;
  74.  
  75. slider.oninput = function() {
  76. output.innerHTML = this.value;
  77. }
  78. </script>
  79.  
  80. <input type=\"submit\" value=\"device_exit\" name=\"device_exit\" style=\"border: 1; background: url('http://192.168.1.115/serial/images/exit_device.jpg'); width: 93px; height: 93px\" />&nbsp;
  81. <input type=\"submit\" value=\"room_exit\" name=\"room_exit\" style=\"border: 1; background: url('http://192.168.1.115/serial/images/exit_small.jpg'); width: 180px; height: 93px\" /></br>
  82. </form> ";
  83.  
  84. include("device_service.php");
  85. ?>
  86.  
  87. </div>
  88. </div>
  89.  
  90. </center>
  91. </body>
  92. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement