<?php
require'fun.php';
$pminfo=$conn->query('SELECT`text`,`de`,`data`,`la`,`citit`FROM`notificari`WHERE`id`="'.$pid.'"')->fetch_row();
require'f_conectare.php';
conectare('notificare de la '.nume($pminfo[1],1),'notificari');
$titlu='Notificare de la '.nume($pminfo[1],1);
$back[1]='<a href="/notificari">'.img('notificari.gif',1).'Notificări</a>';
require'f_sus.php';
if($de==$pminfo[3]&&$pminfo[4]==0)
$conn->query('UPDATE`notificari`SET`citit`="'.$_SERVER['REQUEST_TIME'].'"WHERE`id`="'.$pid.'"');
if($de==$pminfo[3]||$de==$pminfo[1])
{
require'f_profil.php';
echo$div[4].img('notificari.gif',1).'Notificare '.($de==$pminfo[3]?'de la: '.profil($pminfo[1]):'la: '.profil($pminfo[3])).$div[5];
require'f_filtru.php';
require'f_data.php';
require'f_sms.php';
echo$div[1].'Salut '.nume($pminfo[3]).', '.filtru($pminfo[0]).'<br /><i>P.S.: Aceasta este o notificare automata</i><br />';
if($pminfo[4]>0)
echo'<img src="'.$domenii_statice[1].'opm.gif" alt="" /><small>Citita: '.data($pminfo[4]).'</small><br />';
echo'<small>Primita '.data($pminfo[2]).sms($pminfo[0]).' <a href="/notificari/tip/sterge?xxx[]='.$pid.'"><img src="'.$domenii_statice[2].'sterge.png" alt="" width="16" height="16" /></a></small>'.$div[0];
}
else
echo$div[4].'<img src="'.$domenii_statice[2].'actiune_delete.png" alt="" width="16" height="16" />Eroare!'.$div[5].$div[7].'Aceasta notificare nu îți apartine!'.$div[0];
require_once'f_simbol.php';
$prev=$conn->query('SELECT`id`,`citit`,`de`FROM`notificari`WHERE`la`="'.$de.'"&&`data`<"'.$pminfo[2].'"&&`citit`="0"ORDER BY`id`DESC LIMIT 1')->fetch_row();
$next=$conn->query('SELECT`id`,`citit`,`de`FROM`notificari`WHERE`la`="'.$de.'"&&`data`>"'.$pminfo[2].'"&&`citit`="0"ORDER BY`id`ASC LIMIT 1')->fetch_row();
if($prev[0]>0||$next[0]>0)
echo$div[1].($prev[0]>0?'<a accesskey="1" href="/notificare/id/'.$prev[0].'">'.img('arrow_back.png',1).($prev[1]==0?'<img src="'.$domenii_statice[1].'npm.gif" alt="" />':'<img src="'.$domenii_statice[1].'opm.gif" alt="" />').simbol($prev[2]).nume($prev[2]).'</a>':'').($prev[0]>0&&$next[0]>0?'<strong> - </strong>':'').($next[0]>0?'<a accesskey="2" href="/notificare/id/'.$next[0].'">'.($next[1]==0?'<img src="'.$domenii_statice[1].'npm.gif" alt="" />':'<img src="'.$domenii_statice[1].'opm.gif" alt="" />').simbol($next[2]).nume($next[2]).img('arrow_next.png',2).'</a>':'').$div[0];
unset($prev,$next);
require'f_jos.php';