403Webshell
Server IP : 172.67.187.206  /  Your IP : 172.71.28.155
Web Server : Apache/2.4.25 (Win32) OpenSSL/1.0.2j PHP/5.6.30
System : Windows NT WIN-ECQAAA40806 6.2 build 9200 (Windows Server 2012 Standard Edition) i586
User : SYSTEM ( 0)
PHP Version : 5.6.30
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /Inetpub/www/news/datacenter/admin/core/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /Inetpub/www/news/datacenter/admin/core//CategoryEdit.php
<?php 
require_once "../config.php";
require_once ABSPATH."/core/checklogin.php";
require_once ABSPATH."/core/functions.php";
require_once ABSPATH."/core/PasswordHash.php";
require_once ABSPATH."/core/resize-class.php";

if(DEMO_MODE!=0)
	{
	header("Location:../account.php?page=dashboard&msg=demo_mode");
	exit();
	}

$title = filter_input(INPUT_POST, 'title', FILTER_SANITIZE_STRING);
$active = filter_input(INPUT_POST, 'active', FILTER_SANITIZE_NUMBER_INT);
$description = filter_input(INPUT_POST, 'description', FILTER_SANITIZE_STRING);
$categ_id = filter_input(INPUT_POST, 'categ_id', FILTER_SANITIZE_NUMBER_INT);

$slug = RewriteUrl($title);

// check for inputs
if($title=="")
	{
	header("Location:../account.php?page=pro-categories&msg=error_title");
	exit();
	}

// check for duplicate
$stmt = $conn->prepare("SELECT * FROM ".DB_PREFIX."categories WHERE slug = ? AND categ_id != ?");
$stmt->execute([$slug, $categ_id]);
$exist = $stmt->fetchColumn();

if($exist!=0)
	{
	header("Location: ../account.php?page=pro-categories&msg=error_duplicate");
	exit();
	}

$query = "UPDATE ".DB_PREFIX."categories SET title = ?, slug = ?, description = ?, active =? WHERE categ_id = ? LIMIT 1"; 
$stmt = $conn->prepare($query);
$stmt->bindParam(1, $title, PDO::PARAM_STR);
$stmt->bindParam(2, $slug, PDO::PARAM_STR);
$stmt->bindParam(3, $description, PDO::PARAM_STR);
$stmt->bindParam(4, $active, PDO::PARAM_INT);
$stmt->bindParam(5, $categ_id, PDO::PARAM_INT);
$stmt->execute();

// form OK:
header("Location: ../account.php?page=pro-categories&msg=edit_ok");	
exit;

Youez - 2016 - github.com/yon3zu
LinuXploit