<?php
session_start();
if($_SESSION["username"]=="")
{
 	echo "You are not Logged in Please <a href='index.html'>Sign in </a> First ";
}
else
{
include 'dbc.php';

$username=$_SESSION["username"];

include 'dbc.php';
date_default_timezone_set("Asia/Karachi");
$today=date("Y-m-d");
$month = date("m",strtotime($today));
		$year = date("Y",strtotime($today));
		 $month_name = date("F", mktime(0, 0, 0, $month, 10));
		 $my=$month_name . " " . $year;
$userid=$_SESSION["userid"];
$id=$_REQUEST["id"];
$sql = "SELECT * FROM inq where id = '$id' and user_id='$userid'";
$result=$conn->query($sql);
$row = $result->fetch_assoc();
$adm_date=$row['adm_date'] ;
$dob=$row['dob'] ;
$class_name=$row['class_name'] ;
$cls_sec=$row['cls_sec'] ;
$std_name=$row['std_name'] ;
$fname=$row['fname'] ;
$cell_1=$row['cell_1'] ;
$address=$row['address'] ;
$sec_fee=$row['sec_fee'] ;
$job=$row['job'] ;
$remarks=$row['remarks'] ;
//$rows3=$result1 ->fetch_assoc();
?>
<!doctype html>
<!--[if lt IE 7]>      <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang=""> <![endif]-->
<!--[if IE 7]>         <html class="no-js lt-ie9 lt-ie8" lang=""> <![endif]-->
<!--[if IE 8]>         <html class="no-js lt-ie9" lang=""> <![endif]-->
<!--[if gt IE 8]><!-->
<html class="no-js" lang="en">
<!--<![endif]-->

<head>
   <?php include("includes/header.php") ?>
</head>

<body>


    <!-- Left Panel -->

    <?php include("includes/menu.php") ?><!-- /#left-panel -->

    <!-- Left Panel -->

    <!-- Right Panel -->

    <div id="right-panel" class="right-panel">

        <!-- Header-->
        <header id="header" class="header">

             <?php include("includes/headermenu.php") ?>

        </header><!-- /header -->
        <!-- Header-->

        <div class="breadcrumbs">
            <div class="col-sm-6">
                <div class="page-header float-left">
                    <div class="page-title">
                        <h1><? echo "" . $_SESSION["userid"]; ?></h1>
                    </div>
                </div>
            </div>
            <div class="col-sm-6">
                <div class="page-header float-right">
                    <div class="page-title">
                        <ol class="breadcrumb text-right">
                            <li class="active"><? echo "" . $_SESSION["username"]; ?></li>
                        </ol>
                    </div>
                </div>
            </div>
        </div>

        <div class="content mt-3">

           


          <div class="col-lg-12">
                                                <div class="card">
                                                    <div class="card-header">
                                                        <strong>Add New Inquiry</strong> Form
                                                    </div>
                                                    <div class="card-body card-block">
                                                        <form action="update_inq.php" method="post" enctype="multipart/form-data" class="form-horizontal">
                                                            
                                                            <div class="row form-group">
                                                                <div class="col col-md-3"><label for="text-input" class=" form-control-label">Inquiry No</label></div>
                                                                <div class="col-12 col-md-3"><input type="text" id="id" name="id" placeholder="Text" class="form-control" value=" <? echo $id ?>" readonly><small class="form-text text-muted">This is a Software genrated no</small></div>
                                                            </div>
                                                            
															<div class="row form-group">
                                                                <div class="col col-md-3"><label for="text-input" class=" form-control-label">Session</label></div>
                                                                <div class="col-12 col-md-3"><input type="text" id="sess1" name="sess1" placeholder="Year Session" class="form-control" value=" <? echo $year ?>"><small class="form-text text-muted">This is School Year Session</small><input type="text" id="month" name="month" placeholder="Year Session" class="form-control" value=" <? echo $my ?>"><small class="form-text text-muted">This is Session Month</small></div>
                                                            </div>
                                                            
                                                            <div class="row form-group">
                                                                <div class="col col-md-3"><label for="text-input" class=" form-control-label">Inquiry Date</label></div>
                                                                <div class="col-12 col-md-3"><input type="text" id="adm_date" name="adm_date" placeholder="Admission Date" class="form-control" value="<? echo $adm_date ?>"><small class="form-text text-muted">This is Admission Date of Student</small></div>
                                                            </div>
															
															<div class="row form-group">
                                                                <div class="col col-md-3"><label for="text-input" class=" form-control-label">Date of Birth</label></div>
                                                                <div class="col-12 col-md-3"><input type="text" id="dob" name="dob" placeholder="date of Birth" class="form-control" value="<? echo $dob ?>"><small class="form-text text-muted">This is date of Birh of Student</small></div>
                                                            </div>
															<div class="row form-group">
                                                                <div class="col col-md-3"><label for="text-input" class=" form-control-label">Class</label></div>
                                                                <div class="col-12 col-md-3"><input type="text" id="class_name" name="class_name" placeholder="Class" class="form-control" value="<? echo $class_name ?>"><small class="form-text text-muted">This is date of Clsss</small></div>
                                                            </div>
																<div class="row form-group">
                                                                <div class="col col-md-3"><label for="text-input" class=" form-control-label">Class Section</label></div>
                                                                <div class="col-12 col-md-3"><input type="text" id="cls_sec" name="cls_sec" placeholder="Section Name" class="form-control" value="<? echo $cls_sec ?>" required><small class="form-text text-muted">This is clsss section Student</small></div>
                                                            </div>
																
																
																
																<div class="row form-group">
                                                                <div class="col col-md-3"><label for="text-input" class=" form-control-label">Student Name</label></div>
                                                                <div class="col-12 col-md-6"><input type="text" id="std_name" name="std_name" placeholder="Student Name" class="form-control" value="<? echo $std_name ?>"><small class="form-text text-muted">This is Student Name</small></div>
                                                            </div>
																
																
																
																<div class="row form-group">
                                                                <div class="col col-md-3"><label for="text-input" class=" form-control-label">Father Name</label></div>
                                                                <div class="col-12 col-md-6"><input type="text" id="fname" name="fname" placeholder="Father Name" class="form-control" value="<? echo $fname ?>"><small class="form-text text-muted">This is Father Name</small></div>
                                                            </div>
																
																
																
															<div class="row form-group">
                                                                <div class="col col-md-3"><label for="text-input" class=" form-control-label">Father Cell No</label></div>
                                                                <div class="col-12 col-md-4"><input type="text" id="cell_1" name="cell_1" placeholder="Father Cell No" class="form-control" value="<? echo $cell_1 ?>"><small class="form-text text-muted">This is Father Cell No</small></div>
                                                            </div>
															
															
															
															
															
															
															
															
															
															
															
															
															<div class="row form-group">
                                                                <div class="col col-md-3"><label for="text-input" class=" form-control-label">Reg Fee</label></div>
                                                                <div class="col-12 col-md-4"><input type="text" id="regfee" name="regfee" placeholder="Reg Fee" class="form-control" value="<? echo $sec_fee ?>"><small class="form-text text-muted">This is Reg Fee</small></div>
                                                            </div>
															
																
																<div class="row form-group">
                                                                <div class="col col-md-3"><label for="text-input" class=" form-control-label">Home Address</label></div>
                                                                <div class="col-12 col-md-9"><input type="text" id="address" name="address" placeholder="Home Address" class="form-control" value="<? echo $address ?>"><small class="form-text text-muted">This is Home Address</small></div>
                                                            </div>
															<div class="row form-group">
                                                                <div class="col col-md-3"><label for="text-input" class=" form-control-label">Job</label></div>
                                                                <div class="col-12 col-md-9"><input type="text" id="job" name="job" placeholder="Job" class="form-control" value="<? echo $job ?>"><small class="form-text text-muted">This is Job</small></div>
                                                            </div>
															
																<div class="row form-group">
                                                                <div class="col col-md-3"><label for="text-input" class=" form-control-label">Remarks</label></div>
                                                                <div class="col-12 col-md-12"><input type="text" id="remarks" name="remarks" placeholder="remarks" class="form-control" value="<? echo $remarks ?>"><small class="form-text text-muted">This is Remarks</small></div>
                                                            </div>
															
															
															
															
                                                       
                                                                
                                                                
                                        </div>
                                                    <div class="card-footer">
                                                        <button type="submit" class="btn btn-primary btn-sm">
                                                            <i class="fa fa-dot-circle-o"></i> Submit
                                                        </button>
                                                        <button type="reset" class="btn btn-danger btn-sm">
                                                            <i class="fa fa-ban"></i> Reset
                                                        </button>
                                                    </div>
													 </form>
                                                </div>
                                                
                                            </div>

            


        </div> <!-- .content -->
    </div><!-- /#right-panel -->

    <!-- Right Panel -->

   <?php include("includes/footermenu.php") ?>

</body>

</html>
<?php
}

?>