This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 413 B |
@@ -1,11 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<module>
|
||||
<name>pagesnotfound</name>
|
||||
<displayName>Pages not found</displayName>
|
||||
<version>1</version>
|
||||
<description>Display the pages requested by your visitors but not found.</description>
|
||||
<author>PrestaShop</author>
|
||||
<tab>analytics_stats</tab>
|
||||
<is_configurable>0</is_configurable>
|
||||
<need_instance>1</need_instance>
|
||||
</module>
|
||||
@@ -1,21 +0,0 @@
|
||||
<?php
|
||||
|
||||
global $_MODULE;
|
||||
$_MODULE = array();
|
||||
$_MODULE['<{pagesnotfound}prestashop>pagesnotfound_251295238bdf7693252f2804c8d3707e'] = 'Nicht gefundene Seiten';
|
||||
$_MODULE['<{pagesnotfound}prestashop>pagesnotfound_3ae7050d9f8502e9b69448a6db73fab2'] = 'Anzeige der Seiten, die Besucher aufrufen wollten, aber nicht gefunden haben';
|
||||
$_MODULE['<{pagesnotfound}prestashop>pagesnotfound_50004bd606668bb842e80f51337b765d'] = 'Nicht gefundene Seiten geleert';
|
||||
$_MODULE['<{pagesnotfound}prestashop>pagesnotfound_6cb944288ac528fcfd76b20156dddce1'] = 'Sie müssen eine .htaccess-Datei benutzen, um 404-Fehler auf die Seit.php zu leiten';
|
||||
$_MODULE['<{pagesnotfound}prestashop>pagesnotfound_193cfc9be3b995831c6af2fea6650e60'] = 'Seite';
|
||||
$_MODULE['<{pagesnotfound}prestashop>pagesnotfound_b6f05e5ddde1ec63d992d61144452dfa'] = 'Referrer';
|
||||
$_MODULE['<{pagesnotfound}prestashop>pagesnotfound_64d129224a5377b63e9727479ec987d9'] = 'Counter';
|
||||
$_MODULE['<{pagesnotfound}prestashop>pagesnotfound_d372ffc9065cb7d2ea24df137927d060'] = 'Keine Seiten registriert';
|
||||
$_MODULE['<{pagesnotfound}prestashop>pagesnotfound_d8847bc418fc4f5a3e37c2e8390bb9ed'] = 'Leere Datenbank';
|
||||
$_MODULE['<{pagesnotfound}prestashop>pagesnotfound_254b5e94768b90388cc7002d362351f0'] = 'Leer KEINE Seiten gefunden';
|
||||
$_MODULE['<{pagesnotfound}prestashop>pagesnotfound_6602bbeb2956c035fb4cb5e844a4861b'] = 'Guide';
|
||||
$_MODULE['<{pagesnotfound}prestashop>pagesnotfound_3604249130acf7fda296e16edc996e5b'] = '404-Fehler';
|
||||
$_MODULE['<{pagesnotfound}prestashop>pagesnotfound_1c4e115caef0bed8f5ca76da1909f967'] = 'Fehler 404 ist ein HTTP-Fehlercode, der besagt, dass die durch den Benutzer angeforderte Datei nicht gefunden werden kann. In Ihrem Fall bedeutet es, dass einer Ihrer Besucher eine falsche URL-Adresse in das Adressfeld eingegeben hat oder dass Sie oder eine andere Webseite irgendwo einen toten Link haben. Wenn sie verfügbar ist, wird der Referrer angezeigt, so dass Sie die Seite finden können, die den toten Link enthält. Ansonsten bedeutet es meist, dass es ein Direktzugang ist, dass also jemand einen Link, den es nicht mehr gibt, mit einem Bookmark versehen hat.';
|
||||
$_MODULE['<{pagesnotfound}prestashop>pagesnotfound_a90083861c168ef985bf70763980aa60'] = 'Wie fängt man diese Fehler ab?';
|
||||
$_MODULE['<{pagesnotfound}prestashop>pagesnotfound_535ff57deda0b45d32cb37fd430accc8'] = 'Falls Ihr Provider die .htaccess-Datei unterstützt, können Sie sie im Root-Verzeichnis von PrestaShop erstellen und folgende Zeile einfügen:';
|
||||
$_MODULE['<{pagesnotfound}prestashop>pagesnotfound_9cfaa8e935f9e3e65b0959b15b070b15'] = 'Ein Benutzer, der eine Seite aufruft, die es nicht gibt, wird zur Seite weitergeleitet';
|
||||
$_MODULE['<{pagesnotfound}prestashop>pagesnotfound_feb436b0dabe28068aa6d866ac47bf0a'] = 'Dieses Modul protokolliert die Zugänge zu dieser Seite: die aufgerufene Seite, den Referrer und die Anzahl der Aufrufe.';
|
||||
@@ -1,4 +0,0 @@
|
||||
<?php
|
||||
|
||||
global $_MODULE;
|
||||
$_MODULE = array();
|
||||
@@ -1,21 +0,0 @@
|
||||
<?php
|
||||
|
||||
global $_MODULE;
|
||||
$_MODULE = array();
|
||||
$_MODULE['<{pagesnotfound}prestashop>pagesnotfound_251295238bdf7693252f2804c8d3707e'] = 'Página no encontrada';
|
||||
$_MODULE['<{pagesnotfound}prestashop>pagesnotfound_3ae7050d9f8502e9b69448a6db73fab2'] = 'Mostrar las páginas solicitadas por sus visitantes pero no encontradas';
|
||||
$_MODULE['<{pagesnotfound}prestashop>pagesnotfound_50004bd606668bb842e80f51337b765d'] = 'Páginas no encontradas suprimidas';
|
||||
$_MODULE['<{pagesnotfound}prestashop>pagesnotfound_6cb944288ac528fcfd76b20156dddce1'] = 'Usted debe utilizar un archivo .htaccess para volver a redirigir error 404 al \\\" de la página; 404.php\\\"';
|
||||
$_MODULE['<{pagesnotfound}prestashop>pagesnotfound_193cfc9be3b995831c6af2fea6650e60'] = 'Página';
|
||||
$_MODULE['<{pagesnotfound}prestashop>pagesnotfound_b6f05e5ddde1ec63d992d61144452dfa'] = 'Referente';
|
||||
$_MODULE['<{pagesnotfound}prestashop>pagesnotfound_64d129224a5377b63e9727479ec987d9'] = 'Contador';
|
||||
$_MODULE['<{pagesnotfound}prestashop>pagesnotfound_d372ffc9065cb7d2ea24df137927d060'] = 'Páginas no registradas';
|
||||
$_MODULE['<{pagesnotfound}prestashop>pagesnotfound_d8847bc418fc4f5a3e37c2e8390bb9ed'] = 'Suprimir';
|
||||
$_MODULE['<{pagesnotfound}prestashop>pagesnotfound_254b5e94768b90388cc7002d362351f0'] = 'Suprimir TODAS las páginas no encontradas';
|
||||
$_MODULE['<{pagesnotfound}prestashop>pagesnotfound_6602bbeb2956c035fb4cb5e844a4861b'] = 'Guía';
|
||||
$_MODULE['<{pagesnotfound}prestashop>pagesnotfound_3604249130acf7fda296e16edc996e5b'] = 'error 404';
|
||||
$_MODULE['<{pagesnotfound}prestashop>pagesnotfound_1c4e115caef0bed8f5ca76da1909f967'] = 'Error 404 es un código HTTP que significa que el archivo pedido por el usuario no se encuentra. En su caso esto significa que uno de sus visitantes introdujo una URL incorrecta en la barra de direcciones o que usted tiene un enlace roto en alguna parte. Cuando está disponible, el referente se muestra, así puede encontrar la página que contiene el enlace roto. Si no, significa generalmente que es un acceso directo que ya no existe.';
|
||||
$_MODULE['<{pagesnotfound}prestashop>pagesnotfound_a90083861c168ef985bf70763980aa60'] = '¿Como prevenir estos errores?';
|
||||
$_MODULE['<{pagesnotfound}prestashop>pagesnotfound_535ff57deda0b45d32cb37fd430accc8'] = 'Si su servidor soporta el archivo .htaccess, puede crear uno en el directorio raíz de PrestaShop e insertar la línea siguiente:';
|
||||
$_MODULE['<{pagesnotfound}prestashop>pagesnotfound_9cfaa8e935f9e3e65b0959b15b070b15'] = 'El usuario que busca una página que no existe será reenviado a la página';
|
||||
$_MODULE['<{pagesnotfound}prestashop>pagesnotfound_feb436b0dabe28068aa6d866ac47bf0a'] = 'Este módulo registra los accesos a esta página: la página requerida, la referencia y el número de veces que se visitó.';
|
||||
@@ -1,21 +0,0 @@
|
||||
<?php
|
||||
|
||||
global $_MODULE;
|
||||
$_MODULE = array();
|
||||
$_MODULE['<{pagesnotfound}prestashop>pagesnotfound_251295238bdf7693252f2804c8d3707e'] = 'Pages introuvables';
|
||||
$_MODULE['<{pagesnotfound}prestashop>pagesnotfound_3ae7050d9f8502e9b69448a6db73fab2'] = 'Affiche les pages demandées mais qui n\'existent pas';
|
||||
$_MODULE['<{pagesnotfound}prestashop>pagesnotfound_50004bd606668bb842e80f51337b765d'] = 'Pages introuvables supprimées';
|
||||
$_MODULE['<{pagesnotfound}prestashop>pagesnotfound_6cb944288ac528fcfd76b20156dddce1'] = 'Vous devez utiliser un fichier .htaccess redirigeant les erreurs 404 vers la page \"404.php\"';
|
||||
$_MODULE['<{pagesnotfound}prestashop>pagesnotfound_193cfc9be3b995831c6af2fea6650e60'] = 'Page';
|
||||
$_MODULE['<{pagesnotfound}prestashop>pagesnotfound_b6f05e5ddde1ec63d992d61144452dfa'] = 'Origine';
|
||||
$_MODULE['<{pagesnotfound}prestashop>pagesnotfound_64d129224a5377b63e9727479ec987d9'] = 'Compteur';
|
||||
$_MODULE['<{pagesnotfound}prestashop>pagesnotfound_d372ffc9065cb7d2ea24df137927d060'] = 'Aucune page enregistrée';
|
||||
$_MODULE['<{pagesnotfound}prestashop>pagesnotfound_d8847bc418fc4f5a3e37c2e8390bb9ed'] = 'Suppression';
|
||||
$_MODULE['<{pagesnotfound}prestashop>pagesnotfound_254b5e94768b90388cc7002d362351f0'] = 'Supprimer toutes les pages introuvables';
|
||||
$_MODULE['<{pagesnotfound}prestashop>pagesnotfound_6602bbeb2956c035fb4cb5e844a4861b'] = 'Guide';
|
||||
$_MODULE['<{pagesnotfound}prestashop>pagesnotfound_3604249130acf7fda296e16edc996e5b'] = 'Erreurs 404';
|
||||
$_MODULE['<{pagesnotfound}prestashop>pagesnotfound_1c4e115caef0bed8f5ca76da1909f967'] = 'Une erreur 404 est un code d\'erreur HTTP signifiant que le fichier demandé par l\'utilisateur est introuvable. Dans votre cas cela signifie qu\'un de vos visiteurs a tapé une mauvaise URL dans la barre d\'adresse ou que vous ou un autre site contient un lien mort quelque part. Quand elle est disponible, la page source est affichée afin de vous permettre de trouver ce lien mort. Dans le cas contraire, c\'est probablement un accès direct, ce qui peut également vouloir dire qu\'un utilisateur a mis en favoris une page qui n\'existe plus.';
|
||||
$_MODULE['<{pagesnotfound}prestashop>pagesnotfound_a90083861c168ef985bf70763980aa60'] = 'Comment attraper ces erreurs ?';
|
||||
$_MODULE['<{pagesnotfound}prestashop>pagesnotfound_535ff57deda0b45d32cb37fd430accc8'] = 'Si votre hébergeur supporte les fichiers .htaccess, vous pouvez en créer un à la racine de PrestaShop et insérer la ligne suivante :';
|
||||
$_MODULE['<{pagesnotfound}prestashop>pagesnotfound_9cfaa8e935f9e3e65b0959b15b070b15'] = 'Un utilisateur qui demande une page non existante sera redirigé vers la page';
|
||||
$_MODULE['<{pagesnotfound}prestashop>pagesnotfound_feb436b0dabe28068aa6d866ac47bf0a'] = 'Ce module enregistre les accès à cette page avec : la page demandée initialement, la page source et le nombre de fois que c\'est arrivé.';
|
||||
@@ -1,21 +0,0 @@
|
||||
<?php
|
||||
|
||||
global $_MODULE;
|
||||
$_MODULE = array();
|
||||
$_MODULE['<{pagesnotfound}prestashop>pagesnotfound_251295238bdf7693252f2804c8d3707e'] = 'Pagine non trovate';
|
||||
$_MODULE['<{pagesnotfound}prestashop>pagesnotfound_3ae7050d9f8502e9b69448a6db73fab2'] = 'Visualizza le pagine richieste dai visitatori ma non trovate';
|
||||
$_MODULE['<{pagesnotfound}prestashop>pagesnotfound_50004bd606668bb842e80f51337b765d'] = 'Pagine non trovate svuotate';
|
||||
$_MODULE['<{pagesnotfound}prestashop>pagesnotfound_6cb944288ac528fcfd76b20156dddce1'] = 'È necessario utilizzare un file. Htaccess per reindirizzare gli errori 404 alla pagina \"404.php\"';
|
||||
$_MODULE['<{pagesnotfound}prestashop>pagesnotfound_193cfc9be3b995831c6af2fea6650e60'] = 'Pagina';
|
||||
$_MODULE['<{pagesnotfound}prestashop>pagesnotfound_b6f05e5ddde1ec63d992d61144452dfa'] = 'Referente';
|
||||
$_MODULE['<{pagesnotfound}prestashop>pagesnotfound_64d129224a5377b63e9727479ec987d9'] = 'Contatore';
|
||||
$_MODULE['<{pagesnotfound}prestashop>pagesnotfound_d372ffc9065cb7d2ea24df137927d060'] = 'Nessuna pagina registrata';
|
||||
$_MODULE['<{pagesnotfound}prestashop>pagesnotfound_d8847bc418fc4f5a3e37c2e8390bb9ed'] = 'database vuoto';
|
||||
$_MODULE['<{pagesnotfound}prestashop>pagesnotfound_254b5e94768b90388cc7002d362351f0'] = 'Elimina TUTTE le pagine non trovate';
|
||||
$_MODULE['<{pagesnotfound}prestashop>pagesnotfound_6602bbeb2956c035fb4cb5e844a4861b'] = 'Guida';
|
||||
$_MODULE['<{pagesnotfound}prestashop>pagesnotfound_3604249130acf7fda296e16edc996e5b'] = 'errori 404 ';
|
||||
$_MODULE['<{pagesnotfound}prestashop>pagesnotfound_1c4e115caef0bed8f5ca76da1909f967'] = 'Un errore 404 è un codice di errore HTTP che significa che il file richiesto dall\'utente non può essere trovato. Nel tuo caso significa che uno dei tuoi visitatori ha inserito un URL sbagliato nella barra degli indirizzi o che tu o un altro sito web ha un link morto da qualche parte. Quando è disponibile, il referente è mostrato in modo da poter trovare la pagina che contiene il link morti. Altrimenti in genere significa che si tratta di un accesso diretto, così forse qualcuno ha segnato un link che non esiste più.';
|
||||
$_MODULE['<{pagesnotfound}prestashop>pagesnotfound_a90083861c168ef985bf70763980aa60'] = 'Come individuare questi errori?';
|
||||
$_MODULE['<{pagesnotfound}prestashop>pagesnotfound_535ff57deda0b45d32cb37fd430accc8'] = 'Se il tuo provider supporta il file htaccess, è possibile crearlo nella directory principale di PrestaShop e inserirvi dentro la seguente riga:';
|
||||
$_MODULE['<{pagesnotfound}prestashop>pagesnotfound_9cfaa8e935f9e3e65b0959b15b070b15'] = 'Un utente che richiede una pagina che non esiste verrà reindirizzato alla pagina';
|
||||
$_MODULE['<{pagesnotfound}prestashop>pagesnotfound_feb436b0dabe28068aa6d866ac47bf0a'] = 'Questo modulo registra gli accessi a questa pagina: la pagina richiesta, la provenienza e il numero di volte che si è verificato.';
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 898 B |
@@ -1,166 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2011 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2011 PrestaShop SA
|
||||
* @version Release: $Revision: 1.4 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
if (!defined('_CAN_LOAD_FILES_'))
|
||||
exit;
|
||||
|
||||
class Pagesnotfound extends Module
|
||||
{
|
||||
private $_html = '';
|
||||
|
||||
function __construct()
|
||||
{
|
||||
$this->name = 'pagesnotfound';
|
||||
$this->tab = 'analytics_stats';
|
||||
$this->version = 1.0;
|
||||
$this->author = 'PrestaShop';
|
||||
|
||||
parent::__construct();
|
||||
|
||||
$this->displayName = $this->l('Pages not found');
|
||||
$this->description = $this->l('Display the pages requested by your visitors but not found.');
|
||||
}
|
||||
|
||||
function install()
|
||||
{
|
||||
if (!parent::install() OR !$this->registerHook('top') OR !$this->registerHook('AdminStatsModules'))
|
||||
return false;
|
||||
return Db::getInstance()->Execute('
|
||||
CREATE TABLE `'._DB_PREFIX_.'pagenotfound` (
|
||||
id_pagenotfound INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
request_uri VARCHAR(256) NOT NULL,
|
||||
http_referer VARCHAR(256) NOT NULL,
|
||||
date_add DATETIME NOT NULL,
|
||||
PRIMARY KEY(id_pagenotfound),
|
||||
INDEX (`date_add`)
|
||||
) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8;');
|
||||
}
|
||||
|
||||
function uninstall()
|
||||
{
|
||||
return (parent::uninstall() AND Db::getInstance()->Execute('DROP TABLE `'._DB_PREFIX_.'pagenotfound`'));
|
||||
}
|
||||
|
||||
private function getPages()
|
||||
{
|
||||
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS('
|
||||
SELECT http_referer, request_uri, COUNT(*) as nb
|
||||
FROM `'._DB_PREFIX_.'pagenotfound` p
|
||||
WHERE p.date_add BETWEEN '.ModuleGraph::getDateBetween().'
|
||||
GROUP BY http_referer, request_uri');
|
||||
|
||||
$pages = array();
|
||||
foreach ($result as $row)
|
||||
{
|
||||
$row['http_referer'] = parse_url($row['http_referer'], PHP_URL_HOST).parse_url($row['http_referer'], PHP_URL_PATH);
|
||||
if (!isset($row['http_referer']) OR empty($row['http_referer']))
|
||||
$row['http_referer'] = '--';
|
||||
if (!isset($pages[$row['request_uri']]))
|
||||
$pages[$row['request_uri']] = array('nb' => 0);
|
||||
$pages[$row['request_uri']][$row['http_referer']] = $row['nb'];
|
||||
$pages[$row['request_uri']]['nb'] += $row['nb'];
|
||||
}
|
||||
uasort($pages, 'pnfSort');
|
||||
return $pages;
|
||||
}
|
||||
|
||||
function hookAdminStatsModules()
|
||||
{
|
||||
if (Tools::isSubmit('submitTruncatePNF'))
|
||||
{
|
||||
Db::getInstance()->Execute('TRUNCATE `'._DB_PREFIX_.'pagenotfound`');
|
||||
$this->_html .= '<div class="conf confirm"><img src="../img/admin/ok.gif" /> '.$this->l('Pages not found has been emptied.').'</div>';
|
||||
}
|
||||
|
||||
$this->_html .= '<fieldset class="width3"><legend><img src="../modules/'.$this->name.'/logo.gif" /> '.$this->displayName.'</legend>';
|
||||
if (!file_exists(dirname(__FILE__).'/../../.htaccess'))
|
||||
$this->_html .= '<div class="warning warn">'.$this->l('You <b>must</b> use a .htaccess file to redirect 404 errors to the page "404.php"').'</div>';
|
||||
|
||||
$pages = $this->getPages();
|
||||
if (sizeof($pages))
|
||||
{
|
||||
$this->_html .= '
|
||||
<table class="table" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<th width="200">'.$this->l('Page').'</th>
|
||||
<th width="500">'.$this->l('Referrer').'</th>
|
||||
<th>'.$this->l('Counter').'</th>
|
||||
</tr>';
|
||||
foreach ($pages as $ru => $hrs)
|
||||
foreach ($hrs as $hr => $counter)
|
||||
if ($hr != 'nb')
|
||||
$this->_html .= '
|
||||
<tr>
|
||||
<td><a href="'.$ru.'-admin404">'.wordwrap($ru, 30, '<br />', true).'</a></td>
|
||||
<td><a href="'.Tools::getProtocol().$hr.'">'.wordwrap($hr, 40, '<br />', true).'</a></td>
|
||||
<td align="right">'.$counter.'</td>
|
||||
</tr>';
|
||||
$this->_html .= '
|
||||
</table>';
|
||||
}
|
||||
else
|
||||
$this->_html .= '<div class="conf confirm"><img src="../img/admin/ok.gif" /> '.$this->l('No pages registered').'</div>';
|
||||
|
||||
$this->_html .= '</fieldset>';
|
||||
if (sizeof($pages))
|
||||
$this->_html .= '<div class="clear"> </div>
|
||||
<fieldset class="width3"><legend><img src="../img/admin/delete.gif" /> '.$this->l('Empty database').'</legend>
|
||||
<form action="'.Tools::htmlEntitiesUtf8($_SERVER['REQUEST_URI']).'" method="post"><input type="submit" class="button" name="submitTruncatePNF" value="'.$this->l('Empty ALL pages not found').'"></form>
|
||||
</fieldset>';
|
||||
$this->_html .= '<div class="clear"> </div>
|
||||
<fieldset class="width3"><legend><img src="../img/admin/comment.gif" /> '.$this->l('Guide').'</legend>
|
||||
<h2>'.$this->l('404 errors').'</h2>
|
||||
<p>'.$this->l('A 404 error is an HTTP error code which means that the file requested by the user cannot be found. In your case it means that one of your visitors entered a wrong URL in the address bar or that you or another website has a dead link. When it is available, the referrer is shown so you can find the page which contains the dead link. If not, it means generally that it is a direct access, so someone may have bookmarked a link which doesn\'t exist anymore.').'</p>
|
||||
<h3>'.$this->l('How to catch these errors?').'</h3>
|
||||
<p>'.$this->l('If your webhost supports the <i>.htaccess</i> file, you can create it in the root directory of PrestaShop and insert the following line inside:').' <i>ErrorDocument 404 '.__PS_BASE_URI__.'404.php</i>. '.$this->l('A user requesting a page which doesn\'t exist will be redirected to the page.').' <i>'.__PS_BASE_URI__.'404.php</i>. '.$this->l('This module logs the accesses to this page: the page requested, the referrer and the number of times that it occurred.').'</p><br />
|
||||
</fieldset>';
|
||||
|
||||
return $this->_html;
|
||||
}
|
||||
|
||||
function hookTop($params)
|
||||
{
|
||||
if (strstr($_SERVER['REQUEST_URI'], '404.php') AND isset($_SERVER['REDIRECT_URL']))
|
||||
$_SERVER['REQUEST_URI'] = $_SERVER['REDIRECT_URL'];
|
||||
if (!Validate::isUrl($request_uri = $_SERVER['REQUEST_URI']) OR strstr($_SERVER['REQUEST_URI'], '-admin404'))
|
||||
return;
|
||||
if (strstr($_SERVER['PHP_SELF'], '404.php') AND !strstr($_SERVER['REQUEST_URI'], '404.php'))
|
||||
{
|
||||
$http_referer = isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '';
|
||||
if (empty($http_referer) OR Validate::isAbsoluteUrl($http_referer))
|
||||
Db::getInstance()->Execute('INSERT INTO `'._DB_PREFIX_.'pagenotfound` (`request_uri`,`http_referer`,`date_add`) VALUES (\''.pSQL($request_uri).'\',\''.pSQL($http_referer).'\',NOW())');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function pnfSort($a, $b) {
|
||||
if ($a['nb'] == $b['nb'])
|
||||
return 0;
|
||||
return ($a['nb'] > $b['nb']) ? -1 : 1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user