Current Path : /home/da040400/www_root/adm/
Upload File :
Current File : /home/da040400/www_root/adm/zmazat_foto.php

<?php
	require_once('auth.php');
?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE>ADMIN - Výlety</TITLE>
<META http-equiv="Content-Type" content="text/html; charset=utf8">
<META name="description" content="Ekovýlety">
<META name="keywords" content="Ekovýlety, exkurzie, podujatia pre školy a verejnosť">
<META name="author" content="vladimir bacik" >
<META name="copyright" content="http://www.sodbtn.sk">
<meta name="Robots" content="index,follow">
<meta name="Revisit-after" content="5">  
<LINK href="styly.css" type="text/css" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="css/demo.css">

<link href="css/facybox.css" media="screen" rel="stylesheet" type="text/css">
<link href="css/facybox_urls.css" media="screen" rel="stylesheet" type="text/css">
<link href="css/faceplant.css" media="screen" rel="stylesheet" type="text/css">

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js" type="text/javascript"></script>
<script src="lib/facybox.js" type="text/javascript"></script>
  <script type="text/javascript">
    jQuery(document).ready(function($) {
      $('a[rel*=facybox]').facybox({
        // noAutoload: true
      });
    });
  </script>


<body>


<br>
<center>
<table width="950" class="admin">
<tr><td class="hlava_adm" height="60">Administrácia stránky - EKOVYLETY.sk</td></tr>
<tr><td class="menu_adm" height="25">
<a class="admin" href="index.php">úvodná stránka</a>
</td></tr>
<tr><td class="hlavna">

<br>

<center>

<?php
	include('identifikacia.php');
?>

</center>

<?php

require("spojenie.php"); # Vložíme skript, ktorý obsahuje nastavenie pripojenia.
$spoj = MySQL_Connect($SQL_Server, $SQL_Uzivatel, $SQL_Heslo) OR DIE(MySQL_Error());
MySQL_Select_Db($Databaza) OR DIE(MySQL_Error());
mysql_query("set names utf8");

$id_foto = $_POST["id_foto"];


$vysledok = MySQL_Query("select foto from andy_fotky WHERE id_foto = '$id_foto'");
$row_db = mysql_fetch_object($vysledok);
$subor = $row_db->foto;
     
                                   
$ok1 = @mysql_query("DELETE FROM andy_fotky WHERE id_foto='$id_foto'");
if ($ok1) {
  echo('<br><br><center><b>Fotka bola úspešne zmazaná z databázy</b><br><br>');
} else {
  echo('<p>Error deleting author from database!<br />'.
       'Error: ' . mysql_error() . '</p>');
}


echo "ID fotky: $id_foto<br>";

if ($subor=='') echo "";
if ($subor!='') {
if (file_exists("../upload/$subor")) {
  chmod("../upload/$subor", 0777);
  unlink("../upload/$subor");
  echo "zmazaná fotka: $subor<br><br></center>";
}
}

?>


<center>

<br><br>
<a class="linky" href="index.php">späť na úvodnú stránku</a>

<?php
MySQL_Close($spoj);
?> 

<br><br>
   
</center>


</td></tr></table>
</center>


</body>
</html>

DR.KR LITE SHELL COPYRIGHT 2016