<?php
include("topmenu.php");

?>

<div class="main_content_iner overly_inner ">
<div class="container-fluid p-0 ">

<div class="row">
<div class="col-12">
<div class="page_title_box d-flex align-items-center justify-content-between">
<div class="page_title_left">
<h3 class="f_s_30 f_w_700 text_white">Home</h3>
<ol class="breadcrumb page_bradcam mb-0">
<li class="breadcrumb-item"><a href="javascript:void(0);">Al Barsha Electronics LLC </a></li>
<li class="breadcrumb-item"><a href="javascript:void(0);">Dashboard</a></li>
<li class="breadcrumb-item active">Home</li>
<li class="breadcrumb-item active">Add Service</li>
</ol>

</div>
</div>
    <?php

$sid=mysqli_query($db,"select * from services ORDER BY id DESC LIMIT 1");
$rid=mysqli_fetch_row($sid);
$last_id=$rid[0]+100001;


?>     
<div class="row">
    <div class="col-lg-12">
        <div class="card">
            <div class="card-header align-items-center d-flex card-header2">
                <h4 class="card-title mb-0 flex-grow-1">Mobile Services</h4>
                
            </div><!-- end card header -->

            
            <div class="card-body">
                <div class="live-preview">
                <form method="post" enctype="multipart/form-data">
                    <div class="row gy-4">
                    
                        
                    
                        
                           <!-- <div class="col-lg-6 ">
                            <div>
                                <label for="labelInput" class="form-label">Image(width-471px & height-158px)<span class="red">*</span></label>
                                <input type="file"  class="form-control" id="exampleInputdate" name="photo" >
                                <img src="../images/abt/<?php echo $rq1[5]?>" width="275" height="150">
                            </div>
                        </div> -->
                        <div class="col-lg-4">
                            <div>
                                <label for="labelInput" class="form-label">No Receipts<span class="red">*</span></label>
                                <input type="text"  class="form-control" readonly value="<?php echo $last_id;?>" id="exampleInputdate" name="a"required>
                            </div>
                        </div>
                        <div class="col-lg-4">
                            <div>
                                <label for="labelInput" class="form-label">Customer Name<span class="red">*</span></label>
                                <input  class="form-control" id="exampleInputdate" name="b" required>
                            </div>
                        </div>
                        <div class="col-lg-4">
                            <div>
                                <label for="labelInput" class="form-label">Phone Number<span class="red">*</span></label>
                                <input type="text"  class="form-control" id="exampleInputdate" name="c"  required>
                            </div>
                        </div> 
                        <div class="col-lg-4">
                            <div>
                                <label for="labelInput" class="form-label">Email<span class="red">*</span></label>
                                <input type="email"  class="form-control" id="exampleInputdate" name="d" >
                            </div>
                        </div> 
                        <div class="col-lg-4">
                            <div>
                                <label for="labelInput" class="form-label">Service Items<span class="red">*</span></label>
                                <select class="form-control" required name="e">
                                    <option value="">Select Service Items</option>
                                    <?php
                                    $s=mysqli_query($db,"select * from addcategorys ");
                                    while($r=mysqli_fetch_row($s))
                                    {

                                    ?>
                                    <option value="<?php echo $r[0];?>"><?php echo $r[1];?></option>
                                    <?php
                                    }
                                    ?>
                                   
                                </select>
                            </div>
                        </div>

                        <div class="col-lg-4">
                            <div>
                                <label for="labelInput" class="form-label">Model Name<span class="red">*</span></label>
                                <input type="text"  class="form-control" id="exampleInputdate" name="f" required>
                            </div>
                        </div>
                        <div class="col-lg-4">
                            <div>
                                <label for="labelInput" class="form-label">Complaints/Issues<span class="red">*</span></label>
                                <input type="text"  class="form-control" id="exampleInputdate" name="g" required>
                            </div>
                        </div>
                        
                        
                        <div class="col-lg-4">
                            <div>
                                <label for="labelInput" class="form-label">Primary Findings<span class="red">*</span></label>
                                <textarea class="form-control" id="exampleInputdate" name="h" required></textarea>
                            </div>
                        </div> 
                        <div class="col-lg-4">
                            <div>
                                <label for="labelInput" class="form-label">Employee Name<span class="red">*</span></label>
                                <input class="form-control" id="exampleInputdate" name="i" required>
                            </div>
                        </div> 
						
						<div class="col-lg-4">
                            <div>
                                <label for="labelInput" class="form-label">Branch<span class="red">*</span></label>
                                <select class="form-control" required name="k">
                                    <option value="">Select Branch</option>
                                    <?php
                                    $s=mysqli_query($db,"select * from branchs ");
                                    while($r=mysqli_fetch_row($s))
                                    {

                                    ?>
                                    <option value="<?php echo $r[0];?>"><?php echo $r[1];?></option>
                                    <?php
                                    }
                                    ?>
                                   
                                </select>
                            </div>
                        </div>

                        <div class="col-lg-4">
                            <div>
                                <!-- <label for="labelInput" class="form-label">Date & Time<span class="red">*</span></label> -->
                                <input type="hidden"class="form-control" name="j" id="dateTime" readonly>
                            </div>
                        </div> 
                        
                        <div class="mt-3">
                        <input type="submit" class="btn btn-primary"  name="sub1" value="Submit">
                        <!-- staticBackdrop Modal -->
                        </div>

                    
                </form>
                </div>
                <script>
        function updateDateTime() {
            // Get the current date and time
            var now = new Date();
            var year = now.getFullYear();
            var month = ('0' + (now.getMonth() + 1)).slice(-2);
            var day = ('0' + now.getDate()).slice(-2);
            var hours = ('0' + now.getHours()).slice(-2);
            var minutes = ('0' + now.getMinutes()).slice(-2);
            var seconds = ('0' + now.getSeconds()).slice(-2);

            // Format the date and time as YYYY-MM-DD HH:MM:SS
            var formattedDateTime = year + '-' + month + '-' + day + ' ' + hours + ':' + minutes + ':' + seconds;

            // Update the value of the dateTime input field
            document.getElementById('dateTime').value = formattedDateTime;
        }

        // Update the date and time every second
        setInterval(updateDateTime, 1000);

        // Ensure the initial value is set when the page loads
        window.onload = updateDateTime;
    </script>
                    <!--end row-->
               </div>
            </div>
        </div>  

        
        
        
    </div>
    </div>

    <?php
                    
if(isset($_POST['sub1']))
{



$a=addslashes($_POST['a']);
$b=addslashes($_POST['b']);
$c=addslashes($_POST['c']);
$d=addslashes($_POST['d']);
$e=addslashes($_POST['e']);
$f=addslashes($_POST['f']);
$g=addslashes($_POST['g']);
$h=addslashes($_POST['h']);
$i=addslashes($_POST['i']);
$j=addslashes($_POST['j']);
$k=addslashes($_POST['k']);




// $da=date('Y-M-D');




            $ins=mysqli_query($db,"insert into services values('0','$a','$b','$c','$d','$e','$f','$g','$h','$i','$j','1','0','0','$k')");

            msg(" successfully added","addservices.php");

       
}

?>
</div>
</div>
</div>
</div>
    









<div id="back-top" style="display: none;">
<a title="Go to Top" href="#">
<i class="ti-angle-up"></i>
</a>
</div>

<div class="footer_part">
                <div class="container-fluid">
                <div class="row">
                <div class="col-lg-12">
                <div class="footer_iner text-center">
                <p>2023 © Al Barsha Electronics LLC  - Designed by <a href="https://www.oracuz.com/">Oracuz</a></p>
                </div>
                </div>
                </div>
                </div>
                </div>
                </section>

<script src="js/jquery1-3.4.1.min.js"></script>

<script src="js/popper1.min.js"></script>

<script src="js/bootstrap.min.php"></script>

<script src="js/metisMenu.js"></script>

<script src="vendors/count_up/jquery.waypoints.min.js"></script>

<script src="vendors/chartlist/Chart.min.js"></script>

<script src="vendors/count_up/jquery.counterup.min.js"></script>

<script src="vendors/niceselect/js/jquery.nice-select.min.js"></script>

<script src="vendors/owl_carousel/js/owl.carousel.min.js"></script>

<script src="vendors/datatable/js/jquery.dataTables.min.js"></script>
<script src="vendors/datatable/js/dataTables.responsive.min.js"></script>
<script src="vendors/datatable/js/dataTables.buttons.min.js"></script>
<script src="vendors/datatable/js/buttons.flash.min.js"></script>
<script src="vendors/datatable/js/jszip.min.js"></script>
<script src="vendors/datatable/js/pdfmake.min.js"></script>
<script src="vendors/datatable/js/vfs_fonts.js"></script>
<script src="vendors/datatable/js/buttons.php5.min.js"></script>
<script src="vendors/datatable/js/buttons.print.min.js"></script>

<script src="vendors/datepicker/datepicker.js"></script>
<script src="vendors/datepicker/datepicker.en.js"></script>
<script src="vendors/datepicker/datepicker.custom.js"></script>
<script src="js/chart.min.js"></script>
<script src="vendors/chartjs/roundedBar.min.js"></script>

<script src="vendors/progressbar/jquery.barfiller.js"></script>

<script src="vendors/tagsinput/tagsinput.js"></script>

<script src="vendors/text_editor/summernote-bs4.js"></script>
<script src="vendors/am_chart/amcharts.js"></script>

<script src="vendors/scroll/perfect-scrollbar.min.js"></script>
<script src="vendors/scroll/scrollable-custom.js"></script>

<script src="vendors/vectormap-home/vectormap-2.0.2.min.js"></script>
<script src="vendors/vectormap-home/vectormap-world-mill-en.js"></script>

<script src="vendors/apex_chart/apex-chart2.js"></script>
<script src="vendors/apex_chart/apex_dashboard.js"></script>
<script src="vendors/echart/echarts.min.js"></script>
<script src="vendors/chart_am/core.js"></script>
<script src="vendors/chart_am/charts.js"></script>
<script src="vendors/chart_am/animated.js"></script>
<script src="vendors/chart_am/kelly.js"></script>
<script src="vendors/chart_am/chart-custom.js"></script>

<script src="js/dashboard_init.js"></script>
<script src="js/custom.js"></script>
</body>

<!-- Mirrored from demo.dashboardpack.com/sales.php/ by HTTrack Website Copier/3.x [XR&CO'2014], Wed, 15 Feb 2023 12:12:37 GMT -->
</html>
