<?php
include("../../header.php");
?>
<!-- page content -->
<div class="right_col" role="main">
<div class="">
<div class="page-title">
<div class="">
<div class="col-md-12 col-sm-12 col-xs-12">
<div class="x_panel">
<div class="x_title">
<h2>Edit Research</h2>
<div class="clearfix"></div>
</div>
<?php if(isset($_GET['msg']) && $_GET['msg']=='success'){ ?>
<div class="alert alert-success alert-dismissible fade in" role="alert">
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true" onClick="myfunc();">×</span>
</button>
<strong>Success!</strong> Form updated.
</div>
<?php }else if(isset($_GET['msg']) && $_GET['msg']=='error'){ ?>
<div class="alert alert-danger alert-dismissible fade in" role="alert">
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true" onClick="myfunc();">×</span>
</button>
<strong>Error!</strong> Form not submitted.
</div>
<?php } ?>
<div class="x_content">
<br />
<!-- <form id="demo-form2" data-parsley-validate class="form-horizontal form-label-left">-->
<form id="from1" name="from1" enctype="multipart/form-data" action="<?php echo $home_path;?>/pages/master/action/editresearch.php" method="post" class="form-horizontal form-label-left" style="" autocomplete="off">
<input type="hidden" id="idD" name="idD" value="<?php echo $_GET['id']; ?>" >
<?php
$sql=mysqli_query($conn,"select * from research where id='".$_GET['id']."'");
$rw=mysqli_fetch_array($sql);
?>
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="first-name">Research Types<span class="required">*</span>
</label>
<div class="col-md-6 col-sm-6 col-xs-12">
<select name="restype" id="restype" class="form-control">
<option value="Ph.D Guidance"<?php echo ($rw['restype']=='Ph.D Guidance')?'selected':''; ?> >Ph.D Guidance</option>
<option value="M.S (By Research)"<?php echo ($rw['restype']=='M.S (By Research)')?'selected':''; ?> >M.S (By Research)</option>
<option value="M.Tech Guidance"<?php echo ($rw['restype']=='M.Tech Guidance')?'selected':''; ?> >M.Tech Guidance </option>
</select>
</div>
</div>
<div class="form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="first-name">Name<span class="required">*</span>
</label>
<div class="col-md-6 col-sm-6 col-xs-12">
<input type="text" id="fname" name="name" required="required" class="form-control col-md-7 col-xs-12" value="<?php echo $rw['name']; ?>">
</div>
</div>
<div class="form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="first-name">Year<span class="required">*</span>
</label>
<div class="col-md-6 col-sm-6 col-xs-12">
<input type="text" id="fname" name="yeaar" required="required" class="form-control col-md-7 col-xs-12" value="<?php echo $rw['yeaar']; ?>">
</div>
</div>
<div class="form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="first-name">Month
</label>
<div class="col-md-6 col-sm-6 col-xs-12">
<input type="text" id="fname" name="month" class="form-control col-md-7 col-xs-12" value="<?php echo $rw['month']; ?>">
</div>
</div>
<div class="form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="first-name">Title<span class="required">*</span>
</label>
<div class="col-md-6 col-sm-6 col-xs-12">
<input type="text" id="fname" name="title" required="required" class="form-control col-md-7 col-xs-12" value="<?php echo $rw['title']; ?>">
</div>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="first-name">Co-Guide
</label>
<div class="col-md-6 col-sm-6 col-xs-12">
<input type="text" id="fname" name="coguide" class="form-control col-md-7 col-xs-12" value="<?php echo $rw['coguide']; ?>">
</div>
</div>
<div class="form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="first-name">Affiliation
</label>
<div class="col-md-6 col-sm-6 col-xs-12">
<input type="text" id="fname" name="affil" class="form-control col-md-7 col-xs-12" value="<?php echo $rw['affil']; ?>">
</div>
</div>
<div class="form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="first-name">Photo<span class="required">*</span>
</label>
<div class="col-md-6 col-sm-6 col-xs-12">
<input type="file" id="fname" name="photo" class="form-control col-md-7 col-xs-12" value="<?php echo $rw['photo']; ?>">
</div>
</div>
<div class="form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="first-name">Display Order<span class="required">*</span>
</label>
<div class="col-md-6 col-sm-6 col-xs-12">
<input type="text" id="fname" name="dorder" class="form-control col-md-7 col-xs-12" value="<?php echo $rw['affil']; ?>">
</div>
</div>
</div>
</div>
<div class="form-group">
<div class="col-md-6 col-sm-6 col-xs-12 col-md-offset-3">
<button type="submit" class="btn btn-success">Update</button>
<a href="<?php echo $home_path; ?>/pages/master/viewresearch.php"><button class="btn btn-primary" type="button">VIew</button></a>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- /page content -->
<script>
function myfunc(){
document.location.href="<?php echo $home_path; ?>/pages/master/editresearch.php?id=<?php echo $_GET['id']; ?>"
}
function selPDFDel(a,b){
//alert(a);
$.ajax({
type:'GET',
url:'<?php echo $home_path; ?>/pages/master/action/seldelstu.php',
data:{
delid:a,
pge:b
},
success:function(data){
//alert(data);
if(data==1){
location.reload();
}else{
alert("Error!.");
}
}
});
}
</script>
<?php
include("../../footer.php");
?> |