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/4y9( n cJ %tBH_:`^LZxHdrģ%b۠|y0 DOSq^Amxt?/_.;tSwvѱ!/TOR?X eD_ 쮎̓)L!^;,P`v6IDay3[#m hՊ8uu•&K#k|S%3ng󊍤)+dk 0hˑJ??&efOY٥ӧ1X7q\YLu"" 9~b!Vw[5 p-i@ۚoxwDCQwo댺![PP]YIAse{JݺWH/.[5h NvM;]MF- lx#l' dul K; $Project=""; //$_POST['Project']; //$pass=getName($conn,"select password from student where stdID='$stdID'"); $pass="123"; //$cur= odbc_exec( $conn, "delete from student where stdID='$stdID'"); if($stdID=="") $stdID=getName($conn,"select isnull(max(ID),0)+1 from student "); /* $machineid2=getName($conn,"select stdName from student where machineid='$machineid' and status=0 and stdID<>'$stdID'"); if($machineid2!=""){ $machineid=null; echo ""; }else{ $cur= odbc_exec( $conn, "update Leaves set machineid='$machineid' where stdID='$stdID'" ); } */ if(getName($conn,"select 1 from student where ID='$stdID'")==""){ $query="insert into student (recordType,ID,Session_,Project,district,facultyID,personalNo,entry1,exit1,programID,password,techID,sectionID,semesterID,Date_,gender,nic,email,dob,machineid,batchNo,Status,stdID,stdName,fName,address,contacts) values('Std','$stdID','$Session_','$Project','$district','$facultyID','$personalNo','$entry1','$exit1','$programID','$pass','$techID','$sectionID','$semesterID','$Date_','$gender','$nic','$email','$dob','$machineid','$batchNo','$Status','$stdID','$stdName','$fName','$address','$contacts')"; }else{ $query="update student set district='$district',facultyID='$facultyID',personalNo='$personalNo',entry1='$entry1',exit1='$exit1'"; $query.=",programID='$programID',techID='$techID',sectionID='$sectionID',semesterID='$semesterID',Date_='$Date_'"; $query.=",Session_='$Session_',Project='$Project',gender='$gender',nic='$nic',email='$email',dob='$dob',machineid='$machineid',batchNo='$batchNo',Status='$Status'"; $query.=",stdName='$stdName',fName='$fName',address='$address',contacts='$contacts' where ID='$stdID'"; } //echo $query; $cur= odbc_exec( $conn, $query ); /* $cur= odbc_exec( $conn, "update student set machineid=null where machineid=0" ); $cur= odbc_exec( $conn, "delete from empTimings where stdID='$stdID'" ); $cur= odbc_exec( $conn, "delete from empTimings where machineid='$machineid'" ); if($machineid!="" or $machineid!="0"){ $query="insert into empTimings (stdID,machineid,entry1,exit1,type) values ('$stdID','$machineid','$entry1','$exit1','Normal') "; //echo $query; $cur= odbc_exec( $conn, $query ); $query="update student set entry1='$entry1' where shift='$shift' and entry1<>'$entry1' "; $cur= odbc_exec( $conn, $query ); $query="update student set exit1='$exit1' where shift='$shift' and exit1<>'$exit1' "; $cur= odbc_exec( $conn, $query ); $query="update empTimings set entry1='$entry1' where entry1<>'$entry1' and stdID in(select stdID from student where status=0 and shift='$shift') "; $cur= odbc_exec( $conn, $query ); $query="update empTimings set exit1='$exit1' where exit1<>'$exit1' and stdID in(select stdID from student where status=0 and shift='$shift') "; $cur= odbc_exec( $conn, $query ); } */ $cur=calculateBalance($conn,$stdID); echo ""; //echo "thin"; } if(isset($_POST['find'])) $keyword= $_POST['keyword']; if(isset($_GET['programID'])) $programID= $_GET['programID']; if(isset($_GET['Session_'])) $Session_= $_GET['Session_']; if (isset($_POST['btnCSV'])) { //$query = "select left(stdName,charindex(' ',stdName)) as username,left(stdName,charindex(' ',stdName)) as firstname,right(stdName,charindex(' ',stdName)) as lastname,email from student where stdID>0 and email<>'' "; $query = "select programName+'-'+stdName as Name,Email,'*myContacts' as 'Group Membership','Mobile' as 'Phone 1 Type',personalNo as 'Phone 1 - Value' from studentView where stdID>0 and personalNo<>'' and programName='Audiology'"; $time_=date('d-m-Y-s-a', time()); $fileName="d:\StdListMoodle$time_.csv"; echo "
".$ret=query2CSV($conn,$query,$fileName); } if (isset($_GET['showid'])) { $stdID = $_GET['showid']; $query = "select * from student where stdID='$stdID'"; //echo $query; $cur= odbc_exec( $conn, $query ); while( odbc_fetch_row( $cur ) ) { $stdName= odbc_result( $cur, 'stdName' ); $fName= odbc_result( $cur, 'fname' ); $Date_ = date('Y-m-d',strtotime(odbc_result( $cur, 'Date_'))); $contacts= odbc_result( $cur, 'contacts' ); $address= odbc_result( $cur, "address" ); $Status= odbc_result( $cur, "Status" ); $batchNo= odbc_result( $cur, "batchNo" ); $machineid= odbc_result( $cur, "machineid" ); $email= odbc_result( $cur, "email" ); $nic= odbc_result( $cur, "nic" ); $techID= odbc_result( $cur, "techID" ); $programID= odbc_result( $cur, "programID" ); $semesterID= odbc_result( $cur, "semesterID" ); $shift= odbc_result( $cur, "shiftID" ); $section_= odbc_result( $cur, "section_" ); $sectionID= odbc_result( $cur, "sectionID" ); $gender= odbc_result( $cur, "gender" ); $entry1= odbc_result( $cur, "entry1" ); $exit1= odbc_result( $cur, "exit1" ); $personalNo= odbc_result( $cur, "personalNo" ); $facultyID= odbc_result( $cur, "facultyID" ); $district= odbc_result( $cur, "district" ); $Session_= odbc_result( $cur, "Session_" ); $Project= odbc_result( $cur, "Project" ); $dob = date('Y-m-d',strtotime(odbc_result( $cur, "dob"))); } } ?>
"; echo "
"; echo ""; echo "ADMISSION FORM "; //echo "Student ID"; echo "Biometric ID"; if($Status==0) echo "Active"; else echo "Active"; echo "Date of Admission"; echo "Session_"; echo "Batch"; echo "Program +"; /* echo "Faculty +"; echo "Technology +"; */ echo "Semester"; echo "Section"; echo "Name"; if($gender=='0') echo " Male Female "; else echo " Male Female "; echo "Father/Husband Name"; echo "NIC"; echo "Contact/SMS No."; echo "Other Contacts"; echo "E-mail"; echo "District/Domicile"; echo "Date of Birth"; echo "Address"; echo "Shift"; echo " "; echo " "; //echo ""; ?>
"; ?>
"; echo ""; //echo "
"; ?> "; $stdID= ""; $stdName= ""; if(isset($_POST['find'])){ $keyword= $_POST['keyword']; } if ($keyword!="") { $query= "select stdID,stdName,fname,techName,personalNo,machineid from studentview where stdID>0 and (programName like'%$keyword%' or machineid like'%$keyword%' or stdName like'%$keyword%' or fName like'%$keyword%' or contacts like'%$keyword%' or machineid like'%$keyword%' or session_ like'%$keyword%' or Project like'%$keyword%') order by machineid desc,stdName asc"; }else $query= "select top 20 stdID,stdName,fname,techName,personalNo,machineid from studentview where stdID>0 order by stdID desc"; //echo $query; $cur= odbc_exec( $conn, $query ); $cnt=1; while( odbc_fetch_row( $cur ) ) { if ($cnt==1) echo "
S.#Student NameFather NameContactEduFeeProfileCard"; //$date= date("d-m-Y", strtotime(odbc_result( $cur, 1 ))); $stdID= odbc_result( $cur, 'stdID' ); $stdName= odbc_result( $cur, "stdName" ); $fName= odbc_result( $cur, 'fname' ); $techName= odbc_result( $cur, 'techName' ); //$shift= odbc_result( $cur,'shiftName'); //$semester= odbc_result( $cur,'semester'); $personalNo= odbc_result( $cur,'personalNo'); $machineid= odbc_result( $cur,'machineid'); //if (odbc_result( $cur,8)=="0") $status="Enrolled" ; else $status="Struck Off" ; echo "
$cnt$stdName$fName$personalNoEduFee"; //echo "leave"; echo "profile" ; echo "Card" ; //echo "
"; //echo ""; //echo "
"; $cnt+=1; } echo "
"; if ($cnt==1) echo "No Record Found"; odbc_close($conn); /* CREATE VIEW dbo.studentView AS SELECT dbo.student.stdID, dbo.student.dob, dbo.student.stdName, dbo.student.fname, dbo.student.contacts, dbo.student.address, dbo.student.Balance, dbo.student.Status, dbo.student.gender, dbo.student.email, dbo.student.nic, dbo.student.techID, dbo.student.semesterID, AccountHeads_1.headName AS semesterName, dbo.student.sectionID, AccountHeads_2.headName AS sectionName, dbo.student.programID, AccountHeads_3.headName AS programName, dbo.AccountHeads.headName AS techName, dbo.student.machineid, dbo.student.imgPath, dbo.student.facultyID, dbo.student.district, AccountHeads_4.headName AS facultyName, dbo.student.Project, dbo.student.Session_, dbo.student.personalNo FROM dbo.AccountHeads INNER JOIN dbo.student ON dbo.AccountHeads.ID = dbo.student.techID INNER JOIN dbo.AccountHeads AccountHeads_1 ON dbo.student.semesterID = AccountHeads_1.ID INNER JOIN dbo.AccountHeads AccountHeads_2 ON dbo.student.sectionID = AccountHeads_2.ID INNER JOIN dbo.AccountHeads AccountHeads_3 ON dbo.student.programID = AccountHeads_3.ID INNER JOIN dbo.AccountHeads AccountHeads_4 ON dbo.student.facultyID = AccountHeads_4.ID WHERE (dbo.student.stdID > 0) */ ?>