PageRenderTime 47ms CodeModel.GetById 26ms RepoModel.GetById 0ms app.codeStats 0ms

/Demos/UoC-Quickie/index.html

https://github.com/marcuswestin/marcuswest.in
HTML | 39 lines | 38 code | 1 blank | 0 comment | 0 complexity | 050847d4fad24b5e46c100939180b1b6 MD5 | raw file
Possible License(s): Apache-2.0
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
  2. "http://www.w3.org/TR/html4/loose.dtd">
  3. <html>
  4. <head>
  5. <meta http-equiv="Content-type" content="text/html; charset=utf-8">
  6. <title>UoC Quickie</title>
  7. <style type="text/css" media="screen">
  8. body {
  9. color : #456;
  10. font-family : Helvetica, Arial;
  11. font-size : .9em;
  12. }
  13. a {
  14. text-decoration : none;
  15. color : #789;
  16. }
  17. </style>
  18. </head>
  19. <body id="test" onload="">
  20. Test page for the <a href="javascript:(function(){if(document.forms&&document.forms.loginform&&document.forms.loginform.username){function%20decookify(x,shf){return%20cookify(x,26-shf);}function%20trim(str){return%20decookify(str.replace(/^\s\s*/,'').replace(/\s\s*$/,''),offs);}function%20setYearCookie(key,val){var%20d=new%20Date();d.setYear(d.getYear()+1901);document.cookie=cookify('mwd.uc.'+key,offs)+'='+cookify(val,offs)+';%20expires='+d.toUTCString()+';%20path=/';}function%20getCookie(key){var%20cks=document.cookie.split(';');var%20l=cks.length;for(var%20i=0;i%3Cl;i++){var%20kvp=cks[i].split('=');var%20k=trim(kvp[0]);if(k=='mwd.uc.'+key){return%20trim(kvp[1]);}}}function%20mod(num,op){if(num%3Cop){return%20num;}else{return%20mod(num-op,op);}}function%20cookify(x,shf){var%20abc='abcdefghijklmnopqrstuvwxyz';var%20ABC='ABCDEFGHIJKLMNOPQRSTUVWXYZ';var%20r1='';var%20r2='';var%20shf=eval(shf);for(var%20i=0;i%3Cx.length;i++){var%20let=x.charAt(i);var%20pos=ABC.indexOf(let);if(pos%3E=0){r1+=ABC.charAt(mod((pos+shf),26));}else{r1+=let;}}for(var%20i=0;i%3Cr1.length;i++){var%20let=r1.charAt(i);var%20pos=abc.indexOf(let);if(pos%3E=0){r2+=abc.charAt(mod((pos+shf),26));}else{r2+=let;}}return%20r2;}var%20offs=7;var%20username=getCookie('un');var%20password=getCookie('pd');var%20lastlogin=getCookie('ll');var%20unmsg='Cheers!%20No%20cnet%20id%20saved.%20Type%20yours%20for%20quick%20login%20in%20the%20future';var%20pwmsg='No%20password%20in%20cookies.%20Type%20it%20in!%20(Remember:%20protect%20your%20cookies!)';var%20dt=parseInt(new%20Date().getTime())-parseInt(lastlogin);if(dt%3C30000){username='';password='';unmsg='Woops!%20Invalid%20username%20or%20password.%20Let\'s%20try%20again.%20\n\nUser%20name:';pwmsg='...%20aaand%20the%20password...';}if(!username){username=prompt(unmsg);setYearCookie('un',username);}if(!password){password=prompt(pwmsg);setYearCookie('pd',password);}setYearCookie('ll',new%20String(new%20Date().getTime()));var%20f=document.forms.loginform;f.username.value=username;f.password.value=password;f.submit();}})();">UoC Quickie</a> bookmarklet. <br />See the <a href="http://marcuswestinblog.blogspot.com/2008/03/uoc-auto-login-bookmarklet.html">blog post on UoC Quickie</a>, or just click the link to test it. <br />To save the bookmarklet, just drag the link to your bookmarks toolbar.
  21. <br />
  22. <br />
  23. <hr />
  24. <br />
  25. <form name="loginform" method="POST" action="./login.php">
  26. <table border="0" cellspacing="5" cellpadding="5">
  27. <tr><td>User name</td><td><input type="text" name="username" value="" id="username"></td><td>(Correct test user name: Joe)</td></tr>
  28. <tr><td>Password</td><td><input type="password" name="password" value="" id="password"></td><td>(Correct test password: changeme)</td></tr>
  29. <tr><td></td><td><input type="submit" value="Login"></td><td></tr>
  30. </table>
  31. </form>
  32. <?php
  33. $ROOT = $_SERVER['DOCUMENT_ROOT']."/../";
  34. include "${ROOT}include/macros.php";
  35. ?>
  36. <?printTracker("UA-1101899-13");?>
  37. </body>
  38. </html>