tableName = 'error_404_logger'; $this->tableNameModx = $modx->getFullTableName($this->tableName); return $this->checkTable(); } // create table function createTable() { global $modx; $sql = "CREATE TABLE ".$this->tableNameModx." ( `id` int(10) unsigned NOT NULL auto_increment, `createdon` datetime NOT NULL, `ip` varchar(20) NOT NULL, `host` varchar(100) NOT NULL, `url` varchar(200) NOT NULL, `referer` varchar(200) NOT NULL, PRIMARY KEY (`id`) ) TYPE=MyISAM AUTO_INCREMENT=1 ;"; $res = $modx->db->query($sql); return $res; } // check if table exists and update version function checkTable() { global $modx; $query = mysql_query("DESC ".$this->tableNameModx); if(!$query) { return $this->createTable($this->tableNameModx); } else { $metaData = $modx->db->getTableMetaData($this->tableNameModx); // version 0.02 if ($metaData['referer'] == '') { $sql = 'ALTER TABLE '.$this->tableNameModx." ADD COLUMN `referer` varchar(200) NULL AFTER `host`"; return $res = $modx->db->query($sql); } } } // get top N queries for nonexistent pages function getTop($num = 0) { global $modx; $sql = "SELECT distinct(url), count(url) AS num FROM ".$this->tableNameModx." GROUP BY url ORDER BY num DESC "; if ($num != 0) { $sql .= "LIMIT ".$num; }; $res = $modx->dbQuery($sql); return $res; } // get all results function getAll() { global $modx; $res = $modx->dbQuery("SELECT * FROM ".$this->tableNameModx." ORDER BY createdon DESC"); return $res; } // add 404 query function insert($ip, $url, $referer) { global $modx; $modx->dbQuery("INSERT INTO ".$this->tableNameModx." (url, ip, host, referer, createdon) VALUES ('".$url."','".$ip."', '".gethostbyaddr($ip)."', '".$referer."', '".date('Y-m-d H:i:s',time())."')"); return $modx->db->getInsertId(); } // remove specific url from entries function remove($url) { global $modx; $url = urldecode($url); $modx->dbQuery("DELETE FROM ".$this->tableNameModx." WHERE url = '".$url."'"); return $modx->db->getAffectedRows(); } function clearAll() { global $modx; $modx->dbQuery("DELETE FROM ".$this->tableNameModx); return $modx->db->getAffectedRows(); } function clearLast($num) { global $modx; $datum = time() - $num * 3600 * 24 ; $modx->dbQuery("DELETE FROM ".$this->tableNameModx." WHERE UNIX_TIMESTAMP(createdon) < ".$datum); return $modx->db->getAffectedRows(); } } ?>
Fatal error: Class 'Error404Logger' not found in /var/www/vhosts/nettrekker.com/subdomains/mktg/httpdocs/manager/includes/document.parser.class.inc.php(969) : eval()'d code on line 17