Completato sistema di registrazione e di login (Senza grafica);
Completato sistema di banner e rotazioni Inserito sistema per ricerca full text
This commit is contained in:
@@ -190,9 +190,13 @@ class AnalyticsHelper {
|
||||
if (array_key_exists("HTTP_REFERER",$_SERVER)){
|
||||
$source = $_SERVER['HTTP_REFERER'];
|
||||
}
|
||||
|
||||
|
||||
$function = '$.ajax({url: "stats/bannerImpression.php", method: "POST", data: { "ip": "'.$ip.'", "banner": "'.$id.'", "source": "'.$source.'" }, dataType: "html" });';
|
||||
GUIHandler::addOnLoadJsEvent($function);
|
||||
echo '<script type="text/javascript">'.$function.'</script>';
|
||||
|
||||
// OLD VERSION
|
||||
// $function = '$.ajax({url: "stats/bannerImpression.php", method: "POST", data: { "ip": "'.$ip.'", "banner": "'.$id.'", "source": "'.$source.'" }, dataType: "html" });';
|
||||
// GUIHandler::addOnLoadJsEvent($function);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -285,17 +289,18 @@ class AnalyticsHelper {
|
||||
$rval = null;
|
||||
if (ASDSessionHandler::sessionValueExists("bannerActive")){
|
||||
$shown = ASDSessionHandler::getSessionValue("bannerActive");
|
||||
|
||||
|
||||
if (!is_null($replaced) && in_array($replaced, $shown)){
|
||||
$key = array_search($needle, $shown);
|
||||
$key = array_search($replaced, $shown);
|
||||
unset($shown[$key]);
|
||||
ASDSessionHandler::setSessionValue("bannerActive",$shown);
|
||||
}
|
||||
}
|
||||
|
||||
// idlist contiene gli id dei banner in ordine di visualizzazione crescente (esclusi quelli non visualizzati)
|
||||
$pipeline = PipelineHelper::getTodaysBannerVisualizationPipeline($position);
|
||||
$stats = GlobalVariables::get("dao")->aggregate("StatisticModel",$pipeline);
|
||||
var_dump($stats);
|
||||
// var_dump($stats);
|
||||
$idList = array();
|
||||
if (sizeof($stats)>0){
|
||||
foreach ($stats as $stat){
|
||||
@@ -316,7 +321,7 @@ class AnalyticsHelper {
|
||||
}
|
||||
|
||||
if (is_null($rval)){
|
||||
$todayLessShown = array_diff($idList, $shown);
|
||||
$todayLessShown = array_values(array_diff($idList, $shown));
|
||||
if (sizeof($todayLessShown)>0){
|
||||
$i = 0;
|
||||
while (is_null($rval) && $i<sizeof($todayLessShown)){
|
||||
|
||||
Reference in New Issue
Block a user