<?php
$title = $pages[$cur_page]["Name"]." - ".HCSGP_DEFTITLE;
$durum = FALSE;
$message = '';
function karakterDuzelt($yazi){
$ara=array("ç","i","ı","ğ","ö","ş","ü");
$degistir=array("Ç","İ","I","Ğ","Ö","Ş","Ü");
$yazi=str_replace($ara,$degistir,$yazi);
$yazi=strtoupper($yazi);
return $yazi;
}
if( isset($_POST["ogcp_adduser"]) ) {
$_POST["user_group"] = 1;
if(@$_POST["user_email"] != "" && @$_POST["user_year"] != "" && @$_POST["user_lastname"] != "" && @$_POST["user_tc"] != "" && @$_POST["user_pass"] != "" && @$_POST["user_name"] != "" && @$_POST["user_city"] != "" && @$_POST["user_address"] != "" && @$_POST["user_telephone"] != "" && (int)@$_POST["user_group"] > 0 && (int)@$_POST["user_group"] < 4) {
$_POST["ShowMachine"] = 0;
$_POST["ShowServers"] = 0;
$_POST["ShowUsers"] = 0;
$_POST["ShowAnnouncements"] = 0;
$_POST["ShowTickets"] = 0;
$_POST["ShowPlugins"] = 0;
$_POST["ShowFiles"] = 0;
if (!filter_var($_POST["user_email2"], FILTER_VALIDATE_EMAIL)) {
$message = "Geçerli bir Email Adresi girin!";
}
else{
$ad = karakterDuzelt(trim($_POST["user_name"]));
$soyad = karakterDuzelt(trim($_POST["user_lastname"]));
$tcKimlikNo = $_POST["user_tc"];
$dogumYili = $_POST["user_year"];
function tcno_dogrula($bilgiler){
$gonder = '<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<TCKimlikNoDogrula xmlns="http://tckimlik.nvi.gov.tr/WS">
<TCKimlikNo>'.$bilgiler["tcno"].'</TCKimlikNo>
<Ad>'.$bilgiler["isim"].'</Ad>
<Soyad>'.$bilgiler["soyisim"].'</Soyad>
<DogumYili>'.$bilgiler["dogumyili"].'</DogumYili>
</TCKimlikNoDogrula>
</soap:Body>
</soap:Envelope>';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://tckimlik.nvi.gov.tr/Service/KPSPublic.asmx" );
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true );
curl_setopt($ch, CURLOPT_POST, true );
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_HEADER, FALSE);
curl_setopt($ch, CURLOPT_POSTFIELDS, $gonder);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'POST /Service/KPSPublic.asmx HTTP/1.1',
'Host: tckimlik.nvi.gov.tr',
'Content-Type: text/xml; charset=utf-8',
'SOAPAction: "http://tckimlik.nvi.gov.tr/WS/TCKimlikNoDogrula"',
'Content-Length: '.strlen($gonder)
));
$gelen = curl_exec($ch);
curl_close($ch);
return strip_tags($gelen);
}
$bilgiler = array(
"isim" => $ad,
"soyisim" => $soyad,
"dogumyili" => $dogumYili,
"tcno" => $tcKimlikNo
);
$adsoyad = $_POST["user_name"]." ".$_POST["user_lastname"];
$sonuc = tcno_dogrula($bilgiler);
if($sonuc=="true"){
$status = Adm_AddUser($tcKimlikNo,$_POST["user_email"],$_POST["user_email2"],$_POST["user_comment"],$_POST["user_pass"],$adsoyad,$_POST["user_city"],$_POST["user_address"],$_POST["user_telephone"],$_POST["user_group"],$_POST["ShowMachine"],$_POST["ShowServers"],$_POST["ShowUsers"],$_POST["ShowAnnouncements"],$_POST["ShowTickets"],$_POST["ShowPlugins"],$_POST["ShowFiles"]);
if($status > 0) {
$message = "Kayıt Başarılı! Yönlendiriliyorsunuz..";
echo '<meta http-equiv="refresh" content="1;URL='.$page->CreatePageLink('Giris').'" />';
} else if($status == -1){
$message = "Böyle bir kullanıcı sistemde mevcut!!";
} else {
$message = "Hata Oluştu!";
}
}
else{
$message = "Girilen Kimlik Bilgileri Uyuşmuyor!";
}
}
} else {
$message = "Alanları Kontrol Edin!";
}
}kayit.php bu<?php
if( isset($_POST["ogcp_adduser"]) ) {
if(@$_POST["user_email"] != "" && @$_POST["user_pass"] != "" && @$_POST["user_name"] != "" && @$_POST["user_city"] != "" && @$_POST["user_address"] != "" && @$_POST["user_telephone"] != "" && (int)@$_POST["user_group"] > 0 && (int)@$_POST["user_group"] < 4) {
if($_POST["user_group"] == 3) {
$_POST["ShowMachine"] = 1;
$_POST["ShowServers"] = 1;
$_POST["ShowUsers"] = 1;
$_POST["ShowAnnouncements"] = 1;
$_POST["ShowTickets"] = 1;
$_POST["ShowPlugins"] = 1;
$_POST["ShowFiles"] = 1;
} else if($_POST["user_group"] == 1) {
$_POST["ShowMachine"] = 0;
$_POST["ShowServers"] = 0;
$_POST["ShowUsers"] = 0;
$_POST["ShowAnnouncements"] = 0;
$_POST["ShowTickets"] = 0;
$_POST["ShowPlugins"] = 0;
$_POST["ShowFiles"] = 0;
}
$status = Adm_AddUser($_POST["user_email"],$_POST["user_email2"],$_POST["user_comment"],$_POST["user_pass"],$_POST["user_name"],$_POST["user_city"],$_POST["user_address"],$_POST["user_telephone"],$_POST["user_group"],$_POST["ShowMachine"],$_POST["ShowServers"],$_POST["ShowUsers"],$_POST["ShowAnnouncements"],$_POST["ShowTickets"],$_POST["ShowPlugins"],$_POST["ShowFiles"]);
if($status > 0) {
$page->GoLocation($page->CreatePageLink('Adm_Kullanici_Duzenle','ID='.$status));
} else if($status == -1){
echo "Kullanıcı adı kullanılıyor!";
} else {
echo "Kullanıcı Eklenemedi!";
}
} else {
echo "Alanları kontrol ediniz!";
}
}
?>adm kullanıcı eklede budur arkadaşlarben şimdi sisteme aynı tc kimlikli kişinin tekrar üye olamayıp böyle bir kullanıcı sistemde mevcut bastırmak istiyorum bunu nasıl yapabilirim ?