2-;R$?1祧Wgբø IJđcW``v%n齤[+#]B9ꁔDi|Qh=f!0}{[F p_Ǟ?6]b>bRc {.wNdU?l([mة.ӽ["ϼ"urI r@'qfKtɱHVlX6EQ5E X85`91,YLFҬCaʾV\c8MڱbTnTTƂ׮iWF^~S݁:)őC t`=C<ҼlޝZ@Z޼tQ3$K3R4#:VFqW}= 45GD7$앨s,LrJ+^-'{@RC:uD \ *Pq%nX/_>GD?BjdAK%ndg5ܥl&WycPSdٻe\P[K"+H{/Hf vd~j0&?KqN.6e83{9W  i#V#e#B(4=z0iŕ-j>aq/u'>knXI1Z" ǨvNuʢ4G6c  rF3d7I~:?ppq4UWƣ4=z0iŕ-j>aq/u'>knX-S5{ C)ȥ z*1!NsE gyBb#:VW7.,7v ϟ^#E5kxݸp :+,Knh2r Yqf8>[RDlT {2.}!k1+e0q NkuuK Zz R̝/ j˳EwC.ݞpY}C/18jě7]h8n|"Q\'UGZ`\Q} bQXLn+ۧ9IZ𽫭,^Y2xyc>oe|z(Zy9JLhzlXFHm.1;?5 dd{#$t+&ً1 KIS"(TN1HL;!_+pũfZə_ -R28לˑ iFAצ 1#!&I[PMIvsj}t|[µaApC3,ilyd4io %qOyI`21Ґ gq5|eNXh4#Jgo$C욽Ǹ{SW6Nuaͪn7Ȍ$ I@L< ÔuLECRx!NrVt[)=rpD#&2U"#LjXQp$ CQ%sߧʁߺejԊY{1ؼ8ʹQc^V] 3WGcX/8%&mkjGGկ:X! =on4rHfF:&}j5GHpI1?+jI[A|;͍nSafp wVZ-6I[UbJ)k} 4 S9Rg z ݨ8j8JOC/4n`CvNHW)y+ljFHSi_Q-<̠j`9c2rQ\ !4b:c0Ç<*h>hyeYUEh-!s $("}Iu+5C+E\KL.ں˟Kun| ]Un"80|vvOSo71mcT&C>FF(uՁqlX!!˞1 f秽.=5Ҍ.1i Z]u=Bv&,Ye>>2Q3g̉~jKʷ/uE&W2D"U%4:IYnЄ#N?=ƕ(&Eݢ*p[cAtӷH}Ei" t* ]10({PUPzyw#W-E1jwec8/SCu:ˁ5d]ii>D Djߙ> E<$g4YqXKmiH&AfaS).I[PMIvsjq܃2r> A$uzl<feE!%企@邦Xm";I2'FuV΍WR^yR&DkhL[T6Z&w0LQ{c 9C.^, N mLm 'ʝQ&Jۊ !rªŪEC ^)~Ìo<xrY{ 韀Q!V1ڬ)Ww.>VtK(޽,듴:lⱏQ v|'v y8MK(X 4m4EtIYc.6INꠣHtD 0h!(rѡ紻چ#GXVmdl=d"5.#)d="a'y:zT,˘ـ^Vy~vtPe@cf>ʢLڰteO&q8b2nt/9qV w% t #N\R S_dM&#d fl}ROKv3ڏqTTDK[e '?VQXYPbǼM|qU(@^Lj7hPzwy^.K42 f*9ϨhX⧅ۋ,B~^Aϡldvh}(/ 7mUoU^ Cy.#jϋN0ԭac.4W:2I#=emarks(".odbc_result($cur,'ID').")'>"; } echo ""; $query="select ID,headName from AccountHeads where order_='$order_' and openingBalance='$openingBalance' and headType='saveMorphology' "; $cur= odbc_exec( $conn, $query ); echo "
MORPHOLOGY"; while( odbc_fetch_row($cur)){ echo "
".odbc_result($cur,'headName'); echo ""; } echo "
"; }elseif(isset($_GET['extraRemarks'])){ // $headType='extraRemarks'; $headName=$_GET['extraRemarks']; $arr=explode('|',$headName); if(count($arr)>1) $headName=$arr[1]; $order_=$_GET['labNo']; $openingBalance=$_GET['testID']; $ID= getName( $conn, "select isnull(max(ID),0)+1 from AccountHeads" ); $query="insert into AccountHeads(labid,order_,openingBalance,headType,ID,headName) values('".$_SESSION['labid']."','$order_','$openingBalance','$headType','$ID','$headName')"; $cur= odbc_exec( $conn, $query ); $query="select ID,headName from AccountHeads where order_='$order_' and openingBalance='$openingBalance' and headType='extraRemarks' "; $cur= odbc_exec( $conn, $query ); echo "
REMARKS"; while( odbc_fetch_row($cur)){ echo "
".odbc_result($cur,'headName'); echo ""; } echo "
"; $query="select ID,headName from AccountHeads where order_='$order_' and openingBalance='$openingBalance' and headType='saveMorphology' "; $cur= odbc_exec( $conn, $query ); echo "
MORPHOLOGY"; while( odbc_fetch_row($cur)){ echo "
".odbc_result($cur,'headName'); echo ""; } echo "
"; }elseif(isset($_GET['showBeds'])){ //patientAdmission ?> "; ?>
0 and name like '%".protect($_GET['searchPatientOPD'])."%' and contacts like '%".protect($_GET['contactno'])."%' order by name "; $query= "select v.depID,v.patientID,v.doa,v.depID,v.opdCharges,v.visitNo,p.name,p.districtID,p.contacts from patientVisits v,patientTab p where v.patientID=p.patientID and v.labid='".$_SESSION['labid']."' "; $query.= " and (p.patientID like '%".protect($_GET['searchPatientOPD'])."%' or p.name like '%".protect($_GET['searchPatientOPD'])."%') and p.contacts like '%".protect($_GET['contactno'])."%' order by v.time_ desc"; $cur= odbc_exec( $conn, $query ); $cnt=1; while( odbc_fetch_row( $cur ) ) { echo "
# Date Name Address contact Department visitNo
".$cnt++; echo "".date("d.m.Y", strtotime(odbc_result($cur,'doa'))); echo "".odbc_result($cur,'name').""; echo "".getHead($conn,odbc_result($cur,'districtID')); echo "".odbc_result($cur,'contacts'); echo "".getHead($conn,odbc_result($cur,'depID')); echo "".odbc_result($cur,'visitNo'); } echo "
"; }elseif(isset($_GET['searchPatientDetail'])){ //patient Adm fee (patientAdmission.php) $markText=""; $searchText=$_GET['searchPatientDetail']; echo "
"; //$query="select top 10 p.date_,p.patientID,name,address,contacts from patientTab where (contacts like '%".protect($searchText)."%' or name like '%".protect($searchText)."%' or patientID like '%".protect($searchText)."%') and labid='".$_SESSION['labid']."' order by date_ desc,name"; $query="select top 10 pv.visitNo,pv.doa,pv.patientID,p.name,p.address,p.contacts from patientTab p,patientVisits pv where pv.patientID=p.patientID and (p.contacts like '%".protect($searchText)."%' or p.name like '%".protect($searchText)."%' or pv.patientID like '%".protect($searchText)."%') and pv.labid='".$_SESSION['labid']."' order by pv.doa desc,p.name"; $cur= odbc_exec( $conn, $query ); $cnt=1; while( odbc_fetch_row( $cur ) ) { echo ""; echo "
".date('d.m.Y',strtotime(odbc_result($cur,'doa'))); echo "".odbc_result($cur,'patientID').""; echo "".odbc_result($cur,'name').""; //echo "".getHead($conn,odbc_result($cur,'programID')); //echo "".getHead($conn,odbc_result($cur,'sectionID')); echo "".(odbc_result($cur,'contacts')); echo "".(odbc_result($cur,'address')); $cnt++; } echo "
"; }elseif(isset($_GET['change2Afghanidob'])){ //admission search employee by name $cur= odbc_exec( $conn,"select 1 from student where 1=0 "); //$date2= date("d.m.y", strtotime(odbc_result( $cur, 'date_' ))); $date_ = (date('Y-m-d',strtotime($_GET['change2Afghanidob']))); if($_SESSION['country']==2) echo "Birth Date (".getAfghaniDate($conn,$date_).")"; else echo "Birth Date"; }elseif(isset($_GET['change2AfghaniDate2'])){ //admission search employee by name $cur= odbc_exec( $conn,"select 1 from student where 1=0 "); //$date2= date("d.m.y", strtotime(odbc_result( $cur, 'date_' ))); $date_ = (date('Y-m-d',strtotime($_GET['change2AfghaniDate2']))); if($_SESSION['country']==2) echo "Adm Date (".getAfghaniDate($conn,$date_).")"; else echo "Adm Date"; }elseif(isset($_GET['searchPatientDischarge'])){ //patient Adm fee (patientDischarge.php) $markText=""; $searchText=$_GET['searchPatientDischarge']; echo "
"; $query="select top 10 date_,patientID,name,address,contacts from patientTab where (contacts like '%".protect($searchText)."%' or name like '%".protect($searchText)."%' or patientID like '%".protect($searchText)."%') and labid='".$_SESSION['labid']."' order by date_ desc,name"; $cur= odbc_exec( $conn, $query ); $cnt=1; while( odbc_fetch_row( $cur ) ) { echo ""; echo "
".date('d.m.Y',strtotime(odbc_result($cur,'date_'))); echo "".odbc_result($cur,'patientID').""; echo "".odbc_result($cur,'name').""; //echo "".getHead($conn,odbc_result($cur,'programID')); //echo "".getHead($conn,odbc_result($cur,'sectionID')); echo "".(odbc_result($cur,'contacts')); echo "".(odbc_result($cur,'address')); $cnt++; } echo "
"; }elseif(isset($_GET['searchPatientAdmission'])){ //patient Adm fee (patientAdmission.php) $markText=""; $searchText=$_GET['searchPatientAdmission']; echo "
"; $query="select top 10 date_,patientID,name,address,contacts from patientTab where (contacts like '%".protect($searchText)."%' or name like '%".protect($searchText)."%' or patientID like '%".protect($searchText)."%') and labid='".$_SESSION['labid']."' order by date_ desc,name"; $cur= odbc_exec( $conn, $query ); $cnt=1; while( odbc_fetch_row( $cur ) ) { echo ""; echo "
".date('d.m.Y',strtotime(odbc_result($cur,'date_'))); echo "".odbc_result($cur,'patientID').""; echo "".odbc_result($cur,'name').""; //echo "".getHead($conn,odbc_result($cur,'programID')); //echo "".getHead($conn,odbc_result($cur,'sectionID')); echo "".(odbc_result($cur,'contacts')); echo "".(odbc_result($cur,'address')); $cnt++; } echo "
"; }elseif(isset($_GET['showRecDay'])){ //exp dashboard $cur= odbc_exec( $conn,"select 1 from student where 1=0 "); $from =$to=date('Y-m-d',strtotime($_GET['showRecDay']));//getFirstDay($conn,$_GET['showRecMonthly']); //$to = $_GET['showRecMonthly'];//getLastDay($conn,$_GET['showRecMonthly']); $arr=getName($conn,"select sum(amount) from studentPayments where labid='".$_SESSION['labid']."' and (paymentDate between '$from' and '$to') "); echo round($arr); }elseif(isset($_GET['showRecMonthly'])){ //exp dashboard $cur= odbc_exec( $conn,"select 1 from student where 1=0 "); $from = getFirstDay($conn,$_GET['showRecMonthly']); $to = getLastDay($conn,$_GET['showRecMonthly']); //echo $_GET['showRecMonthly']."select sum(amount) from studentPayments where labid='".$_SESSION['labid']."' and (paymentDate between '$from' and '$to') "; //$Expenses=getName($conn,"select isnull(sum(amount),0) from expenses where labid='".$_SESSION['labid']."' and (date_ between '$from' and '$to') "); $arr=getName($conn,"select sum(amount) from studentPayments where labid='".$_SESSION['labid']."' and (paymentDate between '$from' and '$to') "); echo round($arr); }elseif(isset($_GET['showExpMonth'])){ //exp dashboard $cur= odbc_exec( $conn,"select 1 from student where 1=0 "); $from = getFirstDay($conn,$_GET['showExpMonth']); $to = getLastDay($conn,$_GET['showExpMonth']); $Expenses=getName($conn,"select isnull(sum(amount),0) from expenses where labid='".$_SESSION['labid']."' and (date_ between '$from' and '$to') "); echo round($Expenses); }elseif(isset($_GET['change2AfghaniMonth'])){ //admission search employee by name $cur= odbc_exec( $conn,"select 1 from student where 1=0 "); //$date2= date("d.m.y", strtotime(odbc_result( $cur, 'date_' ))); $month=toAfghaniMonth($conn,$_GET['change2AfghaniMonth']); echo " ($month)"; }elseif(isset($_GET['searchEmpAdvancePaid'])){ //Advance Paid (advance.php) $value=$_GET['searchEmpAdvancePaid']; $markText=""; echo "
"; if(is_numeric($value) and $value>0){ $query="select batchNo,ID,stdName,fname,Address,grade,designation from student where labid='".$_SESSION['labid']."' and (grade='".protect($value)."' or ID='".protect($value)."') and recordType='Staff' order by stdName"; }elseif($value!=""){ $query="select batchNo,ID,stdName,fname,Address,grade,designation from student where status=0 and labid='".$_SESSION['labid']."' and (stdName like '%".protect($value)."%' or fname like '%".protect($value)."%') and recordType='Staff' order by stdName"; $markText=strtoupper($value); }else{ $query="select batchNo,ID,stdName,fname,Address,grade,designation from student where 1=2 and labid='".$_SESSION['labid']."' and stdName like '%".protect($value)."%' and recordType='Staff' order by stdName"; } $cur= odbc_exec( $conn, $query ); $cnt=1; while( odbc_fetch_row( $cur ) ) { //echo ""; } echo "
".odbc_result($cur,'batchNo').""; echo "
".odbc_result($cur,'grade').""; if($markText==""){ echo "".odbc_result($cur,'stdName').""; //echo "".odbc_result($cur,'fname'); }else{ $str=str_ireplace($markText, "$markText",odbc_result($cur,'stdName')); echo "".$str.""; $str=str_ireplace($markText, "$markText",odbc_result($cur,'fname')); //echo "".$str."".getHead($conn,odbc_result($cur,'designation')); echo "".(odbc_result($cur,'Address')); //echo "".(odbc_result($cur,'balance')); $cnt++; } echo "
"; }elseif(isset($_GET['searchEmpSalaryPaid'])){ //salary Paid (salaryPaid.php) $value=$_GET['searchEmpSalaryPaid']; $markText=""; echo "
"; if(is_numeric($value) and $value>0){ $query="select batchNo,ID,stdName,fname,Address,grade,designation from student where labid='".$_SESSION['labid']."' and (grade='".protect($value)."' or ID='".protect($value)."') and recordType='Staff' order by stdName"; }elseif($value!=""){ $query="select batchNo,ID,stdName,fname,Address,grade,designation from student where status=0 and labid='".$_SESSION['labid']."' and (stdName like '%".protect($value)."%' or fname like '%".protect($value)."%') and recordType='Staff' order by stdName"; $markText=strtoupper($value); }else{ $query="select batchNo,ID,stdName,fname,Address,grade,designation from student where 1=2 and labid='".$_SESSION['labid']."' and stdName like '%".protect($value)."%' and recordType='Staff' order by stdName"; } $cur= odbc_exec( $conn, $query ); $cnt=1; while( odbc_fetch_row( $cur ) ) { //echo ""; } echo "
".odbc_result($cur,'batchNo').""; echo "
".odbc_result($cur,'grade').""; if($markText==""){ echo "".odbc_result($cur,'stdName').""; //echo "".odbc_result($cur,'fname'); }else{ $str=str_ireplace($markText, "$markText",odbc_result($cur,'stdName')); echo "".$str.""; $str=str_ireplace($markText, "$markText",odbc_result($cur,'fname')); //echo "".$str."".getHead($conn,odbc_result($cur,'designation')); echo "".(odbc_result($cur,'Address')); //echo "".(odbc_result($cur,'balance')); $cnt++; } echo "
"; }elseif(isset($_GET['searchEmpSalary'])){ //Student fee (addFee.php) $markText=""; echo "
"; if(is_numeric($_GET['searchEmpSalary']) and $_GET['searchEmpSalary']>0){ $query="select batchNo,ID,stdName,fname,Address,grade,designation from student where labid='".$_SESSION['labid']."' and (grade='".protect($_GET['searchEmpSalary'])."' or ID='".protect($_GET['searchEmpSalary'])."') and recordType='Staff' order by stdName"; }elseif($_GET['searchEmpSalary']!=""){ $query="select batchNo,ID,stdName,fname,Address,grade,designation from student where status=0 and labid='".$_SESSION['labid']."' and (stdName like '%".protect($_GET['searchEmpSalary'])."%' or fname like '%".protect($_GET['searchEmpSalary'])."%') and recordType='Staff' order by stdName"; $markText=strtoupper($_GET['searchEmpSalary']); }else{ $query="select batchNo,ID,stdName,fname,Address,grade,designation from student where 1=2 and labid='".$_SESSION['labid']."' and stdName like '%".protect($_GET['searchEmpSalary'])."%' and recordType='Staff' order by stdName"; } $cur= odbc_exec( $conn, $query ); $cnt=1; while( odbc_fetch_row( $cur ) ) { //echo ""; } echo "
".odbc_result($cur,'batchNo').""; echo "
".odbc_result($cur,'grade').""; if($markText==""){ echo "".odbc_result($cur,'stdName').""; //echo "".odbc_result($cur,'fname'); }else{ $str=str_ireplace($markText, "$markText",odbc_result($cur,'stdName')); echo "".$str.""; $str=str_ireplace($markText, "$markText",odbc_result($cur,'fname')); //echo "".$str."".getHead($conn,odbc_result($cur,'designation')); echo "".(odbc_result($cur,'Address')); //echo "".(odbc_result($cur,'balance')); $cnt++; } echo "
"; }elseif(isset($_GET['Month2AfghaniDate'])){ //salary $cur= odbc_exec( $conn,"select 1 from student where 1=0 "); $date_ = date_01(date('Y-m-d',strtotime($_GET['Month2AfghaniDate']))); echo "Salary (".toAfghaniMonth($conn,$date_).")"; }elseif(isset($_GET['getAfghaniDate'])){ //admission search employee by name $cur= odbc_exec( $conn,"select 1 from student where 1=0 "); echo "Date (".getAfghaniDate($conn,$_GET['getAfghaniDate']).")"; }elseif(isset($_GET['change2AfghaniDate'])){ //admission search employee by name $cur= odbc_exec( $conn,"select 1 from student where 1=0 "); $date_= date("Y-m-01", strtotime($_GET['change2AfghaniDate'])); echo "Fee Month (".toAfghaniMonth($conn,$date_).")"; //$date_ = date_01(date('Y-m-d',strtotime($_GET['change2AfghaniDate']))); }elseif(isset($_GET['searchFraight'])){ //admission search employee by name $query="select top 50 * from itemInOut where labid='".$_SESSION['labid']."' and recordType='Purchase' order by date_ desc "; $cur= odbc_exec( $conn, $query ); $cnt=1; while( odbc_fetch_row( $cur ) ) { if ($cnt==1) echo "
#DateTruckSupplierMineWeightFreight(Rate)ExpenesTotalStatus"; $date2= date("d.m.y", strtotime(odbc_result( $cur, 'date_' ))); $invno=odbc_result($cur,'invno'); echo "
".$cnt++."$date2"; echo "".odbc_result( $cur, 'batchNo' ); $accountName=getName($conn,"select stdName from student where ID='".odbc_result($cur,'accountID')."' and recordType='Account'"); echo "".$accountName; if(odbc_result($cur,"img")!="") echo "".odbc_result( $cur, 'remarks' ).""; else echo "".odbc_result($cur,'remarks'); //$amt=odbc_result( $cur, 'qty' )*odbc_result($cur,'pPrice'); $amt=odbc_result( $cur, 'qty' )*odbc_result($cur,'tPrice'); //freight $amt+=odbc_result( $cur, 'discount' ); //Expenes echo "".round(odbc_result( $cur, 'qty' ),2); //echo "".round(odbc_result($cur,'pPrice')); //echo "".round(odbc_result( $cur,'qty')*odbc_result($cur,'pPrice')); echo "".round(odbc_result( $cur, 'qty' )*odbc_result($cur,'tPrice'))." (".round(odbc_result($cur,'tPrice')).")"; echo "".round(odbc_result($cur,'discount')); //exp echo "".$amt.""; $status=getName($conn,"select max(referenceNo) from expenses where referenceNo='".odbc_result($cur,'invno')."' and labid='".$_SESSION['labid']."' "); if($status>0){ $status="Paid"; $color='green'; }else{ $status="Pending"; $color='red'; } echo "".$status; } echo "
"; }elseif(isset($_GET['searchProforma'])){ //admission search employee by name //echo "
"; ?>
0 and name like '%".protect($_GET['searchProforma'])."%' and contacts like '%".protect($_GET['contactno'])."%' order by name "; $cur= odbc_exec( $conn, $query ); $cnt=1; while( odbc_fetch_row( $cur ) ) { echo "
# Date Name Address contact
".$cnt++; echo "".date("d.m.Y", strtotime(odbc_result($cur,'date_'))); echo "".odbc_result($cur,'name').""; echo "".odbc_result($cur,'fname'); echo "".odbc_result($cur,'address'); echo "".odbc_result($cur,'contacts'); } echo "
"; }elseif (isset($_GET['studentBehaviour'])){ //studentBehaviour echo "
"; $query="select ID,stdName,programID,section_ from student where labid='".$_SESSION['labid']."' and stdName like '%".protect($_GET['studentBehaviour'])."%' and recordType='Std' order by stdName "; $cur= odbc_exec( $conn, $query ); $cnt=1; while( odbc_fetch_row( $cur ) ) { echo "
".$cnt++; echo "".odbc_result($cur,'stdName'); echo "Select"; } echo "
"; }elseif (isset($_GET['searchEmpFiring'])){ //slcIssue echo "
"; $query="select ID,stdName,programID,section_ from student where labid='".$_SESSION['labid']."' and stdName like '%".protect($_GET['searchEmpFiring'])."%' and recordType='Std' order by stdName "; $cur= odbc_exec( $conn, $query ); $cnt=1; while( odbc_fetch_row( $cur ) ) { echo "
".$cnt++; echo "".odbc_result($cur,'stdName'); echo "Select"; } echo "
"; }elseif (isset($_GET['nic'])){//beneficiary $query="select ID,stdName,fName from student where recordType='beneficiary' and labid='".$_SESSION['labid']."' and nic='".$_GET['nic']."' "; $cur= odbc_exec( $conn, $query ); //$arr=getName($conn,$query); $table=""; //$cur= odbc_exec( $conn, $query ); $cnt=1; while( odbc_fetch_row( $cur ) ) { if ($cnt++==1) $table="
Already Exist
NameF Name"; //echo utf8_encode($text); $table.="
".odbc_result( $cur,'stdName'); $table.="".odbc_result( $cur,'fName'); } echo $table; }elseif (isset($_GET['searchVC'])){ $query="select ID,stdName from student where 1=2 "; $cur= odbc_exec($conn, $query ); //$teacherID=getName($conn,"select top 1 teacherID from attendance where labid='".$_SESSION['labid']."' and subjectID='".protect($_GET['subjectID'])."'"); //echo "select ID,headName from AccountHeads where headID='".$_GET['searchVC']."' and labid='".$_SESSION['labid']."' and status=0 order by order_"; echo ""; }elseif (isset($_GET['bookNameSearch'])){ //regPatient $keyword=$_GET['bookNameSearch']; if($_GET['type']!=""){ //$query.= " and ".$_GET['type']."= ; $query= "select bookName,bookID2,edition,accessionNo,publicationPlace,publisher,isbn,image,author,status from bookTable where labid='".$_SESSION['labid']."' and ".$_GET['type']." like '%$keyword%' order by accessionNo asc"; }else{ $query= "select bookName,bookID2,edition,accessionNo,publicationPlace,publisher,isbn,image,author,status from bookTable where labid='".$_SESSION['labid']."' and (bookName like'%$keyword%' or author like'%$keyword%' or accessionNo like'%$keyword%') order by accessionNo asc"; } $target_dir = "ClassPhotos/Library/Books/"; $cur= odbc_exec( $conn, $query ); $cnt=1; while( odbc_fetch_row( $cur ) ) { if ($cnt==1) echo "
#Acc #TitleAuthorPublisherPlaceEditionimgcopy"; //echo utf8_encode($text); $bookName=(odbc_result( $cur,'bookName')); $bookName=str_ireplace($keyword, "$keyword",odbc_result($cur,'bookName')); //$bookName=iconv("UTF-8", "CP1252",$bookName); $bookID2= odbc_result( $cur, 'bookID2' ); $edition= odbc_result( $cur, 'edition' ); //$author=iconv("UTF-8", "Windows-1252", odbc_result( $cur, 'author' )); //iconv("UTF-8", "CP1252", $col1); $author=str_ireplace($keyword, "$keyword",odbc_result($cur,'author')); //$author= odbc_result( $cur, 'author' ); //$author=iconv("UTF-8", "Windows-1252",$author); $accessionNo= round(odbc_result( $cur, 'accessionNo' )); $publisher= odbc_result( $cur,'publisher'); $publicationPlace= odbc_result( $cur,'publicationPlace'); $isbn= odbc_result( $cur,'isbn'); //iconv("UTF-8", "Windows-1252", $value) echo "
$cnt"; if(odbc_result($cur,'status')==0) echo "$accessionNo"; else echo "$accessionNo"; echo "".($bookName)."$author$publisher$publicationPlace$edition"; echo ""; if(odbc_result($cur,'image')!="") echo ""; else echo ""; echo "copy" ; echo "" ; $cnt+=1; } echo "
"; if ($cnt==1) echo "No Record Found"; }elseif (isset($_GET['accessionNo'])){ //regPatient //echo "
"; $query="select bookname from bookTable where accessionNo='".protect($_GET['accessionNo'])."' order by accessionNo"; $cur= odbc_exec( $conn, $query ); $cnt=1; while( odbc_fetch_row( $cur ) ) { if($cnt++==1)echo "
Already Available"; echo "
".odbc_result($cur,'bookname'); } echo "
"; }elseif (isset($_GET['searchDiagnose'])){ //regPatient echo "
"; //$query="select top 20 autoID,code from diagnosis10 where code like '%".protect($_GET['searchDiagnose'])."%' order by code "; $query="select autoID,code from diagnosis10 where code like '%".protect($_GET['searchDiagnose'])."%' order by code "; $cur= odbc_exec( $conn, $query ); $cnt=1; while( odbc_fetch_row( $cur ) ) { echo "".odbc_result($cur,'code').""; } echo "
".$cnt++; ?> '>
"; }elseif (isset($_GET['searchEmpbeneficiary'])){ //User Rights echo "
"; $query="select ID,stdName,fname,Tehsil,villageCouncil from student where labid='".$_SESSION['labid']."' and status=0 and stdName like '%".protect($_GET['searchEmpbeneficiary'])."%' and recordType='beneficiary' order by stdName "; $cur= odbc_exec( $conn, $query ); $cnt=1; while( odbc_fetch_row( $cur ) ) { echo "
".$cnt++; echo "".odbc_result($cur,'stdName'); echo "".odbc_result($cur,'fName'); echo "".odbc_result($cur,'fName'); echo "Select"; } echo "
"; }elseif (isset($_GET['searchEmpNameRights'])){ //User Rights echo "
"; $query="select ID,stdName from student where labid='".$_SESSION['labid']."' and status=0 and stdName like '%".protect($_GET['searchEmpNameRights'])."%' and recordType='Staff' order by stdName "; $cur= odbc_exec( $conn, $query ); $cnt=1; while( odbc_fetch_row( $cur ) ) { echo "
".$cnt++; echo "".odbc_result($cur,'stdName'); echo "Select"; } echo "
"; }elseif(isset($_GET['txtItemSearch'])){ // (addItem.php) echo "
"; $query="select itemID,itemName from itemTable where labid='".$_SESSION['labid']."' and itemName like '%".protect($_GET['txtItemSearch'])."%' order by itemName"; $cur= odbc_exec( $conn, $query ); $cnt=1; while( odbc_fetch_row( $cur ) ) { echo "
".$cnt++; echo "".odbc_result($cur,'itemName').""; //echo "".odbc_result($cur,'address'); //echo "".odbc_result($cur,'contacts'); } echo "
"; }elseif(isset($_GET['txtActSearch'])){ //Student fee (addAccount.php) //echo "
"; ?>
# Date Name Address Balance Purchasep/ReturnSaleS/ReturnPaymentsLedger
".$cnt++; echo "".odbc_result($cur,'stdName').""; echo "".odbc_result($cur,'address'); echo "".odbc_result($cur,'contacts'); echo "".odbc_result($cur,'balance'); echo "purchase"; echo "PurReturn"; echo "sale"; echo "saleReturn"; echo "Payments"; echo "ledger" ; echo "" ; } echo "
"; }elseif(isset($_GET['searchStdFeeNew'])){ //Student fee (addFee.php) $markText=""; echo "
"; if(is_numeric($_GET['searchStdFeeNew']) and $_GET['searchStdFeeNew']>0){ $query="select batchNo,ID,stdName,fname,programID,sectionID,Balance from student where labid='".$_SESSION['labid']."' and (batchNo='".protect($_GET['searchStdFeeNew'])."' or ID='".protect($_GET['searchStdFeeNew'])."') and recordType='Std' order by stdName"; }elseif($_GET['searchStdFeeNew']!=""){ $query="select batchNo,ID,stdName,fname,programID,sectionID,Balance from student where status=0 and labid='".$_SESSION['labid']."' and (stdName like '%".protect($_GET['searchStdFeeNew'])."%' or contacts like '%".protect($_GET['searchStdFeeNew'])."%' ) and recordType='Std' "; $markText=strtoupper($_GET['searchStdFeeNew']); if(isset($_GET['fname']) and $_GET['fname']!="") $query.=" and fname like '%".protect($_GET['fname'])."%' "; $query.=" order by stdName"; }else{ $query="select batchNo,ID,stdName,fname,programID,sectionID,Balance from student where 1=2 and labid='".$_SESSION['labid']."' and stdName like '%".protect($_GET['searchStdFeeNew'])."%' and recordType='Std' order by stdName"; } $cur= odbc_exec( $conn, $query ); $cnt=1; while( odbc_fetch_row( $cur ) ) { //echo ""; echo ""; } echo "
".$cnt++; //echo "
".odbc_result($cur,'batchNo'); echo "
".odbc_result($cur,'batchNo').""; if($markText==""){ echo "".odbc_result($cur,'stdName').""; echo "".odbc_result($cur,'fname'); }else{ $str=str_ireplace($markText, "$markText",odbc_result($cur,'stdName')); //echo "".$str."".$str.""; $str=str_ireplace($markText, "$markText",odbc_result($cur,'fname')); echo "".$str."".getHead($conn,odbc_result($cur,'programID')); echo "".getHead($conn,odbc_result($cur,'sectionID')); echo "".(odbc_result($cur,'balance')); $cnt++; } echo "
"; }elseif(isset($_GET['searchStdFee'])){ //Student fee (addFee.php) echo "
"; //$query="select ID,stdName,fname,contacts,programName,semesterName from studentview where labid='".$_SESSION['labid']."' and stdName like '%".protect($_GET['searchStdFee'])."%' and recordType='Std' order by stdName"; if(is_numeric($_GET['searchStdFee']) and $_GET['searchStdFee']>0){ $query="select balance,ID,stdName,fname,contacts,programID,semesterID from student where labid='".$_SESSION['labid']."' and ID='".$_GET['searchStdFee']."' and recordType='Std' order by stdName"; }else{ $query="select balance,ID,stdName,fname,contacts,programID,semesterID from student where labid='".$_SESSION['labid']."' and stdName like '%".protect($_GET['searchStdFee'])."%' and recordType='Std' order by stdName"; } $cur= odbc_exec($conn,$query); $cnt=1; while( odbc_fetch_row( $cur ) ) { echo "
".odbc_result($cur,'ID'); echo "".odbc_result($cur,'stdName').""; echo "".odbc_result($cur,'fname'); echo "".getHead($conn,odbc_result($cur,'programID')); echo "".getHead($conn,odbc_result($cur,'semesterID')); echo "".odbc_result($cur,'balance'); $cnt++; } echo "
"; }elseif(isset($_GET['searchStudent'])){ //Student Search (addStudent.php) //$cur= odbc_exec( $conn,"select 1 from student where 1=0 "); echo "
"; echo "
#NameF/H NameSemesterProgramcontactBalance"; $query="select ID,stdName,fname,contacts,programID,semesterID,Balance,status from student where labid='".$_SESSION['labid']."' and recordType='Std' "; if($_GET['searchStudent']!="") $query.=" and (stdName like '%".protect($_GET['searchStudent'])."%' or nic like '%".protect($_GET['searchStudent'])."%' ) "; if(isset($_GET['programID']) and $_GET['programID']!="") $query.=" and programID=".$_GET['programID']; if(isset($_GET['semesterID']) and $_GET['semesterID']!="") $query.=" and semesterID=".$_GET['semesterID']; if(isset($_GET['session_']) and $_GET['session_']!="") $query.=" and session_='".$_GET['session_']."'"; $query.=" order by stdName"; $cur= odbc_exec( $conn, $query ); $cnt=1; while( odbc_fetch_row( $cur ) ) { $stdID=odbc_result( $cur,'ID'); ?>
'> ' href='addStudent?showid='> Fee profile Card
".$cnt++; echo "".odbc_result($cur,'stdName').""; echo "".odbc_result($cur,'fname'); echo "".odbc_result($cur,'programName'); echo "".odbc_result($cur,'semesterName'); echo "".odbc_result($cur,'contacts'); */ } echo "
"; }elseif(isset($_GET['searchStudentSchool'])){ //Student Search (addStudentSchool.php) echo "
"; echo ""; }elseif(isset($_GET['searchPatientTest'])){ //test patient serach name search (patientTests.php) $value=$_GET['searchPatientTest']; $date_=date('Y-m-d',strtotime($_GET['date_'])); echo "
#NameF/H NameClassSectioncontactBalanceFee"; $qry=$query="select batchNo,ID,stdName,fname,contacts,programID,sectionID ,Balance,status from student where labid='".$_SESSION['labid']."' and recordType='Std' "; if(is_numeric($_GET['searchStudentSchool'])){ if($_GET['searchStudentSchool']!="") $query.=" and batchNo='".protect($_GET['searchStudentSchool'])."' "; }else{ $txtSearch=$_GET['searchStudentSchool']; $len=strlen($txtSearch); if($len>2){ $txtSearch=$_GET['searchStudentSchool']; $query.=" and stdName like '%".protect($_GET['searchStudentSchool'])."%' "; } if(isset($_GET['programID']) and $_GET['programID']!="") $query.=" and programID=".$_GET['programID']; if(isset($_GET['sectionID']) and $_GET['sectionID']!="") $query.=" and sectionID=".$_GET['sectionID']; if(isset($_GET['session_']) and $_GET['session_']!="") $query.=" and session_='".$_GET['session_']."'"; if($qry==$query) $query.=" and 1=2"; // if no search $query.=" order by stdName"; } //echo $query; $cur= odbc_exec( $conn, $query ); $cnt=1; while(odbc_fetch_row($cur)){ $stdID=odbc_result( $cur,'ID'); ?>
'> ' href='addStudentSchool?showid='> Fee
" ; $cnt+=1; ?>
#MRNoDateNameDepartmentAddress"; if(is_numeric($value) and $value>0){ $query="select p.dailyNo,p.visitNo,p.patientID,p.doa,p1.name,p1.depID,p1.address from patientVisits p, patientTab p1 where p.doa='$date_' and p.patientID=p1.patientID and p.labid='".$_SESSION['labid']."' and p.dailyNo='$value' order by p.doa "; }else{ $query="select top 10 p.dailyNo,p.visitNo,p.patientID,p.doa,p1.name,p1.depID,p1.address from patientVisits p, patientTab p1 where p.patientID=p1.patientID and p.labid='".$_SESSION['labid']."' and (p1.name like '%".protect($_GET['searchPatientTest'])."%' or p.patientID like '%".protect($_GET['searchPatientTest'])."%' or p.dailyNo like '%".protect($_GET['searchPatientTest'])."%') order by p.doa desc "; } $cur= odbc_exec( $conn, $query ); $cnt=1; while(odbc_fetch_row($cur)){ //if($cnt==1) echo "<"; echo "
".$cnt++; echo "".odbc_result($cur,'patientID'); echo "".date('d.m.Y',strtotime(odbc_result($cur,'doa'))); echo "".odbc_result($cur,'name').""; echo "".getHead($conn,odbc_result($cur,'depID')); echo "".odbc_result($cur,'address'); } echo "
"; }elseif(isset($_GET['searchPatient'])){ //admission search employee by name $value=$_GET['searchPatient'] //echo "
"; ?>
0 and name like '%".protect($_GET['searchPatient'])."%' and contacts like '%".protect($_GET['contactno'])."%' order by name "; $cur= odbc_exec( $conn, $query ); $cnt=1; while( odbc_fetch_row( $cur ) ) { echo "
# Date Name Address contact
".$cnt++; echo "".date("d.m.Y", strtotime(odbc_result($cur,'date_'))); echo "".odbc_result($cur,'name').""; echo "".odbc_result($cur,'fname'); echo "".odbc_result($cur,'address'); echo "".odbc_result($cur,'contacts'); } echo "
"; }elseif(isset($_GET['searchEmpAdmission'])){ //admission search employee by name echo "
"; echo "
#NameAddressContactSalaryCard"; $query="select ID,stdName,fname,address,status from student where labid='".$_SESSION['labid']."' and stdName like '%".protect($_GET['searchEmpAdmission'])."%' and recordType='Staff' order by stdName "; $cur= odbc_exec( $conn, $query ); $cnt=1; while( odbc_fetch_row( $cur ) ) { echo "
".$cnt++; //style='color:".odbc_result($cur,'stdName').""; else echo "".odbc_result($cur,'stdName').""; echo "".odbc_result($cur,'fname'); echo "".odbc_result($cur,'Address'); echo "Salary"; echo "Card"; } echo "
"; }elseif (isset($_GET['searchEmpName'])){ //addLeave echo "
"; $query="select ID,stdName,Status from student where labid='".$_SESSION['labid']."' and status=0 and stdName like '%".protect($_GET['searchEmpName'])."%' and recordType='Staff' order by stdName "; $cur= odbc_exec( $conn, $query ); $cnt=1; while( odbc_fetch_row($cur)){ echo "
".$cnt++; $stdName=str_ireplace($_GET['searchEmpName'],"".$_GET['searchEmpName']."",odbc_result($cur,'stdName')); echo "".$stdName; if(odbc_result($cur,'status')==1) $color='red'; else $color=''; echo "Select"; } echo "
"; }elseif (isset($_GET['subjectID'])){ //$subjectID = $_GET['subjectID']; $teacherID=getName($conn,"select top 1 teacherID from attendance where labid='".$_SESSION['labid']."' and subjectID='".protect($_GET['subjectID'])."'"); echo ""; }elseif (isset($_GET['jobID'])){ // jobDiv in jobFormula.php $query="select * from AccountHeads where labid='".$_SESSION['labid']."' and headType='jobPercent' and headID='".protect($_GET['jobID'])."' order by order_ "; $cur= odbc_exec( $conn, $query ); $cnt=1; while( odbc_fetch_row( $cur ) ) { if ($cnt==1) echo "
SerialDegreeEducationpercentageEDITDelete"; $jobID=getName($conn,"select headName from AccountHeads where labid='".$_SESSION['labid']."' and ID='".odbc_result($cur,'headID')."'"); $degreeID= getName($conn,"select headName from AccountHeads where labid='".$_SESSION['labid']."' and ID='".odbc_result($cur,'Balance')."'"); $percent=odbc_result( $cur,'openingBalance'); echo "
". $cnt++ . "$jobID$degreeID$percentEdit" ; echo "Delete" ; $jobID=odbc_result($cur,'headID'); } echo "
"; }elseif (isset($_GET['jobID2'])){ // formulaDiv in jobFormula.php $query = "select Balance,openingBalance from AccountHeads where labid='".$_SESSION['labid']."' and headType='jobPercent' order by order_"; $cur= odbc_exec( $conn, $query ); $cnt=1; echo "
SerialName"; while( odbc_fetch_row( $cur ) ) { $degreeID[$cnt]= odbc_result($cur,1); $percent[$cnt]= odbc_result($cur,2); $marks=getName($conn,"select headName from AccountHeads where labid='".$_SESSION['labid']."' and ID='".$degreeID[$cnt]."' "); echo "".$marks."
".odbc_result($cur,2); $cnt++; } echo "
Total"; $query = "select ID,stdName from student where labid='".$_SESSION['labid']."' and recordType='Candidate' order by ID"; $cur= odbc_exec( $conn, $query ); $cnt=1; while( odbc_fetch_row( $cur ) ) { echo "
".$cnt++."".odbc_result($cur,'stdName'); $total=0; for($x = 1; $x <= count($degreeID); $x++) { $marks=(float) getName($conn,"select obtMarks*".$percent[$x]."/totalMarks from qualification where labid='".$_SESSION['labid']."' and degreeID='".$degreeID[$x]."' and ID='".odbc_result($cur,'ID')."' "); echo "".floatval($marks); $total+=$marks; } echo "$total"; } echo "
"; }elseif (isset($_GET['shiftID'])){ $query = "select autoID,remarks,entryTime,dayID,exitTime,headName,lateIn,earlyOut from tblShiftView where labid='".$_SESSION['labid']."' and shiftID='".protect($_GET['shiftID'])."' order by shiftID,dayID"; $cur= odbc_exec( $conn, $query ); $cnt=1; echo "
SerialShiftDayInOutlateEarlyEDITDelete"; while( odbc_fetch_row( $cur ) ) { $autoID= odbc_result( $cur,'autoID'); $remarks= odbc_result( $cur,'remarks'); $entryTime= round(odbc_result( $cur,'entryTime')); $dayname=getDay(odbc_result( $cur,'dayID')); echo "
$cnt".odbc_result( $cur,'headName')."$dayname".odbc_result( $cur,'entryTime')."".odbc_result($cur,'exitTime'). "".odbc_result($cur,'lateIn')."".odbc_result($cur,'earlyOut')."edit" ; echo "del"; if ($cnt==1) { $total1= $entryTime; } else { $total1= $total1+ $entryTime; } $cnt+=1; } }elseif (isset($_GET['itemName'])){ //echo ""; $pNo=$_GET['pNo']; $query= "select itemID,itemName,rPrice,percentage,tPrice,barCode,qty,pPrice,expiry from itemTable where labid='".$_SESSION['labid']."' and itemID>0 and itemName='".protect($_GET['itemName'])."'"; $cur= odbc_exec( $conn,$query); while( odbc_fetch_row( $cur ) ) { $itemID=odbc_result( $cur, 'itemID'); $rPrice=odbc_result( $cur, 'rPrice'); $percentage=odbc_result( $cur, 'percentage'); $tPrice=odbc_result( $cur, 'tPrice'); $expiry=odbc_result( $cur, 'expiry'); } echo ""; echo ""; echo ""; echo "
Retail/Sale Price"; //echo " Price/tabs : "; //echo " Nos of Tables : "; echo "
Percentage"; echo "
Trade/Purchase Price"; echo "
Openingqty: %age:Unit: Batch: Expiry: Inv#:"; //echo "
Packing"; //echo "
Stock Limit"; //echo "
Barcode"; echo "
"; echo "
"; echo ""; $query= "select itemID,itemName,rPrice,percentage,tPrice,barCode,qty,pPrice from itemTable where labid='".$_SESSION['labid']."' and itemID>0 and itemName='".protect($_GET['itemName'])."' "; $cur= odbc_exec( $conn, $query ); $cnt=0; while( odbc_fetch_row( $cur ) ) { if ($cnt++==0) echo "
S.#NameqtyRetail%ageTrade"; $itemID= odbc_result( $cur, 'itemID' ); $itemName= odbc_result( $cur, 'itemName' ); $size=strlen($itemName); $rPrice= round(odbc_result( $cur, 'rPrice' ),2); $percentage= odbc_result( $cur,'percentage'); $tPrice= round(odbc_result( $cur,'tPrice'),2); echo "
$cnt$itemName".odbc_result( $cur,'qty')."$rPrice$percentage$tPrice"; //$amount+=odbc_result( $cur, 'tPrice' )*odbc_result( $cur, 'qty' ); } //if($cnt>0) echo "
Summary".round($amount) ; echo "
"; }elseif (isset($_GET['doctorID'])){ $forDate= date("Y-m-d", strtotime($_GET['forDate'])); $query= "select * from appointment where labid='".$_SESSION['labid']."' and autoID>0 and doctorID='".protect($_GET['doctorID'])."' and forDate='$forDate' order by aptNo asc"; $cur= odbc_exec( $conn, $query ); $cnt=0; while( odbc_fetch_row( $cur ) ) { if ($cnt++==0) echo "
S.#DateApt No.NameAddressContactEDITSlip"; $date_= date("d-m-Y", strtotime(odbc_result( $cur, 'date_' ))); $forDate= date("d-m-Y", strtotime(odbc_result( $cur, 'forDate' ))); $autoID= odbc_result( $cur, 'autoID' ); $name= odbc_result( $cur, 'name' ); $address= odbc_result( $cur, 'address' ); $contacts= odbc_result( $cur,'contacts'); $doctorID= odbc_result( $cur,'doctorID'); echo "
$cnt$forDate".odbc_result( $cur, 'aptNo' )."$name$address$contactsedit" ; echo "Slip"; } echo "
"; if ($cnt==0) echo "No Record Found"; }elseif (isset($_GET['subHeadID'])){ //$query="select ID,headName from AccountHeads where labid='".$_SESSION['labid']."' and headID='".protect($_GET['headID'])."' order by order_"; $query = "select * from accountsView where labid='".$_SESSION['labid']."' and accountID>0 and headID='".protect($_GET['subHeadID'])."' order by stdName"; $cur= odbc_exec( $conn, $query ); $cnt=1; echo "
SerialAccount NameDescriptionOpeningBalanceOrderEDITLedger"; while( odbc_fetch_row( $cur ) ) { $ID= odbc_result( $cur, 'ID' ); $headName= odbc_result( $cur, 'headName' ); $headType= odbc_result( $cur, 'headType' ); $openingBalance= odbc_result( $cur, 'openingBalance' ); $order_= odbc_result( $cur, 'order_' ); $symbol= odbc_result( $cur, 'headDescription' ); echo "
$cnt$headName$symbol$openingBalance".round(odbc_result($cur,'Balance'))."$order_edit" ; echo "ledger" ; $cnt+=1; } echo "
"; }elseif (isset($_GET['headID'])){ //$classID = $_GET['classID']; //$query= "select ID,Name from section where labid='".$_SESSION['labid']."' and ID in (select distinct section_ from student where labid='".$_SESSION['labid']."' and fitClass='".protect($_GET['headID'])."') order by ID"; $query="select ID,headName from AccountHeads where labid='".$_SESSION['labid']."' and headID='".protect($_GET['headID'])."' order by order_"; $cur= odbc_exec( $conn, $query ); while( odbc_fetch_row( $cur ) ) { echo ""; } }elseif (isset($_GET['headID3'])){ $query = "select * from AccountHeads where labid='".$_SESSION['labid']."' and ID>0 and headID='".protect($_GET['headID3'])."' order by headType,order_"; $cur= odbc_exec( $conn, $query ); $cnt=1; echo "
"; echo "
"; while( odbc_fetch_row( $cur ) ) { $ID= odbc_result( $cur, 'ID' ); $headName= odbc_result( $cur, 'headName' ); $headType= odbc_result( $cur, 'headType' ); $openingBalance= odbc_result( $cur, 'openingBalance' ); $order_= odbc_result( $cur, 'order_' ); $symbol= odbc_result( $cur, 'headDescription' ); echo "
SerialAccount NameOrderSymbolEDIT
$cnt$headName$order_$symboledit" ; $cnt+=1; } echo "
"; }elseif (isset($_GET['headID4'])){ $query = "select * from accountsView where labid='".$_SESSION['labid']."' and mainHeadID='".protect($_GET['headID4'])."' order by stdName"; //$query= "select * from student where labid='".$_SESSION['labid']."' and accountID>0 order by accountID desc"; //echo $query; $cur= odbc_exec( $conn, $query ); $cnt=1; while( odbc_fetch_row( $cur ) ) { if ($cnt==1) echo "
S.#NameAddressOpeningBalanceEditPurchasepReturnPaymentsLedger"; $date_= date("d-m-Y", strtotime(odbc_result( $cur, 'date_' ))); $accountID= odbc_result( $cur, 'ID' ); $accountName= odbc_result( $cur, 'stdName' ); $address= odbc_result( $cur, 'address' ); $contacts= odbc_result( $cur,'contacts'); echo "
$cnt$accountName$address".odbc_result($cur,'admFee')."".odbc_result($cur,'Balance')."Edit"; echo "purchase"; echo "PurReturn"; //echo "sale"; //echo "saleReturn"; echo "Payments"; echo "ledger" ; $cnt+=1; } echo "
"; }elseif (isset($_GET['getBalanceID'])){ //$query = "select Balance from accountsView where labid='".$_SESSION['labid']."' and ID='".protect($_GET['getBalanceID'])."' and recordType='Account'"; $query = "select Balance from accountsView where labid='".$_SESSION['labid']."' and ID='".protect($_GET['getBalanceID'])."' "; $cur= odbc_exec( $conn, $query ); //echo "
"; while(odbc_fetch_row( $cur ) ) { echo "

Balance:".round(odbc_result($cur,'Balance'))."

"; } //echo "
"; } //odbc_ odbc_free_result($cur); odbc_close($conn); ?>