In place of the boring ‘Last Updated’ script, you can use this script. It does everything and more – it gives the page title, the day the page was last updated, and if the page has been updated since the visitor’s last visit all in a cool little table!
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 |
/******************************************************* * MYCPLUS Sample Code - https://www.mycplus.com * * * * This code is made available as a service to our * * visitors and is provided strictly for the * * purpose of illustration. * * * * Please direct all inquiries to saqib at mycplus.com * *******************************************************/ <html> <head> <meta name="GENERATOR" content="(c) 1998 Copyright Next Step Software"> <title>Passwords - Total JavaScripts 99</title> </head> <script LANGUAGE="JavaScript"> <!--// browser_name = navigator.appName; browser_version = parseFloat(navigator.appVersion); if (browser_name == "Netscape" && browser_version >= 3.0) { roll = 'true'; } else if (browser_name == "Microsoft Internet Explorer" && browser_version >= 4.0) { roll = 'true'; } else { roll = 'false'; } function msover1(img1,ref1) { if (roll == 'true') { document.images[img1].src = ref1; } } function msout1(img1,ref1) { if (roll == 'true') { document.images[img1].src = ref1; } } function msover2(img1,ref1,img2,ref2) { if (roll == 'true') { document.images[img1].src = ref1; document.images[img2].src = ref2;} } function msout2(img1,ref1) { if (roll == 'true') { document.images[img1].src = ref1; } } function msover3(img1,ref1,img2,ref2,img3,ref3) { if (roll == 'true') { document.images[img1].src = ref1; document.images[img2].src = ref2; document.images[img3].src = ref3; } } function msout3(img1,ref1,img2,ref2) { if (roll == 'true') { document.images[img1].src = ref1; document.images[img2].src = ref2; } } //--> </script> <body onLoad="window.defaultStatus='Passwords - Total JavaScripts 99'"> <p><!--webbot bot="ImageMap" startspan rectangle="(160,1) (205,16) javascript:history.go(-1)" rectangle="(389,1) (449,16) javascript:history.go(1)" alt="Click Mouse on Main Menu Bar to Activate It!" border="0" height="29" src="title.GIF" width="450" --><map NAME="FrontPageMap0"><area SHAPE="RECT" COORDS="160,1,205,16" HREF ="javascript:history.go(-1)"><area SHAPE="RECT" COORDS="389,1,449,16" HREF ="javascript:history.go(1)"></map><img alt="Click Mouse on Main Menu Bar to Activate It!" border=0 height=29 src="title.GIF" useMap=#FrontPageMap0 width=450><!--webbot bot="ImageMap" i-checksum="24119" endspan --></p> <table border="0" cellpadding="0" cellspacing="0" width="153"> <tr> <td><a href="logincoder_.htm" onmouseout="msout1('imageA','_view1.gif');" onmouseover="msover1('imageA','_view2.gif');"><img alt="Total Java Scripts 99" border =0 height=29 name=imageA src="_view1.gif" width=158 ></a> </td> <td></td> </tr> </table> <form method="post" action="--WEBBOT-SELF--"> <p><textarea cols=64 name=scrolls rows=23 style="BACKGROUND-COLOR: rgb(255,200,16); COLOR: rgb(0,0,0)"> <!-- ONE STEP TO INSTALL LOGIN CODER: 1. Add the first code into the BODY of your HTML document --> <!-- STEP ONE: Add the first code into the BODY of your HTML document --> <body> <center><table border=1> <tr><form name=members><td rowspan=4> <select name=memlist size=10 onChange="showmem(this.form)"> <!-- Original: Dion (dion@mailhub.omen.com.au) --> <!-- Web Site: http://www.omen.com.au/~dion --> <!-- This script and many more are available online from --> <!-- The JavaScript Source!! http://javascriptsource.com --> <!-- "member name | password | destination pagename |" --> <option selected value="John Smith|password|mainpage|">John Smith <option value="Peter Jones|theirpwd|endpages|">Peter Jones <option value="Sue Brown|asdfvcxz|nowheres|">Sue Brown <option value="Sally West|zaqxswde|logintop|">Sally West </select></td> <td align=right>User:</td><td><input type=hidden value="0" name=entry> <input type=text name=memname size=10 value="" onBlur="update(this.form)"></td></tr> <tr><td align=right>Password:</td><td><input type=text name=password size=10 maxlength=8 onBlur="update(this.form)"> *</td></tr> <tr><td align=right>Page Name:</td><td><input type=text name=pagename size=10 maxlength=8 onBlur="update(this.form)"><b>.html</b> *</td></tr> <tr><td colspan=2 align=center> <input type=button value="New User" onclick="addnew(this.form);"> <input type=button value="Delete User" onclick="delthis(this.form);"> <input type=button value="Show Coding" onclick="create(this.form);"></td></tr> <tr><td colspan=3 align=center> <input type=text size=60 name=message value="Note: Starred entries (*) must be exactly 8 letters! (a-z)"> <input type=hidden name=num value=1></td> </form></tr> </table> <hr size=2 width=75%> <form name=js><textarea cols=75 rows=10 name=scrpt wrap=virtual> <script LANGUAGE="JavaScript"> <!-- Begin var params=new Array(4); var alpha="ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHI"; function check(form) { which=form.memlist.selectedIndex; choice = form.memlist.options[which].value+"|"; if (choice=="x|") { alert("Please Select Your Name From The List"); return; } p=0; for (i=0;i<3;i++) { a=choice.indexOf("|",p); params[i]=choice.substring(a,p); p=a+1; } h1=makehash(form.pass.value,3); h2=makehash(form.pass.value,10)+" "; if (h1!=params[1]) { alert("Incorrect Password!"); return; }; var page=""; for (var i=0;i<8;i++) { letter=params[2].substring(i,i+1) ul=letter.toUpperCase(); a=alpha.indexOf(ul,0); a-=(h2.substring(i,i+1)*1); if (a<0) a+=26; page+=alpha.substring(a,a+1); }; top.location=page.toLowerCase()+".html"; } function makehash(pw,mult) { pass=pw.toUpperCase(); hash=0; for (i=0;i<8;i++) { letter=pass.substring(i,i+1); c=alpha.indexOf(letter,0)+1; hash=hash*mult+c; } return(hash); } // End --> </script> </textarea> </form> <script LANGUAGE="JavaScript"> <!-- Begin var params=new Array(4); var script=document.js.scrpt.value; 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: [email protected]\n\n*Honestly, we don't even totally understand this JavaScript!*"; var alpha="ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHI"; showmem(document.members); function showmem(form) { document.members.num.value=document.members.memlist.length; var which=form.memlist.selectedIndex; splt(form.memlist[which].value); form.entry.value=which+1; for (i=2;i<5;i++) { form.elements[i].value=params[i-2]; }; } function splt(choice) { p=0; for (i=0;i<3;i++) { a=choice.indexOf("|",p); params[i]=choice.substring(a,p); p=a+1; } } function addnew(form) { newmem=getfields(form); var who=prompt("New User's Name:",""); form.memlist[form.memlist.length] = new Option(who, newmem, false, true); if (navigator.appName=="Netscape") { document.js.scrpt.value=script; history.go(0); } else { showmem(document.members); } } function getfields(form) { newmem=""; for (i=2;i<5;i++) { newmem+=form.elements[i].value+"|"; }; for (i=3;i<5;i++) { a=form.elements[i]; if (a.value.length!=8) alert(a.name+" Requires 8 characters!"); for (k=0;k<8;k++) { b=a.value.substring(k,k+1); c=b.toUpperCase(); if (alpha.indexOf(c,0)<0) { alert(a.name+" Must Use Letters A Through Z Only!"); break; }; } } return(newmem); } function delthis(form) { if (confirm("Delete "+form.memname.value+"?")) { form.memlist.options[form.entry.value-1]=null; form.message.value=form.memname.value+" Deleted"; form.memlist.selectedIndex=0; if (navigator.appName=="Netscape") { document.js.scrpt.value=script; history.go(0); } else { showmem(document.members); } } } function update(form) { form.memlist[form.entry.value-1].value=getfields(form); form.message.value=form.memname.value+"'s record was updated"; } function create(form) { var html="<center><form name=login>\n"; html+="<table border=1 cellpadding=3>\n\n"; html+="<!-- Web Site: http://www.omen.com.au/~dion -->\n"; html+="<!-- This script and many more are available online from -->\n"; html+="<!-- The JavaScript Source!! http://javascriptsource.com -->\n\n"; html+='<tr><td colspan=2 align=center><font size="+2"><b>Members-Only Area!</b></font></td></tr>\n'; html+="<tr><td>Username:</td><td><select name=memlist>\n<option value='x'>"; for (j=0;j<form.memlist.length;j++) { splt(form.memlist.options[j].value); h1=makehash(params[1],3); h2=makehash(params[1],10)+" "; var page=""; for (var i=0;i<8;i++) { letter=params[2].substring(i,i+1); ul=letter.toUpperCase(); a=alpha.indexOf(ul,0); a+=(h2.substring(i,i+1)*1); page+=alpha.substring(a,a+1); } html+="\n<option value='"+params[0]+"|"+h1+"|"+page+"'>"+params[0]; }; html+="\n</select></td></tr>\n"; html+="<tr><td>Password:</td><td><input type=password size=10 maxlength=8 name=pass></td></tr>\n"; html+='<tr><td colspan=2 align=center><input type=button value="Login" onclick="check(this.form)"></td>\n'; html+="</tr>\n</table>\n</form>\n"; document.js.scrpt.value=html+script+"</center>"; } function makehash(pw,mult) { pass=pw.toUpperCase(); hash=0; for (i=0;i<8;i++) { letter=pass.substring(i,i+1); c=alpha.indexOf(letter,0)+1; hash=hash*mult+c; } return(hash); } // End --> </script> </center> <!-- Script Size: 6.50 KB --></textarea></p> </form> <p align="left"><small><small><strong><font face="MS Sans Serif"><small>1998 Copyright (C) Next Step All Rights Reserved</small></font></strong></small></small></p> </body> </html> |