session_destroy();
        header("Location: logout.php?error=102");
    }
}
$_SESSION["timeout"] = time();
if ($_SESSION["loggedin"] == "") {
    header("Location: logout.php?error=103");
}
/*
 * Created on Nov 12, 2009
 *
 * To change the template for this generated file go to
 * Window - Preferences - PHPeclipse - PHP - Code Templates
 */
require_once "../daos/db_include.php";
if ($_POST["class"] == "WalkingTask") {
    $Date = $_POST["date"];
    $Steps = $_POST["steps"];
    $p = new PatientDAO();
    $p->Username = $_GET["patient"];
    $p->Find();
    $w = new WalkingTaskDAO();
    $w->Active = 1;
    $w->DailyTaskClass = "WalkingTask";
    $w->Date = $Date;
    $w->Steps = $Steps;
    $w->idPatient = $p->idNumber;
    $w->Insert();
}
$location = "Location: patient_display.php?patient=" . $_GET["patient"];
header($location);
    if ($session_life > $_SESSION["inactive_time"]) {
        session_destroy();
        header("Location: logout.php?error=102");
    }
}
$_SESSION["timeout"] = time();
if ($_SESSION["loggedin"] == "") {
    header("Location: logout.php?error=103");
}
/*
 * Created on Nov 12, 2009
 *
 * To change the template for this generated file go to
 * Window - Preferences - PHPeclipse - PHP - Code Templates
 */
require_once "../daos/db_include.php";
if ($_POST["class"] == "WalkingTask") {
    $Date = $_POST["date"];
    $Steps = $_POST["steps"];
    $p = new PatientDAO();
    $p->Username = $_GET["patient"];
    $p->Find();
    $w = new WalkingTaskDAO();
    $w->idDailyTask = $_GET["task"];
    $w->Find();
    $w->Date = $Date;
    $w->Steps = $Steps;
    $w->Update();
}
$location = "Location: patient_display.php?patient=" . $_GET["patient"];
header($location);
Ejemplo n.º 3
0
 		  	<div id="breadcrumbs">
			
  			</div>
  
   			<div id="content_container">
   			<h2 class="welcome">Edit Task</h2>
   			<div id="content1">
   			<?php 
$t = new DailyTaskDAO();
$t->idDailyTask = $_GET["task"];
$t->Find();
$p = new PatientDAO();
$p->Username = $_GET["patient"];
$p->Find();
if ($t->DailyTaskClass == "WalkingTask") {
    $t1 = new WalkingTaskDAO();
    $t1->idDailyTask = $_GET["task"];
    $t1->Find();
    ?>
   			<h3 class="welcome">Walking Task</h3>
   			<form name="edit_task" action="edit_task_script.php?patient=<?php 
    echo $_GET["patient"];
    ?>
&task=<?php 
    echo $_GET["task"];
    ?>
" method="post">
   				Patient: <?php 
    echo $p->FirstName . " " . $p->MiddleName . " " . $p->LastName;
    ?>
<br />