للعطاء أفضل و وثقة كاملة حذف Ip كل مستخدم من قاعدة البيانات

tvt

عضو فعال
سلام عليكم

أخواني أتمنى تطبق هذا الكود على منتدانا المحبوب
PHP:
editpost.php
Search:
 
     post.*, post.username AS postusername, post.ipaddress AS ip, IF(post.visible = 2, 1, 0) AS isdeleted,
=========
Replace:
=========
     post.*, post.username AS postusername, IF(post.visible = 2, 1, 0) AS isdeleted,
=========
inlinemod.php
Search:
=========
  REPLACE INTO " . TABLE_PREFIX . "search (userid, showposts, ipaddress, personal, forumchoice, sortby, sortorder, searchtime, orderedids, announceids, dateline, displayterms, searchhash)
=========
Replace:
=========
  REPLACE INTO " . TABLE_PREFIX . "search (userid, showposts, personal, forumchoice, sortby, sortorder, searchtime, orderedids, announceids, dateline, displayterms, searchhash)
=========
 
Search:
=========
  VALUES (" . $vbulletin->userinfo['userid'] . ", 0, '" . $db->escape_string(IPADDRESS) . "', 1, '', '', 'DESC', '', '" . $db->escape_string($threadids) . "', '', " . TIMENOW . ", '" . $db->escape_string(serialize($display)) . "', '')
=========
Replace:
=========
  VALUES (" . $vbulletin->userinfo['userid'] . ", 0, 1, '', '', 'DESC', '', '" . $db->escape_string($threadids) . "', '', " . TIMENOW . ", '" . $db->escape_string(serialize($display)) . "', '')
=========
 
Search:
=========
  REPLACE INTO " . TABLE_PREFIX . "search (userid, showposts, ipaddress, personal, forumchoice, sortby, sortorder, searchtime, orderedids, announceids, dateline, displayterms, searchhash)
=========
Replace:
=========
  REPLACE INTO " . TABLE_PREFIX . "search (userid, showposts, personal, forumchoice, sortby, sortorder, searchtime, orderedids, announceids, dateline, displayterms, searchhash)
=========
 
Search:
=========
  VALUES (" . $vbulletin->userinfo['userid'] . ", 1, '" . $db->escape_string(IPADDRESS) . "', 1, '', '', 'DESC', '', '" . $db->escape_string($postids) . "', '', " . TIMENOW . ", '" . $db->escape_string(serialize($display)) . "', '')
=========
Replace:
=========
  VALUES (" . $vbulletin->userinfo['userid'] . ", 1, 1, '', '', 'DESC', '', '" . $db->escape_string($postids) . "', '', " . TIMENOW . ", '" . $db->escape_string(serialize($display)) . "', '')
=========
 
Search:
=========
  SELECT threadrateid, threadid, userid, vote, ipaddress
=========
Replace:
=========
  SELECT threadrateid, threadid, userid, vote
=========
 
Search:
=========
  $id = (!empty($rating['userid'])) ? $rating['userid'] : $rating['ipaddress'];
=========
Replace:
=========
  $id = $rating['userid'];
=========
 
Search and delete:
=========
    $ipaddress = '';
=========
 
Search and delete:
=========
    $ipaddress = $id;
=========
 
Search:
=========
   $sql[] = "($destthread[threadid], $userid, $vote, '" . $db->escape_string($ipaddress) . "')";
=========
Replace:
=========
   $sql[] = "($destthread[threadid], $userid, $vote)";
=========
 
Search:
=========
     (threadid, userid, vote, ipaddress)
=========
Replace:
=========
     (threadid, userid, vote)
=========
 
Search and delete:
=========
 $new_ip = false;
=========
 
Search:
=========
   post.userid, post.ipaddress,
=========
Replace:
=========
   post.userid,
=========
 
Search and delete:
=========
   if ($new_ip === false)
   {
    // update IP to one of the IPs used by the person who will own the new post
    $new_ip = $post['ipaddress'];
   }
=========
 
Search and delete:
=========
  $new_ip = $destpost['ipaddress'];
=========
 
Search and delete:
=========
 $postman->set('ipaddress', $new_ip);
=========
 
newreply.php
Search and delete:
=========
 'postbit_ip',
=========
 
Search:
=========
    post.*, post.username AS postusername, post.ipaddress AS ip, IF(post.visible = 2, 1, 0) AS isdeleted,
=========
Replace:
=========
    post.*, post.username AS postusername, IF(post.visible = 2, 1, 0) AS isdeleted,
=========
 
online.php
Search and delete:
=========
// pre-cache templates used by specific actions
$actiontemplates = array(
 'resolveip' => array(
  'whosonline_resolveip'
 )
);
=========
 
Search and delete:
=========
// #######################################################################
// resolve an IP in Who's Online (this uses the WOL permissions)
if ($_REQUEST['do'] == 'resolveip')
{
 $vbulletin->input->clean_array_gpc('r', array(
  'ipaddress' => TYPE_NOHTML,
  'ajax'      => TYPE_BOOL
 ));
 // can we actually resolve this?
 if (!($permissions['wolpermissions'] & $vbulletin->bf_ugp_wolpermissions['canwhosonlineip']))
 {
  print_no_permission();
 }
 $resolved_host = htmlspecialchars_uni(@gethostbyaddr($vbulletin->GPC['ipaddress']));
 $ipaddress =& $vbulletin->GPC['ipaddress']; // no html'd already
 if ($vbulletin->GPC['ajax'])
 {
  if (empty($resolved_host))
  {
   $resolved_host = $ipaddress;
  }
  require_once(DIR . '/includes/class_xml.php');
  $xml = new vB_AJAX_XML_Builder($vbulletin, 'text/xml');
  $xml->add_tag('ipaddress', $resolved_host, array('original' => $ipaddress));
  $xml->print_xml();
 }
 else
 {
  $navbits = construct_navbits(array(
   'online.php' . $vbulletin->session->vars['sessionurl_q'] => $vbphrase['whos_online'],
   '' => $vbphrase['resolve_ip_address']
  ));
  eval('$navbar = "' . fetch_template('navbar') . '";');
  eval('print_output("' . fetch_template('whosonline_resolveip') . '");');
 }
 exit;
}
=========
 
Search and delete:
=========
 case 'host':
  $sqlsort = 'session.host';
=========
 
Search:
=========
 SELECT user.username, session.useragent, session.location, session.lastactivity, user.userid, user.options, session.host, session.badlocation, session.incalendar, user.aim, user.icq, user.msn, user.yahoo, user.skype,
=========
Replace:
=========
 SELECT user.username, session.useragent, session.location, session.lastactivity, user.userid, user.options, session.badlocation, session.incalendar, user.aim, user.icq, user.msn, user.yahoo, user.skype,
=========
 
Search and delete:
=========
   if ($vbulletin->options['WOLresolve'] AND ($permissions['wolpermissions'] & $vbulletin->bf_ugp_wolpermissions['canwhosonlineip']))
   {
    $userinfo["$key"]['host'] = @gethostbyaddr($users['host']);
   }
=========
 
Search:
=========
     $ourip = ip2long($users['host']);
=========
Replace:
=========
     $ourip = ip2long("127.0.0.1");
=========
 
Search and delete:
=========
  if ($vbulletin->options['WOLresolve'] AND ($permissions['wolpermissions'] & $vbulletin->bf_ugp_wolpermissions['canwhosonlineip']))
  {
   $guests["$count"]['host'] = @gethostbyaddr($users['host']);
  }
=========
 
Search and delete:
=========
 $userinfo["{$vbulletin->userinfo['userid']}"]['host'] = IPADDRESS;
=========
 
Search and delete:
=========
 if ($vbulletin->options['WOLresolve'] AND ($permissions['wolpermissions'] & $vbulletin->bf_ugp_wolpermissions['canwhosonlineip']))
 {
  $userinfo["{$vbulletin->userinfo['userid']}"]['host'] = @gethostbyaddr($userinfo["{$vbulletin->userinfo['userid']}"]['host']);
 }
=========
 
Search and delete:
=========
$show['ip'] = iif($permissions['wolpermissions'] & $vbulletin->bf_ugp_wolpermissions['canwhosonlineip'], true, false);
$show['ajax_resolve'] = ($show['ip'] AND !$vbulletin->options['WOLresolve']);
$show['useragent'] = iif($vbulletin->GPC['ua'], true, false);
=========
 
Search and delete:
=========
if ($permissions['wolpermissions'] & $vbulletin->bf_ugp_wolpermissions['canwhosonlineip'])
{
 $onlinecolspan++;
 exec_switch_bg();
 $ipclass = $bgclass;
}
=========
Search and delete:
=========
$colspan = iif($show['ip'], $colspan + 1, $colspan);
=========
 
 
postings.php
Search and delete:
=========
 case 'getip':
  break;
=========
 
Search and delete:
=========
// ############################### start retrieve ip ###############################
if ($_REQUEST['do'] == 'getip')
{
 $vbulletin->input->clean_array_gpc('r', array(
  'ip' => TYPE_NOHTML
 ));
 // check moderator permissions for getting ip
 if (!can_moderate($threadinfo['forumid'], 'canviewips'))
 {
  print_no_permission();
 }
 // check if there is a forum password and if so, ensure the user has it set
 verify_forum_password($foruminfo['forumid'], $foruminfo['password']);
 if (!empty($vbulletin->GPC['ip']) AND preg_match('#^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$#', $vbulletin->GPC['ip']))
 {
  $postinfo['ipaddress'] =& $vbulletin->GPC['ip'];
 }
 else if (!$postinfo['postid'])
 {
  eval(standard_error(fetch_error('invalidid', $vbphrase['post'], $vbulletin->options['contactuslink'])));
 }
 $postinfo['hostaddress'] = @gethostbyaddr($postinfo['ipaddress']);
 ($hook = vBulletinHook::fetch_hook('threadmanage_getip')) ? eval($hook) : false;
 eval(standard_error(fetch_error('thread_displayip', $postinfo['ipaddress'], $postinfo['hostaddress']), '', 0));
}
=========
 
Search and delete:
=========
 $show['ipaddress'] = can_moderate($threadinfo['forumid'], 'canviewips') ? true : false;
=========
 
Search:
=========
  SELECT moderatorlog.dateline, moderatorlog.userid, moderatorlog.action, moderatorlog.type, moderatorlog.postid, moderatorlog.ipaddress,
=========
Replace:
=========
  SELECT moderatorlog.dateline, moderatorlog.userid, moderatorlog.action, moderatorlog.type, moderatorlog.postid,
=========
 
Search and delete:
=========
  $log['ipaddress'] = htmlspecialchars_uni($log['ipaddress']); // Sanity ;0
=========
 
Search:
=========
  SELECT threadrateid, threadid, userid, vote, ipaddress
=========
Replace:
=========
  SELECT threadrateid, threadid, userid, vote
=========
 
Search:
=========
  $id = (!empty($rating['userid'])) ? $rating['userid'] : $rating['ipaddress'];
=========
Replace:
=========
  $id = $rating['userid'];
=========
 
Search and delete:
=========
    $ipaddress = '';
=========
 
Search and delete:
=========
    $ipaddress = $id;
=========
 
Search:
=========
   $sql[] = "($threadinfo[threadid], $userid, $vote, '" . $db->escape_string($ipaddress) . "')";
=========
Replace:
=========
   $sql[] = "($threadinfo[threadid], $userid, $vote)";
=========
 
Search:
=========
     (threadid, userid, vote, ipaddress)
=========
Replace:
=========
     (threadid, userid, vote)
=========
 
register.php
Search and delete:
=========
 // register IP address
 $userdata->set('ipaddress', IPADDRESS);
=========
 
Search and delete:
=========
    $ipaddress = IPADDRESS;
=========
 
report.php
Search and delete:
=========
   if ($userinfo['userid'] != $vbulletin->userinfo['userid'])
   {
    // not posting as the current user, IP won't make sense
    $threadman->set('ipaddress', '');
   }
=========
 
Search and delete:
=========
   if ($userinfo['userid'] != $vbulletin->userinfo['userid'])
   {
    // not posting as the current user, IP won't make sense
    $postman->set('ipaddress', '');
   }
=========
 
search.php
Search:
=========
  WHERE " . iif(!$vbulletin->userinfo['userid'], "ipaddress ='" . $db->escape_string(IPADDRESS) . "'", "userid = " . $vbulletin->userinfo['userid']) . "
=========
Replace:
=========
  WHERE userid = " . $vbulletin->userinfo['userid'] . "
=========
 
Search:
=========
        REPLACE INTO " . TABLE_PREFIX . "search (userid, titleonly, ipaddress, personal, query, searchuser, forumchoice, sortby, sortorder, searchtime, showposts, orderedids, dateline, searchterms, displayterms, searchhash, completed)
=========
Replace:
=========
        REPLACE INTO " . TABLE_PREFIX . "search (userid, titleonly, personal, query, searchuser, forumchoice, sortby, sortorder, searchtime, showposts, orderedids, dateline, searchterms, displayterms, searchhash, completed)
=========
 
Search:
=========
        VALUES (" . $vbulletin->userinfo['userid'] . ", " . intval($vbulletin->GPC['titleonly']) . " ,'" . $db->escape_string(IPADDRESS) . "', " . ($vbulletin->options['searchsharing'] ? 0 : 1) . ", '" . $db->escape_string($search['query']) . "', '" . $db->escape_string($search['searchuser']) . "', '" . $db->escape_string($search['forumchoice']) . "', '" . $db->escape_string($search['sortby']) . "', '" . $db->escape_string($vbulletin->GPC['sortorder']) . "', $searchtime, " . intval($vbulletin->GPC['showposts']) . ", '" . implode(',', $search['orderedids']) . "', " . TIMENOW . ", '" . $db->escape_string($search['searchterms']) . "', '" . $db->escape_string($search['displayterms']) . "', '" . $db->escape_string($searchhash) . "', 1)
=========
Replace:
=========
        VALUES (" . $vbulletin->userinfo['userid'] . ", " . intval($vbulletin->GPC['titleonly']) . " , " . ($vbulletin->options['searchsharing'] ? 0 : 1) . ", '" . $db->escape_string($search['query']) . "', '" . $db->escape_string($search['searchuser']) . "', '" . $db->escape_string($search['forumchoice']) . "', '" . $db->escape_string($search['sortby']) . "', '" . $db->escape_string($vbulletin->GPC['sortorder']) . "', $searchtime, " . intval($vbulletin->GPC['showposts']) . ", '" . implode(',', $search['orderedids']) . "', " . TIMENOW . ", '" . $db->escape_string($search['searchterms']) . "', '" . $db->escape_string($search['displayterms']) . "', '" . $db->escape_string($searchhash) . "', 1)
=========
 
Search:
=========
         REPLACE INTO " . TABLE_PREFIX . "search (userid, titleonly, ipaddress, personal, query, searchuser, forumchoice, sortby, sortorder, searchtime, showposts, orderedids, dateline, searchterms, displayterms, searchhash, completed)
=========
Replace:
=========
         REPLACE INTO " . TABLE_PREFIX . "search (userid, titleonly, personal, query, searchuser, forumchoice, sortby, sortorder, searchtime, showposts, orderedids, dateline, searchterms, displayterms, searchhash, completed)
=========
 
Search and delete:
=========
          '" . $db->escape_string(IPADDRESS) . "',
=========
 
Search:
=========
    REPLACE INTO " . TABLE_PREFIX . "search (userid, titleonly, ipaddress, personal, query, searchuser, forumchoice, sortby, sortorder, searchtime, showposts, orderedids, dateline, searchterms, displayterms, searchhash, completed)
=========
Replace:
=========
    REPLACE INTO " . TABLE_PREFIX . "search (userid, titleonly, personal, query, searchuser, forumchoice, sortby, sortorder, searchtime, showposts, orderedids, dateline, searchterms, displayterms, searchhash, completed)
=========
 
Search and delete:
=========
     '" . $db->escape_string(IPADDRESS) . "',
=========
 
Search:
=========
       REPLACE INTO " . TABLE_PREFIX . "search (userid, titleonly, ipaddress, personal, query, searchuser, forumchoice, sortby, sortorder, searchtime, showposts, orderedids, dateline, searchterms, displayterms, searchhash, completed)
=========
Replace:
=========
       REPLACE INTO " . TABLE_PREFIX . "search (userid, titleonly, personal, query, searchuser, forumchoice, sortby, sortorder, searchtime, showposts, orderedids, dateline, searchterms, displayterms, searchhash, completed)
=========
 
Search:
=========
       VALUES (" . $vbulletin->userinfo['userid'] . ", " . intval($vbulletin->GPC['titleonly']) . " ,'" . $db->escape_string(IPADDRESS) . "', " . ($vbulletin->options['searchsharing'] ? 0 : 1) . ", '" . $db->escape_string($vbulletin->GPC['query']) . "', '" . $db->escape_string($vbulletin->GPC['searchuser']) . "', '" . $db->escape_string($forumchoice) . "', '" . $db->escape_string($vbulletin->GPC['sortby']) . "', '" . $db->escape_string($vbulletin->GPC['sortorder']) . "', $searchtime, " . intval($vbulletin->GPC['showposts']) . ", '" . implode(',', $orderedids) . "', " . time() . ", '" . $db->escape_string(serialize($searchterms)) . "', '" . $db->escape_string(serialize($display)) . "', '" . $db->escape_string($searchhash) . "', 1)
=========
Replace:
=========
       VALUES (" . $vbulletin->userinfo['userid'] . ", " . intval($vbulletin->GPC['titleonly']) . " , " . ($vbulletin->options['searchsharing'] ? 0 : 1) . ", '" . $db->escape_string($vbulletin->GPC['query']) . "', '" . $db->escape_string($vbulletin->GPC['searchuser']) . "', '" . $db->escape_string($forumchoice) . "', '" . $db->escape_string($vbulletin->GPC['sortby']) . "', '" . $db->escape_string($vbulletin->GPC['sortorder']) . "', $searchtime, " . intval($vbulletin->GPC['showposts']) . ", '" . implode(',', $orderedids) . "', " . time() . ", '" . $db->escape_string(serialize($searchterms)) . "', '" . $db->escape_string(serialize($display)) . "', '" . $db->escape_string($searchhash) . "', 1)
=========
 
Search:
=========
   // if search was by guest, do ip addresses match?
   if ($search['userid'] == 0 AND $search['ipaddress'] == IPADDRESS)
=========
Replace:
=========
   // if search was by guest
   if ($search['userid'] == 0)
=========
 
Search:
=========
 $searchhash = md5($vbulletin->userinfo['userid'] . IPADDRESS . $forumid . $vbulletin->GPC['days'] . $vbulletin->userinfo['lastvisit'] . $vbulletin->GPC['include'] . '|' . $vbulletin->GPC['exclude']);
=========
Replace:
=========
 $searchhash = md5($vbulletin->userinfo['userid'] . $forumid . $vbulletin->GPC['days'] . $vbulletin->userinfo['lastvisit'] . $vbulletin->GPC['include'] . '|' . $vbulletin->GPC['exclude']);
=========
 
Search:
=========
  REPLACE INTO " . TABLE_PREFIX . "search (userid, showposts, ipaddress, personal, forumchoice, sortby, sortorder, searchtime, orderedids, announceids, dateline, displayterms, searchhash, completed)
=========
Replace:
=========
  REPLACE INTO " . TABLE_PREFIX . "search (userid, showposts, personal, forumchoice, sortby, sortorder, searchtime, orderedids, announceids, dateline, displayterms, searchhash, completed)
=========
 
Search:
=========
  VALUES (" . $vbulletin->userinfo['userid'] . ", " . intval($vbulletin->GPC['showposts']) . ", '" . $db->escape_string(IPADDRESS) . "', 1, '" . $db->escape_string($foruminfo['forumid']) . "', '" . $db->escape_string($vbulletin->GPC['sortby']) . "', 'DESC', $searchtime, '$sql_ids', '$sql_aids', " . TIMENOW . ", '" . $db->escape_string(serialize($display)) . "', '" . $db->escape_string($searchhash) . "', 1)
=========
Replace:
=========
  VALUES (" . $vbulletin->userinfo['userid'] . ", " . intval($vbulletin->GPC['showposts']) . ", 1, '" . $db->escape_string($foruminfo['forumid']) . "', '" . $db->escape_string($vbulletin->GPC['sortby']) . "', 'DESC', $searchtime, '$sql_ids', '$sql_aids', " . TIMENOW . ", '" . $db->escape_string(serialize($display)) . "', '" . $db->escape_string($searchhash) . "', 1)
=========
 
Search:
=========
   (userid, ipaddress, personal,
=========
Replace:
=========
   (userid, personal,
=========
 
Search:
=========
   (" . $vbulletin->userinfo['userid'] . ", '" . $db->escape_string(IPADDRESS) . "', 1,
=========
Replace:
=========
   (" . $vbulletin->userinfo['userid'] . ", 1,
=========
 
sendmessage.php
Search and delete:
=========
   if ($destemail == $vbulletin->options['webmasteremail'])
   {
    $ip = IPADDRESS;
   }
   else
   {
    $ip =& $vbphrase['n_a'];
   }
=========
 
Search and delete:
=========
   $ip = IPADDRESS;
=========
 
showpost.php
Search and delete:
=========
 'postbit_ip',
=========
 
Search:
=========
  post.*, post.username AS postusername, post.ipaddress AS ip, IF(post.visible = 2, 1, 0) AS isdeleted,
=========
Replace:
=========
  post.*, post.username AS postusername, IF(post.visible = 2, 1, 0) AS isdeleted,
=========
 
showthread.php
Search and delete:
=========
 'postbit_ip',
=========
 
Search:
=========
   post.*, post.username AS postusername, post.ipaddress AS ip, IF(post.visible = 2, 1, 0) AS isdeleted,
=========
Replace:
=========
   post.*, post.username AS postusername, IF(post.visible = 2, 1, 0) AS isdeleted,
=========
 
Search:
=========
   post.*, post.username AS postusername, post.ipaddress AS ip, IF(post.visible = 2, 1, 0) AS isdeleted,
=========
Replace:
=========
   post.*, post.username AS postusername, IF(post.visible = 2, 1, 0) AS isdeleted,
=========
 
Search:
=========
   post.*, post.username AS postusername, post.ipaddress AS ip, IF(post.visible = 2, 1, 0) AS isdeleted,
=========
Replace:
=========
   post.*, post.username AS postusername, IF(post.visible = 2, 1, 0) AS isdeleted,
=========
 
threadrate.php
Search:
=========
  // Check for entry in Database for this Ip Addr/Threadid
  if ($rating = $db->query_first("
   SELECT *
   FROM " . TABLE_PREFIX . "threadrate
   WHERE ipaddress = '" . $db->escape_string(IPADDRESS) . "'
    AND threadid = $threadinfo[threadid]
  "))
=========
Replace:
=========
  // Check for entry in Database for this Threadid
  if ($rating = $db->query_first("
   SELECT *
   FROM " . TABLE_PREFIX . "threadrate
   WHERE threadid = $threadinfo[threadid]
  "))
=========
 
Search and delete:
=========
   $threadrate->set('ipaddress', IPADDRESS);
=========
 
modcp\index.php
Search:
=========
  $guestsarry = $db->query_first("SELECT COUNT(host) AS sessions FROM " . TABLE_PREFIX . "session WHERE userid = 0 AND lastactivity > $datecut");
=========
Replace:
=========
  $guestsarry = $db->query_first("SELECT COUNT(userid) AS sessions FROM " . TABLE_PREFIX . "session WHERE userid = 0 AND lastactivity > $datecut");
=========
 
Search and delete:
=========
 if (can_moderate(0, 'canviewips'))
 {
  $canuser = true;
  construct_nav_option($vbphrase['search_ip_addresses'], 'user.php?do=doips');
 }
=========
 

tvt

عضو فعال
تابع

تابع
PHP:
modcp\user.php
Search and delete:
=========
// ############################# start do ips #########################
if ($_REQUEST['do'] == 'doips')
{
$vbulletin->input->clean_array_gpc('r', array(
'depth' => TYPE_INT,
'username' => TYPE_STR,
'ipaddress' => TYPE_NOHTML,
));
if (!can_moderate(0, 'canviewips'))
{
print_stop_message('no_permission_ips');
}
if (($vbulletin->GPC['username'] OR $vbulletin->GPC['userid'] OR $vbulletin->GPC['ipaddress']) AND $_POST['do'] != 'doips')
{
// we're doing a search of some type, that's not submitted via post,
// so we need to verify the CP sessionhash
verify_cp_sessionhash();
}
// the following is now a direct copy of the contents of doips from admincp/user.php
if (function_exists('set_time_limit') AND !SAFEMODE)
{
@set_time_limit(0);
}
if (empty($vbulletin->GPC['depth']))
{
$vbulletin->GPC['depth'] = 1;
}
if (!empty($vbulletin->GPC['username']))
{
if ($getuserid = $db->query_first("
SELECT userid
FROM " . TABLE_PREFIX . "user
WHERE username = '" . $db->escape_string(htmlspecialchars_uni($vbulletin->GPC['username'])) . "'
"))
{
$vbulletin->GPC['userid'] =& $getuserid['userid'];
}
else
{
print_stop_message('invalid_user_specified');
}
$userinfo = fetch_userinfo($vbulletin->GPC['userid']);
}
else if (!empty($vbulletin->GPC['userid']))
{
$userinfo = fetch_userinfo($vbulletin->GPC['userid']);
if (!$userinfo)
{
print_stop_message('invalid_user_specified');
}
$vbulletin->GPC['username'] = unhtmlspecialchars($userinfo['username']);
}
if (!empty($vbulletin->GPC['ipaddress']) OR !empty($vbulletin->GPC['userid']))
{
if ($vbulletin->GPC['ipaddress'])
{
print_form_header('', '');
print_table_header(construct_phrase($vbphrase['ip_address_search_for_ip_address_x'], $vbulletin->GPC['ipaddress']));
$hostname = @gethostbyaddr($vbulletin->GPC['ipaddress']);
if (!$hostname OR $hostname == $vbulletin->GPC['ipaddress'])
{
$hostname = $vbphrase['could_not_resolve_hostname'];
}
print_description_row('<div style="margin-left:20px"><a href="user.php?' . $vbulletin->session->vars['sessionurl'] . 'do=gethost&amp;ip=' . $vbulletin->GPC['ipaddress'] . '">' . $vbulletin->GPC['ipaddress'] . "</a> : <b>$hostname</b></div>");
$results = construct_ip_usage_table($vbulletin->GPC['ipaddress'], 0, $vbulletin->GPC['depth']);
print_description_row($vbphrase['post_ip_addresses'], false, 2, 'thead');
print_description_row($results ? $results : $vbphrase['no_matches_found']);
$results = construct_ip_register_table($vbulletin->GPC['ipaddress'], 0, $vbulletin->GPC['depth']);
print_description_row($vbphrase['registration_ip_addresses'], false, 2, 'thead');
print_description_row($results ? $results : $vbphrase['no_matches_found']);
print_table_footer();
}
if ($vbulletin->GPC['userid'])
{
print_form_header('', '');
print_table_header(construct_phrase($vbphrase['ip_address_search_for_user_x'], htmlspecialchars_uni($vbulletin->GPC['username'])));
print_label_row($vbphrase['registration_ip_address'], $userinfo['ipaddress']);
$results = construct_user_ip_table($vbulletin->GPC['userid'], 0, $vbulletin->GPC['depth']);
print_description_row($vbphrase['post_ip_addresses'], false, 2, 'thead');
print_description_row($results ? $results : $vbphrase['no_matches_found']);
print_table_footer();
}
}
print_form_header('user', 'doips');
print_table_header($vbphrase['search_ip_addresses']);
print_input_row($vbphrase['find_users_by_ip_address'], 'ipaddress', $vbulletin->GPC['ipaddress'], 0);
print_input_row($vbphrase['find_ip_addresses_for_user'], 'username', $vbulletin->GPC['username']);
print_select_row($vbphrase['depth_to_search'], 'depth', array(1 => 1, 2 => 2), $vbulletin->GPC['depth']);
print_submit_row($vbphrase['find']);
}
// ############################# start gethost #########################
if ($_REQUEST['do'] == 'gethost')
{
$vbulletin->input->clean_array_gpc('r', array(
'ip' => TYPE_NOHTML
));
print_form_header('', '');
print_table_header($vbphrase['ip_address']);
print_label_row($vbphrase['ip_address'], $vbulletin->GPC['ip']);
$resolvedip = @gethostbyaddr($vbulletin->GPC['ip']);
if ($resolvedip == $vbulletin->GPC['ip'])
{
print_label_row($vbphrase['host_name'], '<i>' . $vbphrase['n_a'] . '</i>');
}
else
{
print_label_row($vbphrase['host_name'], "<b>$resolvedip</b>");
}
print_table_footer();
}
=========
 
Search and delete:
=========
if (can_moderate(0, 'canviewips'))
{
print_input_row($vbphrase['ip_address'], 'user[ipaddress]', $user['ipaddress']);
}
=========
 
install\mysql-schema.php
Search and delete:
=========
ipaddress CHAR(15) NOT NULL DEFAULT '',
=========
 
Search and delete:
=========
ipaddress CHAR(15) NOT NULL DEFAULT '',
=========
 
Search and delete:
=========
ipaddress CHAR(15) NOT NULL DEFAULT '',
=========
 
Search and delete:
=========
ipaddress CHAR(15) NOT NULL DEFAULT '',
=========
 
Search and delete:
=========
host CHAR(15) NOT NULL DEFAULT '',
=========
 
Search and delete:
=========
strikeip CHAR(15) NOT NULL DEFAULT '',
=========
 
Search:
=========
KEY striketime (striketime),
KEY strikeip (strikeip)
=========
Replace:
=========
KEY striketime (striketime)
=========
 
Search and delete:
=========
ipaddress CHAR(15) NOT NULL DEFAULT '',
=========
 
Search and delete:
=========
ipaddress CHAR(15) NOT NULL DEFAULT '',
=========
 
install\upgrade_300b3.php
Search:
=========
strikeip char(15) NOT NULL DEFAULT '',
username char(50) NOT NULL DEFAULT '',
KEY striketime (striketime),
KEY strikeip (strikeip)
=========
Replace:
=========
username char(50) NOT NULL DEFAULT '',
KEY striketime (striketime)
=========
 
Search and delete:
=========
ipaddress char(15) NOT NULL DEFAULT '',
=========
 
Search:
=========
CHANGE timezoneoffset timezoneoffset CHAR(4) NOT NULL DEFAULT '',
CHANGE ipaddress ipaddress CHAR(15) NOT NULL DEFAULT ''
=========
Replace:
=========
CHANGE timezoneoffset timezoneoffset CHAR(4) NOT NULL DEFAULT ''
=========
 
Search and delete:
=========
CHANGE host host CHAR(15) NOT NULL DEFAULT '',
=========
 
Search and delete:
=========
$query[] = "ALTER TABLE threadrate CHANGE ipaddress ipaddress CHAR(15) NOT NULL DEFAULT ''";
$explain[] = sprintf($upgrade_phrases['upgrade_300b3.php']['altering_x_table'], 'threadrate', 1, 2);
=========
 
Search and delete:
=========
'IP Logging Options' => 'ip',
=========
 
Search and delete:
=========
'logip',
=========
 
Search and delete:
=========
'WOLresolve',
=========
 
install\upgrade_350b1.php
Search and delete:
=========
// add ipaddress to moderator log
$upgrade->add_field(
sprintf($upgradecore_phrases['altering_x_table'], 'moderatorlog', 1, 1),
'moderatorlog',
'ipaddress',
'char',
array('length' => 15, 'attributes' => FIELD_DEFAULTS)
);
=========
 
install\upgrade_language_en.php
Search and delete:
=========
'IP Logging Options' => 'ip',
=========
 
includes\cron\rssposter.php
Search and delete:
=========
$itemdata->set('ipaddress', '');
=========
 
includes\paymentapi\class_ccbill.php
Search:
=========
if (empty($this->registry->GPC['reasonForDeclineCode']) AND $this->registry->GPC['secretword'] == $this->settings['secretword'] AND preg_match('#^64\.38\.#', $this->registry->ipaddress)) // check REMOTE_ADDR = 64.38.*
=========
Replace:
=========
if (empty($this->registry->GPC['reasonForDeclineCode']) AND $this->registry->GPC['secretword'] == $this->settings['secretword'])
=========
 
includes\xml\bitfield_forum.xml (bitfield_vbulletin.xml)
Search:
=========
<bitfield name="canwhosonline" group="whos_online_permissions" phrase="can_view_whos_online" install="2,5,6,7">1</bitfield>
<bitfield name="canwhosonlineip" group="whos_online_permissions" phrase="can_view_ip_addresses" install="5,6,7">2</bitfield>
<bitfield name="canwhosonlinefull" group="whos_online_permissions" phrase="can_view_wol_detail_location" install="5,6,7">4</bitfield>
<bitfield name="canwhosonlinebad" group="whos_online_permissions" phrase="can_view_wol_bad_location" install="5,6,7">8</bitfield>
<bitfield name="canwhosonlinelocation" group="whos_online_permissions" phrase="can_view_wol_actual_location" install="6">16</bitfield>
=========
Replace:
=========
<bitfield name="canwhosonline" group="whos_online_permissions" phrase="can_view_whos_online" install="2,5,6,7">1</bitfield>
<bitfield name="canwhosonlinefull" group="whos_online_permissions" phrase="can_view_wol_detail_location" install="5,6,7">2</bitfield>
<bitfield name="canwhosonlinebad" group="whos_online_permissions" phrase="can_view_wol_bad_location" install="5,6,7">4</bitfield>
<bitfield name="canwhosonlinelocation" group="whos_online_permissions" phrase="can_view_wol_actual_location" install="6">8</bitfield>
=========
 
Search:
=========
<bitfield name="caneditevents">1</bitfield>
<bitfield name="candeleteevents">2</bitfield>
<bitfield name="canmoderateevents">4</bitfield>
<bitfield name="canviewips">8</bitfield>
<bitfield name="canmoveevents">16</bitfield>
=========
Replace:
=========
<bitfield name="caneditevents">1</bitfield>
<bitfield name="candeleteevents">2</bitfield>
<bitfield name="canmoderateevents">4</bitfield>
<bitfield name="canmoveevents">8</bitfield>
=========
 
Search:
=========
<bitfield name="caneditposts">1</bitfield>
<bitfield name="candeleteposts">2</bitfield>
<bitfield name="canopenclose">4</bitfield>
<bitfield name="caneditthreads">8</bitfield>
<bitfield name="canmanagethreads">16</bitfield>
<bitfield name="canannounce">32</bitfield>
<bitfield name="canmoderateposts">64</bitfield>
<bitfield name="canmoderateattachments">128</bitfield>
<bitfield name="canmassmove">256</bitfield>
<bitfield name="canmassprune">512</bitfield>
<bitfield name="canviewips">1024</bitfield>
<bitfield name="canviewprofile">2048</bitfield>
<bitfield name="canbanusers">4096</bitfield>
<bitfield name="canunbanusers">8192</bitfield>
<bitfield name="newthreademail">16384</bitfield>
<bitfield name="newpostemail">32768</bitfield>
<bitfield name="cansetpassword">65536</bitfield>
<bitfield name="canremoveposts">131072</bitfield>
<bitfield name="caneditsigs">262144</bitfield>
<bitfield name="caneditavatar">524288</bitfield>
<bitfield name="caneditpoll">1048576</bitfield>
<bitfield name="caneditprofilepic">2097152</bitfield>
<bitfield name="caneditreputation">4194304</bitfield>
=========
Replace:
=========
<bitfield name="caneditposts">1</bitfield>
<bitfield name="candeleteposts">2</bitfield>
<bitfield name="canopenclose">4</bitfield>
<bitfield name="caneditthreads">8</bitfield>
<bitfield name="canmanagethreads">16</bitfield>
<bitfield name="canannounce">32</bitfield>
<bitfield name="canmoderateposts">64</bitfield>
<bitfield name="canmoderateattachments">128</bitfield>
<bitfield name="canmassmove">256</bitfield>
<bitfield name="canmassprune">512</bitfield>
<bitfield name="canviewprofile">1024</bitfield>
<bitfield name="canbanusers">2048</bitfield>
<bitfield name="canunbanusers">4096</bitfield>
<bitfield name="newthreademail">8192</bitfield>
<bitfield name="newpostemail">16384</bitfield>
<bitfield name="cansetpassword">32768</bitfield>
<bitfield name="canremoveposts">65536</bitfield>
<bitfield name="caneditsigs">131072</bitfield>
<bitfield name="caneditavatar">262144</bitfield>
<bitfield name="caneditpoll">524288</bitfield>
<bitfield name="caneditprofilepic">1048576</bitfield>
<bitfield name="caneditreputation">2097152</bitfield>
=========
 
includes\xml\cpnav_forum.xml (cpnav_vbulletin.xml)
Search:
=========
<navoption displayorder="80">
<phrase>search_ip_addresses</phrase>
<link>usertools.php?do=doips</link>
</navoption>
<navoption displayorder="90">
<phrase>view_banned_users</phrase>
<link>../{$vbulletin->config[Misc][modcpdir]}/banning.php?do=modify</link>
</navoption>
<navoption displayorder="100">
<phrase>send_email_to_users</phrase>
<link>email.php?do=start</link>
</navoption>
<navoption displayorder="110">
<phrase>generate_mailing_list</phrase>
<link>email.php?do=genlist</link>
</navoption>
<navoption displayorder="120">
<phrase>access_masks</phrase>
<link>accessmask.php?do=modify</link>
</navoption>
=========
Replace:
=========
<navoption displayorder="80">
<phrase>view_banned_users</phrase>
<link>../{$vbulletin->config[Misc][modcpdir]}/banning.php?do=modify</link>
</navoption>
<navoption displayorder="90">
<phrase>send_email_to_users</phrase>
<link>email.php?do=start</link>
</navoption>
<navoption displayorder="100">
<phrase>generate_mailing_list</phrase>
<link>email.php?do=genlist</link>
</navoption>
<navoption displayorder="110">
<phrase>access_masks</phrase>
<link>accessmask.php?do=modify</link>
</navoption>
=========
 
includes\xml\hooks_forum.xml (hooks_vbulletin.xml)
Search and delete:
=========
<hook>threadmanage_getip</hook>
=========
 
Search and delete:
=========
<hook>useradmin_gethost</hook>
=========
 
includes\adminfunctions.php
 
Search:
=========
INSERT INTO " . TABLE_PREFIX . "adminlog(userid, dateline, script, action, extrainfo, ipaddress)
VALUES
($userid, " . TIMENOW.", '" . $vbulletin->db->escape_string($script) . "', '" . $vbulletin->db->escape_string($scriptaction) . "', '" . $vbulletin->db->escape_string($extrainfo) ."', '" . IPADDRESS . "')
=========
Replace:
=========
INSERT INTO " . TABLE_PREFIX . "adminlog(userid, dateline, script, action, extrainfo)
VALUES
($userid, " . TIMENOW.", '" . $vbulletin->db->escape_string($script) . "', '" . $vbulletin->db->escape_string($scriptaction) . "', '" . $vbulletin->db->escape_string($extrainfo) ."')
=========
 
includes\adminfunctions_user.php
Search and delete:
=========
// ###################### Start doipaddress #######################
function construct_ip_usage_table($ipaddress, $prevuserid, $depth = 1)
{
global $vbulletin, $vbphrase;
$depth--;
if (VB_AREA == 'AdminCP')
{
$userscript = 'usertools.php';
}
else
{
$userscript = 'user.php';
}
if (substr($ipaddress, -1) == '.' OR substr_count($ipaddress, '.') < 3)
{
// ends in a dot OR less than 3 dots in IP -> partial search
$ipaddress_match = "post.ipaddress LIKE '" . $vbulletin->db->escape_string_like($ipaddress) . "%'";
}
else
{
// exact match
$ipaddress_match = "post.ipaddress = '" . $vbulletin->db->escape_string($ipaddress) . "'";
}
$users = $vbulletin->db->query_read_slave("
SELECT DISTINCT user.userid, user.username, post.ipaddress
FROM " . TABLE_PREFIX . "post AS post,
" . TABLE_PREFIX . "user AS user
WHERE user.userid = post.userid AND
$ipaddress_match AND
post.ipaddress <> '' AND
user.userid <> $prevuserid
ORDER BY user.username
");
$retdata = '';
while ($user = $vbulletin->db->fetch_array($users))
{
$retdata .= '<li>' .
"<a href=\"user.php?" . $vbulletin->session->vars['sessionurl'] . "do=" . iif(VB_AREA == 'ModCP', 'viewuser', 'edit') . "&amp;u=$user[userid]\"><b>$user[username]</b></a> &nbsp;
<a href=\"$userscript?" . $vbulletin->session->vars['sessionurl'] . "do=gethost&amp;ip=$user[ipaddress]\" title=\"" . $vbphrase['resolve_address'] . "\">$user[ipaddress]</a> &nbsp; " .
construct_link_code($vbphrase['find_posts_by_user'], "../search.php?" . $vbulletin->session->vars['sessionurl'] . "do=finduser&amp;u=$user[userid]", '_blank') .
construct_link_code($vbphrase['view_other_ip_addresses_for_this_user'], "$userscript?" . $vbulletin->session->vars['sessionurl'] . "do=doips&amp;u=$user[userid]&amp;hash=" . CP_SESSIONHASH) .
"</li>\n";
if ($depth > 0)
{
$retdata .= construct_user_ip_table($user['userid'], $user['ipaddress'], $depth);
}
}
if (empty($retdata))
{
return '';
}
else
{
return '<ul>' . $retdata . '</ul>';
}
}
// ###################### Start construct_ip_register_table #######################
function construct_ip_register_table($ipaddress, $prevuserid, $depth = 1)
{
global $vbulletin, $vbphrase;
$depth--;
if (VB_AREA == 'AdminCP')
{
$userscript = 'usertools.php';
}
else
{
$userscript = 'user.php';
}
if (substr($ipaddress, -1) == '.' OR substr_count($ipaddress, '.') < 3)
{
// ends in a dot OR less than 3 dots in IP -> partial search
$ipaddress_match = "ipaddress LIKE '" . $vbulletin->db->escape_string_like($ipaddress) . "%'";
}
else
{
// exact match
$ipaddress_match = "ipaddress = '" . $vbulletin->db->escape_string($ipaddress) . "'";
}
$users = $vbulletin->db->query_read_slave("
SELECT userid, username, ipaddress
FROM " . TABLE_PREFIX . "user AS user
WHERE $ipaddress_match AND
ipaddress <> '' AND
userid <> $prevuserid
ORDER BY username
");
$retdata = '';
while ($user = $vbulletin->db->fetch_array($users))
{
$retdata .= '<li>' .
"<a href=\"user.php?" . $vbulletin->session->vars['sessionurl'] . "do=" . iif(VB_AREA == 'ModCP', 'viewuser', 'edit') . "&amp;u=$user[userid]\"><b>$user[username]</b></a> &nbsp;
<a href=\"$userscript?" . $vbulletin->session->vars['sessionurl'] . "do=gethost&amp;ip=$user[ipaddress]\" title=\"" . $vbphrase['resolve_address'] . "\">$user[ipaddress]</a> &nbsp; " .
construct_link_code($vbphrase['find_posts_by_user'], "../search.php?" . $vbulletin->session->vars['sessionurl'] . "do=finduser&amp;u=$user[userid]", '_blank') .
construct_link_code($vbphrase['view_other_ip_addresses_for_this_user'], "$userscript?" . $vbulletin->session->vars['sessionurl'] . "do=doips&amp;u=$user[userid]&amp;hash=" . CP_SESSIONHASH) .
"</li>\n";
if ($depth > 0)
{
$retdata .= construct_user_ip_table($user['userid'], $user['ipaddress'], $depth);
}
}
if (empty($retdata))
{
return '';
}
else
{
return '<ul>' . $retdata . '</ul>';
}
}
// ###################### Start douseridip #######################
function construct_user_ip_table($userid, $previpaddress, $depth = 2)
{
global $vbulletin, $vbphrase;
if (VB_AREA == 'AdminCP')
{
$userscript = 'usertools.php';
}
else
{
$userscript = 'user.php';
}
$depth--;
$ips = $vbulletin->db->query_read_slave("
SELECT DISTINCT ipaddress
FROM " . TABLE_PREFIX . "post
WHERE userid = $userid AND
ipaddress <> '" . $vbulletin->db->escape_string($previpaddress) . "' AND
ipaddress <> ''
ORDER BY ipaddress
");
$retdata = '';
while ($ip = $vbulletin->db->fetch_array($ips))
{
$retdata .= '<li>' .
"<a href=\"$userscript?" . $vbulletin->session->vars['sessionurl'] . "do=gethost&amp;ip=$ip[ipaddress]\" title=\"" . $vbphrase['resolve_address'] . "\">$ip[ipaddress]</a> &nbsp; " .
construct_link_code($vbphrase['find_more_users_with_this_ip_address'], "$userscript?" . $vbulletin->session->vars['sessionurl'] . "do=doips&amp;ipaddress=$ip[ipaddress]&amp;hash=" . CP_SESSIONHASH) .
"</li>\n";
if ($depth > 0)
{
$retdata .= construct_ip_usage_table($ip['ipaddress'], $userid, $depth);
}
}
if (empty($retdata))
{
return '';
}
else
{
return '<ul>' . $retdata . '</ul>';
}
}
=========
 
Search and delete:
=========
print_input_row($vbphrase['registration_ip_address'], 'user[ipaddress]');
=========
Search and delete:
=========
$condition .= iif($user['ipaddress'], " AND {$prefix}ipaddress LIKE '%" . $vbulletin->db->escape_string_like($user['ipaddress']) . "%'");
=========
 
includes\class_core.php
 
Search and delete:
=========
$ipaddress = IPADDRESS;
=========
 
Search and delete:
=========
// define session constants
define('SESSION_HOST', substr($registry->ipaddress, 0, 15));
=========
 
Search and delete:
=========
'host' => TYPE_STR,
=========
 
Search:
=========
") AND $this->fetch_substr_ip($session['host']) == $this->fetch_substr_ip(SESSION_HOST))
=========
 
Replace:
=========
"))
=========
 
Search and delete:
=========
AND host = '" . $this->registry->db->escape_string(SESSION_HOST) . "'
=========
 
Search:
=========
return md5(TIMENOW . SCRIPTPATH . SESSION_IDHASH . SESSION_HOST . vbrand(1, 1000000));
=========
 
Replace:
=========
return md5(TIMENOW . SCRIPTPATH . SESSION_IDHASH . vbrand(1, 1000000));
=========
 
Search and delete:
=========
'host' => SESSION_HOST,
=========
 
includes\class_dm_threadpost.php
Search and delete:
=========
if ($this->fetch_field('ipaddress', 'post') === null)
{
$this->set('ipaddress', ($this->registry->options['logip'] ? IPADDRESS : ''));
}
=========
 
Search and delete:
=========
'ipaddress' => array(TYPE_STR, REQ_AUTO),
=========
 
Search:
=========
'" . $this->dbobject->escape_string($entry['action']) . "', '" . $this->dbobject->escape_string(IPADDRESS) . "')
=========
Replace:
=========
'" . $this->dbobject->escape_string($entry['action']) . "')
=========
 
Search:
=========
(userid, dateline, forumid, threadid, type, action, ipaddress)
=========
Replace:
=========
(userid, dateline, forumid, threadid, type, action)
=========
 
Search and delete:
=========
'ipaddress' => array(TYPE_STR, REQ_AUTO),
=========
Search and delete:
=========
case 'ipaddress':
=========
 
includes\class_dm_threadrate.php
 
Search:
=========
'vote' => array(TYPE_INT, REQ_YES, VF_METHOD, 'verify_vote'), # TYPE_INT to allow negative rating
'ipaddress' => array(TYPE_STR, REQ_AUTO, VF_METHOD, 'verify_ipaddress')
=========
Replace:
=========
'vote' => array(TYPE_INT, REQ_YES, VF_METHOD, 'verify_vote') # TYPE_INT to allow negative rating
=========
 
Search and delete:
=========
if (!$this->condition AND $this->fetch_field('userid') == $this->registry->userinfo['userid'] AND !$this->fetch_field('ipaddress'))
{
$this->set('ipaddress', IPADDRESS);
}
=========
 
Search and delete:
=========
}
else if ($ipaddress = $this->fetch_field('ipaddress'))
{
$exists = $this->dbobject->query_first("
SELECT *
FROM " . TABLE_PREFIX . "threadrate
WHERE userid = 0
AND threadid = " . intval($this->threadrate['threadid']) . "
AND ipaddress = '" . $this->dbobject->escape_string($ipaddress) . "'
");
=========
 
includes\class_dm_user.php
Search and delete:
=========
'ipaddress' => array(TYPE_STR, REQ_NO, VF_METHOD),
=========
 
includes\class_postbit.php
Search and delete:
=========
$this->process_ip();
 

tvt

عضو فعال
PHP:
[php]
=========
Search and delete:
=========
/**
* Processes this post's IP.
*/
function process_ip()
{
global $show, $vbphrase, $stylevar;
$post =& $this->post;
$this->post['iplogged'] = '';
if ($this->post['ip'] != '')
{
if ($this->registry->options['logip'] == 2)
{
$show['ip'] = true;
eval('$this->post[\'iplogged\'] = "' . fetch_template('postbit_ip') . '";');
}
else if ($this->registry->options['logip'] == 1 AND can_moderate($this->thread['forumid'], 'canviewips'))
{
$show['ip'] = false;
eval('$this->post[\'iplogged\'] = "' . fetch_template('postbit_ip') . '";');
}
}
}
=========
 
includes\database_error_message.html
Search and delete:
=========
IP Address : $ipaddress
=========
 
includes\functions_log_error.php
Search and delete:
=========
$errstring .= 'IP Address: ' . IPADDRESS . "\r\n";
=========
 
Search and delete:
=========
$errstring .= 'IP Address: ' . IPADDRESS . "\r\n";
=========
 
Search:
=========
$modlogsql[] = "(" . intval($logtype) . ", " . intval($log['userid']) . ", " . TIMENOW . ", " . intval($log['forumid']) . ", " . intval($log['threadid']) . ", " . intval($log['postid']) . ", " . intval($log['pollid']) . ", " . intval($log['attachmentid']) . ", '" . $vbulletin->db->escape_string($action) . "', '" . $vbulletin->db->escape_string(IPADDRESS) . "')";
=========
Replace:
=========
$modlogsql[] = "(" . intval($logtype) . ", " . intval($log['userid']) . ", " . TIMENOW . ", " . intval($log['forumid']) . ", " . intval($log['threadid']) . ", " . intval($log['postid']) . ", " . intval($log['pollid']) . ", " . intval($log['attachmentid']) . ", '" . $vbulletin->db->escape_string($action) . "')";
=========
 
Search:
=========
$vbulletin->db->query_write("INSERT INTO " . TABLE_PREFIX . "moderatorlog (type, userid, dateline, forumid, threadid, postid, pollid, attachmentid, action, ipaddress) VALUES " . implode(', ', $modlogsql));
=========
Replace:
=========
$vbulletin->db->query_write("INSERT INTO " . TABLE_PREFIX . "moderatorlog (type, userid, dateline, forumid, threadid, postid, pollid, attachmentid, action) VALUES " . implode(', ', $modlogsql));
=========
 
Search and delete:
=========
$moderatorlog['ipaddress'] = IPADDRESS;
=========
 
includes\functions_login.php
Search:
=========
WHERE strikeip = '" . $vbulletin->db->escape_string(IPADDRESS) . "'
=========
 
Replace:
=========
WHERE username = '" . $vbulletin->db->escape_string(htmlspecialchars_uni($username)) . "'
=========
 
Search:
=========
WHERE strikeip = '" . $vbulletin->db->escape_string(IPADDRESS) . "'
AND username = '" . $vbulletin->db->escape_string(htmlspecialchars_uni($username)) . "'
=========
Replace:
=========
WHERE username = '" . $vbulletin->db->escape_string(htmlspecialchars_uni($username)) . "'
=========
 
Search and delete:
=========
$ip = IPADDRESS;
=========
 
Search:
=========
(striketime, strikeip, username)
VALUES
(" . TIMENOW . ", '" . $vbulletin->db->escape_string(IPADDRESS) . "', '" . $vbulletin->db->escape_string(htmlspecialchars_uni($username)) . "')
=========
Replace:
=========
(striketime, username)
VALUES
(" . TIMENOW . ", '" . $vbulletin->db->escape_string(htmlspecialchars_uni($username)) . "')
=========
 
Search:
=========
$vbulletin->db->query_write("DELETE FROM " . TABLE_PREFIX . "strikes WHERE strikeip = '" . $vbulletin->db->escape_string(IPADDRESS) . "' AND username='" . $vbulletin->db->escape_string(htmlspecialchars_uni($username)) . "'");
=========
Replace:
=========
$vbulletin->db->query_write("DELETE FROM " . TABLE_PREFIX . "strikes WHERE username='" . $vbulletin->db->escape_string(htmlspecialchars_uni($username)) . "'");
=========
 
includes\functions_online.php
Search and delete:
=========
case 'getip':
$userinfo['where'] = '<i>' . $vbphrase['viewing_ip_address'] . '</i>';
break;
=========
 
Search and delete:
=========
$userinfo['host_encoded'] = urlencode($userinfo['host']);
=========
 
Search:
=========
global $limitlower, $limitupper, $stylevar, $vbphrase, $ipclass, $show;
=========
Replace:
=========
global $limitlower, $limitupper, $stylevar, $vbphrase, $show;
=========
 
archive\index.php
Search:
=========
(sessionhash, userid, host, idhash, lastactivity, styleid, loggedin, bypass, useragent)
VALUES
('" . $db->escape_string($vbulletin->session->vars['sessionhash']) . "', " . $vbulletin->session->vars['userid'] . ", '" . $db->escape_string($vbulletin->session->vars['host']) . "', '" . $db->escape_string($vbulletin->session->vars['idhash']) . "', " . TIMENOW . ", " . $vbulletin->session->vars['styleid'] . ", 1, " . iif ($logintype === 'cplogin', 1, 0) . ", '" . $db->escape_string($vbulletin->session->vars['useragent']) . "')
=========
Replace:
=========
(sessionhash, userid, idhash, lastactivity, styleid, loggedin, bypass, useragent)
VALUES
('" . $db->escape_string($vbulletin->session->vars['sessionhash']) . "', " . $vbulletin->session->vars['userid'] . ", '" . $db->escape_string($vbulletin->session->vars['idhash']) . "', " . TIMENOW . ", " . $vbulletin->session->vars['styleid'] . ", 1, " . iif ($logintype === 'cplogin', 1, 0) . ", '" . $db->escape_string($vbulletin->session->vars['useragent']) . "')
=========
 
admincp\admincalendar.php
Search and delete:
=========
'canviewips' => 1,
=========
 
Search and delete:
=========
print_yes_no_row($vbphrase['can_view_ip_addresses'], 'modperms[canviewips]', $moderator['canviewips']);
=========
 
admincp\adminlog.php
Search and delete:
=========
$headings[] = $vbphrase['ip_address'];
=========
Search and delete:
=========
$cell[] = '<span class="smallfont">' . iif($log['ipaddress'], "<a href=\"usertools.php?" . $vbulletin->session->vars['sessionurl'] . "do=gethost&ip=$log[ipaddress]\">$log[ipaddress]</a>", '&nbsp;') . '</span>';
=========
 
admincp\index.php
Search:
=========
$guestsarry = $db->query_first("SELECT COUNT(host) AS sessions FROM " . TABLE_PREFIX . "session WHERE userid = 0 AND lastactivity > $datecut");
=========
Replace:
=========
$guestsarry = $db->query_first("SELECT COUNT(userid) AS sessions FROM " . TABLE_PREFIX . "session WHERE userid = 0 AND lastactivity > $datecut");
=========
 
admincp\moderator.php
Search and delete:
=========
'canviewips' => 1,
=========
 
Search and delete:
=========
'canviewips' => 1,
=========
 
Search and delete:
=========
print_yes_no_row($vbphrase['can_view_ip_addresses'], 'modperms[canviewips]', $moderator['canviewips']);
=========
 
admincp\modlog.php
Search and delete:
=========
$headings[] = str_replace(' ', '&nbsp;', $vbphrase['ip_address']);
=========
 
Search and delete:
=========
$cell[] = '<span class="smallfont">' . iif($log['ipaddress'], "<a href=\"usertools.php?" . $vbulletin->session->vars['sessionurl'] . "do=gethost&ip=$log[ipaddress]\">$log[ipaddress]</a>", '&nbsp;') . '</span>';
=========
 
admincp\user.php
Search:
=========
usertitle, joindate, lastpost, posts, ipaddress, lastactivity, userfield.*
=========
Replace:
=========
usertitle, joindate, lastpost, posts, lastactivity, userfield.*
=========
 
Search and delete:
=========
"usertools.php?" . $vbulletin->session->vars['sessionurl'] . "do=doips&amp;u=" . $vbulletin->GPC['userid'] . "&amp;hash=" . CP_SESSIONHASH
=> $vbphrase['view_ip_addresses'],
=========
 
Search and delete:
=========
print_input_row($vbphrase['ip_address'], 'user[ipaddress]', $user['ipaddress']);
=========
 
Search and delete:
=========
print_yes_no_row($vbphrase['display_ip_address'], 'display[ipaddress]', 0);
=========
 
Search and delete:
=========
if ($vbulletin->GPC['display']['ipaddress'])
{
$header[] = $vbphrase['ip_address'];
}
=========
 
Search and delete:
=========
if ($vbulletin->GPC['display']['ipaddress'])
{
$cell[] = iif(!empty($user['ipaddress']), "$user[ipaddress] (" . @gethostbyaddr($user['ipaddress']) . ')', '&nbsp;');
}
=========
 
Search:
=========
SELECT userid, username, email, ipaddress
=========
Replace:
=========
SELECT userid, username, email
=========
 
Search and delete:
=========
$vbphrase['ip_address'],
=========
 
Search and delete:
=========
$cell[] = "<a href=\"usertools.php?" . $vbulletin->session->vars['sessionurl'] . "do=doips&amp;depth=2&amp;ipaddress=$user[ipaddress]&amp;hash=" . CP_SESSIONHASH . "\" target=\"_user\">$user[ipaddress]</a>";
=========
 
admincp\usertools.php
Search and delete:
=========
// ############################# start do ips #########################
if ($_REQUEST['do'] == 'doips')
{
if (function_exists('set_time_limit') AND !SAFEMODE)
{
@set_time_limit(0);
}
$vbulletin->input->clean_array_gpc('r', array(
'depth' => TYPE_INT,
'username' => TYPE_STR,
'ipaddress' => TYPE_NOHTML,
));
if (($vbulletin->GPC['username'] OR $vbulletin->GPC['userid'] OR $vbulletin->GPC['ipaddress']) AND $_POST['do'] != 'doips')
{
// we're doing a search of some type, that's not submitted via post,
// so we need to verify the CP sessionhash
verify_cp_sessionhash();
}
if (empty($vbulletin->GPC['depth']))
{
$vbulletin->GPC['depth'] = 1;
}
if ($vbulletin->GPC['username'])
{
$getuserid = $db->query_first("
SELECT userid
FROM " . TABLE_PREFIX . "user
WHERE username = '" . $db->escape_string(htmlspecialchars_uni($vbulletin->GPC['username'])) . "'
");
$userid = intval($getuserid['userid']);
if (!$userid)
{
print_stop_message('invalid_user_specified');
}
$userinfo = fetch_userinfo($userid);
}
else if ($vbulletin->GPC['userid'])
{
$userid = $vbulletin->GPC['userid'];
$userinfo = fetch_userinfo($userid);
if (!$userinfo)
{
print_stop_message('invalid_user_specified');
}
$vbulletin->GPC['username'] = unhtmlspecialchars($userinfo['username']);
}
else
{
$userid = 0;
}
if ($vbulletin->GPC['ipaddress'] OR $userid)
{
if ($vbulletin->GPC['ipaddress'])
{
print_form_header('', '');
print_table_header(construct_phrase($vbphrase['ip_address_search_for_ip_address_x'], $vbulletin->GPC['ipaddress']));
$hostname = @gethostbyaddr($vbulletin->GPC['ipaddress']);
if (!$hostname OR $hostname == $vbulletin->GPC['ipaddress'])
{
$hostname = $vbphrase['could_not_resolve_hostname'];
}
print_description_row("<div style=\"margin-left:20px\"><a href=\"usertools.php?" . $vbulletin->session->vars['sessionurl'] . "do=gethost&amp;ip=" . $vbulletin->GPC['ipaddress'] . "\">" . $vbulletin->GPC['ipaddress'] . "</a> : <b>$hostname</b></div>");
$results = construct_ip_usage_table($vbulletin->GPC['ipaddress'], 0, $vbulletin->GPC['depth']);
print_description_row($vbphrase['post_ip_addresses'], false, 2, 'thead');
print_description_row($results ? $results : $vbphrase['no_matches_found']);
$results = construct_ip_register_table($vbulletin->GPC['ipaddress'], 0, $vbulletin->GPC['depth']);
print_description_row($vbphrase['registration_ip_addresses'], false, 2, 'thead');
print_description_row($results ? $results : $vbphrase['no_matches_found']);
print_table_footer();
}
if ($userid)
{
print_form_header('', '');
print_table_header(construct_phrase($vbphrase['ip_address_search_for_user_x'], htmlspecialchars_uni($vbulletin->GPC['username'])));
print_label_row($vbphrase['registration_ip_address'], ($userinfo['ipaddress'] ? $userinfo['ipaddress'] : $vbphrase['n_a']));
$results = construct_user_ip_table($userid, 0, $vbulletin->GPC['depth']);
print_description_row($vbphrase['post_ip_addresses'], false, 2, 'thead');
print_description_row($results ? $results : $vbphrase['no_matches_found']);
if ($userinfo['ipaddress'])
{
$results = construct_ip_register_table($userinfo['ipaddress'], $userid, $vbulletin->GPC['depth']);
}
else
{
$results = '';
}
print_description_row($vbphrase['registration_ip_addresses'], false, 2, 'thead');
print_description_row($results ? $results : $vbphrase['no_matches_found']);
print_table_footer();
}
}
print_form_header('usertools', 'doips');
print_table_header($vbphrase['search_ip_addresses']);
print_input_row($vbphrase['find_users_by_ip_address'], 'ipaddress', $vbulletin->GPC['ipaddress'], 0);
print_input_row($vbphrase['find_ip_addresses_for_user'], 'username', $vbulletin->GPC['username']);
print_select_row($vbphrase['depth_to_search'], 'depth', array(1 => 1, 2 => 2), $vbulletin->GPC['depth']);
print_submit_row($vbphrase['find']);
}
// ############################# start gethost #########################
if ($_REQUEST['do'] == 'gethost')
{
$vbulletin->input->clean_array_gpc('r', array(
'ip' => TYPE_NOHTML,
));
print_form_header('', '');
print_table_header($vbphrase['ip_address']);
print_label_row($vbphrase['ip_address'], $vbulletin->GPC['ip']);
$resolvedip = @gethostbyaddr($vbulletin->GPC['ip']);
if ($resolvedip == $vbulletin->GPC['ip'])
{
print_label_row($vbphrase['host_name'], '<i>' . $vbphrase['n_a'] . '</i>');
}
else
{
print_label_row($vbphrase['host_name'], "<b>$resolvedip</b>");
}
($hook = vBulletinHook::fetch_hook('useradmin_gethost')) ? eval($hook) : false;
print_table_footer();
}
=========
[php/]
 

أبو العتاهيه

عضو مخضرم

أخى العزيز البدون هذا الكود مؤقت فقط
يستطيع اى شخص ان يحذف الـ ip الخاص فيه من المنتدى بمجرد اعطاء أمر خروج ..
هذا الكود أن تم زرعه فى قاعدة بيانات المنتدي .. سوف تجبر على تسجيل الدخول كل فتره بسيطه بسبب مسح الكونكيز
أما ارقام IP فهى فى قاعده البيانات محفوظه عن تسجيلك بالمنتدي + أميلك

تستطيع أن تتصفح النت أو المنتدي بشكل مجهول عبر هذا البرنامج Hide IP Platinum ولكنك لاتستطيع المشاركه بالمنتدي ,,

تقبل تقديرى ,,
 
أعلى