| [ Index ] |
|
Code source de Cr@wltr@ck 2.2.1 |
1 <?php 2 //---------------------------------------------------------------------- 3 // CrawlTrack 2.2.1 4 //---------------------------------------------------------------------- 5 // Crawler Tracker for website 6 //---------------------------------------------------------------------- 7 // Author: Jean-Denis Brun 8 //---------------------------------------------------------------------- 9 // Website: www.crawltrack.fr 10 //---------------------------------------------------------------------- 11 // That script is distributed under GNU GPL license 12 //---------------------------------------------------------------------- 13 // file: archive.php 14 //---------------------------------------------------------------------- 15 16 17 18 if (!defined('IN_CRAWLT')) 19 { 20 echo"<h1>Hacking attempt !!!!</h1>"; 21 exit(); 22 } 23 //initialize array 24 $listid=array(); 25 $month=array(); 26 $visit=array(); 27 $page=array(); 28 $topvisit=array(); 29 $toppage=array(); 30 31 32 //database connection 33 $connexion = mysql_connect($crawlthost,$crawltuser,$crawltpassword) or die("MySQL connection to database problem"); 34 $selection = mysql_select_db($crawltdb) or die("MySQL database selection problem"); 35 36 //include menu 37 include "include/menumain.php"; 38 include "include/menusite.php"; 39 40 41 echo"<div class=\"content\">\n"; 42 echo"<h1>".$language['archive']."</h1><br>\n"; 43 44 45 //data request 46 $sqlarchive="SELECT mois, nbr_visits, pages_view, top_visits_1,top_visits_2,top_visits_3,top_pages_view_1,top_pages_view_2,top_pages_view_3 FROM crawlt_archive"; 47 48 $requetearchive = mysql_query($sqlarchive, $connexion) or die("MySQL query error"); 49 50 $nbrresult=mysql_num_rows($requetearchive); 51 if($nbrresult>=1) 52 { 53 while ($ligne = mysql_fetch_row($requetearchive)) 54 { 55 $sitetodisplay = explode('-',$ligne[0]); 56 if($sitetodisplay[1]==$site) 57 { 58 $dateexplode = explode('/',$sitetodisplay[0]); 59 $datelist[]=mktime(0,0,0,$dateexplode[0],1,$dateexplode[1]); 60 $month[]=$sitetodisplay[0]; 61 $visit[]=$ligne[1]; 62 $page[]=$ligne[2]; 63 $topvisit[]=$ligne[3]."<br> ".$ligne[4]."<br> ".$ligne[5]; 64 $toppage[]=$ligne[6]."<br> ".$ligne[7]."<br> ".$ligne[8]; 65 } 66 } 67 68 echo"<div width='100%' align='center'>\n"; 69 echo"<table cellpadding='0px' cellspacing='0' width='100%'>\n"; 70 echo"<tr><th class='tableau11'>\n"; 71 echo"".$language['month2']."\n"; 72 echo"</th>\n"; 73 echo"<th class='tableau11'>\n"; 74 echo"".$language['nbr_tot_visits']."\n"; 75 echo"</th>\n"; 76 echo"<th class='tableau11'>\n"; 77 echo"".$language['nbr_tot_pages']."\n"; 78 echo"</th>\n"; 79 echo"<th class='tableau11'>\n"; 80 echo"".$language['top_visits']."\n"; 81 echo"</th>\n"; 82 echo"<th class='tableau22'>\n"; 83 echo"".$language['top_pages']."\n"; 84 echo"</th></tr>\n"; 85 86 87 //counter for alternate color lane 88 $comptligne=2; 89 arsort($datelist); 90 foreach ($datelist as $id =>$value) 91 { 92 if ($comptligne%2 ==0) 93 { 94 echo"<tr><td class='tableau33'> ".$month[$id]." </td>\n"; 95 echo"<td class='tableau33'>".$visit[$id]."</td>\n"; 96 echo"<td class='tableau33'>".$page[$id]."</td> \n"; 97 echo"<td class='tableau33g'> ".$topvisit[$id]."</td> \n"; 98 echo"<td class='tableau55g'> ".$toppage[$id]."</td></tr>\n"; 99 } 100 else 101 { 102 echo"<tr><td class='tableau330'> ".$month[$id]." </td>\n"; 103 echo"<td class='tableau330'>".$visit[$id]."</td>\n"; 104 echo"<td class='tableau330'>".$page[$id]."</td> \n"; 105 echo"<td class='tableau330g'> ".$topvisit[$id]."</td> \n"; 106 echo"<td class='tableau550g'> ".$toppage[$id]."</td></tr>\n"; 107 } 108 $comptligne++; 109 } 110 111 echo"</table></div><br>\n"; 112 } 113 else 114 { 115 echo"<h1>".$language['no-archive']."</h1><br>\n"; 116 } 117 118 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
| Généré le : Thu Sep 6 14:14:11 2007 | par Balluche grâce à PHPXref 0.7 |