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

/main.php

https://bitbucket.org/mlaco/keypow
PHP | 190 lines | 185 code | 5 blank | 0 comment | 3 complexity | 4b03d6ba61c87b6169175b2983466939 MD5 | raw file
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  2. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <?php include("validate_session.php")?>
  4. <html xmlns="http://www.w3.org/1999/xhtml">
  5. <head>
  6. <title>Dowhat</title>
  7. <!-- jQuery calendar stuff -->
  8. <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"></script>
  9. <link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
  10. <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
  11. <script src="/scripts/main.js"></script>
  12. <link href = "/css/main.css" rel = "stylesheet" type="text/css" />
  13. <script>
  14. window.PANEL = 0;
  15. jQuery(function(){
  16. onready_handler("titleO","titleC");
  17. $("#dateC").datepicker();
  18. $("#dateC").datepicker("setDate",new Date());
  19. $("#openForm").hide();
  20. $("#closedForm").hide();
  21. $("#addForm").hide();
  22. $("#openMast").click(function(){
  23. openForm('open');
  24. if(PANEL==1){
  25. PANEL=0;
  26. }
  27. else{
  28. PANEL=1;
  29. }
  30. });
  31. $("#closedMast").click(function(){
  32. openForm('closed');
  33. if(PANEL==2){
  34. PANEL=0;
  35. }
  36. else{
  37. PANEL=2;
  38. }
  39. });
  40. $("#addMast").click(function(){
  41. openForm('add');
  42. if(PANEL==3){
  43. PANEL=0;
  44. }
  45. else{
  46. PANEL=3;
  47. }
  48. });
  49. });
  50. function openForm(tag){
  51. var tags = ['open','closed','add'];
  52. $("#"+tag+"Form").slideToggle();
  53. }
  54. </script>
  55. </head>
  56. <body>
  57. <div id="container">
  58. <div id="header">
  59. <a href="/keypow.html">
  60. <img src="/images/logo.png" alt="keyPOW" width="200px"/>
  61. </a>
  62. </div>
  63. <div id="sidebar">
  64. <p>
  65. <a href="/keypow.html">Home</a>
  66. </p>
  67. <p>
  68. <a href="/main.php">Enter Log</a>
  69. </p>
  70. <p>
  71. <a href="/view_log.php">View Logs</a>
  72. </p>
  73. <p>
  74. <a href="/logout.php">Log out</a>
  75. </p>
  76. </div>
  77. <div id="content">
  78. <div id="logBox">
  79. <div class="Mbox" id="openMast">
  80. <h2>Create a new in-progress log</h2>
  81. </div>
  82. <div class="box" id="openForm">
  83. <div class="description">
  84. <p>
  85. <dfn>Log an activity as</br> you perform it.</dfn>
  86. </p>
  87. </div>
  88. <form>
  89. <fieldset class="controls">
  90. <p>
  91. <label>Activity</label>
  92. <select id="titleO"></select>
  93. </p>
  94. <p>
  95. <label class="cGroupLabel"><b>Goal</b></label>
  96. <label class="detail"><small>(optional)</small></label>
  97. </p>
  98. <p>
  99. <label>Hours</label>
  100. <input class="short" id="goalHrO" type="text"/>
  101. </p>
  102. <p>
  103. <label>Minutes</label>
  104. <input class="short" id="goalMinO" type="text"/>
  105. </p>
  106. <p>
  107. <input class="myBtn" id="startBtn" type="button" value="Start" onclick="start_activity()"/>
  108. </p>
  109. </fieldset>
  110. </form>
  111. </div>
  112. <div class="Mbox" id="closedMast">
  113. <h2>Create a new completed log</h2>
  114. </div>
  115. <div class="box" id="closedForm">
  116. <div class="description">
  117. <p>
  118. <dfn>Log an activity after</br> you perform it.</dfn>
  119. </p>
  120. </div>
  121. <form>
  122. <fieldset class="controls">
  123. <p>
  124. <label>Activity</label>
  125. <select id="titleC"></select>
  126. </p>
  127. <p>
  128. <label class="cGroupLabel"><b>Duration</b></label>
  129. </p>
  130. <p>
  131. <label>Date</label>
  132. <input class="text" id="dateC"/>
  133. </p>
  134. <p>
  135. <label>Hours</label>
  136. <input class="short" id="hrC" type="text"/>
  137. </p>
  138. <p>
  139. <label>Minutes</label>
  140. <input class="short" id="minC" type="text"/>
  141. </p>
  142. <p>
  143. <label class="cGroupLabel"><b>Goal</b></label>
  144. <label class="detail"><small>(optional)</small></label>
  145. </p>
  146. <p>
  147. <label>Hours</label>
  148. <input class="short" id="goalHrC" type="text"/>
  149. </p>
  150. <p>
  151. <label>Minutes</label>
  152. <input class="short" id="goalMinC" type="text"/>
  153. </p>
  154. <p>
  155. <input class="myBtn" id="logBtn" type="button" value="Log it" onclick="log_activity()"/>
  156. </p>
  157. </fieldset>
  158. </form>
  159. </div>
  160. <div class="Mbox" id="addMast">
  161. <h2>Add a new Activity</h2>
  162. </div>
  163. <div class="box" id="addForm">
  164. <div class="description">
  165. <p>
  166. <dfn>Add a new activity</br>to log.</dfn>
  167. </p>
  168. </div>
  169. <form>
  170. <fieldset class="controls">
  171. <p>
  172. <label>Activity Title</label>
  173. <input class="text" id="titleA" type="text"/>
  174. </p>
  175. <p>
  176. <input class="myBtn" id="addBtn" type="button" value="Add Activity" onclick="add_activity()"/>
  177. </p>
  178. </fieldset>
  179. </form>
  180. </div>
  181. </div> <!-- END LOG BOX -->
  182. </div>
  183. </div>
  184. </body>
  185. </html>