ok

Mini Shell

Direktori : /home2/selectio/public_html/wedding-info-new/admin/
Upload File :
Current File : /home2/selectio/public_html/wedding-info-new/admin/raasi.php

<div id="reload">
<?php include('header.php');

    $ids = $_GET['ids'];
    if(isset($ids) and $ids!=""){

    $statement_name = $pdo->prepare("SELECT * FROM tbl_raasi  WHERE id = $ids");
    $statement_name->execute();
    $datas_name = $statement_name->fetchAll(PDO::FETCH_ASSOC);
        
    }
    else{
      $statement = $pdo->prepare("SELECT * FROM tbl_raasi ");
    $statement->execute();
    $datas = $statement->fetchAll(PDO::FETCH_ASSOC);
    $totalData = $statement->rowCount();
    
    }


    // $statement = $pdo->prepare("SELECT * FROM tbl_raasi ");
    // $statement->execute();
    // $datas = $statement->fetchAll(PDO::FETCH_ASSOC);
    // $totalData = $statement->rowCount();
?>
<div class="page-wrapper">
	<div class="page-content" >
	    <div class=" card card-body">
	        <div class="page-breadcrumb d-none d-sm-flex align-items-center mb-3">
					<div class="breadcrumb-title">Zodiac Details :</div>
					<div class="ms-auto">
						<div class="btn-group">
						<a href="raasi_add.php" class="btn btn-sm btn-add"><i class="lni lni-circle-plus"></i> Create a New Zodiac</a>&nbsp;
						</div>
					</div>
		    </div>
		    
		    	<div class="row g-3">
					<div class="col-12 col-lg-4">
					    <div class="input-group mb-3"> 
					        <span class="input-group-text" id="basic-addon1"><i class="lni lni-search-alt"></i></span>
						    <input type="text" class="form-control" id="search-address" autocomplete="off" placeholder="Search Religion Details">
						</div>
					</div>
				    <!--address details start-->
				        <div class="row" id="pickup_address_list">
				            <?php foreach($datas as $data){ ?>
				            <div class="col-12 col-lg-3 col-sm-6">
				               
				          <a href="raasi.php?ids=<?=$data['id']?>" >     
				          <div class="card" style="position: relative;">
				                     <p style="    position: absolute;
                                        width: 74px;
                                        
                                        background-color: <?=(trim($data["status"]=="ACTIVE")?"green":"red")?>;
                                        color: white;
                                        text-align: center;
                                        border-radius: 15px;"> <?=$data['status']; ?></p>
				                     <center><img src="<?=$data['product_img']; ?>" alt="user avatar" style="width: 100%;height: 200px;"></center>
				                     
				                     <div class="col-12" style="padding:5px 5px;"> 
				                        <center><b><?=$data['cat_name']?></b></center>
				                     </div>
				                     <div class="col-12" style="padding:10px 5px;">
                            			<center>
                            			   <a class="update" href="raasi_edit.php?id=<?=$data['id'] ?>"><i class="lni lni-pencil-alt"></i> Update</a>
                            				<a class="delete"  onclick="rel_delete(<?=$data['id'] ?>)"><i class="lni lni-trash"></i> Delete</a>
                            			</center>			
                            		</div>
				                </div></a>
				           
				           
				            </div>
				       <?php } ?>
				           
				        </div>
				    <!--address details end-->
				</div><!---end row-->
		    
		    
		    
		    
	    </div>
	</div>
</div>
</div>
<script>
    function rel_delete(ids){
          var result = confirm("Confirm want to delete this  Details?");
            if(result){
            $.ajax({
            url: 'api/raasi_delete.php?ids='+ids,
            type: 'post',
            dataType: 'json',
            cache: false,
            contentType: false,
            processData: false,
            success: function(response) {
                console.log(response);
                if (response['status'] == 200) {
                    success(response['message']);

                    window.location.reload();
                } else {
                    warning(response['message']);
                }
            }
        });

    }}
    
    
</script>

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

Zerion Mini Shell 1.0