<? //Random Number Generation
$rand2=substr(rand(),0,4); //only show 4 numbers
?>
<script type="text/javascript">

                        //Validasi untuk Email :
			function validasicontact2(form){
                                if (form.email.value == ""){ alert("Anda belum mengisikan Email"); form.email.focus(); return (false); }
                                pola_email=/^.+@.+..+$/;
                                if (!pola_email.test(form.email.value)){
                                      alert ('Email yang Anda ketik tidak valid. silahkan coba lagi...');
                                      form.email.focus();
                                      return false;
                                   }

                                if (form.kode2.value == ""){ alert("Anda belum menuliskan angka 'Security Code' sebagai validasi"); form.kode2.focus(); return (false); }
                                if (form.kode2.value.trim() != form.ran2.value.trim()){ alert("Angka 'Security Code' yang Anda ketik salah. silahkan coba lagi... "); form.kode2.focus(); return false; }

                        return (true);
			}

                        //Validasi Angka Saja
                        function validAngka(a)
                        {
                                if(!/^[0-9.]+$/.test(a.value))
                                {
                                a.value = a.value.substring(0,a.value.length-1000);
                                }
                        }



</script>






<script type="text/javascript">
//Javascript Referesh Random String
function captch() {
    var x = document.getElementById("ran")
    x.value = Math.floor((Math.random() * 10000) + 1);
}
//Javascript Captcha validation

//Javascript Referesh Random String
function captch2() {
    var x = document.getElementById("ran2")
    x.value = Math.floor((Math.random() * 10000) + 1);
}
//Javascript Captcha validation

</script>
<!-- Animation End Here -->     
        <div class="fxt-content">
            <div class="fxt-header" style="margin-top:-30px;">
                <a href="index-2.html" class="fxt-logo" style="margin-bottom:25px;"><img src="mytheme/images/logo.png" alt="Logo" style="width:200px;"></a> 
                <ul class="fxt-switcher-wrap">
                    <li><a href="index.php?m=depan&id=<?= $id ?>" class="switcher-text">Login</a></li>
                    <li><a href="index2.php?m=join&id=<?= $id?>" class="switcher-text active">Register</a></li>                    <li><a href="index2.php?m=loss_pass&id=<?= $id; ?>" class="switcher-text">Forgot Password</a></li>
                </ul>
            </div>                            
            <div class="fxt-form"> 
                <div class="fxt-transformY-50 fxt-transition-delay-1">
                   <form id="" class="contact-form" name="contact-form" method="post" action="index2.php?m=loss_pass&page=submit&id=<?= $id ?>" onSubmit="return validasicontact2(this)">
                                                            <div class="col-sm-5-aw col-sm-offset-1-aw">
                                                                <div class="form-group">
                                                                    <input type="text" name="idhide" class="form-control" value="<?=$id?>" style="display: none">
                                                                    <input type="text" name="cs_domain" class="form-control" value="<?=$cs_domain?>" style="display: none">
                                                                    <input type="text" name="cs_nm" class="form-control" value="<?=$cs_nm?>" style="display: none">
                                                                    <input type="text" name="cs_email" class="form-control" value="<?=$cs_email?>" style="display: none">
                                                                    <input type="text" name="cs_bank" class="form-control" value="<?=$cs_bank?>" style="display: none">
                                                                    <input type="text" name="cs_bank1" class="form-control" value="<?=$cs_bank1?>" style="display: none">
                                                                    <input type="text" name="cs_bank3" class="form-control" value="<?=$cs_bank3?>" style="display: none">
                                                                    <input type="text" name="cs_bank4" class="form-control" value="<?=$cs_bank4?>" style="display: none">
                                                                    <input type="text" name="cs_hp" class="form-control" value="<?=$cs_hp?>" style="display: none">
                                                                    <input type="text" name="cs_ym" class="form-control" value="<?=$cs_ym?>" style="display: none">
                                                                </div>
                                                                <div class="form-group">
                                                                    <label>Email *</label>
                                                                    <input type="text" name="email" class="form-control" maxlength="100" placeholder="Masukkan email ...">
                                                                </div>
                                                                <div class="form-group">
                                                                    <label>Kode Angka : </label>
                                                                    <input type="" name="ran2" value="<?=$rand2?>" id="ran2" readonly="readonly" class="captcha">&nbsp;&nbsp;<input type="button" value=" Refresh " onclick="captch2()" />
                                                                </div>
                                                                <div class="form-group">
                                                                    <input type="text" name='kode2' id="c_kode2" class="form-control" maxlength="4" placeholder="Ketikkan angka (security code) diatas ..." onkeyup="validAngka(this);"  />
                                                                </div>
                                                                <div class="form-group">
                                                                    <button type="submit" name="submit" class="btn btn-primary btn-lg">Reset Password</button>
                                                                </div>

                                                            </div>
                                                        </form>                     </div>
                    </div>
                    
                    
                    
                    
                </form> 
                
                                
                  
            </div> 