? GR0V Shell

GR0V shell

Linux in-mum-web921.main-hosting.eu 4.18.0-553.34.1.lve.el8.x86_64 #1 SMP Thu Jan 9 16:30:32 UTC 2025 x86_64

Path : /home/u949514618/domains/karmaasrconsultants.com/public_html/admin/
File Upload :
Current File : /home/u949514618/domains/karmaasrconsultants.com/public_html/admin/edit-websitesetting.php

<?php include_once("tophead.php"); 
if(isset($_SESSION['username']) && $_SESSION['role'] == 'author')
{
  header('Location: index.php');
}
if(isset($_GET['edit'])){
  $edit_id = $_GET['edit'];
  $edit_query = "select * from logosection where id = $edit_id";
  $edit_query_run = mysqli_query($con, $edit_query);
  if(mysqli_num_rows($edit_query_run) > 0){
    $edit_row = mysqli_fetch_array($edit_query_run);
    $e_websitename = $edit_row['websitename'];
    $e_favicon = $edit_row['favicon'];
    $e_headerlogo = $edit_row['headerlogo'];
    $e_footerlogo = $edit_row['footerlogo'];
  }
  else{
    header('Location: index.php');
  }
}
else{
  header("Location: index.php");
}
?>
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title>Admin | Dashboard</title>
  <!-- Tell the browser to be responsive to screen width -->
  <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
  <!-- Bootstrap 3.3.7 -->
  <link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.min.css">
  <!-- Font Awesome -->
  <link rel="stylesheet" href="bower_components/font-awesome/css/font-awesome.min.css">
  <!-- Ionicons -->
  <link rel="stylesheet" href="bower_components/Ionicons/css/ionicons.min.css">
  <!-- DataTables -->
  <link rel="stylesheet" href="bower_components/datatables.net-bs/css/dataTables.bootstrap.min.css">
  <!-- Theme style -->
  <link rel="stylesheet" href="dist/css/AdminLTE.min.css">
  <!-- AdminLTE Skins. Choose a skin from the css/skins
       folder instead of downloading all of them to reduce the load. -->
  <link rel="stylesheet" href="dist/css/skins/_all-skins.min.css">

  <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
  <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
  <!--[if lt IE 9]>
  <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
  <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
  <![endif]-->

  <!-- Google Font -->
  <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700,300italic,400italic,600italic">
</head>
<body class="hold-transition skin-blue sidebar-mini">
<div class="wrapper">

  <?php include_once("header.php"); ?>
  <!-- Left side column. contains the logo and sidebar -->
  <?php include_once("leftsidebar.php"); ?>

  <!-- Content Wrapper. Contains page content -->
  <div class="content-wrapper">
    <!-- Content Header (Page header) -->
    <section class="content-header">
      <h1>
        <i class="fa fa-user"></i> Edit Setting
        <small> Add/Edit Setting</small>
      </h1>
      <ol class="breadcrumb">
        <li><a href="#"><i class="fa fa-dashboard"></i> Home</a></li>
        <li class="active">Edit Setting</li>
      </ol>
    </section>

    <!-- Main content -->
    <section class="content">
      <!-- Small boxes (Stat box) -->
      <div class="row">
        <div class="col-xs-12">
        <?php
if(isset($_POST['submit'])){
	$title = mysqli_real_escape_string($con,$_POST['pagetitle']);
	$image = $_FILES['image']['name'];
	$image_tmp = $_FILES['image']['tmp_name'];
    $brochure = $_FILES['brochure']['name'];
    $brochure_tmp = $_FILES['brochure']['tmp_name'];
    $footerlogo = $_FILES['footerlogo']['name'];
    $footerlogo_tmp = $_FILES['footerlogo']['tmp_name'];
  
  if(empty($image)){
    $image = $e_favicon;
  }
  if(empty($brochure)){
    $brochure = $e_headerlogo;
  }
  if(empty($footerlogo)){
    $footerlogo = $e_footerlogo;
  }
		if(empty($title)){
		$error = "All (*) fields are required";
	}
	else{
		$update_query = "update `logosection` SET `websitename` = '$title', `favicon` = '$image', `headerlogo` = '$brochure', `footerlogo` = '$footerlogo' where `id` = $edit_id";
    if(mysqli_query($con, $update_query)){
      $msg = "Page has been updated";
      header("refresh:0; url=edit-websitesetting.php?edit=$edit_id");
      if(!empty($image)){
        move_uploaded_file($image_tmp, "../website/$image");
      }
      if(!empty($brochure)){
        move_uploaded_file($brochure_tmp, "../website/headerlogo/$brochure");
      }
      if(!empty($footerlogo)){
        move_uploaded_file($footerlogo_tmp, "../website/footerlogo/$brochure");
      }
    }
    else{
      $error = "Page has not been updated";
    }
	}
}
?>
          <div class="col-md-12">
          <div class="box box-info">
            <div class="box-header with-border">
              <h3 class="box-title">Add Website Setting</h3>
            </div>
            <!-- /.box-header -->
            <!-- form start -->
            <form class="form-horizontal" method="post" enctype="multipart/form-data">
              <div class="box-body">
                <div class="form-group">
                  <label for="pagetitle" class="col-sm-2 control-label">Title*</label>
					<?php
					if(isset($error)){
						echo "<span class='pull-right' style='color:red;'>$error</span>";
					}
					else{
						echo "<span class='pull-right' style='color:green;'>All Set Good</span>";
					}
					?>
                  <div class="col-sm-10">
                    <input name="pagetitle" type="text" class="form-control" value="<?php echo $e_websitename; ?>" id="pagetitle" placeholder="Page Title">
                  </div>
                </div>
                
                
                
                <div class="form-group">
                  <label for="uploadimage" class="col-sm-2 control-label">Upload Favicon</label>

                  <div class="col-sm-10">
                    <input name="image" type="file" class="form-control" id="uploadimage">
                  </div>
                </div>
                <div class="form-group">
                <label for="uploadpdf" class="col-sm-2 control-label">Upload Header Logo</label>

                  <div class="col-sm-10">
                    <input name="brochure" type="file" class="form-control" id="uploadpdf">
                  </div>
                </div>

                <div class="form-group">
                  <label for="footerlogo" class="col-sm-2 control-label">Upload Footer Logo</label>

                  <div class="col-sm-10">
                    <input name="footerlogo" type="file" class="form-control" id="footerlogo">
                  </div>
                </div>
                

                
                
                
                
                
                
                
                
              </div>
              <!-- /.box-body -->
              <div class="box-footer">
                
                <input type="submit" class="btn btn-info pull-right" value="Update Page" name="submit">
              </div>
              <!-- /.box-footer -->
            </form>
          </div>
          </div>
          <!-- /.box -->
        </div>
      </div>
      <!-- /.row -->
      <!-- Main row -->
      
      <!-- /.row (main row) -->

    </section>
    <!-- /.content -->
  </div>
  <!-- /.content-wrapper -->
  <?php include_once("footer.php"); ?>

  <!-- Control Sidebar -->
  <?php include_once("controlsidebar.php"); ?>
  <!-- /.control-sidebar -->
  <!-- Add the sidebar's background. This div must be placed
       immediately after the control sidebar -->
  <div class="control-sidebar-bg"></div>
</div>
<!-- ./wrapper -->

<!-- jQuery 3 -->
<script src="bower_components/jquery/dist/jquery.min.js"></script>
<!-- Bootstrap 3.3.7 -->
<script src="bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
<!-- DataTables -->
<script src="bower_components/datatables.net/js/jquery.dataTables.min.js"></script>
<script src="bower_components/datatables.net-bs/js/dataTables.bootstrap.min.js"></script>
<!-- SlimScroll -->
<script src="bower_components/jquery-slimscroll/jquery.slimscroll.min.js"></script>
<!-- FastClick -->
<script src="bower_components/fastclick/lib/fastclick.js"></script>
<!-- AdminLTE App -->
<script src="dist/js/adminlte.min.js"></script>
<!-- AdminLTE for demo purposes -->
<script src="dist/js/demo.js"></script>
<!-- page script -->
<script>
  $(function () {
    $('#example1').DataTable()
    $('#example2').DataTable({
      'paging'      : true,
      'lengthChange': false,
      'searching'   : false,
      'ordering'    : true,
      'info'        : true,
      'autoWidth'   : false
    })
  })
</script>
</body>
</html>

T1KUS90T
  root-grov@89.117.188.241:~$