?
Path : /home/yogsadhna/public_html/admin/ |
Current File : /home/yogsadhna/public_html/admin/site-setting.php |
<?php include('includes/connection.php'); include('includes/allfunction.php'); $sitesettingdata=selectdatabyid('site_setting','1'); if(isset($_POST['submit'])) { if(!empty($_FILES['logo']['name'])) { $filename=$_FILES['logo']['name']; $tempname=$_FILES['logo']['tmp_name']; move_uploaded_file($tempname,'uploads/'.$filename); } else { $filename=$_POST['oldlogo']; } $data=array( "logo"=>'"'.$filename.'"', "email"=>'"'.$_POST['email'].'"', "email1"=>'"'.$_POST['email1'].'"', "email2"=>'"'.$_POST['email2'].'"', "phone"=>'"'.$_POST['phone'].'"', "phone2"=>'"'.$_POST['phone1'].'"', "address"=>'"'.$_POST['address'].'"', "fb"=>'"'.$_POST['fb'].'"', "tw"=>'"'.$_POST['tw'].'"', "linkedin"=>'"'.$_POST['linkedin'].'"', "whatsapp"=>'"'.$_POST['whatsapp'].'"', "youtube"=>'"'.$_POST['youtube'].'"', "browser"=>'"'.$_POST['browser'].'"', ); // print_r($data); // die(); update('site_setting',$data,'1'); header('location:site-setting'); } ?> <!DOCTYPE html> <html lang="en"> <head> <!-- Required meta tags --> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <title>Site Setting</title> <!-- plugins:css --> <?php include_once('includes/css.php'); ?> </head> <body> <div class="container-scroller"> <!-- partial:partials/_navbar.html --> <?php include_once('includes/header.php'); ?> <!-- partial --> <div class="container-fluid page-body-wrapper"> <!-- partial:partials/_sidebar.html --> <?php include_once('includes/sidebar.php'); ?> <!-- partial --> <div class="main-panel"> <div class="content-wrapper"> <div class="col-12 grid-margin stretch-card"> <div class="card"> <div class="card-body"> <h4 class="card-title">Site Setting</h4> <p></p> <form class="forms-sample" method="post" enctype="multipart/form-data"> <div class="form-group"> <img src="uploads/<?php echo $sitesettingdata['logo'];?>" style="height:100px;"> <input type="hidden" name="oldlogo" value="<?php echo $sitesettingdata['logo'];?>"> <p><label>Logo upload</label></p> <input type="file" name="logo"> </div> <div class="form-group"> <label for="exampleInputName1">Primary Email</label> <input type="email" class="form-control" id="exampleInputName1" name="email" placeholder="Email" value="<?php echo $sitesettingdata['email'];?>"> </div> <div class="form-group"> <label for="exampleInputName1">Secondary Email </label> <input type="email" class="form-control" id="exampleInputName1" name="email1" placeholder="Secondary Email" value="<?php echo $sitesettingdata['email1'];?>"> </div> <div class="form-group"> <label for="exampleInputName1">Tertiary Email</label> <input type="email" class="form-control" id="exampleInputName1" name="email2" placeholder=" Tertiary Email" value="<?php echo $sitesettingdata['email2'];?>"> </div> <div class="form-group"> <label for="exampleInputName1">Primary Mobile</label> <input type="text" class="form-control" id="exampleInputName1" name="phone" placeholder="Primary Mobile" value="<?php echo $sitesettingdata['phone'];?>"> </div> <div class="form-group"> <label for="exampleInputName1">Secondary Mobile</label> <input type="text" class="form-control" id="exampleInputName1" name="phone1" placeholder="Secondary Mobile" value="<?php echo $sitesettingdata['phone1'];?>"> </div> <div class="form-group"> <label for="exampleInputName1">Address</label> <textarea name="address"><?php echo $sitesettingdata['address'];?></textarea> </div> <div class="form-group"> <label for="exampleInputName1">Facebook Page Link</label> <input type="text" class="form-control" id="exampleInputName1" name="fb" placeholder="Facebook Page Link" value="<?php echo $sitesettingdata['fb'];?>"> </div> <div class="form-group"> <label for="exampleInputName1">Twitter Page Link</label> <input type="text" class="form-control" id="exampleInputName1" name="tw" placeholder="Facebook Page Link" value="<?php echo $sitesettingdata['tw'];?>"> </div> <div class="form-group"> <label for="exampleInputName1">Linkedin Page Link</label> <input type="text" class="form-control" id="exampleInputName1" name="linkedin" placeholder="Facebook Page Link" value="<?php echo $sitesettingdata['linkedin'];?>"> </div> <div class="form-group"> <label for="exampleInputName1">whatsapp Page Link</label> <input type="text" class="form-control" id="exampleInputName1" name="whatsapp" placeholder="Facebook Page Link" value="<?php echo $sitesettingdata['whatsapp'];?>"> </div> <div class="form-group"> <label for="exampleInputName1">Youtube Page Link</label> <input type="text" class="form-control" id="exampleInputName1" name="youtube" placeholder="Facebook Page Link" value="<?php echo $sitesettingdata['youtube'];?>"> </div> <div class="form-group"> <label for="exampleInputName1">Browser Page Link</label> <input type="text" class="form-control" id="exampleInputName1" name="browser" placeholder="Facebook Page Link" value="<?php echo $sitesettingdata['browser'];?>"> </div> <button type="submit" name="submit" class="btn btn-gradient-primary me-2">Submit</button> </form> </div> </div> </div> </div> <!-- content-wrapper ends --> <!-- partial:partials/_footer.html --> <?php include_once('includes/footer.php'); ?> <!-- partial --> </div> <!-- main-panel ends --> </div> <!-- page-body-wrapper ends --> </div> <!-- container-scroller --> <!-- plugins:js --> <?php include_once('includes/script.php') ?> <!-- End custom js for this page --> </body> </html>