intert code costum flied

Helpdesk for my helpdesk software

Moderator: mkoch227

Post Reply
osmanemre
Posts: 14
Joined: Tue Apr 26, 2016 8:49 am

intert code costum flied

Post by osmanemre »

function tcno_kontrol($tc = null){

//koşullara uygun ama doğru olamayacak değerler dizisi
$filtre = array(
11111111110, 22222222220, 33333333330,
44444444440, 55555555550, 66666666660,
77777777770,88888888880, 99999999990
);

//Parametre string türüne döndürülüyor
$tc =(string) $tc;

/* • İlk rakam 0 ise veya
• Parametre tamamen rakam değil ise veya
• Parametre 11 karakterden oluşmuyor ise veya
• Parametre gönderilmemiş ise veya
• Parametre fltre içinde var ise FALSE değer döndür */
if( $tc[0] == 0 || !ctype_digit($tc) || strlen($tc)!=11 || is_null($tc) || in_array($tc, $filtre)){
return false;
}else{

//Parametrenin 1, 3, 5, 7 ve 9. değerdeki rakamları topla
$tek_toplam = $tc[0] + $tc[2] + $tc[4] + $tc[6] + $tc[8] ;

//Parametrenin 2, 4, 6 ve 8. değerdeki rakamları topla
$cift_toplam = $tc[1] + $tc[3] + $tc[5] + $tc[7];

//1,3,5,7,9 değerindeki rakamlar toplamını 9 ile çarpıp çift rakamlar toplamını çıkar
$on_sonuc = ($tek_toplam * 7) - $cift_toplam;

// 1,2,3,4,5,6,7,8,9 ve 10. anahtardaki rakamları topla
$on_toplam = 0;
for($i = 0; $i < 10; $i++){
$on_toplam = $on_toplam + $tc[$i];
}//for döngü bitimi


/* • 1,3,5,7,9 toplam 7 çarpım ve 2,4,6,8 çıkarma sonucunun 10 a bölümünden kalan 10. rakama eşit değil ise veya
• İlk 10 rakam toplamının 10 a bölümünden kalan 11. rakama eşit değil ise FALSE döndür*/
if( $on_sonuc % 10 != $tc[9] || $on_toplam % 10 != $tc[10] ){
return false;

//Eğer hiç bir sorun yok ise TC NO doğrudur TRUE döndür.
}else{

return true;

}//else koşul bitimi

}//else koşul bitimi

}//tcno_kontrol() fonksiyon bitimi


VADİLATOR

$tc_no = 12345678901;
if(tcno_kontrol( $tc_no )){
echo "Bu geçerli bir TC Kimlik Numarasıdır.";
}else{
echo "Bu TC Kimlik Numarası Geçersizdir.";
}



help me intergaiton
Klemen
Site Admin
Posts: 10143
Joined: Fri Feb 11, 2005 4:04 pm

Re: intert code costum flied

Post by Klemen »

Hesk does not support SMS-integration at the moment.

Some SMS services allow you to create SMS by sending an email message to a special email address. Check if your provider allows that and you could create a new user with that email address.

For a complete integration, you will need to hire a PHP developer to help you, for example by posting a project to sites like upwork.com or freelancer.com
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Post Reply