function display_service_record() { 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 "<br/>"; print "<b>".FTITLE_SERVICE_RECORD."</b><br/>"; $patient_id = healthcenter::get_patient_id($get_vars["consult_id"]); $sql = "select mc_id, service_id, date_format(mc_timestamp,'%a %d %b %Y') service_date, mc_timestamp,actual_service_date, date_format(actual_service_date,'%a %d %b %Y') actual_sdate, service_qty ". "from m_consult_mc_services ". "where patient_id = '$patient_id' order by service_id, actual_service_date desc"; if ($result = mysql_query($sql)) { if (mysql_num_rows($result)) { while (list($cid, $service, $sdate, $ts, $actual_service_date, $actual_sdate, $qty) = mysql_fetch_array($result)) { print "<img src='../images/arrow_redwhite.gif' border='0'/> "; $disp_date = ($actual_service_date=='0000-00-00')?$sdate:$actual_sdate; 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=mc&mc=SVC&service_id=$service&sts=$ts&mc_id=$cid&actual_vdate=$actual_service_date#service' name='service'>".mc::get_service_name($service)." ($qty)</a> $disp_date<br/>"; if ($get_vars["service_id"]==$service && $get_vars["actual_vdate"]==$actual_service_date && $get_vars["sts"]==$ts) { mc::display_service_record_details($menu_id, $post_vars, $get_vars); } } } else { print "<font color='red'>No records</font><br/>"; } } }