本文整理汇总了PHP中user::get_username方法的典型用法代码示例。如果您正苦于以下问题:PHP user::get_username方法的具体用法?PHP user::get_username怎么用?PHP user::get_username使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类user
的用法示例。
在下文中一共展示了user::get_username方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: authenticate
public function authenticate(user $user)
{
$password = sha1($this->config->item('salt') . $user->get_password());
$row = $this->db->get_where('users', array('username' => $user->get_username()))->row();
if ($row != null) {
if ($row->password == $password) {
if ($row->confirm) {
$user->set_id($row->id);
return 'LOGGEDIN';
} else {
return 'ACCOUNT_INVALID';
}
} else {
return 'PASSWORD_INCORRECT';
}
} else {
return 'USER_NOT_FOUND';
}
}
示例2: form_consult_lab_fecalysis
function form_consult_lab_fecalysis()
{
if (func_num_args() > 0) {
$arg_list = func_get_args();
$menu_id = $arg_list[0];
$post_vars = $arg_list[1];
$get_vars = $arg_list[2];
$validuser = $arg_list[3];
$isadmin = $arg_list[4];
}
$q_fecalysis = mysql_query("SELECT date_format(date_lab_exam,'%m/%d/%Y') as 'date_lab_exam',fecal_color,fecal_consistency,fecal_occultblood,fecal_ova,fecal_wbc,fecal_rbc,fecal_bacteria,fecal_fat,fecal_starch,fecal_others,user_id,patient_id FROM m_consult_lab_fecalysis WHERE request_id='{$_GET['request_id']}'") or die("Cannot query 150" . mysql_error());
$q_lab_details = mysql_query("SELECT patient_id,date_format(request_timestamp,'%a %d %b %Y, %h %i %p') as 'date_requested', request_user_id, date_format(done_timestamp,'%a %d %b %Y, %h %i %p') as 'date_done', request_done, done_user_id FROM m_consult_lab WHERE request_id='{$_GET['request_id']}'") or die("Cannot query 151:" . mysql_error());
list($pxid, $date_request, $request_user_id, $date_done, $request_done, $done_user_id) = mysql_fetch_array($q_lab_details);
if (mysql_num_rows($q_fecalysis) != 0) {
list($date_lab_exam, $color, $consistency, $blood, $ova, $wbc, $rbc, $bacteria, $fat, $starch, $others, $userid, $pxid) = mysql_fetch_row($q_fecalysis);
} else {
$date_lab_exam = date('m/d/Y');
}
echo "<a name='fecalysis'></a>";
echo "<form action='{$_SERVER['PHP_SELF']}?page={$get_vars['page']}&menu_id={$get_vars['menu_id']}&consult_id={$get_vars['consult_id']}&module=fecalysis&request_id={$get_vars['request_id']}&lab_id=FEC&ptmenu=LABS#fecalysis' name='form_lab' method='post'>";
echo "<span class='tinylight'>";
echo "<b>LAB REQUEST DETAILS</b><br/>";
echo "<table width='250' bgcolor='#ffff99' style='border: 1px solid black'>";
//echo "<tr><td class='tinylight'><b>REQUEST ID: </b><font color='red'>".module::pad_zero($_GET["request_id"],7)."</font><br/>";
echo "<tr><td class='tinylight'><b>LAB EXAM: </b>FECALYSIS<br/>";
echo "<b>DATE REQUESTED: </b>" . $date_request . "<br/>";
echo "<b>REQUESTED BY: </b>" . user::get_username($request_user_id) . "<br/>";
echo "<b>DATE COMPLETED: </b>" . $date_done . "<br/>";
echo "<b>PROCESSED BY: </b>" . ($done_user_id ? user::get_username($done_user_id) : "NA") . "<br/>";
echo "<b>RELEASED: </b>" . $request_done . "<br/></td></tr>";
echo "</table>";
echo "<hr size='1'/>";
echo "<table style='border: 1px dotted black'>";
echo "<tr><td colspan='2' class='boxtitle'>DATE EXAMINED <input type='text' name='fecal_date' size='8' maxlength='10' value='{$date_lab_exam}' class='tinylight'></input> ";
echo "<a href=\"javascript:show_calendar4('document.form_lab.fecal_date', document.form_lab.fecal_date.value);\"><img src='../images/cal.gif' width='16' height='16' border='0' alt='Click Here to Pick up the date'></a> ";
echo "</td></tr>";
echo "<tr><td colspan='2' align='center' class='boxtitle'>MACROSCOPIC</td></tr>";
echo "<tr><td colspan='2' class='boxtitle' align='center'>PHYSICAL</td></tr>";
echo "<tr valign='top' class='tinylight'><td class='boxtitle'>COLOR</td><td><input name='fecal_color' type='text' size='9' value='{$color}' class='tinylight'></input></td></tr>";
echo "<tr><td class='boxtitle'>CONSISTENCY</td><td><input name='fecal_consistency' type='text' size='9' value='{$consistency}' class='tinylight'></input></td></tr>";
echo "<tr><td colspan='2' class='boxtitle' align='center'>CHEMICAL</td></tr>";
echo "<tr><td class='boxtitle'>OCCULT BLOOD</td><td><textarea name='fecal_blood' rows='2' cols='20' class='tinylight'>{$blood}</textarea></td></tr>";
echo "<tr><td colspan='2'> </td></tr>";
echo "<tr><td colspan='2' class='boxtitle' align='center'>MICROSCOPIC</td></tr>";
echo "<tr valign='top'><td class='boxtitle'>OVA OR PARASITE</td>";
echo "<td><textarea name='fecal_ova' rows='2' cols='20' class='tinylight'>{$ova}</textarea></td></tr>";
echo "<tr valign='top'><td class='boxtitle'>WBC</td>";
echo "<td><input name='fecal_wbc' type='text' size='9' value='{$wbc}' class='tinylight'></input> /hpf</td></tr>";
echo "<tr valign='top'><td class='boxtitle'>RBC</td>";
echo "<td><input name='fecal_rbc' type='text' size='9' value='{$rbc}' class='tinylight'></input> /hpf</td></tr>";
echo "<tr valign='top'><td class='boxtitle'>BACTERIA</td>";
echo "<td><input name='fecal_bacteria' type='text' size='9' value='{$bacteria}' class='tinylight'></input></td></tr>";
echo "<tr valign='top'><td class='boxtitle'>FAT GLOBULES</td>";
echo "<td><input name='fecal_fat' type='text' size='9' value='{$fat}' class='tinylight'></input></td></tr>";
echo "<tr valign='top'><td class='boxtitle'>STARCH GLOBULES</td>";
echo "<td><input name='fecal_starch' type='text' size='9' value='{$starch}' class='tinylight'></input></td></tr>";
echo "<tr valign='top'><td class='boxtitle'>OTHERS</td>";
echo "<td><textarea name='fecal_others' rows='2' cols='20' class='tinylight'>{$others}</textarea></td></tr>";
echo "<tr valign='top'><td colspan='2'>";
echo "<span class='boxtitle'>" . LBL_RELEASE_FLAG . "</span><br>";
echo "<input type='checkbox' name='release_flag' " . (($fecalysis["release_flag"] ? $fecalysis["release_flag"] : $post_vars["release_flag"]) == "Y" ? "checked" : "") . " value='1'/> " . INSTR_RELEASE_FLAG . "<br />";
echo "</td></tr>";
echo "<tr><td colspan='2' align='center'>";
if ($get_vars["request_id"]) {
print "<input type='hidden' name='request_id' value='" . $get_vars["request_id"] . "'>";
if ($_SESSION["priv_update"]) {
print "<input type='submit' value = 'Update Lab Exam' class='textbox' name='submitlab' style='border: 1px solid #000000'> ";
}
}
echo "</td></tr>";
echo "</table>";
echo "</form>";
}
示例3: display_vaccine_record_details
function display_vaccine_record_details()
{
if (func_num_args() > 0) {
$arg_list = func_get_args();
$menu_id = $arg_list[0];
$post_vars = $arg_list[1];
$get_vars = $arg_list[2];
$validuser = $arg_list[3];
$isadmin = $arg_list[4];
//print_r($arg_list);
}
$patient_id = healthcenter::get_patient_id($get_vars["consult_id"]);
$sql = "select consult_id, user_id, patient_id, vaccine_timestamp, date_format(vaccine_timestamp, '%a %d %b %Y, %h:%i%p'), " . "vaccine_id, adr_flag, actual_vaccine_date, source_module " . "from m_consult_vaccine where " . "vaccine_id = '" . $get_vars["vaccine"] . "' and patient_id = '{$patient_id}' and " . "vaccine_timestamp = '" . $get_vars["ts"] . "'";
if ($result = mysql_query($sql)) {
if (mysql_num_rows($result)) {
list($cid, $uid, $pid, $vstamp, $vdate, $vid, $adr, $actual_date, $source) = mysql_fetch_array($result);
print "<a name='detail'>";
print "<table width='250' cellpadding='3' style='border:1px dashed black'><tr><td>";
print "<form name='form_vaccine_detail' method='post' action='" . $_SERVER["PHP_SELF"] . "?page=" . $get_vars["page"] . "&menu_id=" . $get_vars["menu_id"] . "&consult_id=" . $get_vars["consult_id"] . "&ptmenu=" . $get_vars["ptmenu"] . "&module=vaccine&vaccine={$vid}&ts={$vstamp}&actual={$actual_vdate}'>";
print "<span class='tinylight'>";
print "PATIENT: " . patient::get_name($pid) . "<br/>";
print "DATA SOURCE: " . strtoupper($source) . "<br/>";
print "VACCINE: " . vaccine::get_vaccine_name($vid) . "<br/>";
print "REPORT DATE: {$vdate}<br/>";
print "RECORDED BY: " . user::get_username($uid) . "<br/>";
print "ACTUAL VACCINE DATE:<br/>";
if ($actual_date != "0000-00-00") {
list($year, $month, $day) = explode("-", $actual_date);
$conv_date = "{$month}/{$day}/{$year}";
}
print "<input type='text' size='10' maxlength='10' class='tinylight' name='actual_vaccine_date' value='" . ($conv_date ? $conv_date : $post_vars["actual_vaccine_date"]) . "' style='border: 1px solid #000000'> ";
print "<a href=\"javascript:show_calendar4('document.form_vaccine_detail.actual_vaccine_date', document.form_vaccine_detail.actual_vaccine_date.value);\"><img src='../images/cal.gif' width='16' height='16' border='0' alt='Click Here to Pick up the date'></a><br>";
print "<input type='checkbox' name='adr_flag' " . ($adr == "Y" ? "checked" : "") . " value='1'/> " . INSTR_ADVERSE_VACCINE_REACTION . "<br/>";
print "<input type='hidden' name='vaccine' value='" . $get_vars["vaccine"] . "'/>";
print "<input type='hidden' name='vaccine_consult_id' value='{$cid}'/>";
print "<input type='hidden' name='ts' value='" . $get_vars["ts"] . "'/>";
if ($_SESSION["priv_delete"]) {
print "<input type='submit' name='submitdetail' value='Delete Record' class='tinylight' style='border: 1px solid black'/> ";
}
if ($_SESSION["priv_update"]) {
print "<input type='submit' name='submitdetail' value='Update Record' class='tinylight' style='border: 1px solid black'/> ";
}
print "</span>";
print "</form>";
print "</td></tr></table>";
}
}
}
示例4: form_news
function form_news() {
//
// called from _vaccine()
//
if (func_num_args()) {
$arg_list = func_get_args();
$menu_id = $arg_list[0];
$post_vars = $arg_list[1];
$get_vars = $arg_list[2];
$isadmin = $arg_list[3];
if ($get_vars["news_id"]) {
$sql = "select news_id, news_title, news_timestamp, news_author, news_lead, news_text, news_active ".
"from m_news where news_id = '".$get_vars["news_id"]."'";
if ($result = mysql_query($sql)) {
if (mysql_num_rows($result)) {
$news = mysql_fetch_array($result);
}
//print_r($news);
}
}
}
print "<table width='300'>";
print "<form action = '".$_SERVER["SELF"]."?page=".$get_vars["page"]."&menu_id=".$get_vars["menu_id"]."' name='form_news' method='post'>";
print "<tr valign='top'><td>";
print "<span class='library'>".FTITLE_NEWS_FORM."</span><br><br>";
print "</td></tr>";
print "<tr valign='top'><td>";
if ($get_vars["news_id"]) {
print "<b>CREATED:</b> ".$news["news_timestamp"]."<br />";
} else {
print "<b>NOTE: Fill up the form with your news item content.</b><br /><br />";
}
print "</td></tr>";
if ($_SESSION["isadmin"]) {
print "<tr valign='top'><td>";
print "<span class='boxtitle'>".LBL_NEWS_AUTHOR."</span><br> ";
print user::show_users(($news["news_author"]?$news["news_author"]:$post_vars["user_id"]));
print "</td></tr>";
} else {
print "<b>AUTHOR: </b>".user::get_username($_SESSION["userid"])."<br />";
print "<input type='hidden' name='user_id' value='".$_SESSION["userid"]."' />";
}
print "<tr valign='top'><td>";
print "<span class='boxtitle'>".LBL_NEWS_ACTIVE."</span><br> ";
print "<input type='checkbox' name='news_active' ".($news["news_active"]=="Y"?"checked":"")." value='1' > ".INSTR_CHECK_ACTIVATE."<br>";
print "</td></tr>";
print "<tr valign='top'><td>";
print "<span class='boxtitle'>".LBL_NEWS_TITLE."</span><br> ";
print "<input type='text' class='textbox' size='25' maxlength='50' name='news_title' value='".($news["news_title"]?$news["news_title"]:$post_vars["news_title"])."' style='border: 1px solid #000000'><br>";
print "</td></tr>";
print "<tr valign='top'><td>";
print "<span class='boxtitle'>".LBL_NEWS_LEAD."</span><br> ";
print "<textarea rows='3' cols='35' name='news_lead' class='textbox' style='border: 1px solid #000000'>".stripslashes(($news["news_lead"]?$news["news_lead"]:$post_vars["news_lead"]))."</textarea>";
print "</td></tr>";
print "<tr valign='top'><td>";
print "<span class='boxtitle'>".LBL_NEWS_TEXT."</span><br> ";
print "<textarea rows='7' cols='35' name='news_text' class='textbox' style='border: 1px solid #000000'>".stripslashes(($news["news_text"]?$news["news_text"]:$post_vars["news_text"]))."</textarea>";
print "</td></tr>";
print "<tr><td><br>";
if ($get_vars["news_id"]) {
print "<input type='hidden' name='news_id' value='".$get_vars["news_id"]."'>";
if ($_SESSION["priv_update"]) {
print "<input type='submit' value = 'Update News' class='textbox' name='submitnews' style='border: 1px solid #000000'> ";
}
if ($_SESSION["priv_delete"]) {
print "<input type='submit' value = 'Delete News' class='textbox' name='submitnews' style='border: 1px solid #000000'> ";
}
} else {
if ($_SESSION["priv_add"]) {
print "<input type='submit' value = 'Add News' class='textbox' name='submitnews' style='border: 1px solid #000000'> ";
}
}
print "</td></tr>";
print "</form>";
print "</table><br>";
}
示例5: display_consult_notes_detail
function display_consult_notes_detail() {
if (func_num_args()) {
$arg_list = func_get_args();
$menu_id = $arg_list[0];
$post_vars = $arg_list[1];
$get_vars = $arg_list[2];
$validuser = $arg_list[3];
$isadmin = $arg_list[4];
}
// do some processing here
if ($get_vars["delete_complaint_id"]) {
if (module::confirm_delete($menu_id, $post_vars, $get_vars)) {
$sql = "delete from m_consult_notes_complaint ".
"where notes_id = '".$get_vars["notes_id"]."' and ".
"consult_id = '".$get_vars["consult_id"]."' and ".
"complaint_id = '".$get_vars["delete_complaint_id"]."'";
if ($result = mysql_query($sql)) {
header("location: ".$_SERVER["PHP_SELF"]."?page=".$get_vars["page"]."&menu_id=".$get_vars["menu_id"]."&consult_id=".$get_vars["consult_id"]."&ptmenu=DETAILS&module=notes¬es=".$get_vars["notes"]."¬es_id=".$get_vars["notes_id"]);
}
} else {
if ($post_vars["confirm_delete"]=="No") {
header("location: ".$_SERVER["PHP_SELF"]."?page=".$get_vars["page"]."&menu_id=".$get_vars["menu_id"]."&consult_id=".$get_vars["consult_id"]."&ptmenu=DETAILS&module=notes¬es=".$get_vars["notes"]."¬es_id=".$get_vars["notes_id"]);
}
}
}
if ($get_vars["delete_class_id"]) {
if (module::confirm_delete($menu_id, $post_vars, $get_vars)) {
$sql = "delete from m_consult_notes_dxclass ".
"where notes_id = '".$get_vars["notes_id"]."' and ".
"consult_id = '".$get_vars["consult_id"]."' and ".
"class_id = '".$get_vars["delete_class_id"]."'";
if ($result = mysql_query($sql)) {
header("location: ".$_SERVER["PHP_SELF"]."?page=".$get_vars["page"]."&menu_id=".$get_vars["menu_id"]."&consult_id=".$get_vars["consult_id"]."&ptmenu=DETAILS&module=notes¬es=".$get_vars["notes"]."¬es_id=".$get_vars["notes_id"]);
}
} else {
if ($post_vars["confirm_delete"]=="No") {
header("location: ".$_SERVER["PHP_SELF"]."?page=".$get_vars["page"]."&menu_id=".$get_vars["menu_id"]."&consult_id=".$get_vars["consult_id"]."&ptmenu=DETAILS&module=notes¬es=".$get_vars["notes"]."¬es_id=".$get_vars["notes_id"]);
}
}
}
// continue with real task
$sql = "select notes_id, consult_id, notes_history, ".
"notes_physicalexam, notes_plan, user_id, date_format(notes_timestamp, '%a %d %b %Y, %h:%i%p') ts ".
"from m_consult_notes where consult_id = '".$get_vars["consult_id"]."' and ".
"notes_id = '".$get_vars["notes_id"]."'";
if ($result = mysql_query($sql)) {
if (mysql_num_rows($result)) {
$notes = mysql_fetch_array($result);
print "<form method='post' action=''>";
print "<table width='300' cellpadding='2' style='border: 1px dashed black'><tr><td>";
print "<span class='tinylight'>";
print "<b>NOTES ID:</b> <font color='red'>".module::pad_zero($notes["notes_id"],7)."</font><br/>";
print "<b>DATE/TIME:</b> ".$notes["ts"]."<br/>";
print "<b>TAKEN BY:</b> ".user::get_username($notes["user_id"])."<br/>";
print "<hr size='1'/>";
print "<b>COMPLAINTS:</b><br/>";
notes::show_complaints($menu_id, $post_vars, $get_vars);
print "<hr size='1'/>";
print "<b>HISTORY:</b><br/>";
if (strlen($notes["notes_history"])>0) {
print stripslashes(nl2br($notes["notes_history"]))."<br/>";
if ($_SESSION["priv_update"]) {
print "<br/>";
print "<input type='submit' name='submitdetail' value='Update History' class='tinylight' style='border: 1px solid black'";
}
} else {
print "<font color='red'>No recorded history.</font><br/>";
}
print "<hr size='1'/>";
print "<b>PHYSICAL EXAM:</b><br/>";
if (strlen($notes["notes_physicalexam"])>0) {
print stripslashes(nl2br($notes["notes_physicalexam"]))."<br/>";
if ($_SESSION["priv_update"]) {
print "<br/>";
print "<input type='submit' name='submitdetail' value='Update PE' class='tinylight' style='border: 1px solid black'";
}
} else {
print "<font color='red'>No recorded PE.</font><br/>";
}
print "<hr size='1'/>";
print "<b>DIAGNOSIS:</b><br/>";
notes::show_diagnosis($menu_id, $post_vars, $get_vars);
print "<hr size='1'/>";
print "<b>PLAN:</b><br/>";
if (strlen($notes["notes_plan"])>0) {
print stripslashes(nl2br($notes["notes_plan"]))."<br/>";
if ($_SESSION["priv_update"]) {
print "<br/>";
print "<input type='submit' name='submitdetail' value='Update Plan' class='tinylight' style='border: 1px solid black'";
}
} else {
print "<font color='red'>No recorded plan.</font><br/>";
}
print "<hr size='1'/>";
print "<input type='hidden' name='notes_id' value='".$get_vars["notes_id"]."' />";
if ($_SESSION["priv_delete"]) {
print "<input type='submit' name='submitdetail' value='Delete Notes' class='tinylight' style='border: 1px solid black; background-color: #FF6633;'/> ";
}
print "</span>";
print "</td></tr></table><br>";
//.........这里部分代码省略.........
示例6: vitals_detail
function vitals_detail() {
if (func_num_args()>0) {
$arg_list = func_get_args();
$menu_id = $arg_list[0];
$post_vars = $arg_list[1];
$get_vars = $arg_list[2];
$validuser = $arg_list[3];
$isadmin = $arg_list[4];
//print_r($arg_list);
}
// process delete here
if ($post_vars["submitvitals"]) {
if ($post_vars["submitvitals"]=="Delete") {
if (module::confirm_delete($menu_id, $post_vars, $get_vars)) {
$sql_delete = "delete from m_consult_vitals ".
"where consult_id = '".$get_vars["consult_id"]."' and ".
"vitals_timestamp = '".$get_vars["timestamp"]."'";
if ($result_delete = mysql_query($sql_delete)) {
header("location: ".$_SERVER["PHP_SELF"]."?page=".$get_vars["page"]."&menu_id=".$get_vars["menu_id"]."&consult_id=".$get_vars["consult_id"]."&ptmenu=VITALS");
}
} else {
if ($post_vars["confirm_delete"]=="No") {
header("location: ".$_SERVER["PHP_SELF"]."?page=".$get_vars["page"]."&menu_id=".$get_vars["menu_id"]."&consult_id=".$get_vars["consult_id"]."&ptmenu=VITALS");
}
}
}
}
$sql = "select user_id, vitals_weight, vitals_temp, vitals_systolic, vitals_diastolic, vitals_heartrate, vitals_resprate,vitals_height,vitals_pulse ".
"from m_consult_vitals where consult_id = '".$get_vars["consult_id"]."' and vitals_timestamp = '".$get_vars["timestamp"]."'";
$edad = healthcenter::get_patient_age($get_vars["consult_id"]);
if ($result = mysql_query($sql)) {
if (mysql_num_rows($result)) {
list($uid, $wt, $temp, $syst, $diast, $hrate, $rrate,$ht,$pulse) = mysql_fetch_array($result);
print "<a name='detail'>";
print "<form method='post' action='".$_SERVER["PHP_SELF"]."?page=".$get_vars["page"]."&menu_id=".$get_vars["menu_id"]."&consult_id=".$get_vars["consult_id"]."&ptmenu=VITALS×tamp=".$get_vars["timestamp"]."' name='form_vitals_detail'>";
print "<table width='250' style='border: 1px dotted black'><tr><td colspan='2'>";
print "Taken by: ".user::get_username($uid)."<br/>";
print "<td></tr>";
print "<tr valign='top'><td>";
print "BP: $syst/$diast<br/>";
print "HR: $hrate<br/>";
print "RR: $rrate<br/>";
print "Pulse Rate: $pulse<br/>";
print "</td><td>";
print "Weight (kg): $wt<br/>";
print "Temp deg C: $temp<br/>";
print "Height: $ht cms<br/>";
print "</td></tr>";
print "<tr><td colspan='2'>";
print "HPN STAGE: ".healthcenter::hypertension_stage($syst, $diast, $edad)."<br/>";
print healthcenter::compute_bmi($ht,$wt);
print "</td></tr>";
print "<tr><td colspan='2'>";
//if ($_SESSION["priv_delete"]) {
print "<input type='submit' name='submitvitals' value='Update' class='tinylight' style='border: 1px solid black'/> ";
print "<input type='submit' name='submitvitals' value='Delete' class='tinylight' style='border: 1px solid black'/>";
//}
print "</td></tr>";
print "</table>";
print "</form>";
}
}
}
示例7: show_service_details
function show_service_details() {
if (func_num_args()>0) {
$arg_list = func_get_args();
$menu_id = $arg_list[0];
$post_vars = $arg_list[1];
$get_vars = $arg_list[2];
$validuser = $arg_list[3];
$isadmin = $arg_list[4];
//print_r($arg_list);
}
$sql = "select ccdev_id, consult_id, user_id, patient_id, ccdev_timestamp, date_format(ccdev_timestamp, '%a %d %b %Y, %h:%i%p'), ".
"service_id, round(age_on_service,2) ".
"from m_consult_ccdev_services where ".
"ccdev_id = '".$get_vars["ccdev_id"]."' and service_id = '".$get_vars["service_id"]."' and ".
"ccdev_timestamp = '".$get_vars["sts"]."'";
if ($result = mysql_query($sql)) {
if (mysql_num_rows($result)) {
list($cdid, $cid, $uid, $pid, $cstamp, $sdate, $sid, $age_service) = mysql_fetch_array($result);
print "<a name='detail'>";
print "<table width='250' cellpadding='3' style='border:1px dashed black'><tr><td>";
print "<form name='form_service_detail' method='post' action='".$_SERVER["PHP_SELF"]."?page=".$get_vars["page"]."&menu_id=".$get_vars["menu_id"]."&consult_id=".$get_vars["consult_id"]."&ptmenu=".$get_vars["ptmenu"]."&module=".$get_vars["module"]."&ccdev=".$get_vars["ccdev"]."'>";
print "<span class='tinylight'>";
print "REGISTRY ID: $cdid<br/>";
print "SERVICE: ".ccdev::get_service_name($sid)."<br/>";
print "REPORT DATE: $sdate<br/>";
print "AGE ON SERVICE: $age_service weeks<br/>";
print "RECORDED BY: ".user::get_username($uid)."<br/>";
print "<input type='hidden' name='service' value='$sid'/>";
print "<input type='hidden' name='sts' value='$cstamp'/>";
print "<input type='hidden' name='ccdev_id' value='$cdid'/>";
if ($_SESSION["priv_delete"]) {
print "<input type='submit' name='submitdetail' value='Delete Service' class='tinylight' style='border: 1px solid black'/> ";
}
print "</span>";
print "</form>";
print "</td></tr></table>";
}
}
}
示例8: form_consult_lab_sputum
function form_consult_lab_sputum() {
if (func_num_args()>0) {
$arg_list = func_get_args();
$menu_id = $arg_list[0];
$post_vars = $arg_list[1];
$get_vars = $arg_list[2];
$validuser = $arg_list[3];
$isadmin = $arg_list[4];
//print_r($arg_list);
}
echo "<a name='sputum'></a>";
print "<table width='300'>";
print "<form action = '".$_SERVER["SELF"]."?page=".$get_vars["page"]."&menu_id=".$get_vars["menu_id"]."&consult_id=".$get_vars["consult_id"]."&module=sputum&request_id=".$get_vars["request_id"]."&lab_id=SPT". "&ptmenu=LABS' name='form_lab' method='post'>";
print "<tr valign='top'><td>";
print "<b>".FTITLE_LAB_EXAM_FORM."</b><br><br>";
print "</td></tr>";
print "<tr valign='top'><td>";
print "<span class='boxtitle'>".LBL_LAB_REQUEST_DETAILS."</span><br> ";
$sql = "select lab_id, consult_id, date_format(request_timestamp, '%a %d %b %Y, %h:%i%p') request_timestamp, request_user_id, request_done, "."date_format(done_timestamp, '%a %d %b %Y, %h:%i%p') done_timestamp, done_user_id "."from m_consult_lab "."where request_id = '".$get_vars["request_id"]."'";
if ($result = mysql_query($sql)) {
if (mysql_num_rows($result)) {
$lab = mysql_fetch_array($result);
print "<table width='250' bgcolor='#FFFF99' style='border: 1px solid black'><tr><td class='tinylight'>";
print "<b>".LBL_LAB_EXAM.":</b> ".lab::get_lab_name($lab["lab_id"])."<br/>";
print "<b>".LBL_DATE_REQUESTED.":</b> ".$lab["request_timestamp"]."<br/>";
print "<b>".LBL_REQUESTED_BY.":</b> ".user::get_username($lab["request_user_id"])."<br/>";
print "<b>".LBL_DATE_PROCESSED.":</b> ".($lab["done_timestamp"]?$lab["done_timestamp"]:"NA")."<br/>";
print "<b>".LBL_PROCESSED_BY.":</b> ".($lab["done_user_id"]?user::get_username($lab["done_user_id"]):"NA")."<br/>";
print "</td></tr></table>";
}
}
print "</td></tr>";
print "<tr valign='top'><td>";
if ($get_vars["request_id"]) {
$sql_sputum = "select sp1_collection_date, sp2_collection_date, sp3_collection_date, ".
"sp1_appearance, sp2_appearance, sp3_appearance, ".
"sp1_reading, sp2_reading, sp3_reading, lab_diag1, lab_diag2, lab_diag3, lab_diagnosis, release_flag, sputum_period ".
"from m_consult_lab_sputum ".
"where request_id = '".$get_vars["request_id"]."'";
if ($result_sputum = mysql_query($sql_sputum)) {
if (mysql_num_rows($result_sputum)) {
$sputum = mysql_fetch_array($result_sputum);
//print_r($sputum);
// set up collection dates
if ($sputum["sp1_collection_date"]<>"0000-00-00") {
list($year,$month,$day) = explode("-",$sputum["sp1_collection_date"]);
$sp1_collection_date = "$month/$day/$year";
}
if ($sputum["sp2_collection_date"]<>"0000-00-00") {
list($year,$month,$day) = explode("-",$sputum["sp2_collection_date"]);
$sp2_collection_date = "$month/$day/$year";
}
if ($sputum["sp3_collection_date"]<>"0000-00-00") {
list($year,$month,$day) = explode("-",$sputum["sp3_collection_date"]);
$sp3_collection_date = "$month/$day/$year";
}
}
}
}
print "<table width='250' style='border: 1px dotted black'>";
print "<tr><td class='boxtitle'>".LBL_SPECIMEN."</td><td class='boxtitle'>#1</td><td class='boxtitle'>#2</td><td class='boxtitle'>#3</td></tr>";
print "<tr><td class='boxtitle'nowrap>".LBL_COLLECTION_DATE."</td>";
print "<td>";
print "<input type='text' size='10' class='tinylight' name='sp1_collection_date' value='".($sp1_collection_date?$sp1_collection_date:$post_vars["sp1_collection_date"])."' style='border: 1px solid #000000'> ";
print "<a href=\"javascript:show_calendar4('document.form_lab.sp1_collection_date', document.form_lab.sp1_collection_date.value);\"><img src='../images/cal.gif' width='16' height='16' border='0' alt='Click Here to Pick up the date'></a> ";
print "</td><td>";
print "<input type='text' size='10' class='tinylight' name='sp2_collection_date' value='".($sp2_collection_date?$sp2_collection_date:$post_vars["sp2_collection_date"])."' style='border: 1px solid #000000'> ";
print "<a href=\"javascript:show_calendar4('document.form_lab.sp2_collection_date', document.form_lab.sp2_collection_date.value);\"><img src='../images/cal.gif' width='16' height='16' border='0' alt='Click Here to Pick up the date'></a> ";
print "</td><td>";
print "<input type='text' size='10' class='tinylight' name='sp3_collection_date' value='".($sp3_collection_date?$sp3_collection_date:$post_vars["sp3_collection_date"])."' style='border: 1px solid #000000'> ";
print "<a href=\"javascript:show_calendar4('document.form_lab.sp3_collection_date', document.form_lab.sp3_collection_date.value);\"><img src='../images/cal.gif' width='16' height='16' border='0' alt='Click Here to Pick up the date'></a> ";
print "</td>";
print "</tr>";
print "<tr><td class='boxtitle'nowrap>".LBL_VISUAL_APPEARANCE."</td>";
print "<td>".sputum::show_sputum_appearance(($sputum["sp1_appearance"]?$sputum["sp1_appearance"]:$post_vars["sp1_appearance"]),'sp1_appearance')."</td>";
print "<td>".sputum::show_sputum_appearance(($sputum["sp2_appearance"]?$sputum["sp2_appearance"]:$post_vars["sp2_appearance"]),'sp2_appearance')."</td>";
print "<td>".sputum::show_sputum_appearance(($sputum["sp3_appearance"]?$sputum["sp3_appearance"]:$post_vars["sp3_appearance"]),'sp3_appearance')."</td>";
print "</tr>";
print "<tr><td class='boxtitle'>SPUTUM EXAM RESULT</td>";
print sputum::show_sputum_dropdown('lab_diag1',$sputum["lab_diag1"]);
print sputum::show_sputum_dropdown('lab_diag2',$sputum["lab_diag2"]);
print sputum::show_sputum_dropdown('lab_diag3',$sputum["lab_diag3"]);
print "</tr>";
print "<tr><td class='boxtitle'>".LBL_READING."</td>";
print "<td>".sputum::show_sputum_reading(($sputum["sp1_reading"]?$sputum["sp1_reading"]:$post_vars["sp1_reading"]),'sp1_reading')."</td>";
print "<td>".sputum::show_sputum_reading(($sputum["sp2_reading"]?$sputum["sp2_reading"]:$post_vars["sp2_reading"]),'sp2_reading')."</td>";
print "<td>".sputum::show_sputum_reading(($sputum["sp3_reading"]?$sputum["sp3_reading"]:$post_vars["sp3_reading"]),'sp3_reading')."</td>";
print "</tr>";
print "<tr><td class='boxtitle'>".LBL_SPUTUM_PERIOD."</td>";
print "<td colspan='3'>";
print sputum::show_sputum_period(($sputum["sputum_period"]?$sputum["sputum_period"]:$post_vars["sputum_period"]));
print "</td>";
print "</tr>";
print "<tr><td class='boxtitle'>FINAL ".LBL_LAB_DIAGNOSIS."</td>";
print "<td colspan='3'>";
print "<select name='lab_diagnosis' class='tinylight'>";
//.........这里部分代码省略.........
示例9: display_ntp_maintenance_txdate
function display_ntp_maintenance_txdate()
{
if (func_num_args() > 0) {
$arg_list = func_get_args();
$menu_id = $arg_list[0];
$post_vars = $arg_list[1];
$get_vars = $arg_list[2];
$validuser = $arg_list[3];
$isadmin = $arg_list[4];
//print_r($arg_list);
}
print "<a name='m_detail'>";
// manage Delete here
if ($post_vars["submitntp"] && $get_vars["ntp_id"]) {
if ($post_vars["submitntp"] == "Delete Maintenance Entry") {
if (module::confirm_delete($menu_id, $post_vars, $get_vars)) {
$sql = "delete from m_consult_ntp_collection_maintenance " . "where ntp_id = '" . $get_vars["ntp_id"] . "' and " . "treatment_date = '" . $get_vars["txm_date"] . "'";
if ($result = mysql_query($sql)) {
header("location: " . $_SERVER["PHP_SELF"] . "?page=" . $get_vars["page"] . "&menu_id=" . $get_vars["menu_id"] . "&consult_id=" . $get_vars["consult_id"] . "&ptmenu=" . $get_vars["ptmenu"] . "&module=ntp&ntp=" . $get_vars["ntp"] . "&ntp_id=" . $get_vars["ntp_id"]);
}
} else {
if ($post_vars["confirm_delete"] == "No") {
header("location: " . $_SERVER["PHP_SELF"] . "?page=" . $get_vars["page"] . "&menu_id=" . $get_vars["menu_id"] . "&consult_id=" . $get_vars["consult_id"] . "&ptmenu=" . $get_vars["ptmenu"] . "&module=ntp&ntp=" . $get_vars["ntp"] . "&ntp_id=" . $get_vars["ntp_id"]);
}
}
}
}
$sql = "select patient_id, user_id, treatment_date, intake_flag, remarks, " . "treatment_week, treatment_month " . "from m_consult_ntp_collection_maintenance " . "where ntp_id = '" . $get_vars["ntp_id"] . "' and treatment_date = '" . $get_vars["txm_date"] . "'";
if ($result = mysql_query($sql)) {
if (mysql_num_rows($result)) {
$txdate = mysql_fetch_array($result);
print "<form method='post' action='" . $_SERVER["PHPS-SELF"] . "?page=" . $get_vars["page"] . "&menu_id=" . $get_vars["menu_id"] . "&consult_id=" . $get_vars["consult_id"] . "&ptmenu=" . $get_vars["ptmenu"] . "&module=ntp&ntp=" . $get_vars["ntp"] . "&ntp_id=" . $get_vars["ntp_id"] . "&txm_date=" . $txdate["treatment_date"] . "#m_detail' name='form_maintenance_txdate'>";
print "<table width='200' style='border: 1px dotted black'><tr><td>";
print "<span class='tinylight'>";
print "<b>TREATMENT DATE " . $txdate["treatment_date"] . "</b><br/>";
print "Entered by: " . user::get_username($txdate["user_id"]) . "<br/>";
print "Treatment Week: " . $txdate["treatment_week"] . "<br/>";
print "Treatment Month: " . $txdate["treatment_month"] . "<br/>";
print "Intake: " . ($txdate["intake_flag"] == "Y" ? "Yes" : "No") . "<br/>";
print "Remarks:<br/>" . nl2br(stripslashes($txdate["remarks"])) . "<br/>";
if ($_SESSION["priv_delete"]) {
print "<input type='submit' name='submitntp' value='Delete Maintenance Entry' class='tinylight' style='border:1px solid black' />";
}
print "</span>";
print "</td></tr></table>";
print "</form>";
}
}
}
示例10: show_details
function show_details() {
if (func_num_args()>0) {
$arg_list = func_get_args();
$menu_id = $arg_list[0];
$post_vars = $arg_list[1];
$get_vars = $arg_list[2];
//print_r($arg_list);
}
$sql = "select schedule_id, visit_date, consult_id, date_format(schedule_timestamp, '%a %d %b %Y, %h:%i%p') schedule_timestamp, user_id, ".
"patient_id, appointment_id, reminder_flag ".
"from m_consult_appointments where schedule_id = '".$get_vars["schedule_id"]."'";
if ($result = mysql_query($sql)) {
if (mysql_num_rows($result)) {
$appt = mysql_fetch_array($result);
print "<form method='post' action='".$_SERVER["PHP_SELF"]."?page=".$get_vars["page"]."&menu_id=".$get_vars["menu_id"]."&consult_id=".$get_vars["consult_id"]."&ptmenu=APPTS&schedule_id=".$appt["schedule_id"]."'>";
print "<table width='200' cellpadding='1' style='border: 1px dotted black'><tr><td>";
print "<span class='tinylight'>";
print "VISIT DATE: ".$appt["visit_date"]."<br/>";
print "APPT SET ON: ".$appt["visit_date"]."<br/>";
print "APPT SET BY: ".user::get_username($appt["user_id"])."<br/>";
print "APPT CODE: ".appointment::get_appointment_name($appt["appointment_id"])."<br/>";
print "REMINDER: ".$appt["reminder_flag"]."<br/>";
print "<br/><input type='submit' class='tinylight' name='submitsked' value='Delete' style='border: 1px solid black'/>";
print "</span>";
print "</td></tr></table></form>";
}
}
}
示例11: _news
function _news() {
if (func_num_args()>0) {
$arg_list = func_get_args();
$menu_id = $arg_list[0];
$post_vars = $arg_list[1];
$get_vars = $arg_list[2];
$validuser = $arg_list[3];
$isadmin = $arg_list[4];
}
print "<table width='300'>";
print "<tr valign='top'><td>";
print "<span class='library'>".FTITLE_SITE_NEWS."</span><br>";
print "</td></tr>";
$sql = "select news_id, news_timestamp, news_title, news_author, news_lead from m_news order by news_timestamp desc";
if ($result = mysql_query($sql)) {
if (mysql_num_rows($result)) {
while (list($id, $ts, $title, $author, $lead) = mysql_fetch_array($result)) {
print "<tr valign='top'><td>";
if (!isset($menu_id)) {
$menu_id = module::get_menu_id("_news");
}
print "<a href='".$_SERVER["SELF"]."?page=CONTENT&menu_id=$menu_id&news_id=$id' class='boxtext'><b>$title</b></a><br />";
print "<span class='tiny'><b>$ts ".user::get_username($author)."</b></span><br/>";
print "$lead<br />";
print "</td></tr>";
}
}
}
print "</table><br>";
}
示例12: display_drug_dispense_detail
function display_drug_dispense_detail()
{
if (func_num_args()) {
$arg_list = func_get_args();
$menu_id = $arg_list[0];
$post_vars = $arg_list[1];
$get_vars = $arg_list[2];
$validuser = $arg_list[3];
$isadmin = $arg_list[4];
}
// do some processing here
/*if ($get_vars["delete_complaint_id"]) {
if (module::confirm_delete($menu_id, $post_vars, $get_vars)) {
$sql = "delete from m_consult_notes_complaint ".
"where notes_id = '".$get_vars["notes_id"]."' and ".
"consult_id = '".$get_vars["consult_id"]."' and ".
"complaint_id = '".$get_vars["delete_complaint_id"]."'";
if ($result = mysql_query($sql)) {
header("location: ".$_SERVER["PHP_SELF"]."?page=".$get_vars["page"]."&menu_id=".$get_vars["menu_id"]."&consult_id=".$get_vars["consult_id"]."&ptmenu=DETAILS&module=notes¬es=".$get_vars["notes"]."¬es_id=".$get_vars["notes_id"]);
}
} else {
if ($post_vars["confirm_delete"]=="No") {
header("location: ".$_SERVER["PHP_SELF"]."?page=".$get_vars["page"]."&menu_id=".$get_vars["menu_id"]."&consult_id=".$get_vars["consult_id"]."&ptmenu=DETAILS&module=notes¬es=".$get_vars["notes"]."¬es_id=".$get_vars["notes_id"]);
}
}
}
if ($get_vars["delete_class_id"]) {
if (module::confirm_delete($menu_id, $post_vars, $get_vars)) {
$sql = "delete from m_consult_notes_dxclass ".
"where notes_id = '".$get_vars["notes_id"]."' and ".
"consult_id = '".$get_vars["consult_id"]."' and ".
"class_id = '".$get_vars["delete_class_id"]."'";
if ($result = mysql_query($sql)) {
header("location: ".$_SERVER["PHP_SELF"]."?page=".$get_vars["page"]."&menu_id=".$get_vars["menu_id"]."&consult_id=".$get_vars["consult_id"]."&ptmenu=DETAILS&module=notes¬es=".$get_vars["notes"]."¬es_id=".$get_vars["notes_id"]);
}
} else {
if ($post_vars["confirm_delete"]=="No") {
header("location: ".$_SERVER["PHP_SELF"]."?page=".$get_vars["page"]."&menu_id=".$get_vars["menu_id"]."&consult_id=".$get_vars["consult_id"]."&ptmenu=DETAILS&module=notes¬es=".$get_vars["notes"]."¬es_id=".$get_vars["notes_id"]);
}
}
}*/
// continue with real task
/*$sql = "select notes_id, consult_id, notes_history, ".
"notes_physicalexam, notes_plan, user_id, date_format(notes_timestamp, '%a %d %b %Y, %h:%i%p') ts, plan_px_info ".
"from m_consult_notes where consult_id = '".$get_vars["consult_id"]."' and ".
"notes_id = '".$get_vars["notes_id"]."'";*/
$sql = "select *, date_format(dispense_timestamp, '%a %d %b %Y, %h:%i%p') ts from m_consult_pcb_dispense WHERE consult_id = '" . $get_vars["consult_id"] . "' and dispense_id = '" . $get_vars["drug_id"] . "'";
if ($result = mysql_query($sql)) {
if (mysql_num_rows($result)) {
$drug = mysql_fetch_array($result);
//list($min,$max,$class) = wtforage::_wtforage($_GET["consult_id"]);
print "<form method='post' action=''>";
print "<table width='300' cellpadding='2' style='border: 1px dashed black'><tr><td>";
print "<span class='tinylight'>";
print "<b>DISPENSE ID:</b> <font color='red'>" . module::pad_zero($drug["dispense_id"], 7) . "</font><br/>";
print "<b>DATE/TIME:</b> " . $drug["ts"] . "<br/>";
print "<b>TAKEN BY:</b> " . user::get_username($drug["user_id"]) . "<br/>";
print "<hr size='1'/>";
print "<b>DIAGNOSIS:</b><br/>";
drug::show_diagnosis($menu_id, $post_vars, $get_vars);
print "<br><br><hr size='1'/>";
print "<b>PLAN:</b><br/>";
$notes_id = drug::get_notes_id($get_vars["consult_id"]);
$sql_notes = "select notes_id, consult_id, notes_history, " . "notes_physicalexam, notes_plan, user_id, date_format(notes_timestamp, '%a %d %b %Y, %h:%i%p') ts, plan_px_info " . "from m_consult_notes where consult_id = '" . $get_vars["consult_id"] . "' and " . "notes_id = '{$notes_id}'";
if ($result_notes = mysql_query($sql_notes)) {
if (mysql_num_rows($result_notes)) {
$notes = mysql_fetch_array($result_notes);
if (strlen($notes["notes_plan"]) >= 0) {
print stripslashes(nl2br($notes["notes_plan"])) . "<br/><br />";
print stripslashes(nl2br($notes["plan_px_info"])) . "<br/>";
$plan = stripslashes(nl2br($notes["notes_plan"]));
} else {
print "<font color='red'>No recorded plan.</font><br/>";
}
}
}
print "<hr size='1'/>";
print "<input type='hidden' name='drug_id' value='" . $get_vars["drug_id"] . "' />";
if ($_SESSION["priv_delete"]) {
print "<input type='submit' name='submitdrug' value='Delete Drugs' class='tinylight' style='border: 1px solid black; background-color: #FF6633;'/> ";
}
print "</span>";
print "</td></tr></table><br>";
print "</form>";
}
}
}
示例13: form_patient
function form_patient()
{
if (func_num_args() > 0) {
$arg_list = func_get_args();
$menu_id = $arg_list[0];
$post_vars = $arg_list[1];
$get_vars = $arg_list[2];
//print_r($arg_list);
if ($get_vars["patient_id"]) {
$sql = "select patient_id, healthcenter_id, registration_date, patient_lastname, " . "patient_firstname, patient_middle, patient_dob, patient_gender, user_id, patient_mother, patient_cellphone, pwd_flag, ind_flag, blood_type " . "from m_patient where patient_id = '" . $get_vars["patient_id"] . "'";
if ($result = mysql_query($sql)) {
if (mysql_num_rows($result)) {
$patient = mysql_fetch_array($result);
}
}
}
}
$q_sms_enroll = mysql_query("SELECT menu_id FROM module_menu WHERE menu_id='1370'") or die("Cannot quer 535: " . mysql_error());
print "<a name='ptform'>";
print "<table width='300'>";
print "<form action = '" . $_SERVER["SELF"] . "?page=" . $get_vars["page"] . "&menu_id={$menu_id}' name='form_patient' method='post'>";
if ($get_vars["patient_id"]) {
print "<tr valign='top'>";
print "<td>";
print "<font color='#99CC00' size='5'><b>" . FTITLE_EDIT_PATIENT . "</b></font>";
print "</td>";
print "</tr>";
} else {
print "<tr valign='top'><td>";
print "<font color='#99CC00' size='5'><b>" . FTITLE_NEW_PATIENT . "</b></font>";
print "</td></tr>";
print "<tr valign='top'><td>";
print "<b>NOTE: This form is for new patients. All Fields are Required<br><br>";
print "</td></tr>";
}
if ($get_vars["patient_id"]) {
print "<tr valign='top'><td>";
print "<span class='boxtitle'>" . LBL_REGISTRATION_DATE . "</span><br> ";
print $patient["registration_date"] . "<br/>";
print "</td></tr>";
print "<tr valign='top'><td>";
print "<span class='boxtitle'>" . LBL_REGISTERED_BY . "</span><br> ";
print user::get_username($patient["user_id"]) . "<br/>";
print "</td></tr>";
}
print "<tr valign='top'><td>";
print "<span class='boxtitle'>" . LBL_FIRST_NAME . "</span><br> ";
print "<input type='text' class='textbox' name='patient_firstname' value='" . ($patient["patient_firstname"] ? $patient["patient_firstname"] : ($post_vars["patient_firstname"] ? $post_vars["patient_firstname"] : "")) . "' style='border: 1px solid #000000'><br>";
print "</td></tr>";
print "<tr valign='top'><td>";
print "<span class='boxtitle'>" . LBL_MIDDLE_NAME . "</span><br> ";
print "<input type='text' class='textbox' name='patient_middle' value='" . ($patient["patient_middle"] ? $patient["patient_middle"] : ($post_vars["patient_middle"] ? $post_vars["patient_middle"] : "")) . "' style='border: 1px solid #000000'><br>";
print "</td></tr>";
print "<tr valign='top'><td>";
print "<span class='boxtitle'>" . LBL_LAST_NAME . "</span><br> ";
print "<input type='text' class='textbox' name='patient_lastname' value='" . ($patient["patient_lastname"] ? $patient["patient_lastname"] : ($post_vars["patient_lastname"] ? $post_vars["patient_lastname"] : "")) . "' style='border: 1px solid #000000'><br>";
print "</td></tr>";
print "<tr valign='top'><td>";
print "<span class='boxtitle'>" . LBL_PATIENT_DOB . "</span><br> ";
if ($patient["patient_dob"]) {
// convert to external format
list($year, $month, $day) = explode("-", $patient["patient_dob"]);
$dob = "{$month}/{$day}/{$year}";
}
print "<input type='text' size='10' maxlength='10' class='textbox' name='patient_dob' value='" . ($dob ? $dob : ($post_vars["patient_dob"] ? $post_vars["patient_dob"] : "")) . "' style='border: 1px solid #000000'> ";
print "<a href=\"javascript:show_calendar4('document.form_patient.patient_dob', document.form_patient.patient_dob.value);\"><img src='../images/cal.gif' width='16' height='16' border='0' alt='Click Here to Pick up the date'></a></input>";
print "</td></tr>";
print "<tr valign='top'>";
print "<td>";
print "<span class='boxtitle'>" . LBL_GENDER . "</span><br> ";
print "<select name='patient_gender' " . ($get_vars["patient_id"] ? '' : '') . " class='textbox'>";
print "<option " . ($patient["patient_gender"] == 'M' ? 'selected' : ($post_vars["patient_gender"] == 'M' ? 'selected' : '')) . " value='M'>Male</option>";
print "<option " . ($patient["patient_gender"] == 'F' ? 'selected' : ($post_vars["patient_gender"] == 'F' ? 'selected' : '')) . " value='F'>Female</option>";
print "</select>";
print "<tr valign='top'>";
print "<td>";
print "<span class='boxtitle'>" . LBL_MOTHERS_NAME . "</span><br> ";
print "<input type='text' size='30' class='textbox' name='patient_mother' value='" . ($patient["patient_mother"] ? $patient["patient_mother"] : ($post_vars["patient_mother"] ? $post_vars["patient_mother"] : "")) . "' style='border: 1px solid #000000'><br>";
print "</td>";
print "</tr>";
print "</td>";
print "</tr>";
print "<tr>";
print "<td>";
print "<span class='boxtitle'>CELLPHONE NUMBER (11-digit,i.e. 09XX1234567)</span><br> ";
print "<input type='text' size='12' class='textbox' maxlength='11' name='patient_cellphone' value='" . ($patient["patient_cellphone"] ? $patient["patient_cellphone"] : ($post_vars["patient_cellphone"] ? $post_vars["patient_cellphone"] : "")) . "'></input>";
print "</td>";
print "</tr>";
print "<tr>";
print "<td>";
//Dagdag Hanggang 649
print "<span class='boxtitle'>CONFIRM CELLPHONE NUMBER</span><br> ";
print "<input type='text' size='12' class='textbox' maxlength='11' name='confirm_cellphone' value='" . ($patient["patient_cellphone"] ? $patient["patient_cellphone"] : ($post_vars["confirm_cellphone"] ? $post_vars["confirm_cellphone"] : "")) . "'></input>";
print "</td>";
print "</tr>";
//Hanggang Dito
print "<tr>";
print "<td>";
print "<span class='boxtitle'>PATIENT GROUP</span><br> ";
print "<input type='checkbox' name='p_group[]' value='pwd' " . ($patient["pwd_flag"] == 'Y' ? CHECKED : ($post_vars["p_group"][0] ? CHECKED : "")) . " >PWD</input><br />";
//.........这里部分代码省略.........
示例14: display_consult_reminder_detail
function display_consult_reminder_detail()
{
if (func_num_args() > 0) {
$arg_list = func_get_args();
$menu_id = $arg_list[0];
$post_vars = $arg_list[1];
$get_vars = $arg_list[2];
$validuser = $arg_list[3];
$isadmin = $arg_list[4];
//print_r($arg_list);
}
// do processing here
if ($post_vars["submitsms"] == "Delete SMS") {
if (module::confirm_delete($menu_id, $post_vars, $get_vars)) {
$sql = "delete from m_consult_reminder where reminder_id = '" . $post_vars["reminder_id"] . "'";
if ($result = mysql_query($sql)) {
header("location: " . $_SERVER["PHP_SELF"] . "?page=" . $get_vars["page"] . "&menu_id=" . $get_vars["menu_id"] . "&consult_id=" . $get_vars["consult_id"] . "&ptmenu=DETAILS&module=reminder&reminder=" . $get_vars["reminder"]);
}
} else {
if ($post_vars["confirm_delete"] == "No") {
header("location: " . $_SERVER["PHP_SELF"] . "?page=" . $get_vars["page"] . "&menu_id=" . $get_vars["menu_id"] . "&consult_id=" . $get_vars["consult_id"] . "&ptmenu=DETAILS&module=reminder&reminder=" . $get_vars["reminder"]);
}
}
}
$sql = "select reminder_id, reminder_text, patient_id, consult_id, sent_flag, user_id, reminder_date " . "from m_consult_reminder where reminder_id = '" . $get_vars["reminder_id"] . "'";
if ($result = mysql_query($sql)) {
if (mysql_num_rows($result)) {
$sms = mysql_fetch_array($result);
print "<form method='post' action=''>";
print "<table style='border: 1px dotted black'><tr><td>";
print "<span class='tinylight'>";
print "REMINDER NO: <font color='red'>" . module::pad_zero($sms["reminder_id"], 7) . "</font><br/>";
print "SENT: " . $sms["sent_flag"] . "<br/>";
print "REMINDER DATE: " . $sms["reminder_date"] . "<br/>";
print "CREATED BY: " . user::get_username($sms["user_id"]) . "<br/>";
print "<hr size='1'/>";
print "REMINDER TEXT:<br/>";
print $sms["reminder_text"] . "<br/>";
print "<br/>";
print "<input type='hidden' name='reminder_id' value='" . $sms["reminder_id"] . "' />";
if ($_SESSION["priv_delete"]) {
print "<input type='submit' name='submitsms' value='Delete SMS' class='tinylight' style='border: 1px solid black'/>";
}
print "</span>";
print "</td></tr></table>";
print "</form>";
}
}
}
示例15: form_patient
/**
* Show Patient Form
*
* Show form for adding or updating patient
* @param string $menu_id
* @param array $past_vars
* @param array $get_vars
*/
function form_patient () {
if (func_num_args()>0) {
$arg_list = func_get_args();
$menu_id = $arg_list[0];
$post_vars = $arg_list[1];
$get_vars = $arg_list[2];
//print_r($arg_list);
if ($get_vars["patient_id"]) {
$sql = "select patient_id, healthcenter_id, registration_date, patient_lastname, ".
"patient_firstname, patient_middle, patient_dob, patient_gender, user_id, patient_mother ".
"from m_patient where patient_id = '".$get_vars["patient_id"]."'";
if ($result = mysql_query($sql)) {
if (mysql_num_rows($result)) {
$patient = mysql_fetch_array($result);
}
}
}
}
print "<a name='ptform'>";
print "<table width='300'>";
print "<form action = '".$_SERVER["SELF"]."?page=".$get_vars["page"]."&menu_id=$menu_id' name='form_patient' method='post'>";
if ($get_vars["patient_id"]) {
print "<tr valign='top'><td>";
print "<font color='#99CC00' size='5'><b>".FTITLE_EDIT_PATIENT."</b></font>";
print "</td></tr>";
} else {
print "<tr valign='top'><td>";
print "<font color='#99CC00' size='5'><b>".FTITLE_NEW_PATIENT."</b></font>";
print "</td></tr>";
print "<tr valign='top'><td>";
print "<b>NOTE: This form is for new patients.</b><br><br>";
print "</td></tr>";
}
if ($get_vars["patient_id"]) {
print "<tr valign='top'><td>";
print "<span class='boxtitle'>".LBL_REGISTRATION_DATE."</span><br> ";
print $patient["registration_date"]."<br/>";
print "</td></tr>";
print "<tr valign='top'><td>";
print "<span class='boxtitle'>".LBL_REGISTERED_BY."</span><br> ";
print user::get_username($patient["user_id"])."<br/>";
print "</td></tr>";
}
print "<tr valign='top'><td>";
print "<span class='boxtitle'>".LBL_FIRST_NAME."</span><br> ";
print "<input type='text' class='textbox' name='patient_firstname' value='".($patient["patient_firstname"]?$patient["patient_firstname"]:$post_vars["patient_firstname"])."' style='border: 1px solid #000000'><br>";
print "</td></tr>";
print "<tr valign='top'><td>";
print "<span class='boxtitle'>".LBL_MIDDLE_NAME."</span><br> ";
print "<input type='text' class='textbox' name='patient_middle' value='".($patient["patient_middle"]?$patient["patient_middle"]:$post_vars["patient_middle"])."' style='border: 1px solid #000000'><br>";
print "</td></tr>";
print "<tr valign='top'><td>";
print "<span class='boxtitle'>".LBL_LAST_NAME."</span><br> ";
print "<input type='text' class='textbox' name='patient_lastname' value='".($patient["patient_lastname"]?$patient["patient_lastname"]:$post_vars["patient_lastname"])."' style='border: 1px solid #000000'><br>";
print "</td></tr>";
print "<tr valign='top'><td>";
print "<span class='boxtitle'>".LBL_MOTHERS_NAME."</span><br> ";
print "<input type='text' size='30' class='textbox' ".($_SESSION["isadmin"]||!$get_vars["patient_id"]?"":"disabled")." name='patient_mother' value='".($patient["patient_mother"]?$patient["patient_mother"]:$post_vars["patient_mother"])."' style='border: 1px solid #000000'><br>";
print "</td></tr>";
print "<tr valign='top'><td>";
print "<span class='boxtitle'>".LBL_PATIENT_DOB."</span><br> ";
if ($patient["patient_dob"]) {
// convert to external format
list($year, $month, $day) = explode("-", $patient["patient_dob"]);
$dob = "$month/$day/$year";
}
print "<input type='text' size='10' maxlength='10' class='textbox' name='patient_dob' value='".($dob?$dob:$post_vars["patient_dob"])."' style='border: 1px solid #000000'><br>";
print "<small>Use format MM/DD/YYYY.</small>";
print "</td></tr>";
print "<tr valign='top'><td>";
print "<span class='boxtitle'>".LBL_GENDER."</span><br> ";
print "<select name='patient_gender' ".($get_vars["patient_id"]?'disabled':'')." class='textbox'>";
print "<option ".($patient["patient_gender"]=='M'?'selected':'')." value='M'>Male</option>";
print "<option ".($patient["patient_gender"]=='F'?'selected':'')." value='F'>Female</option>";
print "<option ".($patient["patient_gender"]=='I'?'selected':'')." value='I'>Indeterminate</option>";
print "</select>";
if ($patient["patient_gender"]) {
print "<input type='hidden' name='patient_gender' value='".$patient["patient_gender"]."' />";
}
print "</td></tr>";
print "<tr><td>";
if ($get_vars["patient_id"]) {
print "<input type='hidden' name='patient_id' value='".$get_vars["patient_id"]."'>";
if ($_SESSION["priv_update"]) {
print "<input type='submit' value = 'Update Patient' class='textbox' name='submitpatient' style='border: 1px solid #000000'> ";
}
if ($_SESSION["priv_delete"]) {
print "<input type='submit' value = 'Delete Patient' class='textbox' name='submitpatient' style='border: 1px solid #000000'> ";
}
} else {
if ($_SESSION["priv_add"]) {
print "<br><input type='submit' value = 'Add Patient' class='textbox' name='submitpatient' style='border: 1px solid #000000'><br> ";
//.........这里部分代码省略.........