%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/www/website_7c8ed5ef/admin/manage_service_head/ |
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);
$status = $_POST['status'];
$addQry = mysqli_query($conn, "INSERT `service_head` SET
`title`='$title',
`heading`='$heading',
`status`='$status'") or die(mysqli_error($conn));
echo "<script>window.location='show.php?page=service_head';</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 Projects</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>
<textarea name="heading" class="form-control"></textarea>
</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=service">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'); ?>