MOON
Server: Apache
System: Linux nserver.cafsindia.com 4.18.0-553.104.1.lve.el8.x86_64 #1 SMP Tue Feb 10 20:07:30 UTC 2026 x86_64
User: cafsindia (1002)
PHP: 8.2.30
Disabled: NONE
Upload Files
File: /home/cafsindia/refimac_cafsjobs_com/sec_block.php
<script type="text/JavaScript">
<!--
function formget1()
{
var major_head = document.getElementById("menu").value;
if(major_head=="Other")
{
document.getElementById("menu1").disabled=false;
document.getElementById("menu1").value="";
}
else
{
document.getElementById("menu1").disabled=true;
document.getElementById("menu1").value="NIL";
}
}

function formget2()
{
var major_head = document.getElementById("submenu").value;
if(major_head=="Other")
{
document.getElementById("submenu1").disabled=false;
document.getElementById("submenu1").value="";
}
else
{
document.getElementById("submenu1").disabled=true;
document.getElementById("submenu1").value="NIL";
}
}

function formValidator(){
	// Make quick references to our fields
	var menu = document.getElementById('menu');
	var submenu = document.getElementById('submenu');
	var page_name = document.getElementById('page_name');

	// Check each input in the order that it appears in the form!
	
	if(madeSelection(menu, "Please Select Menu Name!")){
	if(madeSelection(submenu, "Please Select Submenu Name!")){
	if(notEmpty(page_name, "Please enter Page Name !")){
	return true;
	}
	}
	}
	return false;
}

function notEmpty(elem, helperMsg){
	if(elem.value.length == 0){
		alert(helperMsg);
		elem.focus(); // set the focus to this input
		return false;
	}
	return true;
}

function madeSelection(elem, helperMsg){
	if(elem.value == "Select"){
		alert(helperMsg);
		elem.focus();
		return false;
	}else{
		return true;
	}
}

//-->
</script>



 <div id="contentwrapper">
	    <div class="main_content">
       	 	  
	                      <div class="page-head">
                                <div class="container">
                                    <!-- BEGIN PAGE TITLE -->
                                    <div class="page-title">
                                        <h1>Block / Unblock ID                                     
                                        <small>Manage your user ID.</small></h1>
                                    </div>
                                   
                                </div>
                            </div>
                           
			 <div class="page-content">
                                <div class="container">
								
								<div class="row-fluid">
			<div class="span12">
				<?php 
				if($nav=="1"||$nav=="3")
				echo "<div class='alert alert-success'>
				<span>Given information successfully updated !</span>
				</div>";
				elseif($nav=="2"||$nav=="4"||$nav=="6")
				echo "<div class='alert alert-warning'>
				<span>sorry, given information not updated, please try again !</span>
				</div>";
				elseif($nav=="5")
				echo "<div class='alert alert-danger'>
				<span>Selected Record successfully deleted !</span>
				</div>";
				?>
			</div>
		  </div>

                                    
                                    <div class="page-content-inner">
				
				<div class="row portlet light">
										  <div class="col-md-12">
	
        <h3 class="heading">View / Search / Update Users </h3>
		
			<?php
				if($per=="Super Admin")
				$sql1="select * from serviceapp_login where hidden='N' order by user_name";
				else
				$sql1="select * from serviceapp_login where per!='Super Admin' and hidden='N' order by user_name";
				$qu1=mysql_query($sql1);
				?>
		
		<table class="table table-striped table-bordered table-hover dt-responsive" id="sample">
            <thead>
				<tr>
					  <th width="222"><div align="center">User Name</div></th>
                      <th width="226"><div align="center">Password </div></th>
                      <th width="157"><div align="center">Access Privillage </div></th>
                   
                      <th width="72"><div align="center">Option</div></th>
				</tr>
			</thead>
			<tbody>
		   <?php
					$i=1;
					$st1="";
					while($rd=mysql_fetch_array($qu1))
					{
					if($rd['status']=="Allowed") $st1="Block";
					elseif($rd['status']=="Denied") $st1="Unblock";
					
					?>
                    <tr>
                      <td nowrap="nowrap"><div align="center" class="table_text_12px1"><?php echo $rd['user_name'];?></div></td>
                      <td nowrap="nowrap"><div align="center" class="table_text_12px1">
                          <?php $count1=strlen($rd['password']);echo str_repeat('*',$count1);?>
                      </div></td>
                      <td nowrap="nowrap"><div align="center" class="table_text_12px1"><?php echo $rd['per'];?></div></td>
                     
                      <td nowrap="nowrap"><div align="center" class="table_text_12px1"><a href="landing.php?mid=<?php echo $mid;?>&amp;smid=<?php echo $smid;?>&amp;pid=<?php echo $pid;?>&amp;id=<?php echo $rd['user_name'];?>&amp;up=1"><?php echo $st1;?> </a></div></td>
                    </tr>
                    <?php
					}
					?>
			</tbody>        
		</table>
		
			
		    </div>
			</div>
				
				<?php
				$up=$_REQUEST['up'];
				$id=$_REQUEST['id'];
				
				if($up==1)
				{
					$sql2="select * from serviceapp_login where user_name='".$id."'";
					$qu2=mysql_query($sql2);
					while($r2=mysql_fetch_array($qu2))
					{
						$access_user=$r2['user_name'];
						$access_per=$r2['per'];
						
						$access_st1=$r2['status'];
						if($r2['status']=="Allowed") $access_st="Block User ID"; else $access_st="Unblock User ID";
					}
				?>
				<form name="form1" action="<?php if($up==1)echo "up"; else echo "ad";?>d_details.php?mid=<?php echo $mid;?>&smid=<?php echo $smid;?>&pid=<?php echo $pid;?>" method="post">
					<div class="portlet light">
					  
						 <div class="row">
                          <div class="col-md-12">

								<div class="col-md-3">
									
							<label>	  User Name </label><span class="f_req">  </span>: <?php echo $access_user;?>
						      <input name="access_user" type="hidden" id="access_user" value="<?php echo $access_user;?>" />
							  <input name="access_st1" type="hidden" id="access_user" value="<?php echo $access_st1;?>" />
	
								</div>

							  
           				  </div>
					      </div>
						  	 <div class="row">
                          <div class="col-md-12">

						  <div class="col-md-3">
									<label>	Access Privillage </label> <span class="f_req"></span> : <?php echo $access_per;?>		
								   </div>
								   </div>
								   </div>
								   	 <div class="row">
                          <div class="col-md-12">

						
								     <div class="col-md-3">						   
								   
								<label> Access Status </label> <span class="f_req"></span> : <?php echo $access_st1;?>
											
								   </div>
								   </div>
								   </div>
								   
 						 
						                       <div class="form-actions">
                                                                <div class="row">
                                                                    <div class="col-md-offset-3 col-md-9">
                                                                        <button type="submit" class="btn green">Submit</button>
                                                                        <button type="button" class="btn grey-salsa btn-outline">Cancel</button>
                                                                    </div>
                                                                </div>
                                                            </div>
					 </div>

				</form>
				
				<?php }?>
				
				
				
                                        
	    
				
								</div>
						 </div>

		</div>
</div>
</div>

  
<script>

$(document).ready(function()
{
if ( $.fn.dataTable.isDataTable( '#sample' ) ) {
    table = $('#sample').DataTable();
}
else {
    table = $('#sample').DataTable( {
      dom: 'Bfrtip',
        buttons: [
            'copy', 'csv', 'excel', 'pdf', 'print','pageLength'
        ], lengthMenu: [
            [ 10, 25, 50, -1 ],
            [ '10 rows', '25 rows', '50 rows', 'Show all' ]
        ]
    } );
}
});

</script>