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($cur1,'ClassID')."' and section_='".odbc_result($cur1,'section_')."' and termid='$lastTerm' and year_='$session'" ); $maxMarks="select isnull(Sum(totalThMarks),0)+isnull(sum(totalprMarks),0) from obtainedmarks where rollno='".odbc_result($cur,'ID')."' and termid in ($ids) and year_='$session' "; odbc_exec($conn,"update rollno set TotalMarks=($maxMarks) where classID='".odbc_result($cur1,'ClassID')."' and section_='".odbc_result($cur1,'section_')."' and termid='$lastTerm' and year_='$session'" ); } if($obtMarks!=odbc_result($cur,'obtMarks')) $positionNo++; odbc_exec($conn,"update rollno set sectionPosition='$positionNo' where id='".odbc_result( $cur, 'ID' )."' and termid='$lastTerm' and year_='$session'" ); $obtMarks=odbc_result( $cur, 'obtMarks' ); } } //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='$lastTerm' and year_='$session'" ; $cur= odbc_exec( $conn, $query ); //Pass/Fial (40%) $query = "update rollno set remarks='Pass' where (obtMarks*100/TotalMarks)>=40 and termid='$lastTerm' and year_='$session'" ; $cur= odbc_exec( $conn, $query ); $query = "update rollno set remarks='Fail' where (obtMarks*100/TotalMarks)<40 and termid='$lastTerm' and year_='$session'" ; $cur= odbc_exec( $conn, $query ); } if(isset($_POST['btnmarksentry'])){ $paperType = $_POST['paperType']; $session = $_POST['session']; $classID = $_POST['classID']; $termID = $_POST['termID']; $sectionID = $_POST['sectionID']; $subID = $_POST['subID']; $cnt = $_POST['cnt']; $TotalThMarks = $_POST['TotalThMarks']; $TotalPrMarks = 0;// $_POST['TotalPrMarks']; $teacherid = $_POST['teacherid']; $passpercent = $_POST['passpercent']; //$query="update classsubmarks set Thmarks='$TotalThMarks',PrMarks='$TotalPrMarks',Passpercent='$passpercent' where subID='$subID' and classID='$classID'"; //echo $query; //$cur= odbc_exec( $conn, $query ); for ($i=1; $i<=$cnt; $i++) { $stdID = "stdID$i"; $stdID = $_POST[$stdID]; $th = "th$i"; $th = $_POST[$th]; //$pr = "pr$i"; $pr =0;// $_POST[$pr]; //echo substr($_SESSION['stdID'],0,5); $query="delete from obtainedmarks where rollno='$stdID' and termID='$termID' and year_='$session' and subID='$subID' and paperType='$paperType' "; $cur= odbc_exec($conn,$query); //echo "
".$query; $query="insert into obtainedmarks(paperType,rollno,Year_,TermID,classID,Section_,subID,TotalThMarks,TotalPrMarks,Thmarks,PrMarks,TeacherID,passPercent) values('$paperType','$stdID','$session',$termID,$classID,$sectionID,$subID,$TotalThMarks,$TotalPrMarks,$th,$pr,$teacherid,$passpercent)"; $cur= odbc_exec( $conn, $query ); //echo "
".$query; } } if(isset($_POST['btnShowDMC'])){ //echo "done"; $session = $_POST['session']; $termID = $_POST['termID']; $classID = $_POST['classID']; $sectionID = $_POST['sectionID']; echo ""; //exit(); } if(isset($_POST['btnShowDMC2'])){ //echo "done"; $session = $_POST['session']; $termID = $_POST['termID']; $classID = $_POST['classID']; $sectionID = $_POST['sectionID']; echo ""; //exit(); } if(isset($_POST['btnPaperMarks'])){ $session = $_POST['session']; $classID = $_POST['classID']; $termID = $_POST['termID']; $sectionID = $_POST['sectionID']; $subID = $_POST['subID']; echo ""; //exit(); } if(isset($_POST['submit'])){ $session = $_POST['session']; $classID = $_POST['classID']; $termID = $_POST['termID']; $sectionID = $_POST['sectionID']; $subID = $_POST['subID']; $paperType = $_POST['paperType']; //$totalMarks = $_POST['totalMarks']; } if(isset($_POST['btnMissing'])){ $session = $_POST['session']; $classID = $_POST['classID']; $termID = $_POST['termID']; $sectionID = $_POST['sectionID']; $subID = $_POST['subID']; $paperType = $_POST['paperType']; $th=$td=""; echo ""; //$query = "select distinct TermID,totalthmarks from obtainedmarks where classID='$classID' and section_='$sectionID' and paperType='$paperType' and subID='$subID' and year_='$session' order by TermID,totalthmarks "; $query = "select distinct TermID,paperType,totalthmarks from obtainedmarks where classID='$classID' and section_='$sectionID' and subID='$subID' and year_='$session' order by TermID,paperType,totalthmarks "; $rs2= odbc_exec( $conn, $query ); while( odbc_fetch_row( $rs2 ) ) { $th.="".$th; echo "".$td; echo "
".getName($conn,"select termname from term where termid=".odbc_result( $rs2,"TermID")); $td.="".odbc_result( $rs2,"totalthmarks"); //echo "".odbc_result( $rs2,"totalthmarks"); echo ""; } echo "
"; exit(); } if(isset($_POST['btnDelete'])){ $session = $_POST['session']; $classID = $_POST['classID']; $termID = $_POST['termID']; $sectionID = $_POST['sectionID']; $subID = $_POST['subID']; $paperType = $_POST['paperType']; //if canDelete() //echo "delete from ObtainedMarks where year_='$session' and classID='$classID' and termID='$termID' and section_='$sectionID' and subID='$subID' and paperType='$paperType' "; $cur= odbc_exec($conn,"delete from ObtainedMarks where year_='$session' and classID='$classID' and termID='$termID' and section_='$sectionID' and subID='$subID' and paperType='$paperType' "); } if(isset($_POST['btnPaperpercentage'])){ $session = $_POST['session']; $classID = $_POST['classID']; $termID = $_POST['termID']; $sectionID = $_POST['sectionID']; $subID = $_POST['subID']; $paperType = $_POST['paperType']; $txtPercentage = $_POST['txtPercentage']; //if canDelete() $query="update obtainedmarks set passpercent='$txtPercentage' where year_='$session' and termID='$termID' "; if($txtPercentage!="") $cur= odbc_exec($conn,$query); echo "Percentage updated to $txtPercentage"; } $total1= 0; $discount1= 0; $paid1= 0; echo "
"; echo ""; echo ""; echo "
Session
Term
Class
Subject
Paper Type
+"; //$totalMarks = $_POST['totalMarks']; if($totalMarks=="") $totalMarks=getName($conn,"select top 1 totalthmarks from obtainedmarks where totalThMarks>0 and paperType='$paperType' and subID='$subID' and classID='$classID' order by termID desc,year_ desc"); //echo "
Total Marks : "; echo "

"; echo "
"; echo ""; echo "
"; echo "
"; echo ""; echo "
"; echo "
"; ?>
"; $query = "select distinct TermID,totalthmarks from obtainedmarks where classID='$classID' and section_='$sectionID' and paperType='$paperType' and subID='$subID' and year_='$session' order by TermID,totalthmarks "; $rs2= odbc_exec( $conn, $query ); while( odbc_fetch_row( $rs2 ) ) { $th.="".getName($conn,"select termname from term where termid=".odbc_result( $rs2,"TermID")); $td.="".odbc_result( $rs2,"totalthmarks"); //echo "".odbc_result( $rs2,"totalthmarks"); } echo "".$th; echo "".$td; echo ""; if($subID!=""){ //$query = "SELECT distinct subname as Subject,paperTypeName as Type_,section_,totalThMarks as TotalMarks from dmcPreSchoolView where subID='$subID' and paperType='$paperType' and termID in($termID) and year_='$session' order by subname,section_,totalThMarks"; $query = "SELECT distinct subid,paperType,section_,totalThMarks from obtainedMarks where classID='$classID' and section_='$sectionID' and subID='$subID' and paperType='$paperType' and termID in($termID) and year_='$session' order by subid,section_,totalThMarks"; echo qry2Table($conn,$query); } $query = "select id,rollno,name,fname from qryrollno where classID='$classID' and sectionID='$sectionID' and termID='$termID' and year_='$session' order by rollno"; $cur= odbc_exec( $conn, $query ); $cnt=1; echo "
S.#IDRollNoNameFather Name"; $TotalThMarks=$totalMarks; echo "Marks"; while( odbc_fetch_row( $cur ) ) { $stdID= odbc_result( $cur, 1 ); $rollno= odbc_result( $cur, 2 ); $name= odbc_result( $cur, 3 ); $fname= odbc_result( $cur, 4 ); if ($TotalThMarks==0) $thmarks=-2; else $thmarks=0; if ($TotalPrMarks==0) $prmarks=-2; else $prmarks=0; $query = "select thmarks,prmarks,teacherid,passpercent from obtainedmarks where paperType='$paperType' and subID='$subID' and termID='$termID' and year_='$session' and rollno='$stdID' "; $rs2= odbc_exec( $conn, $query ); while( odbc_fetch_row( $rs2 ) ) { $thmarks= odbc_result( $rs2, 1 ); $prmarks= odbc_result( $rs2, 2 ); $teacherid=odbc_result( $rs2, 3); $passpercent=odbc_result( $rs2, 4 ); } echo "
$cnt$stdID$rollno$name$fname"; echo "" ; echo ""; $cnt+=1; } $cnt-=1; echo ""; echo ""; echo ""; echo ""; echo ""; //echo ""; echo ""; echo ""; echo "
Select Teacher : Passing %age : "; echo ""; //echo " "; echo "
"; echo "
"; if(isset($_POST['btnSelectTerms'])){// Position in Multiple //echo "done"; $session = $_POST['session']; //$termID = $_POST['termID']; $classID = $_POST['classID']; $sectionID=$sectionID2 =$_POST['sectionID2']; $ids=""; foreach($_POST['termsID'] as $value) { if($ids=="") $ids=$value; else $ids.=",".$value; } echo $ids; $selectedtermsIDs=$ids; $query= addHead($conn,$selectedtermsIDs,'selectedtermsIDs'); $query= addHead($conn,$session,'selectedYear'); //$termsID=explode(",",$ids); //$lastTerm=$termsID[count($termsID)-1]; //get Last term for position/Percentage //exit(); } echo "
"; echo ""; echo "
Session
"; echo "
Class
"; echo "
Section
"; echo "
Select Terms
"; echo "

"; echo "
Combined
"; echo "

"; $chkTermBlock=getName($conn,"select Description from feeHeads where headType='BlockAllCombined' "); if($chkTermBlock==1) echo "

Block"; else echo "

Block"; echo "
"; //echo "

"; //echo "

"; echo ""; ?>