PageRenderTime 48ms CodeModel.GetById 22ms RepoModel.GetById 1ms app.codeStats 0ms

/ playar/build/web/imajiematch/imajieste/login.jsp

http://playar.googlecode.com/
JavaServer Pages | 196 lines | 119 code | 73 blank | 4 comment | 15 complexity | 7ece923a7c9bad93cdc75e0dfb08fcf2 MD5 | raw file
Possible License(s): AGPL-3.0, Apache-2.0
  1. <%--
  2. Document : login
  3. Created on : 2011-08-31, 20:14:44
  4. Author : Carl Tremblay <carl_tremblay at imajie.tv>
  5. --%>
  6. <%@page contentType="text/html" pageEncoding="UTF-8"%>
  7. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
  8. "http://www.w3.org/TR/html4/loose.dtd">
  9. <%
  10. //String tagId = request.getParameter("id");
  11. //String thumbnailId = request.getParameter("id_thumbnail");
  12. String userId = request.getParameter("userId");
  13. String username = "";
  14. String radius = "10000";
  15. String practice = "true";
  16. String gameType = "stand-alone";
  17. if (session.getAttribute("username") != null) {
  18. username = session.getAttribute("username").toString();
  19. }
  20. //session.setAttribute("password", password);
  21. if (session.getAttribute("radius") != null) {
  22. radius = session.getAttribute("radius").toString();
  23. }
  24. if (session.getAttribute("practice") != null) {
  25. practice = session.getAttribute("practice").toString();
  26. }
  27. if (session.getAttribute("gameType") != null) {
  28. gameType = session.getAttribute("gameType").toString();
  29. }
  30. %>
  31. <html>
  32. <head>
  33. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  34. <title>Log on Imajieste !</title>
  35. <!-- <link rel="stylesheet" href="http://code.jquery.com/mobile/1.0a1/jquery.mobile-1.0a1.min.css" />
  36. <script src="http://code.jquery.com/jquery-1.4.3.min.js"></script>
  37. <script src="http://code.jquery.com/mobile/1.0a1/jquery.mobile-1.0a1.min.js"></script>-->
  38. <!----><link rel="stylesheet" href="js/jquery.mobile-1.0b2/jquery.mobile-1.0b2.min.css" />
  39. <script src="js/jquery/jquery-1.6.2.min.js"></script>
  40. <script src="js/jquery.mobile-1.0b2/jquery.mobile-1.0b2.min.js"></script>
  41. <script type="text/javascript" language="javascript">
  42. $(document).ready(function(){
  43. var dheight = $('html').height(),
  44. cbody = $('#contentbody').height(),
  45. wheight = $(window).height(),
  46. cheight = wheight - dheight + cbody;
  47. if (wheight > dheight){
  48. $('#contentbody').height(cheight);
  49. }
  50. $(window).resize(function(){
  51. wheight = $(window).height();
  52. noscroll();
  53. changepush();
  54. });
  55. function noscroll(){
  56. if (wheight > dheight) {
  57. $('html').addClass('noscroll');
  58. }
  59. else if (wheight <= dheight) {
  60. $('html').removeClass('noscroll');
  61. }
  62. else {}
  63. }
  64. function changepush(){
  65. if (wheight > dheight) {
  66. $('#contentbody').height(wheight-dheight+cbody);
  67. }
  68. }
  69. });
  70. </script>
  71. </head>
  72. <body>
  73. <div data-role="page" style="min-height:100%" id="callAjaxPage">
  74. <div data-role="header" data-theme="b">
  75. <h1>Log on Imajieste !</h1>
  76. </div> <!-- /header -->
  77. <div data-role="content" data-theme="a">
  78. <form method="POST" action="imajiematchconnect.jsp" >
  79. <div data-role="fieldcontain" data-theme="a">
  80. <label data-theme="a" for="username">Username</label>
  81. <input type="text" name="username" id="username" value="<%= username%>" />
  82. </div>
  83. <div data-role="fieldcontain" data-theme="a">
  84. <label data-theme="a" for="password">Password</label>
  85. <input type="password" name="password" id="password" value="" />
  86. </div>
  87. <input type="submit" id="login_submit" data-theme="a" value="Login"/>
  88. </form>
  89. <h3 id="notification"></h3>
  90. </div><!-- /content -->
  91. <div data-role="footer" data-theme="b">
  92. <h4>&copy; imajie.tv 2011</h4>
  93. </div> <!-- /footer -->
  94. </div>
  95. <!--<script>
  96. $(function() {
  97. $("#login_submit").click(function() {
  98. var theName = $.trim($("#username").val());
  99. var password = $.trim($("#password").val());
  100. if(theName.length > 0)
  101. {
  102. $.ajax({
  103. type: "POST",
  104. url: "http://www.imajie.tv/index.php/component/imajiematchconnect?task=imajiematch.connect&format=xmlrpc",
  105. //url: "http://localhost/joomla/index.php/component/imajiematchconnect?task=imajiematch.connect&format=xmlrpc",
  106. data: ({username: theName,password: password}),
  107. cache: false,
  108. dataType: "utf8",
  109. success: onSuccess
  110. });
  111. }
  112. });
  113. $("#notification").ajaxError(function(event, request, settings, exception) {
  114. $("#notification").html("Error Calling: " + settings.url + "<br />HTPP Code: " + request.status);
  115. });
  116. function onSuccess(data)
  117. {
  118. $("#notification").html("Result: " + data);
  119. }
  120. });
  121. </script>-->
  122. </body>
  123. </html>