diff options
Diffstat (limited to 'stats.php')
| -rw-r--r-- | stats.php | 121 |
1 files changed, 61 insertions, 60 deletions
| @@ -16,75 +16,76 @@ catch (Exception $e) | |||
| 16 | <link rel="shortcut icon" type="image/x-icon" href="images/favicon.ico" /> | 16 | <link rel="shortcut icon" type="image/x-icon" href="images/favicon.ico" /> |
| 17 | <link rel="icon" type="image/png" href="images/favicon.png" > | 17 | <link rel="icon" type="image/png" href="images/favicon.png" > |
| 18 | <link rel="stylesheet" href="ordipolo.css" /> | 18 | <link rel="stylesheet" href="ordipolo.css" /> |
| 19 | <meta name="robots" content="noindex" > | 19 | <meta name="robots" content="noindex" > <!-- refuser l'indexation --> |
| 20 | <style> | 20 | <style> |
| 21 | th, td | 21 | th, td |
| 22 | { | 22 | { |
| 23 | padding: 2px; | 23 | padding: 2px; |
| 24 | border-collapse: collapse; | 24 | border-collapse: collapse; |
| 25 | font-size: 85%; | 25 | font-size: 85%; |
| 26 | } | 26 | } |
| 27 | .user_agent | 27 | .user_agent |
| 28 | { | 28 | { |
| 29 | min-width: 500px; | 29 | min-width: 500px; |
| 30 | } | 30 | } |
| 31 | </style> | 31 | </style> |
| 32 | </head> | 32 | </head> |
| 33 | 33 | ||
| 34 | <body> | 34 | <body> |
| 35 | <div id="bloc_page" > | 35 | <div id="bloc_page" > |
| 36 | <header> | 36 | <header> |
| 37 | <?php $actuelle = ""; ?> | 37 | <?php $actuelle = ""; ?> |
| 38 | <?php include ("menu.php"); ?> | 38 | <?php include ("menu.php"); ?> |
| 39 | 39 | ||
| 40 | <p><a href="index.php" > | 40 | <p><a href="index.php" > |
| 41 | <img id="logohaut" src="images/logo.png" alt="ordipolo" /> | 41 | <img id="logohaut" src="images/logo.png" alt="ordipolo" /> |
| 42 | <img id="logotitre" src="images/ordipolo.png" alt="ordipolo" /></a></p> | 42 | <img id="logotitre" src="images/ordipolo.png" alt="ordipolo" /> |
| 43 | </a></p> | ||
| 43 | </header> | 44 | </header> |
| 44 | <!-- compteur --> | 45 | |
| 45 | <table border="1" > | 46 | <table border="1" > |
| 46 | <caption>Compteur de visites</caption> | 47 | <caption>Compteur de visites</caption> |
| 47 | <tr> | 48 | <tr> |
| 48 | <th>Visiteurs</th> | 49 | <th>Visiteurs</th> |
| 49 | <!-- <th>Bots</th> --> | 50 | <!-- <th>Bots</th> --> |
| 50 | </tr> | 51 | </tr> |
| 51 | <tr> | 52 | <tr> |
| 52 | <?php | 53 | <?php |
| 53 | $reponse = $base->query('SELECT visiteurs FROM compteur'); | 54 | $reponse = $base->query('SELECT visiteurs FROM compteur'); |
| 54 | $nombre = $reponse->fetch(); | 55 | $nombre = $reponse->fetch(); |
| 55 | echo ('<td>' . $nombre['visiteurs'] . '</td>'); | 56 | echo ('<td>' . $nombre['visiteurs'] . '</td>'); |
| 56 | 57 | ||
| 57 | //~ $reponse = $base->query('SELECT bots FROM compteur'); | 58 | //~ $reponse = $base->query('SELECT bots FROM compteur'); |
| 58 | //~ $nombre = $reponse->fetch(); | 59 | //~ $nombre = $reponse->fetch(); |
| 59 | //~ echo ('<td>' . $nombre['bots'] . '</td>'); | 60 | //~ echo ('<td>' . $nombre['bots'] . '</td>'); |
| 60 | ?> | 61 | ?> |
| 61 | </tr> | 62 | </tr> |
| 62 | </table> | 63 | </table> |
| 63 | 64 | ||
| 64 | <!-- détail des enregistrements --> | 65 | <!-- détail des enregistrements --> |
| 65 | <table border="1" > | 66 | <table border="1" > |
| 66 | <caption><br/>Visiteurs</caption> | 67 | <caption><br/>Visiteurs</caption> |
| 67 | 68 | ||
| 68 | <tr> | 69 | <tr> |
| 69 | <th>IP</th> | 70 | <th>IP</th> |
| 70 | <th>Hôte</th> | 71 | <th>Hôte</th> |
| 71 | <th class="user_agent">User_agent</th> | 72 | <th class="user_agent">User_agent</th> |
| 72 | <th>Date</th> | 73 | <th>Date</th> |
| 73 | <th>Nombre de pages</th> | 74 | <th>Nombre de pages</th> |
| 74 | </tr> | 75 | </tr> |
| 75 | 76 | ||
| 76 | <?php | 77 | <?php |
| 77 | $reponse = $base->query('SELECT ip, hote, user_agent, DATE_FORMAT(date, \'%d/%m/%Y\') AS date_, nb_pages FROM visites'); | 78 | $reponse = $base->query('SELECT ip, hote, user_agent, DATE_FORMAT(date, \'%d/%m/%Y\') AS date_, nb_pages FROM visites'); |
| 78 | while ($donnees = $reponse->fetch()) | 79 | while ($donnees = $reponse->fetch()) |
| 79 | { | 80 | { |
| 80 | echo ('<tr><td>' . $donnees['ip'] . '</td>'); | 81 | echo ('<tr><td>' . $donnees['ip'] . '</td>'); |
| 81 | echo ('<td>' . $donnees['hote'] . '</td>'); | 82 | echo ('<td>' . $donnees['hote'] . '</td>'); |
| 82 | echo ('<td class="user_agent">' . $donnees['user_agent'] . '</td>'); | 83 | echo ('<td class="user_agent">' . $donnees['user_agent'] . '</td>'); |
| 83 | echo ('<td>' . $donnees['date_'] . '</td>'); | 84 | echo ('<td>' . $donnees['date_'] . '</td>'); |
| 84 | echo ('<td>' . $donnees['nb_pages'] . '</td></tr>'); | 85 | echo ('<td>' . $donnees['nb_pages'] . '</td></tr>'); |
| 85 | } | 86 | } |
| 86 | ?> | 87 | ?> |
| 87 | </table> | 88 | </table> |
| 88 | </div> | 89 | </div> |
| 89 | <body> | 90 | <body> |
| 90 | </html> | 91 | </html> |
