Esempio n. 1
0
		}
	}
	else{
		echo "0";
	}
exit();
}

//////////////////////////// checkviat //////////////////////////////////

if(isset($_GET["action"]) && $_GET["action"] == "viatcheck"){
	$count = count($_SESSION["list_drugcode"]);
	for($i=0;$i<$count;$i++){
		if($_SESSION["list_drugcode"][$i]=="5VIAT"&&$_SESSION["list_drug_reason"][$i]!="F ╪ыИ╩ХгбАй╢╖╓гра╗с╧╖╣Им╖║рц (Ю╨т║ДаХД╢И)"){
			$sqlquery = "select * from drug_gruco where hn='".$_SESSION['hn_now']."' and dateup like '".date("d-m-Y")."%'";
			$resultq = Mysql_Query($sqlquery) or die(Mysql_ERROR());
			$arrq = mysql_num_rows($resultq);
			if($arrq=='0'){
				echo "0";
			}else{
				echo "1";
			}
		}
	}
exit();
}

//******************************************** ╣цг╗йм╨╗с╧г╧бр *****************************
if(isset($_GET["action"]) && $_GET["action"] == "checkdrugamount"){
	if((substr($_SESSION["ptright_now"],0,3) == "R07"  || substr($_SESSION["ptright_now"],0,3) == "R09"  )){
	$sql = "SELECT limit_pay, limit_ptright FROM `druglst` where drugcode='".$_GET["chkdrugcode"]."'";
Esempio n. 2
0
	
	list($limit_row) = mysql_fetch_row(mysql_query($sql));
	
	if($limit_row > 30)
		$limit_row = 30;

	$sql = "CREATE TEMPORARY TABLE drugrx2 Select slcode, drugcode, amount From  `drugrx` where drugcode = '".$_GET["search"]."' Order by row_id DESC  limit ".$limit_row;
	$result = Mysql_Query($sql);

	$sql = "SELECT amount, count( amount ) FROM `drugrx2` where amount > 0 GROUP BY amount Order by `count( amount )` DESC limit 1";
	$result = Mysql_Query($sql);
	$arr = Mysql_fetch_assoc($result);
	echo $arr["amount"].",";

	$sql = "SELECT slcode , count(slcode) FROM `drugrx2` where  amount > 0 AND slcode != 'er' AND slcode != 'hd'  GROUP BY slcode  Order by `count(slcode)` DESC limit 1";
	$result = Mysql_Query($sql) or die(Mysql_ERROR());
	$arr = Mysql_fetch_assoc($result);
	echo $arr["slcode"];
	

	$sql = "Select part From druglst Where drugcode = '".$_GET["search"]."' limit 1 ";
	$result = Mysql_Query($sql);
	list($part) = Mysql_fetch_row($result);
	echo ",".$part;
	exit();
}
####  ####
//**********************************************************************************************
?>
<html>
<head>