function display_ntp_followups() { // // contents of table m_consult_ntp_intake_intensive // 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_ntp = "select ntp_id, patient_id, date_format(treatment_date, '%a %d %b %Y'), intake_flag " . "from m_consult_ntp_intake_intensive " . "where ntp_id = '" . $get_vars["ntp_id"] . "' " . "order by treatment_date desc"; if ($result_ntp = mysql_query($sql_ntp)) { if (mysql_num_rows($result_ntp)) { print "<table width='300' bgcolor='#FFFFCC' style='border: 1px dotted black'><tr><td>"; while (list($nid, $pid, $regdate, $intake) = mysql_fetch_array($result_ntp)) { if ($prev_nid != $nid) { print "REGISTRY NO: {$nid} INTENSIVE<br/>"; } print "<img src='../images/arrow_redwhite' border='0'/> "; print "<a href='" . $_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"] . "&ntp=" . $get_vars["ntp"] . "&ffup_ntp_id={$nid}'>{$regdate}</a> " . ($intake == "Y" ? "<font color='blue'>success</font>" : "<font color='red'>fail</font>") . "<br/>"; if ($get_vars["ffup_ntp_id"] && $get_vars["ffup_ntp_id"] == $nid) { ntp::display_course($menu_id, $post_vars, $get_vars); } $prev_nid = $nid; } print "</td></tr></table>"; } else { print "<font color='red'>No records</font><br/>"; } } }