Hack list
Verfasst: 08.09.2003 01:35
Hi
ich habe mir den MOD Hacks list instaliert nur wenn ich im ACP
auf den link gehe bekomme ich volgende Fehlermeldung
Die Tabellen in der DB sind aber vorhanden.
Hier mal der Code der functions_hacks_list.php bis ca zeile 60
vieleicht findet einer einen Fehler.
ich habe mir den MOD Hacks list instaliert nur wenn ich im ACP
auf den link gehe bekomme ich volgende Fehlermeldung
Code: Alles auswählen
Error querying the Hacks List Table.
DEBUG MODE
SQL Error : 1146 Table 'usr_pd40157_1.hacks_list_table' doesn't exist
SELECT * FROM HACKS_LIST_TABLE
Line : 46
File : G:\minixampp\htdocs\phpBB2\includes\functions_hacks_list.php
Hier mal der Code der functions_hacks_list.php bis ca zeile 60
vieleicht findet einer einen Fehler.
Code: Alles auswählen
<?php
/***************************************************************************
* $RCSfile: functions_hacks_list.php,v $
* -------------------
* copyright : (C) 2003 Nivisec.com
* email : support@nivisec.com
*
* $Id: functions_hacks_list.php,v 1.1 2003/07/10 16:50:23 nivisec Exp $
*
*
***************************************************************************/
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/
if (!defined('IN_PHPBB'))
{
die('Hacking attempt');
}
/****************************************************************************
/** Constants and Main Vars.
/***************************************************************************/
/* Sub-dir to scan for .hl files. Notice the trailing /!!! */
define('HL_DIR', 'hl/');
/* This will turn all author e-mails into a cryptic item; for example
user@domain.ext => user at domain dot ext */
define('USE_CRYPTIC_EMAIL', true);
/* Setting this to true will print out TONS debug information I use */
define('DEBUG_THIS_MOD', false);
$hl_cache_list = array();
function setup_hacks_list_array()
{
global $db, $lang, $hl_cache_list;
$sql = 'SELECT * FROM ' . HACKS_LIST_TABLE;
if(!$result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, $lang['Error_Hacks_List_Table'], '', __LINE__, __FILE__, $sql);
}
$i = 0;
while ($row = $db->sql_fetchrow($result))
{
$hl_cache_list[$row['hack_file']] = $row;
}
}
function cryptize_hl_email($email)
{
$cr_email = preg_replace("/@/", " at ", $email);
$cr_email = preg_replace("/\./", " dot ", $cr_email);
return $cr_email;
}
function scan_hl_files()
{
global $board_config, $lang, $hl_cache_list, $phpbb_root_path;
if (DEBUG_THIS_MOD) $board_config['hacks_list_hl_dir'] = 'hl/';
//The list of dirs to scan. By default this is the main phpbb root
// path and the dir set in the options.
$scan_dir_list = array(
$phpbb_root_path,
$phpbb_root_path . HL_DIR
);
foreach($scan_dir_list as $dir_item)
{
$dir_handle = opendir($dir_item);
while (false !== ($file = readdir($dir_handle)))
{
if (substr($file, -3, 3) == '.hl')
{
if (DEBUG_THIS_MOD) print "<font color=\"red\">DEBUG - HL File Found: $file<br></font>";
if (!isset($hl_cache_list[$dir_item.$file]) || $hl_cache_list[$dir_item.$file]['hack_file_mtime'] != filemtime($dir_item.$file))
{
update_hl_file_cache($dir_item.$file);
}
}
}
closedir($dir_handle);
}
}
function update_hl_file_cache($filename)
{
global $db, $lang, $hl_cache_list;
if (DEBUG_THIS_MOD) print "<font color=\"blue\">DEBUG - Updating File Cache: $filename<br></font>";
if (file_exists($filename))
{
//Open up the file and read in the data to send to the parse function
// in an array for each newline
$parsed_array = parse_hl_file(@file($filename));
$parsed_array['hack_file'] = $filename;
$parsed_array['hack_file_mtime'] = filemtime($filename);
//Make the sql replace command
$sql_1 = '';
$sql_2 = '';
foreach ($parsed_array as $key => $val)
{
if ($sql_1 != '') $sql_1 .= ', ';
if ($sql_2 != '') $sql_2 .= ', ';
$sql_1 .= $key;
//Version is also considered numeric here, but we don't want it to be!
$sql_2 .= (is_numeric($val) && $key != 'hack_version') ? $val : "'".addslashes($val)."'";
}
$sql = 'REPLACE INTO ' . HACKS_LIST_TABLE . " ($sql_1) VALUES ($sql_2)";
if(!$db->sql_query($sql))
{
message_die(GENERAL_ERROR, $lang['Error_Hacks_List_Table'], '', __LINE__, __FILE__, $