aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_admin.php
diff options
context:
space:
mode:
authorPaul S. Owen <psotfx@users.sourceforge.net>2004-02-08 14:27:59 +0000
committerPaul S. Owen <psotfx@users.sourceforge.net>2004-02-08 14:27:59 +0000
commitec65e70c4afdd3811f3769239b7d61600caae9f5 (patch)
treec48d461c2e0ff11e0145c41999a5254e15f4ace9 /phpBB/includes/functions_admin.php
parentf8c9d3fbd5aeab900d6de39f06501a22bf7aadb1 (diff)
downloadforums-ec65e70c4afdd3811f3769239b7d61600caae9f5.tar
forums-ec65e70c4afdd3811f3769239b7d61600caae9f5.tar.gz
forums-ec65e70c4afdd3811f3769239b7d61600caae9f5.tar.bz2
forums-ec65e70c4afdd3811f3769239b7d61600caae9f5.tar.xz
forums-ec65e70c4afdd3811f3769239b7d61600caae9f5.zip
Move ipwhois ... it's used exclusively for "user" activities, makes more sense there
git-svn-id: file:///svn/phpbb/trunk@4813 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions_admin.php')
-rw-r--r--phpBB/includes/functions_admin.php48
1 files changed, 4 insertions, 44 deletions
diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php
index c1a7069533..609ea7938a 100644
--- a/phpBB/includes/functions_admin.php
+++ b/phpBB/includes/functions_admin.php
@@ -22,6 +22,7 @@ function make_forum_select($select_id = false, $ignore_id = false, $ignore_acl =
$right = $cat_right = 0;
$forum_list = $padding = $holding = '';
$padding_store = array('0' => '');
+
foreach ($rowset as $row)
{
if ((is_array($ignore_id) && in_array($row['forum_id'], $ignore_id)) ||
@@ -105,6 +106,7 @@ function get_forum_list($acl_list = 'f_list', $id_only = TRUE, $postable_only =
FROM ' . FORUMS_TABLE . '
ORDER BY left_id ASC';
$result = $db->sql_query($sql, $expire_time);
+
while ($row = $db->sql_fetchrow($result))
{
$forum_rows[] = $row;
@@ -204,49 +206,6 @@ function filelist($rootdir, $dir = '', $type = 'gif|jpg|jpeg|png')
return $matches;
}
-// Whois facility
-function ipwhois($ip)
-{
- $ipwhois = '';
-
- $match = array(
- '#RIPE\.NET#is' => 'whois.ripe.net',
- '#whois\.apnic\.net#is' => 'whois.apnic.net',
- '#nic\.ad\.jp#is' => 'whois.nic.ad.jp',
- '#whois\.registro\.br#is' => 'whois.registro.br'
- );
-
- if (($fsk = @fsockopen('whois.arin.net', 43)))
- {
- fputs($fsk, "$ip\n");
- while (!feof($fsk))
- {
- $ipwhois .= fgets($fsk, 1024);
- }
- @fclose($fsk);
- }
-
- foreach (array_keys($match) as $server)
- {
- if (preg_match($server, $ipwhois))
- {
- $ipwhois = '';
- if (($fsk = @fsockopen($match[$server], 43)))
- {
- fputs($fsk, "$ip\n");
- while (!feof($fsk))
- {
- $ipwhois .= fgets($fsk, 1024);
- }
- @fclose($fsk);
- }
- break;
- }
- }
-
- return $ipwhois;
-}
-
// Posts and topics manipulation
function move_topics($topic_ids, $forum_id, $auto_sync = TRUE)
{
@@ -451,8 +410,8 @@ function delete_posts($where_type, $where_ids, $auto_sync = TRUE)
$sql = 'SELECT post_id, topic_id, forum_id
FROM ' . POSTS_TABLE . "
WHERE $where_type " . ((!is_array($where_ids)) ? "= $where_ids" : 'IN (' . implode(', ', $where_ids) . ')');
-
$result = $db->sql_query($sql);
+
while ($row = $db->sql_fetchrow($result))
{
$post_ids[] = $row['post_id'];
@@ -470,6 +429,7 @@ function delete_posts($where_type, $where_ids, $auto_sync = TRUE)
$db->sql_transaction('begin');
$table_ary = array(POSTS_TABLE, RATINGS_TABLE, REPORTS_TABLE, SEARCH_MATCH_TABLE);
+
foreach ($table_ary as $table)
{
$sql = "DELETE FROM $table