%PDF- %GIF98; %PNG;
Server : ApacheSystem : Linux sh00666.bluehost.com 5.14.0-687.26.1.el9_8.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Jul 14 16:32:02 EDT 2026 x86_64 User : ndkhermy ( 1200) PHP Version : 8.5.12 Disable Function : NONE Directory : /home1/ndkhermy/public_html/website_7c8ed5ef/admin/manage_about/ |
Upload File : |
<?php
error_reporting(0);
include("../function.php");
if($_SESSION['admin_id']==""){
header('location:../login.php');
}
$service_tbl=mysqli_fetch_array(mysqli_query($conn,"SELECT * FROM admin WHERE admin_id='".$_SESSION['admin_id']."'"));
// Sidebar strat
include('../include/sidebar.php');
?>
<?php
if(isset($_POST['add']) && $_POST['add']=='Add'){
$title=$_POST['title'];
$title=str_replace("'", "\'", $title);
$heading=$_POST['heading'];
$heading=str_replace("'", "\'", $heading);
$title1=$_POST['title1'];
$title1=str_replace("'", "\'", $title1);
$title2=$_POST['title2'];
$title2=str_replace("'", "\'", $title2);
$title3=$_POST['title3'];
$title3=str_replace("'","\'",$title3);
$content=$_POST['content'];
$content=str_replace("'", "\'", $content);
$content1=$_POST['content1'];
$content1=str_replace("'", "\'", $content1);
$content2=$_POST['content2'];
$content2=str_replace("'","\'",$content2);
$content3=$_POST['content3'];
$content3=str_replace("'", "\'", $content3);
$description1=$_POST['description1'];
$description1=str_replace("'", "\'", $description1);
$description2=$_POST['description2'];
$description2=str_replace("'","\'",$description2);
$description3=$_POST['description3'];
$description3=str_replace("'","\'",$description3);
$rangeheading=$_POST['rangeheading'];
$rangeheading=str_replace("'","\'",$rangeheading);
$value=$_POST['value'];
$value=str_replace("'","\'",$value);
$rangeheading1=$_POST['rangeheading1'];
$rangeheading1=str_replace("'","\'",$rangeheading1);
$value1=$_POST['value1'];
$value1=str_replace("'","\'",$value1);
$youtube_url=$_POST['youtube_url'];
$youtube_url=str_replace("'","\'",$youtube_url);
$status=$_POST['status'];
$file_name=$_FILES['image1']['name'];
$file_tmp=$_FILES['image1']['tmp_name'];
$file_ext=strtolower(end(explode('.',$_FILES['image1']['name'])));
$random_number= rand();
$new_file_name=$random_number.'.'.$file_ext;
$file_path="../../images/Upload/About/".$new_file_name;
move_uploaded_file($file_tmp,$file_path);
$addQry=mysqli_query($conn,"INSERT `about_tbl` SET
`title`='$title',
`heading`='$heading',
`title1`='$title1',
`title2`='$title2',
`title3`='$title3',
`content`='$content',
`content1`='$content1',
`content2`='$content2',
`content3`='$content3',
`description1`='$description1',
`description2`='$description2',
`description3`='$description3',
`rangeheading`='$rangeheading',
`value`='$value',
`rangeheading1`='$rangeheading1',
`value1`='$value1',
`youtube_url`='$youtube_url',
`image1`='$new_file_name',
`status`='$status'")or die(mysqli_error($conn));
echo "<script>window.location='show.php?page=about';</script>";
$_SESSION['message']="Service Insert successfully";
}
?>
<!-- [ Main Content ] start -->
<section class="pcoded-main-container">
<div class="pcoded-content">
<!-- [ breadcrumb ] start -->
<div class="page-header">
<div class="page-block">
<div class="row align-items-center">
<div class="col-md-12">
<div class="page-header-title">
<div class="card-header d-flex justify-content-between">
<button class="btn btn-light text-white fw-bold btn-sm btn-round has-ripple"><i class="feather icon-edit"></i> Add Home</button>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- [ breadcrumb ] end -->
<!-- [ Main Content ] start -->
<div class="row">
<div class="col-md-12">
<div class="card">
<!-- <div class="card-header d-flex justify-content-between">
</div> -->
<div class="card-body">
<?php if(isset($_SESSION['error'])){
echo '<div class="alert alert-danger alert-dismissible fade show" role="alert">
<i class="feather icon-alert-triangle text-danger"></i> <strong class="text-dark">'.$_SESSION['error'].'</strong>
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close">
</button>
</div>';
}
unset($_SESSION['error']);
?>
<form method="POST" name="reg" enctype="multipart/form-data" autocomplete="off" >
<div class="container">
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label class="form-label" for="Title">Title </label>
<input type="text" name="title" class="form-control">
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label class="form-label" for="Title">Heading</label>
<input type="text" name="heading" class="form-control">
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label class="form-label" for="Title">Title 1</label>
<input type="text" name="title1" class="form-control">
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label class="form-label" for="Title">Title 2</label>
<textarea name="title2" class="form-control" rows="4" cols="50"></textarea>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label class="form-label" for="Title">Title 3</label>
<input type="text" name="title3" class="form-control">
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label class="form-label" for="">Content </label>
<textarea id="editor1" name="content" class="form-control"></textarea>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label class="form-label" for="">Content 1</label>
<textarea id="editor2" name="content1" class="form-control"></textarea>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label class="form-label" for="">Content 2</label>
<textarea id="editor3" name="content2" class="form-control"></textarea>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label class="form-label" for="">Content 3</label>
<textarea id="editor4" name="content3" class="form-control"></textarea>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label class="form-label" for="">Description 1</label>
<textarea id="editor5" name="description1" class="form-control"></textarea>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label class="form-label" for="">Description 2</label>
<textarea id="editor6" name="description2" class="form-control"></textarea>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label class="form-label" for="">Description 3</label>
<textarea id="editor7" name="description3" class="form-control"></textarea>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label class="form-label" for="Title">RangeHeading</label>
<input type="text" name="rangeheading" class="form-control">
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label class="form-label" for="Title">Value</label>
<input type="text" name="value" class="form-control">
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label class="form-label" for="Title">RangeHeading1</label>
<input type="text" name="rangeheading1" class="form-control">
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label class="form-label" for="Title">Value1</label>
<input type="text" name="value1" class="form-control">
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label class="form-label" for="Title">Youtube_url</label>
<input type="text" name="youtube_url" class="form-control">
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label for="image" class=" form-control-label mb-2">Image</label>
<input type="file" name="image1" class="form-control">
<p id="error1" style="color:red; display:none;">File Must be JPEG,JPG,PNG,SVG</p>
<p id="error2" style="color:red; display:none;">File Must be lessthan 20MB</p>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label class="form-label" for="status">Status</label>
<select class="form-select" name="status" required>
<option value="">Please select status</option>
<option value="1">Show</option>
<option value="0">Hide</option>
</select>
</div>
</div>
<div class="col-md-12 mt-2">
<div class="form-group">
<input type="submit" name="add" class="btn btn-success" value="Add">
<a class="text-white btn btn-dark " href="show.php?page=about">Back</a>
</div>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
<!-- [ form-element ] end -->
</div>
<!-- [ Main Content ] end -->
</div>
</section>
<!-- Required Js -->
<?php include('../include/footer.php'); ?>