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,109 @@
|
||||
<?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
|
||||
| Ïðàâà íà ïåðåâîä IBResource (http://www.ibresource.ru)
|
||||
+---------------------------------------------------------------------------
|
||||
| > $Date: 2005-10-10 14:08:54 +0100 (Mon, 10 Oct 2005) $
|
||||
| > $Revision: 23 $
|
||||
| > $Author: matt $
|
||||
+---------------------------------------------------------------------------
|
||||
|
|
||||
| > Find-a-post module (a.k.a: The smallest IPB class ever)
|
||||
| > Module written by Matt Mecham
|
||||
| > Date started: 14th April 2004
|
||||
| > Interesting Fact: I've had iTunes playing every Radiohead tune
|
||||
| > I own for about a week now. Thats a lot of repeats. Got some
|
||||
| > cool rare tracks though. Every album+rare+b sides = 6.7 hours
|
||||
| > music. Not bad. I need to get our more. No, you can't take the
|
||||
| > laptop with you - nerd.
|
||||
|
|
||||
| > Module Version Number: 1.0.0
|
||||
| > DBA Checked: Wed 19 May 2004
|
||||
| > Quality Checked: Wed 15 Sept. 2004
|
||||
+--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
{
|
||||
print "<h1>Íåêîððåêòíûé àäðåñ</h1>Âû íå èìååòå äîñòóïà ê ýòîìó ôàéëó íàïðÿìóþ. Åñëè âû íåäàâíî îáíîâëÿëè ôîðóì, âû äîëæíû îáíîâèòü âñå ñîîòâåòñòâóþùèå ôàéëû.";
|
||||
exit();
|
||||
}
|
||||
|
||||
class findpost
|
||||
{
|
||||
# Classes
|
||||
var $ipsclass;
|
||||
|
||||
# Others
|
||||
var $post;
|
||||
|
||||
function auto_run()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Find a post
|
||||
// Don't really need to check perms 'cos topic
|
||||
// will do that for us. Woohoop
|
||||
//-----------------------------------------
|
||||
|
||||
$pid = intval($this->ipsclass->input['pid']);
|
||||
|
||||
if ( ! $pid )
|
||||
{
|
||||
$this->ipsclass->Error( array( LEVEL => 1, MSG => 'missing_files') );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Get topic...
|
||||
//-----------------------------------------
|
||||
|
||||
$post = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'posts', 'where' => 'pid='.$pid ) );
|
||||
|
||||
if ( ! $post['topic_id'] )
|
||||
{
|
||||
$this->ipsclass->Error( array( LEVEL => 1, MSG => 'missing_files') );
|
||||
}
|
||||
|
||||
$this->ipsclass->DB->simple_construct( array( 'select' => 'COUNT(*) as posts',
|
||||
'from' => 'posts',
|
||||
'where' => "topic_id=".$post['topic_id']." AND pid <= ".$pid,
|
||||
) );
|
||||
|
||||
$this->ipsclass->DB->simple_exec();
|
||||
|
||||
$cposts = $this->ipsclass->DB->fetch_row();
|
||||
|
||||
if ( (($cposts['posts']) % $this->ipsclass->vars['display_max_posts']) == 0 )
|
||||
{
|
||||
$pages = ($cposts['posts']) / $this->ipsclass->vars['display_max_posts'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$number = ( ($cposts['posts']) / $this->ipsclass->vars['display_max_posts'] );
|
||||
$pages = ceil( $number);
|
||||
}
|
||||
|
||||
$st = ($pages - 1) * $this->ipsclass->vars['display_max_posts'];
|
||||
|
||||
$this->ipsclass->boink_it($this->ipsclass->base_url."showtopic=".$post['topic_id']."&st=$st&p=$pid"."&#entry".$pid);
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in new issue
Block a user