HEX
Server: Apache/2.4.58 (Ubuntu)
System: Linux ip-172-31-18-78 6.17.0-1017-aws #17~24.04.1-Ubuntu SMP Tue May 26 21:09:53 UTC 2026 aarch64
User: ubuntu (1000)
PHP: 8.2.31
Disabled: NONE
Upload Files
File: /var/www/nclive/technc/assets/edit.php
<?php  
include 'config.php';

$userid=$_REQUEST['id'];
$query="select e.exam_id, e.exam_name,e.post_name,e.display_name,e.fee_desc,e.physical,e.total_vacancy,e.off_web_link,e.display_order,e.status,e.cat_id,ec.url_slug,e.type_id,et.type,e.age_lim_id,a.age,e.qualification_id,q.quali_name,e.state_id,s.state_name,e.status from sp_exam as e left join sp_exam_category as ec on ec.cat_id=e.cat_id
left join sp_exam_type as et on et.type_id=e.type_id
left join sp_age_limit as a on a.age_lim_id=e.age_lim_id
left join sp_qualification as q on q.qualification_id=e.qualification_id
left join sp_tt_states as s on s.state_id=e.state_id
where e.exam_id='$userid'
";
$sql = $db->prepare($query);
    $sql->execute();
	$row = $sql->fetch();
	if($row['status'] == '1'){
		$s = 'Active';
	}
	else if($row['status'] == '0'){
		$s='Deactive';
	}
 
?>
<!DOCTYPE html>
<!--[if IE 9]>         <html class="ie9 no-focus" lang="en"> <![endif]-->
<!--[if gt IE 9]><!--> <html class="no-focus" lang="en"> <!--<![endif]-->
    <head>
        <meta charset="utf-8">

        <title>Sarkari Pariksha - Dashboard</title>

        <meta name="description" content="OneUI - Admin Dashboard Template &amp; UI Framework created by pixelcave and published on Themeforest">
        <meta name="author" content="pixelcave">
        <meta name="robots" content="noindex, nofollow">
        <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">

        <!-- Icons -->
        <!-- The following icons can be replaced with your own, they are used by desktop and mobile browsers -->
        <link rel="shortcut icon" href="assets/img/favicons/favicon.png">

        <link rel="icon" type="image/png" href="assets/img/favicons/favicon-16x16.png" sizes="16x16">
        <link rel="icon" type="image/png" href="assets/img/favicons/favicon-32x32.png" sizes="32x32">
        <link rel="icon" type="image/png" href="assets/img/favicons/favicon-96x96.png" sizes="96x96">
        <link rel="icon" type="image/png" href="assets/img/favicons/favicon-160x160.png" sizes="160x160">
        <link rel="icon" type="image/png" href="assets/img/favicons/favicon-192x192.png" sizes="192x192">

        <link rel="apple-touch-icon" sizes="57x57" href="assets/img/favicons/apple-touch-icon-57x57.png">
        <link rel="apple-touch-icon" sizes="60x60" href="assets/img/favicons/apple-touch-icon-60x60.png">
        <link rel="apple-touch-icon" sizes="72x72" href="assets/img/favicons/apple-touch-icon-72x72.png">
        <link rel="apple-touch-icon" sizes="76x76" href="assets/img/favicons/apple-touch-icon-76x76.png">
        <link rel="apple-touch-icon" sizes="114x114" href="assets/img/favicons/apple-touch-icon-114x114.png">
        <link rel="apple-touch-icon" sizes="120x120" href="assets/img/favicons/apple-touch-icon-120x120.png">
        <link rel="apple-touch-icon" sizes="144x144" href="assets/img/favicons/apple-touch-icon-144x144.png">
        <link rel="apple-touch-icon" sizes="152x152" href="assets/img/favicons/apple-touch-icon-152x152.png">
        <link rel="apple-touch-icon" sizes="180x180" href="assets/img/favicons/apple-touch-icon-180x180.png">
        <!-- END Icons -->

        <!-- Stylesheets -->
        <!-- Web fonts -->
        <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400italic,600,700%7COpen+Sans:300,400,400italic,600,700">

        <!-- Page JS Plugins CSS -->
        <link rel="stylesheet" href="assets/js/plugins/slick/slick.min.css">
        <link rel="stylesheet" href="assets/js/plugins/slick/slick-theme.min.css">
        
        <!-- Bootstrap and OneUI CSS framework -->
        <link rel="stylesheet" href="assets/css/bootstrap.min.css">
        <link rel="stylesheet" id="css-main" href="assets/css/oneui.css">

        <!-- You can include a specific file from css/themes/ folder to alter the default color theme of the template. eg: -->
        <!-- <link rel="stylesheet" id="css-theme" href="assets/css/themes/flat.min.css"> -->

        <!-- END Stylesheets -->
		<script src="ckeditor/ckeditor.js" type="text/javascript"></script>
    </head>
    
    <body>
        
        <div id="page-container" class="sidebar-l sidebar-o side-scroll header-navbar-fixed">
           


          <!-- Header -->
            <header id="header-navbar" class="content-mini content-mini-full">
               

                <!-- Header Navigation Left -->
                <ul class="nav-header pull-left">
                    <li class="hidden-md hidden-lg">
                        <!-- Layout API, functionality initialized in App() -> uiLayoutApi() -->
                        <button class="btn btn-default" data-toggle="layout" data-action="sidebar_toggle" type="button">
                            <i class="fa fa-navicon"></i>
                        </button>
                    </li>
                    <li class="hidden-xs hidden-sm">
                        <!-- Layout API, functionality initialized in App() -> uiLayoutApi() -->
                        <button class="btn btn-default" data-toggle="layout" data-action="sidebar_mini_toggle" type="button">
                            <i class="fa fa-ellipsis-v"></i>
                        </button>
                    </li>
                    <li>
                        <!-- Opens the Apps modal found at the bottom of the page, before including JS code -->
                        <button class="btn btn-default pull-right" data-toggle="modal" data-target="#apps-modal" type="button">
                            <i class="si si-grid"></i>
                        </button>
                    </li>
                    <li class="visible-xs">
                        <!-- Toggle class helper (for .js-header-search below), functionality initialized in App() -> uiToggleClass() -->
                        <button class="btn btn-default" data-toggle="class-toggle" data-target=".js-header-search" data-class="header-search-xs-visible" type="button">
                            <i class="fa fa-search"></i>
                        </button>
                    </li>
                    <li class="js-header-search header-search">
                        <form class="form-horizontal"  method="post">
                            <div class="form-material form-material-primary input-group remove-margin-t remove-margin-b">
                                <input class="form-control" type="text" id="base-material-text" name="base-material-text" placeholder="Search..">
                                <span class="input-group-addon"><i class="si si-magnifier"></i></span>
                            </div>
                        </form>
                    </li>
                </ul>
                <!-- END Header Navigation Left -->
            </header>
            <!-- END Header -->

            <!-- Main Container -->
            <main id="main-container">
               
  <div class="content content-narrow">
                    <!-- Forms Row -->
                    <div class="row">
                        <div class="col-lg-12">
                            <!-- Bootstrap Forms Validation -->
                            <h2 class="content-heading">Update Details</h2>
							
							
                            <div class="block">
                                <div class="block-header">
                                    <ul class="block-options">
                                        <li>
                                            <button type="button"><i class="si si-settings"></i></button>
                                        </li>
                                    </ul>
                                    <h3 class="block-title"></h3>
                                </div>
                                <div class="block-content block-content-narrow">
                                    
                                    <form class="js-validation-bootstrap form-horizontal" action="edit.php?id=<?php echo $userid; ?>" method="post" >
                                       <div class="form-group">
                                            <label class="col-md-2 control-label" for="val-username">Exam Name<span class="text-danger">*</span></label>
                                            <div class="col-md-10">
                                                <input class="form-control" type="text" name="exam_name" placeholder="example:CGL Tier-I, SBI-Clerk" value="<?php echo $row['exam_name']; ?>">
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-md-2 control-label" for="val-email">Post Name<span class="text-danger">*</span></label>
                                            <div class="col-md-10">
                                                <input class="form-control" type="text" name="post_name" placeholder="Enter post name" value="<?php echo $row['post_name']; ?>">
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-md-2 control-label" for="val-password">Display name<span class="text-danger">*</span></label>
                                            <div class="col-md-10">
                                                <input class="form-control" type="text" name="display" placeholder="Enter display name" value="<?php echo $row['display_name']; ?>">
                                            </div>
                                        </div>
										 <div class="form-group" >
                                            <label class="col-md-2 control-label" for="val-select2">Select Exam Type<span class="text-danger">*</span></label>
											<div class="col-md-10">
											<select class="js-select2 form-control" id="type" name="exam_type"  style="width: 100%;">

                                             <option <?php if($row['type_id'] == '1') echo "selected;" ?> value="1">Central</option> 
										     <option <?php if($row['type_id'] == '2') echo "selected;" ?> value="2">State</option> 
										     </select>
                                            </div>
											</div>

										 <div class="form-group">
                                            <label class="col-md-2 control-label" for="val-select2">Select Exam Category<span class="text-danger">*</span></label>
											<div class="col-md-10">
											<select class="js-select2 form-control" id="type1" name="same" style="width: 100%;" disabled="true">
											<option selected="selected" value="<?php  echo $row['cat_id']; ?>"><?php  echo $row['url_slug']; ?></option>
											<?php 
											$sql = $db->prepare("SELECT cat_id,url_slug FROM sp_exam_category");
                                            $sql->execute
                                            while($row=$sql->fetch(PDO::FETCH_ASSOC))
                                             {
                                             ?>
                                          <option value="<?php echo $row['cat_id']; ?>"><?php echo $row['url_slug']; ?></option>
                                         <?php
                                            } ?>
                                                </select>
                                            </div>
											</div>
											
											<div class="form-group" >
                                            <label class="col-md-2 control-label" for="val-select2">Select State<span class="text-danger">*</span></label>
											<div class="col-md-10">
											<select class="js-select2 form-control" id="type2" name="same" style="width: 100%;" disabled="true">
											<option selected="selected" value="<?php  echo $row['state_id']; ?>"><?php  echo $row['state_name'];  ?></option>
											<?php 
											$sql = $db->prepare("SELECT state_id,state_name FROM sp_tt_states");
                                            $sql->execute
                                            while($row=$sql->fetch(PDO::FETCH_ASSOC))
                                             {
                                             ?>
                                           <option value="<?php echo $row['state_id']; ?>"><?php echo $row['state_name']; ?></option>
                                           <?php
                                             } ?>
                                                </select>
                                            </div>
											</div>
											
											<div class="form-group" >
												<label class="col-md-2 control-label" for="val-select2">Age<span class="text-danger">*</span></label>
												<div class="col-md-4">
											<select class="js-select2 form-control" id="type2" name="age" style="width: 100%;">			
                                             <option selected="selected" value="<?php echo $row['age_lim_id'];  ?>"><?php echo $row['age'] ?></option>											
                                            <?php 
											$sql = $db->prepare("SELECT age_lim_id,age FROM sp_age_limit");
                                            $sql->execute
                                            while($row=$sql->fetch(PDO::FETCH_ASSOC))
                                             {
                                             ?>
                                          <option value="<?php echo $row['age_lim_id']; ?>"><?php echo $row['age']; ?></option>
                                         <?php
                                            } ?>                                         
                                            </select>
                                            </div>
											<div class="col-md-6">
                                                <input class="form-control" type="text" name="" placeholder="Age Description">
                                            </div>
											</div>
                                       
									   <div class="form-group" >
												<label class="col-md-2 control-label" for="val-select2">Qualification<span class="text-danger">*</span></label>
												<div class="col-md-4">
											<select class="js-select2 form-control" id="type2" name="quali" style="width: 100%;">
                                             <option selected="selected" value="<?php echo $row['qualification_id'];  ?>"><?php echo $row['quali_name']; ?>
											</option>											
                                            <?php 
											$sql = $db->prepare("SELECT qualification_id,quali_name FROM sp_qualification");
                                            $sql->execute
                                            while($row=$sql->fetch(PDO::FETCH_ASSOC))
                                             {
                                             ?>
                                          <option value="<?php echo $row['qualification_id']; ?>"><?php echo $row['quali_name']; ?></option>
                                         <?php
                                            } ?>                                                 
                                            </select>
                                            </div>
											<div class="col-md-6">
                                                <input class="form-control" type="text" name="" placeholder="Qualification Description">
                                            </div>
											</div>
                                       
                                     
										<div class="form-group">
                                            <label class="col-md-2 control-label" for="val-confirm-password">Fee Description<span class="text-danger">*</span></label>
                                            <div class="col-md-10">
                                               <textarea class="ckeditor" name="editor3" id="editor3"><?php echo $row['fee_desc']; ?></textarea>
                                            </div>
                                        </div>
										<div class="form-group">
                                            <label class="col-md-2 control-label" for="val-confirm-password">Physical<span class="text-danger">*</span></label>
                                            <div class="col-md-10">
                                               <textarea class="ckeditor" name="physical" id="editor3"><?php echo $row['physical']; ?></textarea>
                                            </div>
                                        </div>
										<div class="form-group">
                                            <label class="col-md-2 control-label" for="val-confirm-password">Total Vacancy<span class="text-danger">*</span></label>
                                            <div class="col-md-10">
                                                <input class="form-control" type="number" name="vacancy" placeholder="" value="<?php echo $row['total_vacancy']; ?>">
                                            </div>
                                        </div>
										<div class="form-group">
                                            <label class="col-md-2 control-label" for="val-confirm-password">Website Link<span class="text-danger">*</span></label>
                                            <div class="col-md-10">
                                                <input class="form-control" type="text" name="link" placeholder="https://example.com" value="<?php echo $row['off_web_link'];  ?>">
                                            </div>
                                        </div>
										<div class="form-group">
                                            <label class="col-md-2 control-label" for="val-confirm-password">Display order<span class="text-danger">*</span></label>
                                            <div class="col-md-10">
                                                <input class="form-control" type="number" name="order" value="<?php echo $row['display_order']; ?>">
                                            </div>
                                        </div>
										<div class="form-group">
                                            <label class="col-md-2 control-label" for="val-confirm-password">Status<span class="text-danger">*</span></label>
                                            <div class="col-md-10">
                                              <select class="js-select2 form-control" id="type" name="status"  style="width: 100%;">
											<option selected="selected" value="<?php  echo $row['status']; ?>"><?php  echo $s; ?></option>
                                             <option value="1">Active</option> 
										     <option value="0">Deactive</option> 
										     </select>
                                            </div>
                                        </div>
										
										
                                        <div class="form-group">
                                            <div class="col-md-10 col-md-offset-2">
                                                <button class="btn btn-lg btn-primary" type="submit" name="submit">Submit</button>
                                            </div>
                                        </div>
                                    </form>
                                </div>
                            </div>
                            <!-- Bootstrap Forms Validation -->
                        </div>
                       
                        </div>
                    </div>
                    <!-- END Forms Row -->

                    
                </div>
                <!-- END Page Content -->
                <!-- Page Content -->
               
                    
                <!-- END Page Content -->
            </main>
			<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
			<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
			<script type="text/javascript">
   $(document).ready(function(){
    $('#type').on('change', function() {
    
  if (this.value == '1') {
	  document.getElementById('type2').disabled = true;
	  document.getElementById('type1').disabled = false;
  }
 
  else if (this.value == '2') {
    document.getElementById('type1').disabled = true;
	  document.getElementById('type2').disabled = false;
  }
  
  
  
    });
});
			
</script>
			<?php  include 'footer.php';
			?>
            <!-- END Main Container -->