Version 2.1.7
This commit is contained in:
1 parent
0eecc172d9
commit
f73f8bff6d
941 files changed
+215301
-103093
No files matched your search
@@ -0,0 +1,327 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| Invision Power Board 2.1.7
|
||||
| =============================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2005 Invision Power Services, Inc.
|
||||
| http://www.invisionpower.com
|
||||
| =============================================
|
||||
| Web: http://www.invisionboard.com
|
||||
| http://www.ibresource.ru/products/invisionpowerboard/
|
||||
| Time: Tuesday 18th of July 2006 05:56:00 PM
|
||||
| Release: 52f408a29988b02f45b5e6f4ba5af0ae
|
||||
| Licence Info: http://www.invisionboard.com/?license
|
||||
| http://www.ibresource.ru/license
|
||||
+---------------------------------------------------------------------------
|
||||
| INVISION POWER BOARD IS NOT FREE / OPEN SOURCE!
|
||||
+---------------------------------------------------------------------------
|
||||
| INVISION POWER BOARD ÍÅ ßÂËßÅÒÑß ÁÅÑÏËÀÒÍÛÌ ÏÐÎÃÐÀÌÌÍÛÌ ÎÁÅÑÏÅ×ÅÍÈÅÌ!
|
||||
| Ïðàâà íà ÏÎ ïðèíàäëåæàò Invision Power Services
|
||||
+---------------------------------------------------------------------------
|
||||
| > $Date: 2005-10-10 14:08:54 +0100 (Mon, 10 Oct 2005) $
|
||||
| > $Revision: 23 $
|
||||
| > $Author: matt $
|
||||
+---------------------------------------------------------------------------
|
||||
|
|
||||
| > Spider (MAN) Logs
|
||||
| > Module written by Matt Mecham
|
||||
| > Date started: 28th May 2003
|
||||
|
|
||||
| > Module Version Number: 1.0.0
|
||||
| > DBA Checked: Tue 25th May 2004
|
||||
+--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_ACP' ) )
|
||||
{
|
||||
print "<h1>Íåâåðíûé âõîä</h1> Ó Âàñ íåò äîñòóïà ê äèðåêòèâå ýòîãî ôàéëà. Åñëè Âû ïðîâîäèëè îáíîâëåíèÿ, óáåäèòåñü, ÷òî íå çàáûëè îáíîâèòü 'admin.php'.";
|
||||
exit();
|
||||
}
|
||||
|
||||
class ad_spiderlogs {
|
||||
|
||||
var $base_url;
|
||||
|
||||
/**
|
||||
* Section title name
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
var $perm_main = "admin";
|
||||
|
||||
/**
|
||||
* Section title name
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
var $perm_child = "spiderlog";
|
||||
|
||||
|
||||
function auto_run()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Kill globals - globals bad, Homer good.
|
||||
//-----------------------------------------
|
||||
|
||||
$tmp_in = array_merge( $_GET, $_POST, $_COOKIE );
|
||||
|
||||
foreach ( $tmp_in as $k => $v )
|
||||
{
|
||||
unset($$k);
|
||||
}
|
||||
|
||||
$this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Äåéñòâèÿ ïîèñêîâûõ áîòîâ' );
|
||||
|
||||
//-----------------------------------------
|
||||
// Get bot names
|
||||
//-----------------------------------------
|
||||
|
||||
foreach( explode( "\n", $this->ipsclass->vars['search_engine_bots'] ) as $bot )
|
||||
{
|
||||
list($ua, $n) = explode( "=", $bot );
|
||||
|
||||
$this->bot_map[ strtolower($ua) ] = $n;
|
||||
}
|
||||
|
||||
switch($this->ipsclass->input['code'])
|
||||
{
|
||||
case 'view':
|
||||
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' );
|
||||
$this->view();
|
||||
break;
|
||||
|
||||
case 'remove':
|
||||
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':remove' );
|
||||
$this->remove();
|
||||
break;
|
||||
|
||||
//-----------------------------------------
|
||||
default:
|
||||
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' );
|
||||
$this->list_current();
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Remove archived files
|
||||
//-----------------------------------------
|
||||
|
||||
function view()
|
||||
{
|
||||
$start = $this->ipsclass->input['st'] ? $this->ipsclass->input['st'] : 0;
|
||||
|
||||
$this->ipsclass->admin->page_detail = "Ïðîñìîòð âñåõ äåéñòâèé ïîèñêîâûìè áîòàìè";
|
||||
$this->ipsclass->admin->page_title = "Ìåíåäæåð ïîèñêîâûõ áîòîâ";
|
||||
|
||||
$botty = urldecode($this->ipsclass->input['bid']);
|
||||
|
||||
if ($this->ipsclass->input['search_string'] == "")
|
||||
{
|
||||
$this->ipsclass->DB->simple_construct( array( 'select' => 'COUNT(sid) as count', 'from' => 'spider_logs', 'where' => "bot='$botty'" ) );
|
||||
$this->ipsclass->DB->simple_exec();
|
||||
|
||||
$row = $this->ipsclass->DB->fetch_row();
|
||||
|
||||
$row_count = $row['count'];
|
||||
|
||||
$query = "&{$this->ipsclass->form_code}&bid={$this->ipsclass->input['bid']}&code=view";
|
||||
|
||||
$this->ipsclass->DB->simple_construct( array( 'select' => '*',
|
||||
'from' => 'spider_logs',
|
||||
'where' => "bot='$botty'",
|
||||
'order' => 'entry_date DESC',
|
||||
'limit' => array( $start, 20 ) ) );
|
||||
$this->ipsclass->DB->simple_exec();
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->ipsclass->input['search_string'] = urldecode($this->ipsclass->input['search_string']);
|
||||
|
||||
$this->ipsclass->DB->simple_construct( array( 'select' => 'COUNT(sid) as count', 'from' => 'spider_logs', 'where' => "query_string LIKE '%{$this->ipsclass->input['search_string']}%'" ) );
|
||||
$this->ipsclass->DB->simple_exec();
|
||||
|
||||
$row = $this->ipsclass->DB->fetch_row();
|
||||
|
||||
$row_count = $row['count'];
|
||||
|
||||
$query = "&{$this->ipsclass->form_code}&code=view&search_string=".urlencode($this->ipsclass->input['search_string']);
|
||||
|
||||
$this->ipsclass->DB->simple_construct( array( 'select' => '*',
|
||||
'from' => 'spider_logs',
|
||||
'where' => "query_string LIKE '%{$this->ipsclass->input['search_string']}%'",
|
||||
'order' => 'entry_date DESC',
|
||||
'limit' => array( $start, 20 ) ) );
|
||||
$this->ipsclass->DB->simple_exec();
|
||||
}
|
||||
|
||||
$links = $this->ipsclass->build_pagelinks( array( 'TOTAL_POSS' => $row_count,
|
||||
'PER_PAGE' => 20,
|
||||
'CUR_ST_VAL' => $start,
|
||||
'L_SINGLE' => "Îäíà ñòðàíèöà",
|
||||
'L_MULTI' => "Ñòðàíèöû: ",
|
||||
'BASE_URL' => $this->ipsclass->base_url.$query,
|
||||
)
|
||||
);
|
||||
|
||||
$this->ipsclass->admin->page_detail = "Âû ìîæåòå ïðîñìàòðèâàòü è óäàëÿòü äåéñòâèÿ ïîèñêîâûõ áîòîâ";
|
||||
$this->ipsclass->admin->page_title = "Ìåíåäæåð ïîèñêîâûõ áîòîâ";
|
||||
|
||||
//-----------------------------------------
|
||||
// Show form!
|
||||
//-----------------------------------------
|
||||
|
||||
$this->ipsclass->adskin->td_header[] = array( "Èìÿ áîòà" , "15%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "Ñòðîêà çàïðîñà" , "15%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "Äàòà è âðåìÿ" , "20%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "IP àäðåñ" , "10%" );
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Äåéñòâèÿ ïîèñêîâûõ áîòîâ ñîõðàíåíû" );
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic($links, 'right', 'pformstrip');
|
||||
|
||||
if ( $this->ipsclass->DB->get_num_rows() )
|
||||
{
|
||||
while ( $row = $this->ipsclass->DB->fetch_row() )
|
||||
{
|
||||
$extra = "";
|
||||
|
||||
if ( preg_match( '#lo-fi#i', $row['query_string'] ) )
|
||||
{
|
||||
$extra = '(Lo-Fi)';
|
||||
$row['query_string'] = 'showtopic='.preg_replace( "#Lo-Fi\: t(.+?)\.html#", "\\1", $row['query_string'] );
|
||||
}
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>".$this->bot_map[ strtolower($row['bot']) ]."</b>",
|
||||
"<a href='{$this->ipsclass->vars['board_url']}/index.{$this->ipsclass->vars['php_ext']}?{$row['query_string']}' target='_blank'>$extra {$row['query_string']}</a>",
|
||||
$this->ipsclass->admin->get_date( $row['entry_date'], 'LONG' ),
|
||||
"{$row['ip_address']}",
|
||||
) );
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic("<center>Ïîèñê íå äàë ðåçóëüòàòîâ</center>");
|
||||
}
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic($links, 'right', 'pformstrip');
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->end_table();
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
//-------------------------------
|
||||
|
||||
$this->ipsclass->admin->output();
|
||||
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Remove archived files
|
||||
//-----------------------------------------
|
||||
|
||||
function remove()
|
||||
{
|
||||
if ($this->ipsclass->input['bid'] == "")
|
||||
{
|
||||
$this->ipsclass->admin->error("Âû íå âûáðàëè áîòà, êîòîðîãî õîòèòå óäàëèòü!");
|
||||
}
|
||||
|
||||
$botty = urldecode($this->ipsclass->input['bid']);
|
||||
|
||||
$this->ipsclass->DB->simple_exec_query( array( 'delete' => 'spider_logs', 'where' => "bot='$botty'" ) );
|
||||
|
||||
$this->ipsclass->admin->save_log("Óäàëåííûå ïîèñêîâûå ëîãè");
|
||||
|
||||
$this->ipsclass->boink_it($this->ipsclass->base_url."&{$this->ipsclass->form_code}");
|
||||
exit();
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// SHOW ALL LANGUAGE PACKS
|
||||
//-----------------------------------------
|
||||
|
||||
function list_current()
|
||||
{
|
||||
$form_array = array();
|
||||
|
||||
$this->ipsclass->admin->page_detail = "Âû ìîæåòå ïðîñìàòðèâàòü è óäàëÿòü äåéñòâèÿ ïîèñêîâûõ áîòîâ";
|
||||
$this->ipsclass->admin->page_title = "Ìåíåäæåð ïîèñêîâûõ áîòîâ";
|
||||
|
||||
//-----------------------------------------
|
||||
|
||||
$this->ipsclass->adskin->td_header[] = array( "Èìÿ áîòà" , "20%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "Õèòîâ" , "20%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "Çàïóùåí" , "20%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "Ïðîñìîòð âñåõ äåéñòâèé" , "20%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "Óäàëèòü âñå äåéñòâèÿ" , "20%" );
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Ñîõðàíåííûå äåéñòâèÿ ïîèñêîâûõ áîòîâ" );
|
||||
|
||||
|
||||
$this->ipsclass->DB->cache_add_query( 'spiderlogs_list_current', array() );
|
||||
$this->ipsclass->DB->cache_exec_query();
|
||||
|
||||
while ( $r = $this->ipsclass->DB->fetch_row() )
|
||||
{
|
||||
|
||||
$url_butt = urlencode($r['bot']);
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( $this->bot_map[ strtolower($r['bot']) ],
|
||||
"<center>{$r['cnt']}</center>",
|
||||
$this->ipsclass->admin->get_date( $r['entry_date'], 'SHORT' ),
|
||||
"<center><a href='".$this->ipsclass->base_url."&{$this->ipsclass->form_code}&code=view&bid={$url_butt}'>Ïðîñìîòð</a></center>",
|
||||
"<center><a href='".$this->ipsclass->base_url."&{$this->ipsclass->form_code}&code=remove&bid={$url_butt}'>Óäàëèòü</a></center>",
|
||||
) );
|
||||
}
|
||||
|
||||
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->end_table();
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
//-------------------------------
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'view' ),
|
||||
2 => array( 'act' , 'spiderlog' ),
|
||||
4 => array( 'section', $this->ipsclass->section_code ),
|
||||
) );
|
||||
|
||||
$this->ipsclass->adskin->td_header[] = array( " " , "40%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( " " , "60%" );
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Ïîèñê äåéñòâèé ïîèñêîâîãî áîòà" );
|
||||
|
||||
//-----------------------------------------
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>Èñêàòü...</b>" ,
|
||||
$this->ipsclass->adskin->form_input( "search_string").'... â ñòðîêå çàïðîñà'
|
||||
) );
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->end_form("Èñêàòü");
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->end_table();
|
||||
|
||||
//-----------------------------------------
|
||||
//-------------------------------
|
||||
|
||||
$this->ipsclass->admin->output();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
Reference in new issue
Block a user