<?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"];
$current_file_name = basename($_SERVER['PHP_SELF']);
$sql = "SELECT * FROM adduser where feedisc2 = '$current_file_name' and uname = '$username'";
$result=$conn->query($sql);
$row = $result->fetch_assoc();
$status=$row['feedisc3'] ;

if ($status =="")
{
echo "You are not Authorized This Page <a href='maindashboard.php'>Back </a> ";
}
else
{
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 addsubject where id = '$id' and user_id='$userid'";
$result=$conn->query($sql);
$row = $result->fetch_assoc();
$sub1=$row['sub1'] ;
$sub2=$row['sub2'] ;
$sub3=$row['sub3'] ;
$sub4=$row['sub4'] ;
$sub5=$row['sub5'] ;
$sub6=$row['sub6'] ;
$sub7=$row['sub7'] ;
$sub8=$row['sub8'] ;
$tech1=$row['tech1'] ;
$tech2=$row['tech2'] ;
$tech3=$row['tech3'] ;
$tech4=$row['tech4'] ;
$tech5=$row['tech5'] ;
$tech6=$row['tech6'] ;
$tech7=$row['tech7'] ;
$tech8=$row['tech8'] ;

?>
<!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>Edit Subjects</strong><small> Form</small></div>
                            <div class="card-body card-block">
							<form action="Edit_Subjects_Save.php" method="post" enctype="multipart/form-data" class="form-group">
							<div class="col-4">
                                    <div class="form-group"><label for="id" class=" form-control-label">ID</label><input type="text" id="id" name="id" placeholder="Id" class="form-control" value="<? echo $id ?>"></div>
									</div>
							
							<div class="col-6">
                                <div class="form-group"><label for="cname" class=" form-control-label">Subject Name 1</label><input type="text" id="sub1" name="sub1" placeholder="Subject Name 1" class="form-control" value="<? echo $sub1 ?>"></div>
								</div>
								
								<div class="col-6">
                                <div class="form-group"><label for="cname" class=" form-control-label">Teacher Name </label><input type="text" id="tech1" name="tech1" placeholder="Teacher Name " class="form-control" value="<? echo $tech1 ?>"></div>
								</div>
								
								<div class="col-6">
                                    <div class="form-group"><label for="mfee" class=" form-control-label">Subject Name 2</label><input type="text" id="sub2" name="sub2" placeholder="Subject Name 2" class="form-control" value="<? echo $sub2 ?>"></div>
									</div>
									
									<div class="col-6">
                                <div class="form-group"><label for="cname" class=" form-control-label">Teacher Name </label><input type="text" id="tech2" name="tech2" placeholder="Teacher Name " class="form-control" value="<? echo $tech2 ?>"></div>
								</div>
								
									<div class="col-6">
                                <div class="form-group"><label for="feedisc1" class=" form-control-label">Subject Name 3</label><input type="text" id="sub3" name="sub3" placeholder="Subject Name 3" class="form-control" value="<? echo $sub3 ?>"></div>
								</div>
								
								<div class="col-6">
                                <div class="form-group"><label for="cname" class=" form-control-label">Teacher Name </label><input type="text" id="tech3" name="tech3" placeholder="Teacher Name " class="form-control" value="<? echo $tech3 ?>"></div>
								</div>
								
								<div class="col-6">
                                    <div class="form-group"><label for="fee1" class=" form-control-label">Subject Name 4</label><input type="text" id="sub4" name="sub4" placeholder="Subject Name 4" class="form-control" value="<? echo $sub4 ?>"></div>
									</div>
									
									<div class="col-6">
                                <div class="form-group"><label for="cname" class=" form-control-label">Teacher Name </label><input type="text" id="tech4" name="tech4" placeholder="Teacher Name " class="form-control" value="<? echo $tech4 ?>"></div>
								</div>
									
									<div class="col-6">
                                <div class="form-group"><label for="feedisc2" class=" form-control-label">Subject Name 5</label><input type="text" id="sub5" name="sub5" placeholder="Subject Name 5" class="form-control" value="<? echo $sub5 ?>"></div>
								</div>
								
								<div class="col-6">
                                <div class="form-group"><label for="cname" class=" form-control-label">Teacher Name </label><input type="text" id="tech5" name="tech5" placeholder="Teacher Name " class="form-control" value="<? echo $tech5 ?>"></div>
								</div>
								
								<div class="col-6">
                                    <div class="form-group"><label for="fee2" class=" form-control-label">Subject Name 6</label><input type="text" id="sub6" name="sub6" placeholder="Subject Name 6" class="form-control" value="<? echo $sub6 ?>"></div>
									</div>
									<div class="col-6">
                                <div class="form-group"><label for="cname" class=" form-control-label">Teacher Name </label><input type="text" id="tech6" name="tech6" placeholder="Teacher Name " class="form-control" value="<? echo $tech6 ?>"></div>
								</div>
									
									<div class="col-6">
                                <div class="form-group"><label for="feedisc3" class=" form-control-label">Subject Name 7</label><input type="text" id="sub7" name="sub7" placeholder="Subject Name 7" class="form-control" value="<? echo $sub7 ?>"></div>
								</div>
								<div class="col-6">
                                <div class="form-group"><label for="cname" class=" form-control-label">Teacher Name </label><input type="text" id="tech7" name="tech7" placeholder="Teacher Name " class="form-control" value="<? echo $tech7 ?>"></div>
								</div>
								
								<div class="col-6">
                                    <div class="form-group"><label for="fee3" class=" form-control-label">Subject Name 8</label><input type="text" id="sub8" name="sub8" placeholder="Subject Name 8" class="form-control" value="<? echo $sub8 ?>"></div>
									</div>
									<div class="col-6">
                                <div class="form-group"><label for="cname" class=" form-control-label">Teacher Name </label><input type="text" id="tech8" name="tech8" placeholder="Teacher Name " class="form-control" value="<? echo $tech8 ?>"></div>
								</div>
									
										
								<div class="col-6">
                                    <div class="form-group"><label for="fee3" class=" form-control-label">Subject Name 9</label><input type="text" id="sub9" name="sub9" placeholder="Subject Name 9" class="form-control" value="<? echo $sub9 ?>"></div>
									</div>
									<div class="col-6">
                                <div class="form-group"><label for="cname" class=" form-control-label">Teacher Name </label><input type="text" id="tech9" name="tech9" placeholder="Teacher Name " class="form-control" value="<? echo $tech9 ?>"></div>
								</div>
									
								<div class="col-6">
                                    <div class="form-group"><label for="fee3" class=" form-control-label">Subject Name 10</label><input type="text" id="sub10" name="sub10" placeholder="Subject Name 10" class="form-control" value="<? echo $sub10 ?>"></div>
									</div>
									<div class="col-6">
                                <div class="form-group"><label for="cname" class=" form-control-label">Teacher Name </label><input type="text" id="tech10" name="tech10" placeholder="Teacher Name " class="form-control" value="<? echo $tech10 ?>"></div>
								</div>
									
								
				
													
                                                    </div>
													<div class="card-footer">
                                                        <button type="submit" class="btn btn-primary btn-sm">
                                                            <i class="fa fa-dot-circle-o"></i> Update Subject
                                                        </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
}
}
?>