printDebug("==> This is a new visit, we create datas in the database when necessary<br>"); if (!isset($ip) || !isset($ip2long)) { $ip = getIp(); $ip2long = ip2long($ip); exitIfIpExcluded($ip2long, $logo, $site); } $hostExt = getHostnameExt(getHost($ip)); printDebug('<br>ip : ' . $ip); printDebug('<br>hostname : ' . $hostExt); $serverDate = date("Y-m-d"); $serverTime = date("H:i:s"); $country = getCountry($hostExt, $browserLang); if ($country == 'gb') { $country = 'uk'; } $continent = getContinent($country); if (strlen($refererUrl) === 0) { $refererUrl = 'NULL'; } else { $refererUrl = "'" . $refererUrl . "'"; } // do it first because we need idpage for visit info insert $a_idPages = recordDbPage($pageName, $pageUrlParamsProcessed, $pageCategory, true); $idPageUrl = $a_idPages[1]; $idPage = $a_idPages[0]; $md5Config = md5($os . serialize($a_browser) . $resolution . $colorDepth . $pdf . $flash . $java . $javascript . $director . $quicktime . $realPlayer . $windowsMedia . $cookieAccept . $ip2long . $browserLang); // save visitor information $r = query("INSERT INTO " . T_VISIT . " \n\t\t\t\t\t\t(idsite, idcookie, returning, last_visit_time, server_date, server_time, md5config, \n\t\t\t\t\t\treferer, os, browser_name, browser_version, resolution, color_depth, \n\t\t\t\t\t\tpdf, flash, java, javascript, director, quicktime, realplayer, windowsmedia, cookie, \n\t\t\t\t\t\tlocal_time, ip, hostname_ext, browser_lang, country, continent, \n\t\t\t\t\t\ttotal_pages, total_time, entry_idpage, entry_idpageurl, exit_idpage)\n\t\t\t\t\tVALUES ('{$idSite}', '{$idCookie}', '{$returningVisitor}', CURRENT_TIME(), \n\t\t\t\t\t\t\t\t\t'{$serverDate}', '{$serverTime}', '{$md5Config}', \n\t\t\t\t\t{$refererUrl}, '{$os}', '" . $a_browser['shortName'] . "',\n\t\t\t\t\t'" . $a_browser['version'] . "', '{$resolution}', '{$colorDepth}', \n\t\t\t\t\t'{$pdf}', '{$flash}','{$java}', '{$javascript}', '{$director}', '{$quicktime}', '{$realPlayer}', '{$windowsMedia}', '{$cookieAccept}', \n\t\t\t\t\t'{$localTime}','{$ip2long}', '{$hostExt}', '{$browserLang}', '{$country}', '{$continent}', \n\t\t\t\t\t1, '" . DEFAULT_TIME_PAGE . "', '{$idPage}', '{$idPageUrl}', '{$idPage}')\n\t\t\t"); $idVisit = mysql_insert_id(); // save page view and URL and variables recordDbInfoPage($idVisit, $idPage, $idPageRef, $timeDiffRef, $a_vars);
case 'getCountry': require_once("MultiLayerSearch.php"); $cName=$_REQUEST['continentName']; $result=getCountry($cName); print $result; break; case 'getCategory': require_once("MultiLayerSearch.php"); print getCategory(); break; case 'getContinent': require_once("MultiLayerSearch.php"); print getContinent(); break; case 'getTheme': require_once("MultiLayerSearch.php"); $level=$_REQUEST['level']; $name=$_REQUEST['themeName']; $city_name=$_REQUEST['cityName']; $result=getTheme($name, $city_name, $level); print $result; break; //MultiLayerSearch.php ends //printPDF.php starts case 'printPDF': require_once("printPDF.php");
<?php require 'functions.php'; // nom des continents $Continent_names = getContinent($pdo); $strconnexion = 'mysql:host=localhost;dbname=world;charset=utf8'; $pdo = new PDO($strconnexion, 'root', 'webforce3'); $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $liste_pays = getPays($pdo); ?> <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title>stat of world</title> <link rel="stylesheet" href="style.css"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script> <script src="pigeons.js" type="text/javascript" charset="utf-8" async defer></script> </head> <body> <main> <!--monde--> <div class="monde"> <h1>Monde</h1> </div> <!--les deux select --> <form action="index.php" method="get" accept-charset="utf-8"> <select class="continent" name="continent">