<?php
session_start();                      
$username=$_SESSION['username'] ?? '';
$password=$_SESSION['password'] ?? '';
$trttype=$_GET['trttype'] ?? '';


$chn = $_POST['chn'] ?? '';
$cyc_no = $_POST['cyc_no'] ?? '';
$don_no = $_POST['don_no'] ?? '';
//$semen_id=$_GET['semen_no'];
$semen_id=sprintf("%06d", $_GET['semen_no'] ?? '');
$xnm=$_GET['xnm'] ?? '';
$deptt="4";
$chn = stripslashes($chn);
$cyc_no = stripslashes($cyc_no);
$deptt = stripslashes($deptt);
$xcyc_no=$chn.".".$cyc_no;
//$don_no = explode('.',stripslashes($don_no));
//$don_no_x=$don_no[0];
include 'dbcon.php'; 
$ptpass=md5($password);
$query  = "SELECT * FROM matcher_usermst WHERE nif_usr='$username' AND nif_pass='$ptpass' AND act_vate='1'";
$result = mysql_query($query);
$login_check = mysql_num_rows($result);
$xadmnchk = '';
while($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
$clint_code = $row["clint_code"];
$xadmnchk=$row["dept_x"];
echo $clint_code;
}
//$query  = "SELECT category FROM matcher_proces where pid='0'";
//$result = mysql_query($query);
//while ($row=mysql_fetch_array($result)) { 
//$prod_desc=$row["category"]; 
//$prod_desc_x.="<OPTION VALUE=\"$prod_desc\">".$prod_desc;
//}
	$result = mysql_query("SELECT * FROM matcher_tag_gen where chn_cycle like '%$xcyc_no%' and p_mark='1' order by ent_no DESC") ;
	$numrows=mysql_num_rows($result);
		while($row=mysql_fetch_array($result)) 
		{
		$xproc_mainid_splt_first=explode(':',$row['process_main_id'])[0];

			if(strpos($xproc_mainid_splt_first, 'a1') !== false){
			$resulta1 = mysql_query("SELECT process_main_id FROM matcher_tag_gen where chn_cycle like '%$xcyc_no%' and grpbypid='a1' and p_mark='1' order by ent_no DESC limit 1") ;
				while($rowa1=mysql_fetch_array($resulta1)) 
				{
				$xproc_mainid_splt_a1_nos=explode('b',$rowa1['process_main_id'])[1];
				}
			}elseif(strpos($xproc_mainid_splt_first, 'a2') !== false){
			$resulta2 = mysql_query("SELECT process_main_id FROM matcher_tag_gen where chn_cycle like '%$xcyc_no%' and grpbypid='a2' and p_mark='1' order by ent_no DESC limit 1") ;
				while($rowa2=mysql_fetch_array($resulta2)) 
				{
				$xproc_mainid_splt_a2_nos=explode('b',$rowa2['process_main_id'])[1];
				}
			}elseif(strpos($xproc_mainid_splt_first, 'a3') !== false){
			$resulta3 = mysql_query("SELECT process_main_id FROM matcher_tag_gen where chn_cycle like '%$xcyc_no%' and grpbypid='a3' and p_mark='1' order by ent_no DESC limit 1") ;
				while($rowa3=mysql_fetch_array($resulta3)) 
				{
				$xproc_mainid_splt_a3_nos=explode('b',$rowa3['process_main_id'])[1];
				}
			}elseif(strpos($xproc_mainid_splt_first, 'a4') !== false){
			$resulta4 = mysql_query("SELECT process_main_id FROM matcher_tag_gen where chn_cycle like '%$xcyc_no%' and grpbypid='a4' and p_mark='1' order by ent_no DESC limit 1") ;
				while($rowa4=mysql_fetch_array($resulta4)) 
				{
				$xproc_mainid_splt_a4_nos=explode('b',$rowa4['process_main_id'])[1];
				}
			}else{
			$xproc_mainid_splt_a1_nos=0;
			$xproc_mainid_splt_a2_nos=0;
			$xproc_mainid_splt_a3_nos=0;
			$xproc_mainid_splt_a4_nos=0;
			}
		

		}
?>
<!DOCTYPE HTML>
<html>
	<head>
<style type="text/css">
INPUT { margin-right: 1em }
body {
background: #666666;
}
</style>
<link href="../style.css" rel="stylesheet" type="text/css" />
<link href="style_btn.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js_button.js"></script>

<style>
  #foo {
    position: fixed;
    top: -100000px;
  }
</style>

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"></script>

</head>
<body>
<div id="staticParent" align="center">
<h3><strong>Process RFID tag geeneration <br><br>Patient: <?php echo $xnm;?></strong></h3><br>
</div>
<?php

if($deptt=="4" || $deptt=="1"){

			$xyzcyc_no=explode('.',$xcyc_no)[1];
			//$resultx = mysql_query("SELECT * FROM matcher_trans where chn='$chn' and chn_cycle='$semen_id' and witns1pnt=2");
			$resultx = mysql_query("SELECT * FROM matcher_trans where (chn='$chn' or chn_semen='$chn') and witns1pnt=2");
			$login_checkx = mysql_num_rows($resultx);
			if($login_checkx > 0){
			$preicsi="1";
			}else{
			$preicsi="";
			}
$result = mysql_query("SELECT * FROM matcher_tag_gen where chn_cycle='$xcyc_no' and grpbypid='a1' order by ent_no desc limit 1");
$login_check = mysql_num_rows($result);
if($login_check > 0){
while($row=mysql_fetch_array($result)) 
{
if($row['process_main_id']=="a1:b01"){
		echo "<a href='#' class='btn-two gray large'>Pool dish (35mm Dish)</a>";
		echo "<a href='gentxtfl-process-btns.php?deprtmnt=$deptt&sub1_xx=a1:b02&cyc_no=$cyc_no&orgin_chn=$chn&don_chn=$don_no&semen_id=$semen_id' class='btn-two green large'>Post Denudation dish (60 mm Dish)</a>";
		//echo "<a href='gentxtfl-process-btns.php?deprtmnt=$deptt&sub1_xx=a1:b03&cyc_no=$cyc_no&orgin_chn=$chn&don_chn=$don_no&semen_id=$semen_id' class='btn-two green large'>ICSI Dish</a>";
		//echo "<a href='gentxtfl-process-btns.php?deprtmnt=$deptt&sub1_xx=a1:b04&cyc_no=$cyc_no&orgin_chn=$chn&don_chn=$don_no&semen_id=$semen_id' class='btn-two green large'>Fert dish (D0)</a>";
		//echo "<a href='gentxtfl-process-btns.php?deprtmnt=$deptt&sub1_xx=a1:b05&cyc_no=$cyc_no&orgin_chn=$chn&don_chn=$don_no&semen_id=$semen_id' class='btn-two green large'>Cleave dish (D1)</a>";
		//echo "<a href='gentxtfl-process-btns.php?deprtmnt=$deptt&sub1_xx=a1:b06&cyc_no=$cyc_no&orgin_chn=$chn&don_chn=$don_no&semen_id=$semen_id' class='btn-two green large'>Blast Dish(D3)</a>";
		//echo "<a href='gentxtfl-process-btns.php?deprtmnt=$deptt&sub1_xx=a1:b07&cyc_no=$cyc_no&orgin_chn=$chn&don_chn=$don_no&semen_id=$semen_id' class='btn-two green large'>Blast Dish(D5/6)</a>";
		//echo "<a href='gentxtfl-process-btns.php?deprtmnt=$deptt&sub1_xx=a1:b08&cyc_no=$cyc_no&orgin_chn=$chn&don_chn=$don_no&semen_id=$semen_id' class='btn-two green large'>ET Dish</a>";
		//echo "<a href='gentxtfl-process-btns.php?deprtmnt=$deptt&sub1_xx=a1:b09&cyc_no=$cyc_no&orgin_chn=$chn&don_chn=$don_no&semen_id=$semen_id' class='btn-two green large'>PGT Biopsy Dish</a>";
		//echo "<a href='gentxtfl-process-btns.php?deprtmnt=$deptt&sub1_xx=a1:b10&cyc_no=$cyc_no&orgin_chn=$chn&don_chn=$don_no&semen_id=$semen_id' class='btn-two green large'>Post thaw culture dish</a>";

	}else if($row['process_main_id']=="a1:b02"){
		echo "<a href='#' class='btn-two gray large'>Pool dish (35mm Dish)</a>";
		echo "<a href='#' class='btn-two gray large'>Post Denudation dish (60 mm Dish)</a>";
	if($preicsi==="1"){
		echo "<a href='gentxtfl-process-btns.php?deprtmnt=$deptt&sub1_xx=a1:b03&cyc_no=$cyc_no&orgin_chn=$chn&don_chn=$don_no&semen_id=$semen_id' class='btn-two green large'>ICSI Dish</a>";
		echo "<a href='gentxtfl-process-btns.php?deprtmnt=$deptt&sub1_xx=a1:b04&cyc_no=$cyc_no&orgin_chn=$chn&don_chn=$don_no&semen_id=$semen_id' class='btn-two green large'>Fert dish (D0)</a>";
		echo "<a href='gentxtfl-process-btns.php?deprtmnt=$deptt&sub1_xx=a1:b05&cyc_no=$cyc_no&orgin_chn=$chn&don_chn=$don_no&semen_id=$semen_id' class='btn-two green large'>Cleave dish (D1)</a>";
		echo "<a href='gentxtfl-process-btns.php?deprtmnt=$deptt&sub1_xx=a1:b06&cyc_no=$cyc_no&orgin_chn=$chn&don_chn=$don_no&semen_id=$semen_id' class='btn-two green large'>Blast Dish(D3)</a>";
		echo "<a href='gentxtfl-process-btns.php?deprtmnt=$deptt&sub1_xx=a1:b07&cyc_no=$cyc_no&orgin_chn=$chn&don_chn=$don_no&semen_id=$semen_id' class='btn-two green large'>Blast Dish(D5/6)</a>";
		echo "<a href='gentxtfl-process-btns.php?deprtmnt=$deptt&sub1_xx=a1:b08&cyc_no=$cyc_no&orgin_chn=$chn&don_chn=$don_no&semen_id=$semen_id' class='btn-two green large'>ET Dish</a>";
		echo "<a href='gentxtfl-process-btns.php?deprtmnt=$deptt&sub1_xx=a1:b09&cyc_no=$cyc_no&orgin_chn=$chn&don_chn=$don_no&semen_id=$semen_id' class='btn-two green large'>PGT Biopsy Dish</a>";
		echo "<a href='gentxtfl-process-btns.php?deprtmnt=$deptt&sub1_xx=a1:b10&cyc_no=$cyc_no&orgin_chn=$chn&don_chn=$don_no&semen_id=$semen_id' class='btn-two green large'>Post thaw culture dish</a>";
	}else{
	echo "<a href='#' class='btn-two yellow large'>ICSI Dish</a>";
	echo "<a href='#' class='btn-two yellow large'>Fert dish (D0)</a>";
	echo "<a href='#' class='btn-two yellow large'>Cleave dish (D1)</a>";
	echo "<a href='#' class='btn-two yellow large'>Blast Dish(D3)</a>";
	echo "<a href='#' class='btn-two yellow large'>Blast Dish(D5/6)</a>";
	echo "<a href='#' class='btn-two yellow large'>ET Dish</a>";
	echo "<a href='#' class='btn-two yellow large'>PGT Biopsy Dish</a>";
	echo "<a href='#' class='btn-two yellow large'>Post thaw culture dish</a>";
	}

	}else if($row['process_main_id']=="a1:b03"){
		echo "<a href='#' class='btn-two gray large'>Pool dish (35mm Dish)</a>";
		echo "<a href='#' class='btn-two gray large'>Post Denudation dish (60 mm Dish)</a>";
		echo "<a href='#' class='btn-two gray large'>ICSI Dish</a>";
	if($preicsi==="1"){
		echo "<a href='gentxtfl-process-btns.php?deprtmnt=$deptt&sub1_xx=a1:b04&cyc_no=$cyc_no&orgin_chn=$chn&don_chn=$don_no&semen_id=$semen_id' class='btn-two green large'>Fert dish (D0)</a>";
		echo "<a href='gentxtfl-process-btns.php?deprtmnt=$deptt&sub1_xx=a1:b05&cyc_no=$cyc_no&orgin_chn=$chn&don_chn=$don_no&semen_id=$semen_id' class='btn-two green large'>Cleave dish (D1)</a>";
		echo "<a href='gentxtfl-process-btns.php?deprtmnt=$deptt&sub1_xx=a1:b06&cyc_no=$cyc_no&orgin_chn=$chn&don_chn=$don_no&semen_id=$semen_id' class='btn-two green large'>Blast Dish(D3)</a>";
		echo "<a href='gentxtfl-process-btns.php?deprtmnt=$deptt&sub1_xx=a1:b07&cyc_no=$cyc_no&orgin_chn=$chn&don_chn=$don_no&semen_id=$semen_id' class='btn-two green large'>Blast Dish(D5/6)</a>";
		echo "<a href='gentxtfl-process-btns.php?deprtmnt=$deptt&sub1_xx=a1:b08&cyc_no=$cyc_no&orgin_chn=$chn&don_chn=$don_no&semen_id=$semen_id' class='btn-two green large'>ET Dish</a>";
		echo "<a href='gentxtfl-process-btns.php?deprtmnt=$deptt&sub1_xx=a1:b09&cyc_no=$cyc_no&orgin_chn=$chn&don_chn=$don_no&semen_id=$semen_id' class='btn-two green large'>PGT Biopsy Dish</a>";
		echo "<a href='gentxtfl-process-btns.php?deprtmnt=$deptt&sub1_xx=a1:b10&cyc_no=$cyc_no&orgin_chn=$chn&don_chn=$don_no&semen_id=$semen_id' class='btn-two green large'>Post thaw culture dish</a>";
	}else{
		echo "<a href='#' class='btn-two yellow large'>Fert dish (D0)</a>";
		echo "<a href='#' class='btn-two yellow large'>Cleave dish (D1)</a>";
		echo "<a href='#' class='btn-two yellow large'>Blast Dish(D3)</a>";
		echo "<a href='#' class='btn-two yellow large'>Blast Dish(D5/6)</a>";
		echo "<a href='#' class='btn-two yellow large'>ET Dish</a>";
		echo "<a href='#' class='btn-two yellow large'>PGT Biopsy Dish</a>";
		echo "<a href='#' class='btn-two yellow large'>Post thaw culture dish</a>";
	}


	}else if($row['process_main_id']=="a1:b04"){
		echo "<a href='#' class='btn-two gray large'>Pool dish (35mm Dish)</a>";
		echo "<a href='#' class='btn-two gray large'>Post Denudation dish (60 mm Dish)</a>";
		echo "<a href='#' class='btn-two gray large'>ICSI Dish</a>";
		echo "<a href='#' class='btn-two gray large'>Fert dish (D0)</a>";
			if($preicsi==="1"){
		echo "<a href='gentxtfl-process-btns.php?deprtmnt=$deptt&sub1_xx=a1:b05&cyc_no=$cyc_no&orgin_chn=$chn&don_chn=$don_no&semen_id=$semen_id' class='btn-two green large'>Cleave dish (D1)</a>";
		echo "<a href='gentxtfl-process-btns.php?deprtmnt=$deptt&sub1_xx=a1:b06&cyc_no=$cyc_no&orgin_chn=$chn&don_chn=$don_no&semen_id=$semen_id' class='btn-two green large'>Blast Dish(D3)</a>";
		echo "<a href='gentxtfl-process-btns.php?deprtmnt=$deptt&sub1_xx=a1:b07&cyc_no=$cyc_no&orgin_chn=$chn&don_chn=$don_no&semen_id=$semen_id' class='btn-two green large'>Blast Dish(D5/6)</a>";
		echo "<a href='gentxtfl-process-btns.php?deprtmnt=$deptt&sub1_xx=a1:b08&cyc_no=$cyc_no&orgin_chn=$chn&don_chn=$don_no&semen_id=$semen_id' class='btn-two green large'>ET Dish</a>";
		echo "<a href='gentxtfl-process-btns.php?deprtmnt=$deptt&sub1_xx=a1:b09&cyc_no=$cyc_no&orgin_chn=$chn&don_chn=$don_no&semen_id=$semen_id' class='btn-two green large'>PGT Biopsy Dish</a>";
		echo "<a href='gentxtfl-process-btns.php?deprtmnt=$deptt&sub1_xx=a1:b10&cyc_no=$cyc_no&orgin_chn=$chn&don_chn=$don_no&semen_id=$semen_id' class='btn-two green large'>Post thaw culture dish</a>";
		}else{
		echo "<a href='#' class='btn-two yellow large'>Cleave dish (D1)</a>";
		echo "<a href='#' class='btn-two yellow large'>Blast Dish(D3)</a>";
		echo "<a href='#' class='btn-two yellow large'>Blast Dish(D5/6)</a>";
		echo "<a href='#' class='btn-two yellow large'>ET Dish</a>";
		echo "<a href='#' class='btn-two yellow large'>PGT Biopsy Dish</a>";
		echo "<a href='#' class='btn-two yellow large'>Post thaw culture dish</a>";
		}

	}else if($row['process_main_id']=="a1:b05"){
		echo "<a href='#' class='btn-two gray large'>Pool dish (35mm Dish)</a>";
		echo "<a href='#' class='btn-two gray large'>Post Denudation dish (60 mm Dish)</a>";
		echo "<a href='#' class='btn-two gray large'>ICSI Dish</a>";
		echo "<a href='#' class='btn-two gray large'>Fert dish (D0)</a>";
		echo "<a href='#' class='btn-two gray large'>Cleave dish (D1)</a>";
			if($preicsi==="1"){
		echo "<a href='gentxtfl-process-btns.php?deprtmnt=$deptt&sub1_xx=a1:b06&cyc_no=$cyc_no&orgin_chn=$chn&don_chn=$don_no&semen_id=$semen_id' class='btn-two green large'>Blast Dish(D3)</a>";
		echo "<a href='gentxtfl-process-btns.php?deprtmnt=$deptt&sub1_xx=a1:b07&cyc_no=$cyc_no&orgin_chn=$chn&don_chn=$don_no&semen_id=$semen_id' class='btn-two green large'>Blast Dish(D5/6)</a>";
		echo "<a href='gentxtfl-process-btns.php?deprtmnt=$deptt&sub1_xx=a1:b08&cyc_no=$cyc_no&orgin_chn=$chn&don_chn=$don_no&semen_id=$semen_id' class='btn-two green large'>ET Dish</a>";
		echo "<a href='gentxtfl-process-btns.php?deprtmnt=$deptt&sub1_xx=a1:b09&cyc_no=$cyc_no&orgin_chn=$chn&don_chn=$don_no&semen_id=$semen_id' class='btn-two green large'>PGT Biopsy Dish</a>";
		echo "<a href='gentxtfl-process-btns.php?deprtmnt=$deptt&sub1_xx=a1:b10&cyc_no=$cyc_no&orgin_chn=$chn&don_chn=$don_no&semen_id=$semen_id' class='btn-two green large'>Post thaw culture dish</a>";
		}else{
		echo "<a href='#' class='btn-two yellow large'>Blast Dish(D3)</a>";
		echo "<a href='#' class='btn-two yellow large'>Blast Dish(D5/6)</a>";
		echo "<a href='#' class='btn-two yellow large'>ET Dish</a>";
		echo "<a href='#' class='btn-two yellow large'>PGT Biopsy Dish</a>";
		echo "<a href='#' class='btn-two yellow large'>Post thaw culture dish</a>";
		}

	}else if($row['process_main_id']=="a1:b06"){
		echo "<a href='#' class='btn-two gray large'>Pool dish (35mm Dish)</a>";
		echo "<a href='#' class='btn-two gray large'>Post Denudation dish (60 mm Dish)</a>";
		echo "<a href='#' class='btn-two gray large'>ICSI Dish</a>";
		echo "<a href='#' class='btn-two gray large'>Fert dish (D0)</a>";
		echo "<a href='#' class='btn-two gray large'>Cleave dish (D1)</a>";
		echo "<a href='#' class='btn-two gray large'>Blast Dish(D3)</a>";
			if($preicsi==="1"){
		echo "<a href='gentxtfl-process-btns.php?deprtmnt=$deptt&sub1_xx=a1:b07&cyc_no=$cyc_no&orgin_chn=$chn&don_chn=$don_no&semen_id=$semen_id' class='btn-two green large'>Blast Dish(D5/6)</a>";
		echo "<a href='gentxtfl-process-btns.php?deprtmnt=$deptt&sub1_xx=a1:b08&cyc_no=$cyc_no&orgin_chn=$chn&don_chn=$don_no&semen_id=$semen_id' class='btn-two green large'>ET Dish</a>";
		echo "<a href='gentxtfl-process-btns.php?deprtmnt=$deptt&sub1_xx=a1:b09&cyc_no=$cyc_no&orgin_chn=$chn&don_chn=$don_no&semen_id=$semen_id' class='btn-two green large'>PGT Biopsy Dish</a>";
		echo "<a href='gentxtfl-process-btns.php?deprtmnt=$deptt&sub1_xx=a1:b10&cyc_no=$cyc_no&orgin_chn=$chn&don_chn=$don_no&semen_id=$semen_id' class='btn-two green large'>Post thaw culture dish</a>";
		}else{
		echo "<a href='#' class='btn-two yellow large'>Blast Dish(D5/6)</a>";
		echo "<a href='#' class='btn-two yellow large'>ET Dish</a>";
		echo "<a href='#' class='btn-two yellow large'>PGT Biopsy Dish</a>";
		echo "<a href='#' class='btn-two yellow large'>Post thaw culture dish</a>";
		}

	}else if($row['process_main_id']=="a1:b07"){
		echo "<a href='#' class='btn-two gray large'>Pool dish (35mm Dish)</a>";
		echo "<a href='#' class='btn-two gray large'>Post Denudation dish (60 mm Dish)</a>";
		echo "<a href='#' class='btn-two gray large'>ICSI Dish</a>";
		echo "<a href='#' class='btn-two gray large'>Fert dish (D0)</a>";
		echo "<a href='#' class='btn-two gray large'>Cleave dish (D1)</a>";
		echo "<a href='#' class='btn-two gray large'>Blast Dish(D3)</a>";
		echo "<a href='#' class='btn-two gray large'>Blast Dish(D5/6)</a>";
				if($preicsi==="1"){
		echo "<a href='gentxtfl-process-btns.php?deprtmnt=$deptt&sub1_xx=a1:b08&cyc_no=$cyc_no&orgin_chn=$chn&don_chn=$don_no&semen_id=$semen_id' class='btn-two green large'>ET Dish</a>";
		echo "<a href='gentxtfl-process-btns.php?deprtmnt=$deptt&sub1_xx=a1:b09&cyc_no=$cyc_no&orgin_chn=$chn&don_chn=$don_no&semen_id=$semen_id' class='btn-two green large'>PGT Biopsy Dish</a>";
		echo "<a href='gentxtfl-process-btns.php?deprtmnt=$deptt&sub1_xx=a1:b10&cyc_no=$cyc_no&orgin_chn=$chn&don_chn=$don_no&semen_id=$semen_id' class='btn-two green large'>Post thaw culture dish</a>";
		}else{
		echo "<a href='#' class='btn-two yellow large'>ET Dish</a>";
		echo "<a href='#' class='btn-two yellow large'>PGT Biopsy Dish</a>";
		echo "<a href='#' class='btn-two yellow large'>Post thaw culture dish</a>";
		}

	}else if($row['process_main_id']=="a1:b08"){
		echo "<a href='#' class='btn-two gray large'>Pool dish (35mm Dish)</a>";
		echo "<a href='#' class='btn-two gray large'>Post Denudation dish (60 mm Dish)</a>";
		echo "<a href='#' class='btn-two gray large'>ICSI Dish</a>";
		echo "<a href='#' class='btn-two gray large'>Fert dish (D0)</a>";
		echo "<a href='#' class='btn-two gray large'>Cleave dish (D1)</a>";
		echo "<a href='#' class='btn-two gray large'>Blast Dish(D3)</a>";
		echo "<a href='#' class='btn-two gray large'>Blast Dish(D5/6)</a>";
		echo "<a href='#' class='btn-two gray large'>ET Dish</a>";
				if($preicsi==="1"){
		echo "<a href='gentxtfl-process-btns.php?deprtmnt=$deptt&sub1_xx=a1:b09&cyc_no=$cyc_no&orgin_chn=$chn&don_chn=$don_no&semen_id=$semen_id' class='btn-two green large'>PGT Biopsy Dish</a>";
		echo "<a href='gentxtfl-process-btns.php?deprtmnt=$deptt&sub1_xx=a1:b10&cyc_no=$cyc_no&orgin_chn=$chn&don_chn=$don_no&semen_id=$semen_id' class='btn-two green large'>Post thaw culture dish</a>";
		}else{
		echo "<a href='#' class='btn-two yellow large'>PGT Biopsy Dish</a>";
		echo "<a href='#' class='btn-two yellow large'>Post thaw culture dish</a>";
		}

	}else if($row['process_main_id']=="a1:b09"){
		echo "<a href='#' class='btn-two gray large'>Pool dish (35mm Dish)</a>";
		echo "<a href='#' class='btn-two gray large'>Post Denudation dish (60 mm Dish)</a>";
		echo "<a href='#' class='btn-two gray large'>ICSI Dish</a>";
		echo "<a href='#' class='btn-two gray large'>Fert dish (D0)</a>";
		echo "<a href='#' class='btn-two gray large'>Cleave dish (D1)</a>";
		echo "<a href='#' class='btn-two gray large'>Blast Dish(D3)</a>";
		echo "<a href='#' class='btn-two gray large'>Blast Dish(D5/6)</a>";
		echo "<a href='#' class='btn-two gray large'>ET Dish</a>";
		echo "<a href='#' class='btn-two gray large'>PGT Biopsy Dish</a>";
				if($preicsi==="1"){
		echo "<a href='gentxtfl-process-btns.php?deprtmnt=$deptt&sub1_xx=a1:b10&cyc_no=$cyc_no&orgin_chn=$chn&don_chn=$don_no&semen_id=$semen_id' class='btn-two green large'>Post thaw culture dish</a>";
		}else{
		echo "<a href='#' class='btn-two yellow large'>Post thaw culture dish</a>";
		}

	}else if($row['process_main_id']=="a1:b10"){
		echo "<a href='#' class='btn-two gray large'>Pool dish (35mm Dish)</a>";
		echo "<a href='#' class='btn-two gray large'>Post Denudation dish (60 mm Dish)</a>";
		echo "<a href='#' class='btn-two gray large'>ICSI Dish</a>";
		echo "<a href='#' class='btn-two gray large'>Fert dish (D0)</a>";
		echo "<a href='#' class='btn-two gray large'>Cleave dish (D1)</a>";
		echo "<a href='#' class='btn-two gray large'>Blast Dish(D3)</a>";
		echo "<a href='#' class='btn-two gray large'>Blast Dish(D5/6)</a>";
		echo "<a href='#' class='btn-two gray large'>ET Dish</a>";
		echo "<a href='#' class='btn-two gray large'>PGT Biopsy Dish</a>";
		echo "<a href='#' class='btn-two gray large'>Post thaw culture dish</a>";
	}
	} //while loop over
	}else{ // count loop over
	if($preicsi==="1"){
		echo "<a href='gentxtfl-process-btns.php?deprtmnt=$deptt&sub1_xx=a1:b03&cyc_no=$cyc_no&orgin_chn=$chn&don_chn=$don_no&semen_id=$semen_id' class='btn-two green large'>ICSI Dish</a>";
		echo "<a href='gentxtfl-process-btns.php?deprtmnt=$deptt&sub1_xx=a1:b04&cyc_no=$cyc_no&orgin_chn=$chn&don_chn=$don_no&semen_id=$semen_id' class='btn-two green large'>Fert dish (D0)</a>";
		echo "<a href='gentxtfl-process-btns.php?deprtmnt=$deptt&sub1_xx=a1:b05&cyc_no=$cyc_no&orgin_chn=$chn&don_chn=$don_no&semen_id=$semen_id' class='btn-two green large'>Cleave dish (D1)</a>";
		echo "<a href='gentxtfl-process-btns.php?deprtmnt=$deptt&sub1_xx=a1:b06&cyc_no=$cyc_no&orgin_chn=$chn&don_chn=$don_no&semen_id=$semen_id' class='btn-two green large'>Blast Dish(D3)</a>";
		echo "<a href='gentxtfl-process-btns.php?deprtmnt=$deptt&sub1_xx=a1:b07&cyc_no=$cyc_no&orgin_chn=$chn&don_chn=$don_no&semen_id=$semen_id' class='btn-two green large'>Blast Dish(D5/6)</a>";
		echo "<a href='gentxtfl-process-btns.php?deprtmnt=$deptt&sub1_xx=a1:b08&cyc_no=$cyc_no&orgin_chn=$chn&don_chn=$don_no&semen_id=$semen_id' class='btn-two green large'>ET Dish</a>";
		echo "<a href='gentxtfl-process-btns.php?deprtmnt=$deptt&sub1_xx=a1:b09&cyc_no=$cyc_no&orgin_chn=$chn&don_chn=$don_no&semen_id=$semen_id' class='btn-two green large'>PGT Biopsy Dish</a>";
		echo "<a href='gentxtfl-process-btns.php?deprtmnt=$deptt&sub1_xx=a1:b10&cyc_no=$cyc_no&orgin_chn=$chn&don_chn=$don_no&semen_id=$semen_id' class='btn-two green large'>Post thaw culture dish</a>";
	}else{

	echo "<a href='gentxtfl-process-btns.php?deprtmnt=$deptt&sub1_xx=a1:b01&cyc_no=$cyc_no&orgin_chn=$chn&don_chn=$don_no&semen_id=$semen_id' class='btn-two green large'>Pool dish (35mm Dish)</a>";
	echo "<a href='gentxtfl-process-btns.php?deprtmnt=$deptt&sub1_xx=a1:b02&cyc_no=$cyc_no&orgin_chn=$chn&don_chn=$don_no&semen_id=$semen_id' class='btn-two green large'>Post Denudation dish (60 mm Dish)</a>";

	}
	echo "<a href='gentxtfl-process-btns.php?deprtmnt=$deptt&sub1_xx=a1:b03&cyc_no=$cyc_no&orgin_chn=$chn&don_chn=$don_no&semen_id=$semen_id' class='btn-two green large'>ICSI Dish</a>";
	echo "<a href='gentxtfl-process-btns.php?deprtmnt=$deptt&sub1_xx=a1:b04&cyc_no=$cyc_no&orgin_chn=$chn&don_chn=$don_no&semen_id=$semen_id' class='btn-two green large'>Fert dish (D0)</a>";
	echo "<a href='gentxtfl-process-btns.php?deprtmnt=$deptt&sub1_xx=a1:b05&cyc_no=$cyc_no&orgin_chn=$chn&don_chn=$don_no&semen_id=$semen_id' class='btn-two green large'>Cleave dish (D1)</a>";
	echo "<a href='gentxtfl-process-btns.php?deprtmnt=$deptt&sub1_xx=a1:b06&cyc_no=$cyc_no&orgin_chn=$chn&don_chn=$don_no&semen_id=$semen_id' class='btn-two green large'>Blast Dish(D3)</a>";
	echo "<a href='gentxtfl-process-btns.php?deprtmnt=$deptt&sub1_xx=a1:b07&cyc_no=$cyc_no&orgin_chn=$chn&don_chn=$don_no&semen_id=$semen_id' class='btn-two green large'>Blast Dish(D5/6)</a>";
	echo "<a href='gentxtfl-process-btns.php?deprtmnt=$deptt&sub1_xx=a1:b08&cyc_no=$cyc_no&orgin_chn=$chn&don_chn=$don_no&semen_id=$semen_id' class='btn-two green large'>ET Dish</a>";
	echo "<a href='gentxtfl-process-btns.php?deprtmnt=$deptt&sub1_xx=a1:b09&cyc_no=$cyc_no&orgin_chn=$chn&don_chn=$don_no&semen_id=$semen_id' class='btn-two green large'>PGT Biopsy Dish</a>";
	echo "<a href='gentxtfl-process-btns.php?deprtmnt=$deptt&sub1_xx=a1:b10&cyc_no=$cyc_no&orgin_chn=$chn&don_chn=$don_no&semen_id=$semen_id' class='btn-two green large'>Post thaw culture dish</a>";
	}

}else if ($deptt==="3"){
/////andro start

echo "<br><br>";

$result = mysql_query("SELECT * FROM matcher_tag_gen where chn_cycle='$xcyc_no' and grpbypid='a2' order by ent_no desc limit 1");
$login_check = mysql_num_rows($result);
if($login_check > 0){

while($row=mysql_fetch_array($result)) 
{
if($row['process_main_id']=="a2:b01"){
echo "<a href='#' class='btn-two gray large'>Semen Collection container</a>";
echo "<a href='gentxtfl-process-btns.php?deprtmnt=$deptt&sub1_xx=a2:b02&cyc_no=$cyc_no&orgin_chn=$chn&don_chn=$don_no&semen_id=$semen_id' class='btn-two purple large'>DG Tube/ Swim up Tube</a>";
echo "<a href='gentxtfl-process-btns.php?deprtmnt=$deptt&sub1_xx=a2:b03&cyc_no=$cyc_no&orgin_chn=$chn&don_chn=$don_no&semen_id=$semen_id' class='btn-two purple large'>Post wash tube</a>";
}else if($row['process_main_id']=="a2:b02"){
echo "<a href='#' class='btn-two gray large'>Semen Collection container</a>";
echo "<a href='#' class='btn-two gray large'>DG Tube/ Swim up Tube</a>";
echo "<a href='gentxtfl-process-btns.php?deprtmnt=$deptt&sub1_xx=a2:b03&cyc_no=$cyc_no&orgin_chn=$chn&don_chn=$don_no&semen_id=$semen_id' class='btn-two purple large'>Post wash tube</a>";
}else if($row['process_main_id']=="a2:b03"){
echo "<a href='#' class='btn-two gray large'>Semen Collection container</a>";
echo "<a href='#' class='btn-two gray large'>DG Tube/ Swim up Tube</a>";
echo "<a href='#' class='btn-two gray large'>Post wash tube</a>";
}
} //while loop over
}else{ // count loop over
echo "<a href='gentxtfl-process-btns.php?deprtmnt=$deptt&sub1_xx=a2:b01&cyc_no=$cyc_no&orgin_chn=$chn&don_chn=$don_no&semen_id=$semen_id' class='btn-two purple large'>Semen Collection container</a>";
echo "<a href='gentxtfl-process-btns.php?deprtmnt=$deptt&sub1_xx=a2:b02&cyc_no=$cyc_no&orgin_chn=$chn&don_chn=$don_no&semen_id=$semen_id' class='btn-two purple large'>DG Tube/ Swim up Tube</a>";
echo "<a href='gentxtfl-process-btns.php?deprtmnt=$deptt&sub1_xx=a2:b03&cyc_no=$cyc_no&orgin_chn=$chn&don_chn=$don_no&semen_id=$semen_id' class='btn-two purple large'>Post wash tube</a>";
}
///andro end

}else{
}
echo "<br><a href='gend_cycle_select.php?chn=$chn' class='btn-two blue large'>Back to treatment listing</a>";
?>

</body>
</html>
