|
Server : Apache System : Linux p3plzcpnl507073.prod.phx3.secureserver.net 4.18.0-553.53.1.lve.el8.x86_64 #1 SMP Wed May 28 17:01:02 UTC 2025 x86_64 User : swg98tjyzel1 ( 5098476) PHP Version : 8.1.34 Disable Function : NONE Directory : /home/swg98tjyzel1/public_html/bityatra.com/wp-admin/ |
Upload File : |
<?php
ob_start();
include("../config.php");
?>
<?php
if(!isset($_SESSION['user']))
{
header("location:index.php");
}
?>
<?php
$sq="select * from mng_aboutus order by id";
$query=mysqli_query($con,$sq);
$no_rows=mysqli_num_rows($query);
$row=mysqli_fetch_array($query);
?>
<?php
if($no_rows!=0){
if(isset($_POST['submit']))
{
if($_FILES['F1']['name'] != "")
{
if ($_POST['img1']!="")
{
$del_path="../upload_image"."/".$_POST['img1'];
@unlink($del_path);
}
$s1=rand();
$realname1=str_replace(" ","_",$_FILES['F1']['name']);
$realname1=$s1 ."_". $realname1;
$path1="../upload_image";
$dest1=$path1."/".$realname1;
move_uploaded_file($_FILES['F1']['tmp_name'],$dest1);
$img_name1=trim($realname1);
}
else
{
$img_name1=$_POST['img1'];
}
$sql=mysqli_query($con,"update mng_aboutus set image='".str_replace("'","'",$img_name1)."',content='".str_replace("'","'",$_POST['details'])."' WHERE id='".$res['id']."'");
print"<script>self.location='mng_aboutus.php?msg=Content Updated Successfuly ';</script>";
}
}else{
if(isset($_POST['submit']))
{
if($_FILES['F1']['name'] != "")
{
if ($_POST['img1']!="")
{
$del_path="../upload_image"."/".$_POST['img1'];
@unlink($del_path);
}
$s1=rand();
$realname1=str_replace(" ","_",$_FILES['F1']['name']);
$realname1=$s1 ."_". $realname1;
$path1="../upload_image";
$dest1=$path1."/".$realname1;
move_uploaded_file($_FILES['F1']['tmp_name'],$dest1);
$img_name1=trim($realname1);
}
else
{
$img_name1=$_POST['img1'];
}
$sql=mysqli_query($con,"insert into mng_aboutus set image='".str_replace("'","'",$img_name1)."',content='".str_replace("'","'",$_POST['details'])."'");
print"<script>self.location=mng_aboutus.php?msg=Content Inserted Successfuly';</script>";
}
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<title>Admin Login</title>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="css/bootstrap.min.css" />
<link rel="stylesheet" href="css/bootstrap-responsive.min.css" />
<link rel="stylesheet" href="css/fullcalendar.css" />
<link rel="stylesheet" href="css/maruti-style.css" />
<link rel="stylesheet" href="css/maruti-media.css" class="skin-color" />
</head>
<body>
<!--Header-part-->
<div id="header">
<h2 style="color:#fff;font-weight:bold;font-size:26px;"><a href="inner.php">Admin Login</a></h2>
</div>
<!--close-Header-part-->
<script type="text/javascript" src="ckeditor/ckeditor.js"></script>
<?php include"header.php"; ?>
<?php include"menu.php"; ?>
<div id="content">
<div id="content-header">
<div id="breadcrumb"> <a href="inner.php" title="Go to Home" class="tip-bottom"><i class="icon-home"></i> Home</a></div>
</div>
<div class="container-fluid">
<div class="row-fluid">
<div class="span10">
<div class="widget-box">
<div class="widget-title"> <span class="icon"> <i class="icon-align-justify"></i> </span>
<h5>Add About Details</h5>
</div>
<div class="widget-content nopadding">
<form action="" method="post" class="form-horizontal" enctype="multipart/form-data">
<?php
if ($_GET['id']!="")
{
?>
<input type="hidden" name="stage" value="up">
<input type="hidden" name="id" value="<?php print $_GET['id']; ?>">
<?php
}
else
{
?>
<input type="hidden" name="stage" value="in">
<?php
}
?>
<?php if ($row['image']!="")
{
?>
<p style="text-align:center;margin-top:10px"> <img src="../upload_image/<?php echo $row['image']; ?>" height="120" width="220" border="0"></p>
<?php
}
?>
<div class="control-group">
<label class="control-label">Image :</label>
<div class="controls">
<input type="file" name="F1">
<input type="hidden" name="img1" value="<?php echo $row['image']; ?>">
</div>
</div>
<div class="control-group">
<label class="control-label">Content :</label>
<div class="controls">
<textarea name="details" cols="45" rows="5" class="ckeditor"><?php echo $row['content']; ?></textarea>
</div>
</div>
<div class="form-actions">
<input type="submit" name="submit" value="Submit" class="btn btn-success">
</div>
</form>
</div>
</div>
</div>
</div>
<hr>
<hr>
</div>
</div>
</div>
</div>
<?php include "footer.php"; ?>
<script src="js/excanvas.min.js"></script>
<script src="js/jquery.min.js"></script>
<script src="js/jquery.ui.custom.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/jquery.flot.min.js"></script>
<script src="js/jquery.flot.resize.min.js"></script>
<script src="js/jquery.peity.min.js"></script>
<script src="js/fullcalendar.min.js"></script>
<script src="js/maruti.js"></script>
<script src="js/maruti.dashboard.js"></script>
<script src="js/maruti.chat.js"></script>
<script type="text/javascript">
// This function is called from the pop-up menus to transfer to
// a different page. Ignore if the value returned is a null string:
function goPage (newURL) {
// if url is empty, skip the menu dividers and reset the menu selection to default
if (newURL != "") {
// if url is "-", it is this page -- reset the menu:
if (newURL == "-" ) {
resetMenu();
}
// else, send page to designated URL
else {
document.location.href = newURL;
}
}
}
// resets the menu selection upon entry to this page:
function resetMenu() {
document.gomenu.selector.selectedIndex = 2;
}
</script>
</body>
<!-- Mirrored from wrappixel.com/demos/free-admin-templates/maruti-admin/index.html by HTTrack Website Copier/3.x [XR&CO'2014], Fri, 16 Jun 2017 07:10:35 GMT -->
</html>