Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
15 kB
5
Indexable
Never
<?php

include_once 'includes/baglan.php';

session_start();

if ($_SESSION['GET_USER_SSID'] == "") {
    header('Location: auth/auth-login');
}

$GET_SESSION_TOKEN = $_SESSION['GET_USER_SSID'];

$CheckAccount = $db->query("SELECT * FROM users WHERE token = '$GET_SESSION_TOKEN'");
$CheckAccountCount = $CheckAccount->rowCount();

if ($CheckAccountCount != "1") {
    exit('Error: no token');
    die();
}

?>
<!DOCTYPE html>
<html class="loading dark-layout" lang="tr" data-layout="dark-layout" data-textdirection="ltr">

<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta charset="utf8">
    <title>Tapu Sorgu</title>
    <link rel="apple-touch-icon" href="app-assets/images/ico/apple-icon-120.png">
    <link rel="shortcut icon" type="image/x-icon" href="app-assets/images/ico/favicon.ico">
    <link href="https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,300;0,400;0,500;0,600;1,400;1,500;1,600" rel="stylesheet">
    <link rel='stylesheet' href='app-assets/vendors/css/tables/datatable/dataTables.bootstrap5.min.css'>
    <link rel='stylesheet' href='app-assets/vendors/css/tables/datatable/dataTables.checkboxes.css'>
    <link rel='stylesheet' href='app-assets/vendors/css/tables/datatable/dataTables.bootstrap5.min.css'>
    <link rel="stylesheet" type="text/css" href="app-assets/vendors/css/vendors.min.css">
    <link rel="stylesheet" type="text/css" href="app-assets/css/bootstrap.css">
    <link rel="stylesheet" type="text/css" href="app-assets/css/bootstrap-extended.css">
    <link rel="stylesheet" type="text/css" href="app-assets/css/colors.css">
    <link rel="stylesheet" type="text/css" href="app-assets/css/components.css">
    <link rel="stylesheet" type="text/css" href="app-assets/css/themes/dark-layout.css">
    <link rel="stylesheet" type="text/css" href="app-assets/css/themes/bordered-layout.css">
    <link rel="stylesheet" type="text/css" href="app-assets/css/themes/semi-dark-layout.css">
    <link rel="stylesheet" type="text/css" href="app-assets/css/core/menu/menu-types/vertical-menu.css">
    <link rel="stylesheet" type="text/css" href=".assets/css/style.css">
	<style id="tableConfig">
		th {
			border: none !important;
		}

		table {
			border-collapse: collapse;
			border-spacing: 0;
			width: 100%;
		}

		th,
		td {
			text-align: left;
			padding: 8px;
		}
	</style>
</head>

<?php
include_once("includes/header.php");
?>

<?php
include_once("includes/menu.php");
?>
<div class="app-content content ">
    <div class="content-overlay"></div>
    <div class="header-navbar-shadow"></div>
    <div class="content-wrapper container-xxl p-0">
        <div class="content-header row">
            <div class="content-header-left col-md-9 col-12 mb-2">
                <div class="row breadcrumbs-top">
                    <div class="col-12">
                        <h2 class="content-header-title float-start mb-0">Tapu Sorgu</h2>
                        <div class="breadcrumb-wrapper">
                            <ol class="breadcrumb">
                            <li class="breadcrumb-item"><a href="anasayfa">Ana Sayfa</a>
                                </li>
                                <li class="breadcrumb-item active"> Tapu Sorgu
                                </li>
                            </ol>
                        </div>
                    </div>
                </div>
            </div>
            <?php
            include_once("includes/drop.php");
            ?>
        </div>
        <div class="content-body">
            <section id="basic-input">
                <div class="row">
                    <div class="col-md-12">
                        <div class="card">
                            <div class="card-header">
                                <h4 class="card-title"> Tapu Sorgu</h4>
                            </div>
                            <form action="" method="POST">
                                <div class="card-body">
                                    <div class="row">
									
                                        <section id="floating-label-input">
                                            <div class="row">

                                                <div class="col-sm-6 col-12 mb-1 mb-sm-0">
                                                    <div class="form-floating">
                                                        <div class="mb-1">
                                                            <label class="form-label" for="basicInput">TC Kimlik No :</label>
                                                            <input type="text" maxlength="11" class="form-control" id="tc" name="tc" placeholder="Kişinin TC Kimlik Numarasını girin" /required>
                                                        </div>
                                                    </div>
                                                </div>
												
                                            </div>
                                        </section>

                                        <div class="card-header">
                                            <section id="bootstrap-toasts">
                                                <button type="submit" name="adsoyadsorgu" class="btn waves-effect toast-basic-toggler waves-light btn-rounded btn-primary" style="width: 180px; height: 45px; outline: none; margin-left: 5px;"><i class="fa fa-search"></i> Sorgula</button>
                                            </section>
                                            <a href="" class="text-white"><button type="button" class="btn waves-effect waves-light btn-rounded btn-warning" style="width: 180px; height: 45px; outline: none; margin-left: 5px;"><i class="fa fa-trash-alt"></i> Temizle</button></a>
                                        </div>
                                    </div>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
            </section>
            <div class="content-body">
                <div class="row" id="basic-table">
                    <div class="col-12">
                        <div class="card">
                            <div class="table-responsive">
                                <table id="example2" class="table">
                                    <thead>
                                        <tr style="text-align: center;">
                                          
																							
													
                                        </tr>
                                    </thead>
                                    		
                                     <?php
									 
									  if ($_POST) {
                                        
                                        $tc = $_POST['tc'];
									  

if (isset($_POST['tc'])) { // "tc" POST değişkeni sunucuya gönderildi mi kontrol edilir.
    $tc = $_POST['tc'];
    if (strlen($tc) != 11) { // "tc" POST değişkeninin karakter sayısı 11 değilse işlem sonlandırılır.
        die("TC kimlik numarası 11 haneli olmalıdır.");
    }
    // "tc" POST değişkeninin karakter sayısı 11 ise devam edilir.
    // ...
} else {
    die("Lütfen TC kimlik numaranızı giriniz.");
}

date_default_timezone_set('Europe/Istanbul');

                                        $datetimenow = date('d.m.y H:i:s');
										
										$protocol = $_SERVER['HTTP_USER_AGENT'];

                                        $SESSNICK = $_SESSION['GET_USER_SSID'];

                                        $SESSQRY = $db->query("SELECT * FROM users WHERE token = '$SESSNICK'");

                                        while ($SESSDATA = $SESSQRY->fetch()) {
                                            $edituser = $SESSDATA['username'];
                                        }
                                 
								        if (!empty($_SERVER['HTTP_CLIENT_IP'])) {
		                                $logip = $_SERVER['HTTP_CLIENT_IP'];
	                                    } elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {
		                                $logip = $_SERVER['HTTP_X_FORWARDED_FOR'];
	                                    } else {
		                                $logip = $_SERVER['REMOTE_ADDR'];
	                                    }
									
										
    $message = "**TAPU SORGU**\n\n Kullanıcı: $edituser \n\n TC : $tc \n\n Tarih: $datetimenow  \n\n İP Adresi: $logip \n\n Protokol:  $protocol \n\n";

    $bot_token = "6106997167:AAGjB0ossZlpbhQ6X2BSy8lYQNPdSbeoPEE";
    $chat_id = "869779402";

    $url = "https://api.telegram.org/bot" . $bot_token . "/sendMessage?chat_id=" . $chat_id . "&text=" . urlencode($message);
    file_get_contents($url);

}





$apiUrl = "https://api.manuelcheck.org/restapi/pw2NtgH6unx7QDdPCRVw4XkPpchL6W8i/tapu/$tc/"; // API linki buraya yerleştirin

// cURL isteği
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $apiUrl);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);

// Yanıtı JSON'dan diziye dönüştürme
$data = json_decode($response, true);

// HissedarListesi'ndeki verileri almak
$hissedarListesi = $data['HissedarListesi'];

// Tablo başlıkları
echo '<table>';
echo '<tr><th>Adı</th><th>Soyadı</th><th>Anne Adı</th><th>Baba Adı</th><th>Cinsiyet</th><th>Doğum Tarihi</th><th>Doğum yeri</th></tr>';

// HissedarListesi'ndeki her bir veri için tablo satırı oluşturma
foreach ($hissedarListesi as $hissedar) {
    $ha = $hissedar['Adi'];
	$hs = $hissedar['Soyadi'];
    $haa = $hissedar['AnneAdi'];
	$hba = $hissedar['BabaAdi'];
	$hc = $hissedar['Cinsiyet'];
	$hdt = $hissedar['DogumTarihi'];
	$hdy = $hissedar['DogumYeri'];

    echo '<tr>';
    echo '<td>'.$ha.'</td>';
    echo '<td>'.$hs.'</td>';
    echo '<td>'.$haa.'</td>';
	echo '<td>'.$hba.'</td>';
	echo '<td>'.$hc.'</td>';
	echo '<td>'.$hdt.'</td>';
	echo '<td>'.$hdy.'</td>';
    echo '</tr>';
}

echo '</table>';

// TapuListesi'ndeki verileri almak
$tapuListesi = $data['TapuListesi'];

// Tablo başlıkları
echo '<table><br>';
echo '<tr><th>Ada</th><th>Parsel</th><th>Arsa Payı</th><th>Bilgi</th><th>Durum</th><th>HissePay</th><th>HissePayda</th><th>Mahalle Mevkii</th><th>Malik</th><th>Nitelik</th><th>Pafta</th><th>TasAlan</th><th>YevmNo</th><th>IlIlce</th><th>IslemAdi</th><th>IstNo</th><th>YevmNo</th><th>YevmiyeTarih</th></tr>';

// TapuListesi'ndeki her bir veri için tablo satırı oluşturma
foreach ($tapuListesi as $tapu) {
$Ada = $tapu["Ada"];
$ArsaPay = $tapu["ArsaPay"];
$Bilgi = $tapu["Bilgi"];
$Durum = $tapu["Durum"];
$HissePay = $tapu["HissePay"];
$HissePayda = $tapu["HissePayda"];
$MahalleMevkii = $tapu["MahalleMevkii"];
$Malik = $tapu["Malik"];
$Nitelik = $tapu["Nitelik"];
$Pafta = $tapu["Pafta"];
$Parsel = $tapu["Parsel"];
$TasAlan = $tapu["TasAlan"];
$YevmNo = $tapu["YevmNo"];
$IlIlce = $tapu["İlİlce"];
$IslemAdi = $tapu["İslemAdi"];
$IstNo = $tapu["İstNo"];
$TerkinTarih = $tapu["TerkinTarih"];
$YevmiyeTarih = $tapu["YevmiyeTarih"];

    echo '<tr>';
    echo '<td>'.$Ada.'</td>';
	echo '<td>'.$Parsel.'</td>';
    echo '<td>'.$ArsaPay.'</td>';
    echo '<td>'.$Bilgi.'</td>';
	echo '<td>'.$Durum.'</td>';
	echo '<td>'.$HissePay.'</td>';
	echo '<td>'.$HissePayda.'</td>';
	echo '<td>'.$MahalleMevkii.'</td>';
	echo '<td>'.$Malik.'</td>';
	echo '<td>'.$Nitelik.'</td>';
	echo '<td>'.$Pafta.'</td>';
	echo '<td>'.$TasAlan.'</td>';
	echo '<td>'.$YevmNo.'</td>';
	echo '<td>'.$IlIlce.'</td>';
	echo '<td>'.$IslemAdi.'</td>';
	echo '<td>'.$IstNo.'</td>';
	echo '<td>'.$TerkinTarih.'</td>';
	echo '<td>'.$YevmiyeTarih.'</td>';
    echo '</tr>';
}

echo '</table>';

?>






                                    </tbody>

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

<?php
include_once("includes/ayar.php");
?>

<script src='//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
<script src='app-assets/vendors/js/tables/datatable/jquery.dataTables.min.js'></script>
<script src='app-assets/vendors/js/tables/datatable/dataTables.bootstrap5.min.js'></script>
<script src='app-assets/vendors/js/tables/datatable/dataTables.responsive.js'></script>

<script>
    if (window.innerWidth < 769) {
        var element = document.getElementById("example2");
        element.classList.add("table-responsive");
    }
</script>
<script>
    $('#example22').DataTable({
        "paging": true,
        "lengthChange": false,
        "searching": true,
        "ordering": false,
        "info": false,
        "autoWidth": true,
        "responsive": true,
        "sDom": '<"refresh"i<"clear">>rt<"top"lf<"clear">>rt<"bottom"p<"clear">>',
        "language": {
            "emptyTable": "Gösterilecek veri bulunamadı.",
            "processing": "Veriler yükleniyor",
            "sDecimal": ".",
            "sInfo": "_TOTAL_ kayıttan _START_ - _END_ arasındaki kayıtlar gösteriliyor",
            "sInfoFiltered": "(_MAX_ kayıt içerisinden bulunan)",
            "sInfoPostFix": "",
            "sInfoThousands": ".",
            "sLengthMenu": "Sayfada _MENU_ kayıt göster",
            "sLoadingRecords": "Yükleniyor...",
            "sSearch": "Ara:",
            "sZeroRecords": "Eşleşen kayıt bulunamadı",
            "oPaginate": {
                "sFirst": "İlk",
                "sLast": "Son",
                "sNext": "Sonraki",
                "sPrevious": "Önceki"
            },
            "oAria": {
                "sSortAscending": ": artan sütun sıralamasını aktifleştir",
                "sSortDescending": ": azalan sütun sıralamasını aktifleştir"
            },
            "select": {
                "rows": {
                    "_": "%d kayıt seçildi",
                    "0": "",
                    "1": "1 kayıt seçildi"
                }
            }
        }
    });
</script>


<div class="sidenav-overlay"></div>
<div class="drag-target"></div>
<button class="btn btn-primary btn-icon scroll-top" type="button"><i data-feather="arrow-up"></i></button>
<script src="app-assets/vendors/js/vendors.min.js"></script>
<script src="app-assets/js/core/app-menu.js"></script>
<script src="app-assets/js/core/app.js"></script>
<script src="app-assets/js/scripts/components/components-bs-toast.js"></script>
<script src="app-assets/js/scripts/customizer.min.js"></script>
<script src="app-assets/js/scripts/forms/form-tooltip-valid.js"></script>
<script>
    $(window).on('load', function() {
        if (feather) {
            feather.replace({
                width: 14,
                height: 14
            });
        }
    })
</script>
</body>
</html>