ACC SHELL

Path : /srv/www/vhosts/pekab/admin/
File Upload :
Current File : /srv/www/vhosts/pekab/admin/admin.php

<?php
require 'system.php';

if(!isset($_SESSION['uzivatel']))
{
	if(isset($_POST['prihlasit']))
	{
		$login = input($_POST['login']);
		$pass = sha1($_POST['pass']);
		
		$q = "SELECT id FROM uzivatelia WHERE login = '$login' AND pass = '$pass'";
		if( extract( mysql_fetch_assoc( mysql_query($q) ) ) )
		{
			$_SESSION['uzivatel'] = $id;
			
			die(header("Location: admin.php"));	
		}
	}
	
	die(header("Location: index.php"));
}

$subory = array(
	'jpg'	=> 'pic'
);


$inc = array(
	'odkazy'	=> array('new', 'del', 'up', 'down'),
	'text' 		=> array(),
	'novinky'	=> array('new', 'edit', 'del'),
	'upload'	=> array('new', 'new2', 'del'),
	'odhlasit' 	=> array()
);

$odkazy = array(
	'odkazy'	=> 'Odkazy',
	'kalendar'	=> 'Daňový kalendář'
);


$include = '';
foreach(array_reverse($inc) as $url => $get)
{
	if(isset($_GET[$url]))
	{
		$inc = 'default';
		foreach($get as $key)
		{
			if(isset($_GET[$key]))
			{
				$inc = $key;
				break;
			}
		}
		
		$include = str_replace('INC', $inc, "inc/$url.INC.php");
		break;
	}
}
if(empty($include))
	$include = 'inc/default.php';

include $include;

ACC SHELL 2018