예제 #1
0
?>
    			<br /><br />
    			<div class="panel panel-default">
    				<div class="panel-heading text-center">Checkout Details</div>
    				<div class="panel-body text-center">
    					<p>
    					<?php 
printf("<strong>Checkout ID:</strong> %s<br /><br />", $checkout->getID());
printf("<strong>Description:</strong> %s<br /><br />", $checkout->getDescription());
if (!empty($checkout->getDRNumber())) {
    echo "<strong>DR:</strong> " . $checkout->getDRNumber() . "<br /><br />";
}
if (!empty($checkout->getLocation())) {
    echo "<strong>Location:</strong> " . $checkout->getLocation() . "<br /><br />";
}
$personName = getPersonName($checkout->getPerson());
printf("<strong>Person:</strong> %s<br /><br />", $personName);
$co_start = new DateTime($checkout->getStart());
$co_end = new DateTime($checkout->getEnd());
printf("<strong>Start Time:</strong> %s<br /><br />", $co_start->format('m-d-y g:iA'));
printf("<strong>End Time:</strong> %s<br /><br />", $co_end->format('m-d-y g:iA'));
if ($checkout->getReturned()) {
    $retDate = new DateTime($checkout->getReturned());
    echo "<strong>Returned:</strong> " . $retDate->format('m-d-y g:iA') . "<br /><br />";
}
if ($loggedInUser->checkPermission(array(2)) || $loggedInUser->user_id == $checkout->getPerson()) {
    echo "<form id='retForm' role='form' action='" . htmlspecialchars($_SERVER["PHP_SELF"]) . "' method='POST'>";
    echo "<input type='hidden' name='co_id' value='" . $co_id . "' />";
    echo "<input id='now' type='hidden' name='dateTime' />";
    //fill with JS on button click
    echo "</form>";
예제 #2
0
include 'templates/bs-nav.php';
echo printHeader("Feedback", NULL);
?>

    <div class="container">
        <div class="row">
            <div class="col-sm-8 col-sm-offset-2">
                <?php 
echo resultBlock($errors, $successes);
?>
                <form role="form" action="<?php 
echo htmlspecialchars($_SERVER["PHP_SELF"]);
?>
" method="POST">
                    <input type="hidden" name="user" value="<?php 
echo getPersonName($loggedInUser->user_id);
?>
" />

                    <div class="form-group">
                        <label class="control-label" for="type">Type of Feedback:</label>
                        <select class="form-control" name="type">
                            <option value="bug" selected="selected">Bug</option>
                        </select>
                    </div>

                    <div class="form-group">
                        <label class="control-label" for="summary">Give your feedback a witty one-liner:</label>
                        <input class="form-control" name="summary" type="text" />
                    </div>
                    
예제 #3
0
        $center_lng = $_GET["lng"];
        $sql = "SELECT villcode,hno,pid,ygis,xgis,if(instr(hno,'/')>0,substring(hno,1,instr(hno,'/')-1),hno) as f\n\t\t\tFROM house \n\t\t\tWHERE  SUBSTRING(villcode,7,2) <> '00' AND \n\t\t\t\t\tygis <> '' AND \n\t\t\t\t\tygis IS NOT NULL AND\n\t\t\t\t\t( 3959 * acos( cos( radians('{$center_lat}') ) * cos( radians( ygis ) ) * cos( radians( xgis ) - radians('{$center_lng}') ) + sin( radians('{$center_lat}') ) * sin( radians( ygis ) ) ) ) < '{$radius}'\n\t\t\tORDER BY villcode,length(f),f,hno";
    } else {
        $latn = $_GET[latn];
        $lnge = $_GET[lnge];
        $lats = $_GET[lats];
        $lngw = $_GET[lngw];
        $sql = "SELECT villcode,hno,pid,ygis,xgis,if(instr(hno,'/')>0,substring(hno,1,instr(hno,'/')-1),hno) as f\n\t\t\tFROM house \n\t\t\tWHERE  SUBSTRING(villcode,7,2) <> '00' AND \n\t\t\t\t\tygis <> '' AND \n\t\t\t\t\tygis IS NOT NULL AND\n\t\t\t\t\t(ygis BETWEEN '{$lats}' AND '{$latn}') AND\n\t\t\t\t\t(xgis BETWEEN '{$lngw}' AND '{$lnge}')\n\t\t\tORDER BY villcode,length(f),f,hno";
    }
    $result = mysql_query($sql);
    $txt = '<p align=\'center\'><b>ข้อมูลบ้านในพื้นที่ที่เลือก</b></p>';
    $txt .= "<table width='95%' border='0' cellspacing='1' cellpadding='1' class='table table-striped table-hover table-bordered'>\n  <tr>\n    <th width='8%' scope='col'>ลำดับ</th>\n    <th width='11%' scope='col'>บ้านเลขที่</th>\n    <th width='22%' scope='col'>หมู่บ้าน</th>\n    <th width='32%' scope='col'>หัวหน้าครอบครัว</th>\n    <th width='27%' scope='col'>หมายเหตุ</th>\n  </tr>";
    while ($row = mysql_fetch_array($result)) {
        $moo = substr($row[villcode], 6, 2);
        $vill = getMooVillage($row[villcode]);
        $hhouse = getPersonName($row[pid]);
        ++$i;
        if ($i % 2 == 1) {
            $cr = " class='altrow'";
        } else {
            $cr = "";
        }
        $txt .= "  <tr {$cr}>\n    <td><div align='center'>{$i}</div></td>\n    <td><div align='center'>{$row['hno']}</div></td>\n    <td>&nbsp;{$vill}</td>\n    <td>&nbsp;{$hhouse}</td>\n    <td>&nbsp;</td>\n  </tr>";
    }
    $txt .= "</table>";
    echo $txt;
} else {
    header("Location: login.php");
}
?>
        
      <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
      <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->

    <script src="../js/jquery.1.11.0.min.js"></script>
    <script src="../js/bootstrap.min.js"></script>
</head>
<body">
<?php 
    $txt = "<b>ประวัติการเยี่ยมบ้านของ {$pnameh} ระหว่างวันที่  {$str} - {$sto}</b>";
    $txt .= "<table width='100%' border='0' cellspacing='0' cellpadding='0' class='table table-striped table-hover table-bordered'>\n  <tr>\n    <th width='5%' scope='col'><div align='center'>ลำดับ</div></th>\n    <th width='14%' scope='col'><div align='center'>ชื่อ - สกุล</div></th>\n    <th width='7%' scope='col'><div align='center'>วันที่เยี่ยม</div></th>\n\t<th width='15%' scope='col'><div align='center'>สภาพ/อาการของเป้าหมาย</div></th>\n\t<th width='30%' scope='col'><div align='center'>กิจกรรม</div></th>\n\t<th width='15%' scope='col'><div align='center'>ประเมินผล</div></th>\n\t<th width='7%' scope='col'><div align='center'>วันนัดครั้งต่อไป</div></th>\n\t<th width='14%' scope='col'><div align='center'>ผู้เยี่ยม</div></th>\n  </tr>";
    $sql = "SELECT\nvisit.pcucodeperson,\nvisit.pid,\nvisit.visitno,\nvisit.visitdate,\nchomehealthtype.homehealthmeaning,\nvisithomehealthindividual.patientsign,\nvisithomehealthindividual.homehealthdetail,\nvisithomehealthindividual.homehealthresult,\nvisithomehealthindividual.homehealthplan,\nvisithomehealthindividual.dateappoint,\nconcat(ctitle.titlename,`user`.fname,`user`.lname) as userh,\nvisithomehealthindividual.`user`\nFROM\nvisit\nInner Join visithomehealthindividual ON visit.pcucode = visithomehealthindividual.pcucode AND visit.visitno = visithomehealthindividual.visitno\nInner Join chomehealthtype ON visithomehealthindividual.homehealthtype = chomehealthtype.homehealthcode\nINNER JOIN `user` ON visit.pcucodeperson = `user`.pcucode AND visithomehealthindividual.`user` = `user`.username\nleft JOIN ctitle ON `user`.prename = ctitle.titlecode\nwhere visit.visitdate between '{$nstr}' and '{$nsto}' and (visit.flagservice <'04' OR visit.flagservice is null OR length(trim(visit.flagservice))=0 ) and visit.pid = {$pid}\norder by visit.visitdate";
    $result = mysql_query($sql);
    while ($row = mysql_fetch_array($result)) {
        if ($row[visitdate] == "") {
            $sickre = "";
        } else {
            $sickre = retDatets($row[visitdate]);
        }
        $pname = getPersonName($pid);
        ++$i;
        $txt .= "<tr>\n    <td><div align='center'>{$i}</div></td>\n    <td>{$pname}</td>\n\t<td><div align='center'>{$sickre}</div></td>\n\t<td>{$row['patientsign']}</td>\n\t<td>{$row['homehealthdetail']}</td>\n\t<td>{$row['homehealthresult']}</td>\n\t<td><div align='center'>{$dateappoint}</div></td>\n\t<td>{$row['userh']}</td>\n  </tr>";
    }
    $txt .= "</table>";
    echo $txt;
} else {
    header("Location: login.php");
}
?>
</body>
</html>
예제 #5
0
}
//รวมข้อมูล
$sql = "UPDATE tmpdata,tmpa,tmpv SET tmpdata.pa = tmpa.tpa,tmpdata.pv = tmpv.tpv\n\t\tWHERE tmpdata.hcode = tmpa.thcode AND\n\t\ttmpdata.hcode = tmpv.thcode";
mysql_query($sql);
$sql = "DROP TABLE tmpa";
mysql_query($sql);
$sql = "DROP TABLE tmpv";
mysql_query($sql);
$sql = "SELECT * FROM tmpdata";
$result = mysql_query($sql);
$xml = '<markers>';
while ($row = mysql_fetch_array($result)) {
    $moo = substr($row[villcode], 6, 2);
    $vill = getMooVillage($row[villcode]);
    $sick = retDatets($row[sickdatestart]);
    $phname = getPersonName($row[pid]);
    $xml .= '<marker ';
    $xml .= 'hcode="' . $row[hcode] . '" ';
    $xml .= 'hono="' . $row[hno] . '" ';
    $xml .= 'moo="' . $moo . '" ';
    $xml .= 'vill="' . $vill . '" ';
    $xml .= 'pname="' . $phname . '" ';
    $xml .= 'pa="' . $row[pa] . '" ';
    $xml .= 'pv="' . $row[pv] . '" ';
    $xml .= 'lat="' . $row[ygis] . '" ';
    $xml .= 'lng="' . $row[xgis] . '" ';
    $xml .= '/>';
}
$xml .= '</markers>';
$sql = "DROP TABLE tmdata";
mysql_query($sql);
예제 #6
0
$str = retdaterangstr($_GET[str]);
$sto = retdaterangsto($_GET[str]);
$strx = retDatets($str);
$stox = retDatets($sto);
$sql = "SELECT h.villcode,h.hno,h.xgis,h.ygis,p.prename,CONCAT(p.fname,' ',p.lname) AS pname,p.birth,a.pid,a.weight\n\t\t\tFROM\n\t\t\thouse AS h\n\t\t\tInner Join person AS p ON h.pcucode = p.pcucodeperson AND h.hcode = p.hcode\n\t\t\tInner Join visitancdeliverchild AS a ON p.pcucodeperson = a.pcucodechild AND p.pid = a.pidchild\n\t\t\tWHERE\n\t\t\tp.birth BETWEEN  '{$str}' AND '{$sto}' AND\n\t\t\tSUBSTRING(h.villcode,7,2) <> '00'\n\t\t\tORDER BY p.birth";
$result = mysql_query($sql);
$xml = '<markers>';
while ($row = mysql_fetch_array($result)) {
    $moo = substr($row[villcode], 6, 2);
    $vill = getMooVillage($row[villcode]);
    if ($row[birth] != "") {
        $birth = retDatets($row[birth]);
    } else {
        $birth = "";
    }
    $mother = getPersonName($row[pid]);
    $title = getTitle($row[prename]);
    $xml .= '<marker ';
    $xml .= 'hono="' . $row[hno] . '" ';
    $xml .= 'moo="' . $moo . '" ';
    $xml .= 'vill="' . $vill . '" ';
    $xml .= 'pname="' . $title . $row[pname] . '" ';
    $xml .= 'weight="' . $row[weight] . '" ';
    $xml .= 'birth="' . $birth . '" ';
    $xml .= 'mother="' . $mother . '" ';
    $xml .= 'lat="' . $row[ygis] . '" ';
    $xml .= 'lng="' . $row[xgis] . '" ';
    $xml .= '/>';
}
$xml .= '</markers>';
echo $xml;
예제 #7
0
<script type="text/javascript" src="js/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="js/jquery-ui-1.8.1.offset.datepicker.min.js"></script>
<link type="text/css" href="css/ui-lightness/jquery-ui-1.8.1.custom.css" rel="stylesheet" />
<script type="text/javascript">
$(function(){
		  $("#datepicker-th1").datepicker({ dateFormat: 'dd/mm/yy', yearOffset: 543, defaultDate: '<?php 
    echo $daysdatepick;
    ?>
'});
		  $("#datepicker-th2").datepicker({ dateFormat: 'dd/mm/yy', yearOffset: 543, defaultDate: '<?php 
    echo $daysdatepick;
    ?>
'});
		});
function cursor(){
 document.frm_old.date_end.focus();
}
</script>
<body  onload="cursor();">

<?php 
    $pname = getPersonName($_GET[pid]);
    $txt = "<br><form id='frm_old' name='frm_old' method='get' action='insert_ancdeliver.php'>";
    $txt .= "<table><tr><td>บันทึกวันที่คลอดของ {$pname}   <input name='date_end' type='text' size='8' id='datepicker-th2' onkeypress='date_fbb(this);' onchange='getData();' value='{$dayend}'/>\n\t  </td><td><input name='pid' type='hidden' id='pid' value='{$_GET['pid']}' /></td><td><input name='pregno' type='hidden' id='pregno' value='{$_GET['pregno']}' /></td><td><input type='submit' name='Submit' value='บันทึก' /></td></tr></table></form>";
    echo $txt;
} else {
    header("Location: login.php");
}
?>
</body>
</html>
예제 #8
0
                            </tr>
                        </thead>
                        <tbody>
                            <?php 
        foreach ($gearList as $gear) {
            $gearObject = new Gear();
            $gearObject->fetch($gear['gear_id']);
            printf("<tr>");
            printf("<td><a href='gear-item.php?gear_id=%s'>%s</a></td>", $gear['gear_id'], $gear['name']);
            echo "<td>" . $gearObject->status(date('Y-m-d h:m:s')) . "</td>";
            $co_id = $gearObject->lastCheckoutID();
            //fetchLastCheckout($gear['gear_id']);
            if (!empty($co_id)) {
                $co = new Checkout();
                $co->retrieveCheckout($co_id);
                printf("<td><a href='checkout.php?co_id=%s'>%s</a></td>", $co_id, getPersonName($co->getPerson()));
            } else {
                //no last checkout
                printf("<td>n/a</td>");
            }
            printf("<td class='text-center'>%s</td>", $gearObject->getQty());
            //$gear['qty']
            printf("</tr>");
        }
        ?>
                        </tbody>
                    </table>
                    <?php 
    }
}
//foreach