<?php 	include_once('../../config.php');
		 
?>  
<?php  include ABS_PATH.'/admin/header.php';	?>   
<style> 
    td
    {
        font-size:18px;
         
    }  
    th
    {
        font-size:20px;
        font-weight:bold;
        color:orange;
    } 
</style>
<script>
function del_record(val)
{

	var r = confirm("Do you really want to delete digit !");
	if (r == true) {    
	$.ajax({
	type: 'POST',
	url: "../ajax/default.php",
	//async: false,			 
	data: {DelBlocked:1,val:val},	  
	success: function(ajaxresult){	     
		location.reload();	 	
	},
	error: function(XMLHttpRequest, textStatus, errorThrown) { 
	alert('Error');
	}
	});
	
	}	
	
}

</script> 
		 
<?php 

    $Rs1t = mysql_query("select * from    splitCalE   "); 
    $key = 1;
    while($rw1 = mysql_fetch_object($Rs1t))
    {
         $SplitFor[$key] = $rw1->cal1;
         $key++;
    } 
     
     
    function functionCheck($id,$cal)
    {    
      $RowsCt = mysql_num_rows(mysql_query("select * from   splitCalc  where calcId = $id and col = $cal "));   
      
      if($RowsCt > 0)
      {
          $Rst = mysql_fetch_object(mysql_query("select splitAmt from   splitCalc  where calcId = $id and col = $cal "));  
          return $Rst->splitAmt;
      }else  
        return "";
    }
?>		 
		<div class="col-md-10">  
  			<div class="content-box-large">
  				<div class="panel-heading">
					<div class="panel-title"><h3> Blocked Digits</h3></div>
					
					<div align="right"> 
					
					<input type="button"    class="btn btn-warning" name="btnback" id="btnback" value=" Add New Digit " onClick="javascript:location.href='editcalb.php';" />
					</div> 
				 
				</div>
			
				
  				<div class="panel-body">
  				    
  				    	<Br>	<Br>	<Br>	<Br>
  					<table cellpadding="0" cellspacing="0" border="0" class="table table-striped table-bordered" id="example">
						<thead>
							<tr> 
								<th>Digit</th>    
								<th>Action</th>  
							</tr>
						</thead>
						<tbody>
							<?php  
								  $result = mysql_query("select * from  blockedD"); 
								  while($row = mysql_fetch_object($result))
								  {           
							?>
							<tr class="odd gradeX"> 
								<td><?php echo $row->digit;?></td>    
								<td class="center" >
								    <a  style="font-size:12px;"  href="javascript:void(0);" onclick="del_record(<?php echo $row->id;?>)"> Delete</a>
						         </td> 
							</tr>  
							<?php }  
							?>
						</tbody>
					</table>  
  				</div>
  			</div>
		  </div>
		</div>
    </div>  
<?php  include ABS_PATH.'/admin/footer.php';	?>    