<?php
error_reporting(0);
session_start();
include '../include/connection.php';
$conn     = db();
@extract($_REQUEST);
$folder='../upload/';
if($_FILES['image']['name'])
{
$file=time().@str_replace(' ','-',$_FILES['image']['name']);
if(move_uploaded_file(@$_FILES['image']['tmp_name'],$folder.$file))
{
$logoimage=$file;
}
}
else
{
$websel=mysqli_query($conn,"select * from tbl_website_management where website_id='1'");
$webres=mysqli_fetch_array($websel);
$logoimage=$webres['website_logo'];
}
$sql="update tbl_website_management set
website_title='".$_REQUEST['website']."',
website_domain='".$_REQUEST['website_domain']."',
website_url='".$_REQUEST['website_url']."',
website_logo='".$logoimage."',
website_facebook='".$_REQUEST['website_facebook']."',
website_youtube='".$_REQUEST['website_youtube']."',
website_twitor='".$_REQUEST['website_twitter']."',
website_gplus='".$_REQUEST['website_gplus']."',
website_linkedin='".$_REQUEST['website_linkedin']."',
website_instagram='".$_REQUEST['website_instagram']."',
website_printest='".$_REQUEST['website_printest']."',
tin_no='".$_REQUEST['tin_no']."' where website_id='1'";
if(mysqli_query($conn,$sql))
{
$_SESSION['manage-website-msg']="Updated Successfully";
?>
<script>window.location.href='manage-website.php'</script>
<?php } ?>