Скрипт Гостевой книги
<title>Гостевая книга</title></head> <body bgcolor="aqua"> <STYLE TYPE="text/css"> body {background-attachment: fixed;} H1 {background-color:SLATEBLUE;color:snow;font:bold italic 24pt serif;padding:3px;border:double lightblue 5px;} </STYLE> <SCRIPT LANGUAGE="JavaScript"> if (window.name != "rus" && window.name != "ee" && window.name != "en") window.name="rus"; var ns4 = (document.layers) ? true:false; var ie4 = (document.all) ? true:false; if (window.name == "ee"){var tasuta="Guestbook tasuta!"; var teised="Vaata, mida teised räägivad!"; var guest="Külalisteraamat"; var nimi="Teie nimi:"; var linn="Linn:"; var riik="Riik:"; var message="Sõnum:"; var saada="Saada"; var puhasta="Puhasta väljad"; var unustas=""; var imja="Nimetu"; var kodu="Seda ka ei ole"; var e_post="Mul ei ole"; var gorod="Tallinn"; var strana="Eestimaa"; var uv="Lp."; var zapis=""; var forma=""; var sait=""; var sait_en=""; var kinni="Kinni"; var kinni_title="Pane kinni"; var titul="Abi";} if (window.name == "rus"){var tasuta="Гостевая книга бесплатно!"; var teised="Посмотри, что другие пишут!"; var guest="Гостевая книга"; var nimi="Ваше имя:"; var linn="Город:"; var riik="Страна:"; var message="Сообщение:"; var saada="Отправить"; var puhasta="Отмена"; var unustas="Вы, наверное, забыли написать комментарии?"; var imja="Безымянный"; var kodu="Пока нету"; var e_post="И мыла у меня нету"; var gorod="Таллинн"; var strana="Эстония"; var uv="Ув."; var zapis=", спасибо за оставленную запись!"; var forma="В форму Вы занесли следующие данные:"; var sait="Они были отправлены на сервер и обрабатываются! Будьте любезны, подождите немножко!"; var sait_en="The given forms, which you have filled in, are sent on server and are processed! Be kind, wait a little bit!"; var kinni="Закрыть"; var kinni_title="Закрыть окно"; var titul="Помощь";} if (window.name == "en"){var tasuta="Free guest book!"; var teised="Look, that others write!"; var guest="The guest book"; var nimi="Your name:"; var linn="City:"; var riik="Country:"; var message="Your message:"; var saada="Send"; var puhasta="Cancel"; var unustas="You, probably, have forgotten to write the comments?"; var imja="Anonymous"; var kodu="While is not present"; var e_post="And e-mail for me is not present"; var gorod="Tallinn"; var strana="Estonia"; var uv="Dear"; var zapis=", thank for a left record!"; var forma="In the form you have brought the following data:"; var sait="They were sent on the server and are processed! Be kind, wait a little bit!"; var sait_en=""; var kinni="Close"; var kinni_title="Close the window"; var titul="Help";} var klik_po_knopke=0; function first(vov){ var esimene=vov.value.substring(0,1); var teine=vov.value.substring(1); vov.value=esimene.toUpperCase()+teine;} function proverka(){ if (document.vov.comments.value=="") {alert(unustas);document.vov.comments.focus();return false;} else{ if (document.vov.url.value=="" || document.vov.url.value.indexOf(".")==-1) {document.vov.url.value=kodu;} if (document.vov.realname.value=="") {document.vov.realname.value=imja;} if (document.vov.username.value=="" || document.vov.username.value.indexOf("@")==-1 || document.vov.username.value.indexOf(".") == -1) {document.vov.username.value=e_post;} if (document.vov.city.value=="") {document.vov.city.value=gorod;} if (document.vov.country.value=="") {document.vov.country.value=strana;}} if (klik_po_knopke==0) {klik_po_knopke++; return true;} else { var help=window.open("","Info","width=700,height=500"); help.document.open(); help.document.write("<html><head><title>"+titul+"</title></head><body bgcolor=lightgrey>"+ "<p align='center'><a href='http://www.stv.ee/~kopli'><img src='http://vovik.virtualave.net/stv.gif' border='0' align='middle' alt='STV Kaabeltelevisioon'></a></p>"+ "<h2> "+uv+" <span style='text-transform:capitalize;'>"+document.vov.realname.value+"</span>"+zapis+"</h2>"+ "<table style='color:maroon;font-size:14pt' width=70%><caption>"+forma+"</caption>"+ "<tr><td>"+nimi+"</td><td><span style='text-transform:capitalize;'>"+document.vov.realname.value+"</span></td></tr>"+ "<td>E-Mail</td><td>"+document.vov.username.value+"</td></tr>"+ "<td>URL</td><td>"+document.vov.url.value+"</td></tr>"+ "<td>"+linn+"</td><td><span style='text-transform:capitalize;'>"+document.vov.city.value+"</span></td></tr>"+ "<td>"+riik+"</td><td><span style='text-transform:capitalize;'>"+document.vov.country.value+"</span></td></tr>"+ "<td>"+message+"</td><td>"+document.vov.comments.value+"</td></tr></table><br>"+ "<p style='color:blue;font-size:15pt'>"+sait+"</p>"+ "<p style='color:blue;font-size:11pt'> "+sait_en+"</p>"); if (ie4){help.document.write("<marquee behavior=alternate onMouseOver='this.stop();' onMouseOut='this.start();'><button style='width:4cm; height:1cm; font-size: 15pt' ONCLICK='window.close()' title='"+kinni_title+"'>"+kinni+"</button></marquee>");} if (ns4){help.document.write("<center><form><input type='button' value='"+kinni+"' OnClick='window.close()'></form></center>");} help.document.write("</body></html>"); help.document.close(); return false;}} document.write("<H1 align=center> "+guest+" </H1><BR>"+ "<FORM name='vov' method=POST action='http://www.kuda-nubud.gg/cgi-bin/book.cgi' onSubmit='return proverka()'><TABLE width=60%>"+ "<TR><TD align=right>"+nimi+"</TD><TD colspan=3><input type=text name=realname size=50 onBlur='first(this)'></TD></TR>"+ "<TR><TD align=right>E-Mail:</TD><TD colspan=3><input type=text name=username size=50></TD></TR>"+ "<TR><TD align=right>URL:</TD><TD colspan=3><input type=text name=url value='http://' size=50></TD></TR>"+ "<TR><TD align=right>"+linn+"</TD><TD><input type=text name=city size=15 onBlur='first(this)'></TD><TD align=right><input type='hidden' name=owner value='2342'>"+riik+"</TD><TD align=right><input type='text' name=country size=15 onBlur='first(this)'> </TD></TR>"+ "<TR><TD colspan=4>"+message+"</TD></TR>"+ "<TR><TD align=right colspan=4><textarea name=comments COLS=60 ROWS=4 onBlur='first(this)'></textarea></TD></TR>"+ "<TR><TD colspan=4>Для получения результата нажмите два раза по кнопке 'Отправить'.</TD></TR>"+ "<TR valign='bottom' align='center'><TD colspan='2' height='50' width='50%' align=center><input type=hidden name=alias value=auto><input type=submit name=banner value=' "+saada+" '></TD><TD colspan='2' height='50' width='50%' align=center><input type=reset value=' "+puhasta+" '></TD></TR></table>"); //--></script> <noscript> <H1 align=center> The guest book </H1><BR> <FORM method=POST action='http://www.kuda-nubud.gg/cgi-bin/book.cgi'> <TABLE width=60%> <TR><TD align=right>Name:</TD><TD colspan=3><input type=text name=realname size=50></TD></TR> <TR><TD align=right>E-Mail:</TD><TD colspan=3><input type=text name=username size=50></TD></TR> <TR><TD align=right>URL:</TD><TD colspan=3><input type=text name=url value='' size=50></TD></TR> <TR><TD align=right>City:</TD><TD><input type=text name=city size=15></TD><TD align=right><input type='hidden' name=owner value='2342'>Country:</TD><TD align=right><input type='text' name=country size=15> </TD></TR> <TR><TD colspan=4>Comment:</TD></TR> <TR><TD align=right colspan=4><textarea name=comments COLS=60 ROWS=4></textarea></TD></TR> <TR valign='bottom' align='center'><TD colspan='2' height='50' width='50%' align=center><input type=hidden name=alias value=auto><input type=submit name=banner value=' Send '></TD><TD colspan='2' height='50' width='50%' align=center><input type=reset value=' Cancel '></TD></TR></table> </noscript> <br> <center><br><a href="http://stats.kuum.ee/cgi-bin/stats/view.pl?id=532" target="links"> </a></center>
Кидать в ХТМЛ верх или низ. Если кидаете в верх, то желательно убрать шапку.
Отредактировано Дэниел Рубертон (2010-04-14 16:38:05)