Advertisement
Sabriel

Untitled

Jan 13th, 2014
433
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 8.49 KB | None | 0 0
  1. <!DOCTYPE html>
  2.  
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>
  5. Voting
  6. </title>
  7.  
  8. <script>
  9. function getXmlHttp() {
  10. var xmlhttp;
  11. try {
  12. xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
  13. } catch (e) {
  14. try {
  15. xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
  16. } catch (E) {
  17. xmlhttp = false;
  18. }
  19. }
  20. if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
  21. xmlhttp = new XMLHttpRequest();
  22. }
  23. return xmlhttp;
  24. }
  25.  
  26. function voteHandler(mark) {
  27. request = getXmlHttp();
  28.  
  29. if (request) {
  30. request.open('GET', "votingHandler.aspx?mark="+mark, true);
  31. request.onreadystatechange = addition;
  32. request.send();
  33. }
  34. }
  35.  
  36. function addition() {
  37. if (request.readyState == 4) {
  38. if (request.status == 200) {
  39. document.getElementById("voting").innerHTML = request.responseText;
  40. longPoll();
  41. //document.getElementById("voting").innerHTML = "<iframe id='endless_iframe' src='votingHandler.aspx' style='width: 1px; height: 1px; visibility: hidden; position: absolute;'></iframe>"
  42. }
  43. }
  44. }
  45.  
  46. function longPoll() {
  47. request = getXmlHttp();
  48.  
  49. if (request) {
  50. request.open('POST', "votingHandler.aspx", true);
  51. request.onreadystatechange = addition;
  52. request.send();
  53. }
  54. }
  55.  
  56. function updateHandler() {
  57. request = getXmlHttp();
  58.  
  59. if (request) {
  60. longPoll();
  61. }
  62. }
  63. </script>
  64. <script type="text/javascript">
  65.  
  66. var screenH = window.innerHeight
  67. || document.documentElement.clientHeight
  68. || document.body.clientHeight;
  69. var screenW = window.innerWidth
  70. || document.documentElement.clientWidth
  71. || document.body.clientWidth;
  72.  
  73. function loadingPage() {
  74. digitalWatch();
  75. document.getElementById("container").style.minHeight = (Number)(screenH - 140) + "px";
  76. if (screenW > 1100) {
  77. document.getElementById("center").style.width = "600px";
  78. } else {
  79. document.getElementById("center").style.width = (Number)(screenW * 0.4) + "px";
  80. }
  81. if ((Number)(screenW) > 1500) {
  82. document.getElementById("left").style.right = "20px";
  83. } else {
  84. document.getElementById("left").style.right = "230px";
  85. }
  86. }
  87.  
  88. function resizeHandler(event) {
  89. screenH = window.innerHeight
  90. || document.documentElement.clientHeight
  91. || document.body.clientHeight;
  92. screenW = window.innerWidth
  93. || document.documentElement.clientWidth
  94. || document.body.clientWidth;
  95. document.getElementById("container").style.minHeight = (Number)(screenH - 140) + "px";
  96. if ((Number)(screenW) > 1100) {
  97. document.getElementById("center").style.width = "600px";
  98. } else {
  99. document.getElementById("center").style.width = (Number)(screenW * 0.4) + "px";
  100. }
  101. if ((Number)(screenW) > 1500) {
  102. document.getElementById("left").style.right = "20px";
  103. } else {
  104. //alert(screenW);
  105. document.getElementById("left").style.right = "230px";
  106. }
  107. }
  108.  
  109. function digitalWatch() {
  110. var date = new Date();
  111. var hours = date.getHours();
  112. var minutes = date.getMinutes();
  113. var seconds = date.getSeconds();
  114. if (hours < 10) hours = "0" + hours;
  115. if (minutes < 10) minutes = "0" + minutes;
  116. if (seconds < 10) seconds = "0" + seconds;
  117. document.getElementById("digital_watch").innerHTML = hours + ":" + minutes + ":" + seconds;
  118. setTimeout("digitalWatch()", 1000);
  119. }
  120.  
  121. function offsetPosition(e) {
  122. var offsetTop = 0;
  123. do { offsetTop += e.offsetTop; } while (e = e.offsetParent);
  124. return offsetTop;
  125. }
  126.  
  127. window.onscroll = function () {
  128. var left = document.getElementById("left");
  129. var OP = offsetPosition(left);
  130. if (OP < window.pageYOffset - 30 || OP < document.lastChild.scrollTop) {
  131. left.style.marginLeft = "0";
  132. left.style.left = "195pt";
  133. left.style.top = "0";
  134. left.style.position = "fixed";
  135. if (OP < window.pageXOffset) {
  136. left.style.left = 195 - window.pageXOffset + "pt";
  137. }
  138. if (OP < document.lastChild.scrollLeft) {
  139. left.style.left = 195 - document.lastChild.scrollLeft + "pt";
  140. }
  141. }
  142. else {
  143. left.style.marginLeft = "-100%";
  144. left.style.position = "relative";
  145. left.style.left = "auto";
  146. left.style.right = "235pt";
  147. }
  148. }
  149. </script>
  150.  
  151. <style>
  152. html, body {
  153. height: 100%;
  154. min-height:100%;
  155. /*min-width: 1300px;*/
  156. padding: 0;
  157. margin: 0;
  158. font-family: Tahoma, Arial, Helvetica, sans-serif;
  159. font-size: 12pt;
  160. }
  161.  
  162. /*body {
  163. background-image: url(images/imbc-2.jpg);
  164. background-attachment:fixed;
  165. background-repeat:no-repeat;
  166. background-size:cover;
  167. }*/
  168.  
  169. #bg {
  170. position: fixed;
  171. min-height:540px;
  172. min-width:1024px;
  173. width: 100%;
  174. height: 100%;
  175. }
  176. #body {
  177. position: absolute;
  178. width: 100%;
  179. height: 100%;
  180. z-index: 1;
  181. }
  182.  
  183. #header {
  184. padding: 0px 10px;
  185. position:relative;
  186. display:block;
  187. margin-left: 20px;
  188. margin-right: 16px;
  189. height:70px;
  190. min-width: 700pt;
  191. clear:both;
  192. background-color: lightseagreen;
  193. box-shadow: 0px 0px 20px black;
  194. z-index: 5;
  195. }
  196.  
  197. #container {
  198. margin: 0px 180pt 0px 180pt;
  199. padding-left: 250px;
  200. padding-right: 20px;
  201. min-height: 100%;
  202. position:relative;
  203. float:left;
  204. background-image: url(images/wash-white-30.png);
  205. z-index: 1;
  206. }
  207. #container .column {
  208. position:relative;
  209. float: left;
  210. margin-bottom: 20px;
  211. background: #fff;
  212. box-shadow: 0px 0px 20px black;
  213. }
  214. #center {
  215. width: 600px;
  216. margin-top: 70px;
  217. padding: 10px;
  218. border: solid #D9E0E7;
  219. border-width: 2px 2px 2px;
  220. z-index: 10;
  221. }
  222. #left {
  223. border-bottom: solid #D9E0E7;
  224. border-width: 0px 0px 2px;
  225. width: 200px;
  226. margin-left: -100%;
  227. right: 230px;
  228. padding-left: 10px;
  229. text-align:left;
  230. position:fixed;
  231. z-index : 5;
  232. }
  233. #footer {
  234. margin: 16px 16px 0px 16px;
  235. height: 70px;
  236. margin-top: -50px;
  237. min-width: 700pt;
  238. clear:both;
  239. background-color:lightsalmon;
  240. text-align:center;
  241. box-shadow: 0px 0px 20px black;
  242. }
  243. .scale {
  244. width:100%;
  245. text-align:center;
  246. background-color:lightblue;
  247. }
  248. .percent {
  249. float:right;
  250. }
  251. </style>
  252. </head>
  253. <body onload="loadingPage()" onresize="resizeHandler()">
  254.  
  255. <img src="images/imbc-2.jpg" id="bg" alt="" />
  256.  
  257. <div id="body">
  258. <div id="header">
  259. <div>
  260. <div style= "float:left; font-weight:500; font-size:24pt">Счетчик</div>
  261. <div id="digital_watch" style="color:royalblue; font-size: 120%; font-weight: bold; float:right;"></div>
  262. <form name="web" method="get" action="http://yandex.ru/yandsearch" style="float:right; clear:both;">
  263. <input type="text" style="font-size:12pt;" name="text" size="16" placeholder="Поиск..." />
  264. <input type="submit" style="font-size:12pt;" value="Поиск" />
  265. <input type="hidden" name="serverurl" value="http://urfu.ru" />
  266. </form>
  267. </div>
  268. </div>
  269.  
  270. <div id="container">
  271. <div id="center" class="column">
  272.  
  273. <div id="voting">
  274. <form method='get' name='voting'>Опрос: ваша оценка сайту<p><input type='radio' name='mark' value='1' onclick='voteHandler(this.value)' />1</p><p><input type='radio' name='mark' value='2' onclick='voteHandler(this.value)'/>2</p><p><input type='radio' name='mark' value='3' onclick='voteHandler(this.value)'/>3</p><p><input type='radio' name='mark' value='4' onclick='voteHandler(this.value)'/>4</p><p><input type='radio' name='mark' value='5' onclick='voteHandler(this.value)'/>5</p></form>
  275. </div>
  276.  
  277. </div>
  278. <div id="left" class="column">
  279. <p><a href="index.html">Главная</a></p>
  280. <p><a href="aboutMePage.html">Об авторе</a></p>
  281. <p><a href="photoGalleryPage.html">Галерея</a></p>
  282. <p><a href="referencesPage.html">Контакты</a></p>
  283. <p><a href="guestBookPage.aspx">Гостевая книга</a></p>
  284. <p><a href="votePage.aspx">Опрос</a></p>
  285. <p><a href="counter.aspx">Счетчик</a></p>
  286. </div>
  287. </div>
  288.  
  289. <div id="footer">
  290. &copy; Алексей Захаров, 2013
  291. </div>
  292. </div>
  293.  
  294. <div id="hid" style="visibility: hidden;position:fixed;top:0;left:0;width:100%">
  295. <table bgcolor='gray' cellpadding='1' cellspacing='1'><tr bgcolor='gray'><td><table width='100%' height='20' bgcolor='lightyellow' cellpadding=0 cellspacing=8><tr><td>
  296. <font face='courier new' color=red><small>
  297. <font color='orangered'><b>NOTICE:</b></font>This website (http://aspspider.ws/mrn_phoenix/guestBookPage.aspx) is hosted using AspSpider.com free educational hosting service.
  298. Do not provide any sensitive information through this website unless you trust the owner.
  299. <a href='http://www.aspspider.com/team/ContactUs.aspx?Subject=..' target="_blank">Report Abuse</a>&nbsp;&nbsp;&nbsp;&nbsp;
  300. Visit <a href='http://www.aspspider.com'>AspSpider.com</a></small></font>.
  301. </td></tr></table></td></tr></table>
  302. </div>
  303.  
  304. <script type="text/javascript">
  305. function showIt()
  306. {
  307. if ( document.getElementById("hid").style.visibility == "hidden")
  308. {
  309. document.getElementById("hid").style.visibility = "visible";
  310. }
  311. else
  312. {
  313. document.getElementById("hid").style.visibility = "hidden";
  314. }
  315. setTimeout("showIt()", 4000); // after 1 sec
  316.  
  317. }
  318. setTimeout("showIt()", 2000); // after 1 sec
  319. </script>
  320.  
  321. </body>
  322. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement