ok

Mini Shell

Direktori : /home2/selectio/public_html/subamangala/admin/apis/
Upload File :
Current File : /home2/selectio/public_html/subamangala/admin/apis/search-profiles.php

<?php 
ob_start();
session_start();
include "../config/config.php";
$session_id = $_SESSION['subamangala_matrimony']['id'];



// City Details Create, Update Starts Here 

if(isset($_POST['dob']) && $_POST['dob']!="")
   
   
   {
	// Get matched data from skills table
	
	$statement = $pdo->prepare("SELECT * FROM profiles e where e.dob='".$_POST['dob']."' and delete_status=1");
    $statement->execute();
    $datas = $statement->fetchAll(PDO::FETCH_ASSOC);
	$totalData = $statement->rowCount();

	
	// Generate skills data array
	$data = "";
	$data .= "<table class=\"table\">
                <tr>";
				
// 	$data .= '<th id="psid"><input type="checkbox" name="select_all" value="1" size="15" id="example-select-all"></th>';
// 	$data .= '<input type="checkbox" id="selective" name="father_abs" value="HTML">';
	$data .= "<th data-sortable='false' id='checkAll'><i class='fa fa-check'></i><span id='d' ></span></th>";
	$data .= "<th>பதிவு எண்</th>";
	$data .= "<th>பதிவு முறை</th>";
	$data .= "<th>பெயர்</th>";
	$data .= "<th>பாலினம்</th>";
	$data .= "<th>ஜாதி</th>";
	$data .= "<th>பிறந்த தேதி</th>";
	$data .= "<th>நட்சத்திரம்</th>";
	$data .= "<th>அப்பா பெயர்</th>";
	$data .= "<th>இருப்பிடம்</th>";
	$data .= "<th>புரோக்கர் பெயர்</th></tr>";
	$brokername ='';
	
													
	
	if($totalData > 0){
	foreach($datas as $row){
			//			<input type='checkbox' id='vehicle1' name='vehicle1' value='Bike'>class="s" id="xyz_'.$row["id"].'"  name="assign_ids" value="'.$row["id"].'"
			$data .= "<tr><td align='center'><input class='s' type='checkbox' id='xyz_'".$row["id"]."' name='assign_ids'  value=".$row['id']."></td>";
			$data .= "<td align='center'>".$row["regnop"]." ".$row['id']."</td>";
			$data .= "<td align='center'>".$row['regtype']."</td>";
			$data .= "<td align='center'>".$row['bname']."</td>";
			$data .= "<td align='center'>".$row['gender']."</td>";
			
		
			
			$statement1 = $pdo->prepare("select * from caste where id='".$row['caste']."'");
            $statement1->execute();
            $caste_data = $statement1->fetchAll(PDO::FETCH_ASSOC);
    
			$caste = $caste_data[0]["name"];
			
			
			$data .= "<td align='center'>".$caste."</td>";
			$data .= "<td align='center'>".$row['dob']."</td>";
			
			if( $row["natchatram"]=="1"){ $natchatram =  "அஸ்வினி";}
																 
			else if( $row["natchatram"]=="2"){  $natchatram = "பரணி";}
			else if( $row["natchatram"]=="3"){  $natchatram = "கார்த்திகை";}
			else if( $row["natchatram"]=="4"){  $natchatram = "ரோகிணி";}
			else if( $row["natchatram"]=="5"){  $natchatram = "மிருகசீரிடம்";}
			else if( $row["natchatram"]=="6"){  $natchatram = "திருவாதிரை";}
			else if( $row["natchatram"]=="7"){  $natchatram = "புனர்பூசம்";}
			else if( $row["natchatram"]=="8"){  $natchatram = "பூசம்";}
			else if( $row["natchatram"]=="9"){  $natchatram = "ஆயில்யம்";}
			else if( $row["natchatram"]=="10"){  $natchatram = "மகம்";}
			else if( $row["natchatram"]=="11"){  $natchatram = "பூரம்";}
			else if( $row["natchatram"]=="12"){  $natchatram = "உத்தரம்";}
			else if( $row["natchatram"]=="13"){  $natchatram = "அஸ்தம்";}
			else if( $row["natchatram"]=="14"){  $natchatram = "சித்திரை";}
			else if( $row["natchatram"]=="15"){  $natchatram = "சுவாதி";}
			else if( $row["natchatram"]=="16"){  $natchatram = "விசாகம்";}
			else if( $row["natchatram"]=="17"){  $natchatram = "அனுஷம்";}
			else if( $row["natchatram"]=="18"){  $natchatram = "கேட்டை";}
			else if( $row["natchatram"]=="19"){  $natchatram = "மூலம்";}
			else if( $row["natchatram"]=="20"){  $natchatram = "பூராடம்";}
			else if( $row["natchatram"]=="21"){  $natchatram = "உத்திராடம்";}
			else if( $row["natchatram"]=="22"){  $natchatram = "திருவோணம்";}
			else if( $row["natchatram"]=="23"){  $natchatram = "அவிட்டம்";}
			else if( $row["natchatram"]=="24"){  $natchatram = "சதயம்";}
			else if( $row["natchatram"]=="25"){  $natchatram = "பூரட்டாதி";}
			else if( $row["natchatram"]=="26"){  $natchatram = "உத்திரட்டாதி";}
			else if( $row["natchatram"]=="27"){  $natchatram = "ரேவதி";}
								
								
								
			$data .= "<td align='center'>".$natchatram."</td>";
			$data .= "<td align='center'>".$row['father_name']."</td>";
			$data .= "<td>".$row['native_place']."</td>";
			
			
		
																
			if($row['brokercount']>0)
			{
				if(@strpos(",", $row['broker_ids']) !== false ) 
				{
					$bro_ids[0] =$row['broker_ids'];
					
				}
				else
				{
					$bro_ids = explode(",",$row['broker_ids']);
				}
				for($i=0;$i< $row['brokercount'];$i++)
				{
				    
				    
				    $statement3 = $pdo->prepare("SELECT * FROM brokers where id='$bro_ids[$i]'");
                    $statement3->execute();
                    $bro_row = $statement3->fetchAll(PDO::FETCH_ASSOC);
				
				
					
			
			if($bro_row[0]['brokername']!="")
			{
			$brokername = $bro_row[0]['brokername'];      
			  
		
			}
			}
			}
			

			
			
			$data .= "<td align='center'>".$brokername."</td></tr>";
			//array_push($skillData, $data);
		}
		$data .= "<tr><td colspan='7' style='text-align:right'>
		<a href='#' class='btn btn-warning btn-sm' id='print_lable'><i class='fa fa-tags'></i>Edit The Profile</a>
				    </td></tr>";
	}
	
	else
	{
		$data .= "<tr><td align='center' colspan='7'>பொருத்தமான பதிவுகள் இல்லை.  </td></tr>";
			
		
	}
	
	$data .= "</table>";
	// Return results as json encoded array
	echo $data;
	
} 

?>
<style>
.s {
    visibility: visible !important;
    opacity: 1 !important;
    width: 15px !important;
    height: auto !important;
    display: block !important;
    margin-top: 20px;
}
</style>

<script>
      $(document).ready(function() {  
    
  $('#checkAll').click(function () { 
        var d=$('#d').text();
        if(d==''){
            $('#d').text('checked');
            $('.s').prop('checked',true);
        }else{
            $('#d').text('');
            console.log('un checked');
             $('.s').prop('checked',false);
        }
 });
 
    $('.checkboxs').on('click',function(){
        console.log('clicked');
    });
    
     $('#print_lable').on('click',function(){
    var checkValues = $('input[name=assign_ids]:checked').map(function(){
                return $(this).val();
            }).get();

    if(checkValues != '' ){
       
       var result = confirm("Conform Do You Want Set Preferance");
if (result) {
    window.open('admin/edit-profile.php?id='+checkValues, '_blank');
}

	   
    }else{
        alert("Please Select Minimum One Product Lable");
    }
    }); 
  
});  
</script>

Zerion Mini Shell 1.0