Sunday, 8 July 2012

Password Encrypter


Use this to encrypt your passwords, for login fields and password protection.
  1. <html>
  2. <head>
  3. <title>Password Encrypter</title>
  4. </head>
  5. <BODY>
  6. <center><table border=1>
  7. <tr><form name=members><td rowspan=4>
  8. <select name=memlist size=10 onChange="showmem(this.form)">
  9. <!-- "member name | password | destination pagename |" -->
  10. <option selected value="John Smith|password|mainpage|">John Smith
  11. <option value="Peter Jones|theirpwd|endpages|">Peter Jones
  12. <option value="Sue Brown|asdfvcxz|nowheres|">Sue Brown
  13. <option value="Sally West|zaqxswde|logintop|">Sally West
  14. </select></td>
  15. <td align=right>User:</td><td><input type=hidden value="0" name=entry>
  16. <input type=text name=memname size=8 value=""></td></tr>
  17. <tr><td align=right>Password:</td><td><input type=text name=password size=8 maxlength=8><font size="-1"><-- Must be exactly 8 characters</font></td></tr>
  18. <tr><td align=right>Page Name:</td><td><input type=text name=pagename size=8 maxlength=8><b>.html</b><font size="-1"><-- Must be exactly 8 characters</font></td></tr>
  19. <tr><td colspan=2 align=center>
  20. <input type=button value="New User" onclick="addnew(this.form);">
  21. <input type=button value="Delete User" onclick="delthis(this.form);">
  22. <input type=button value="Update/Show Coding" onclick="update(this.form); create(this.form);"></td></tr>
  23. <tr><td colspan=3 align=center>
  24. <input type=text size=60 name=message value="Note: Password/Page Name must be exactly 8 letters! (a-z)">
  25. <input type=hidden name=num value=1></td>
  26. </form></tr>
  27. </table>
  28. <hr size=2 width=75%>
  29. <form name=js><textarea cols=75 rows=10 name=scrpt wrap=virtual>
  30. <SCRIPT LANGUAGE="JavaScript">
  31. <!-- Begin
  32. var params=new Array(4);
  33. var alpha="ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHI";
  34. function check(form) {
  35. which=form.memlist.selectedIndex;
  36. choice = form.memlist.options[which].value+"|";
  37. if (choice=="x|") {
  38. alert("Please Select Your Name From The List");
  39. return;
  40. }
  41. p=0;
  42. for (i=0;i<3;i++) {
  43. a=choice.indexOf("|",p);
  44. params[i]=choice.substring(a,p);
  45. p=a+1;
  46. }
  47. h1=makehash(form.pass.value,3);
  48. h2=makehash(form.pass.value,10)+" ";
  49. if (h1!=params[1]) {
  50. alert("Incorrect Password!"); return; };
  51. var page="";
  52. for (var i=0;i<8;i++) {
  53. letter=params[2].substring(i,i+1)
  54. ul=letter.toUpperCase();
  55. a=alpha.indexOf(ul,0);
  56. a-=(h2.substring(i,i+1)*1);
  57. if (a<0) a+=26;
  58. page+=alpha.substring(a,a+1); };
  59. top.location=page.toLowerCase()+".html";
  60. }
  61. function makehash(pw,mult) {
  62. pass=pw.toUpperCase();
  63. hash=0;
  64. for (i=0;i<8;i++) {
  65. letter=pass.substring(i,i+1);
  66. c=alpha.indexOf(letter,0)+1;
  67. hash=hash*mult+c;
  68. }
  69. return(hash);
  70. }
  71. // End -->
  72. </script>
  73. </textarea>
  74. </form>
  75. <SCRIPT LANGUAGE="JavaScript">
  76. <!-- Begin
  77. var params=new Array(4);
  78. var script=document.js.scrpt.value;
  79. document.js.scrpt.value="Create your users, their passwords, and their destination pages using the form above.\n\nThen, click 'Show Coding' to see the login HTML and JavaScript that you need to put on your page to password-protect your site with that info.\n\nQuestions about this script or how to put it on your site should be directed to it's author via email: dion@mailhub.omen.com.au\n\n*Honestly, we don't even totally understand this JavaScript!*";
  80. var alpha="ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHI";
  81. showmem(document.members);
  82. function showmem(form) {
  83. document.members.num.value=document.members.memlist.length;
  84. var which=form.memlist.selectedIndex;
  85. splt(form.memlist[which].value);
  86. form.entry.value=which+1;
  87. for (i=2;i<5;i++) {
  88. form.elements[i].value=params[i-2]; };
  89. }
  90. function splt(choice) {
  91. p=0;
  92. for (i=0;i<3;i++) {
  93. a=choice.indexOf("|",p);
  94. params[i]=choice.substring(a,p);
  95. p=a+1;
  96. }
  97. }
  98. function addnew(form) {
  99. newmem=getfields(form);
  100. var who=prompt("New User's Name:","");
  101. form.memlist[form.memlist.length] = new Option(who, newmem, false, true);
  102. if (navigator.appName=="Netscape") {
  103. document.js.scrpt.value=script;
  104. history.go(0);
  105. }
  106. else {
  107. showmem(document.members);
  108. }
  109. }
  110. function getfields(form) {
  111. newmem="";
  112. for (i=2;i<5;i++) {
  113. newmem+=form.elements[i].value+"|"; };
  114. for (i=3;i<5;i++) {
  115. a=form.elements[i];
  116. for (k=0;k<8;k++) {
  117. }
  118. }
  119. return(newmem);
  120. }
  121. function delthis(form) {
  122. if (confirm("Delete "+form.memname.value+"?")) {
  123. form.memlist.options[form.entry.value-1]=null;
  124. form.message.value=form.memname.value+" Deleted";
  125. form.memlist.selectedIndex=0;
  126. if (navigator.appName=="Netscape") {
  127. document.js.scrpt.value=script;
  128. history.go(0);
  129. }
  130. else {
  131. showmem(document.members);
  132. }
  133. }
  134. }
  135. function update(form) {
  136. msg="no";
  137. a=form.elements[i];
  138. for (k=0;k<8;k++) {
  139. b=a.value.substring(k,k+1);
  140. c=b.toUpperCase();
  141. form.memlist[form.entry.value-1].value=getfields(form);
  142. form.message.value=form.memname.value+"'s record was updated";
  143. }
  144. }
  145. function create(form) {
  146. var html="<center><form name=login>\n";
  147. html+="<table border=1 cellpadding=3>\n\n";
  148. html+="<!-- Original: Dion -->\n";
  149. html+="<!-- Web Site: http://www.iinet.net.au/~biab/ -->\n";
  150. html+="<!-- This script and many more are available free online at -->\n";
  151. html+="<!-- The JavaScript Source!! http://javascript.internet.com -->\n\n";
  152. html+='<tr><td colspan=2 align=center><font size="+2">';
  153. html+='<b>Members-Only Area!</b></font></td></tr>\n';
  154. html+="<tr><td>Username:</td><td><select name=memlist>\n<option value='x'>";
  155. for (j=0;j<form.memlist.length;j++) {
  156. splt(form.memlist.options[j].value);
  157. h1=makehash(params[1],3);
  158. h2=makehash(params[1],10)+" ";
  159. var page="";
  160. for (var i=0;i<8;i++) {
  161. letter=params[2].substring(i,i+1);
  162. ul=letter.toUpperCase();
  163. a=alpha.indexOf(ul,0);
  164. a+=(h2.substring(i,i+1)*1);
  165. page+=alpha.substring(a,a+1);
  166. }
  167. html+="\n<option value='"+params[0]+"|"+h1+"|"+page+"'>"+params[0];
  168. };
  169. html+="\n</select></td></tr>\n";
  170. html+="<tr><td>Password:</td><td><input type=password size=10 maxlength=8 name=pass></td></tr>\n";
  171. html+='<tr><td colspan=2 align=center><input type=button value="Login" onclick="check(this.form)"></td>\n';
  172. html+="</tr>\n</table>\n</form>\n";
  173. document.js.scrpt.value=html+script+"</center>";
  174. }
  175. function makehash(pw,mult) {
  176. pass=pw.toUpperCase();
  177. hash=0;
  178. for (i=0;i<8;i++) {
  179. letter=pass.substring(i,i+1);
  180. c=alpha.indexOf(letter,0)+1;
  181. hash=hash*mult+c;
  182. }
  183. return(hash);
  184. }
  185. // End -->
  186. </script>
  187. </center>
  188. </body>
  189. </html>

A simple web page for beginners in html


SIMPLE HTML PROGRAM FOR BEGINNERS
NB:Excuse me experts,,this is for beginners
1.Copy the file
2.paste it in a new notepad
3.save it with .html/.htm extension
4.chose file type as all type
5.after saving you will find an internet explorer symbol with the name that you'v given
while saving,,double click it.
6.Your page will be opened...

Points to ponder
1.Set the url for background image and other images.....
2.Set your own title for the page
3.change the contents of the body
Try it/............
Thanks....
This is your Friend.........
Rajeesh.N.Santhu
  1. <html>/*Page starts here*/
  2. <head>
  3. <title>My Example</title>/*The content of this tag is displayed as page name*/
  4. <style>/*start of internal style definitions*/
  5. .heading/*defining class heading*/
  6. {
  7. font-family:Comic Sans Ms;
  8. font-size:30pt;
  9. color:orange;
  10. text-align="center";
  11. }
  12. .subheading/*Defining class subheading*/
  13. {
  14. font-family:Courier New;
  15. font-size:20pt;
  16. color:blue;
  17. text-align="left";
  18. }
  19. .details/*defining class details*/
  20. {
  21. font-family:Courier New;
  22. font-size:13pt;
  23. color:black;
  24. text-align="justify";
  25. }
  26. </style>/*Style definitions ended*/
  27. </head>
  28. /*web page body starts from here*/
  29. <body background="url of your image">/*Please provide the exact url of image*/
  30. <span style='position:absolute:left:120px;top:5px;width:990px;height:1156px;'>
  31. <p class="heading">HOME PAGE</p>
  32. <hr/>/*Horizantal rule...just a horizontal line covers the entire width*/
  33. <br/>/*leaves a new line*/
  34. <p class="subheading">/*uses the style of class subheading*/
  35. WELCOME TO MY PAGE</p>
  36. <p class="details">/*Uses the style of class details*/
  37. Hello this is the demonstrational webpage for beginners in HTML
  38. </p>
  39. <img src="url of some image"/>/*inserts an image*/
  40. <table width="200" height="100">/*Inserts a table*/
  41. <tr>/*Inserts a new row in table*/
  42. <td>Hello</td>
  43. <td>Welcome</td>
  44. </tr>
  45. </table>/*Table ends here*/
  46. </span>/*Span ends here*/
  47. </body>/*End of body*/
  48. </html>/*End of HTMl*/