Konuyu Oyla:
  • Toplam: 0 Oy - Ortalama: 0
  • 1
  • 2
  • 3
  • 4
  • 5
[YENİ] On numara için kombine kupon oluşturucu
#1
Vakti zamanında bir arkadaşımın babasının isteği üzerine uğraştığım şey Big Grin

PHP Kod:
<?php
header
('Content-Type: text/html; charset=utf-8');
?>
<title>On Numara Kombinasyon</title>
<style>
html,body,table#page{height:100%;width:100%;margin:0;padding:0;}
</style>
<script type="text/javascript">
function resetForm(form) {
    // clearing inputs
    var inputs = form.getElementsByTagName('input');
    for (var i = 0; i<inputs.length; i++) {
        switch (inputs[i].type) {
            // case 'hidden':
            case 'text':
            case 'tel':
                inputs[i].value = '';
                break;
            case 'radio':
            case 'checkbox':
                inputs[i].checked = false;   
        }
    }

    // clearing selects
    var selects = form.getElementsByTagName('select');
    for (var i = 0; i<selects.length; i++)
        selects[i].selectedIndex = 0;

    // clearing textarea
    var text= form.getElementsByTagName('textarea');
    for (var i = 0; i<text.length; i++)
        text[i].innerHTML= '';

    return false;
}
</script>
<div id="page" width="25%">
<?php
if (isset($_POST) && !empty($_POST)) {
echo 
'<pre>';
$kolon $_POST['kolon'];
//print_r($_POST['sayi'])."<BR>";
 
   for ($i 0$i $kolon$i++) {
 
       echo ($i+1)." . Kolon <|";
 
       $output = Array();
 
       for ($j 0$j 10$j++) {
 
           $rnd rand(021);
 
           if (in_array($_POST['sayi'][$rnd], $output)) {
 
               $j--;
 
           } else {
 
               $output[] = $_POST['sayi'][$rnd];
 
               echo $_POST['sayi'][$rnd] . "|";
 
           }
 
       }
 
       echo "<br>";
 
   }
echo 
'</pre>';
}
?>
<form action="" id="onnumara" method="post">
<?php
if (isset($_POST) && !empty($_POST)) {
for (
$x 0$x 22$x++) {
echo (
$x+1).' Sayı : <input type="tel" name="sayi[]" value="'.$_POST['sayi'][$x].'"> <br>';
}
echo 
'Kaç kolon oluşturulsun: <input type="number" name="kolon" value="'.$kolon.'">';
}
else{
for (
$x 0$x 22$x++) {
echo (
$x+1).' Sayı : <input type="tel" name="sayi[]" placeholder="'.rand(1,8).rand(0,9).'"> <br>';
}
echo 
'Kaç kolon oluşturulsun: <input type="number" name="kolon" placeholder="5">';
}
?>
<br>
<input type="submit" value="Gönder"> 
<br><br>
<input type='reset' value='Temizle' name='reset' onclick="return resetForm(this.form);">
</form>
</div> 
Cevapla
#2
End tutuyomu bari Big Grin Big Grin
Ara
Cevapla
#3
(03-02-2016, Saat: 15:44)DeepMan Nickli Kullanıcıdan Alıntı:  End tutuyomu bari Big Grin Big Grin

Sonuç alamadık biz Big Grin
Cevapla
#4
Eger sonuc alinsaydi butun turkiye foruma cokmustu Big Grin belki tutadabilir belli olmaz Big Grin neye gore yapiyo mantik ney?
Ara
Cevapla
#5
(03-02-2016, Saat: 16:00)DeepMan Nickli Kullanıcıdan Alıntı:  Eger sonuc alinsaydi butun turkiye foruma cokmustu Big Grin belki tutadabilir belli olmaz Big Grin neye gore yapiyo mantik ney?

Girilen sayıları rastgele kolonlara dağıtıyor
Cevapla
#6
Guzelmis saolasin Big Grin
Ara
Cevapla
#7
bazı gelmesi zor kombinasyonları devre dışı bırakarak falan geliştirilebilir aslında
Turbobit Premium Link Çeviri | Turbobit Link Generator | http://turbobit.qpython.club
Cevapla

{lang: 'en'}


Hızlı Menü:


Konuyu Okuyanlar: 1 Ziyaretçi
Change Theme