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3A3z^PC%b_: ֊xZiw7ܔDmۻAB.5-x#O-1ZBnN/dmA']0G$,7-%V ?HnU/+PZ]QOzVjf;uP宂89Lrc=gSEYIo\y@5e[,U蹸88(:='$stdID'"); if($machineid2!=""){ $machineid=null; echo ""; }else{ $cur= odbc_exec( $conn, "update Leaves set machineid='$machineid' where stdID='$stdID'" ); } */ if($machineid>0){ $machineid2=getName($conn,"select stdName from student where machineid='$machineid' and ID<>'$stdID' and status=0"); 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($_GET['batchNo'])) $batchNo= $_GET['batchNo']; 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($_POST['btnSavePhoto'])){ $stdID= $_POST['stdID']; $target_dir = "ClassPhotos/"; $target_file = $target_dir ."$stdID-". basename($_FILES["fileToUpload"]["name"]); //echo $target_file; $uploadOk = 1; $imageFileType = pathinfo($target_file,PATHINFO_EXTENSION); // Check if image file is a actual image or fake image $check = getimagesize($_FILES["fileToUpload"]["tmp_name"]); if($check !== false) { //echo "File is an image - " . $check["mime"] . ".". $target_file; $uploadOk = 1; } else { echo "File is not an image.". $target_file; $uploadOk = 0; } // Allow certain file formats //if($imageFileType != "jpg" && $imageFileType != "png" && $imageFileType != "jpeg" && $imageFileType != "gif") { if($imageFileType != "jpg" ) { echo "Sorry, only JPG allowed."; $uploadOk = 0; } // Check file size if ($_FILES["fileToUpload"]["size"] > 90000) { echo "Sorry, your file is too large."; $uploadOk = 0; } // Check if file already exists if (file_exists($target_file) and $uploadOk<>0) { //echo "Sorry, file already exists."; //$uploadOk = 0; unlink($target_file); } // Check if $uploadOk is set to 0 by an error if ($uploadOk == 0) { echo "Sorry, your file was not uploaded."; // if everything is ok, try to upload file } else { if (move_uploaded_file($_FILES["fileToUpload"]["tmp_name"], $target_file)) { //echo "The file ". basename( $_FILES["fileToUpload"]["name"]). " has been uploaded."; $path_="ClassPhotos/".getName($conn,"select imgPath from student where ID='$stdID'"); if (file_exists($path_) ) { unlink($path_); } $a=$stdID."-".basename($_FILES["fileToUpload"]["name"]); $date2 = date('Y-m-d', time()); //$query="update Student set imgPath='$a' where stdID='$stdID'"; $query="update Student set imgPath='$a' where ID='$stdID'"; $cur= odbc_exec( $conn, $query ); } else { echo "Sorry, there was an error uploading your file."; } } } 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"))); $imgPath= odbc_result( $cur, "imgPath" ); } } ?>
"; 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 ""; ?>
"; if($imgPath!=""){ echo"$imgPath"; //echo "
"; } if($stdID!=""){ echo "
"; echo ""; echo "Photo"; 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$personalNoEdu"; echo "Fee"; echo "profile" ; echo "Card" ; //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) */ ?>