The site has moved. Please update your bookmarks.
If you are not redirected, click here to access the PDSP IMS site.
require DBPAGEHOME .'PHPFunctions/fileReader.php';
require DBPAGEHOME .'PHPFunctions/databaseClass.php';
$infoFile = DBPAGEHOME ."PdspConfig/dbInfoAcc.txt";
$dbName = "pdspTEMP";
// crea una nueva instancia $db de la clase databaseClass
$db = new databaseClass($infoFile, $dbName);
$db->connectToDatabase();
//establishing the period we are checking
$year=date("Y");
$month=date("m")-1;
$leap = date("L");
//echo "month #=".$month."
";
if ($month == 0 ){
$month=12;
$year --;
}
$days_in_month = array(31,28,31,30,31,30,31,31,30,31,30,31);
$days = $days_in_month[$month-1];
//echo "mes={$month}, days=".$days."
";
if ($leap == 1 && $month==2) $days=29;
if (strlen($month)== 1) $month="0".$month;
$visitDateStart=$year."/".$month."/01";
$visitDateEnd=$year."/".$month."/".$days;
$join="select count(*) as cuantos,r.recAliasid,recAlias,r.recid ";
$join.="from projectLog l, newReceptorAliases r where ";
$join.="accessdatetime >= '".$visitDateStart."' and accessdatetime <='".$visitDateEnd."' and l.recid=r.recAliasID ";
$join.="group by r.recid order by cuantos desc limit 100";
global $link;
$rec=mysqli_query($link,$join)or die ("Error during quering pdspTEMP".mysqli_error($link));
echo "
";
echo "
Top 100 receptors/targets queried between
";
echo $visitDateStart." and ".$visitDateEnd."
";
echo "
";
echo "
";
//displays the Table with the 100 top receptors
echo "";
while ($record=mysqli_fetch_array($rec,MYSQL_BOTH)){
// print_r($record);
print "- ".$record[2]."
";
}
print "
";
$db->closeDatabaseConnection();
include("footers/footer.html");
?>