<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Admin : Add Contact</title>
    <?php include("headerlink.php")?>
</head>

<body class="hold-transition sidebar-mini layout-fixed">
    <div class="wrapper">

        <div class="preloader flex-column justify-content-center align-items-center">
            <img class="animation__shake" src="dist/img/AdminLTELogo.png" alt="AdminLTELogo" height="60" width="60">
        </div>

        <?php include("navbar.php")?>


        <?php include("sidebar.php")?>

        <div class="content-wrapper">

            <div class="content-header">
                <div class="container-fluid">
                    <div class="row mb-2">
                        <div class="col-sm-6">
                            <h1 class="m-0 fw-bold text-uppercase">Phonebook</h1>
                        </div>
                        <div class="col-sm-6">
                            <ol class="breadcrumb float-sm-right">
                                <li class="breadcrumb-item"><a href="#">Home</a></li>
                                <li class="breadcrumb-item active">Phonebook</li>
                                <li class="breadcrumb-item active">Add Contact</li>
                            </ol>
                        </div>
                    </div>
                </div>
            </div>

            <section class="content">
                <div class="container-fluid">
                    <div class="row">

                        <div class="col-md-12">

                            <div class="card card-primary shadow">
                                <div class="card-header" style="background: #343a40;">
                                    <h3 class="card-title fw-bold text-uppercase">Add Contacts</h3>
                                </div>

                                <form action="add_contact_code.php" method="POST">
                                    <div class="card-body">
                                        <div class="row">
                                            <div class="col-lg-6 col-sm-12">
                                                <div class="form-group">
                                                    <label for="exampleInputName">Name</label>
                                                    <input type="text" name="name" class="form-control"
                                                        id="exampleInputName" placeholder="Name">
                                                </div>
                                            </div>
                                            <div class="col-lg-6 col-sm-12">
                                                <div class="form-group">
                                                    <label for="exampleInputPurpose">Purpose to Add</label>
                                                    <input type="text" name="add" class="form-control"
                                                        id="exampleInputPurpose" placeholder="Purpose to Purpose">
                                                </div>
                                            </div>
                                        </div>
                                        <div class="row">
                                            <div class="col-lg-4 col-sm-12">
                                                <div class="form-group">
                                                    <label for="exampleInputContact1">Contact Number 1</label>
                                                    <!-- <input type="number" name="number1" class="form-control"
                                                        id="exampleInputContact1" placeholder="Contact Number"> -->
                                                    <input type="text" class="form-control" id="exampleInputName"
                                                        placeholder="Contact Number" name="number1"
                                                        oninput="this.value = this.value.replace(/[^0-9]/g, '');">
                                                </div>
                                            </div>
                                            <div class="col-lg-4 col-sm-12">
                                                <div class="form-group">
                                                    <label for="exampleInputContact2">Contact Number 2</label>
                                                    <!-- <input type="number" name="number2" class="form-control"
                                                        id="exampleInputContact2" placeholder="Contact Number"> -->
                                                    <input type="text" class="form-control" id="exampleInputName"
                                                        placeholder="Contact Number" name="number2"
                                                        oninput="this.value = this.value.replace(/[^0-9]/g, '');">
                                                </div>
                                            </div>
                                            <div class="col-lg-4 col-sm-12">
                                                <div class="form-group">
                                                    <label for="exampleInputContact3">Contact Number 3</label>
                                                    <!-- <input type="number" name="number3" class="form-control"
                                                        id="exampleInputContact3" placeholder="Contact Number"> -->
                                                    <input type="text" class="form-control" id="exampleInputName"
                                                        placeholder="Contact Number" name="number3"
                                                        oninput="this.value = this.value.replace(/[^0-9]/g, '');">
                                                </div>
                                            </div>
                                        </div>
                                        <div class="row">
                                            <div class="col-lg-8 col-sm-12">
                                                <div class="form-group">
                                                    <label for="exampleInputCompany">Company Name</label>
                                                    <input type="text" name="company_name" class="form-control"
                                                        id="exampleInputCompany" placeholder="Company Name">
                                                </div>
                                            </div>
                                            <div class="col-lg-4 col-sm-12">
                                                <div class="form-group">
                                                    <label for="exampleInputDesignation">GMB Page</label>
                                                    <div class="input-group mb-3">
                                                        <div class="input-group-prepend">
                                                            <span class="input-group-text"><i
                                                                    class="fab fa-google"></i></span>
                                                        </div>
                                                        <input type="text" name="gmb_page_username" class="form-control"
                                                            placeholder="GMB Page Username">
                                                        <input type="hidden" name="gmb_page"
                                                            value="https://www.google.com/">
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <label for="exampleInputEmail1">Social Handels</label>
                                        <div class="row">

                                            <div class="col-lg-3 col-sm-12">
                                                <div class="input-group mb-3">
                                                    <div class="input-group-prepend">
                                                        <span class="input-group-text"><i
                                                                class="fab fa-facebook"></i></span>
                                                    </div>
                                                    <input type="text" name="facebook_username" class="form-control"
                                                        placeholder="Facebook Username" required>
                                                    <input type="hidden" name="facebook"
                                                        value="https://www.facebook.com/">
                                                </div>
                                            </div>
                                            <div class="col-lg-3 col-sm-12">
                                                <div class="input-group mb-3">
                                                    <div class="input-group-prepend">
                                                        <span class="input-group-text"><i
                                                                class="fab fa-twitter"></i></span>
                                                    </div>
                                                    <input type="text" name="twitter_username" class="form-control"
                                                        placeholder="Twitter Username">
                                                    <input type="hidden" name="twitter" value="https://twitter.com/">
                                                </div>
                                            </div>
                                            <div class="col-lg-3 col-sm-12">
                                                <div class="input-group mb-3">
                                                    <div class="input-group-prepend">
                                                        <span class="input-group-text"><i
                                                                class="fab fa-instagram"></i></span>
                                                    </div>
                                                    <input type="text" name="instagram_username" class="form-control"
                                                        placeholder="Instagram Username">
                                                    <input type="hidden" name="instagram"
                                                        value="https://www.instagram.com/">
                                                </div>
                                            </div>
                                            <div class="col-lg-3 col-sm-12">
                                                <div class="input-group mb-3">
                                                    <div class="input-group-prepend">
                                                        <span class="input-group-text"><i
                                                                class="fab fa-youtube"></i></span>
                                                    </div>
                                                    <input type="text" name="youtube_username" class="form-control"
                                                        placeholder="Youtube Username">
                                                    <input type="hidden" name="youtube"
                                                        value="https://www.youtube.com/">
                                                </div>
                                            </div>
                                        </div>

                                    </div>


                                    <div class="card-footer">
                                        <button type="submit" class="btn text-white fw-bold"
                                            style="background: #343a40; ">Add Contact</button>
                                    </div>
                                </form>
                            </div>


                        </div>

                    </div>

                </div>
            </section>

        </div>
        <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
        <script src="https://cdnjs.cloudflare.com/ajax/libs/sweetalert/2.1.2/sweetalert.min.js"></script>
        <script>
        $(document).ready(function() {
            <?php if (isset($_GET['error'])) { ?>
            Swal.fire({
                title: 'Error',
                text: '<?php echo $_GET['error']; ?>',
                icon: 'error',
                confirmButtonText: 'OK',
                confirmButtonClass: 'btn btn-success btn-lg',
            });
            <?php } ?>
            <?php if (isset($_GET['success'])) { ?>
            Swal.fire({
                title: 'Success',
                text: '<?php echo $_GET['success']; ?>',
                icon: 'success',
                confirmButtonText: 'OK',
                confirmButtonClass: 'btn btn-success btn-lg',
            });
            <?php } ?>
        });
        </script>
        <?php include("footer.php")?>

    </div>


    <?php include("footerlink.php")?>
</body>

</html>