} ?> <form method="POST" action="<?php echo $PHP_SELF; ?> "> <p>╝┘щ╗ш╟┬╣═б ╦┴╥┬р┼в HN (ф┤щи╥бс╝╣бр╟к├╨р║╒┬╣)</p> <p> HN <input type="text" name="hn" size="8"></p> <p> <input type="submit" value=" ╡б┼з " name="B1"></p> </form> <?php if (!empty($hn)) { include "connect.inc"; $today = date("d-m-Y"); $d = substr($today, 0, 2); $m = substr($today, 3, 2); $yr = substr($today, 6, 4) + 543; $thdatehn = $d . '-' . $m . '-' . $yr . $hn; $query = "SELECT hn, concat(yot,' ',name,' ',surname) as ptname, ptright FROM opcard WHERE hn = '{$hn}' limit 1 "; $result = mysql_query($query) or die(Mysql_Error()); list($xxx, $yyy, $zzz) = Mysql_fetch_row($result); print "HN :{$xxx}<br>"; print "{$yyy}<br>"; print "╩╘╖╕╘б╥├├╤б╔╥ :{$zzz}"; print "<br><a href='clinic100diag.php?hn=" . $xxx . "'>!к╫ш═╢┘б╡щ═з ╖╙├╥┬б╥├╡ш═ф╗</a>"; include "unconnect.inc"; } ?>
$where1 = " where `lock` = 'Y' "; }else if((substr($_SESSION["ptright_now"],0,3) == "R03" )){ $where1 = " where `lockptright` != 'Y' "; }else{ $where1 = ""; } $sql = " SELECT a.date, a.drugcode, a.tradname, a.slcode, sum( a.amount ) AS amount, a.reason, a.part, a.drug_inject_amount,a.drug_inject_unit,a.drug_inject_amount2,a.drug_inject_unit2 ,a.drug_inject_time, a.drug_inject_slip , a.drug_inject_type, a.drug_inject_etc, a.part,b.lock_dr FROM drugrx as a INNER JOIN (Select `drugcode`,`lock_dr` From druglst ".$where1.") as b ON a.drugcode = b.drugcode WHERE a.hn = '".$_SESSION["hn_now"]."' AND a.date like '".$_GET["date_remed"]."%' AND a.drugcode <> 'INJ' AND a.row_id not in (Select row_id From drugrx_notinj) GROUP BY a.drugcode, a.slcode HAVING sum( a.amount ) >0 "; $result = Mysql_Query($sql) or die(Mysql_Error()); $i=0; $j=0; while($arr = Mysql_fetch_assoc($result)){ $arr["reason"] = ""; if($arr["part"] == "DDY" && $arr["reason"] == ""){ //$arr["reason"] = "ДаХауйы╣цбр╧уИЦ╧╨я╜╙убр ED"; } if(($arr["drugcode"][0] == "0" || $arr["drugcode"][0] == "0") && !(ord($arr["drugcode"][1]) >= 48 && ord($arr["drugcode"][1]) <= 57 )){ continue; } if($i%2==0) $bgcolor="#FFFF99"; else
$result = mysql_query($sqltel); $sql = "INSERT INTO appoint(date,officer,hn,ptname,age,doctor,appdate,apptime,room,\ndetail,detail2,advice,patho,xray,other,depcode,labextra)\n\n\tVALUES('{$Thidate}','{$sOfficer}','{$cHn}','{$cPtname}','{$cAge}','{$cdoctor}','{$appd}','{$capptime}',\n\n\t'{$room}','{$detail}','" . jschars($detail2) . "','{$advice}','{$pathoall}','{$xrayall}','" . jschars($other) . "','{$depcode}','" . jschars($labm) . "');"; $result = mysql_query($sql); $idno = mysql_insert_id(); $count = count($_SESSION["list_code"]); if ($count > 0) { $sql = "INSERT INTO `appoint_lab` ( `id` , `code` ) VALUES "; $list = array(); for ($n = 0; $n < $count; $n++) { if (!empty($_SESSION["list_code"][$n])) { $q = "('" . $idno . "', '" . $_SESSION["list_code"][$n] . "') "; array_push($list, $q); } } $sql .= implode(", ", $list); $result = Mysql_Query($sql) or die("Error appoint_lab " . Mysql_Error()); $patho = implode(", ", $_SESSION["list_code"]); } $pathoall = $patho . ' ' . $patho2; // echo mysql_errno() . ": " . mysql_error(). "\n"; // echo "<br>"; //�����㺹Ѵ //////////////////////// $exm = explode(" ", $appd); $d1 = $exm[0]; $m1 = trim($exm[1]); $y1 = $exm[2] - 543; $arr1 = array("���Ҥ�" => "01", "����Ҿѹ��" => "02", "�չҤ�" => "03", "����¹" => "04", "����Ҥ�" => "05", "�Զع�¹" => "06", "�á�Ҥ�" => "07", "�ԧ�Ҥ�" => "08", "�ѹ��¹" => "09", "���Ҥ�" => "10", "��Ȩԡ�¹" => "11", "�ѹ�Ҥ�" => "12"); $appday = $y1 . '-' . $arr1[$m1] . '-' . $d1; $DayOfWeek = date("w", strtotime($appday)); // echo $DayOfWeek;
If (!empty($_SESSION["list_code"][$n])){ $q = "('$Thidate','$cAn','".$_SESSION["list_code"][$n]."','$cDepart','".$_SESSION["list_detail"][$n]."','1','".$price[$n]."','$sOfficer','$aPart[$n]','$cAccno','$idno') "; array_push($list,$q); } } if($n > 0){ $sql .= implode(", ",$list); $result = Mysql_Query($sql) or die("Error ipacc ".Mysql_Error()); } } $pathopri=$Netprice; $sql ="UPDATE opday SET patho=patho+".$pathopri." WHERE thdatehn= '".$Thdhn."' AND vn = '".$tvn."' "; $result = Mysql_Query($sql) or die("Error update opday ".Mysql_Error()); echo " <html> <head> <SCRIPT LANGUAGE=\"JavaScript\"> window.onload = function(){ setTimeout(\"window.location.href='er_stiker_lab.php?hn=".$cHn."&p1=true&p2=true';\",1000); } </SCRIPT> </head> <body leftmargin=\"0\" topmargin=\"0\"> <BR><CENTER>Loading....</CENTER> </body> </html>
public function GetError() { #------------------------------------------------------------------------------- if (!Is_Resource($this->Link)) { return ERROR | @Trigger_Error('[MySQL->GetError]: нет соединения с MySQL'); } #------------------------------------------------------------------------------- return Mysql_Error($this->Link); #------------------------------------------------------------------------------- }
function updatetb() { $sql = "Select count(hn) From refer Where trauma_id = '" . $this->id . "' limit 1 "; $result = Mysql_Query($sql); $arr = Mysql_fetch_row($result); if ($arr[0] > 0) { $sql = "Update `refer` set `hn` = '" . $this->hn . "' ,`an` = '" . $this->an . "' ,`clinic` = '" . $this->clinic . "' ,`referh` = '" . $this->referh . "' ,`refertype` = '" . $this->refertype . "' ,`dateopd` = '" . $this->dateopd . "' ,`name` = '" . $this->name . "' ,`sname` = '" . $this->sname . "' ,`idcard` = '" . $this->idcard . "' ,`pttype` = '" . $this->pttype . "' ,`diag` = '" . $this->diag . "' ,`ptnote` = '" . $this->ptnote . "' ,`exrefer` = '" . $this->exrefer . "' ,`refercar` = '" . $this->refercar . "' ,`office` = '" . $this->office . "' ,`doctor` = '" . $this->doctor . "', ward = '" . $this->ward . "', trauma_id = '" . $this->id . "', age='" . $this->age . "',type_wound='" . $this->type_wound . "',time_refer='" . $this->time_refer . "', problem_refer = '" . $this->problem_refer . "', `officer` = '" . $_SESSION["sOfficer"] . "', `target_refer` = '" . $this->targe . "' Where trauma_id = '" . $this->id . "' AND ward = '" . $this->ward . "' "; Mysql_Query($sql) or die(Mysql_Error()); } else { $this->inserttb(); } }
IF (!empty($cAn)) { $sql = "INSERT INTO ipacc(date,an,code,depart,detail,amount,price,idname,part,accno,idno)VALUES "; $list = array(); for ($n=0; $n<$item; $n++){ If (!empty($_SESSION["list_code"][$n])){ $q = "('$Thidate','$cAn','".$_SESSION["list_code"][$n]."','$cDepart','".$_SESSION["list_detail"][$n]."','1','".$price[$n]."','".$_SESSION["dt_doctor"]."','$aPart[$n]','$cAccno','$idno') "; array_push($list,$q); } } if($n > 0){ $sql .= implode(", ",$list); $result = Mysql_Query($sql) or die("Error ipacc ".Mysql_Error()); } } $pathopri=$Netprice; //$sql ="UPDATE opday SET patho=patho+".$pathopri." WHERE thdatehn= '".$Thdhn."' AND vn = '".$tvn."' "; //$result = Mysql_Query($sql) or die("Error update opday ".Mysql_Error()); echo "<html><head> <SCRIPT LANGUAGE=\"JavaScript\"> window.onload = function(){ //window.print(); setTimeout(\"window.location.href='".$first_page."';\",8000); } </SCRIPT> </head>