error_reporting(E_ALL & ~E_STRICT & ~E_NOTICE & ~E_DEPRECATED);
ini_set("default_charset", "");
$html_flags=ENT_QUOTES | ENT_HTML401;
$html_encoding='cp1252';
date_default_timezone_set("Europe/Bucharest");
$citatepedia_serv = "localhost";
$citatepedia_user = "luc7v_citatepedia_usr_ro";
$citatepedia_pass = "ZeDK$@nZ6f[A";
$citatepedia_data = "luc7v_citatepedia_ro";
$citatepedia_path = dirname(__FILE__);
$citatepedia_encoding='ISO-8859-1';
$cookie_domain = ".citatepedia.ro";
$home_domain = strtolower($_SERVER['HTTP_HOST']);
if (substr($home_domain,0,4)=='www.') $home_domain=substr($home_domain,4);
if (substr($home_domain,-3)==':80') $home_domain=substr($home_domain,0,-3);
$comments_table = "citatepedia_comentarii";
$match_cautare_against = ' MATCH (termen1,titlu1,pre1,definitie1,autor) AGAINST ';
$match_cautare0_against = ' MATCH (termen0,titlu0,pre0,definitie0,autor0) AGAINST ';
$match_subiect_against = ' MATCH (termen1,titlu1,pre1,definitie1) AGAINST ';
$optad_enabled=false;
$metamagazin_enabled=false;
$videotag=true;
include 'text_ro.php';
include '../config.php';
$link = mysql_connect( $citatepedia_serv, $citatepedia_user, $citatepedia_pass );
if ( ! $link )
die( "Couldn't connect to MySQL" );
else
{
mysql_select_db( $citatepedia_data,$link ) or die ( "Couldn't open database: ".mysql_error() );
if ($d=='') echo '
';
echo '';
$autor_label=stripslashes(urldecode($a));
$sursa_label=stripslashes(urldecode($d));
if (strtolower(substr($sursa_label,0,1))==substr($sursa_label,0,1))
{
if ($autor_label<>'') echo $autor_label.' în ';
echo $sursa_label;
}
else
{
echo $sursa_label;
if ($autor_label<>'') echo ' de '.$autor_label;
}
?>
include "../header_top.php";
include "header_general.php";
if ($a<>'') $resultev = mysql_query( 'SELECT * FROM citatepedia_date WHERE autor="'.mysql_real_escape_string($a).'" ORDER BY anul,tip', $link ) or die ( "Couldn't select: ".mysql_error() );
if (strpos($_SERVER['REQUEST_URI'],'a=')!==false) $cond="autor='".mysql_real_escape_string($a)."' AND sursa='".mysql_real_escape_string($d)."'";
else $cond="sursa='".mysql_real_escape_string($d)."' AND tip<>'p'";
$result = mysql_query( "SELECT COUNT(*) AS _items FROM citatepedia WHERE ".$cond, $link ) or die ( "Couldn't select: ".mysql_error() );
$row = mysql_fetch_array( $result );
$items = $row['_items'];
if ($items>0)
{
echo '
';
if (strtolower(substr($sursa_label,0,1))==substr($sursa_label,0,1))
{
if ($autor_label<>'') echo $autor_label.' în ';
echo ''.$sursa_label.'';
}
else
{
echo ''.$sursa_label.'';
if ($autor_label<>'') echo ' de '.$autor_label;
}
echo '
';
include '../meniu_sursa.php';
}
include "../header_content.php";
$mycontext_author=$autor_label;
$mycontext_title=$sursa_label;
$mycontext_order='data_extern DESC';
$mycontext_limit='1';
$result = mysql_query( "SELECT * FROM citatepedia WHERE ".$cond." ORDER BY calitate DESC,voturi DESC,recomandari DESC,lungime LIMIT ".(($p-1)*$perpage).','.$perpage, $link ) or die ( "Couldn't select: ".mysql_error() );
$show_subjects=true;
include "../show_list.php";
include "../navig.php";
if (strlen($d)>1)
{
echo '