<?php
session_start();
include 'include/config.php';

if(!isset($_SESSION['id'])){
    // echo "<script> window.location.href = 'index.php' </script>";
  }
  
  
  

?>

<?php  include 'include/head.php'; ?>
                    
    <!-- Start Content-->
    <div class="container-fluid">
                        
                        <!-- start page title -->
                        <div class="row">
                            <div class="col-12">
                                <div class="page-title-box">
                                    <div class="page-title-right">
                                        <ol class="breadcrumb m-0">
                                            <li class="breadcrumb-item"><a href="dashboard.php">Home</a></li>
                                            <li class="breadcrumb-item active">Add Support</li>
                                        </ol>
                                    </div>
                                    <h4 class="page-title">Add Support</h4>
                                </div>
                            </div>
                        </div>
                        <!-- end page title --> 

                        <div class="row">
                        <div class="col-12">
                            <div class="card">
                                <div class="card-body">
                                    
                                 

                    <?php
                    
                    if(isset($_POST['submit'])){
                       $phone_one = $_POST['phone_one'];
                       $phone_two = $_POST['phone_two'];
                       $phone_three = $_POST['phone_three'];
                       $phone_four  = $_POST['phone_four'];
                       $email_one   = $_POST['email_one'];
                       $email_two   = $_POST['email_two'];
                        
                        
                             $insert = mysqli_query($conn,"INSERT INTO `support`(`phone_one`, `phone_two`, `phone_three`, `phone_four`, `email_one`, `email_two`) VALUES 
                                                       ('$phone_one','$phone_two','$phone_three','$phone_four','$email_one','$email_two')");
                                    if($insert)  
                                    {
                                        echo "<script>alert('Your Data Inserted');</script>";
                                    }
                        
                        
                    }
                    ?>
                    


                    
                                
                                    <!-- end nav-->
                                    <div class="tab-content">
                                        <div class="tab-pane show active">
                                            <div class="row">
                                               
                                               
                                                <form action=""  method="POST" enctype="multipart/form-data">
                                               
                                                <div class="col-lg-12">
                                                     <!--Date Range Picker With Times -->
                                                    <div class="mb-3">
                                                        <label for="example-select" class="form-label">Phone One</label>
                                                        <input type="text" value="<?php echo isset($_POST['phone_one']) ? htmlspecialchars($_POST['phone_one']) : ''; ?>" name="phone_one" class="form-control" placeholder="Phone Number" >
                                                    </div>
                                                </div>
                                                
                                                <div class="col-lg-12">
                                                     <!--Date Range Picker With Times -->
                                                    <div class="mb-3">
                                                        <label for="example-select" class="form-label">Phone Two</label>
                                                        <input type="text" value="<?php echo isset($_POST['phone_two']) ? htmlspecialchars($_POST['phone_two']) : ''; ?>" name="phone_two" class="form-control" placeholder="Phone Number" >
                                                    </div>
                                                </div>
                                                
                                                <div class="col-lg-12">
                                                     <!--Date Range Picker With Times -->
                                                    <div class="mb-3">
                                                        <label for="example-select" class="form-label">Phone Three</label>
                                                        <input type="text" value="<?php echo isset($_POST['phone_three']) ? htmlspecialchars($_POST['phone_three']) : ''; ?>" name="phone_three" class="form-control" placeholder="Phone Number" >
                                                    </div>
                                                </div>
                                                
                                                <div class="col-lg-12">
                                                     <!--Date Range Picker With Times -->
                                                    <div class="mb-3">
                                                        <label for="example-select" class="form-label">Phone Four</label>
                                                        <input type="text" value="<?php echo isset($_POST['phone_four']) ? htmlspecialchars($_POST['phone_four']) : ''; ?>" name="phone_four" class="form-control" placeholder="Phone Number" >
                                                    </div>
                                                </div>
                                                
                                                <div class="col-lg-12">
                                                     <!--Date Range Picker With Times -->
                                                    <div class="mb-3">
                                                        <label for="example-select" class="form-label">Email One</label>
                                                        <input type="email" value="<?php echo isset($_POST['email_one']) ? htmlspecialchars($_POST['email_one']) : ''; ?>" name="email_one" class="form-control" placeholder="Email ID" >
                                                    </div>
                                                </div>
                                                
                                                <div class="col-lg-12">
                                                     <!--Date Range Picker With Times -->
                                                    <div class="mb-3">
                                                        <label for="example-select" class="form-label">Email Two</label>
                                                        <input type="email" value="<?php echo isset($_POST['email_two']) ? htmlspecialchars($_POST['email_two']) : ''; ?>" name="email_two" class="form-control" placeholder="Email ID" >
                                                    </div>
                                                </div>
                                                
                                               <!-- <div class="col-lg-12">-->
                                                    <!-- Date Range Picker With Times -->
                                               <!--     <div class="mb-3">-->
                                               <!--         <label for="example-select" class="form-label">Account Number</label>-->
                                               <!--         <input type="text" value="<?php echo isset($_POST['ac_number']) ? htmlspecialchars($_POST['ac_number']) : ''; ?>" name="ac_number" id="ac_number" onInput="checkmobile()" class="form-control" placeholder="User Acount Number" required>-->
                                               <!--            <span id="check-mobile"></span>-->
                                               <!--     </div>-->
                                               <!-- </div>-->
                                                
                                               <!-- <div class="col-lg-12">-->
                                                    <!-- Date Range Picker With Times -->
                                               <!--     <div class="mb-3">-->
                                               <!--         <label for="example-select" class="form-label">Phone Number</label>-->
                                               <!--         <input type="text" value="<?php echo isset($_POST['phone']) ? htmlspecialchars($_POST['phone']) : ''; ?>" name="phone" class="form-control" placeholder="User Phone Number" required>-->
                                               <!--     </div>-->
                                               <!-- </div>-->
                                                
                                               <!-- <div class="col-lg-12">-->
                                                    <!-- Date Range Picker With Times -->
                                               <!--     <div class="mb-3">-->
                                               <!--         <label for="example-select" class="form-label">Address</label>-->
                                               <!--         <input type="text" value="<?php echo isset($_POST['address']) ? htmlspecialchars($_POST['address']) : ''; ?>" name="address" class="form-control" placeholder="User Address" required>-->
                                               <!--     </div>-->
                                               <!-- </div>-->
                                                
                                               <!-- <div class="col-lg-12">-->
                                                    <!-- Date Range Picker With Times -->
                                               <!--     <div class="mb-3">-->
                                               <!--         <label for="example-select" class="form-label">Password</label>-->
                                               <!--         <input type="text" value="<?php echo isset($_POST['password']) ? htmlspecialchars($_POST['password']) : ''; ?>" name="password" class="form-control" placeholder="User Password" required>-->
                                               <!--     </div>-->
                                               <!-- </div>-->
                                                
                                               <!-- <div class="col-lg-12">-->
                                                    <!-- Date Range Picker With Times -->
                                               <!--     <div class="mb-3">-->
                                               <!--         <label for="example-select" class="form-label">Aadhar Number</label>-->
                                               <!--         <input type="text" value="<?php echo isset($_POST['aadhar']) ? htmlspecialchars($_POST['aadhar']) : ''; ?>" name="aadhar" class="form-control" placeholder="User Aadhar Number" required>-->
                                               <!--     </div>-->
                                               <!-- </div>-->
                                                
                                               <!-- <div class="col-lg-12">-->
                                                    <!-- Date Range Picker With Times -->
                                               <!--     <div class="mb-3">-->
                                               <!--         <label for="example-select" class="form-label">Pan Number</label>-->
                                               <!--         <input type="text" value="<?php echo isset($_POST['pan']) ? htmlspecialchars($_POST['pan']) : ''; ?>" name="pan" class="form-control" placeholder="Pan Number" required>-->
                                               <!--     </div>-->
                                               <!-- </div>-->
                                                
                                               <!-- <div class="col-lg-12">-->
                                                    <!-- Date Range Picker With Times -->
                                               <!--     <div class="mb-3">-->
                                               <!--         <label for="example-select" class="form-label">Guarantor ID</label>-->
                                               <!--         <input type="text" value="<?php echo isset($_POST['guranter']) ? htmlspecialchars($_POST['guranter']) : ''; ?>" name="guranter" class="form-control" placeholder="Guarantor ID" required>-->
                                               <!--     </div>-->
                                               <!-- </div>-->
                                                
                                                
                                               <!-- <div class="col-lg-12">-->
                                                   <!-- Date Range Picker With Times -->
                                               <!--    <div class="mb-3">-->
                                               <!--        <label for="payment-mode" class="form-label">Payment Mode</label>-->
                                               <!--        <select name="p_mode_detail" id="payment-mode" class="form-control" required>-->
                                               <!--            <option value="">Select Payment Mode</option>-->
                                               <!--            <option value="phone_pay">Phone Pay</option>-->
                                               <!--            <option value="cash">Cash</option>-->
                                               <!--            <option value="upi">UPI</option>-->
                                               <!--            <option value="account_transfer">Account Transfer</option>-->
                                               <!--        </select>-->
                                               <!--    </div>-->
                                               <!--</div>-->
                                                
                                               <!-- <div class="col-lg-12">-->
                                                    <!-- Date Range Picker With Times -->
                                               <!--     <div class="mb-3">-->
                                               <!--         <label for="example-select" class="form-label">Payment Mode Number(example:cheque no,upi no,account no)</label>-->
                                               <!--         <input type="text" value="<?php echo isset($_POST['mode_number']) ? htmlspecialchars($_POST['mode_number']) : ''; ?>" name="mode_number" class="form-control" placeholder="Cheque no,Upi No,Account No" required>-->
                                               <!--     </div>-->
                                               <!-- </div>-->
                                                
                                               <!-- <div class="col-lg-12">-->
                                                    <!-- Date Range Picker With Times -->
                                               <!--     <div class="mb-3">-->
                                               <!--         <label for="example-select" class="form-label">Joining Ammount</label>-->
                                               <!--         <input type="text" value="5000" name="j_amount" class="form-control" placeholder="User Joing Amount" required>-->
                                               <!--     </div>-->
                                               <!-- </div>-->
                                                
                                               <!-- <div class="col-lg-12">-->
                                                    <!-- Date Range Picker With Times -->
                                               <!--     <div class="mb-3">-->
                                               <!--         <label for="example-select" class="form-label">Profile Image</label>-->
                                               <!--         <input type="file" value="" name="pimage" class="form-control" placeholder="Give image" required>-->
                                               <!--     </div>-->
                                               <!-- </div>-->
                                                
                                               <!-- <div class="col-lg-12">-->
                                                    <!-- Date Range Picker With Times -->
                                               <!--     <div class="mb-3">-->
                                               <!--         <label for="example-select" class="form-label">Aadhar Front Image</label>-->
                                               <!--         <input type="file" value="" name="a_f_image" class="form-control" placeholder="Give image" required>-->
                                               <!--     </div>-->
                                               <!-- </div>-->
                                                
                                               <!--  <div class="col-lg-12">-->
                                                    <!-- Date Range Picker With Times -->
                                               <!--     <div class="mb-3">-->
                                               <!--         <label for="example-select" class="form-label">Aadhar Back Image</label>-->
                                               <!--         <input type="file" value="" name="a_b_image" class="form-control" placeholder="Give image" required>-->
                                               <!--     </div>-->
                                               <!-- </div>-->
                                                
                                               <!--  <div class="col-lg-12">-->
                                                    <!-- Date Range Picker With Times -->
                                               <!--     <div class="mb-3">-->
                                               <!--         <label for="example-select" class="form-label">Pan Card Image</label>-->
                                               <!--         <input type="file" value="" name="pan_image" class="form-control" placeholder="Give image" required>-->
                                               <!--     </div>-->
                                               <!-- </div>-->
                                                
                                               <!-- <div class="col-lg-12">-->
                                                    <!-- Date Range Picker With Times -->
                                               <!--     <div class="mb-3">-->
                                               <!--         <label for="example-select" class="form-label">Signature Image</label>-->
                                               <!--         <input type="file" value="" name="sign_image" class="form-control" placeholder="Give Signatureimage" required>-->
                                               <!--     </div>-->
                                               <!-- </div>-->
                                                
                                               <!-- <div class="col-lg-12">-->
                                                    <!-- Date Range Picker With Times -->
                                               <!--     <div class="mb-3">-->
                                               <!--         <label for="example-select" class="form-label">Electricity Bill Image</label>-->
                                               <!--         <input type="file" value="" name="bill_image" class="form-control" placeholder="Give ">-->
                                               <!--     </div>-->
                                               <!-- </div>-->
                                                
                                               <!-- <div class="col-lg-12">-->
                                                    <!-- Date Range Picker With Times -->
                                               <!--     <div class="mb-3">-->
                                               <!--         <label for="example-select" class="form-label">Rent agreement Image	</label>-->
                                               <!--         <input type="file" value="" name="rent_agreement" class="form-control" placeholder="Give ">-->
                                               <!--     </div>-->
                                               <!-- </div>-->
                                                
                                                
                                                
                                                <!--<div class="col-lg-12">-->
                                                    <!-- Date Range Picker With Times -->
                                                <!--    <div class="mb-3">-->
                                                <!--        <label for="example-select" class="form-label">Offer Value</label>-->
                                                <!--        <input type="text" value="" name="value" class="form-control" placeholder="offer value">-->
                                                <!--    </div>-->
                                                <!--</div>-->


                                            </div>

                                            <div class="row">
                                                <div class="clearfix"></div>
                                                <div class="col-lg-6">
                                                    <!-- Predefined Date Ranges -->
                                                    <div class="mb-3">
                                                        <input type="submit" id="submit" class="btn btn-success" value="submit" name="submit">
                                                        
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <!-- end preview-->

                                        
                                        <!-- end preview code-->
                                    </div>
                                    <!-- end tab-content-->
                    </form>
                                </div>
                                <!-- end card-body -->
                            </div>
                            <!-- end card-->
                        </div>
                            <!-- end col -->
            </div> <!-- end row-->


                    
    </div> <!-- container -->


<?php  
include 'include/footer.php'; 
?>
<!-- editor -->
        <script src='https://cdn.ckeditor.com/4.13.0/standard/ckeditor.js'></script>
        <script src='https://code.jquery.com/jquery-3.4.1.min.js'></script>
        <script id="rendered-js" >
            CKEDITOR.replace('editor1');
            CKEDITOR.on('instanceReady', function (evt)
            {
            var editor = evt.editor;

            editor.on('change', function (e) {
                var contentSpace = editor.ui.space('contents');
                var ckeditorFrameCollection = contentSpace.$.getElementsByTagName('iframe');
                var ckeditorFrame = ckeditorFrameCollection[0];
                var innerDoc = ckeditorFrame.contentDocument;
                var innerDocTextAreaHeight = $(innerDoc.body).height();
                console.log(innerDocTextAreaHeight);
            });
            });
            //# sourceURL=pen.js
            
            function checkmobile() {
    jQuery.ajax({
    url: "check_availability.php",
    data:'checkmobilel='+$("#ac_number").val(),
    type: "POST",
    success:function(data){
        $("#check-mobile").html(data);
    },
    error:function (){}
    });
}
        </script>
        
        