/main.php
PHP | 190 lines | 185 code | 5 blank | 0 comment | 3 complexity | 4b03d6ba61c87b6169175b2983466939 MD5 | raw file
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <?php include("validate_session.php")?>
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title>Dowhat</title>
- <!-- jQuery calendar stuff -->
- <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"></script>
- <link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
- <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
- <script src="/scripts/main.js"></script>
- <link href = "/css/main.css" rel = "stylesheet" type="text/css" />
- <script>
- window.PANEL = 0;
- jQuery(function(){
- onready_handler("titleO","titleC");
- $("#dateC").datepicker();
- $("#dateC").datepicker("setDate",new Date());
- $("#openForm").hide();
- $("#closedForm").hide();
- $("#addForm").hide();
- $("#openMast").click(function(){
- openForm('open');
- if(PANEL==1){
- PANEL=0;
- }
- else{
- PANEL=1;
- }
- });
- $("#closedMast").click(function(){
- openForm('closed');
- if(PANEL==2){
- PANEL=0;
- }
- else{
- PANEL=2;
- }
- });
- $("#addMast").click(function(){
- openForm('add');
- if(PANEL==3){
- PANEL=0;
- }
- else{
- PANEL=3;
- }
- });
- });
-
- function openForm(tag){
- var tags = ['open','closed','add'];
- $("#"+tag+"Form").slideToggle();
- }
-
- </script>
- </head>
- <body>
- <div id="container">
- <div id="header">
- <a href="/keypow.html">
- <img src="/images/logo.png" alt="keyPOW" width="200px"/>
- </a>
- </div>
- <div id="sidebar">
- <p>
- <a href="/keypow.html">Home</a>
- </p>
- <p>
- <a href="/main.php">Enter Log</a>
- </p>
- <p>
- <a href="/view_log.php">View Logs</a>
- </p>
- <p>
- <a href="/logout.php">Log out</a>
- </p>
- </div>
- <div id="content">
- <div id="logBox">
- <div class="Mbox" id="openMast">
- <h2>Create a new in-progress log</h2>
- </div>
- <div class="box" id="openForm">
- <div class="description">
- <p>
- <dfn>Log an activity as</br> you perform it.</dfn>
- </p>
- </div>
- <form>
- <fieldset class="controls">
- <p>
- <label>Activity</label>
- <select id="titleO"></select>
- </p>
- <p>
- <label class="cGroupLabel"><b>Goal</b></label>
- <label class="detail"><small>(optional)</small></label>
- </p>
- <p>
- <label>Hours</label>
- <input class="short" id="goalHrO" type="text"/>
- </p>
- <p>
- <label>Minutes</label>
- <input class="short" id="goalMinO" type="text"/>
- </p>
- <p>
- <input class="myBtn" id="startBtn" type="button" value="Start" onclick="start_activity()"/>
- </p>
- </fieldset>
- </form>
-
- </div>
- <div class="Mbox" id="closedMast">
- <h2>Create a new completed log</h2>
- </div>
- <div class="box" id="closedForm">
- <div class="description">
- <p>
- <dfn>Log an activity after</br> you perform it.</dfn>
- </p>
- </div>
- <form>
- <fieldset class="controls">
- <p>
- <label>Activity</label>
- <select id="titleC"></select>
- </p>
- <p>
- <label class="cGroupLabel"><b>Duration</b></label>
- </p>
- <p>
- <label>Date</label>
- <input class="text" id="dateC"/>
- </p>
- <p>
- <label>Hours</label>
- <input class="short" id="hrC" type="text"/>
- </p>
- <p>
- <label>Minutes</label>
- <input class="short" id="minC" type="text"/>
- </p>
- <p>
- <label class="cGroupLabel"><b>Goal</b></label>
- <label class="detail"><small>(optional)</small></label>
- </p>
- <p>
- <label>Hours</label>
- <input class="short" id="goalHrC" type="text"/>
- </p>
- <p>
- <label>Minutes</label>
- <input class="short" id="goalMinC" type="text"/>
- </p>
- <p>
- <input class="myBtn" id="logBtn" type="button" value="Log it" onclick="log_activity()"/>
- </p>
- </fieldset>
- </form>
- </div>
- <div class="Mbox" id="addMast">
- <h2>Add a new Activity</h2>
- </div>
- <div class="box" id="addForm">
- <div class="description">
- <p>
- <dfn>Add a new activity</br>to log.</dfn>
- </p>
- </div>
- <form>
- <fieldset class="controls">
- <p>
- <label>Activity Title</label>
- <input class="text" id="titleA" type="text"/>
- </p>
- <p>
- <input class="myBtn" id="addBtn" type="button" value="Add Activity" onclick="add_activity()"/>
- </p>
- </fieldset>
- </form>
- </div>
- </div> <!-- END LOG BOX -->
- </div>
-
- </div>
- </body>
- </html>