home
/
uttpolic
/
web
/
uttpolice-coop.com
/
public_html
➕ New
📤 Upload
✎ Editing:
calculate.php
← Back
<?php include("layout/header.php"); ?> <articles> <section> <div class="wrapper"> <div class="container"> <div class="toppic"> <h1>ตารางการชำระเงิน</h1> </div> <div class="panel panel-default"> <div class="panel-body" style = "font-size:15px;"> <div class = "row"> <div class = "col-md-8"> <h3>คำนวณเงิน</h3> <br> <form> <div class="form-row"> <div class="form-group col-md-6"> <label for="inputEmail4">จำนวนเงินกู้</label> <input type="number" class="form-control" name ="money" id = "money" placeholder="จำนวนเงินกู้"> </div> </div> <div class="form-row"> <div class="form-group col-md-6"> <label for="inputEmail4">อัตราดอกเบี้ย</label> <input type="text" class="form-control" name ="rest" id = "rest" placeholder="อัตราดอกเบี้ย"> </div> </div> <div class="form-row"> <div class="form-group col-md-6"> <label for="inputEmail4">จำนวนผ่อนชำระ</label> <select id="inputState" class="form-control"> <option selected>เงินผ่อนชำระ</option> </select> </div> <div class="form-group col-md-3"> <label for="inputEmail4">งวด</label> <input type="text" class="form-control" name ="month" id = "month" placeholder="งวด"> </div> </div> <div class="form-row"> <div class="form-group col-md-12"> <center><button type="button" class="btn btn-primary" onclick = "cal();">คำนวณ</button></center> </div> </div> <div class="form-row"> <div class="form-group col-md-12"> <center><div id = "zone" style = "font-size:25px;display:none;"> <strong>ประมาณการจำนวนเงินที่ชำระในแต่ละงวด คือ <br><br><span id = "total" style = "color:red;font-size:28px;"></span></strong></div></center> </div> </div> <br> <br> <br> <br> </form> <script> function cal() { var money = $('#money').val(); var rest = $('#rest').val(); var month = $('#month').val(); var total1 = money/month; var total2 = (money*rest/100)*30/365; var total = parseFloat(total1+total2).toFixed(0); $('#zone').css('display','block'); $('#total').html(total); } </script> </div> <div class = "col-md-4"> <h3>อัตราดอกเบี้ยเงินกู้ ต่อปี</h3> <br> <div class="table-rate"> <table class="table"> <thead> <tr> <th width="50%">ประเภท</th> <th width="25%">อัตราเดิม</th> <th width="25%">อัตราใหม่</th> </tr> </thead> <tbody> <?php $sql_loan = "SELECT * FROM utt_loan_interest "; $q_loan = mysqli_query($con,$sql_loan); while($r_loan = mysqli_fetch_array($q_loan)){ if($r_loan['loan_name'] != ""){ ?> <tr> <td style = "font-family: 'IBMPlexSansThai-Regular';"><?php echo $r_loan['loan_name'];?></td> <td class="text-center" style = "font-family: 'IBMPlexSansThai-Regular';"><?php echo $r_loan['loan_rate'];?></td> <td class="text-center" style = "font-family: 'IBMPlexSansThai-Regular';"><?php echo $r_loan['loan_rate_new'];?></td> </tr> <?php } } ?> </table> <p class="text-center"><?php echo $r_about['loan_date'];?></p> </div> </div> </div> </div> </div> </div><!--end container--> </div> </section> </articles> <?php include("layout/footer.php")?> </body> </html>
💾 Save Changes
Cancel
📤 Upload File
×
Select File
Upload
Cancel
➕ Create New
×
Type
📄 File
📁 Folder
Name
Create
Cancel
✎ Rename Item
×
Current Name
New Name
Rename
Cancel
🔐 Change Permissions
×
Target File
Permission (e.g., 0755, 0644)
0755
0644
0777
Apply
Cancel