<?php
require'fun.php';
require'f_admin.php';
$titlu='Șterge dar';
$back[1]='<a href="/admin-daruri">'.img('cadoul.png',1).'Daruri</a>';
$back[2]='<a href="/admin-vezi-daruri">'.img('administrare.png',1).'Vezi daruri</a>';
require'f_sus.php';
$info=$conn->query('SELECT`nume`,`link`FROM`daruri`WHERE`id`="'.$pid.'"')->fetch_row();
if($conn->query('DELETE FROM`daruri`WHERE`id`="'.$pid.'"'))
{
unlink($info[1]);
$conn->query('DELETE FROM`daruri_oferite`WHERE`pid`="'.$pid.'"');
$conn->query('DELETE FROM`evenimente`WHERE`text`LIKE"%[img=/'.$info[1].']%"');
$conn->query('INSERT INTO`jurnal_admini`SET`nume`="Administrare",`de`="'.$de.'",`text`="a șters darul [b]'.$info[0].'[/b]",`data`="'.$_SERVER['REQUEST_TIME'].'"');
echo$div[4].'<img src="'.$domenii_statice[1].'actiune_check.png" alt="" width="16" height="16" />Succes!'.$div[5].$div[6].'Darul '.$info[0].' a fost șters!';
}
else
echo$div[4].'<img src="'.$domenii_statice[2].'actiune_delete.png" alt="" width="16" height="16" />Eroare!'.$div[5].$div[7];
echo$div[0];
require'f_jos.php';