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/editor_exam_update.php
<?php  

include 'config.php';

  $userid=$_REQUEST['id'];
    $query="select e.exam_id,e.exam_name,e.exam_year,e.post_name,e.url_slug,e.fee_desc,e.qualification_desc,e.age_desc,e.sp_exam_id,e.exam_summary,e.important_notes,e.physical,e.total_vacancy,e.off_web_link,e.display_order,e.status,e.cat_id,e.type_id,et.type,e.age_id,e.age_to,e.age_from,a.age,e.qualification_id,q.quali_name,e.state_id,s.state_name,e.status,e.state_commission,sc.comm_name,e.total_time,e.total_marks,e.exam_mode,e.negative_marking, e.other_info,e.other_info_tabname,ec.name,e.fee 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_id
		left join sp_qualification as q on q.qualification_id=e.qualification_id
		left join sp_states as s on s.state_id=e.state_id
		left join sp_state_commission as sc on sc.id=e.state_commission
		where e.exam_id='$userid'";
      $sql = $db->prepare($query);
      $sql->execute();
	    $row = $sql->fetch();
	      if($row['status'] == '1'){
		      $status = "Active";
		    }
	      else if($row['status'] == '0'){
          $status ="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>Naukri Connect - 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">
              <?php
                $curDate = date('Y-m-d H:i:s');

							  if(isset($_REQUEST['submit'])){
							  $exam=$_REQUEST['exam_type'];
							  $examname=$_REQUEST['exam_name'];
							  $postname=$_REQUEST['post_name'];
							  $display=$_REQUEST['url'];
                $examtype=$exam;	
							  $exam_year=$_REQUEST['exam_year'];
							  $quali=$_REQUEST['quali'];
							  $quali_desc=$_REQUEST['quali_dis'];
							  $age=$_REQUEST['age'];
                $age_to=$_REQUEST['age_to'];
                $age_from=$_REQUEST['age_from'];
							  $age_desc=$_REQUEST['age_desc'];
							  $exam_summary=$_REQUEST['summary'];
							  $imp_notes=$_REQUEST['imp_notes'];
							  $exam_id=$_REQUEST['examid'];	  
							  $fee=$_REQUEST['fee'];
							  $feess=$_REQUEST['feess'];
							  $vacancy=$_REQUEST['vacancy'];	
							  $link=$_REQUEST['link'];
							  $order=$_REQUEST['order'];
							  $status=$_REQUEST['status'];
							  $time=$_REQUEST['total_time'];
							  $mark=$_REQUEST['marks'];
							  $mode=$_REQUEST['mode'];
							  $marking=$_REQUEST['marking'];
                $other_info = $_REQUEST['other_info'];
                $tab = $_REQUEST['tabname'];
                $exam_category=$_REQUEST['category'];
                $state=$_REQUEST['state'];
                $state_commission=$_REQUEST['state_commission'];
                $desc=$_REQUEST['desc'];

				        $query="UPDATE `sp_exam` SET `exam_name`='$examname', `post_name`='$postname',`exam_year`='$exam_year', `exam_summary`='$exam_summary', `url_slug`='$display', `type_id`='$examtype', `cat_id`='$exam_category',  `state_id`='$state', `state_commission`='$state_commission', `qualification_id`='$quali', `qualification_desc`='$quali_desc', `age_id`='$age',`age_to`='$age_to', `age_from`='$age_from', `age_desc`='$age_desc', `fee_desc`='$fee', `total_vacancy`='$vacancy', `total_time`='$time', `total_marks`='$mark', `exam_mode`='$mode', `negative_marking`='$marking', `other_info`='$other_info', `other_info_tabname`='$tab',`important_notes`='$imp_notes',`off_web_link`='$link', `display_order`='$order', `status`='$status',sp_exam_id='$exam_id',`update_date`='$curDate',fee='$feess' where exam_id='$userid'";
						      $sql=$db->prepare($query);
                  $sql->execute();
							  $query3="INSERT INTO sp_exam_update SET `type`='U',`exam_id`='$userid',`user_id`='$user_id',`date`='$curDate',`description`='$desc'";
							    $sql2=$db->prepare($query3);
                  $sql2->execute();
							      echo '<h3 style="color:#000000;">Data Update successfully</h3>';
							    }
							?>

              <form class="js-validation-bootstrap form-horizontal" action="editor_exam_update.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-8">
                    <input class="form-control" type="text" name="post_name" placeholder="Enter post name" value="<?php echo $row['post_name']; ?>">
                  </div>
                  <div class="col-md-2">
                    <select class="js-select2 form-control" name="exam_year"> 
                      <option value="2017">2017</option>
                      <option selected="selected" value="<?php echo $row['exam_year']; ?>"><?php echo $row['exam_year']; ?></option>
                      <option value="2019">2019</option> 
                      <option value="2020">2020</option>
                      <option value="2021">2021</option>
                    </select>
                  </div>
                </div>
                <div class="form-group">
                  <label class="col-md-2 control-label" for="val-password">Url slug<span class="text-danger">*</span></label>
                  <div class="col-md-10">
                    <input class="form-control" type="text" name="url" placeholder="Enter Url slug" value="<?php echo $row['url_slug']; ?>">
                  </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 selected="selected" value="<?php echo $row['type_id']; ?>"><?php echo $row['type']; ?></option>
                      <option value="1">Central</option> 
		                  <option 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" name="category" style="width: 100%;">
		                <?php 
		                  $sql = $db->prepare("SELECT cat_id,name FROM sp_exam_category");
                      $sql->execute();
                    ?>
                      <option selected="selected" value="<?php echo $row['cat_id'];  ?>"><?php echo $row['name']; ?></option>
                        <?php while($row1=$sql->fetch(PDO::FETCH_ASSOC)) { ?>
                      <option value="<?php echo $row1['cat_id']; ?>"><?php echo $row1['name']; ?></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="state" style="width: 100%;">
    	                <?php 
    	                  $sql = $db->prepare("SELECT state_id,state_name FROM sp_states");
                        $sql->execute();
                      ?>
                      <option selected="selected" value="<?php echo $row['state_id']; ?>"><?php echo $row['state_name']; ?></option>
                        <?php  while($row2=$sql->fetch(PDO::FETCH_ASSOC))  {  ?>
                      <option value="<?php echo $row2['state_id']; ?>"><?php echo $row2['state_name']; ?></option>
                        <?php  } ?>
                    </select>
                  </div>
                </div>
								<div class="form-group" >
                  <label class="col-md-2 control-label" for="val-select2">Select State Commission<span class="text-danger">*</span></label>
										<div class="col-md-10">
											<select name="state_commission" class="form-control" id="statecommission">
											  <option selected="selected" value="<?php echo $row['state_commission']; ?>"><?php echo $row['comm_name']; ?></option>
											</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-2">
                    <input class="form-control" type="number" value="<?php echo $row['age_to']; ?>" name="age_to" placeholder="To">
                  </div>
                  <div class="col-md-2">
                    <input class="form-control" type="number" value="<?php echo $row['age_from']; ?>" name="age_from" placeholder="From">
                  </div>
									<div class="col-md-6">
                    <input class="form-control" type="text" name="age_desc" placeholder="Age Description" value="<?php echo $row['age_desc']; ?>">
                  </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" name="quali" style="width: 100%;">							
                        <?php 
    										  $sql = $db->prepare("SELECT qualification_id,quali_name FROM sp_qualification order by display_order ASC");
                          $sql->execute();
                        ?>
                      <option selected="selected" value="<?php echo $row['qualification_id']; ?>"><?php echo $row['quali_name']; ?></option>
                        <?php while($row4=$sql->fetch(PDO::FETCH_ASSOC)) { ?>
                      <option value="<?php echo $row4['qualification_id']; ?>"><?php echo $row4['quali_name']; ?></option>
                        <?php  } ?>                                                 
                    </select>
                  </div>
                  <div class="col-md-6">
                    <input class="form-control" type="text" name="quali_dis" placeholder="Qualification Description" value="<?php echo $row['qualification_desc']; ?>">
                  </div>
								</div>
                <div class="form-group">
                  <label class="col-md-2 control-label" for="val-confirm-password">Fees<span class="text-danger">*</span></label>
                  <div class="col-md-10">
                     <input class="form-control" type="number" name="feess" value="<?php echo $row['fee']; ?>">
                  </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="fee" 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">Exam Summary<span class="text-danger">*</span></label>
                  <div class="col-md-10">
                    <textarea class="ckeditor" name="summary" id="editor4"><?php echo $row['exam_summary']; ?></textarea>
                  </div>
                </div>
                <div class="form-group">
                  <label class="col-md-2 control-label" for="val-confirm-password">Important Notes<span class="text-danger">*</span></label>
                  <div class="col-md-10">
                    <textarea class="ckeditor" name="imp_notes" id="editor4"><?php echo $row['important_notes']; ?></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"> Exam id<span class="text-danger">*</span></label>
                  <div class="col-md-10">
                    <input class="form-control" type="text" name="examid" placeholder="" value="<?php echo $row['sp_exam_id']; ?>">
                  </div>
                </div>
							  <div class="form-group">
                  <label class="col-md-2 control-label" for="val-confirm-password">Total Time<span class="text-danger">*</span></label>
                  <div class="col-md-10">
                    <input class="form-control" type="text" name="total_time" placeholder="" value="<?php echo $row['total_time'];  ?>">
                  </div>
                </div>
								<div class="form-group">
                  <label class="col-md-2 control-label" for="val-confirm-password">Total Marks<span class="text-danger">*</span></label>
                  <div class="col-md-10">
                    <input class="form-control" type="text" name="marks" placeholder="" value="<?php echo $row['total_marks']; ?>">
                  </div>
                </div>
								<div class="form-group">
                  <label class="col-md-2 control-label" for="val-confirm-password">Exam Mode<span class="text-danger">*</span></label>
                  <div class="col-md-10">
                    <input class="form-control" type="text" name="mode" placeholder="" value="<?php echo $row['exam_mode']; ?>">
                  </div>
                </div>
								<div class="form-group">
                  <label class="col-md-2 control-label" for="val-confirm-password">Negative Marking<span class="text-danger">*</span></label>
                  <div class="col-md-10">
                    <input class="form-control" type="text" name="marking" placeholder="" value="<?php echo $row['negative_marking']; ?>">
                  </div>
                </div>
                <div class="form-group">
                  <label class="col-md-2 control-label" for="val-confirm-password">Tabname<span class="text-danger">*</span></label>
                  <div class="col-md-10">
                    <input class="form-control" type="text" name="tabname" placeholder="" value="<?php echo $row['other_info_tabname']; ?>">
                  </div>
                </div>                    
                <div class="form-group">
                  <label class="col-md-2 control-label" for="val-confirm-password">Other Info<span class="text-danger">*</span></label>
                  <div class="col-md-10">
                    <textarea class="ckeditor" name="other_info" id="editor4"><?php echo $row['other_info']; ?></textarea>
                  </div>
                </div>   
                <div class="form-group">
                  <label class="col-md-2 control-label" for="val-confirm-password">Official 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" placeholder="" value="<?php echo $row['display_order']; ?>">
                  </div>
                </div>
                <div class="form-group">
                  <label class="col-md-2 control-label" for="val-confirm-password">Update Description<span class="text-danger">*</span></label>
                  <div class="col-md-10">
                    <textarea class="ckeditor" name="desc" id="editor4"></textarea>
                  </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" name="status"  style="width: 100%;">
                      <option selected="selected" value="<?php echo $row['status']; ?>"><?php echo $status; ?></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>
        </div>
      </div>
    </div>
  </div>
</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()
    {
     $("#type2").change(function()
     {
      var id=$(this).val();
      var dataString = 'id='+ id;
     
      $.ajax
      ({
       type: "POST",
       url: "get_state_comm.php",
       data: dataString,
       cache: false,
       success: function(html)
       {
          $("#statecommission").html(html);
       } 
       });
      });
    });
  </script>

<script>
//    $(document).ready(function(){
//     $('#type').on('change', function() {
    
//   if (this.value == '1') {
// 	  document.getElementById('type2').disabled = true;
// 	  document.getElementById('statecommission').disabled = true;
// 	  document.getElementById('type1').disabled = false;
//   }
 
//   else if (this.value == '2') {
//     document.getElementById('type1').disabled = true;
// 	document.getElementById('type2').disabled = false;
// 	  document.getElementById('statecommission').disabled = false;
//   }
  
  
  
//     });
// });
			
</script>

<?php  include 'footer.php';	?>