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0{H2 bQFN69?mNy6h߰-U@{HHC@{1? rY:vgxs[. 3]q׉O A`&bTO[2թ^$_+.;gIgLAl `Pnem$Xf<qf 0zC]/Xy*9˵% ٞ\}{HY-7a!K*&q +)s3GC 32թ^$_+.;gIgLAl `Pnem$Xf<qf 0zC]/miu+fdPڴ3+_nOM!=KQdÐ}\W߰*:wvY;S ֒mJO'nx0)塐㾊 $i)DDppxqϰ}hK4KthBS/A2rtD*ΦF6)fr1AHOh8vt…%e_H~մQipcgPaxV1 y<#.AnU{\B\F͛PkDŽԉxAT5R+󝚆!g)@|byp\}{HY-ḭx_4)xamResultList.php?ClassID=$ClassID&session_=$session_&termID=$termID&Section_=$Section_','_Blank')"; echo ""; //exit(); } if(isset($_POST['btnPrintDMC'])){ $session_ = $_POST['session_']; $ClassID = $_POST['ClassID']; $termID = $_POST['termID']; $Section_ = $_POST['Section_']; $subjectID = $_POST['subjectID']; //$cnt = $_POST['cnt']; $tmarks = $_POST['tmarks']; $top = getName($conn,"select openingBalance from AccountHeads where headType='dmcdmcTopMargin' and labid='".$_SESSION['labid']."'"); //$row['testname']; if($top=="") $top=34; else $top=round($top); echo ""; //exit(); } if(isset($_POST['btnDeleteMarks'])){ $session_ = $_POST['session_']; $ClassID = $_POST['ClassID']; $termID = $_POST['termID']; $Section_ = $_POST['Section_']; $subjectID = $_POST['subjectID']; $cnt = $_POST['cnt']; $tmarks = $_POST['tmarks']; $TotalPrMarks = $_POST['TotalPrMarks']; $teacherID = $_POST['teacherID']; $passpercent = $_POST['passpercent']; //$subjectsFail= addHeadValue($conn,"subjectsFail",$_POST['subjectsFail']); //$percentFail= addHeadValue($conn,"percentFail",$_POST['percentFail']); if(canDelete($conn,"marksentry")=="0"){ $query="delete from obtainedmarks where classID='$ClassID' and section_='$Section_' and termID='$termID' and year_='$session_' and subID='$subjectID' "; $cur= odbc_exec( $conn, $query ); } } if(isset($_POST['btnmarksentry'])){ $session_ = $_POST['session_']; $ClassID = $_POST['ClassID']; $termID = $_POST['termID']; $Section_ = $_POST['Section_']; $subjectID = $_POST['subjectID']; $cnt = $_POST['cnt']; $tmarks = $_POST['tmarks']; $TotalPrMarks = $_POST['TotalPrMarks']; $teacherID = $_POST['teacherID']; $passpercent = $_POST['passpercent']; if(canSave($conn,"marksentry")=="0"){ for ($i=1; $i<=$cnt; $i++) { $ID = "ID$i"; $ID = $_POST[$ID]; $th = "th$i"; $th = $_POST[$th]; $pr = "pr$i"; $pr = $_POST[$pr]; $query="delete from obtainedmarks where ID='$ID' and termID='$termID' and year_='$session_' and subID='$subjectID' "; $cur= odbc_exec( $conn, $query ); $query="insert into obtainedmarks(labid,userID,Section_,ID,Year_,TermID,ClassID,subID,totalThMarks,Thmarks,prmarks,TotalPrMarks,teacherID,passPercent) values('".$_SESSION['labid']."','$userID','$Section_','$ID','$session_',$termID,$ClassID,$subjectID,$tmarks,'$th','$pr',$TotalPrMarks,$teacherID,$passpercent)"; $cur= odbc_exec( $conn, $query ); } } //paper position $query="select ID,Thmarks1 from obtainedmarks where termID='$termID' and labid='".$_SESSION['labid']."' and year_='$session_' and subID='$subjectID' and ClassID='$ClassID' and Section_='$Section_' order by ThMarks1 desc "; $cur= odbc_exec( $conn, $query ); $cnt=0; $preMarks=0; while( odbc_fetch_row( $cur ) ) { $ID= odbc_result( $cur,"ID"); if($preMarks!=odbc_result( $cur,"Thmarks1")) $cnt++; $query="update obtainedmarks set position='".$cnt."' where ID='".odbc_result($cur,"ID")."' and labid='".$_SESSION['labid']."' and termID='$termID' and year_='$session_' and subID='$subjectID' and ClassID='$ClassID' and Section_='$Section_' "; odbc_exec( $conn, $query ); $preMarks= odbc_result( $cur,"Thmarks1"); } } if(isset($_POST['submit'])){ //$session_ = $_POST['session_']; $session_ = $_POST['session_']; $ClassID = $_POST['ClassID']; $termID = $_POST['termID']; $Section_ = $_POST['Section_']; $subjectID = $_POST['subjectID']; //$Section_ = $_POST['Section_']; //$tmarks = $_POST['tmarks']; } //Warning: odbc_exec(): SQL error: [Microsoft][ODBC SQL Server Driver][SQL Server]Invalid column name 'ClassID'., SQL state S0022 in SQLExecDirect in D:\xampp\htdocs\attHospital2\marksentry.php on line 92 if(isset($_POST['btnGenerateRollnos'])){ //$session_ = $_POST['session_']; $session_ = $_POST['session_']; $ClassID = $_POST['ClassID']; $termID = $_POST['termID']; $Section_ = $_POST['Section_']; $subjectID = $_POST['subjectID']; $maxSession=getName($conn,"select max(Year_) from rollno where labid='".$_SESSION['labid']."'"); if($session_>=$maxSession){ $cur= odbc_exec( $conn, "delete from RollNo where TermID='$termID' and Year_='$session_' and labid='".$_SESSION['labid']."' " ); $query=" insert into RollNo(labid,ID,RollNo,Year_,TermID,classID,Section_) "; $query.=" select labid,ID,ID,'$session_','$termID',programID,sectionID from student where recordType='Std' and status=0 and labid='".$_SESSION['labid']."' "; //echo $query; odbc_exec( $conn, $query ); echo "Rollnos Arranged successfully"; }else{ echo "Sorry! can't be arranged"; } } if(isset($_POST['btnCalculateResult'])){ set_time_limit ( 100 ); $subjectsFail= addHeadValue($conn,"subjectsFail",$_POST['subjectsFail']); $percentFail= addHeadValue($conn,"percentFail",$_POST['percentFail']); $sfCheck=isset($_POST['sfCheck'])?1:0; $sfCheck= addHeadValue($conn,"subjectsFailCheck",$sfCheck); $pfCheck=isset($_POST['pfCheck'])?1:0; $pfCheck= addHeadValue($conn,"percentFailCheck",$pfCheck); $session =$session_ = $_POST['session_']; $ClassID = $_POST['ClassID']; $termID = $_POST['termID']; $Section_ = $_POST['Section_']; $subjectID = $_POST['subjectID']; //$session = $_POST['session']; //$termID = $_POST['termID']; $failType=1;// $_POST['failType']; $subjectsFail= $_POST['subjectsFail']; $percentFail= $_POST['percentFail']; //change to thmarks1 %age //$query = " update obtainedmarks set thmarks1=thmarks where TermID='$termID' and Year_='$session' )"; $cur= odbc_exec( $conn, $query ); //$query = " update obtainedmarks set thmarks1=0 where thmarks<0 TermID='$termID' and Year_='$session' )"; $cur= odbc_exec( $conn, $query ); $query ="update obtainedmarks set totalThMarks=1 where totalThMarks+TotalPrMarks=0 and TermID='$termID' and Year_='$session' "; $cur= odbc_exec( $conn, $query ); //Calculate %age $query = " update rollno set obtMarks=(select isnull(Sum(ThMarks1),0)+isnull(sum(PrMarks1),0) from ObtainedMarks where rollno.id=ObtainedMarks.ID and ObtainedMarks.TermID='$termID' and ObtainedMarks.Year_='$session' )"; $query.= " where TermID='$termID' and Year_='$session' and id in (select ID from ObtainedMarks where TermID='$termID' and Year_='$session' ) "; $cur= odbc_exec( $conn, $query ); $query = " update rollno set TotalMarks=(select isnull(Sum(totalThMarks),0)+isnull(sum(TotalPrMarks),0) from ObtainedMarks where rollno.id=ObtainedMarks.ID and ObtainedMarks.TermID='$termID' and ObtainedMarks.Year_='$session' )"; $query.= " where TermID='$termID' and Year_='$session' and id in (select ID from ObtainedMarks where TermID='$termID' and Year_='$session' ) "; $cur= odbc_exec( $conn, $query ); $sessionStart="4"; $year_=substr($session,0,4); //Calculate Attendance $dt1 = date_01(date('Y-m-d',strtotime("01-$sessionStart-$year_"))); $dt2="select isnull(min(date_),getdate()) from datesheet where session_='$session' and termid='$termID' "; $query="select count(*) from attendance where status=0 and (Date_ between '$dt1' and ($dt2)) and attendance.ID=rollno.ID "; $query="update RollNo set Attendance=($query) "; $query.=" where TermID='$termID' and Year_='$session' "; //odbc_exec( $conn, $query); $query=" select CONVERT(varchar, count(*),4) from attendance where (Date_ between '$dt1' and ($dt2)) and attendance.ID=rollno.ID "; $query="update RollNo set Attendance=Attendance+'/'+($query) "; $query.=" where TermID='$termID' and Year_='$session' "; //odbc_exec( $conn, $query); //Calculate Remarks old $query="update rollno set remarks='Pass' where TermID='$termID' and Year_='$session' and labid='".$_SESSION['labid']."' "; odbc_exec( $conn, $query); if($failType=="0"){ $query = "select rollno from obtainedmarks where TermID='$termID' and Year_='$session' and remarks='Fail' group by rollno having count(remarks)>$subjectsFail"; $query = "update rollno set remarks='Fail' where TermID='$termID' and Year_='$session' and id in ($query)"; }else{ // on Aggregate $query = "select ID from rollno where TermID='$termID' and Year_='$session' and obtmarks*100/totalmarks<$percentFail"; $query = "update rollno set remarks='Fail' where TermID='$termID' and Year_='$session' and id in ($query)"; } //odbc_exec( $conn, $query); //Calculate Remarks new $query = "update rollno set remarks='Fail' where TermID='$termID' and Year_='$session' and labid='".$_SESSION['labid']."'"; if($sfCheck==1 and $pfCheck==1){ $ids = "select ID from obtainedmarks where TermID='$termID' and Year_='$session' and remarks='Fail' group by ID having count(remarks)>$subjectsFail"; $ids2 = "select ID from rollno where TermID='$termID' and Year_='$session' and obtmarks*100/totalmarks<$percentFail"; $query.= " and (id in ($ids) or id in ($ids2) ) "; }elseif($sfCheck==1){ $ids = "select ID from obtainedmarks where TermID='$termID' and Year_='$session' and remarks='Fail' group by ID having count(remarks)>$subjectsFail"; $query.= " and id in ($ids)"; }elseif($pfCheck==1){ $ids = "select ID from rollno where TermID='$termID' and Year_='$session' and obtmarks*100/totalmarks<$percentFail"; $query.= " and id in ($ids)"; } odbc_exec( $conn, $query); //echo "



".$query; //$failType=getName($conn,"select Description from FeeHeads where headType='failType'"); //calculate positions odbc_exec( $conn, "update rollno set percentage=(obtMarks*100/TotalMarks) where termid='$termID' and year_='$session' "); $query = "Select percentage,ID from RollNo where TermID='$termID' and Year_='$session' order by percentage desc"; $positionNo=0;$prepercentFail=0; //$rsCount ="22";// getName($conn,"Select Count(ID) from RollNo where TermID='$termID' and Year_='$session'"); $cur= odbc_exec( $conn, $query ); while( odbc_fetch_row( $cur ) ) { if($prepercentFail!=odbc_result( $cur, 'percentage' )) $positionNo++; odbc_exec( $conn, "update rollno set schoolPosition='$positionNo' where id='".odbc_result( $cur, 'ID' )."' and termid='$termID' and year_='$session'" ); $prepercentFail=odbc_result($cur,'percentage'); } $cur1= odbc_exec( $conn, "Select ClassID,count(*) from RollNo where TermID='$termID' and Year_='$session' group by classid" ); while( odbc_fetch_row( $cur1 ) ) { $query = "Select percentage,ID from RollNo where classID='".odbc_result( $cur1, 'ClassID' )."' and TermID='$termID' and Year_='$session' order by percentage desc"; $positionNo=0;$prepercentFail=0; //$rsCount =odbc_result( $cur1, 1 ); $cur= odbc_exec( $conn, $query ); while( odbc_fetch_row( $cur ) ) { if($prepercentFail!=odbc_result( $cur, 'percentage' )) $positionNo++; odbc_exec( $conn, "update rollno set classPosition='$positionNo' where id='".odbc_result( $cur, 'ID' )."' and termid='$termID' and year_='$session'" ); $prepercentFail=odbc_result( $cur,'percentage'); } } //''''''''''''''''''''''' Section wise POosition $cur1= odbc_exec( $conn, "Select section_,ClassID,count(*) from RollNo where TermID='$termID' and Year_='$session' group by section_,ClassID" ); while( odbc_fetch_row( $cur1 ) ) { $query = "Select percentage,ID from RollNo where classID='".odbc_result( $cur1, 'ClassID' )."' and section_='".odbc_result( $cur1, 'section_' )."' and TermID='$termID' and Year_='$session' order by percentage desc"; $positionNo=0;$prepercentFail=0; //$rsCount =odbc_result( $cur1, 2 ); $cur= odbc_exec( $conn, $query ); while( odbc_fetch_row( $cur ) ) { if($prepercentFail!=odbc_result( $cur, 'percentage' )) $positionNo++; odbc_exec( $conn, "update rollno set sectionPosition='$positionNo' where id='".odbc_result( $cur, 'ID' )."' and termid='$termID' and year_='$session'" ); $prepercentFail=odbc_result( $cur, 'percentage' ); } } //echo $query = "update rollno set sectionPosition=(select positionName from position where position.positionID=CAST(rollno.sectionPosition AS int)) where termid='$termID' and year_='$session'" ; $query = "update rollno set sectionPosition=(select positionName from position where position.positionID=rollno.sectionPosition) where termid='$termID' and year_='$session'" ; $cur= odbc_exec( $conn, $query ); echo "Result Calculated "; //echo fillCMB($conn,$feeID,"select ID,Description from FeeHeads where (headType='feeHead') order by order_"); } $subjectsFail=getName($conn,"select headName from AccountHeads where headType='subjectsFail' and labid='".$_SESSION['labid']."' "); $percentFail=getName($conn,"select headName from AccountHeads where headType='percentFail' and labid='".$_SESSION['labid']."' "); if($subjectsFail=="") $subjectsFail= 3; if($percentFail=="") $percentFail= 40; $sfCheck=getName($conn,"select headName from AccountHeads where headType='subjectsFailCheck' and labid='".$_SESSION['labid']."' "); $pfCheck=getName($conn,"select headName from AccountHeads where headType='percentFailCheck' and labid='".$_SESSION['labid']."' "); if($sfCheck=="") $sfCheck= 1; if($pfCheck=="") $pfCheck= 1; ?> HOME




> Passing Papers
> Passing Percentage



> Promotion Password



Add DMC Heading/Banner "; //echo ""; /* echo "
Program
"; echo "
Semester
"; echo "
Marks
"; echo "
"; echo ""; echo "
"; */ ?>
#IDNameFather NameMarks
Oral/Prac
Position"; while( odbc_fetch_row( $cur ) ) { $ID= odbc_result( $cur,"ID"); $arr =getName($conn,"select stdName,fname from student where ID='$ID' and labid='".$_SESSION['labid']."' "); $name=$arr[1];// odbc_result( $cur,"stdName"); $fname=$arr[2];// odbc_result( $cur,"stdName"); //$fname= odbc_result( $cur,"fname"); //if ($tmarks==0) $thmarks=-2; else $thmarks=0; //if ($TotalPrMarks==0) $prmarks=-2; else $prmarks=0; $arr =getName($conn,"select thmarks,prmarks,teacherID,passpercent,position from obtainedmarks where subID='$subjectID' and termID='$termID' and year_='$session_' and ID='$ID' "); if(count($arr)>0){ if($arr[1]>0) $thmarks=round($arr[1],2); else $thmarks=0; if($arr[2]>0) $prmarks=round($arr[2],2); else $prmarks=0; //if($arr[3]>0) $teacherID=$arr[3]; if($arr[4]>0) $passpercent=$arr[4]; } echo "
$cnt$ID$name$fname"; if($thmarks<=$tmarks) echo ""; else echo ""; if($prmarks<=$TotalPrMarks) echo "".$arr[5] ; else echo "".$arr[5] ; echo ""; $cnt+=1; } $cnt-=1; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo "
Teacher : "; echo "Passing %age : "; echo ""; echo "
"; ?>