date_default_timezone_set('America/New_York');
$citatepedia_serv = "localhost";
$citatepedia_user = "citatepedia";
$citatepedia_pass = "bon77sai";
$citatepedia_data = "citatep_en";
$citatepedia_path = dirname(__FILE__);
$cookie_domain = ".citatepedia.com";
$home_domain = strtolower($_SERVER['HTTP_HOST']);
if (substr($home_domain,0,4)=='www.') $home_domain=substr($home_domain,4);
$comments_table = "citatepedia_comentarii";
$match_cautare_against = ' MATCH (definitie,autor,sursa) AGAINST ';
$match_subiect_against = ' MATCH (definitie) AGAINST ';
$videotag=true;
$moderator_name='Veronica Serbanoiu';
$moderator_mail='vserbanoiu@yahoo.com';
include 'text_en.php';
?>
include '../config.php';
$link = mysql_connect( $citatepedia_serv, $citatepedia_user, $citatepedia_pass );
if ( ! $link )
die( "Couldn't connect to MySQL" );
else
{
mysql_set_charset('utf8',$link);
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.' in ';
echo $sursa_label;
}
else
{
echo $sursa_label;
if ($autor_label<>'') echo ' by '.$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.' in ';
echo ''.$sursa_label.'';
}
else
{
echo ''.$sursa_label.'';
if ($autor_label<>'') echo ' from '.$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 '../module_ad3.php';
include "../navig.php";
// if (strlen($d)>1)
// {
// echo '