Download Mediafire ไม่ได้ อ่านทางนี้ !!โปรโมชั่นปักหมุดกระทู้ !! | ระบบ Vip System-4x Naruto 700 | One Piece 783 | Bleach 623
0 สมาชิก และ 1 บุคคลทั่วไป กำลังดูหัวข้อนี้
#!/usr/bin/env perl# Thai ID Number Random original code by AssazziN THD # Port to Linux by Ron Linixuse Tk;### ID rand funcsub makeTSSN {$id[0]=int(rand(8))+1;$last=$id[0];foreach $z (2..12) { $id[$z-1]=int(rand(9)); $tmp[$z-1]=$id[$z-1]*(14-$z); $last+=$tmp[$z-1];}$last=11-($last%11);if ($last==11) { $last=1;}elsif ($last==10) { $last=0;}$key=join('',@id);$key.=$last;#return $key;return "$id[0]-$id[1]$id[2]$id[3]$id[4]-$id[5]$id[6]$id[7]$id[8]$id[9]-$id[10]$id[11]-$last";}### GUI my $id;my $mw = new MainWindow();$mw->title("Thai ID Random.");$mw->Label( -text => 'Thai ID Gen : Linux port by Ron Linix Original from AssazziN THD')->pack;$entry = $mw->Entry( -textvariable => \$id )->pack;$mw->Button( -text => 'Generate', -command => sub{ $id = &makeTSSN, print $id,"\n",} )->pack;MainLoop;