| Current Path : /home/bolconlineco/www/aaaaaa/coordinator/ |
| Current File : /home/bolconlineco/www/aaaaaa/coordinator/studentInfo - Copy.php |
<?php
ob_start();
ob_flush();
session_start();
//clearstatcache();
date_default_timezone_set('Europe/London');
?>
<?php include('includes/header.php'); ?>
<?php
if(!isset($_SESSION['coordinator']) || $_SESSION['coordinatorrole'] != 2)
{
header("location:../index.php");
exit();
}
header("Cache-Control: no-cache, must-revalidate");
$id=$_GET['Id'];
?>
<script src="../combine/colorbox-master/jquery.colorbox.js"></script>
<link rel="stylesheet" href="../combine/colorbox-master/colorbox.css" />
<script>
$("document").ready(function(){
$("#nte tr:odd").addClass('high');
});
function checkValue (vv)
{
if(vv==='3')
{
document.getElementById('otther').style.display="inline-block";
}
else
{
document.getElementById('otther').style.display="none";
}
}
function checke (vv)
{
if(vv==='3')
{
document.getElementById('otther').style.display="inline-block";
}
else
{
document.getElementById('otther').style.display="none";
}
}
$("#date1").datepick({dateFormat:'dd/mm/yyyy'});
</script>
<script>
$("document").ready(function(){
$("#ddd").datepicker({dateFormat:'dd/mm/yy'});
});
</script>
<script>
$("#date").datepick({dateFormat:'dd/mm/yyyy'});
$(".group1").colorbox({rel:'group1'});
</script>
<div id="content">
<div id="frm">
</div>
<?php include('inc.php'); ?>
<?php
if(isset($_POST['add-fee']))
{
$fee=sql_strip($_POST['fee']);
$query = mysql_query("insert into tbl_fee values ('','$id','$fee')") or die(mysql_error());
echo "<script>window.location.href='studentInfo.php?Id=$id&fe'</script>";
}
?>
<?php
if(isset($_POST['add-fees']))
{
$payble=sql_strip($_POST['payble']);
$fee_desc=sql_strip($_POST['fee_desc']);
$date=sql_strip($_POST['ss']);
$queryInstall = mysql_query("insert into tbl_fees_install values ('','$id','$payble','$fee_desc','$date')") or die(mysql_error());
//header("location:studentInfo.php?Id=$id");
//exit();
echo "<script>window.location.href='studentInfo.php?Id=$id&af'</script>";
}
?>
<?php
if(isset($_POST['add_install']))
{
$amount=sql_strip($_POST['amount']);
$date=sql_strip($_POST['date']);
$iddd=$_GET['eid'];
$query="insert into tbl_install values ('','$id','$amount','$date')";
mysql_query($query) or die(mysql_error());
echo "<script>window.location.href='studentInfo.php?Id=$id&af'</script>";
}
?>
<?php
if(isset($_POST['pay_update']))
{
$payble=sql_strip($_POST['payble']);
$paiddate=sql_strip($_POST['paiddate']);
$eid=sql_strip($_GET['eid']);
$queryq="update tbl_install set paid='$payble',piad_date='$paiddate' where id='$eid'";
$result=mysql_query($queryq) or die(mysql_error());
echo "<script>window.location.href='studentInfo.php?Id=$id&af'</script>";
}
?>
<?php
if(isset($_POST['update-fees']))
{
$payble=$_POST['payble'];
$fee_desc=$_POST['fee_desc'];
$nfid=$_POST['fidd'];
$queryInstall = mysql_query("update tbl_fees_install set payble='$payble',des='$fee_desc' where id='$nfid'") or die(mysql_error());
// header("location:studentInfo.php?Id=$id");
// exit();
echo "<script>window.location.href='studentInfo.php?Id=$id&uf'</script>";
}
?>
<?php
if(isset($_POST['vsubmit']))
{
$vid=$_POST['vid'];
$rre=mysql_query("select * from tbl_studentvideos where videoId='$vid'") or die(mysql_error());
$qq="insert into tbl_studentvideos values ('','$id','$vid')";
mysql_query($qq) or die(mysql_error());
header("location:studentInfo.php?Id=$id");
exit();
}
?>
<?php
if(isset($_POST['upda_amount']))
{
$upd_am=$_POST['upd_am'];
$uq=mysql_query("update tbl_fee set fee='$upd_am' where rollno='$id'") or die(mysql_error());
echo "<script>window.location.href='studentInfo.php?Id=$id&uf'</script>";
}
?>
<?php
if(isset($_POST['st_document']))
{
$name=$_FILES['document']['name'];
$tmpname=$_FILES['document']['tmp_name'];
$title=$_POST['title'];
$ext=pathinfo($name,PATHINFO_EXTENSION);
$array=array('jpg','jpeg','png','pdf','doc','docx');
if(in_array($ext,$array))
{
$rand=rand();
$filename=$rand.$name;
if(move_uploaded_file($tmpname,'../combine/stdocs/'.$filename))
{
$InsertDoc=mysql_query("insert into tbl_stdocs values ('','$title','$filename','$id')") or die(mysql_error());
echo "<script>window.location.href='studentInfo.php?Id=$id&vn'</script>";
}
}
else
{
echo "<script>window.location.href='studentInfo.php?Id=$id&nv'</script>";
}
}
?>
<?php
if(isset($_GET['imgid']))
{
$imgid=$_GET['imgid'];
$qq="select filename from tbl_stdocs where id='$imgid'";
$rr=mysql_query($qq) or die(mysql_error());
$fet=mysql_fetch_array($rr);
if(file_exists('../combine/stdocs/'.$fet['filename']))
{
unlink('../combine/stdocs/'.$fet['filename']) ;
}
$q="delete from tbl_stdocs where id='$imgid'";
mysql_query($q) or die(mysql_error());
echo "<script>window.location.href='studentInfo.php?Id=$id&de'</script>";
}
?>
<div id="data">
<script type="text/javascript">
$(function() {
$("#tabs").tabs({ fx: { height: 'toggle', opacity: 'toggle' } });
});
</script>
<script type="text/javascript">
$(document).ready(function(){
$(".ui-corner-top").corner("top 10px");
$(".ui-corner-all").corner("10px");
})
</script>
<div style="padding:10px;">
Student Id:</span><?php echo $id; ?><br />
Student Name:<?php echo $fname.' '.$lname;?>
</div>
<div style="-moz-border-radius: 10px 10px 10px 10px; width:1144px" class="ui-tabs ui-widget ui-widget-content ui-corner-all" id="tabs">
<ul style="-moz-border-radius: 10px 10px 10px 10px;" class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all">
<li style="-moz-border-radius-topleft: 10px; -moz-border-radius-topright: 10px;" class="ui-corner-top ui-tabs-selected ui-state-active"><a href="#tabs-1">Personal Details</a></li>
<li style="-moz-border-radius-topleft: 10px; -moz-border-radius-topright: 10px;" class="ui-corner-top ui-state-default"><a href="#ui-tabs-9">Employment Details</a></li>
<li style="-moz-border-radius-topleft: 10px; -moz-border-radius-topright: 10px;" class="ui-corner-top ui-state-default"><a href="#ui-tabs-8">Fee Details</a></li>
<li style="-moz-border-radius-topleft: 10px; -moz-border-radius-topright: 10px;" class="ui-corner-top ui-state-default"><a href="#ui-tabs-3">Course Details</a></li>
<li style="-moz-border-radius-topleft: 10px; -moz-border-radius-topright: 10px;" class="ui-corner-top ui-state-default"><a href="#ui-tabs-4">Notes</a></li>
<li style="-moz-border-radius-topleft: 10px; -moz-border-radius-topright: 10px;" class="ui-corner-top ui-state-default"><a href="#ui-tabs-5">Tasks</a></li>
<li style="-moz-border-radius-topleft: 10px; -moz-border-radius-topright: 10px;" class="ui-corner-top ui-state-default"><a href="#ui-tabs-a">Logs</a></li>
<li style="-moz-border-radius-topleft: 10px; -moz-border-radius-topright: 10px;" class="ui-corner-top ui-state-default"><a href="#ui-tabs-7">Videos</a></li>
<li style="-moz-border-radius-topleft: 10px; -moz-border-radius-topright: 10px;" class="ui-corner-top ui-state-default"><a href="#ui-tabs-12">Documents</a></li>
</ul><div style="" id="tabs-1" class="tabsContent ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide"><ul class="thumbs">
<table width="650" border="0" id="personnaldetails" class="tablestyle">
<tr>
<td id="col">Registration Date:</td>
<td id="col2"><?php
if(isset($_POST['submit-1']))
{
$rr=$_POST['regist'];
$full=explode('-',$rr);
?>
<form action="" method="post" autocomplete="off">
<select name="day">
<option value="<?php echo $full[2]; ?>"><?php echo $full[2];?></option>
<?php
for( $d=01; $d<=31; $d++)
{
?>
<option value="<?php echo str_pad($d,2,'0',STR_PAD_LEFT);?>"><?php echo str_pad($d,2,'0',STR_PAD_LEFT);?></option>
<?php
}
?>
</select>
<select name="month">
<option value="<?php echo $full[1];?>"><?php echo $full[1];?></option>
<?php
for( $d=01; $d<=12; $d++)
{
?>
<option value="<?php echo str_pad($d,2,'0',STR_PAD_LEFT);?>"><?php echo str_pad($d,2,'0',STR_PAD_LEFT);?></option>
<?php
}
?>
</select>
<select name="year">
<option value="<?php echo $full[0]; ?>"><?php echo $full[0];?></option>
<?php
for($d=date("Y"); $d>=1960; $d--)
{
if($full[0]==$d)
{
}else{
?>
<option value="<?php echo str_pad($d,2,'0',STR_PAD_LEFT);?>"><?php echo str_pad($d,2,'0',STR_PAD_LEFT);?></option>
<?php
}
}
?>
</select>
<input type="submit" name="registrationdate" value="" class="update" style="width:30px;" />
<input type="submit" name="submm" class="cancel" value="" onClick="document.href='studentInfo.php'" />
</form>
<?php
}else{
echo date('d/m/Y',strtotime($registrationdate));
}
?>
</td>
<td>
<?php if(!isset($_POST['submit-1']))
{
?>
<form action="studentInfo.php?Id=<?php echo $id;?>#tabs-1" method="post">
<div id="btn">
<input type="hidden" name="regist" value="<?php echo $registrationdate; ?>" />
<input type="submit" name="submit-1" class="edit" value="" style="width:40px;" />
</div>
</form>
<?php
}else{
?>
<?php
}
?>
</td>
<td>
</td>
</tr>
<tr>
<td id="col">StudentID:</td>
<td id="col2"><?php echo $rollno;?></td>
</tr>
<tr>
<td id="col">Course:</td>
<td id="col2"><?php echo $resultSEt['courseName'];?></td>
</tr>
<tr>
<td id="col">Title:</td>
<td id="col2"><?php
if(isset($_POST['title-3']))
{
$title=$_POST['tit'];
?>
<form action="" method="post">
<select name="titles" id="tt" onchange='checkValue(this.value)' class="cstat">
<option value="<?php echo $title; ?>"><?php echo $title; ?></option>
<option value="Mr">Mr</option>
<option value="Mrs">Mrs</option>
<option value="Miss">Miss</option>
<option value="Mis">Mis</option>
<option value="3">Other</option>
</select>
<input type="text" name="title" value="" id="otther" style="width:160px; display:none;" />
<input type="submit" name="updatetitle" value="" class="update" />
<input type="submit" name="submm" class="cancel" value="" onClick="document.href='studentInfo.php'" />
</form>
<?php
}else{
echo $title;
}
?></td>
<td><?php if(!isset($_POST['title-3']))
{
?>
<form action="studentInfo.php?Id=<?php echo $id;?>#tabs-1" method="post">
<div id="btn">
<input type="hidden" name="tit" value="<?php echo $title; ?>" />
<input type="submit" name="title-3" class="edit" value="" style="width:40px;" />
</div>
</form>
<?php
}else{
?>
<?php
}
?></td>
</tr>
<tr>
<td id="col">First Name:</td>
<td id="col2"><?php
if(isset($_POST['submit-3']))
{
$firstname=$_POST['firstname'];
?>
<form action="" method="post">
<input type="text" name="firstname" value="<?php echo $firstname; ?>" />
<input type="hidden" name="oldfname" value="<?php echo $firstname; ?>" />
<input type="submit" name="updatefname" value="" class="update" />
<input type="submit" name="submm" class="cancel" value="" onClick="document.href='studentInfo.php'" />
</form>
<?php
}else{
echo $fname;
}
?></td>
<td><?php if(!isset($_POST['submit-3']))
{
?>
<form action="studentInfo.php?Id=<?php echo $id;?>#tabs-1" method="post">
<div id="btn">
<input type="hidden" name="firstname" value="<?php echo $fname; ?>" />
<input type="submit" name="submit-3" class="edit" value="" style="width:40px;" />
</div>
</form>
<?php
}else{
?>
<?php
}
?></td>
</tr>
<tr>
<td id="col">Last Name:</td>
<td id="col2"><?php
if(isset($_POST['submit-4']))
{
$lname=$_POST['lname'];
?>
<form action="" method="post">
<input type="text" name="lastname" value="<?php echo $lname; ?>" />
<input type="hidden" name="oldlname" value="<?php echo $lname; ?>" />
<input type="submit" name="updatelname" value="" class="update" />
<input type="submit" name="submm" class="cancel" value="" onClick="document.href='studentInfo.php'" />
</form>
<?php
}else{
echo $lname;
}
?></td>
<td><?php if(!isset($_POST['submit-4']))
{
?>
<form action="studentInfo.php?Id=<?php echo $id;?>#tabs-1" method="post">
<div id="btn">
<input type="hidden" name="lname" value="<?php echo $lname; ?>" />
<input type="submit" name="submit-4" class="edit" value="" style="width:40px;" />
</div>
</form>
<?php
}else{
?>
<?php
}
?></td>
</tr>
<tr>
<td id="col">Date OF Birth:</td>
<td id="col2"><?php
if(isset($_POST['submit-5']))
{
$dateob=$_POST['dateob'];
$full=explode('-',$dateob);
?>
<form action="" method="post">
<select name="day">
<option value="<?php echo $full[2]; ?>"><?php echo $full[2];?></option>
<?php
for( $d=01; $d<=31; $d++)
{
?>
<option value="<?php echo str_pad($d,2,'0',STR_PAD_LEFT);?>"><?php echo str_pad($d,2,'0',STR_PAD_LEFT);?></option>
<?php
}
?>
</select>
<select name="month">
<option value="<?php echo $full[1];?>"><?php echo $full[1];?></option>
<?php
for( $d=01; $d<=12; $d++)
{
?>
<option value="<?php echo str_pad($d,2,'0',STR_PAD_LEFT);?>"><?php echo str_pad($d,2,'0',STR_PAD_LEFT);?></option>
<?php
}
?>
</select>
<select name="year">
<option value="<?php echo $full[0]; ?>"><?php echo $full[0];?></option>
<?php
for($d=date("Y"); $d>=1960; $d--)
{
if($full[0]==$d)
{
}else{
?>
<option value="<?php echo str_pad($d,2,'0',STR_PAD_LEFT);?>"><?php echo str_pad($d,2,'0',STR_PAD_LEFT);?></option>
<?php
}
}
?>
</select>
<input type="submit" name="updatedob" value="" class="update" />
<input type="submit" name="submm" class="cancel" value="" onClick="document.href='studentInfo.php'" />
</form>
<?php
}else{
echo date('d/m/Y',strtotime($dob));
}
?></td>
<td><?php if(!isset($_POST['submit-5']))
{
?>
<form action="studentInfo.php?Id=<?php echo $id;?>#tabs-1" method="post">
<div id="btn">
<input type="hidden" name="dateob" value="<?php echo $dob; ?>" />
<input type="submit" name="submit-5" class="edit" value="" style="width:40px;" />
</div>
</form>
<?php
}else{
?>
<?php
}
?></td>
</tr>
<tr>
<td id="col">Email: </td>
<td id="col2"><?php
if(isset($_POST['submit-email']))
{
$email=$_POST['email'];
?>
<form action="" method="post">
<input type="text" name="newemail" value="<?php echo $email; ?>" />
<input type="hidden" name="oldemail" value="<?php echo $email; ?>" />
<input type="submit" name="updateemail" value="" class="update" />
<input type="submit" name="submm" class="cancel" value="" onClick="document.href='studentInfo.php'" />
</form>
<?php
}else{
echo $email;
}
?></td>
<td><?php if(!isset($_POST['submit-email']))
{
?>
<form action="studentInfo.php?Id=<?php echo $id;?>#tabs-1" method="post">
<div id="btn">
<input type="hidden" name="email" value="<?php echo $email; ?>" />
<input type="submit" name="submit-email" class="edit" value="" style="width:40px;" />
</div>
</form>
<?php
}else{
?>
<?php
}
?></td>
</tr>
<tr>
<td id="col">Password: </td>
<td id="col2"><?php
if(isset($_POST['submit-pass']))
{
$email=$_POST['email'];
?>
<form action="" method="post">
<input type="password" name="newpass" id="passcheck" value="" />
<input type="hidden" name="passemail" value="<?php echo $email; ?>" />
<input type="checkbox" name="chec" id="check" style="margin:0;width: 16px;height: 14px;" />Show password
<input type="submit" name="updatepass" value="" class="update" />
<input type="submit" name="submm" class="cancel" value="" onClick="document.href='studentInfo.php'" />
</form>
<?php
}else{
echo "Change Password";
}
?></td>
<td><?php if(!isset($_POST['submit-pass']))
{
?>
<form action="studentInfo.php?Id=<?php echo $id;?>#tabs-1" method="post">
<div id="btn">
<input type="hidden" name="email" value="<?php echo $email; ?>" />
<input type="submit" name="submit-pass" class="edit" value="" style="width:40px;" />
</div>
</form>
<?php
}else{
?>
<?php
}
?></td>
</tr>
<tr>
<td id="col">Address line1:</td>
<td id="col2"><?php
if(isset($_POST['submit-6']))
{
$address1=$_POST['address1'];
?>
<form action="" method="post">
<input type="text" name="newaddress1" value="<?php echo $address1; ?>" />
<input type="hidden" name="oldaddress1" value="<?php echo $address1; ?>" />
<input type="submit" name="updateaddress1" value="" class="update" />
<input type="submit" name="submm" class="cancel" value="" onClick="document.href='studentInfo.php'" />
</form>
<?php
}else{
echo $address;
}
?></td>
<td><?php if(!isset($_POST['submit-6']))
{
?>
<form action="studentInfo.php?Id=<?php echo $id;?>#tabs-1" method="post">
<div id="btn">
<input type="hidden" name="address1" value="<?php echo $address; ?>" />
<input type="submit" name="submit-6" class="edit" value="" style="width:40px;" />
</div>
</form>
<?php
}else{
?>
<?php
}
?></td>
</tr>
<tr>
<td id="col">Address line2:</td>
<td id="col2"><?php
if(isset($_POST['submit-62']))
{
$address2=$_POST['address2'];
?>
<form action="" method="post">
<input type="text" name="newaddress2" value="<?php echo $address2; ?>" />
<input type="submit" name="updateaddress2" value="" class="update" />
<input type="submit" name="submm2" class="cancel" value="" onClick="document.href='studentInfo.php'" />
</form>
<?php
}else{
echo $address2;
}
?></td>
<td><?php if(!isset($_POST['submit-62']))
{
?>
<form action="studentInfo.php?Id=<?php echo $id;?>#tabs-1" method="post">
<div id="btn">
<input type="hidden" name="address2" value="<?php echo $address2; ?>" />
<input type="submit" name="submit-62" class="edit" value="" style="width:40px;" />
</div>
</form>
<?php
}else{
?>
<?php
}
?></td>
</tr>
<tr>
<td id="col">Address line3:</td>
<td id="col2"><?php
if(isset($_POST['submit-63']))
{
$address3=$_POST['address3'];
?>
<form action="" method="post">
<input type="text" name="newaddress3" value="<?php echo $address3; ?>" />
<input type="submit" name="updateaddress3" value="" class="update" />
<input type="submit" name="submm" class="cancel" value="" onClick="document.href='studentInfo.php'" />
</form>
<?php
}else{
echo $address3;
}
?></td>
<td><?php if(!isset($_POST['submit-63']))
{
?>
<form action="studentInfo.php?Id=<?php echo $id;?>#tabs-1" method="post">
<div id="btn">
<input type="hidden" name="address3" value="<?php echo $address3; ?>" />
<input type="submit" name="submit-63" class="edit" value="" style="width:40px;" />
</div>
</form>
<?php
}else{
?>
<?php
}
?></td>
</tr>
<tr>
<td id="col">City:</td>
<td id="col2"><?php
if(isset($_POST['submit-7']))
{
$city=$_POST['city'];
?>
<form action="" method="post">
<input type="text" name="newcity" value="<?php echo $city; ?>" />
<input type="hidden" name="oldcity" value="<?php echo $city; ?>" />
<input type="submit" name="updatecity" value="" class="update" />
<input type="submit" name="submm" class="cancel" value="" onClick="document.href='studentInfo.php'" />
</form>
<?php
}else{
echo $city;
}
?></td>
<td><?php if(!isset($_POST['submit-7']))
{
?>
<form action="studentInfo.php?Id=<?php echo $id;?>#tabs-1" method="post">
<div id="btn">
<input type="hidden" name="city" value="<?php echo $city; ?>" />
<input type="submit" name="submit-7" class="edit" value="" style="width:40px;" />
</div>
</form>
<?php
}else{
?>
<?php
}
?></td>
</tr>
<tr>
<td id="col">PostCode:</td>
<td id="col2">
<?php
if(isset($_POST['PoCode']))
{
$postcode=$_POST['postcode'];
?>
<form action="studentInfo.php?Id=<?php echo $id;?>#tabs-1" method="post">
<input type="text" name="postcodes" value="<?php echo $postcode; ?>" />
<input type="hidden" name="oldrepostcode" value="<?php echo $postcode; ?>" />
<input type="submit" name="postcodeupdate" value="" class="update" />
<input type="submit" name="submm" class="cancel" value="" onClick="document.href='studentInfo.php'" />
</form>
<?php
}
else{
echo $postcode;
}
?>
</td>
<td>
<?php if(!isset($_POST['PoCode']))
{
?>
<form action="studentInfo.php?Id=<?php echo $id;?>#tabs-1" method="post">
<div id="btn">
<input type="hidden" name="postcode" value="<?php echo $postcode; ?>" />
<input type="submit" name="PoCode" class="edit" value="" style="width:40px;" />
</div>
</form>
<?php
}else{
?>
<?php
}
?>
</td>
</tr>
<tr>
<td id="col">Country:</td>
<td id="col2"><?php
if(isset($_POST['submit-8']))
{
$country=$_POST['country'];
?>
<form action="" method="post">
<select name="newcountry">
<option value="<?php echo $country; ?>"><?php echo $country; ?></option>
<?php
$q="SELECT * FROM country where name !='$country' order by name";
$r=mysql_query($q) or die(mysql_error());
while($cont=mysql_fetch_array($r))
{
?>
<option value="<?php echo $cont['name']; ?>"><?php echo $cont['name']; ?></option>
<?php
}
?>
</select>
<input type="submit" name="updatecountry" value="" class="update" />
<input type="submit" name="submm" class="cancel" value="" onClick="document.href='studentInfo.php'" />
</form>
<?php
}else{
echo $country;
}
?></td>
<td><?php if(!isset($_POST['submit-8']))
{
?>
<form action="studentInfo.php?Id=<?php echo $id;?>#tabs-1" method="post">
<div id="btn">
<input type="hidden" name="country" value="<?php echo $country; ?>" />
<input type="submit" name="submit-8" class="edit" value="" style="width:40px;" />
</div>
</form>
<?php
}else{
?>
<?php
}
?></td>
</tr>
<tr>
<td id="col">Phone:</td>
<td id="col2"><?php
if(isset($_POST['submit-9']))
{
$phone=$_POST['phone'];
?>
<form action="" method="post">
<input type="text" name="phone" value="<?php echo $phone; ?>" />
<input type="submit" name="updatephone" value="" class="update" />
<input type="submit" name="submm" class="cancel" value="" onClick="document.href='studentInfo.php'" />
</form>
<?php
}else{
echo $phone;
}
?></td>
<td><?php if(!isset($_POST['submit-9']))
{
?>
<form action="studentInfo.php?Id=<?php echo $id;?>#tabs-1" method="post">
<div id="btn">
<input type="hidden" name="phone" value="<?php echo $phone; ?>" />
<input type="submit" name="submit-9" class="edit" value="" style="width:40px;" />
</div>
</form>
<?php
}else{
?>
<?php
}
?></td>
</tr>
<tr>
<td id="col">Mobile:</td>
<td id="col2"><?php
if(isset($_POST['submit-10']))
{
$mobile=$_POST['mobile'];
?>
<form action="" method="post">
<input type="text" name="mobile" value="<?php echo $mobile; ?>" />
<input type="submit" name="updatemobile" value="" class="update" />
<input type="submit" name="submm" class="cancel" value="" onClick="document.href='studentInfo.php'" />
</form>
<?php
}else{
echo $mobile;
}
?></td>
<td><?php if(!isset($_POST['submit-10']))
{
?>
<form action="studentInfo.php?Id=<?php echo $id;?>#tabs-1" method="post">
<div id="btn">
<input type="hidden" name="mobile" value="<?php echo $mobile; ?>" />
<input type="submit" name="submit-10" class="edit" value="" style="width:40px;" />
</div>
</form>
<?php
}else{
?>
<?php
}
?></td>
</tr>
<tr>
<td id="col">Status:</td>
<td id="col2">
<?php
if(isset($_POST['submit-status']))
{
$st=$_POST['st'];
?>
<form action="" method="post">
<select name="studstatus" onchange='checke(this.value)'>
<?php
if($st==1)
{
?>
<option value="1">Active</option>
<option value="2">InActive</option>
<option value="3">Completed</option>
<option value="4">Suspended</option>
<?php
}else if($st==2)
{
?>
<option value="2">InActive</option>
<option value="1">Active</option>
<option value="3">Completed</option>
<option value="4">Suspended</option>
<?php
}else if ($st==3)
{
?>
<option value="3">Completed</option>
<option value="1">Active</option>
<option value="2">InActive</option>
<option value="4">Suspended</option>
<?php
}else if($st==4)
{
?>
<option value="4">Suspended</option>
<option value="1">Active</option>
<option value="2">InActive</option>
<option value="3">Completed</option>
<?php
}
?>
</select>
<input type="date" name="titles" value="" id="otther" style="width:160px; display:none;" />
<input type="submit" name="updatest" value="" class="update" />
<input type="submit" name="submm" class="cancel" value="" onClick="document.href='studentInfo.php'" />
</form>
<?php
}else{
if($studentstatus==1)
{
echo "Active";
}
else if($studentstatus==2)
{
echo "InActive";
}else if($studentstatus==3)
{
echo "Completed";
}else if($studentstatus==4)
{
echo "Suspended";
}
}
?></td>
<td><?php if(!isset($_POST['submit-status']))
{
?>
<form action="studentInfo.php?Id=<?php echo $id;?>#tabs-1" method="post">
<div id="btn">
<input type="hidden" name="st" value="<?php echo $studentstatus; ?>" />
<input type="submit" name="submit-status" class="edit" value="" style="width:40px;" />
</div>
</form>
<?php
}else{
?>
<?php
}
?>
</td>
</tr>
</table>
</ul>
</div>
<div class="ui-tabs-panel ui-widget-content ui-corner-bottom" id="ui-tabs-9"><ul class="thumbs">
<table width="600" border="0" id="personnaldetails" class="tablestyle">
<tr>
<td id="col1">Job Title:</td>
<td id="col2"><?php
if(isset($_POST['updatejobtitle']))
{
$jobtitle=$_POST['jobtitle'];
?>
<form action="" method="post">
<input type="text" name="title" value="<?php echo $jobtitle; ?>" />
<input type="submit" name="updatetitle" value="" class="update" />
<input type="submit" name="submm" class="cancel" value="" onClick="document.href='studentInfo.php'" />
</form>
<?php
}else{
echo $jobtitle;
}
?></td>
<td style="width:50px;"><?php if(!isset($_POST['updatejobtitle']))
{
?>
<form action="studentInfo.php?Id=<?php echo $id;?>#ui-tabs-9" method="post">
<div id="btn">
<input type="hidden" name="jobtitle" value="<?php echo $jobtitle; ?>" />
<input type="submit" name="updatejobtitle" class="edit" value="" style="width:40px;" />
</div>
</form>
<?php
}else{
?>
<?php
}
?></td>
</tr>
<tr>
<td id="col1">Company Name:</td>
<td id="col2"><?php
if(isset($_POST['updatecompany']))
{
$companyname=$_POST['companyname'];
?>
<form action="" method="post">
<input type="text" name="companyname" value="<?php echo $companyname; ?>" />
<input type="submit" name="updatecomp" value="" class="update" />
<input type="submit" name="submm" class="cancel" value="" onClick="document.href='studentInfo.php'" />
</form>
<?php
}else{
echo $companyname;
}
?></td>
<td><?php if(!isset($_POST['updatecompany']))
{
?>
<form action="studentInfo.php?Id=<?php echo $id;?>#ui-tabs-9" method="post">
<div id="btn">
<input type="hidden" name="companyname" value="<?php echo $companyname; ?>" />
<input type="submit" name="updatecompany" class="edit" value="" style="width:40px;" />
</div>
</form>
<?php
}else{
?>
<?php
}
?></td>
</tr>
<tr>
<td id="col1">Address line1:</td>
<td id="col2"><?php
if(isset($_POST['updateadd1']))
{
?>
<form action="" method="post">
<input type="text" name="addline1" value="<?php echo $addressline1; ?>" />
<input type="submit" name="upadd1" value="" class="update" />
<input type="submit" name="submm" class="cancel" value="" onClick="document.href='studentInfo.php'" />
</form>
<?php
}else{
echo $addressline1;
}
?></td>
<td><?php if(!isset($_POST['updateadd1']))
{
?>
<form action="studentInfo.php?Id=<?php echo $id;?>#ui-tabs-9" method="post">
<div id="btn">
<input type="submit" name="updateadd1" class="edit" value="" style="width:40px;" />
</div>
</form>
<?php
}else{
?>
<?php
}
?></td>
</tr>
<tr>
<td id="col1">Address line2:</td>
<td id="col2"><?php
if(isset($_POST['addressline-2']))
{
$lname=$_POST['lname'];
?>
<form action="" method="post">
<input type="text" name="addressline2" value="<?php echo $addressline2; ?>" />
<input type="submit" name="updateaddressline2" value="" class="update" />
<input type="submit" name="submm" class="cancel" value="" onClick="document.href='studentInfo.php'" />
</form>
<?php
}else{
echo $addressline2;
}
?></td>
<td><?php if(!isset($_POST['addressline-2']))
{
?>
<form action="studentInfo.php?Id=<?php echo $id;?>#ui-tabs-9" method="post">
<div id="btn">
<input type="hidden" name="lname" value="<?php echo $lname; ?>" />
<input type="submit" name="addressline-2" class="edit" value="" style="width:40px;" />
</div>
</form>
<?php
}else{
?>
<?php
}
?></td>
</tr>
<tr>
<td id="col1">Address line3:</td>
<td id="col2"><?php
if(isset($_POST['addressline-3']))
{
$lname=$_POST['lname'];
?>
<form action="" method="post">
<input type="text" name="addressline3" value="<?php echo $addressline3; ?>" />
<input type="submit" name="updateaddressline3" value="" class="update" />
<input type="submit" name="submm" class="cancel" value="" onClick="document.href='studentInfo.php'" />
</form>
<?php
}else{
echo $addressline3;
}
?></td>
<td><?php if(!isset($_POST['addressline-3']))
{
?>
<form action="studentInfo.php?Id=<?php echo $id;?>#ui-tabs-9" method="post">
<div id="btn">
<input type="hidden" name="lname" value="<?php echo $lname; ?>" />
<input type="submit" name="addressline-3" class="edit" value="" style="width:40px;" />
</div>
</form>
<?php
}else{
?>
<?php
}
?></td>
</tr>
<tr>
<td id="col1">City:</td>
<td id="col2"><?php
if(isset($_POST['e-city']))
{
?>
<form action="" method="post">
<input type="text" name="ecity" value="<?php echo $ecity; ?>" />
<input type="submit" name="updatee-City" value="" class="update" />
<input type="submit" name="submm" class="cancel" value="" onClick="document.href='studentInfo.php'" />
</form>
<?php
}else{
echo $ecity;
}
?></td>
<td><?php if(!isset($_POST['e-city']))
{
?>
<form action="studentInfo.php?Id=<?php echo $id;?>#ui-tabs-9" method="post">
<div id="btn">
<input type="submit" name="e-city" class="edit" value="" style="width:40px;" />
</div>
</form>
<?php
}else{
?>
<?php
}
?></td>
</tr>
<tr>
<td id="col1">Post Code: </td>
<td id="col2"><?php
if(isset($_POST['e-postcode']))
{
?>
<form action="" method="post">
<input type="text" name="ecode" value="<?php echo $epostcode; ?>" />
<input type="submit" name="epostcode" value="" class="update" />
<input type="submit" name="submm" class="cancel" value="" onClick="document.href='studentInfo.php'" />
</form>
<?php
}else{
echo $epostcode;
}
?></td>
<td><?php if(!isset($_POST['e-postcode']))
{
?>
<form action="studentInfo.php?Id=<?php echo $id;?>#ui-tabs-9" method="post">
<div id="btn">
<input type="submit" name="e-postcode" class="edit" value="" style="width:40px;" />
</div>
</form>
<?php
}else{
?>
<?php
}
?></td>
</tr>
<tr>
<td id="col1">Country:</td>
<td id="col2"><?php
if(isset($_POST['updateECountry']))
{
//$lname=$_POST['lname'];
?>
<form action="" method="post">
<!--<input type="text" name="ecountry" value="<?php //echo $ecountry; ?>" />-->
<select name="ecountry">
<option value="<?php echo $ecountry; ?>"><?php echo $ecountry; ?></option>
<?php
$q="SELECT * FROM country where name !='$ecountry' order by name";
$r=mysql_query($q) or die(mysql_error());
while($cont=mysql_fetch_array($r))
{
?>
<option value="<?php echo $cont['name']; ?>"><?php echo $cont['name']; ?></option>
<?php
}
?>
</select>
<input type="submit" name="updatemecountry" value="" class="update" />
<input type="submit" name="submm" class="cancel" value="" onClick="document.href='studentInfo.php'" />
</form>
<?php
}else{
echo $ecountry;
}
?></td>
<td><?php if(!isset($_POST['updateECountry']))
{
?>
<form action="studentInfo.php?Id=<?php echo $id;?>#ui-tabs-9" method="post">
<div id="btn">
<input type="hidden" name="ecountry" value="<?php echo $ecountry; ?>" />
<input type="submit" name="updateECountry" class="edit" value="" style="width:40px;" />
</div>
</form>
<?php
}else{
?>
<?php
}
?></td>
</tr>
</table>
</ul>
</div>
<div class="ui-tabs-panel ui-widget-content ui-corner-bottom" id="ui-tabs-8" style="height:600px;"><ul class="thumbs">
<div style="width:500px;float:left">
<?php
if(isset($_GET['ifd']))
{
$if=$_GET['ifd'];
$rqy=mysql_query("select * from tbl_fee where id='$if'") or die(mysql_error());
$rfetch=mysql_fetch_array($rqy);
?>
<form action="" method="post">
<input type="text" name="upd_am" value="<?php echo $rfetch['fee']; ?>" />
<input type="submit" name="upda_amount" value="Update" class="add2" />
</form>
<?php
}
else
{
?>
<?php
$feequery="select * from tbl_fee where rollno='$id'";
$feeresult=mysql_query($feequery) or die(mysql_error());
$fetchFee=mysql_fetch_array($feeresult);
//$totalQuery="select sum(paid) as totalpaid from tbl_fees_install where rollno='$id'";
$totalQuery="select sum(i.paid) as total_install from tbl_fees_install as t inner join tbl_install as i on t.id=i.install_id where t.rollno='$id'";
$totalResult=mysql_query($totalQuery) or die(mysql_error());
$fetchAmount=mysql_fetch_array($totalResult);
if(mysql_num_rows($feeresult) > 0)
{
?>
<table width="200" border="0">
<tr>
<td>Total Balance</td>
<td><?php echo $fetchFee['fee']; ?> <a href="studentInfo.php?Id=<?php echo $id; ?>&ifd=<?php echo $fetchFee['id']; ?>#ui-tabs-8">E</a></td>
</tr>
<tr>
<td>Total Paid</td>
<td><?php echo $fetchAmount['total_install']; ?></td>
</tr>
<tr style="border-top:1px solid red; color:red;">
<td>Balance</td>
<td><?php echo $fetchFee['fee']-$fetchAmount['total_install']; ?></td>
</tr>
</table>
<?php
}
else
{
?>
<form action="" method="post">
<input type="text" name="fee" /><br />
<input type="submit" name="add-fee" value="Add" style="width:20; height:20" class="add2" />
</form>
<?php
}
}
?>
<br />
<br />
<br />
<br />
<table width="800" border="0" class="uniq" style="border-collapse:collapse;">
<thead>
<tr style="line-height: 34px;text-align: left;">
<th style="border-right:1px solid #c4c4c4;">Date</th>
<th style="border-right:1px solid #c4c4c4;">Description</th>
<th width="50" style="border-right:1px solid #c4c4c4;">payble</th>
<th width="50" style="border-right:1px solid #c4c4c4;">paid</th>
<th width="50" style="border-right:1px solid #c4c4c4;">Due</th>
<th>Edit</th>
</tr>
</thead>
<tbody>
<?php
$paysum="";
$remains="";
$totalPaid="";
$queryFees=mysql_query("select * from tbl_fees_install where rollno='$id' order by fee_date asc") or die(mysql_error());
while($setFees=mysql_fetch_array($queryFees))
{
$remain= $setFees['payble'];
$remains=$remains+$remain;
$paysum=$paysum+$setFees['payble'];
list($year,$month,$day)=explode('-',$setFees['fee_date']);
?>
<tr style="line-height:35px; font-size:12px;">
<td width="70" style="border-right:1px solid #c4c4c4;"><?php echo $day.'/'.$month.'/'.$year; ?></td>
<td style="border-right:1px solid #c4c4c4;"><?php echo $setFees['des']; ?></td>
<td style="text-align:left;border-right:1px solid #c4c4c4;"><?php echo $setFees['payble']; ?></td>
<td style="border-right:1px solid #c4c4c4;"></td>
<td style="border-right:1px solid #c4c4c4;"></td>
<td width="30" style="border-right:1px solid #c4c4c4;"><a href="studentInfo.php?Id=<?php echo $id; ?>&feid=<?php echo $setFees['id'];?>&ed#ui-tabs-8">Edit</a></td>
</tr>
<?php
$totalPad="";
$query="select * from tbl_install where install_id=".$setFees['id'];
$res=mysql_query($query) or die(mysql_error());
while($set=mysql_fetch_array($res))
{
$totalPaid=$totalPaid+$set['paid'];
list($year,$month,$date)=explode('-',$set['piad_date']);
?>
<tr>
<td><?php echo $date.'/'.$month.'/'.$year; ?></td>
<td></td>
<td></td>
<td style="text-align:left;"><?php echo $set['paid']; ?></td>
<td></td>
<td><a href="studentInfo.php?Id=<?php echo $id; ?>&eid=<?php echo $set['id'];?>&edd#ui-tabs-8">Edit</a></td>
</tr>
<?php
}
}
?>
</tbody>
</table>
<!--
<table width="700" border="0" class="uniq" style="border-collapse:collapse;margin-top:30px;">
<tr style="margin-top:20px; background-color:#333; color:#fff;">
<td>Total</td>
<td> </td>
<td style="text-align:right;padding-right:20px;"><?php //echo $paysum; ?></td>
<td style="text-align:left;"><?php echo $totalPaid; ?></td>
<td style="text-align:left;"><?php echo $paysum-$totalPaid; ?></td>
</tr>
</table>-->
</div>
<div style="width:200;float:right;">
<?php if(isset($_GET['ed']))
{
$feid=$_GET['feid'];
$fequery=mysql_query("select * from tbl_fees_install where id='$feid'") or die(mysql_error());
$fefetch=mysql_fetch_array($fequery);
list($yeard,$monthd,$dayd)=explode('-',$fefetch['fee_date']);
?>
<form action="" method="post">
<div>
<div>
<div style="float:left;">Payble</div>
<div><input type="text" name="payble" value="<?php echo $fefetch['payble'];?>" /></div>
</div>
<div>
<div>Paid Date</div>
<div> <input type="date" name="paiddate" /></div>
</div>
<div>
<div style="float:left;">Description</div>
<div><textarea name="fee_desc" rows="5" cols="25"><?php echo $fefetch['des']; ?></textarea></div>
</div>
<input type="hidden" name="fidd" value="<?php echo $feid; ?>" />
<div><input type="submit" name="update-fees" value="Update" class="add2" /></div>
</div>
</form>
<?php
}
else if(isset($_GET['edd']))
{
$getid=$_GET['eid'];
$res=mysql_query("select * from tbl_install where id='$getid'") or die(mysql_error());
$refetch=mysql_fetch_array($res);
?>
<form action="" method="post">
<div>
<div style="float:left;">paid</div>
<div><input type="text" name="payble" value="<?php echo $refetch['paid'];?>" /></div>
</div>
<div>
<div>Paid Date</div>
<div> <input type="date" name="paiddate" value="<?php echo $refetch['piad_date'];?>" /></div>
</div>
<div>
<div><input type="submit" name="pay_update" value="Update" class="add2" /></div>
</div>
</form>
<?php
}else if(isset($_GET['add']))
{
?>
<form action="" method="post">
<div>
<div style="float:left;">paid</div>
<div><input type="text" name="amount" value="" /></div>
</div>
<div>
<div>Paid Date</div>
<div> <input type="date" name="date" /></div>
</div>
<div>
<input type="hidden" name="fidd" value="" />
<div><input type="submit" name="add_install" value="Add" class="add2" /></div>
</div>
</form>
<?php
}else
{
?>
<form action="" method="post">
<div>
<div>
<div style="float:left;">Payble</div>
<div><input type="text" name="payble" /></div>
</div>
<div>
<div style="float;">Date</div>
<div>
<input type="date" name="ss" value="date/month/year" />
</div>
</div>
<div>
<div style="float:left;">Description</div>
<div><textarea name="fee_desc" rows="5" cols="25"></textarea></div>
</div>
<div><input type="submit" name="add-fees" value="Add" class="add2" /></div>
</div>
</form>
<?php
}
?>
</div>
</ul>
</div>
<div class="ui-tabs-panel ui-widget-content ui-corner-bottom" id="ui-tabs-3"><ul class="thumbs">
<?php
$qquery=mysql_query("select tutorId from assigncourse where rollno='$id'") or die(mysql_error());
$ffetch=mysql_fetch_array($qquery);
$gTutorQuery="select tutorId,concat_ws(' ',firstname,lastname) as full from tutor where tutorId=".$ffetch['tutorId'];
$gTutorResult=mysql_query($gTutorQuery) or die(mysql_error());
$tutorFetch=mysql_fetch_array($gTutorResult);
?>
<div>
<div style="float:left; display:inline-block;">
<span>Tutor :<?php echo $tutorFetch['full']; ?></span>
</div>
<?php
if(isset($_POST['chnegetutor']))
{
?>
<form action="" method="post" >
<select name="chgetutor">
<option value="0">Select Tutor</option>
<?php
$qqqqqq="select tutorId from coursetutor where courseId=".$resultSEt['courseId'] ." and tutorId != ".$tutorFetch['tutorId'];
$rrrrr=mysql_query($qqqqqq) or die(mysql_error());
while($rrsw=mysql_fetch_array($rrrrr))
{
$qui="select tutorId,concat_ws(' ',firstname,lastname) as fullname from tutor where tutorId=".$rrsw['tutorId'];
$rq=mysql_query($qui) or die(mysql_error());
$fetchesss=mysql_fetch_array($rq)
?>
<option value="<?php echo $fetchesss['tutorId']; ?>"><?php echo $fetchesss['fullname']; ?></option>
<?php
}
?>
</select>
<input type="submit" name="changeTutor" value="Update" class="add2" style="margin:0px;height:20px;" />
</form>
<?php
}else
{
?>
<form action="" method="post">
<input type="submit" name="chnegetutor" value="Change" class="add2" style="margin:0px; height:20px;" />
</form>
<?php
}
?>
</div>
<p><strong><span id="stassignhead">Course Name:</span></strong><span id="studenassignment"><?php echo $resultSEt['courseName']; ?></span></p>
<p><strong><span id="stassignhead">Total Topics:</span></strong><span id="studenassignment"><?php echo $resultSEt['coursetopic'];?></span></p>
<hr style="color:#CCC;" />
<?php
$query="select * from topic where courseId=".$resultSEt['courseId'];
$result=mysql_query($query) or die(mysql_error());
if(mysql_num_rows($result) > 0)
{
?>
<table width="1120" border="0" class="tablestyle">
<thead id="stassignhead">
<tr style="background-color:#000;color:#fff;font-size:11px;"><th width="20" style="text-align:left;padding-left:10px;">#</th><th width="220" style="text-align:left;padding-left:10px;">Topic Title</th><th width="40" style="text-align:left;padding-left:10px;">Authorize </th><th width="70" style="text-align:left;padding-left:10px;">download Assignment</th><th width="165" style="text-align:left;padding-left:10px;">Upload Result</th><th width="75" style="text-align:left;padding-left:10px;">View Result</th><th width="75" style="text-align:left;padding-left:10px;">Assignment Status</th><th width="30" style="text-align:left;padding-left:10px;">Re-Permit</th></tr>
</thead>
<tbody id="studenassignment">
<?php
$sr=0;
while($rSet=mysql_fetch_array($result))
{
$sr++;
?>
<tr>
<td style="padding-left:10px;"><?php echo $sr; ?></td>
<td style="padding-left:10px;"><?php echo $rSet['topicName']; ?></td>
<td style="padding-left:10px;">
<?php
$q="SELECT * FROM studentassignment where topicId=".$rSet['topicId']." and courseId=".$rSet['courseId']." and rollno='$id'";
$results=mysql_query($q) or die(mysql_error());
$afetch=mysql_fetch_array($results);
if(mysql_num_rows($results) > 0)
{
echo "Assign";
}else
{
?>
<form action="studentInfo.php?Id=<?php echo $id;?>#ui-tabs-3" method="post" autocomplete="off">
<input type="submit" name="submitthis" value="Assign" style="width:50px; height:20px;" onClick="return confirm('Are you sure to Assign')" />
<input type="hidden" name="topicIdd" value="<?php echo $rSet['topicId']; ?>" />
<input type="hidden" name="courseIdd" value="<?php echo $rSet['courseId']; ?>" />
</form>
<?php
}
?>
</td>
<td style="padding-left:10px;">
<?php
$quer22="select * from uploadassignment where topicId=".$rSet['topicId']." and rollno='$id'";
$result22=mysql_query($quer22) or die(mysql_error());
$ffe=mysql_fetch_array($result22);
$assId=$ffe['assignmentId'];
$qeuer="select * from studenresult where assignmentId='$assId' and rollno='$id'";
$res=mysql_query($qeuer) or die("error");
$fe=mysql_fetch_array($res);
if($afetch['AssignmentStatus']==1)
{
$q="select * from uploadassignment where topicId=".$rSet['topicId']." and courseId=".$rSet['courseId']." and rollno='$id'";
$r=mysql_query($q) or die(mysql_error());
$ffes=mysql_fetch_array($r);
if(mysql_num_rows($r) > 0)
{
echo "<a href=\"download.php?file=".$ffe['fullname']."\"><img src='../images/download-btn.png' /></a>";
}
else
{
echo "---------";
}
}else if(($afetch['AssignmentStatus']==2)||($afetch['AssignmentStatus']==3))
{
echo "<a href=\"download.php?file=".$ffe['fullname']."\"><img src='../images/download-btn.png' /></a>(".date('d/m/Y',strtotime($ffe['uploaddate'])).")";
//echo "----------";
}
/*else if($afetch['AssignmentStatus']==3)
{
echo "<a href=\"download.php?file=".$ffe['fullname']."\"><img src='../images/download-btn.png' /></a>";
}*/
else
{
?>
<span>----------</span>
<?php
}
?>
</td>
<td style="padding-left:10px;">
<?php
if($afetch['AssignmentStatus']==2 || $afetch['AssignmentStatus']==3)
{
?>
<form action="" method="post" autocomplete="off" enctype="multipart/form-data">
<input type="file" name="upload" style="width:150px;" />
<input type="hidden" name="assigid" value="<?php echo $assId; ?>" />
<input type="submit" name="add-upload" value="" class="upload"/>
</form>
<?php
}
?>
<?php
if( $afetch['AssignmentStatus']==1)
{
$q="select * from uploadassignment where topicId=".$rSet['topicId']." and courseId=".$rSet['courseId']." and rollno='$id'";
$r=mysql_query($q) or die(mysql_error());
if(mysql_num_rows($r) > 0)
{
?>
<form action="" method="post" autocomplete="off" enctype="multipart/form-data">
<input type="file" name="upload" style="width:150px;" />
<input type="hidden" name="assigid" value="<?php echo $assId; ?>" />
<input type="submit" name="add-upload" value="" class="upload"/>
</form>
<?php
}else
{
echo "--------";
}
}
?>
</td>
<td style="padding-left:10px;">
<?php
if($afetch['AssignmentStatus']==3||$afetch['AssignmentStatus']==2 || $afetch['AssignmentStatus']==1)
{
$studenResult=mysql_query("SELECT * from studenresult where rollno='$id' and assignmentId= ".$afetch['AssignmentName']) or die('errr');
$studentSet=mysql_fetch_array($studenResult);
if(mysql_num_rows($studenResult) >0)
{
?>
<a href="download.php?rfile=<?php echo $studentSet['fullname'];?>">View <?php echo "(".date('d/m/y',strtotime($studentSet['uploaddate'])).")";?> </a>
<?php
}else
{
echo "---------";
}
}else
{
echo "------";
}
?>
</td>
<td>
<?php
if($afetch['AssignmentStatus']==3)
{
echo "<span class=\"assign\">Completed</span>";
}
else if($afetch['AssignmentStatus']==2)
{
echo "<span class=\"tut\">With Tutor</span>";
}else if($afetch['AssignmentStatus']==1)
{
echo "<span class=\"as\">With Student</span>";
}else
{
echo "<span class=\"notassign\">Not Assigned<span>";
}
?>
</td>
<td style="padding-left:10px;">
<?php
if($afetch['AssignmentStatus']==2 || $afetch['AssignmentStatus']==3 || $afetch['AssignmentStatus']==1)
{
?>
<form action="" method="post">
<input type="hidden" name="topicId" value="<?php echo $rSet['topicId']; ?>" />
<input type="hidden" name="courseId" value="<?php echo $rSet['courseId']; ?>" />
<input type="submit" name="Re-Assign" value="Ok" style="width:22px; height:20px; float:left;" onClick="return confirm('Are you Sure to Re Assign')" />
</form>
<?php
extract($rSet);
$q="select * from uploadassignment where topicId='$topicId' and courseId='$courseId' and rollno='$id' and Reassign=1";
$r=mysql_query($q) or die(mysql_error());
if(mysql_num_rows($r)>0)
{
?>
<img src="../images/success.gif" style="float:left;" />
<?php
}
?>
<?php
}
?>
</td>
</tr>
<?php
}
?>
</tbody>
</table>
<?php
}else{
echo "No Topic exists";
}
?>
</ul>
</div>
<div class="ui-tabs-panel ui-widget-content ui-corner-bottom" id="ui-tabs-4"><ul class="thumbs">
<?php
if(isset($_GET['edit']))
{
?>
<form action="" method="post">
<textarea name="note" rows="4" cols="30"></textarea><br />
<input type="submit" name="addnote" value="Add Note" class="add2" />
<!--<input type="submit" name="" class="add" value="Cancel" onclick="document.href='studentInfo.php'" />-->
</form>
<?php
}else
{
?>
<a href="studentInfo.php?Id=<?php echo $id;?>&edit#ui-tabs-4" class="add2" style="color:#000; padding:5px;">Add Note</a>
<?php
}
?>
<?php
if(isset($_POST['addnote']))
{
$note=$_POST['note'];
$query="insert into studentnote values ('','$note',now(),'$id',2,'$fullname')";
$result=mysql_query($query) or die(mysql_error());
header("location:studentInfo.php?Id=$id#ui-tabs-4");
exit();
}
?>
<?php
$query="SELECT * FROM studentnote where rollno='$id' order by id desc";
$result=mysql_query($query) or die(mysql_error());
if(mysql_num_rows($result) > 0)
{
?>
<table width="800" border="0" style="margin-top:20px;" id="nte" class="tablestyle">
<?php
while($rr=mysql_fetch_array($result))
{
$all=explode(' ',$rr['edittime']);
$date=$all[0];
$time=@$all[1];
$msg="";
if($rr['role']==1)
{
$msg="Admin";
}else if($rr['role']==2)
{
$msg=$rr['name']."(Coordinator)";
}else if($rr['role']==3)
{
$msg=$rr['name']."(Tutor)";
}
?>
<tr style="margin-top:20px; width:600px; height:80px; vertical-align:text-top; ">
<td width="400" id="sty"><?php echo substr($rr['note'],0,90); ?></td>
<td width="100" style="background-color:#FFF;" ></td>
<td width="100" style="background-color:#fff; color:black; font-size:10px; ">Added by <?php echo $msg; ?> at <?php echo date("g:i a",strtotime($time)); ?> on <?php echo date('d F Y',strtotime($date)); ?></td>
</tr>
<?php
}
?>
</table>
<?php
}else
{
echo "No Note Exists";
}
?>
</ul>
</div>
<div class="ui-tabs-panel ui-widget-content ui-corner-bottom" id="ui-tabs-5"><ul class="thumbs">
<?php
if(isset($_GET['edittask']))
{
$taskId=$_GET['taskId'];
$q="select * from tasks where id='$taskId'";
$r=mysql_query($q) or die(mysql_error());
$fetch=mysql_fetch_array($r);
extract($fetch);
$dd=explode('-',$taskdate);
$d=$dd[2].'/'.$dd[1].'/'.$dd[0];
?>
<form action="" method="post">
<textarea name="task" rows="4" cols="30"><?php echo $task; ?></textarea><br /><br />
<input type="text" name="date" id="ddd" value="<?php echo $d; ?>" /><br />
<input type="hidden" name="id" value="<?php echo $id; ?>" />
<input type="submit" name="updatetask" value="update" class="add2" />
<a href="studentInfo.php?Id=<?php echo $id; ?>">Cancel</a>
</form>
<?php
}else{
?>
<?php
if(isset($_GET['tasks']))
{
?>
<form action="" method="post">
<textarea name="task" rows="4" cols="30"></textarea><br /><br />
<input type="text" name="taskdate" id="ddd" /><br />
<input type="submit" name="addtasks" value="Add Task" class="add2" />
<a href="studentInfo.php?Id=<?php echo $id; ?>" >Cancel</a>
</form>
<?php
}else
{
?>
<a href="studentInfo.php?Id=<?php echo $id;?>&tasks#ui-tabs-5" class="add2" style="color:#000; padding:5px;">Add Task</a>
<?php
}
}
?>
<?php
$query="SELECT * FROM tasks where rollno='$id' order by id desc";
$result=mysql_query($query) or die(mysql_error());
if(mysql_num_rows($result) > 0)
{
?>
<table width="900" border="0" style="margin-top:20px;" id="nte" class="tablestyle">
<?php
while($rres=mysql_fetch_array($result))
{
$all=explode(' ',$rres['cdate']);
$date=$all[0];
$time=@$all[1];
$msg="";
if($rres['role']==1)
{
$msg="Admin";
}else if($rres['role']==2)
{
$msg="Coordinator";
}else if($rres['role']==3)
{
$msg="Tutor";
}
?>
<tr style="margin-top:20px; width:900px; height:80px; vertical-align:text-top; ">
<td width="400" id="sty"><?php echo substr($rres['task'],0,90); ?></td>
<td width="80"><?php
$d1=explode('-',$rres['taskdate']);
echo $date=$d1[2].'/'.$d1[1].'/'.$d1[0];
?></td>
<td width="100" style="background-color:#FFF;" >
<a href="studentInfo.php?Id=<?php echo $id;?>&edittask&taskId=<?php echo $rres['id'];?>#ui-tabs-5"><img src="../images/edit-icon.png" /></a>
<a href="studentInfo.php?Id=<?php echo $id;?>&d&taskId=<?php echo $rres['id']; ?>"><img src="../images/complete.jpeg" width="20" height="20"/></a>
</td>
<td width="100" style="background-color:#fff; color:black; font-size:10px;">Added by <?php echo $msg; ?> at <?php echo date("g:i a",strtotime($time)); ?> on <?php echo date('d F Y',strtotime($date)); ?></td>
</tr>
<?php
}
?>
</table>
<?php
}
?>
</ul>
</div>
<div style="" id="ui-tabs-a" class="tabsContent ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide"><ul class="thumbs">
<?php
$queryLogs = "select * from tbl_logs where username='$email'";
$resultLogs = mysql_query($queryLogs) or die(mysql_error());
if(mysql_num_rows($resultLogs)>0)
{
?>
<table width="500" border="0" class="uniq">
<thead>
<th>Sr#</th>
<th>Login Date</th>
<th>Logout Date</th>
<th>Ip Address</th>
</thead>
<tbody>
<?php
$sr="";
while($rowSet = mysql_fetch_array($resultLogs))
{
$sr++;
?>
<tr>
<td><?php echo $sr; ?></td>
<td><?php echo $rowSet['detetime']; ?></td>
<td><?php echo $rowSet['log_datetime']; ?></td>
<td><?php echo $rowSet['ip']; ?></td>
</tr>
<?php
}
}else
{
echo "No Login Details Exists";
}
?>
</tbody>
</table>
</ul></div>
<div style="" id="ui-tabs-7" class="tabsContent ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide"><ul class="thumbs">
<table width="700" border="0" class="uniq">
<thead>
<th width="10">Sr#</th>
<th>Video Name</th>
<th width="100">View Videos</th>
<th width="70">Assign</th>
</thead>
<tbody class="studenassignment">
<?php
$query09="select courseid from assigncourse where rollno='$rollno'";
$result09=mysql_query($query09) or die(mysql_error());
$fe=mysql_fetch_array($result09);
$video = "select * from coursevideo where course_id=".$fe['courseid'];
$result = mysql_query($video) or die(mysql_error());
$sr="";
$fetcharray=mysql_query("select videoId from tbl_studentvideos where rollno='$id'") or die(mysql_error());;
$fetcharrays=mysql_fetch_array($fetcharray);
while($rowSet = mysql_fetch_array($result))
{
$sr++;
?>
<tr>
<td><?php echo $sr; ?></td>
<td><?php echo $rowSet['name']; ?></td>
<td><a href="../combine/coursevideos/<?php echo $rowSet['videopath'];?>" class="html5lightbox">View </a></td>
<td>
<?php
if(@in_array($rowSet['id'],$fetcharrays))
{
echo "Assign";
}else
{
?>
<form action="" method="post">
<input type="hidden" name="vid" value="<?php echo $rowSet['id']; ?>" />
<input type="submit" name="vsubmit" value="Assign" style="width:60px; height:20px;" onClick="return confirm('Are you Sure to Assign')" />
</form>
<?php
}
?>
</td>
</tr>
<?php
}
?>
</tbody>
</table>
</ul></div>
<div style="" id="ui-tabs-12" class="tabsContent ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide"><ul class="thumbs">
<form action="" method="post" enctype="multipart/form-data" id="MyUploadForm" >
<div class="full">
<div class="label">
Title:
</div>
<div class="inputs">
<input class="validate[required]" type="text" name="title" id="doc" value="" />
</div>
</div>
<div class="full">
<div class="label">
Documents:
</div>
<div class="inputs">
<input class="validate[required]" type="file" name="document" id="doc" value="" />
</div>
</div>
<div class="full">
<div class="label">
</div>
<div class="inputs">
<input class="add2" type="submit" name="st_document" value="Add" id="submit-btn" />
</div>
</div>
</form>
<h2>Student Docs</h2>
<table width="800" border="0" class="uniq">
<tr style="background-color:black;color:white;">
<td width="20">Sr#</td>
<td>Title</td>
<td width="100">Docs</td>
<td width="20">Action</td>
</tr>
<?php
$q="select * from tbl_stdocs where rollno='$id'";
$r=mysql_query($q) or die(mysql_error());
$i=0;
while($fesh=mysql_fetch_array($r))
{
$i++;
?>
<tr>
<td><?php echo $i; ?></td>
<td><?php echo $fesh['title']; ?></td>
<td><a href="../combine/stdocs/<?php echo $fesh['filename']; ?>" class="group1" target="_new"><img src="../combine/stdocs/<?php echo $fesh['filename']; ?>" width="100" height="100" /></a></td>
<td> <a href="studentInfo.php?Id=<?php echo $id; ?>&imgid=<?php echo $fesh['id'];?>" onClick="return confirm('Are you Sure you Want to delete')"><img src="../images/delete-icon.png" /></a></td>
</tr>
<?php
}
?>
</table>
</ul></div>
</div>
</div>
</div> <!-- end content -->
</div><!-- end wrapper -->
<script>
$("document").ready(function(){
$("#passcheck").get(0).type='password';
$("#check").bind('click',function(){
if($("#check").prop('checked')==true)
{
$("#passcheck").get(0).type='text';
}
else
{
$("#passcheck").get(0).type='password';
}
})
})
</script>
<?php include('../includes/footer.php');?>