ok

Mini Shell

Direktori : /proc/thread-self/root/proc/self/root/home2/selectio/www/salemgovtitialumni.in/
Upload File :
Current File : //proc/thread-self/root/proc/self/root/home2/selectio/www/salemgovtitialumni.in/payment-details.php

<?php include 'header.php';
// Check the id is valid or not
	$event = $pdo->prepare("SELECT * FROM tbl_service");
	$event->execute();
	
	$result = $event->fetchAll(PDO::FETCH_ASSOC);
	$total = $event->rowCount(); ?>

<style>
@media (min-width: 1200px){
    .upstudy-about-section-05 .about-wrap {
        width: 45%;
        margin-left: 25%;
        margin-top: -5%;
    }
    
    .nice-select {
    width: 100% !important;
    }
}
</style>



        
        
        <?php
$error_message="";
if(isset($_POST['submit'])) {
    
    
    
     if(isset($_FILES['photo']) && $_FILES["photo"]["name"]!=""){
                        $extension = end(explode(".", $_FILES["photo"]["name"]));
                        $image = rand(10,1000000000)."-gallery." . $extension;
                        $upload = move_uploaded_file($_FILES['photo']['tmp_name'], 'dashboard/admin/img/payment_proof/' . $image);
                        $upload_image = 'dashboard/admin/img/payment_proof/' . $image;   
                }
                else{
                    $upload_image='';
                }
            

      
                		
                		$amount = strip_tags($_POST['amount']);
                		$transation_id = strip_tags($_POST['transation_id']);
                
                
                if(isset($_SESSION['salemgov-iti'])){ 
                    $member_id = $_SESSION['salemgov-iti']['id'];
                    $membership_type = $_SESSION['salemgov-iti']['membership_type'];
                    
                }
                    
            $statement = $pdo->prepare("INSERT INTO tbl_membership_payment (membership_type_id,member_id,amount,transaction_id,photo) VALUES (?,?,?,?,?)");
		    $result = $statement->execute(array($membership_type, $member_id, $amount, $transation_id,$upload_image));      
		    
		    if($result){
		        echo "<script>
		                alert('Payment details is Verifing');
		               </script>";
		    }
                   
                    
} 
?>



<!-- Page Banner Start -->
        <div class="section page-banner-section" style="background-image: url(assets/images/bg/page-banner.jpg);margin-top: 15%;min-height: 130px;">
            <div class="container">
                <div class="page-banner-wrap">
                    <div class="row">
                        <div class="col-lg-12">
                            <!-- Page Banner Content Start -->
                            <div class="page-banner text-center" style="margin-top: -8%;">
                                <h2 class="title" style="color: #f17a28;">Payment Details</h2>
                                <ul class="breadcrumb justify-content-center">
                                    <li class="breadcrumb-item" style="color: #2e3092;"><a href="#">Home</a></li>
                                    <li class="breadcrumb-item active" aria-current="page" style="color: #2e3092;">Payment Details</li>
                                </ul>
                            </div>
                            <!-- Page Banner Content End -->
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <!-- Page Banner End -->
        
        
        
        
        <!-- About Start -->
        <div class="section upstudy-about-section-05 section-padding-02" style="padding-top: 20px;">
            <div class="container">
                <h3 class="title" style="color: #dc3545;text-align: center;padding-bottom: 5%;">Bank Details</h3>
                <div class="col-12 col-xl-12">
                           
                       </div>
                <div class="about-wrap" style="padding-bottom: 5%;">
                    
                <h2 class="title" style="color: #dc3545;text-align: center;padding-bottom: 5%;">Pay Now <?= $payment_type_result[0]['amount'] ?></h2> 
            
          <div class="row">
                       <div class="col-lg-12" style="padding-top: 10%;padding-bottom: 0%;">
                            <!-- About Link Start -->
                            <div class="about-link-wrap">
                               
                                <div class="link-list" style="margin-left: -10%;">
                                    <table>
                                        <thead >
                                            <tr>
                                  <th></th>
                                 </tr>
                                        </thead>
                                
                                <tr>
                                    <td >Name :</th>
                                  <td>Salem Govt. ITI Alumni Association</td>
                                </tr>
                                <tr>
                                    <td>
                                        Account No. :
                                    </td>
                                    <td>
                                       33764798696
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                       A/c Type :
                                    </td>
                                    <td>
                                       Regular Savings Bank Account
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                       Bank :
                                    </td>
                                    <td>
                                      State Bank of India
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                       Branch :
                                    </td>
                                    <td>
                                       Kannankurichi, Salem.
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        IFS Code :
                                    </td>
                                    <td>
                                        SBIN0017121
                                    </td>
                                </tr>
                                    </table> 
 
 
 


                                </div>
                            </div>
                            
                            <!-- About Link End -->
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <!-- About End -->
        
        
        

        <!-- Login & Register Start -->
        <div class="section login-register-section">
            <div class="container">
                <div class="row">
                <div class="col-lg-12">
                <!-- Login & Register Wrapper Start -->
                <div class="login-register-wrap">
                    <div class="container">
                    <div class="row" style="display: flex;justify-content: center;">
                        <div class="col-lg-6"  >

                            <!-- Login & Register Box Start -->
                            <div class="login-register-box">
                                <!-- Section Title Start -->
                                <div class="section-title">
                                    <h2 class="title">Payment Details</h2>
                                </div>
                                <!-- Section Title End -->

                                <div class="login-register-form">
                                    <form action="" method="post" enctype="multipart/form-data" >
                                        <div class="single-form">
                                            <lable>Amount <span style="color:red;" >*</span></lable>
                                            <input type="number" name="amount" id="amount" class="form-control" onkeyup="paymentAmount()" placeholder="Amount" Required>
                                            <div id="error_message">
                                                
                                            </div>
                                            <input type="hidden" name="membership_amount" id="membership_amount" value="<?= $payment_type_result[0]['amount'] ?>" class="form-control" placeholder="Amount" Required>
                                            
                                        </div>
                                        
                                        <div class="col-md-12" style="margin-top: 4%;" >
                                        <lable>Payment Method <span style="color:red;" >*</span></lable>
                                        <br>
                                       <select class="nice-select" onchange="paymentType()"  name="payment_type" id="payment_type" Required >
                                        <option value="">Select Payment method</option>
                                            <option value="1">Cash</option>
                                            <option value="2">Online</option>
                                        </select>
                                        </div>
                                        <br>
                                                                                
                                        
                                        <div class="single-form" style="margin-top: 8%;">
                                            
                                            <div id="payment_content">
                                                
                                            </div>
                                            
                                        </div>
                                       
                                        <div class="form-btn">
                                            <button name="submit" id="final_submit_btn" class="btn">Submit</button>
                                        </div>
                                        
                                        
                                    </form>
                                </div>
                            </div>
                            <!-- Login & Register Box End -->

                        </div>
                    </div>
                    </div>
                </div>
                <!-- Login & Register Wrapper End -->
                 </div>
                 </div>
            </div>
        </div>
        <!-- Login & Register End -->

<?php include 'footer.php' ?>





<script>


function paymentAmount(){
    
    var enter_amount =  $("#amount").val();
    var numberAMount  = parseFloat(enter_amount).toFixed(2);
    var membership_amount =  $('#membership_amount').val();
    var condition = '';
    var error = '';
    
    if(numberAMount != membership_amount ){
        condition = '<span style="color:red;"> Your Membership Amount is RS.₹'+membership_amount+' </span>';
        error = '1';
    }else{
        error = '0';
    }
    
    if(error=='1'){
        $('#error_message').empty();
        $('#error_message').append(condition);
        $("#final_submit_btn").addClass("disabled");
    }else{
        $('#error_message').empty();
        $("#final_submit_btn").removeClass("disabled");
    }
    
}


      

    function paymentType(){
        
        var payment_type =  $('#payment_type').val();
        var  content = '';
        
        if(payment_type==1){
            content =`<lable>Payment Receipt <span style="color:red;" >*</span></lable>
                    <input type="file" name="photo" class="form-control" placeholder="Screen Shot" Required>`;
        }
        
        if(payment_type==2){
            content =`<lable>Payment Screenshot <span style="color:red;" >*</span></lable>
                    <input type="file" name="photo" class="form-control" placeholder="Screen Shot" Required>
                    <br>
                    <div class="single-form">
                                            <lable>Transaction id <span style="color:red;" >*</span></lable>
                                            <input type="text" name="transation_id" class="form-control" placeholder="Transaction id" Required>
                                        </div>`;
        }
        
        if(content !=''){
            $('#payment_content').empty();
             $('#payment_content').append(content);
        }else{
             $('#payment_content').empty();
        }
        
    }
</script>

Zerion Mini Shell 1.0