Version 2.2.0 RC-1

This commit is contained in:
Neo committed 2025-12-19 00:22:37 -08:00
1 parent f73f8bff6d
commit 22f1b963ee
1034 files changed
+178610 -70897

No files matched your search

+16 -18
View File
@@ -2,27 +2,17 @@
/*
+--------------------------------------------------------------------------
| Invision Power Board 2.1.7
| Invision Power Board
| =============================================
| by Matthew Mecham
| (c) 2001 - 2005 Invision Power Services, Inc.
| (c) 2001 - 2006 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-12-06 17:36:43 +0000 (Tue, 06 Dec 2005) $
| > $Revision: 94 $
| > $Date: 2006-10-17 22:30:46 +0100 (Tue, 17 Oct 2006) $
| > $Revision: 652 $
| > $Author: bfarber $
+---------------------------------------------------------------------------
|
@@ -38,7 +28,7 @@
if ( ! defined( 'IN_IPB' ) )
{
print "<h1>Íåêîððåêòíûé àäðåñ</h1>Âû íå èìååòå äîñòóïà ê ýòîìó ôàéëó íàïðÿìóþ. Åñëè âû íåäàâíî îáíîâëÿëè ôîðóì, âû äîëæíû îáíîâèòü âñå ñîîòâåòñòâóþùèå ôàéëû.";
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
exit();
}
@@ -136,12 +126,20 @@ class announcements
$topic->topic_init();
$topic->topic['forum_id'] = 0;
$topic->topic['tid'] = 0;
//-----------------------------------------
// Parsey parsey!
//-----------------------------------------
$member = $topic->parse_member( $announce );
if ( $member['id'] )
{
$member['_members_display_name'] = "<a href='{$this->base_url}showuser={$member['id']}'>{$member['members_display_name_short']}</a>";
}
//-----------------------------------------
// Parse HTML tag on the fly
//-----------------------------------------
@@ -155,15 +153,15 @@ class announcements
if ( $announce['announce_start'] and $announce['announce_end'] )
{
$announce['running_date'] = sprintf( $this->ipsclass->lang['announce_both'], gmdate( 'j.n.Y', $announce['announce_start'] ), gmdate( 'j.n.Y', $announce['announce_end'] ) );
$announce['running_date'] = sprintf( $this->ipsclass->lang['announce_both'], gmdate( 'jS F Y', $announce['announce_start'] ), gmdate( 'jS F Y', $announce['announce_end'] ) );
}
else if ( $announce['announce_start'] and ! $announce['announce_end'] )
{
$announce['running_date'] = sprintf( $this->ipsclass->lang['announce_start'], gmdate( 'j.n.Y', $announce['announce_start'] ) );
$announce['running_date'] = sprintf( $this->ipsclass->lang['announce_start'], gmdate( 'jS F Y', $announce['announce_start'] ) );
}
else if ( ! $announce['announce_start'] and $announce['announce_end'] )
{
$announce['running_date'] = sprintf( $this->ipsclass->lang['announce_end'], gmdate( 'j.n.Y', $announce['announce_end'] ) );
$announce['running_date'] = sprintf( $this->ipsclass->lang['announce_end'], gmdate( 'jS F Y', $announce['announce_end'] ) );
}
else
{
+550
View File
@@ -0,0 +1,550 @@
<?php
/*
+--------------------------------------------------------------------------
| Invision Power Board
| =============================================
| by Matthew Mecham
| (c) 2001 - 2006 Invision Power Services, Inc.
| http://www.invisionpower.com
| =============================================
| Web: http://www.invisionboard.com
| Licence Info: http://www.invisionboard.com/?license
+---------------------------------------------------------------------------
| > $Date: 2006-05-05 21:58:19 +0100 (Fri, 05 May 2006) $
| > $Revision: 246 $
| > $Author: bfarber $
+---------------------------------------------------------------------------
|
| > Attachment Handler module
| > Module written by Matt Mecham
| > Date started: 10th March 2002
|
| > Module Version Number: 1.0.0
| > DBA Checked: Mon 24th May 2004
+--------------------------------------------------------------------------
*/
if ( ! defined( 'IN_IPB' ) )
{
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
exit();
}
class attach {
/*-------------------------------------------------------------------------*/
//
// AUTO RUN
//
/*-------------------------------------------------------------------------*/
function auto_run()
{
//-----------------------------------------
// INIT
//-----------------------------------------
$this->ipsclass->input['id'] = intval($this->ipsclass->input['id']);
$this->ipsclass->input['tid'] = intval($this->ipsclass->input['tid']);
//-----------------------------------------
// Get the attach class
//-----------------------------------------
require_once( ROOT_PATH . 'sources/classes/attach/class_attach.php' );
$this->class_attach = new class_attach();
$this->class_attach->ipsclass =& $this->ipsclass;
//-----------------------------------------
// Got attachment types?
//-----------------------------------------
if ( ! isset( $this->ipsclass->cache['attachtypes'] ) OR ! is_array( $this->ipsclass->cache['attachtypes'] ) )
{
$this->ipsclass->cache['attachtypes'] = array();
$this->ipsclass->DB->simple_construct( array( 'select' => 'atype_extension,atype_mimetype,atype_post,atype_photo,atype_img',
'from' => 'attachments_type',
'where' => "atype_photo=1 OR atype_post=1" ) );
$this->ipsclass->DB->simple_exec();
while ( $r = $this->ipsclass->DB->fetch_row() )
{
$this->ipsclass->cache['attachtypes'][ $r['atype_extension'] ] = $r;
}
}
//-----------------------------------------
// What to do..
//-----------------------------------------
switch( $this->ipsclass->input['code'] )
{
case 'attach_upload_show':
$this->attach_upload_show();
break;
case 'attach_upload_process':
$this->attach_upload_process();
break;
case 'attach_upload_remove':
$this->attach_upload_remove();
break;
case 'showtopic':
$this->show_topic_attachments();
break;
default:
$this->show_post_attachment();
break;
}
}
/*-------------------------------------------------------------------------*/
// Remove an upload
/*-------------------------------------------------------------------------*/
function attach_upload_remove()
{
//-----------------------------------------
// INIT
//-----------------------------------------
$attach_post_key = trim( $this->ipsclass->txt_alphanumerical_clean( $this->ipsclass->input['attach_post_key'] ) );
$attach_rel_module = trim( $this->ipsclass->txt_alphanumerical_clean( $this->ipsclass->input['attach_rel_module'] ) );
$attach_rel_id = intval( $this->ipsclass->input['attach_rel_id'] );
$attach_id = intval( $this->ipsclass->input['attach_id'] );
//-----------------------------------------
// INIT module
//-----------------------------------------
$this->class_attach->type = $attach_rel_module;
$this->class_attach->attach_post_key = $attach_post_key;
$this->class_attach->attach_rel_id = $attach_rel_id;
$this->class_attach->attach_id = $attach_id;
$this->class_attach->init();
//-----------------------------------------
// Process upload
//-----------------------------------------
$this->class_attach->remove_attachment();
//-----------------------------------------
// Show form again
//-----------------------------------------
$this->attach_upload_show("attach_removed");
}
/*-------------------------------------------------------------------------*/
// Perform the actual upload
/*-------------------------------------------------------------------------*/
function attach_upload_process()
{
//-----------------------------------------
// INIT
//-----------------------------------------
$attach_post_key = trim( $this->ipsclass->txt_alphanumerical_clean( $this->ipsclass->input['attach_post_key'] ) );
$attach_rel_module = trim( $this->ipsclass->txt_alphanumerical_clean( $this->ipsclass->input['attach_rel_module'] ) );
$attach_rel_id = intval( $this->ipsclass->input['attach_rel_id'] );
$attach_current_items = '';
//-----------------------------------------
// INIT module
//-----------------------------------------
$this->class_attach->type = $attach_rel_module;
$this->class_attach->attach_post_key = $attach_post_key;
$this->class_attach->attach_rel_id = $attach_rel_id;
$this->class_attach->init();
//-----------------------------------------
// Process upload
//-----------------------------------------
$this->class_attach->process_upload();
//-----------------------------------------
// Got an error?
//-----------------------------------------
if ( $this->class_attach->error )
{
$this->attach_upload_show( $this->class_attach->error, 1 );
return;
}
else
{
$this->attach_upload_show( 'upload_ok', 0 );
return;
}
}
/*-------------------------------------------------------------------------*/
// Show the attach upload field
/*-------------------------------------------------------------------------*/
function attach_upload_show( $msg="ready", $is_error=0 )
{
//-----------------------------------------
// INIT
//-----------------------------------------
$attach_post_key = trim( $this->ipsclass->txt_alphanumerical_clean( $this->ipsclass->input['attach_post_key'] ) );
$attach_rel_module = trim( $this->ipsclass->txt_alphanumerical_clean( $this->ipsclass->input['attach_rel_module'] ) );
$attach_rel_id = intval( $this->ipsclass->input['attach_rel_id'] );
$attach_current_items = '';
$extra_upload_form_url = '';
//-----------------------------------------
// Get extra form fields
//-----------------------------------------
foreach( $this->ipsclass->input as $k => $v )
{
if ( preg_match( "#^--ff--#", $k ) )
{
$extra_upload_form_url .= '&amp;' . str_replace( '--ff--', '', $k ) . '='.$v;
$extra_upload_form_url .= '&amp;' . $k . '='.$v;
}
}
//-----------------------------------------
// INIT module
//-----------------------------------------
$this->class_attach->type = $attach_rel_module;
$this->class_attach->init();
$this->class_attach->get_upload_form_settings();
//-----------------------------------------
// Load language and skin
//-----------------------------------------
$this->ipsclass->load_template( 'skin_post' );
$this->ipsclass->load_language( 'lang_post' );
//-----------------------------------------
// Generate current items...
//-----------------------------------------
$_more = ( $attach_rel_id ) ? ' OR c.attach_rel_id='.$attach_rel_id : '';
$this->ipsclass->DB->build_query( array( 'select' => 'c.*',
'from' => array( 'attachments' => 'c' ),
'where' => "c.attach_rel_module='".$attach_rel_module."' AND c.attach_post_key='".$attach_post_key."'".$_more,
'add_join' => array( 0 => array(
'select' => 't.*',
'from' => array( 'attachments_type' => 't' ),
'where' => 't.atype_extension=c.attach_ext',
'type' => 'left' ) )
) );
$this->ipsclass->DB->exec_query();
while( $row = $this->ipsclass->DB->fetch_row() )
{
$attach_current_items .= $this->ipsclass->compiled_templates['skin_post']->attach_current_item( $row['attach_id'] ,
$row['attach_file'],
$this->ipsclass->size_format( $row['attach_filesize'] ),
$row['atype_img'] );
}
//-----------------------------------------
// Show..
//-----------------------------------------
$html = $this->ipsclass->compiled_templates['skin_post']->attach_wrapper( $attach_current_items, $attach_rel_module, $attach_rel_id, $attach_post_key, $this->class_attach->attach_stats, $msg, $is_error, $extra_upload_form_url );
//-----------------------------------------
// Print it...
//-----------------------------------------
$this->ipsclass->skin['_macros'][] = array( 'macro_value' => '__body_extra__', 'macro_replace' => " style='background:transparent;'" );
$this->ipsclass->print->pop_up_window( "", $html );
}
/*-------------------------------------------------------------------------*/
//
// SHOW TOPIC ATTACHMENTS ( MULTIPLE )
//
/*-------------------------------------------------------------------------*/
function show_topic_attachments()
{
//-----------------------------------------
// INIT
//-----------------------------------------
$topic_id = intval( $this->ipsclass->input['tid'] );
//-----------------------------------------
// Check..
//-----------------------------------------
if ( ! $topic_id )
{
$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'missing_files' ) );
}
//-----------------------------------------
// get topic..
//-----------------------------------------
$topic = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'topics', 'where' => 'tid='.$topic_id ) );
if ( ! $topic['topic_hasattach'] )
{
$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'missing_files' ) );
}
//-----------------------------------------
// Check forum..
//-----------------------------------------
if ( ! $this->ipsclass->forums->forum_by_id[ $topic['forum_id'] ] )
{
$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_permission' ) );
}
//-----------------------------------------
// Get forum skin and lang
//-----------------------------------------
$this->ipsclass->load_language('lang_forum');
$this->ipsclass->load_language('lang_topic');
$this->ipsclass->load_template('skin_forum');
//-----------------------------------------
// aight.....
//-----------------------------------------
$_queued = ( ! $this->ipsclass->can_queue_posts( $topic['forum_id'] ) ) ? ' AND p.queued=0' : '';
$this->output .= $this->ipsclass->compiled_templates['skin_forum']->forums_attachments_top($topic['title']);
$this->ipsclass->DB->build_query( array( 'select' => 'p.pid, p.topic_id',
'from' => array( 'posts' => 'p' ),
'where' => 'p.topic_id='.$topic_id . $_queued,
'add_join' => array( 0 => array(
'select' => 'a.*',
'from' => array( 'attachments' => 'a' ),
'where' => "a.attach_rel_module='post' AND a.attach_rel_id=p.pid",
'type' => 'left' ) )
) );
$this->ipsclass->DB->exec_query();
while ( $row = $this->ipsclass->DB->fetch_row() )
{
if ( $this->ipsclass->check_perms($this->ipsclass->forums->forum_by_id[ $topic['forum_id'] ]['read_perms']) != TRUE )
{
continue;
}
if ( ! $row['attach_id'] )
{
continue;
}
$row['image'] = $this->ipsclass->cache['attachtypes'][ $row['attach_ext'] ]['atype_img'];
$row['short_name'] = $this->ipsclass->txt_truncate( $row['attach_file'], 30 );
$row['attach_date'] = $this->ipsclass->get_date( $row['attach_date'], 'SHORT' );
$row['real_size'] = $this->ipsclass->size_format( $row['attach_filesize'] );
$this->output .= $this->ipsclass->compiled_templates['skin_forum']->forums_attachments_row( $row );
}
$this->output .= $this->ipsclass->compiled_templates['skin_forum']->forums_attachments_bottom();
$this->ipsclass->print->pop_up_window($this->ipsclass->lang['attach_title'], $this->output);
}
/*-------------------------------------------------------------------------*/
//
// SHOW POST ATTACHMENT ( SINGLE )
//
/*-------------------------------------------------------------------------*/
function show_post_attachment()
{
//-----------------------------------------
// INIT
//-----------------------------------------
$attach_id = intval( $this->ipsclass->input['id'] );
//-----------------------------------------
// INIT module
//-----------------------------------------
$this->class_attach->init();
//-----------------------------------------
// Process upload
//-----------------------------------------
$this->class_attach->show_attachment( $attach_id );
exit();
/*if ( ! $this->ipsclass->input['id'] )
{
$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'missing_files' ) );
}
//-----------------------------------------
// get attachment
//-----------------------------------------
$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'attachments', 'where' => "attach_id=".intval($this->ipsclass->input['id']) ) );
$this->ipsclass->DB->simple_exec();
if ( ! $attach = $this->ipsclass->DB->fetch_row() )
{
$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'missing_files' ) );
}
//-----------------------------------------
// Handle post attachments.
//-----------------------------------------
if ( $this->ipsclass->input['type'] == 'post' )
{
//-----------------------------------------
// TheWalrus inspired fix for previewing
// the post and clicking the attachment...
//-----------------------------------------
if ( $attach['attach_pid'] == 0 AND $attach['attach_member_id'] == $this->ipsclass->member['id'] )
{
# We're OK (Further checking, maybe post key?
}
else
{
//-----------------------------------------
// Get post thingy majiggy to check perms
//-----------------------------------------
$this->ipsclass->DB->cache_add_query( 'attach_get_perms', array( 'apid' => $attach['attach_pid'] ) );
$this->ipsclass->DB->cache_exec_query();
if ( ! $post = $this->ipsclass->DB->fetch_row() )
{
$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_permission' ) );
}
if ( ! $this->ipsclass->forums->forum_by_id[ $post['forum_id'] ] )
{
//-----------------------------------------
// TheWalrus inspired fix for previewing
// the post and clicking the attachment...
//-----------------------------------------
if ( $attach['attach_pid'] == 0 AND $attach['attach_member_id'] == $this->ipsclass->member['id'] )
{
# We're ok.
}
else
{
$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_permission' ) );
}
}
if ( $this->ipsclass->check_perms($this->ipsclass->forums->forum_by_id[ $post['forum_id'] ]['read_perms']) == FALSE )
{
$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_permission' ) );
}
if ( $this->ipsclass->check_perms($this->ipsclass->forums->forum_by_id[ $post['forum_id'] ]['download_perms']) == FALSE )
{
$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_permission' ) );
}
}
}
else if ( $this->ipsclass->input['type'] == 'msg' and $attach['attach_msg'] )
{
$this->ipsclass->DB->simple_construct( array( 'select' => 'mt_id, mt_owner_id', 'from' => 'message_topics', 'where' => 'mt_owner_id='.$this->ipsclass->member['id'].' AND mt_msg_id='.$attach['attach_msg'] ) );
$this->ipsclass->DB->simple_exec();
if ( ! $post = $this->ipsclass->DB->fetch_row() )
{
$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'missing_files' ) );
}
}
else
{
$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'missing_files' ) );
}
//-----------------------------------------
// Show attachment
//-----------------------------------------
$file = $this->ipsclass->vars['upload_dir']."/".$attach['attach_location'];
if ( file_exists( $file ) and ( $this->ipsclass->cache['attachtypes'][ $attach['attach_ext'] ]['atype_mimetype'] != "" ) )
{
//-----------------------------------------
// Update the "hits"..
//-----------------------------------------
$this->ipsclass->DB->simple_construct( array( 'update' => 'attachments', 'set' =>"attach_hits=attach_hits+1", 'where' => "attach_id=".$this->ipsclass->input['id'] ) );
$this->ipsclass->DB->simple_exec();
//print $attach['attach_hits'];
//-----------------------------------------
// If this is a TXT / HTML file, force an
// odd extension to prevent IE from opening
// it inline.
//-----------------------------------------
$file_extension = preg_replace( "#^.*\.(.+?)$#s", "\\1", $attach['attach_file'] );
$safe_array = array( 'txt', 'html', 'htm' );
if ( in_array( strtolower($file_extension), $safe_array ) )
{
//$attach['attach_file'] .= '-rename';
}
//-----------------------------------------
// Set up the headers..
//-----------------------------------------
header( "Content-Type: ".$this->ipsclass->cache['attachtypes'][ $attach['attach_ext'] ]['atype_mimetype'] );
header( "Content-Disposition: inline; filename=\"".$attach['attach_file']."\"" );
header( "Content-Length: ".(string)(filesize( $file ) ) );
//-----------------------------------------
// Open and display the file..
//-----------------------------------------
$fh = fopen( $file, 'rb' ); // <{%dyn.down.var.md5p1%}>, Set binary for Win even if it's an ascii file, it won't hurt.
fpassthru( $fh );
fclose( $fh );
exit();
}
else
{
//-----------------------------------------
// File does not exist..
//-----------------------------------------
$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'missing_files' ) );
}*/
}
}
?>
+464 -448
View File
@@ -1,449 +1,465 @@
<?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-11 13:14:29 +0100 (Tue, 11 Oct 2005) $
| > $Revision: 38 $
| > $Author: matt $
+---------------------------------------------------------------------------
|
| > Board index module
| > Module written by Matt Mecham
| > Date started: 17th February 2002
|
| > 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 boards
{
# Global
var $ipsclass;
var $output = "";
var $base_url = "";
var $html = "";
var $forums = array();
var $mods = array();
var $cats = array();
var $children = array();
var $nav;
var $db_row = array();
var $news_topic_id = "";
var $news_forum_id = "";
var $news_title = "";
var $sep_char = "";
var $statfunc = "";
/*-------------------------------------------------------------------------*/
// INIT
/*-------------------------------------------------------------------------*/
function init()
{
$this->base_url = $this->ipsclass->base_url;
// Get more words for this invocation!
$this->ipsclass->load_language('lang_boards');
$this->ipsclass->load_template('skin_boards');
}
/*-------------------------------------------------------------------------*/
// Auto run function
/*-------------------------------------------------------------------------*/
function auto_run()
{
$this->init();
$this->statfunc = $this->ipsclass->load_class( ROOT_PATH.'sources/lib/func_boardstats.php', 'func_boardstats' );
$this->statfunc->register_class( $this );
if (! $this->ipsclass->member['id'] )
{
$this->ipsclass->input['last_visit'] = time();
}
if ( $this->ipsclass->vars['converge_login_method'] != 'username' )
{
$this->ipsclass->lang['qli_name'] = $this->ipsclass->lang['email_address'];
}
$this->output .= $this->ipsclass->compiled_templates['skin_boards']->PageTop( $this->ipsclass->get_date( $this->ipsclass->input['last_visit'], 'LONG' ) );
//-----------------------------------------
// Get DB markers
//-----------------------------------------
$this->boards_get_db_tracker();
//-----------------------------------------
// What are we doing?
//-----------------------------------------
$this->process_all_cats();
//-----------------------------------------
// Add in show online users
//-----------------------------------------
$stats_html .= $this->statfunc->active_users();
//-----------------------------------------
// Are we viewing the calendar?
//-----------------------------------------
$stats_html .= $this->statfunc->show_calendar_events();
//-----------------------------------------
// Add in show stats
//-----------------------------------------
$stats_html .= $this->statfunc->show_totals();
if ($stats_html != "")
{
$collapsed_ids = ','.$this->ipsclass->my_getcookie('collapseprefs').',';
$show['div_fo'] = 'show';
$show['div_fc'] = 'none';
if ( strstr( $collapsed_ids, ',stat,' ) )
{
$show['div_fo'] = 'none';
$show['div_fc'] = 'show';
}
$this->output .= $this->ipsclass->compiled_templates['skin_boards']->stats_header($this->statfunc->users_online, $this->statfunc->total_posts, $this->statfunc->total_members, $show);
$this->output .= $stats_html;
$this->output .= $this->ipsclass->compiled_templates['skin_boards']->stats_footer();
}
//-----------------------------------------
// Add in board info footer
//-----------------------------------------
$this->output .= $this->ipsclass->compiled_templates['skin_boards']->bottom_links();
//-----------------------------------------
// Check for news forum.
//-----------------------------------------
if ( $this->ipsclass->forums->forum_by_id[ $this->ipsclass->vars['news_forum_id'] ]['last_id'] and $this->ipsclass->vars['index_news_link'] )
{
$t_html = $this->ipsclass->compiled_templates['skin_boards']->newslink( $this->news_forum_id, stripslashes($this->ipsclass->forums->forum_by_id[ $this->ipsclass->vars['news_forum_id'] ]['last_title']) ,
$this->ipsclass->forums->forum_by_id[ $this->ipsclass->vars['news_forum_id'] ]['last_id']);
$this->output = str_replace( "<!-- IBF.NEWSLINK -->" , "$t_html" , $this->output );
}
//-----------------------------------------
// Showing who's chatting NEW?
// IPB3.0: To Do: move into components
//-----------------------------------------
$this->ipsclass->vars['chat04_account_no'] = $this->ipsclass->vars['chat04_account_no'] ? $this->ipsclass->vars['chat04_account_no'] : $this->ipsclass->vars['chat_account_no'];
$this->ipsclass->vars['chat04_who_on'] = $this->ipsclass->vars['chat04_who_on'] ? $this->ipsclass->vars['chat04_who_on'] : $this->ipsclass->vars['chat_who_on'];
if ( $this->ipsclass->vars['chat04_account_no'] and $this->ipsclass->vars['chat04_who_on'] )
{
require_once( ROOT_PATH.'sources/lib/func_chat.php' );
$chat = new func_chat();
$chat->ipsclass =& $this->ipsclass;
$chat->register_class( $this );
$chat_html = $chat->get_online_list();
$this->output = str_replace( "<!--IBF.WHOSCHATTING-->", $chat_html, $this->output );
}
//-----------------------------------------
// Print as normal
//-----------------------------------------
$this->ipsclass->print->add_output( $this->output );
$cp = " (BestWarez.Ru)";
if ($this->ipsclass->vars['ips_cp_purchase'])
{
$cp = "";
}
$this->ipsclass->print->do_output( array( 'TITLE' => $this->ipsclass->vars['board_name'].$cp, 'JS' => 0, 'NAV' => $this->nav ) );
}
/*-------------------------------------------------------------------------*/
//
// Display sub forums
//
/*-------------------------------------------------------------------------*/
function show_subforums($fid)
{
$this->init();
//-----------------------------------------
// Get show / hide cookah
//-----------------------------------------
$collapsed_ids = ','.$this->ipsclass->my_getcookie('collapseprefs').',';
$this->ipsclass->forums->register_class( $this );
if ( is_array( $this->ipsclass->forums->forum_cache[ $fid ] ) )
{
$cat_data = $this->ipsclass->forums->forum_by_id[ $fid ];
$cat_data['div_fo'] = '';
$cat_data['div_fc'] = 'none';
if ( strstr( $collapsed_ids, ','.$fid.',' ) and ( $cat_data['sub_can_post'] == 1 ) )
{
$cat_data['div_fo'] = 'none';
$cat_data['div_fc'] = '';
}
foreach( $this->ipsclass->forums->forum_cache[ $fid ] as $id => $forum_data )
{
//-----------------------------------------
// Get all subforum stats
// and calculate
//-----------------------------------------
if ( $this->ipsclass->vars['forum_cache_minimum'] )
{
$forum_data['description'] = "<!--DESCRIPTION:{$forum_data['id']}-->";
$need_desc[] = $forum_data['id'];
}
if ( $forum_data['redirect_on'] )
{
$temp_html .= $this->ipsclass->compiled_templates['skin_boards']->forum_redirect_row( $forum_data );
}
else
{
$temp_html .= $this->ipsclass->compiled_templates['skin_boards']->ForumRow( $this->ipsclass->forums->forums_format_lastinfo( $this->ipsclass->forums->forums_calc_children( $forum_data['id'], $forum_data ) ) );
}
}
}
if ( $temp_html )
{
$sub_output .= $this->ipsclass->compiled_templates['skin_boards']->subheader($cat_data);
$sub_output .= $temp_html;
$sub_output .= $this->ipsclass->compiled_templates['skin_boards']->end_this_cat();
}
else
{
return $sub_output;
}
unset($temp_html);
$sub_output .= $this->ipsclass->compiled_templates['skin_boards']->end_all_cats();
//-----------------------------------------
// Get descriptions?
//-----------------------------------------
if ( $this->ipsclass->vars['forum_cache_minimum'] and count($need_desc) )
{
$this->ipsclass->DB->simple_construct( array( 'select' => 'id,description', 'from' => 'forums', 'where' => 'id IN('.implode( ',', $need_desc ) .')' ) );
$this->ipsclass->DB->simple_exec();
while( $r = $this->ipsclass->DB->fetch_row() )
{
$sub_output = str_replace( "<!--DESCRIPTION:{$r['id']}-->", $r['description'], $sub_output );
}
}
return $sub_output;
}
/*-------------------------------------------------------------------------*/
//
// PROCESS ALL CATEGORIES
//
/*-------------------------------------------------------------------------*/
function process_all_cats()
{
$need_desc = array();
$root = array();
$parent = array();
//-----------------------------------------
// Want to view categories?
//-----------------------------------------
if ( $this->ipsclass->input['c'] )
{
foreach( explode( ",", $this->ipsclass->input['c'] ) as $c )
{
$c = intval( $c );
$i = $this->ipsclass->forums->forum_by_id[ $c ]['parent_id'];
$root[ $i ] = $i;
$parent[ $c ] = $c;
}
}
if ( ! count( $root ) )
{
$root[] = 'root';
}
//-----------------------------------------
// Get show / hide cookah
//-----------------------------------------
$collapsed_ids = ','.$this->ipsclass->my_getcookie('collapseprefs').',';
$this->ipsclass->forums->register_class( $this );
foreach( $root as $root_id )
{
if ( is_array( $this->ipsclass->forums->forum_cache[ $root_id ] ) and count( $this->ipsclass->forums->forum_cache[ $root_id ] ) )
{
foreach( $this->ipsclass->forums->forum_cache[ $root_id ] as $id => $forum_data )
{
//-----------------------------------------
// Only showing certain root forums?
//-----------------------------------------
if ( count( $parent ) )
{
if ( ! in_array( $id, $parent ) )
{
continue;
}
}
$cat_data = $forum_data;
$cat_data['div_fo'] = 'show';
$cat_data['div_fc'] = 'none';
if ( strstr( $collapsed_ids, ','.$cat_data['id'].',' ) )
{
$cat_data['div_fo'] = 'none';
$cat_data['div_fc'] = 'show';
}
if ( is_array( $this->ipsclass->forums->forum_cache[ $forum_data['id'] ] ) )
{
foreach( $this->ipsclass->forums->forum_cache[ $forum_data['id'] ] as $id => $forum_data )
{
//-----------------------------------------
// Get all subforum stats
// and calculate
//-----------------------------------------
if ( $this->ipsclass->vars['forum_cache_minimum'] )
{
$forum_data['description'] = "<!--DESCRIPTION:{$forum_data['id']}-->";
$need_desc[] = $forum_data['id'];
}
if ( $forum_data['redirect_on'] )
{
$temp_html .= $this->ipsclass->compiled_templates['skin_boards']->forum_redirect_row( $forum_data );
}
else
{
$temp_html .= $this->ipsclass->compiled_templates['skin_boards']->ForumRow( $this->ipsclass->forums->forums_format_lastinfo( $this->ipsclass->forums->forums_calc_children( $forum_data['id'], $forum_data ) ) );
}
}
}
if ( $temp_html )
{
$this->output .= $this->ipsclass->compiled_templates['skin_boards']->CatHeader_Expanded($cat_data);
$this->output .= $temp_html;
$this->output .= $this->ipsclass->compiled_templates['skin_boards']->end_this_cat();
}
unset($temp_html);
}
}
}
$this->output .= $this->ipsclass->compiled_templates['skin_boards']->end_all_cats();
//-----------------------------------------
// Get descriptions?
//-----------------------------------------
if ( $this->ipsclass->vars['forum_cache_minimum'] and count($need_desc) )
{
$this->ipsclass->DB->simple_construct( array( 'select' => 'id,description', 'from' => 'forums', 'where' => 'id IN('.implode( ',', $need_desc ) .')' ) );
$this->ipsclass->DB->simple_exec();
while( $r = $this->ipsclass->DB->fetch_row() )
{
$this->output = str_replace( "<!--DESCRIPTION:{$r['id']}-->", $r['description'], $this->output );
}
}
}
/*-------------------------------------------------------------------------*/
// DB Tracker
/*-------------------------------------------------------------------------*/
function boards_get_db_tracker()
{
if ( $this->ipsclass->vars['db_topic_read_cutoff'] and $this->ipsclass->member['id'] )
{
$this->ipsclass->DB->simple_construct( array( 'select' => '*',
'from' => 'topic_markers',
'where' => "marker_member_id=".$this->ipsclass->member['id'],
) );
$this->ipsclass->DB->simple_exec();
while( $r = $this->ipsclass->DB->fetch_row() )
{
$this->ipsclass->forums->forum_cache[ $this->ipsclass->forums->forum_by_id[ $r['marker_forum_id'] ]['parent_id'] ][ $r['marker_forum_id'] ]['_db_row'] = $r;
$this->ipsclass->forums->forum_by_id[ $r['marker_forum_id'] ]['_db_row'] = $r;
}
}
}
}
<?php
/*
+--------------------------------------------------------------------------
| Invision Power Board
| =============================================
| by Matthew Mecham
| (c) 2001 - 2006 Invision Power Services, Inc.
| http://www.invisionpower.com
| =============================================
| Web: http://www.invisionboard.com
| Licence Info: http://www.invisionboard.com/?license
+---------------------------------------------------------------------------
| > $Date: 2006-09-22 11:28:54 +0100 (Fri, 22 Sep 2006) $
| > $Revision: 567 $
| > $Author: matt $
+---------------------------------------------------------------------------
|
| > Board index module
| > Module written by Matt Mecham
| > Date started: 17th February 2002
|
| > Module Version Number: 1.0.0
| > DBA Checked: Wed 19 May 2004
| > Quality Checked: Wed 15 Sept. 2004
+--------------------------------------------------------------------------
*/
if ( ! defined( 'IN_IPB' ) )
{
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
exit();
}
class boards
{
# Global
var $ipsclass;
var $output = "";
var $base_url = "";
var $html = "";
var $forums = array();
var $mods = array();
var $cats = array();
var $children = array();
var $nav;
var $db_row = array();
var $news_topic_id = "";
var $news_forum_id = "";
var $news_title = "";
var $sep_char = "";
var $statfunc = "";
/*-------------------------------------------------------------------------*/
// INIT
/*-------------------------------------------------------------------------*/
function init()
{
$this->base_url = $this->ipsclass->base_url;
// Get more words for this invocation!
$this->ipsclass->load_language('lang_boards');
$this->ipsclass->load_template('skin_boards');
}
/*-------------------------------------------------------------------------*/
// Auto run function
/*-------------------------------------------------------------------------*/
function auto_run()
{
$this->init();
$this->statfunc = $this->ipsclass->load_class( ROOT_PATH.'sources/lib/func_boardstats.php', 'func_boardstats' );
$this->statfunc->register_class( $this );
if (! $this->ipsclass->member['id'] )
{
$this->ipsclass->input['last_visit'] = time();
}
if ( $this->ipsclass->vars['ipbli_usertype'] != 'username' )
{
$this->ipsclass->lang['qli_name'] = $this->ipsclass->lang['email_address'];
}
$this->output .= $this->ipsclass->compiled_templates['skin_boards']->PageTop( $this->ipsclass->get_date( $this->ipsclass->input['last_visit'], 'LONG' ) );
//-----------------------------------------
// Get DB markers
//-----------------------------------------
$this->boards_get_db_tracker();
//-----------------------------------------
// What are we doing?
//-----------------------------------------
$this->process_all_cats();
//-----------------------------------------
// Add in show online users
//-----------------------------------------
$stats_html = "";
$stats_html .= $this->statfunc->active_users();
//-----------------------------------------
// Are we viewing the calendar?
//-----------------------------------------
$stats_html .= $this->statfunc->show_calendar_events();
//-----------------------------------------
// Add in show stats
//-----------------------------------------
$stats_html .= $this->statfunc->show_totals();
if ($stats_html != "")
{
$collapsed_ids = ','.$this->ipsclass->my_getcookie('collapseprefs').',';
$show['div_fo'] = 'show';
$show['div_fc'] = 'none';
if ( strstr( $collapsed_ids, ',stat,' ) )
{
$show['div_fo'] = 'none';
$show['div_fc'] = 'show';
}
$this->output .= $this->ipsclass->compiled_templates['skin_boards']->stats_header($this->statfunc->users_online, $this->statfunc->total_posts, $this->statfunc->total_members, $show);
$this->output .= $stats_html;
$this->output .= $this->ipsclass->compiled_templates['skin_boards']->stats_footer();
}
//-----------------------------------------
// Add in board info footer
//-----------------------------------------
$this->output .= $this->ipsclass->compiled_templates['skin_boards']->bottom_links();
//-----------------------------------------
// Check for news forum.
//-----------------------------------------
if ( isset($this->ipsclass->forums->forum_by_id[ $this->ipsclass->vars['news_forum_id'] ]['newest_id']) AND $this->ipsclass->forums->forum_by_id[ $this->ipsclass->vars['news_forum_id'] ]['newest_id'] AND $this->ipsclass->vars['index_news_link'] )
{
$t_html = $this->ipsclass->compiled_templates['skin_boards']->newslink( $this->news_forum_id, stripslashes($this->ipsclass->forums->forum_by_id[ $this->ipsclass->vars['news_forum_id'] ]['newest_title']) ,
$this->ipsclass->forums->forum_by_id[ $this->ipsclass->vars['news_forum_id'] ]['newest_id']);
$this->output = str_replace( "<!-- IBF.NEWSLINK -->" , "$t_html" , $this->output );
}
//-----------------------------------------
// Showing who's chatting NEW?
// IPB3.0: To Do: move into components
//-----------------------------------------
$this->ipsclass->vars['chat04_account_no'] = $this->ipsclass->vars['chat04_account_no'] ? $this->ipsclass->vars['chat04_account_no'] : $this->ipsclass->vars['chat_account_no'];
$this->ipsclass->vars['chat04_who_on'] = $this->ipsclass->vars['chat04_who_on'] ? $this->ipsclass->vars['chat04_who_on'] : $this->ipsclass->vars['chat_who_on'];
if ( $this->ipsclass->vars['chat04_account_no'] and $this->ipsclass->vars['chat04_who_on'] )
{
require_once( ROOT_PATH.'sources/lib/func_chat.php' );
$chat = new func_chat();
$chat->ipsclass =& $this->ipsclass;
$chat->register_class( $this );
$chat_html = $chat->get_online_list();
$this->output = str_replace( "<!--IBF.WHOSCHATTING-->", $chat_html, $this->output );
}
//-----------------------------------------
// Print as normal
//-----------------------------------------
$this->ipsclass->print->add_output( $this->output );
$cp = " (Powered by Invision Power Board)";
if ($this->ipsclass->vars['ips_cp_purchase'])
{
$cp = "";
}
$this->ipsclass->print->do_output( array( 'TITLE' => $this->ipsclass->vars['board_name'].$cp, 'JS' => 0, 'NAV' => $this->nav ) );
}
/*-------------------------------------------------------------------------*/
//
// Display sub forums
//
/*-------------------------------------------------------------------------*/
function show_subforums($fid)
{
$this->init();
$temp_html = "";
$sub_output = "";
//-----------------------------------------
// Get show / hide cookah
//-----------------------------------------
$collapsed_ids = ','.$this->ipsclass->my_getcookie('collapseprefs').',';
$this->ipsclass->forums->register_class( $this );
if ( isset($this->ipsclass->forums->forum_cache[ $fid ]) AND is_array( $this->ipsclass->forums->forum_cache[ $fid ] ) )
{
$cat_data = $this->ipsclass->forums->forum_by_id[ $fid ];
$cat_data['div_fo'] = '';
$cat_data['div_fc'] = 'none';
if ( strstr( $collapsed_ids, ','.$fid.',' ) and ( $cat_data['sub_can_post'] == 1 ) )
{
$cat_data['div_fo'] = 'none';
$cat_data['div_fc'] = '';
}
foreach( $this->ipsclass->forums->forum_cache[ $fid ] as $forum_data )
{
$forum_data['_queued_img'] = isset($forum_data['_queued_img'] ) ? $forum_data['_queued_img'] : '';
$forum_data['_queued_info'] = isset($forum_data['_queued_info'] ) ? $forum_data['_queued_info'] : '';
$forum_data['show_subforums'] = isset($forum_data['show_subforums'] ) ? $forum_data['show_subforums'] : '';
$forum_data['last_unread'] = isset($forum_data['last_unread'] ) ? $forum_data['last_unread'] : '';
//-----------------------------------------
// Get all subforum stats
// and calculate
//-----------------------------------------
if ( isset($this->ipsclass->vars['forum_cache_minimum']) AND $this->ipsclass->vars['forum_cache_minimum'] )
{
$forum_data['description'] = "<!--DESCRIPTION:{$forum_data['id']}-->";
$need_desc[] = $forum_data['id'];
}
if ( $forum_data['redirect_on'] )
{
$forum_data['redirect_target'] = isset($forum_data['redirect_target']) ? $forum_data['redirect_target'] : '_parent';
$temp_html .= $this->ipsclass->compiled_templates['skin_boards']->forum_redirect_row( $forum_data );
}
else
{
$temp_html .= $this->ipsclass->compiled_templates['skin_boards']->ForumRow( $this->ipsclass->forums->forums_format_lastinfo( $this->ipsclass->forums->forums_calc_children( $forum_data['id'], $forum_data ) ) );
}
}
}
if ( $temp_html )
{
$sub_output .= $this->ipsclass->compiled_templates['skin_boards']->subheader($cat_data);
$sub_output .= $temp_html;
$sub_output .= $this->ipsclass->compiled_templates['skin_boards']->end_this_cat();
}
else
{
return $sub_output;
}
unset($temp_html);
$sub_output .= $this->ipsclass->compiled_templates['skin_boards']->end_all_cats();
//-----------------------------------------
// Get descriptions?
//-----------------------------------------
if ( isset($this->ipsclass->vars['forum_cache_minimum']) AND $this->ipsclass->vars['forum_cache_minimum'] AND count($need_desc) )
{
$this->ipsclass->DB->simple_construct( array( 'select' => 'id,description', 'from' => 'forums', 'where' => 'id IN('.implode( ',', $need_desc ) .')' ) );
$this->ipsclass->DB->simple_exec();
while( $r = $this->ipsclass->DB->fetch_row() )
{
$sub_output = str_replace( "<!--DESCRIPTION:{$r['id']}-->", $r['description'], $sub_output );
}
}
return $sub_output;
}
/*-------------------------------------------------------------------------*/
//
// PROCESS ALL CATEGORIES
//
/*-------------------------------------------------------------------------*/
function process_all_cats()
{
$need_desc = array();
$root = array();
$parent = array();
//-----------------------------------------
// Want to view categories?
//-----------------------------------------
if ( isset($this->ipsclass->input['c']) AND $this->ipsclass->input['c'] )
{
foreach( explode( ",", $this->ipsclass->input['c'] ) as $c )
{
$c = intval( $c );
$i = $this->ipsclass->forums->forum_by_id[ $c ]['parent_id'];
$root[ $i ] = $i;
$parent[ $c ] = $c;
}
}
if ( ! count( $root ) )
{
$root[] = 'root';
}
//-----------------------------------------
// Get show / hide cookah
//-----------------------------------------
$collapsed_ids = ','.$this->ipsclass->my_getcookie('collapseprefs').',';
$this->ipsclass->forums->register_class( $this );
foreach( $root as $root_id )
{
if ( is_array( $this->ipsclass->forums->forum_cache[ $root_id ] ) and count( $this->ipsclass->forums->forum_cache[ $root_id ] ) )
{
foreach( $this->ipsclass->forums->forum_cache[ $root_id ] as $id => $forum_data )
{
$temp_html = "";
//-----------------------------------------
// Only showing certain root forums?
//-----------------------------------------
if ( count( $parent ) )
{
if ( ! in_array( $id, $parent ) )
{
continue;
}
}
$cat_data = $forum_data;
$cat_data['div_fo'] = 'show';
$cat_data['div_fc'] = 'none';
if ( strstr( $collapsed_ids, ','.$cat_data['id'].',' ) )
{
$cat_data['div_fo'] = 'none';
$cat_data['div_fc'] = 'show';
}
if ( isset($this->ipsclass->forums->forum_cache[ $forum_data['id'] ]) AND is_array( $this->ipsclass->forums->forum_cache[ $forum_data['id'] ] ) )
{
foreach( $this->ipsclass->forums->forum_cache[ $forum_data['id'] ] as $forum_data )
{
$forum_data['show_subforums'] = isset($forum_data['show_subforums']) ? $forum_data['show_subforums'] : '';
$forum_data['_queued_img'] = isset($forum_data['_queued_img']) ? $forum_data['_queued_img'] : '';
$forum_data['_queued_info'] = isset($forum_data['_queued_info']) ? $forum_data['_queued_info'] : '';
$forum_data['last_unread'] = isset($forum_data['last_unread']) ? $forum_data['last_unread'] : '';
//-----------------------------------------
// Get all subforum stats
// and calculate
//-----------------------------------------
if ( isset($this->ipsclass->vars['forum_cache_minimum']) AND $this->ipsclass->vars['forum_cache_minimum'] )
{
$forum_data['description'] = "<!--DESCRIPTION:{$forum_data['id']}-->";
$need_desc[] = $forum_data['id'];
}
if ( $forum_data['redirect_on'] )
{
$forum_data['redirect_target'] = isset($forum_data['redirect_target']) ? $forum_data['redirect_target'] : '_parent';
$temp_html .= $this->ipsclass->compiled_templates['skin_boards']->forum_redirect_row( $forum_data );
}
else
{
$temp_html .= $this->ipsclass->compiled_templates['skin_boards']->ForumRow( $this->ipsclass->forums->forums_format_lastinfo( $this->ipsclass->forums->forums_calc_children( $forum_data['id'], $forum_data ) ) );
}
}
}
if ( $temp_html )
{
$this->output .= $this->ipsclass->compiled_templates['skin_boards']->CatHeader_Expanded($cat_data);
$this->output .= $temp_html;
$this->output .= $this->ipsclass->compiled_templates['skin_boards']->end_this_cat();
}
unset($temp_html);
}
}
}
$this->output .= $this->ipsclass->compiled_templates['skin_boards']->end_all_cats();
//-----------------------------------------
// Get descriptions?
//-----------------------------------------
if ( isset($this->ipsclass->vars['forum_cache_minimum']) AND $this->ipsclass->vars['forum_cache_minimum'] AND count($need_desc) )
{
$this->ipsclass->DB->simple_construct( array( 'select' => 'id,description', 'from' => 'forums', 'where' => 'id IN('.implode( ',', $need_desc ) .')' ) );
$this->ipsclass->DB->simple_exec();
while( $r = $this->ipsclass->DB->fetch_row() )
{
$this->output = str_replace( "<!--DESCRIPTION:{$r['id']}-->", $r['description'], $this->output );
}
}
}
/*-------------------------------------------------------------------------*/
// DB Tracker
/*-------------------------------------------------------------------------*/
function boards_get_db_tracker()
{
if ( $this->ipsclass->vars['db_topic_read_cutoff'] and $this->ipsclass->member['id'] )
{
$this->ipsclass->DB->simple_construct( array( 'select' => '*',
'from' => 'topic_markers',
'where' => "marker_member_id=".$this->ipsclass->member['id'],
) );
$this->ipsclass->DB->simple_exec();
while( $r = $this->ipsclass->DB->fetch_row() )
{
$this->ipsclass->forums->forum_by_id[ $r['marker_forum_id'] ] =
isset($this->ipsclass->forums->forum_by_id[ $r['marker_forum_id'] ]) ?
$this->ipsclass->forums->forum_by_id[ $r['marker_forum_id'] ] :
array( 'parent_id' => 0 );
$this->ipsclass->forums->forum_cache[ $this->ipsclass->forums->forum_by_id[ $r['marker_forum_id'] ]['parent_id'] ][ $r['marker_forum_id'] ]['_db_row'] = $r;
$this->ipsclass->forums->forum_by_id[ $r['marker_forum_id'] ]['_db_row'] = $r;
}
}
}
}
?>
+15 -25
View File
@@ -2,28 +2,18 @@
/*
+--------------------------------------------------------------------------
| Invision Power Board 2.1.7
| Invision Power Board
| =============================================
| by Matthew Mecham
| (c) 2001 - 2005 Invision Power Services, Inc.
| (c) 2001 - 2006 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-28 15:18:16 +0100 (Fri, 28 Oct 2005) $
| > $Revision: 67 $
| > $Author: bfarber $
| > $Date: 2006-09-22 11:28:54 +0100 (Fri, 22 Sep 2006) $
| > $Revision: 567 $
| > $Author: matt $
+---------------------------------------------------------------------------
|
| > Browse Buddy Module
@@ -39,7 +29,7 @@
if ( ! defined( 'IN_IPB' ) )
{
print "<h1>Íåêîððåêòíûé àäðåñ</h1>Âû íå èìååòå äîñòóïà ê ýòîìó ôàéëó íàïðÿìóþ. Åñëè âû íåäàâíî îáíîâëÿëè ôîðóì, âû äîëæíû îáíîâèòü âñå ñîîòâåòñòâóþùèå ôàéëû.";
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
exit();
}
@@ -112,13 +102,13 @@ class assistant
{
$this->ipsclass->input['tab'] = $this->ipsclass->input['tab'] ? $this->ipsclass->input['tab'] : 'info';
$onoff['info'] = 'taboff';
$onoff['posts'] = 'taboff';
$onoff['search'] = 'taboff';
$onoff['pms'] = 'taboff';
$onoff['newpms'] = 'taboff';
$onoff['info'] = 'pp-taboff';
$onoff['posts'] = 'pp-taboff';
$onoff['search'] = 'pp-taboff';
$onoff['pms'] = 'pp-taboff';
$onoff['newpms'] = 'pp-taboff';
$onoff[ $this->ipsclass->input['tab'] ] = 'tabon';
$onoff[ $this->ipsclass->input['tab'] ] = 'pp-tabon';
return $this->ipsclass->compiled_templates['skin_buddy']->xml_tabs( $onoff );
}
@@ -286,7 +276,7 @@ class assistant
$allow_forums[] = '0';
foreach( $this->ipsclass->forums->forum_by_id as $id => $data )
foreach( $this->ipsclass->forums->forum_by_id as $data )
{
$allow_forums[] = $data['id'];
}
@@ -338,11 +328,11 @@ class assistant
$this->ipsclass->lang['new_posts'] = sprintf($this->ipsclass->lang['new_posts'] , $posts_total );
$this->ipsclass->lang['my_replies'] = sprintf($this->ipsclass->lang['my_replies'], $topics_total );
$this->ipsclass->lang['new_posts'] .= $this->ipsclass->compiled_templates['skin_buddy']->append_view("&act=Search&CODE=getnew");
$this->ipsclass->lang['new_posts'] .= $this->ipsclass->compiled_templates['skin_buddy']->append_view("&amp;act=Search&amp;CODE=getnew");
if ($topic['replies'] > 0)
{
$this->ipsclass->lang['my_replies'] .= $this->ipsclass->compiled_templates['skin_buddy']->append_view("&act=Search&CODE=getreplied");
$this->ipsclass->lang['my_replies'] .= $this->ipsclass->compiled_templates['skin_buddy']->append_view("&amp;act=Search&amp;CODE=getreplied");
}
$text = $this->ipsclass->compiled_templates['skin_buddy']->build_away_msg();
File diff suppressed because it is too large. Load diff
+10 -19
View File
@@ -2,27 +2,17 @@
/*
+--------------------------------------------------------------------------
| Invision Power Board 2.1.7
| Invision Power Board
| =============================================
| by Matthew Mecham
| (c) 2001 - 2005 Invision Power Services, Inc.
| (c) 2001 - 2006 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 $
| > $Date: 2006-09-26 12:17:53 +0100 (Tue, 26 Sep 2006) $
| > $Revision: 574 $
| > $Author: matt $
+---------------------------------------------------------------------------
|
@@ -43,7 +33,7 @@
if ( ! defined( 'IN_IPB' ) )
{
print "<h1>Íåêîððåêòíûé àäðåñ</h1>Âû íå èìååòå äîñòóïà ê ýòîìó ôàéëó íàïðÿìóþ. Åñëè âû íåäàâíî îáíîâëÿëè ôîðóì, âû äîëæíû îáíîâèòü âñå ñîîòâåòñòâóþùèå ôàéëû.";
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
exit();
}
@@ -82,9 +72,9 @@ class findpost
}
$this->ipsclass->DB->simple_construct( array( 'select' => 'COUNT(*) as posts',
'from' => 'posts',
'where' => "topic_id=".$post['topic_id']." AND pid <= ".$pid,
) );
'from' => 'posts',
'where' => "topic_id=".$post['topic_id']." AND pid <= ".$pid,
) );
$this->ipsclass->DB->simple_exec();
@@ -101,8 +91,9 @@ class findpost
}
$st = ($pages - 1) * $this->ipsclass->vars['display_max_posts'];
$hl = $this->ipsclass->input['hl'] ? '&hl=' . trim( $this->ipsclass->input['hl'] ) : '';
$this->ipsclass->boink_it($this->ipsclass->base_url."showtopic=".$post['topic_id']."&st=$st&p=$pid"."&#entry".$pid);
$this->ipsclass->boink_it($this->ipsclass->base_url."showtopic=".$post['topic_id']."&st=$st&p=$pid".$hl."&#entry".$pid);
}
}
+159 -79
View File
@@ -2,27 +2,17 @@
/*
+--------------------------------------------------------------------------
| Invision Power Board 2.1.7
| Invision Power Board
| =============================================
| by Matthew Mecham
| (c) 2001 - 2005 Invision Power Services, Inc.
| (c) 2001 - 2006 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: 2006-01-30 18:53:19 +0000 (Mon, 30 Jan 2006) $
| > $Revision: 127 $
| > $Date: 2006-09-28 23:05:45 +0100 (Thu, 28 Sep 2006) $
| > $Revision: 587 $
| > $Author: bfarber $
+---------------------------------------------------------------------------
|
@@ -38,7 +28,7 @@
if ( ! defined( 'IN_IPB' ) )
{
print "<h1>Íåêîððåêòíûé àäðåñ</h1>Âû íå èìååòå äîñòóïà ê ýòîìó ôàéëó íàïðÿìóþ. Åñëè âû íåäàâíî îáíîâëÿëè ôîðóì, âû äîëæíû îáíîâèòü âñå ñîîòâåòñòâóþùèå ôàéëû.";
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
exit();
}
@@ -90,7 +80,14 @@ class forums {
if ( $read = $this->ipsclass->my_getcookie('topicsread') )
{
$this->read_array = $this->ipsclass->clean_int_array( unserialize(stripslashes($read)) );
if( $read != "-1" )
{
$this->read_array = $this->ipsclass->clean_int_array( unserialize(stripslashes($read)) );
}
else
{
$this->read_array = array();
}
}
//-----------------------------------------
@@ -122,7 +119,7 @@ class forums {
$this->can_close_topics = 1;
$this->can_open_topics = 1;
}
else if ( is_array( $this->ipsclass->member['_moderator'][ $this->forum['id'] ] ) )
else if ( isset($this->ipsclass->member['_moderator'][ $this->forum['id'] ]) AND is_array( $this->ipsclass->member['_moderator'][ $this->forum['id'] ] ) )
{
if ( $this->ipsclass->member['_moderator'][ $this->forum['id'] ]['edit_topic'] )
{
@@ -139,10 +136,6 @@ class forums {
$this->can_open_topics = 1;
}
}
/*else if ( $this->ipsclass->member['g_edit_topic'] == 1 )
{
$this->can_edit_topics = 1; would need to check per tid
}*/
}
/*-------------------------------------------------------------------------*/
@@ -186,7 +179,7 @@ class forums {
if ( ! $this->forum['id'] )
{
$this->ipsclass->Error( array( LEVEL => 1, MSG => 'is_broken_link') );
$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'is_broken_link') );
}
//-----------------------------------------
@@ -199,7 +192,7 @@ class forums {
// Is it a redirect forum?
//-----------------------------------------
if ( $this->forum['redirect_on'] )
if ( isset($this->forum['redirect_on']) AND $this->forum['redirect_on'] )
{
$redirect = $this->ipsclass->DB->simple_exec_query( array( 'select' => 'redirect_url', 'from' => 'forums', 'where' => "id=".$this->forum['id']) );
@@ -249,7 +242,7 @@ class forums {
// Check forum access perms
//-----------------------------------------
if ( ! $this->ipsclass->input['L'] )
if ( ! isset($this->ipsclass->input['L']) OR !$this->ipsclass->input['L'] )
{
$this->ipsclass->forums->forums_check_access( $this->forum['id'], 1 );
}
@@ -336,9 +329,9 @@ class forums {
// Do we have permission to view these rules?
//-----------------------------------------
$bad_entry = $this->ipsclass->forums->forums_check_access($this->forum['id'], 1);
$allow_access = $this->ipsclass->forums->forums_check_access( $this->forum['id'], 1 );
if ($bad_entry == 1)
if ( $allow_access === FALSE )
{
$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_view_topic') );
}
@@ -376,11 +369,11 @@ class forums {
// are we checking for user authentication via the log in form
// for a private forum w/password protection?
if ( isset($this->ipsclass->input['L']) && $this->ipsclass->input['L'] > 1 )
if ( $this->ipsclass->input['L'] > 1 )
{
$this->ipsclass->Error( array( LEVEL=> 5, MSG =>'incorrect_use') );
$this->ipsclass->Error( array( 'LEVEL' => 5, 'MSG' =>'incorrect_use') );
}
$this->ipsclass->input['L'] == 1 ? $this->authenticate_user() : $this->render_forum();
}
@@ -416,7 +409,7 @@ class forums {
//-----------------------------------------
# If we've changed the filters, bounce back to page 1
$this->ipsclass->input['st'] = ( $this->ipsclass->input['changefilters'] ) ? 0 : intval($this->ipsclass->input['st']);
$this->ipsclass->input['st'] = isset($this->ipsclass->input['changefilters']) ? 0 : (intval($this->ipsclass->input['st']) > 0 ? intval($this->ipsclass->input['st']) : 0);
//-----------------------------------------
// Are we actually a moderator for this forum?
@@ -424,7 +417,7 @@ class forums {
if ( ! $this->ipsclass->member['g_is_supmod'] AND ! $this->ipsclass->member['g_access_cp'] )
{
if ( ! is_array( $this->ipsclass->member['_moderator'][ $this->forum['id'] ] ) )
if ( !isset($this->ipsclass->member['_moderator'][ $this->forum['id'] ]) OR !is_array( $this->ipsclass->member['_moderator'][ $this->forum['id'] ] ) )
{
$this->ipsclass->member['is_mod'] = 0;
}
@@ -438,7 +431,7 @@ class forums {
{
$announcements = array();
foreach( $this->ipsclass->cache['announcements'] as $id => $announce )
foreach( $this->ipsclass->cache['announcements'] as $announce )
{
$order = $announce['announce_start'] ? $announce['announce_start'].','.$announce['announce_id'] : $announce['announce_id'];
@@ -462,11 +455,11 @@ class forums {
rsort( $announcements );
foreach( $announcements as $id => $announce )
foreach( $announcements as $announce )
{
if ( $announce['announce_start'] )
{
$announce['announce_start'] = gmdate( 'j.n.Y', $announce['announce_start'] );
$announce['announce_start'] = gmdate( 'jS F Y', $announce['announce_start'] );
}
else
{
@@ -487,7 +480,9 @@ class forums {
// Read topics
//-----------------------------------------
$First = intval($this->ipsclass->input['st']);
$First = intval($this->ipsclass->input['st']) > 0 ? intval($this->ipsclass->input['st']) : 0;
$this->ipsclass->member['members_markers']['board'] = isset($this->ipsclass->member['members_markers']['board']) ? $this->ipsclass->member['members_markers']['board'] : 0;
$this->ipsclass->input['last_visit'] = $this->ipsclass->member['last_visit'] > $this->ipsclass->member['members_markers']['board'] ? $this->ipsclass->member['last_visit'] : $this->ipsclass->member['members_markers']['board'];
@@ -495,7 +490,7 @@ class forums {
// Over ride with 'master' cookie?
//-----------------------------------------
if ( $this->ipsclass->forum_read[0] > $this->ipsclass->forum_read[ $this->ipsclass->input['f'] ] )
if ( isset($this->ipsclass->forum_read[0]) AND $this->ipsclass->forum_read[0] > $this->ipsclass->forum_read[ $this->ipsclass->input['f'] ] )
{
$this->ipsclass->forum_read[ $this->ipsclass->input['f'] ] = $this->ipsclass->forum_read[0];
}
@@ -504,30 +499,61 @@ class forums {
// Sort options
//-----------------------------------------
$cookie_prune = $this->ipsclass->my_getcookie( $this->forum['id']."_prune_day" );
$cookie_sort = $this->ipsclass->my_getcookie( $this->forum['id']."_sort_key" );
$cookie_sortb = $this->ipsclass->my_getcookie( $this->forum['id']."_sort_by" );
$cookie_fill = $this->ipsclass->my_getcookie( $this->forum['id']."_topicfilter" );
$prune_value = $this->ipsclass->select_var( array(
1 => $this->ipsclass->input['prune_day'],
2 => $this->forum['prune'] ,
3 => '100' )
1 => isset($this->ipsclass->input['prune_day']) ? $this->ipsclass->input['prune_day'] : NULL,
2 => !empty($cookie_prune) ? $cookie_prune : NULL,
3 => $this->forum['prune'] ,
4 => '100' )
);
$sort_key = $this->ipsclass->select_var( array(
1 => $this->ipsclass->input['sort_key'],
2 => $this->forum['sort_key'],
3 => 'last_post' )
1 => isset($this->ipsclass->input['sort_key']) ? $this->ipsclass->input['sort_key'] : NULL,
2 => !empty($cookie_sort) ? $cookie_sort : NULL,
3 => $this->forum['sort_key'],
4 => 'last_post' )
);
$sort_by = $this->ipsclass->select_var( array(
1 => $this->ipsclass->input['sort_by'],
2 => $this->forum['sort_order'] ,
3 => 'Z-A' )
1 => isset($this->ipsclass->input['sort_by']) ? $this->ipsclass->input['sort_by'] : NULL,
2 => !empty($cookie_sortb) ? $cookie_sortb : NULL,
3 => $this->forum['sort_order'] ,
4 => 'Z-A' )
);
$topicfilter = $this->ipsclass->select_var( array(
1 => $this->ipsclass->input['topicfilter'],
2 => $this->forum['topicfilter'] ,
3 => 'all' )
1 => isset($this->ipsclass->input['topicfilter']) ? $this->ipsclass->input['topicfilter'] : NULL,
2 => !empty($cookie_fill) ? $cookie_fill : NULL,
3 => $this->forum['topicfilter'] ,
4 => 'all' )
);
if( isset($this->ipsclass->input['remember']) AND $this->ipsclass->input['remember'] )
{
if( isset($this->ipsclass->input['prune_day']) AND $this->ipsclass->input['prune_day'] )
{
$this->ipsclass->my_setcookie( $this->forum['id']."_prune_day", $this->ipsclass->input['prune_day'] );
}
if( isset($this->ipsclass->input['sort_key']) AND $this->ipsclass->input['sort_key'] )
{
$this->ipsclass->my_setcookie( $this->forum['id']."_sort_key", $this->ipsclass->input['sort_key'] );
}
if( isset($this->ipsclass->input['sort_by']) AND $this->ipsclass->input['sort_by'] )
{
$this->ipsclass->my_setcookie( $this->forum['id']."_sort_by", $this->ipsclass->input['sort_by'] );
}
if( isset($this->ipsclass->input['topicfilter']) AND $this->ipsclass->input['topicfilter'] )
{
$this->ipsclass->my_setcookie( $this->forum['id']."_topicfilter", $this->ipsclass->input['topicfilter'] );
}
}
//-----------------------------------------
// Figure out sort order, day cut off, etc
@@ -583,7 +609,7 @@ class forums {
if ( (!isset($filter_keys[$topicfilter])) or (!isset($sort_keys[$sort_key])) or (!isset($prune_by_day[$prune_value])) or (!isset($sort_by_keys[$sort_by])) )
{
$this->ipsclass->Error( array( LEVEL=> 5, MSG =>'incorrect_use') );
$this->ipsclass->Error( array( 'LEVEL' => 5, 'MSG' =>'incorrect_use') );
}
$r_sort_by = $sort_by == 'A-Z' ? 'ASC' : 'DESC';
@@ -708,7 +734,7 @@ class forums {
//-----------------------------------------
// Start printing the page
//-----------------------------------------
$this->output .= $this->ipsclass->compiled_templates['skin_forum']->PageTop( $this->forum, $this->can_edit_topics, $this->can_open_topics, $this->can_close_topics );
//-----------------------------------------
@@ -734,6 +760,8 @@ class forums {
// Mod filter?
//-----------------------------------------
$this->ipsclass->input['modfilter'] = isset($this->ipsclass->input['modfilter']) ? $this->ipsclass->input['modfilter'] : '';
if ( $this->ipsclass->input['modfilter'] == 'invisible_topics' and $this->ipsclass->member['is_mod'] )
{
$topic_sort = 't.approved asc,';
@@ -828,7 +856,9 @@ class forums {
if ( $this->ipsclass->vars['db_topic_read_cutoff'] and count($topic_ids) )
{
if ( $this->ipsclass->forums->forum_by_id[ $this->forum['id'] ]['_db_row'] )
if ( isset($this->ipsclass->forums->forum_by_id[ $this->forum['id'] ]['_db_row']) AND
$this->ipsclass->forums->forum_by_id[ $this->forum['id'] ]['_db_row']
)
{
$this->db_row = $this->ipsclass->forums->forum_by_id[ $this->forum['id'] ]['_db_row'];
}
@@ -855,7 +885,7 @@ class forums {
{
foreach( $this->my_topics_read as $tid => $date )
{
if ( is_array( $topic_array[ $tid ] ) )
if ( isset($topic_array[ $tid ]) AND is_array( $topic_array[ $tid ] ) )
{
$this->read_topics_tid[] = $tid;
$topic_array[ $tid ]['db_read'] = $date > $this->db_row['marker_last_cleared'] ? $date : $this->db_row['marker_last_cleared'];
@@ -883,7 +913,7 @@ class forums {
// Show meh the topics!
//-----------------------------------------
foreach( $topic_array as $tid => $topic )
foreach( $topic_array as $topic )
{
if ( $topic['pinned'] )
{
@@ -899,6 +929,11 @@ class forums {
// Finish off the rest of the page $filter_keys[$topicfilter]))
//-----------------------------------------
$sort_by_html = "";
$sort_key_html = "";
$prune_day_html = "";
$filter_html = "";
foreach ($sort_by_keys as $k => $v)
{
$sort_by_html .= $k == $sort_by ? "<option value='$k' selected='selected'>" . $this->ipsclass->lang[ $sort_by_keys[ $k ] ] . "</option>\n"
@@ -931,6 +966,7 @@ class forums {
if( $this->ipsclass->member['is_mod'] )
{
$count = 0;
$other_pages = 0;
if( $this->ipsclass->input['selectedtids'] != "" )
{
@@ -942,6 +978,11 @@ class forums {
{
if( $tid != '' )
{
if( !array_key_exists( $tid, $topic_array ) )
{
$other_pages++;
}
$count++;
}
}
@@ -949,6 +990,11 @@ class forums {
}
$this->ipsclass->lang['f_go'] .= " ({$count})";
if( $other_pages )
{
$this->ipsclass->lang['f_go'] .= " ({$other_pages} {$this->ipsclass->lang['jscript_otherpage']})";
}
}
$this->output .= $this->ipsclass->compiled_templates['skin_forum']->TableEnd($this->forum, $this->auth_key);
@@ -959,6 +1005,7 @@ class forums {
if ( $this->ipsclass->member['is_mod'] )
{
$mm_html = "";
$mm_array = $this->ipsclass->get_multimod( $this->forum['id'] );
if ( is_array( $mm_array ) and count( $mm_array ) )
@@ -1106,6 +1153,8 @@ class forums {
$cached = array();
$active = array( 'guests' => 0, 'anon' => 0, 'members' => 0, 'names' => "");
$rows = array( $ar_time => array( 'login_type' => substr($this->ipsclass->member['login_anonymous'],0, 1),
'id' => 0,
'location' => 'sf',
'running_time' => $ar_time,
'member_id' => $this->ipsclass->member['id'],
'member_name' => $this->ipsclass->member['members_display_name'],
@@ -1122,14 +1171,27 @@ class forums {
krsort( $rows );
//-----------------------------------------
// Is this a root admin in disguise?
// Is that kinda like a diamond in the rough?
//-----------------------------------------
$our_mgroups = array();
if( $this->ipsclass->member['mgroup_others'] )
{
$our_mgroups = explode( ",", $this->ipsclass->clean_perm_string( $this->ipsclass->member['mgroup_others'] ) );
}
$our_mgroups[] = $this->ipsclass->member['mgroup'];
//-----------------------------------------
// PRINT...
//-----------------------------------------
foreach( $rows as $i => $result )
foreach( $rows as $result )
{
$result['suffix'] = $this->ipsclass->cache['group_cache'][ $result['member_group'] ]['suffix'];
$result['prefix'] = $this->ipsclass->cache['group_cache'][ $result['member_group'] ]['prefix'];
$result['member_name'] = $this->ipsclass->make_name_formatted( $result['member_name'], $result['member_group'] );
$last_date = $this->ipsclass->get_time( $result['running_time'] );
@@ -1156,9 +1218,9 @@ class forums {
if ($result['login_type'] == 1)
{
if ( ($this->ipsclass->member['mgroup'] == $this->ipsclass->vars['admin_group']) and ($this->ipsclass->vars['disable_admin_anon'] != 1) )
if ( (in_array( $this->ipsclass->vars['admin_group'], $our_mgroups )) and ($this->ipsclass->vars['disable_admin_anon'] != 1) )
{
$active['names'] .= "$p_start<a href='{$this->ipsclass->base_url}showuser={$result['member_id']}'$p_title>{$result['prefix']}{$result['member_name']}{$result['suffix']}</a>*$p_end, ";
$active['names'] .= "$p_start<a href='{$this->ipsclass->base_url}showuser={$result['member_id']}'{$p_title}>{$result['member_name']}</a>*{$p_end}, ";
$active['anon']++;
}
else
@@ -1169,7 +1231,7 @@ class forums {
else
{
$active['members']++;
$active['names'] .= "$p_start<a href='{$this->ipsclass->base_url}showuser={$result['member_id']}'$p_title>{$result['prefix']}{$result['member_name']}{$result['suffix']}</a>$p_end, ";
$active['names'] .= "$p_start<a href='{$this->ipsclass->base_url}showuser={$result['member_id']}'{$p_title}>{$result['member_name']}</a>{$p_end}, ";
}
}
}
@@ -1196,8 +1258,15 @@ class forums {
// Parse data
/*-------------------------------------------------------------------------*/
function parse_data( $topic )
function parse_data( $topic, $last_time_default=1 )
{
//-----------------------------------------
// INIT
//-----------------------------------------
$this->read_array[ $topic['tid'] ] = isset( $this->read_array[ $topic['tid'] ] ) ? $this->read_array[ $topic['tid'] ] : 0;
$this->ipsclass->forum_read[ $topic['forum_id'] ] = isset( $this->ipsclass->forum_read[ $topic['forum_id'] ] ) ? $this->ipsclass->forum_read[ $topic['forum_id'] ] : 0;
//-----------------------------------------
// Get a real ID so that moved
// topic don't break owt
@@ -1257,7 +1326,7 @@ class forums {
//-----------------------------------------
// Using DB?
//-----------------------------------------
//print $this->ipsclass->vars['db_topic_read_cutoff'];print " ".$topic['last_post'];print " ".$this->ipsclass->member['members_markers']['board'];exit;
if ( $this->ipsclass->member['id'] and $this->ipsclass->vars['db_topic_read_cutoff'] AND ($topic['last_post'] > intval($this->ipsclass->member['members_markers']['board'])) )
{
$db_topic_read_cutoff = time() - $this->ipsclass->vars['db_topic_read_cutoff'] * 86400;
@@ -1268,7 +1337,7 @@ class forums {
// Have we read this topic before?
//-----------------------------------------
if ( $topic['db_read'] )
if ( isset($topic['db_read']) AND $topic['db_read'] )
{
$last_time = $topic['db_read'];
}
@@ -1278,7 +1347,9 @@ class forums {
}
else
{
$last_time = 1;
# $last_time_default is used because we don't have db tracking loaded
# when we're using search
$last_time = $last_time_default;
}
}
}
@@ -1303,10 +1374,7 @@ class forums {
// Attachy ment
//-----------------------------------------
if ( $topic['topic_hasattach'] )
{
$topic['attach_img'] = $this->ipsclass->compiled_templates['skin_forum']->topic_attach_icon($topic['tid'], intval($topic['topic_hasattach']));
}
$topic['attach_img'] = $topic['topic_hasattach'] ? $this->ipsclass->compiled_templates['skin_forum']->topic_attach_icon($topic['tid'], intval($topic['topic_hasattach'])) : '';
//-----------------------------------------
// Yawn
@@ -1318,12 +1386,11 @@ class forums {
$topic['starter'] = $topic['starter_id'] ? $this->ipsclass->make_profile_link( $topic['starter_name'], $topic['starter_id']) : "-".$topic['starter_name']."-";
if ($topic['poll_state'])
{
$topic['prefix'] = $this->ipsclass->vars['pre_polls'].' ';
}
$topic['prefix'] = $topic['poll_state'] ? $this->ipsclass->vars['pre_polls'].' ' : '';
if ( ($this->ipsclass->member['id']) and ($topic['author_id']) )
$show_dots = "";
if ( $this->ipsclass->member['id'] and ( isset($topic['author_id']) AND $topic['author_id'] ) )
{
$show_dots = 1;
}
@@ -1332,6 +1399,8 @@ class forums {
$topic['topic_icon'] = $topic['icon_id'] ? '<img src="'.$this->ipsclass->vars['img_url'] . '/folder_post_icons/icon' . $topic['icon_id'] . '.gif" border="0" alt="" />'
: '&nbsp;';
$topic['topic_icon'] = $topic['pinned'] ? '<{B_PIN}>' : $topic['topic_icon'];
$topic['start_date'] = $this->ipsclass->get_date( $topic['start_date'], 'LONG' );
@@ -1340,8 +1409,9 @@ class forums {
//-----------------------------------------
$pages = 1;
$topic['PAGES'] = "";
if ( $this->ipsclass->member['is_mod'] )
if ( isset($this->ipsclass->member['is_mod']) AND $this->ipsclass->member['is_mod'] )
{
$topic['posts'] += intval($topic['topic_queuedposts']);
}
@@ -1423,9 +1493,13 @@ class forums {
$topic['posts'] = $this->ipsclass->compiled_templates['skin_forum']->who_link($topic['tid'], $topic['posts']);
}
if ( ( $this->ipsclass->member['g_is_supmod'] or $this->ipsclass->member['_moderator'][ $topic['forum_id'] ]['post_q'] == 1 ) and ( $topic['topic_queuedposts'] ) )
{
$topic['_hasqueued'] = 0;
if ( ( $this->ipsclass->member['g_is_supmod'] or
(isset($this->ipsclass->member['_moderator'][ $topic['forum_id'] ]['post_q']) AND $this->ipsclass->member['_moderator'][ $topic['forum_id'] ]['post_q'] == 1) ) and
( $topic['topic_queuedposts'] )
)
{
$topic['_hasqueued'] = 1;
}
@@ -1435,7 +1509,7 @@ class forums {
$topic['_rate_img'] = '';
if ( $this->forum['forum_allow_rating'] )
if ( isset($this->forum['forum_allow_rating']) AND $this->forum['forum_allow_rating'] )
{
if ( $topic['topic_rating_total'] )
{
@@ -1456,7 +1530,7 @@ class forums {
// Already switched on?
//-----------------------------------------
if ( $this->ipsclass->member['is_mod'] )
if (isset($this->ipsclass->member['is_mod']) AND $this->ipsclass->member['is_mod'] )
{
if ( $this->ipsclass->input['selectedtids'] )
{
@@ -1482,6 +1556,12 @@ class forums {
{
$topic = $this->parse_data( $topic );
$topic['PAGES'] = isset($topic['PAGES']) ? $topic['PAGES'] : '';
$topic['prefix'] = isset($topic['prefix']) ? $topic['prefix'] : '';
$topic['attach_img'] = isset($topic['attach_img']) ? $topic['attach_img'] : '';
$topic['_hasqueued'] = isset($topic['_hasqueued']) ? $topic['_hasqueued'] : '';
$topic['tidon'] = isset($topic['tidon']) ? $topic['tidon'] : 0;
$p_start = "";
$p_end = "";
$class1 = "row2";
@@ -1496,7 +1576,7 @@ class forums {
$class2 = 'row2shaded';
$classposts = 'row4shaded';
}
else if ( $topic['_hasqueued'] )
else if ( isset($topic['_hasqueued']) AND $topic['_hasqueued'] )
{
$classposts = 'row4shaded';
}
+14 -24
View File
@@ -2,27 +2,17 @@
/*
+--------------------------------------------------------------------------
| Invision Power Board 2.1.7
| Invision Power Board
| =============================================
| by Matthew Mecham
| (c) 2001 - 2005 Invision Power Services, Inc.
| (c) 2001 - 2006 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 $
| > $Date: 2006-09-22 11:28:54 +0100 (Fri, 22 Sep 2006) $
| > $Revision: 567 $
| > $Author: matt $
+---------------------------------------------------------------------------
|
@@ -39,7 +29,7 @@
if ( ! defined( 'IN_IPB' ) )
{
print "<h1>Íåêîððåêòíûé àäðåñ</h1>Âû íå èìååòå äîñòóïà ê ýòîìó ôàéëó íàïðÿìóþ. Åñëè âû íåäàâíî îáíîâëÿëè ôîðóì, âû äîëæíû îáíîâèòü âñå ñîîòâåòñòâóþùèå ôàéëû.";
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
exit();
}
@@ -91,7 +81,7 @@ class help
//-----------------------------------------
$this->ipsclass->print->add_output("$this->output");
$this->ipsclass->print->do_output( array( 'TITLE' => $this->page_title, 'JS' => 0, NAV => $this->nav ) );
$this->ipsclass->print->do_output( array( 'TITLE' => $this->page_title, 'JS' => 0, 'NAV' => $this->nav ) );
}
/*-------------------------------------------------------------------------*/
@@ -105,9 +95,9 @@ class help
$this->output = $this->ipsclass->compiled_templates['skin_help']->start( $this->ipsclass->lang['page_title'], $this->ipsclass->lang['help_txt'], $this->ipsclass->lang['choose_file'] );
$this->ipsclass->DB->simple_construct( array( 'select' => 'id, title, description',
'from' => 'faq',
'order' => 'title ASC'
) );
'from' => 'faq',
'order' => 'position ASC'
) );
$this->ipsclass->DB->simple_exec();
$cnt = 0;
@@ -144,7 +134,7 @@ class help
function show_section()
{
$id = $this->ipsclass->input['HID'];
$id = isset($this->ipsclass->input['HID']) ? intval($this->ipsclass->input['HID']) : 0;
if (! preg_match( "/^(\d+)$/" , $id ) )
{
@@ -153,9 +143,9 @@ class help
}
$this->ipsclass->DB->simple_construct( array( 'select' => 'id, title, text',
'from' => 'faq',
'where' => "ID='$id'"
) );
'from' => 'faq',
'where' => 'ID='.$id
) );
$this->ipsclass->DB->simple_exec();
$topic = $this->ipsclass->DB->fetch_row();
@@ -177,7 +167,7 @@ class help
{
if (empty( $this->ipsclass->input['search_q'] ) )
{
$this->ipsclass->Error( array( LEVEL => 1, MSG => 'no_help_file') );
$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_help_file') );
}
$search_string = strtolower( str_replace( "*" , "%", $this->ipsclass->input['search_q'] ) );
+1 -15
View File
@@ -1,15 +1 @@
<html>
<head><title>Ошибка &lt; Русская версия Invision Power Board</title></head>
<body>
<h1>Ошибка &lt; Русская версия Invision Power Board</h1>
<hr>
Вы попали на несуществующую страницу!<br>Пожалуйста нажмите на кнопочку &laquo;<b>Назад</b>&raquo;
в вашем браузере для возвращения на предыдущую страницу.
<hr>
<b>Invision Power Board:</b>
<ul>
<li><a href="http://www.bestwarez.ru" title="BestWarez.Ru - Только лучший Варез!">Русская версия</a></li>
<li><a href="http://www.invisionboard.com" title="Official Site">English version</a></li>
</ul>
</body>
</html>
<html>␍<head><title>Invision Power Board - Bulletin Board System</title></head>␍<body>␍<h1>403: Invision Power Board -> Forbidden</h1>␍<hr>␍You have reached this Page in error, please use␍your back button to return to Invision Board.␍<hr>␍<a href="http://www.invisionboard.com/">Invision Power Board</a>␍</body>␍</html>␍
+178 -82
View File
@@ -2,27 +2,17 @@
/*
+--------------------------------------------------------------------------
| Invision Power Board 2.1.7
| Invision Power Board
| =============================================
| by Matthew Mecham
| (c) 2001 - 2005 Invision Power Services, Inc.
| (c) 2001 - 2006 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: 2006-01-31 22:47:20 +0000 (Tue, 31 Jan 2006) $
| > $Revision: 131 $
| > $Date: 2006-10-12 17:58:40 +0100 (Thu, 12 Oct 2006) $
| > $Revision: 633 $
| > $Author: bfarber $
+---------------------------------------------------------------------------
|
@@ -38,7 +28,7 @@
if ( ! defined( 'IN_IPB' ) )
{
print "<h1>Íåêîððåêòíûé àäðåñ</h1>Âû íå èìååòå äîñòóïà ê ýòîìó ôàéëó íàïðÿìóþ. Åñëè âû íåäàâíî îáíîâëÿëè ôîðóì, âû äîëæíû îáíîâèòü âñå ñîîòâåòñòâóþùèå ôàéëû.";
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
exit();
}
@@ -123,7 +113,7 @@ class login
//-----------------------------------------
$this->ipsclass->print->add_output("$this->output");
$this->ipsclass->print->do_output( array( 'TITLE' => $this->page_title, 'JS' => 0, NAV => $this->nav ) );
$this->ipsclass->print->do_output( array( 'TITLE' => $this->page_title, 'JS' => 0, 'NAV' => $this->nav ) );
}
/*-------------------------------------------------------------------------*/
@@ -206,11 +196,11 @@ class login
{
if ($method == 'show')
{
$this->ipsclass->print->redirect_screen( $false_words, 'act=Login&CODE=00' );
$this->ipsclass->print->redirect_screen( $false_words, 'act=login&amp;CODE=00' );
}
else
{
$this->ipsclass->boink_it($this->ipsclass->base_url.'&act=Login&CODE=00');
$this->ipsclass->boink_it($this->ipsclass->base_url.'&act=login&CODE=00');
}
}
}
@@ -225,7 +215,7 @@ class login
{
foreach( $_COOKIE as $cookie => $value)
{
if (preg_match( "/^(".$this->ipsclass->vars['cookie_id']."ibforum.*$)/i", $cookie, $match))
if (preg_match( "/^(".$this->ipsclass->vars['cookie_id']."ipbforum.*$)/i", $cookie, $match))
{
$this->ipsclass->my_setcookie( str_replace( $this->ipsclass->vars['cookie_id'], "", $match[0] ) , '-', -1 );
}
@@ -351,7 +341,7 @@ class login
$this->ipsclass->DB->build_and_exec_query( array( 'delete' => 'topic_markers',
'where' => 'marker_member_id='.$this->ipsclass->member['id'].' AND marker_forum_id IN ('.implode(',',$delete ).')' ) );
foreach( $save as $id => $data )
foreach( $save as $data )
{
$this->ipsclass->DB->do_insert( 'topic_markers', $data );
}
@@ -424,11 +414,25 @@ class login
if ( $message != "" )
{
$message = $this->ipsclass->lang[ $message ];
$message = preg_replace( "/<#NAME#>/", "<b>{$this->ipsclass->input[UserName]}</b>", $message );
$message = str_replace( "<#NAME#>", "<b>{$this->ipsclass->input['UserName']}</b>", $message );
$this->output .= $this->ipsclass->compiled_templates['skin_login']->errors($message);
}
//-----------------------------------------
// Using an alternate log in form?
//-----------------------------------------
if ( $this->han_login->login_method['login_login_url'] )
{
//-----------------------------------------
// Simply redirect to the form now
//-----------------------------------------
$this->ipsclass->boink_it( $this->han_login->login_method['login_login_url'] );
exit();
}
//-----------------------------------------
// Extra HTML?
//-----------------------------------------
@@ -453,24 +457,30 @@ class login
if ( $show_form )
{
if( !isset($_SERVER['HTTP_REFERER']) )
if ( $this->ipsclass->my_getenv('HTTP_REFERER') )
{
// HTTP_REFERER isn't set when force_login is enabled
// This method will piece together the base url, and the querystring arguments
// This is not anymore secure/insecure than IPB, as IPB will have to process
// those arguments whether force_login is enabled or not.
$_SERVER['HTTP_REFERER'] = $this->ipsclass->base_url.implode( "&amp;", $_SERVER['argv'] );
$argv = (is_array($this->ipsclass->my_getenv('argv')) && count($this->ipsclass->my_getenv('argv')) > 0) ? $this->ipsclass->my_getenv('argv') : array();
$http_referrer = $this->ipsclass->base_url.@implode( "&amp;", $argv );
}
else
{
$http_referrer = $this->ipsclass->my_getenv('HTTP_REFERER');
}
$this->output .= $this->ipsclass->compiled_templates['skin_login']->ShowForm( $this->ipsclass->lang['please_log_in'], htmlentities(urldecode($_SERVER['HTTP_REFERER'])), $extra_form );
$this->output .= $this->ipsclass->compiled_templates['skin_login']->ShowForm( $this->ipsclass->lang['please_log_in'], htmlentities(urldecode($http_referrer)), $extra_form );
}
$this->nav = array( $this->ipsclass->lang['log_in'] );
$this->page_title = $this->ipsclass->lang['log_in'];
$this->ipsclass->print->add_output("$this->output");
$this->ipsclass->print->do_output( array( 'TITLE' => $this->page_title, 'JS' => 0, NAV => $this->nav ) );
$this->ipsclass->print->do_output( array( 'TITLE' => $this->page_title, 'JS' => 0, 'NAV' => $this->nav, 'OVERRIDE' => $this->ipsclass->vars['board_offline'] ) );
exit();
}
@@ -503,7 +513,14 @@ class login
if ( $_POST['UserName'] == "" )
{
$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_username' ) );
if( $this->ipsclass->vars['ipbli_usertype'] == 'username' )
{
$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_username' ) );
}
else
{
$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_email_login' ) );
}
}
if ( $_POST['PassWord'] == "" )
@@ -515,7 +532,7 @@ class login
// Check for input length
//-----------------------------------------
if ( $this->ipsclass->vars['converge_login_method'] == 'username' )
if ( $this->ipsclass->vars['ipbli_usertype'] == 'username' )
{
if ( $this->ipsclass->txt_mb_strlen( $_POST['UserName'] ) > 32 )
{
@@ -555,7 +572,28 @@ class login
if ( $this->han_login->return_code != 'SUCCESS' )
{
$this->log_in_form( 'wrong_auth' );
if ( $this->han_login->return_code == 'ACCOUNT_LOCKED' )
{
$extra = "<!-- -->";
if( $this->ipsclass->vars['ipb_bruteforce_unlock'] )
{
if( $this->han_login->account_unlock )
{
$time = time() - $this->han_login->account_unlock;
$time = $this->ipsclass->vars['ipb_bruteforce_period'] - ceil( $time / 60 );
$extra = sprintf( $this->ipsclass->lang['bruteforce_account_unlock'], $time );
}
}
$this->ipsclass->Error( array( 'LEVEL' => 5, 'MSG' => 'bruteforce_account_lock', 'EXTRA' => $extra ) );
}
else
{
$this->log_in_form( 'wrong_auth' );
}
}
//-----------------------------------------
@@ -569,7 +607,7 @@ class login
if ( $pmember['partial_member_id'] )
{
$this->ipsclass->print->redirect_screen( $this->ipsclass->lang['partial_login'], 'act=reg&CODE=complete_login&mid='.$member['id'].'&key='.$pmember['partial_date'] );
$this->ipsclass->print->redirect_screen( $this->ipsclass->lang['partial_login'], 'act=reg&amp;CODE=complete_login&amp;mid='.$member['id'].'&amp;key='.$pmember['partial_date'] );
exit();
}
}
@@ -579,7 +617,7 @@ class login
// still need this?
//-----------------------------------------
if ($member['mgroup'] == $this->ipsclass->vars['auth_group'])
if ( $member['mgroup'] == $this->ipsclass->vars['auth_group'] )
{
//$this->log_in_form( 'need_validation' );
}
@@ -588,21 +626,33 @@ class login
// Generate a new log in key
//-----------------------------------------
if ( $this->ipsclass->vars['login_change_key'] OR ! $member['member_login_key'] )
$_ok = 1;
$_time = ( $this->ipsclass->vars['login_key_expire'] ) ? ( time() + ( intval($this->ipsclass->vars['login_key_expire']) * 86400 ) ) : 0;
$_sticky = $_time ? 0 : 1;
$_days = $_time ? $this->ipsclass->vars['login_key_expire'] : 365;
if ( $this->ipsclass->vars['login_change_key'] OR ! $member['member_login_key'] OR ( $this->ipsclass->vars['login_key_expire'] AND ( time() > $member['member_login_key_expire'] ) ) )
{
$member['member_login_key'] = $this->ipsclass->converge->generate_auto_log_in_key();
$this->ipsclass->DB->do_update( 'members', array( 'member_login_key' => $member['member_login_key'] ), 'id='.$member['id'] );
$this->ipsclass->DB->do_update( 'members', array( 'member_login_key' => $member['member_login_key'],
'member_login_key_expire' => $_time ), 'id='.$member['id'] );
}
//-----------------------------------------
// Strong hold cookie?
//-----------------------------------------
$this->ipsclass->stronghold_set_cookie( $member['id'], $member['member_login_key'], 1 );
//-----------------------------------------
// Cookie me softly?
//-----------------------------------------
if ($this->ipsclass->input['CookieDate'])
if ( $this->ipsclass->input['CookieDate'] )
{
$this->ipsclass->my_setcookie("member_id" , $member['id'] , 1);
$this->ipsclass->my_setcookie("pass_hash" , $member['member_login_key'], 1);
$this->ipsclass->my_setcookie("pass_hash" , $member['member_login_key'], $_sticky, $_days );
}
//-----------------------------------------
@@ -646,21 +696,32 @@ class login
$poss_session_id = preg_replace("/([^a-zA-Z0-9])/", "", $poss_session_id);
if ($poss_session_id)
if ( $poss_session_id )
{
$session_id = $poss_session_id;
//-----------------------------------------
// Delete any old sessions with this users IP
// addy that doesn't match our session ID.
//-----------------------------------------
$this->ipsclass->DB->simple_construct( array( 'delete' => 'sessions',
'where' => "ip_address='".$this->ipsclass->ip_address."' AND id <> '$session_id'"
) );
$this->ipsclass->DB->simple_shutdown_exec();
if( $this->ipsclass->vars['match_ipaddress'] )
{
//-----------------------------------------
// Delete any old sessions with this users IP
// addy that doesn't match our session ID.
//-----------------------------------------
$this->ipsclass->DB->simple_construct( array( 'delete' => 'sessions',
'where' => "ip_address='".$this->ipsclass->ip_address."' AND id <> '$session_id'"
) );
$this->ipsclass->DB->simple_shutdown_exec();
}
if( $this->ipsclass->vars['disable_anonymous'] )
{
$privacy = 0;
}
else
{
$privacy = ( isset($this->ipsclass->input['Privacy']) AND $this->ipsclass->input['Privacy']) ? 1 : 0;
}
$this->ipsclass->DB->do_shutdown_update( 'sessions',
array (
@@ -668,7 +729,7 @@ class login
'member_id' => $member['id'],
'running_time' => time(),
'member_group' => $member['mgroup'],
'login_type' => $this->ipsclass->input['Privacy'] ? 1 : 0
'login_type' => $privacy
),
"id='".$session_id."'"
);
@@ -677,15 +738,27 @@ class login
{
$session_id = md5( uniqid(microtime()) );
//-----------------------------------------
// Delete any old sessions with this users IP addy.
//-----------------------------------------
if( $this->ipsclass->vars['disable_anonymous'] )
{
$privacy = 0;
}
else
{
$privacy = $this->ipsclass->input['Privacy'] ? 1 : 0;
}
$this->ipsclass->DB->simple_construct( array( 'delete' => 'sessions',
'where' => "ip_address='".$this->ipsclass->ip_address."'"
) );
$this->ipsclass->DB->simple_shutdown_exec();
if( $this->ipsclass->vars['match_ipaddress'] )
{
//-----------------------------------------
// Delete any old sessions with this users IP addy.
//-----------------------------------------
$this->ipsclass->DB->simple_construct( array( 'delete' => 'sessions',
'where' => "ip_address='".$this->ipsclass->ip_address."'"
) );
$this->ipsclass->DB->simple_shutdown_exec();
}
$this->ipsclass->DB->do_shutdown_insert( 'sessions',
array (
@@ -695,15 +768,15 @@ class login
'running_time' => time(),
'member_group' => $member['mgroup'],
'ip_address' => $this->ipsclass->ip_address,
'browser' => substr($this->ipsclass->clean_value($_SERVER['HTTP_USER_AGENT']), 0, 50),
'login_type' => $this->ipsclass->input['Privacy'] ? 1 : 0
'browser' => substr($this->ipsclass->clean_value($this->ipsclass->my_getenv('HTTP_USER_AGENT')), 0, 50),
'login_type' => $privacy
) );
}
$this->ipsclass->member = $member;
$this->ipsclass->session_id = $session_id;
if ($this->ipsclass->input['referer'] && ($this->ipsclass->input['act'] != 'Reg'))
if (isset($this->ipsclass->input['referer']) AND $this->ipsclass->input['referer'] && ($this->ipsclass->input['act'] != 'Reg'))
{
$url = str_replace( '&amp;', '&', $this->ipsclass->input['referer'] );
$url = str_replace( "{$this->ipsclass->vars['board_url']}/index.{$this->ipsclass->vars['php_ext']}", "", $url );
@@ -717,7 +790,7 @@ class login
//-----------------------------------------
$this->ipsclass->DB->simple_construct( array( 'update' => 'members',
'set' => "login_anonymous='".intval($this->ipsclass->input['Privacy'])."&1'",
'set' => "login_anonymous='".intval($privacy)."&1', failed_logins='', failed_login_count=0",
'where' => "id={$member['id']}"
) );
@@ -748,7 +821,7 @@ class login
$this->modules->on_login($member);
}
if ( $this->ipsclass->input['return'] != "" )
if ( isset($this->ipsclass->input['return']) AND $this->ipsclass->input['return'] != "" )
{
$return = urldecode($this->ipsclass->input['return']);
@@ -766,11 +839,11 @@ class login
if ( $member_extra['bio'] == 'dupemail' )
{
$this->ipsclass->print->redirect_screen( "{$this->ipsclass->lang[thanks_for_login]} {$this->ipsclass->member['members_display_name']}", 'act=usercp' );
$this->ipsclass->print->redirect_screen( "{$this->ipsclass->lang['thanks_for_login']} {$this->ipsclass->member['members_display_name']}", 'act=usercp' );
}
else
{
$this->ipsclass->print->redirect_screen( "{$this->ipsclass->lang[thanks_for_login]} {$this->ipsclass->member['members_display_name']}", $url );
$this->ipsclass->print->redirect_screen( "{$this->ipsclass->lang['thanks_for_login']} {$this->ipsclass->member['members_display_name']}", $url );
}
}
@@ -795,6 +868,48 @@ class login
}
}
//-----------------------------------------
// Set some cookies
//-----------------------------------------
$this->ipsclass->my_setcookie( "member_id" , "0" );
$this->ipsclass->my_setcookie( "pass_hash" , "0" );
$this->ipsclass->my_setcookie( "anonlogin" , "-1" );
if ( is_array($_COOKIE) )
{
foreach( $_COOKIE as $cookie => $value )
{
if ( preg_match( "/^(".$this->ipsclass->vars['cookie_id']."ipbforumpass_.*$)/i", $cookie, $match) )
{
$this->ipsclass->my_setcookie( str_replace( $this->ipsclass->vars['cookie_id'], "", $match[0] ) , '-', -1 );
}
}
}
//-----------------------------------------
// Remote log out?
//-----------------------------------------
require_once( ROOT_PATH.'sources/handlers/han_login.php' );
$this->han_login = new han_login();
$this->han_login->ipsclass =& $this->ipsclass;
$this->han_login->init();
//-----------------------------------------
// Using an alternate log in form?
//-----------------------------------------
if ( $this->han_login->login_method['login_logout_url'] )
{
//-----------------------------------------
// Simply redirect to the form now
//-----------------------------------------
$this->ipsclass->boink_it( $this->han_login->login_method['login_logout_url'] );
exit();
}
//-----------------------------------------
// Do it..
//-----------------------------------------
@@ -816,25 +931,6 @@ class login
$this->ipsclass->DB->simple_shutdown_exec();
//-----------------------------------------
// Set some cookies
//-----------------------------------------
$this->ipsclass->my_setcookie( "member_id" , "0" );
$this->ipsclass->my_setcookie( "pass_hash" , "0" );
$this->ipsclass->my_setcookie( "anonlogin" , "-1" );
if ( is_array($_COOKIE) )
{
foreach( $_COOKIE as $cookie => $value )
{
if ( preg_match( "/^(".$this->ipsclass->vars['cookie_id']."ipbforumpass_.*$)/i", $cookie, $match) )
{
$this->ipsclass->my_setcookie( str_replace( $this->ipsclass->vars['cookie_id'], "", $match[0] ) , '-', -1 );
}
}
}
# Horrid hack: IPB 3.0: Separate out log out functions into class / function
if ( $return )
{
@@ -844,7 +940,7 @@ class login
$url = "";
if ( $this->ipsclass->input['return'] != "" )
if ( isset($this->ipsclass->input['return']) AND $this->ipsclass->input['return'] != "" )
{
$return = urldecode($this->ipsclass->input['return']);
+165 -115
View File
@@ -2,28 +2,18 @@
/*
+--------------------------------------------------------------------------
| Invision Power Board 2.1.7
| Invision Power Board
| =============================================
| by Matthew Mecham
| (c) 2001 - 2005 Invision Power Services, Inc.
| (c) 2001 - 2006 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: 2006-01-11 22:47:48 +0000 (Wed, 11 Jan 2006) $
| > $Revision: 122 $
| > $Author: bfarber $
| > $Date: 2006-10-09 16:33:46 +0100 (Mon, 09 Oct 2006) $
| > $Revision: 622 $
| > $Author: matt $
+---------------------------------------------------------------------------
|
| > Show all the members
@@ -39,7 +29,7 @@
if ( ! defined( 'IN_IPB' ) )
{
print "<h1>Íåêîððåêòíûé àäðåñ</h1>Âû íå èìååòå äîñòóïà ê ýòîìó ôàéëó íàïðÿìóþ. Åñëè âû íåäàâíî îáíîâëÿëè ôîðóì, âû äîëæíû îáíîâèòü âñå ñîîòâåòñòâóþùèå ôàéëû.";
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
exit();
}
@@ -66,6 +56,8 @@ class memberlist
var $ucp_html = "";
var $topic = "";
var $lib_profile = '';
/*-------------------------------------------------------------------------*/
// Auto-run
/*-------------------------------------------------------------------------*/
@@ -78,8 +70,33 @@ class memberlist
$this->ipsclass->load_language('lang_mlist');
$this->ipsclass->load_template('skin_mlist');
//-----------------------------------------
// INIT
//-----------------------------------------
$see_groups = array();
$the_filter = array( 'ALL' => $this->ipsclass->lang['show_all'] );
$the_members = array();
$custom_fields = array();
$checked = $this->ipsclass->input['photoonly'] == 1 ? 'checked="checked"' : "";
$query = array();
$url = array();
$query_string = "";
$error = 0;
$quick_jump = "";
$pp_rating_real = intval( $this->ipsclass->input['pp_rating_real'] );
$pp_gender = substr( trim( $this->ipsclass->input['pp_gender'] ), 0, 10 );
$this->ipsclass->input['showall'] = intval($this->ipsclass->input['showall']);
$this->first = intval($this->ipsclass->input['st']);
$this->max_results = isset( $this->ipsclass->input['max_results'] ) ? $this->ipsclass->input['max_results'] : '20';
$this->sort_key = isset( $this->ipsclass->input['sort_key'] ) ? $this->ipsclass->input['sort_key'] : 'members_display_name';
$this->sort_order = isset( $this->ipsclass->input['sort_order'] ) ? $this->ipsclass->input['sort_order'] : 'asc';
$this->filter = isset( $this->ipsclass->input['filter'] ) ? ( $this->ipsclass->input['filter'] == 'ALL' ? 'ALL' : intval( $this->ipsclass->input['filter'] ) ) : 'ALL';
if ($this->ipsclass->member['g_mem_info'] != 1)
if ( $this->ipsclass->member['g_mem_info'] != 1 )
{
$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_permission' ) );
}
@@ -92,65 +109,63 @@ class memberlist
$this->topic = new topics();
$this->topic->ipsclass =& $this->ipsclass;
$this->topic->topic_init( 1 );
$this->topic->topic['forum_id'] = 0;
$this->topic->topic['tid'] = 0;
$see_groups = array();
//-----------------------------------------
// Load profile lib
//-----------------------------------------
require_once( ROOT_PATH . 'sources/action_public/profile.php' );
$this->lib_profile = new profile();
$this->lib_profile->ipsclass =& $this->ipsclass;
//-----------------------------------------
// Get the member groups, member titles stuff
//-----------------------------------------
foreach( $this->ipsclass->cache['group_cache'] as $id => $row )
foreach( $this->ipsclass->cache['group_cache'] as $row )
{
if ( $row['g_hide_from_list'] )
{
continue;
if ( ! ( $this->ipsclass->member['g_access_cp'] AND $this->ipsclass->input['showall'] ) )
{
continue;
}
}
$see_groups[] = $row['g_id'];
$this->mem_groups[ $row['g_id'] ] = array( 'TITLE' => $row['g_title'],
'ICON' => $row['g_icon'],
);
'ICON' => $row['g_icon'] );
}
$the_filter = array( 'ALL' => $this->ipsclass->lang['show_all'] );
foreach($this->mem_groups as $id => $data)
foreach( $this->mem_groups as $id => $data )
{
if ($id == $this->ipsclass->vars['guest_group'])
if ( $id == $this->ipsclass->vars['guest_group'] )
{
continue;
}
$the_filter[$id] = $data['TITLE'];
$the_filter[ $id ] = $data['TITLE'];
}
$group_string = implode( ",", $see_groups );
//-----------------------------------------
// Test for input
//-----------------------------------------
if (isset($this->ipsclass->input['st'])) $this->first = intval($this->ipsclass->input['st']);
if (isset($this->ipsclass->input['max_results'])) $this->max_results = $this->ipsclass->input['max_results'];
if (isset($this->ipsclass->input['sort_key'])) $this->sort_key = $this->ipsclass->input['sort_key'];
if (isset($this->ipsclass->input['sort_order'])) $this->sort_order = $this->ipsclass->input['sort_order'];
if (isset($this->ipsclass->input['filter'])) $this->filter = $this->ipsclass->input['filter'];
//-----------------------------------------
// Init some arrays
//-----------------------------------------
$the_sort_key = array( 'members_display_name' => 'sort_by_name',
'posts' => 'sort_by_posts',
'joined' => 'sort_by_joined',
$the_sort_key = array( 'members_display_name' => 'sort_by_name',
'posts' => 'sort_by_posts',
'joined' => 'sort_by_joined',
'members_profile_views' => 'm_dd_views',
);
$the_max_results = array( 10 => '10',
$the_max_results = array(
20 => '20',
30 => '30',
40 => '40',
50 => '50',
60 => '60',
);
$the_sort_order = array( 'desc' => 'descending_order',
@@ -168,36 +183,34 @@ class memberlist
foreach ($the_sort_order as $k => $v)
{
$sort_order_html .= $k == $this->sort_order ? "<option value='$k' selected>" . $this->ipsclass->lang[ $the_sort_order[ $k ] ] . "</option>\n"
$sort_order_html .= $k == $this->sort_order ? "<option value='$k' selected='selected'>" . $this->ipsclass->lang[ $the_sort_order[ $k ] ] . "</option>\n"
: "<option value='$k'>" . $this->ipsclass->lang[ $the_sort_order[ $k ] ] . "</option>\n";
}
foreach ($the_filter as $k => $v)
{
$filter_html .= $k == $this->filter ? "<option value='$k' selected>" . $the_filter[ $k ] . "</option>\n"
: "<option value='$k'>" . $the_filter[ $k ] . "</option>\n";
$filter_html .= $k == $this->filter ? "<option value='$k' selected='selected'>" . $the_filter[ $k ] . "</option>\n"
: "<option value='$k'>" . $the_filter[ $k ] . "</option>\n";
}
foreach ($the_sort_key as $k => $v)
{
$sort_key_html .= $k == $this->sort_key ? "<option value='$k' selected>" . $this->ipsclass->lang[ $the_sort_key[ $k ] ] . "</option>\n"
: "<option value='$k'>" . $this->ipsclass->lang[ $the_sort_key[ $k ] ] . "</option>\n";
$sort_key_html .= $k == $this->sort_key ? "<option value='$k' selected='selected'>" . $this->ipsclass->lang[ $the_sort_key[ $k ] ] . "</option>\n"
: "<option value='$k'>" . $this->ipsclass->lang[ $the_sort_key[ $k ] ] . "</option>\n";
}
foreach ($the_max_results as $k => $v)
{
$max_results_html .= $k == $this->max_results ? "<option value='$k' selected>". $the_max_results[ $k ] . "</option>\n"
: "<option value='$k'>" . $the_max_results[ $k ] . "</option>\n";
$max_results_html .= $k == $this->max_results ? "<option value='$k' selected='selected'>". $the_max_results[ $k ] . "</option>\n"
: "<option value='$k'>" . $the_max_results[ $k ] . "</option>\n";
}
$this->ipsclass->lang['sorting_text'] = preg_replace( "/<#FILTER#>/" , $filter_html."</select>" , $this->ipsclass->lang['sorting_text'] );
$this->ipsclass->lang['sorting_text'] = preg_replace( "/<#SORT_KEY#>/" , $sort_key_html."</select>" , $this->ipsclass->lang['sorting_text'] );
$this->ipsclass->lang['sorting_text'] = preg_replace( "/<#SORT_ORDER#>/" , $sort_order_html."</select>" , $this->ipsclass->lang['sorting_text'] );
$this->ipsclass->lang['sorting_text'] = preg_replace( "/<#MAX_RESULTS#>/" , $max_results_html."</select>", $this->ipsclass->lang['sorting_text'] );
$error = 0;
$this->ipsclass->lang['sorting_text'] = str_replace( "<#FILTER#>" , $filter_html."</select>" , $this->ipsclass->lang['sorting_text'] );
$this->ipsclass->lang['sorting_text'] = str_replace( "<#SORT_KEY#>" , $sort_key_html."</select>" , $this->ipsclass->lang['sorting_text'] );
$this->ipsclass->lang['sorting_text'] = str_replace( "<#SORT_ORDER#>" , $sort_order_html."</select>" , $this->ipsclass->lang['sorting_text'] );
$this->ipsclass->lang['sorting_text'] = str_replace( "<#MAX_RESULTS#>" , $max_results_html."</select>", $this->ipsclass->lang['sorting_text'] );
if ( ! isset($the_sort_key[ $this->sort_key ]) ) $error = 1;
if ( ! isset($the_sort_order[ $this->sort_order ]) ) $error = 1;
if ( ! isset($the_filter[ $this->filter ]) ) $error = 1;
if ( ! isset($the_max_results[ $this->max_results ]) ) $error = 1;
if ( ! isset($the_max_results[ $this->max_results ]) ) $this->max_results = 20;
//-----------------------------------------
// Error?
@@ -219,12 +232,10 @@ class memberlist
// Quick form?
//-----------------------------------------
$quick_jump = "";
for ( $i = 65; $i <= 90; $i++ )
{
$letter = strtolower(chr($i));
$selected = $this->ipsclass->input['quickjump'] == $letter ? ' selected="selected"' : '';
$selected = isset($this->ipsclass->input['quickjump']) AND $this->ipsclass->input['quickjump'] == $letter ? ' selected="selected"' : '';
$quick_jump .= $this->ipsclass->compiled_templates['skin_mlist']->mlist_quick_jump_entry( $letter, $selected );
}
@@ -238,23 +249,17 @@ class memberlist
$this->topic->custom_fields->supmod = intval($this->ipsclass->member['g_is_supmod']);
$this->topic->custom_fields->member_id = $this->ipsclass->member['id'];
$this->topic->custom_fields->mem_data_id = 0;
$this->topic->custom_fields->mem_list = 1;
$this->topic->custom_fields->init_data();
$this->topic->custom_fields->parse_to_edit();
//-----------------------------------------
// Query..
//-----------------------------------------
$query = array();
$url = array();
$query_string = "";
//-----------------------------------------
// Quick jump rehash...
//-----------------------------------------
if ( $this->ipsclass->input['qjbutton'] and $this->ipsclass->input['quickjump'] )
if ( isset($this->ipsclass->input['qjbutton']) AND $this->ipsclass->input['qjbutton']
AND isset($this->ipsclass->input['quickjump']) AND $this->ipsclass->input['quickjump'] )
{
$this->ipsclass->input['name_box'] = 'begins';
$this->ipsclass->input['name'] = $this->ipsclass->input['quickjump'];
@@ -284,11 +289,14 @@ class memberlist
{
$hide_ids = array();
foreach( $this->ipsclass->cache['group_cache'] as $id => $data )
foreach( $this->ipsclass->cache['group_cache'] as $data )
{
if ( $data['g_hide_from_list'] )
{
$hide_ids[] = $data['g_id'];
if( !($this->ipsclass->member['g_access_cp'] && $this->ipsclass->input['showall']) )
{
$hide_ids[] = $data['g_id'];
}
}
}
@@ -315,7 +323,7 @@ class memberlist
'signature' => 'me.signature',
'homepage' => 'me.website',
'name' => 'm.name',
'photoonly' => 'me.photo_location',
'photoonly' => 'pp.pp_main_photo',
);
//-----------------------------------------
@@ -324,7 +332,8 @@ class memberlist
foreach( $mapit as $in => $tbl )
{
$inbit = $this->ipsclass->parse_clean_value(trim(urldecode(stripslashes($this->ipsclass->input[ $in ]))));
$this->ipsclass->input[ $in ] = isset($this->ipsclass->input[ $in ]) ? $this->ipsclass->input[ $in ] : '';
$inbit = $this->ipsclass->parse_clean_value(trim(urldecode(stripslashes($this->ipsclass->input[ $in ]))));
$url[] = $in.'='.$this->ipsclass->input[ $in ];
@@ -336,11 +345,11 @@ class memberlist
{
if ( $this->ipsclass->input['name_box'] == 'begins' )
{
$query[] = "m.members_display_name LIKE '".$inbit."%'";
$query[] = "m.members_l_display_name LIKE '".$inbit."%'";
}
else
{
$query[] = "m.members_display_name LIKE '%".$inbit."%'";
$query[] = "m.members_l_display_name LIKE '%".$inbit."%'";
}
}
else if ( $in == 'posts' and intval($inbit) > 0 )
@@ -390,19 +399,47 @@ class memberlist
{
foreach( $this->topic->custom_fields->out_fields as $id => $data )
{
if ( $this->ipsclass->input['field_'.$id] )
if ( isset($this->ipsclass->input['field_'.$id]) AND $this->ipsclass->input['field_'.$id] )
{
$query[] = "p.field_{$id} LIKE '{$this->ipsclass->input['field_'.$id]}%'";
$url[] = "field_{$id}=".$this->ipsclass->input['field_'.$id];
}
}
}
//-----------------------------------------
// Rating..
//-----------------------------------------
if ( $pp_rating_real )
{
$query[] = "pp.pp_rating_real > ".$pp_rating_real;
$url[] = "pp_rating_real=".$pp_rating_real;
}
//-----------------------------------------
// Rating..
//-----------------------------------------
if ( $pp_gender )
{
if ( $pp_gender == 'male' )
{
$query[] = "pp.pp_gender='male'";
$url[] = "pp_gender=male";
}
else if ( $pp_gender == 'female' )
{
$query[] = "pp.pp_gender='female'";
$url[] = "pp_gender=female";
}
}
//-----------------------------------------
// Finish query
//-----------------------------------------
if ( count($query) )
if ( count( $query ) )
{
$query_string = implode( " AND ", $query );
}
@@ -415,8 +452,10 @@ class memberlist
$this->ipsclass->DB->cache_exec_query();
$max = $this->ipsclass->DB->fetch_row();
$this->ipsclass->input['name_box'] = isset($this->ipsclass->input['name_box']) ? $this->ipsclass->input['name_box'] : '';
$links = $this->ipsclass->build_pagelinks( array( 'TOTAL_POSS' => $max['total_members'],
$pages = $this->ipsclass->build_pagelinks( array( 'TOTAL_POSS' => $max['total_members'],
'PER_PAGE' => $this->max_results,
'CUR_ST_VAL' => $this->first,
'L_SINGLE' => "",
@@ -425,16 +464,10 @@ class memberlist
)
);
$this->output = $this->ipsclass->compiled_templates['skin_mlist']->mlist_start();
$this->output .= $this->ipsclass->compiled_templates['skin_mlist']->mlist_page_header( $links, $quick_jump );
//-----------------------------------------
// Get custom profile information
//-----------------------------------------
$custom_fields = "";
if ( count( $this->topic->custom_fields->out_fields ) )
{
foreach( $this->topic->custom_fields->out_fields as $id => $data )
@@ -456,6 +489,9 @@ class memberlist
// START THE LISTING
//-----------------------------------------
$_count = 0;
$_per_row = 4;
if ( $max['total_members'] > 0 )
{
$this->ipsclass->DB->cache_add_query( 'mlist_get_members', array( 'query' => $query_string,
@@ -467,56 +503,70 @@ class memberlist
while ($member = $this->ipsclass->DB->fetch_row() )
{
$member['members_display_name'] = $member['members_display_name'] ? $member['members_display_name'] : $member['name'];
//-----------------------------------------
// Kludgy.. kludge.. must out in IPB 3.0
//-----------------------------------------
#$member = $this->lib_profile->personal_portal_set_information( $member );
$member = $this->topic->parse_member( $member );
$photo_vars = $this->ipsclass->cache['group_cache'][$member['mgroup']]['g_photo_max_vars'];
$photo_dims = array( 'pwidth' => 180, 'pheight' => 180 );
if( strpos( $photo_vars, ":" ) )
{
$tmp = array();
$tmp = explode( ":", $photo_vars );
$photo_dims['pwidth'] = $tmp[1]+30;
$photo_dims['pheight'] = $tmp[2]+30;
unset( $tmp, $photo_vars );
}
# Stop the length check taking into account member title formatting
$member['_members_display_name'] = $member['members_display_name'];
$member['joined'] = $this->ipsclass->get_date( $member['joined'], 'JOINED' );
$member['group'] = $this->mem_groups[ $member['mgroup'] ]['TITLE'];
if ($member['photo_type'] and $member['photo_location'])
{
$member['camera'] = "<a href=\"javascript:PopUp('{$this->ipsclass->base_url}act=Profile&amp;CODE=showphoto&amp;MID={$member['id']}','Photo','{$photo_dims['pwidth']}','{$photo_dims['pheight']}','0','1','1','1')\"><{CAMERA}></a>";
}
$member['posts'] = $this->ipsclass->do_number_format($member['posts']);
$member['group'] = $this->ipsclass->make_name_formatted( $this->mem_groups[ $member['mgroup'] ]['TITLE'], $member['mgroup'] );
$member['posts'] = $this->ipsclass->do_number_format($member['posts']);
//-----------------------------------------
// Bug fix... name-- breaks formatting
// xhmlt invalid..
//-----------------------------------------
$member['members_display_name'] = str_replace( '--', '&#45;&#45;', $member['members_display_name'] );
$member['members_display_name'] = str_replace( '--', '&#45;&#45;', $this->ipsclass->make_name_formatted( $member['members_display_name'], $member['mgroup'] ) );
$this->output .= $this->ipsclass->compiled_templates['skin_mlist']->mlist_show_row($member);
//-----------------------------------------
// New row?
//-----------------------------------------
if ( $_count % $_per_row == 0 )
{
$member['_new_row'] = 1;
}
$_count++;
$the_members[] = $member;
}
}
else
//-----------------------------------------
// More rows?
//-----------------------------------------
if ( $_count % $_per_row != 0 )
{
$this->output .= $this->ipsclass->compiled_templates['skin_mlist']->mlist_no_results();
for( $i = 0 ; $i < $_per_row ; $i ++ )
{
if ( $_count % $_per_row != 0 )
{
$the_members[] = array( '_blank' => 1 );
}
else
{
break;
}
$_count++;
}
}
$checked = $this->ipsclass->input['photoonly'] == 1 ? 'checked="checked"' : "";
//-----------------------------------------
// Print bottom...
// Print...
//-----------------------------------------
$this->output .= $this->ipsclass->compiled_templates['skin_mlist']->mlist_page_end( $checked );
$this->output .= $this->ipsclass->compiled_templates['skin_mlist']->mlist_end( $links );
$this->output .= $this->ipsclass->compiled_templates['skin_mlist']->member_list_show($the_members, $pages, $quick_jump, $checked);
if ( $custom_fields )
{
+259 -145
View File
@@ -2,27 +2,17 @@
/*
+--------------------------------------------------------------------------
| Invision Power Board 2.1.7
| Invision Power Board
| =============================================
| by Matthew Mecham
| (c) 2001 - 2005 Invision Power Services, Inc.
| (c) 2001 - 2006 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-12-07 15:18:13 +0000 (Wed, 07 Dec 2005) $
| > $Revision: 95 $
| > $Date: 2006-10-03 21:04:14 +0100 (Tue, 03 Oct 2006) $
| > $Revision: 602 $
| > $Author: bfarber $
+---------------------------------------------------------------------------
|
@@ -38,7 +28,7 @@
if ( ! defined( 'IN_IPB' ) )
{
print "<h1>Íåêîððåêòíûé àäðåñ</h1>Âû íå èìååòå äîñòóïà ê ýòîìó ôàéëó íàïðÿìóþ. Åñëè âû íåäàâíî îáíîâëÿëè ôîðóì, âû äîëæíû îáíîâèòü âñå ñîîòâåòñòâóþùèå ôàéëû.";
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
exit();
}
@@ -59,6 +49,7 @@ class messenger
var $to_mem = array();
var $jump_html = "";
var $show_form = 0;
var $vid = "in";
var $mem_groups = array();
@@ -66,7 +57,6 @@ class messenger
var $topiclib = "";
var $postlib = "";
var $parser = "";
var $cp_html = "";
@@ -83,27 +73,17 @@ class messenger
//-----------------------------------------
$this->ipsclass->load_language('lang_msg');
$this->ipsclass->load_language('lang_ucp');
$this->ipsclass->load_template('skin_msg');
$this->ipsclass->load_template('skin_ucp');
//-----------------------------------------
// Load classes
//-----------------------------------------
require_once( ROOT_PATH.'sources/lib/func_msg.php' );
require_once( ROOT_PATH."sources/lib/func_usercp.php" );
$this->msglib = new func_msg();
$this->msglib->ipsclass =& $this->ipsclass;
//-----------------------------------------
// INIT da func
//-----------------------------------------
$this->lib = new func_usercp($this);
$this->lib->ipsclass =& $this->ipsclass;
//-----------------------------------------
// Set up defaults
//-----------------------------------------
@@ -134,7 +114,7 @@ class messenger
// Print menu
//-----------------------------------------
$this->ipsclass->print->add_output( $this->lib->ucp_generate_menu() );
$this->ipsclass->print->add_output( $this->msglib->ucp_generate_menu() );
//-----------------------------------------
// What to do?
@@ -221,14 +201,14 @@ class messenger
// If we have any HTML to print, do so...
$fj = $this->ipsclass->build_forum_jump();
$fj = preg_replace( "!#Forum Jump#!", $this->ipsclass->lang['forum_jump'], $fj);
$fj = str_replace( "#Forum Jump#", $this->ipsclass->lang['forum_jump'], $fj);
$this->output .= $this->ipsclass->compiled_templates['skin_ucp']->CP_end();
$this->output .= $this->ipsclass->compiled_templates['skin_msg']->CP_end();
$this->output .= $this->ipsclass->compiled_templates['skin_ucp']->forum_jump($fj);
$this->output .= $this->ipsclass->compiled_templates['skin_msg']->forum_jump($fj);
$this->ipsclass->print->add_output("$this->output");
$this->ipsclass->print->do_output( array( 'TITLE' => $this->page_title, 'JS' => 0, NAV => $this->nav ) );
$this->ipsclass->print->add_output( $this->output );
$this->ipsclass->print->do_output( array( 'TITLE' => $this->page_title, 'JS' => 0, 'NAV' => $this->nav ) );
}
/*-------------------------------------------------------------------------*/
@@ -248,7 +228,7 @@ class messenger
$count = array( 'unsent' => 0 );
$names = array( 'unsent' => $this->ipsclass->lang['fd_unsent'] );
foreach( $this->ipsclass->member['dir_data'] as $k => $v )
foreach( $this->ipsclass->member['dir_data'] as $v )
{
$count[ $v['id'] ] = 0;
$names[ $v['id'] ] = $v['real'];
@@ -291,7 +271,7 @@ class messenger
$ids = array();
$qe = "";
foreach( $this->ipsclass->member['dir_data'] as $k => $v )
foreach( $this->ipsclass->member['dir_data'] as $v )
{
$names[ $v['id'] ] = $v['real'];
}
@@ -302,7 +282,7 @@ class messenger
foreach( $names as $vid => $name )
{
if ( $this->ipsclass->input['its_'.$vid] == 1 )
if ( isset($this->ipsclass->input['its_'.$vid]) AND $this->ipsclass->input['its_'.$vid] == 1 )
{
$ids[] = $vid;
}
@@ -350,7 +330,7 @@ class messenger
$current_dirs = $this->ipsclass->member['vdirs'];
foreach( $ids as $k => $v )
foreach( $ids as $v )
{
$foldertotal['total'] = 0;
@@ -379,9 +359,9 @@ class messenger
function archive()
{
$this->lib->jump_html = preg_replace("/<!--EXTRA-->/", "<option value='all'>".$this->ipsclass->lang['all_folders']."</option>", $this->lib->jump_html );
$this->msglib->jump_html = str_replace("<!--EXTRA-->", "<option value='all'>".$this->ipsclass->lang['all_folders']."</option>", $this->msglib->jump_html );
$this->output .= $this->ipsclass->compiled_templates['skin_msg']->archive_form( $this->lib->jump_html );
$this->output .= $this->ipsclass->compiled_templates['skin_msg']->archive_form( $this->msglib->jump_html );
$this->page_title = $this->ipsclass->lang['t_welcome'];
$this->nav = array( "<a href='".$this->base_url."act=UserCP&amp;CODE=00'>".$this->ipsclass->lang['t_title']."</a>" );
@@ -537,7 +517,7 @@ class messenger
//-----------------------------------------
// Delete?
//-----------------------------------------
if ($this->ipsclass->input['delete'] == 'yes')
{
$this->msglib->delete_messages( $msg_ids, $this->ipsclass->member['id'] );
@@ -551,6 +531,37 @@ class messenger
$this->ipsclass->DB->simple_construct( array ( 'update'=> 'members', 'set' => "msg_total=".$total['msg_total'], 'where' => "id=".$this->ipsclass->member['id'] ) ) ;
$this->ipsclass->DB->simple_exec();
if( $this->ipsclass->input['VID'] != 'all' )
{
$this->ipsclass->member['vdirs'] = $this->msglib->rebuild_dir_count( $this->ipsclass->member['id'],
$this->ipsclass->member['vdirs'],
$this->ipsclass->input['VID'],
($this->ipsclass->member['dir_data'][ $this->ipsclass->input['VID'] ]['count'] - $num_msg) > 0 ? ($this->ipsclass->member['dir_data'][ $this->ipsclass->input['VID'] ]['count'] - $num_msg) : 0,
'save'
);
}
else
{
foreach( $this->ipsclass->member['dir_data'] as $k => $v )
{
$foldertotal['total'] = 0;
$this->ipsclass->DB->simple_construct( array ( 'select' => 'COUNT(*) as total', 'from' => 'message_topics', 'where' => "mt_owner_id=".$this->ipsclass->member['id']." AND mt_vid_folder = '{$k}'" ) );
$this->ipsclass->DB->simple_exec();
$foldertotal = $this->ipsclass->DB->fetch_row();
$updated_vdirs = $this->msglib->rebuild_dir_count( $this->ipsclass->member['id'],
$this->ipsclass->member['vdirs'],
$k,
$foldertotal['total'],
'save'
);
$this->ipsclass->member['vdirs'] = $updated_vdirs;
}
}
}
//-----------------------------------------
@@ -592,7 +603,7 @@ class messenger
function strip_quotes($text) {
return preg_replace( "/\"/", '\\\"', $text );
return str_replace( '"', '\\\"', $text );
}
/*-------------------------------------------------------------------------*/
@@ -607,7 +618,7 @@ class messenger
$max = 1;
foreach( $this->ipsclass->member['dir_data'] as $k => $v )
foreach( $this->ipsclass->member['dir_data'] as $v )
{
$extra = "";
@@ -723,7 +734,7 @@ class messenger
{
if ($this->ipsclass->input[$match[0]])
{
$count = intval( $cur_dir[ $match[0] ] );
$count = isset($cur_dir[ $match[0] ]) ? intval( $cur_dir[ $match[0] ] ) : 0;
$v_dir .= '|'.$match[0].':'.trim(str_replace( '|', '', str_replace( ";", "", $this->ipsclass->input[$match[0]] ) ) ).';'.$count;
}
@@ -744,16 +755,13 @@ class messenger
function del_member()
{
$this->ipsclass->input['MID'] = isset($this->ipsclass->input['MID']) ? intval($this->ipsclass->input['MID']) : 0;
if (!$this->ipsclass->input['MID'])
{
$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_user' ) );
}
if (! preg_match( "/^(\d+)$/", $this->ipsclass->input['MID'] ) )
{
$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_user' ) );
}
$this->ipsclass->DB->simple_exec_query( array( 'delete' => 'contacts', 'where' => "member_id={$this->ipsclass->member['id']} AND contact_id={$this->ipsclass->input['MID']}" ) );
$this->ipsclass->boink_it($this->base_url."act=Msg&CODE=02");
@@ -767,16 +775,13 @@ class messenger
function edit_member()
{
$this->ipsclass->input['MID'] = isset($this->ipsclass->input['MID']) ? intval($this->ipsclass->input['MID']) : 0;
if (!$this->ipsclass->input['MID'])
{
$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_user' ) );
}
if (! preg_match( "/^(\d+)$/", $this->ipsclass->input['MID'] ) )
{
$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_user' ) );
}
$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'contacts', 'where' => "member_id={$this->ipsclass->member['id']} AND contact_id={$this->ipsclass->input['MID']}" ) );
$this->ipsclass->DB->simple_exec();
@@ -816,19 +821,25 @@ class messenger
function do_edit()
{
$this->ipsclass->input['MID'] = isset($this->ipsclass->input['MID']) ? intval($this->ipsclass->input['MID']) : 0;
if (!$this->ipsclass->input['MID'])
{
$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_user' ) );
}
if (! preg_match( "/^(\d+)$/", $this->ipsclass->input['MID'] ) )
{
$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_user' ) );
}
$this->ipsclass->input['allow_msg'] = $this->ipsclass->input['allow_msg'] == 'yes' ? 1 : 0;
$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'contacts', 'where' => "member_id={$this->ipsclass->member['id']} AND contact_id={$this->ipsclass->input['MID']}" ) );
$this->ipsclass->DB->simple_construct( array( 'select' => 'c.*',
'from' => array( 'contacts' => 'c'),
'where' => "c.member_id={$this->ipsclass->member['id']} AND c.contact_id={$this->ipsclass->input['MID']}",
'add_join' => array( 0 => array( 'select' => 'm.mgroup, m.mgroup_others',
'from' => array( 'members' => 'm' ),
'where' => 'm.id=c.contact_id',
'type' => 'left'
) )
) );
$this->ipsclass->DB->simple_exec();
$memb = $this->ipsclass->DB->fetch_row();
@@ -838,6 +849,35 @@ class messenger
$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_user' ) );
}
if( $this->ipsclass->vars['unblockable_pm_groups'] && $this->ipsclass->input['allow_msg'] == 'no' )
{
$unblockable = array();
$unblockable = explode( ",", $this->ipsclass->vars['unblockable_pm_groups'] );
$do_override = 0;
$my_groups = array( $memb['mgroup'] );
if( $memb['mgroup_others'] )
{
$my_other_groups = explode( ",", $memb['mgroup_others'] );
$my_groups = array_merge( $my_groups, $my_other_groups );
}
foreach( $my_groups as $member_group )
{
if( in_array( $member_group, $unblockable ) )
{
$do_override = 1;
}
}
if( $do_override == 0 )
{
$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'cannot_block' ) );
}
}
$this->ipsclass->DB->do_update( 'contacts', array( 'contact_desc' => $this->ipsclass->input['mem_desc'],
'allow_msg' => $this->ipsclass->input['allow_msg'],
), 'id='.$memb['id'] );
@@ -888,20 +928,19 @@ class messenger
$name_to_enter = "";
$this->ipsclass->input['MID'] = isset($this->ipsclass->input['MID']) ? intval($this->ipsclass->input['MID']) : 0;
if ($this->ipsclass->input['MID'])
{
if ( preg_match( "/^(\d+)$/", $this->ipsclass->input['MID'] ) )
{
$this->ipsclass->DB->simple_construct( array( 'select' => 'members_display_name,id', 'from' => 'members', 'where' => "id={$this->ipsclass->input['MID']}" ) );
$this->ipsclass->DB->simple_exec();
$this->ipsclass->DB->simple_construct( array( 'select' => 'members_display_name,id', 'from' => 'members', 'where' => "id={$this->ipsclass->input['MID']}" ) );
$this->ipsclass->DB->simple_exec();
$memb = $this->ipsclass->DB->fetch_row();
if ($memb['id'])
{
$name_to_enter = $memb['members_display_name'];
}
}
$memb = $this->ipsclass->DB->fetch_row();
if ($memb['id'])
{
$name_to_enter = $memb['members_display_name'];
}
}
$this->output .= $this->ipsclass->compiled_templates['skin_msg']->address_add($name_to_enter);
@@ -923,7 +962,7 @@ class messenger
$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_user' ) );
}
$this->ipsclass->DB->simple_construct( array( 'select' => 'members_display_name,name,id', 'from' => 'members', 'where' => "LOWER(members_display_name)='".$this->ipsclass->input['mem_name']."'" ) );
$this->ipsclass->DB->simple_construct( array( 'select' => 'members_display_name,name,id,mgroup,mgroup_others', 'from' => 'members', 'where' => "members_l_display_name='".$this->ipsclass->input['mem_name']."'" ) );
$this->ipsclass->DB->simple_exec();
$memb = $this->ipsclass->DB->fetch_row();
@@ -933,6 +972,42 @@ class messenger
$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_user' ) );
}
if ( $memb['id'] == $this->ipsclass->member['id'] )
{
$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'cannot_block' ) );
}
if( $this->ipsclass->vars['unblockable_pm_groups'] )
{
$unblockable = array();
$unblockable = explode( ",", $this->ipsclass->vars['unblockable_pm_groups'] );
$do_override = 0;
$my_groups = array( $memb['mgroup'] );
if( $memb['mgroup_others'] )
{
$my_other_groups = explode( ",", $memb['mgroup_others'] );
$my_groups = array_merge( $my_groups, $my_other_groups );
}
foreach( $my_groups as $member_group )
{
if( in_array( $member_group, $unblockable ) )
{
$do_override = 1;
}
}
if( $do_override == 1 )
{
// The member they are trying to add cannot be blocked
$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'cannot_block' ) );
}
}
//-----------------------------------------
// Do we already have this member in our
// address book?
@@ -988,18 +1063,19 @@ class messenger
}
}
$ids = $this->ipsclass->clean_int_array( $ids );
$affected_ids = count($ids);
if ( $affected_ids > 0 )
{
$ids = $this->ipsclass->clean_int_array( $ids );
$id_string = implode( ",", $ids );
if ($this->ipsclass->input['delete'])
{
$this->msglib->delete_messages( $ids, $this->ipsclass->member['id'] );
if ($this->ipsclass->input['saved'])
if ( isset($this->ipsclass->input['saved']) AND $this->ipsclass->input['saved'] )
{
//-----------------------------------------
// Did we delete from the saved folder? If so, don't update the msg stats and
@@ -1012,20 +1088,20 @@ class messenger
{
$this->msglib->rebuild_dir_count( $this->ipsclass->member['id'],
$this->ipsclass->member['vdirs'],
$this->lib->vid,
$this->ipsclass->member['dir_data'][ $this->lib->vid ]['count'] - $affected_ids,
$this->msglib->vid,
$this->ipsclass->member['dir_data'][ $this->msglib->vid ]['count'] - $affected_ids,
'save',
"msg_total=msg_total-$affected_ids"
);
$this->ipsclass->boink_it($this->base_url."act=Msg&CODE=01&VID={$this->lib->vid}");
$this->ipsclass->boink_it($this->base_url."act=Msg&CODE=01&VID={$this->msglib->vid}&sort={$this->ipsclass->input['sort']}&st={$this->ipsclass->input['st']}");
}
}
else if ($this->ipsclass->input['move'])
{
$this->ipsclass->DB->simple_construct( array( 'update' => 'message_topics', 'set' => "mt_vid_folder='{$this->lib->vid}', mt_to_id={$this->ipsclass->member['id']}", 'where' => "mt_vid_folder != '{$this->lib->vid}' AND mt_owner_id=".$this->ipsclass->member['id']." AND mt_id IN ($id_string)" ) );
$this->ipsclass->DB->simple_construct( array( 'update' => 'message_topics', 'set' => "mt_vid_folder='{$this->msglib->vid}', mt_to_id={$this->ipsclass->member['id']}", 'where' => "mt_vid_folder != '{$this->msglib->vid}' AND mt_owner_id=".$this->ipsclass->member['id']." AND mt_id IN ($id_string)" ) );
$this->ipsclass->DB->simple_exec();
if ( $this->ipsclass->DB->get_affected_rows() )
@@ -1037,13 +1113,13 @@ class messenger
$this->ipsclass->member['dir_data'][ $this->ipsclass->input['curvid'] ]['count'] - $affected_ids,
'nosave'
),
$this->lib->vid,
$this->ipsclass->member['dir_data'][ $this->lib->vid ]['count'] + $affected_ids,
$this->msglib->vid,
$this->ipsclass->member['dir_data'][ $this->msglib->vid ]['count'] + $affected_ids,
'save'
);
}
$this->ipsclass->boink_it($this->base_url."act=Msg&CODE=01&VID={$this->lib->vid}");
$this->ipsclass->boink_it($this->base_url."act=Msg&CODE=01&VID={$this->msglib->vid}&sort={$this->ipsclass->input['sort']}&st={$this->ipsclass->input['st']}");
}
else
@@ -1082,6 +1158,8 @@ class messenger
}
}
$ids = $this->ipsclass->clean_int_array( $ids );
$affected_ids = count($ids);
if ( $affected_ids > 0 )
@@ -1122,6 +1200,8 @@ class messenger
}
}
$ids = $this->ipsclass->clean_int_array( $ids );
$affected_ids = count($ids);
if ( $affected_ids > 0 )
@@ -1163,13 +1243,13 @@ class messenger
$this->msglib->rebuild_dir_count( $this->ipsclass->member['id'],
$this->ipsclass->member['vdirs'],
$this->lib->vid,
$this->ipsclass->member['dir_data'][ $this->lib->vid ]['count'] - 1,
$this->msglib->vid,
$this->ipsclass->member['dir_data'][ $this->msglib->vid ]['count'] - 1,
'save',
"msg_total=msg_total-1"
);
$this->ipsclass->boink_it($this->base_url."act=Msg&CODE=01&VID={$this->lib->vid}");
$this->ipsclass->boink_it($this->base_url."act=Msg&CODE=01&VID={$this->msglib->vid}");
}
/*-------------------------------------------------------------------------*/
@@ -1185,12 +1265,14 @@ class messenger
// Get extra LIBBIES
//-----------------------------------------
require_once( ROOT_PATH.'sources/action_public/topics.php' );
require ( ROOT_PATH.'sources/action_public/topics.php' );
$this->topiclib = new topics();
$this->topiclib->ipsclass =& $this->ipsclass;
$this->topiclib->topic_init();
$this->topiclib->topic['forum_id'] = 0;
$this->topiclib->topic['tid'] = 0;
//-----------------------------------------
// check for a msg ID
@@ -1218,7 +1300,7 @@ class messenger
// no new msg
//-----------------------------------------
if ($this->ipsclass->member['new_msg'] >= 1)
if ( $this->ipsclass->member['new_msg'] >= 1 )
{
$this->ipsclass->DB->simple_construct( array( 'update' => 'members', 'set' => "new_msg=new_msg-1", 'where' => "id=".$this->ipsclass->member['id'] ) );
$this->ipsclass->DB->simple_exec();
@@ -1242,7 +1324,25 @@ class messenger
$msg['msg_date'] = $this->ipsclass->get_date( $msg['msg_date'], 'LONG' );
$member = $this->topiclib->parse_member( $msg );
if ( $msg['id'] )
{
$member = $this->topiclib->parse_member( $msg );
}
else
{
//-----------------------------------------
// It's definitely a guest...
//-----------------------------------------
$member = $this->ipsclass->set_up_guest( $this->ipsclass->lang['deleted_user'] );
$member['members_display_name'] = $this->ipsclass->lang['deleted_user'];
$member['custom_fields'] = "";
$member['warn_text'] = "";
$member['warn_minus'] = "";
$member['warn_img'] = "";
$member['warn_add'] = "";
$member['signature'] = "";
}
$this->topiclib->parser->parse_smilies = 1;
$this->topiclib->parser->parse_html = $this->ipsclass->vars['msg_allow_html'];
@@ -1271,6 +1371,8 @@ class messenger
// To , CC, etc?
//-----------------------------------------
$msg['show_cc_users'] = "";
if ( ! $msg['mt_hide_cc'] )
{
$cc_users = $this->msglib->format_cc_string( $msg['msg_cc_users'], $this->ipsclass->member['id'] );
@@ -1286,6 +1388,8 @@ class messenger
// admin message
//-----------------------------------------
$msg['_ip_address'] = "";
if ( $msg['msg_ip_address'] AND $this->ipsclass->member['g_is_supmod'] == 1 AND $member['mgroup'] != $this->ipsclass->vars['admin_group'] )
{
$msg['_ip_address'] = $msg['msg_ip_address'];
@@ -1295,7 +1399,7 @@ class messenger
// Show...
//-----------------------------------------
$html = $this->ipsclass->compiled_templates['skin_msg']->Render_msg( $msg, $member, $this->lib->jump_html );
$html = $this->ipsclass->compiled_templates['skin_msg']->Render_msg( $msg, $member, $this->msglib->jump_html );
//-----------------------------------------
// Attachments?
@@ -1303,9 +1407,25 @@ class messenger
if ( $msg['mt_hasattach'] )
{
$html = $this->topiclib->parse_attachments( $html, array( $msg['msg_id'] ), 'attach_msg', 'msg', 'msg' );
if ( ! is_object( $this->class_attach ) )
{
//-----------------------------------------
// Grab render attach class
//-----------------------------------------
require_once( ROOT_PATH . 'sources/classes/attach/class_attach.php' );
$this->class_attach = new class_attach();
$this->class_attach->ipsclass =& $this->ipsclass;
}
$this->class_attach->type = 'msg';
$this->class_attach->init();
$html = $this->class_attach->render_attachments( $html, array( $msg['msg_id'] ) );
}
unset($this->topiclib);
$this->output .= $html;
$this->page_title = $this->ipsclass->lang['t_welcome'];
@@ -1332,7 +1452,7 @@ class messenger
$show_form = 0;
$this->post_key = $this->ipsclass->input['post_key'] ? $this->ipsclass->input['post_key'] : md5(microtime());
$this->post_key = ( isset($this->ipsclass->input['attach_post_key']) AND $this->ipsclass->input['attach_post_key'] != '' ) ? $this->ipsclass->input['attach_post_key'] : md5(microtime());
$this->msglib->init();
$this->msglib->register_class( $this );
@@ -1341,7 +1461,7 @@ class messenger
// Did we remove an attachment?
//-----------------------------------------
if ( $this->ipsclass->input['removeattachid'] )
if ( isset($this->ipsclass->input['removeattachid']) AND $this->ipsclass->input['removeattachid'] )
{
if ( $this->ipsclass->input[ 'removeattach_'. $this->ipsclass->input['removeattachid'] ] )
{
@@ -1356,7 +1476,7 @@ class messenger
if ( $this->ipsclass->input['attachgo'] )
{
$this->upload_id = $this->msglib->postlib->process_upload();
//$this->upload_id = $this->msglib->postlib->process_upload();
$this->show_form = 1;
}
@@ -1373,7 +1493,7 @@ class messenger
// Show form or...
//-----------------------------------------
if ( $this->ipsclass->input['MODE'] and $this->show_form != 1 )
if ( isset($this->ipsclass->input['MODE']) AND $this->ipsclass->input['MODE'] and $this->show_form != 1 )
{
$this->send_msg();
}
@@ -1399,14 +1519,14 @@ class messenger
// Error checking
//-----------------------------------------
if ( strlen($this->ipsclass->input['msg_title']) < 2 )
if ( strlen(trim($this->ipsclass->input['msg_title'])) < 2 )
{
$this->msglib->send_form( 0, $this->ipsclass->lang['err_no_title'] );
$this->output .= $this->msglib->output;
return;
}
if ( strlen($_POST['Post']) < 2 )
if ( strlen( trim( $_POST['Post'] ) ) < 2 )
{
$this->msglib->send_form( 0, $this->ipsclass->lang['err_no_msg'] );
$this->output .= $this->msglib->output;
@@ -1435,7 +1555,7 @@ class messenger
}
else
{
$this->msglib->to_by_id = intval( $this->ipsclass->input['from_contact'] );
$this->msglib->to_by_id = intval($this->ipsclass->input['from_contact']);
}
//-----------------------------------------
@@ -1445,22 +1565,24 @@ class messenger
$this->ipsclass->input['Post'] = $this->msglib->postlib->han_editor->process_raw_post( 'Post' );
$this->ipsclass->input['msg_title'] = $this->msglib->postlib->parser->bad_words($this->ipsclass->input['msg_title']);
//-----------------------------------------
// SEND
//-----------------------------------------
$this->upload_id = $this->msglib->postlib->process_upload();
//$this->upload_id = $this->msglib->postlib->process_upload();
$this->msglib->cc_users = $this->ipsclass->parse_clean_value( $this->ipsclass->txt_UNhtmlspecialchars($_POST['carbon_copy']) );
$this->msglib->from_member = $this->ipsclass->member;
$this->msglib->msg_title = $this->ipsclass->input['msg_title'];
$this->msglib->msg_post = $this->ipsclass->input['Post'];
$this->msglib->send_pm( array( 'save_only' => $this->ipsclass->input['save'],
'orig_id' => intval($this->ipsclass->input['OID']),
'preview' => $this->ipsclass->input['preview'],
'track' => $this->ipsclass->input['add_tracking'],
'add_sent' => ($this->ipsclass->input['add_sent'] ? 1 : 0),
'hide_cc' => $this->ipsclass->input['mt_hide_cc']
$this->msglib->send_pm( array( 'save_only' => isset($this->ipsclass->input['save']) ? $this->ipsclass->input['save'] : 0,
'orig_id' => isset($this->ipsclass->input['OID']) ? intval($this->ipsclass->input['OID']) : 0,
'preview' => isset($this->ipsclass->input['preview']) ? $this->ipsclass->input['preview'] : 0,
'track' => isset($this->ipsclass->input['add_tracking']) ? $this->ipsclass->input['add_tracking'] : 0,
'add_sent' => isset($this->ipsclass->input['add_sent']) ? 1 : 0,
'hide_cc' => isset($this->ipsclass->input['mt_hide_cc']) ? $this->ipsclass->input['mt_hide_cc'] : 0
) );
if ( $this->msglib->error != "" )
@@ -1479,8 +1601,8 @@ class messenger
// Swap and serve...
//-----------------------------------------
$text = preg_replace( "/<#FROM_MEMBER#>/" , $this->ipsclass->member['members_display_name'] , $this->ipsclass->lang['sent_text'] );
$text = preg_replace( "/<#MESSAGE_TITLE#>/" , $this->ipsclass->input['msg_title'], $text );
$text = str_replace( "<#FROM_MEMBER#>" , $this->ipsclass->member['members_display_name'] , $this->ipsclass->lang['sent_text'] );
$text = str_replace( "<#MESSAGE_TITLE#>" , $this->ipsclass->input['msg_title'], $text );
$this->ipsclass->print->redirect_screen( $text , "&act=Msg&CODE=01" );
}
@@ -1532,16 +1654,16 @@ class messenger
// Get the number of messages in our curr folder.
//-----------------------------------------
$this->ipsclass->DB->simple_construct( array ( 'select' => 'COUNT(*) as msg_total', 'from' => 'message_topics', 'where' => "mt_owner_id=".$this->ipsclass->member['id']." AND mt_vid_folder='{$this->lib->vid}'" ) );
$this->ipsclass->DB->simple_construct( array ( 'select' => 'COUNT(*) as msg_total', 'from' => 'message_topics', 'where' => "mt_owner_id=".$this->ipsclass->member['id']." AND mt_vid_folder='{$this->msglib->vid}'" ) );
$this->ipsclass->DB->simple_exec();
$total_current = $this->ipsclass->DB->fetch_row();
$total_current['msg_total'] = intval($total_current['msg_total']);
if ( $total_current['msg_total'] != $this->ipsclass->member['dir_data'][ $this->lib->vid ]['count'] )
if ( $total_current['msg_total'] != $this->ipsclass->member['dir_data'][ $this->msglib->vid ]['count'] )
{
$this->msglib->rebuild_dir_count( $this->ipsclass->member['id'], $this->ipsclass->member['vdirs'], $this->lib->vid, $total_current['msg_total'] );
$this->msglib->rebuild_dir_count( $this->ipsclass->member['id'], $this->ipsclass->member['vdirs'], $this->msglib->vid, $total_current['msg_total'] );
}
//-----------------------------------------
@@ -1552,7 +1674,7 @@ class messenger
$info['full_text'] = "";
$info['total_messages'] = $total['msg_total'];
$info['img_width'] = 1;
$info['vid'] = $this->lib->vid;
$info['vid'] = $this->msglib->vid;
$info['date_order'] = $sort_key == 'm.msg_date DESC' ? 'rdate' : 'msg_date';
$amount_info = sprintf( $this->ipsclass->lang['pmpc_info_string'], $total['msg_total'] ,$this->ipsclass->lang['pmpc_unlimited'] );
@@ -1583,36 +1705,40 @@ class messenger
// Generate Pagination
//-----------------------------------------
$start = intval($this->ipsclass->input['st']) > 0 ? intval($this->ipsclass->input['st']) : 0;
$start = intval($this->ipsclass->input['st']) >=0 ? intval($this->ipsclass->input['st']) : 0;
$p_end = $this->ipsclass->vars['show_max_msg_list'] > 0 ? $this->ipsclass->vars['show_max_msg_list'] : 50;
if( $start*$p_end > $total_current['msg_total'] )
{
$start = (floor($total_current['msg_total']/$p_end) - 1) * $p_end;
}
$pages = $this->ipsclass->build_pagelinks( array( 'TOTAL_POSS' => $total_current['msg_total'],
'PER_PAGE' => $p_end,
'CUR_ST_VAL' => $start,
'L_SINGLE' => "",
'L_MULTI' => $this->ipsclass->lang['msg_pages'],
'BASE_URL' => $this->ipsclass->base_url."act=Msg&amp;CODE=1&amp;VID=".$this->lib->vid."&amp;sort=".$this->ipsclass->input['sort'],
'BASE_URL' => $this->ipsclass->base_url."act=Msg&amp;CODE=1&amp;VID=".$this->msglib->vid."&amp;sort=".$this->ipsclass->input['sort'],
) );
//-----------------------------------------
// Print the header
//-----------------------------------------
if ($this->lib->vid == 'sent')
if ($this->msglib->vid == 'sent')
{
$this->ipsclass->lang['message_from'] = $this->ipsclass->lang['message_to'];
$this->ipsclass->DB->cache_add_query( 'msg_get_sent_list', array( 'mid' => $this->ipsclass->member['id'], 'vid' => $this->lib->vid, 'sort' => $sort_key, 'limita' => $start, 'limitb' => $p_end ) );
$this->ipsclass->DB->cache_add_query( 'msg_get_sent_list', array( 'mid' => $this->ipsclass->member['id'], 'vid' => $this->msglib->vid, 'sort' => $sort_key, 'limita' => $start, 'limitb' => $p_end ) );
$this->ipsclass->DB->simple_exec();
}
else
{
$this->ipsclass->DB->cache_add_query( 'msg_get_folder_list', array( 'mid' => $this->ipsclass->member['id'], 'vid' => $this->lib->vid, 'sort' => $sort_key, 'limita' => $start, 'limitb' => $p_end ) );
$this->ipsclass->DB->cache_add_query( 'msg_get_folder_list', array( 'mid' => $this->ipsclass->member['id'], 'vid' => $this->msglib->vid, 'sort' => $sort_key, 'limita' => $start, 'limitb' => $p_end ) );
$this->ipsclass->DB->simple_exec();
}
$this->output .= $this->ipsclass->compiled_templates['skin_msg']->inbox_table_header( $this->ipsclass->member['current_dir'], $info, $this->lib->jump_html, $pages, $this->lib->vid );
$this->output .= $this->ipsclass->compiled_templates['skin_msg']->inbox_table_header( $this->ipsclass->member['current_dir'], $info, $this->msglib->jump_html, $pages, $this->msglib->vid );
//-----------------------------------------
// Get the messages
@@ -1622,31 +1748,18 @@ class messenger
{
while( $row = $this->ipsclass->DB->fetch_row() )
{
if ( $row['mt_hasattach'] )
{
$row['attach_img'] = '<{ATTACH_ICON}>';
}
if ($this->lib->vid == 'sent')
{
$row['icon'] = "<{M_READ}>";
}
else
{
$row['icon'] = $row['mt_read'] == 1 ? "<{M_READ}>" : "<{M_UNREAD}>";
}
$row['attach_img'] = $row['mt_hasattach'] ? '<{ATTACH_ICON}>' : '';
$row['icon'] = $this->msglib->vid == 'sent' ? '<{M_READ}>' : ( $row['mt_read'] == 1 ? '<{M_READ}>' : '<{M_UNREAD}>' );
$row['date'] = $this->ipsclass->get_date( $row['mt_date'] , 'LONG' );
if ($this->lib->vid != 'sent')
{
$row['add_to_contacts'] = "[ <a href='{$this->ipsclass->base_url}act=Msg&amp;CODE=02&amp;MID={$row['from_id']}'>{$this->ipsclass->lang[add_to_book]}</a> ]";
}
else
{
//$row['from_id'] = $row['mt_from_id'];
}
$row['add_to_contacts'] = $this->msglib->vid != 'sent' ? "[ <a href='{$this->ipsclass->base_url}act=Msg&amp;CODE=02&amp;MID={$row['from_id']}'>{$this->ipsclass->lang['add_to_book']}</a> ]" : '';
$row['from_name'] = $row['from_name'] ?
"<a href='{$this->ipsclass->base_url}showuser={$row['from_id']}'>{$row['from_name']}</a> {$row['add_to_contacts']}" :
$this->ipsclass->lang['deleted_user'];
$this->output .= $this->ipsclass->compiled_templates['skin_msg']->inbox_row( $row );
}
}
@@ -1656,7 +1769,7 @@ class messenger
}
$this->output .= $this->ipsclass->compiled_templates['skin_msg']->end_inbox($this->lib->jump_html, $amount_info, $pages);
$this->output .= $this->ipsclass->compiled_templates['skin_msg']->end_inbox($this->msglib->jump_html, $amount_info, $pages);
//-----------------------------------------
// Update the message stats if we have to
@@ -1697,15 +1810,16 @@ class messenger
{
while( $row = $this->ipsclass->DB->fetch_row() )
{
if ( $row['mt_hasattach'] )
{
$row['attach_img'] = '<{ATTACH_ICON}>';
}
$row['attach_img'] = $row['mt_hasattach'] ? '<{ATTACH_ICON}>' : '';
$row['icon'] = "<{M_READ}>";
$row['date'] = $this->ipsclass->get_date( $row['mt_date'] , 'LONG' );
$row['cc_users'] = $row['msg_cc_users'] == "" ? $this->ipsclass->lang['no'] : $this->ipsclass->lang['yes'];
$row['from_name'] = $row['from_name'] ?
"<a href='{$this->ipsclass->base_url}showuser={$row['from_id']}'>{$row['from_name']}</a> {$row['add_to_contacts']}" :
$this->ipsclass->lang['deleted_user'];
$d_array = array( 'msg' => $row, 'member' => $this->ipsclass->member );
$this->output .= $this->ipsclass->compiled_templates['skin_msg']->unsent_row( $d_array );
@@ -1713,7 +1827,7 @@ class messenger
}
else
{
$this->output .= $this->ipsclass->compiled_templates['skin_msg']->No_msg_inbox();
$this->output .= $this->ipsclass->compiled_templates['skin_msg']->unsent_empty_row();
}
$this->output .= $this->ipsclass->compiled_templates['skin_msg']->unsent_end();
@@ -1761,7 +1875,7 @@ class messenger
if ( count($read) )
{
foreach( $read as $id => $row )
foreach( $read as $row )
{
$row['icon'] = "<{M_READ}>";
$row['date'] = $this->ipsclass->get_date( $row['mt_user_read'] , 'LONG' );
@@ -1783,7 +1897,7 @@ class messenger
if ( count($unread) )
{
foreach( $unread as $id => $row )
foreach( $unread as $row )
{
$row['icon'] = "<{M_UNREAD}>";
$row['date'] = $this->ipsclass->get_date( $row['mt_date'] , 'LONG' );
File diff suppressed because it is too large. Load diff
+16 -20
View File
@@ -2,27 +2,19 @@
/*
+--------------------------------------------------------------------------
| Invision Power Board 2.1.7
| Invision Power Board v<{%dyn.down.var.human.version%}>
| =============================================
| 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
| Time: <{%dyn.down.var.time%}>
| Release: <{%dyn.down.var.md5%}>
| 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-24 22:17:00 +0100 (Mon, 24 Oct 2005) $
| > $Revision: 64 $
| > $Date: 2006-05-05 21:58:19 +0100 (Fri, 05 May 2006) $
| > $Revision: 246 $
| > $Author: bfarber $
+---------------------------------------------------------------------------
|
@@ -37,7 +29,7 @@
if ( ! defined( 'IN_IPB' ) )
{
print "<h1>Íåêîððåêòíûé àäðåñ</h1>Âû íå èìååòå äîñòóïà ê ýòîìó ôàéëó íàïðÿìóþ. Åñëè âû íåäàâíî îáíîâëÿëè ôîðóì, âû äîëæíû îáíîâèòü âñå ñîîòâåòñòâóþùèå ôàéëû.";
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
exit();
}
@@ -182,7 +174,7 @@ class attach {
{
$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'missing_files' ) );
}
//-----------------------------------------
// Handle post attachments.
//-----------------------------------------
@@ -228,11 +220,16 @@ class attach {
$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_permission' ) );
}
}
if ( $this->ipsclass->check_perms($this->ipsclass->forums->forum_by_id[ $post['forum_id'] ]['read_perms']) == FALSE )
{
$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_permission' ) );
}
if ( $this->ipsclass->check_perms($this->ipsclass->forums->forum_by_id[ $post['forum_id'] ]['download_perms']) == FALSE )
{
$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_permission' ) );
}
}
}
else if ( $this->ipsclass->input['type'] == 'msg' and $attach['attach_msg'] )
@@ -262,10 +259,9 @@ class attach {
//-----------------------------------------
// Update the "hits"..
//-----------------------------------------
$this->ipsclass->DB->simple_construct( array( 'update' => 'attachments', 'set' =>"attach_hits=attach_hits+1", 'where' => "attach_id=".$this->ipsclass->input['id'] ) );
$this->ipsclass->DB->simple_exec();
//print $attach['attach_hits'];
//-----------------------------------------
// If this is a TXT / HTML file, force an
// odd extension to prevent IE from opening
@@ -292,9 +288,9 @@ class attach {
// Open and display the file..
//-----------------------------------------
$fh = fopen( $file, 'rb' ); // 52f408a29988b02f45b5e6f4ba5af0ae, Set binary for Win even if it's an ascii file, it won't hurt.
$fh = fopen( $file, 'rb' ); // <{%dyn.down.var.md5p1%}>, Set binary for Win even if it's an ascii file, it won't hurt.
fpassthru( $fh );
@fclose( $fh );
fclose( $fh );
exit();
}
else
@@ -2,28 +2,18 @@
/*
+--------------------------------------------------------------------------
| Invision Power Board 2.1.7
| Invision Power Board
| =============================================
| by Matthew Mecham
| (c) 2001 - 2005 Invision Power Services, Inc.
| (c) 2001 - 2006 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: 2006-03-06 14:58:13 +0000 (Mon, 06 Mar 2006) $
| > $Revision: 161 $
| > $Author: bfarber $
| > $Date: 2006-09-22 11:28:54 +0100 (Fri, 22 Sep 2006) $
| > $Revision: 567 $
| > $Author: matt $
+---------------------------------------------------------------------------
|
| > ICQ / AIM / EMAIL functions
@@ -37,7 +27,7 @@
if ( ! defined( 'IN_IPB' ) )
{
print "<h1>Íåêîððåêòíûé àäðåñ</h1>Âû íå èìååòå äîñòóïà ê ýòîìó ôàéëó íàïðÿìóþ. Åñëè âû íåäàâíî îáíîâëÿëè ôîðóì, âû äîëæíû îáíîâèòü âñå ñîîòâåòñòâóþùèå ôàéëû.";
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
exit();
}
@@ -110,8 +100,8 @@ class contactmember
break;
}
$this->ipsclass->print->add_output("$this->output");
$this->ipsclass->print->do_output( array( 'TITLE' => $this->page_title, 'JS' => 0, NAV => $this->nav ) );
$this->ipsclass->print->add_output( $this->output );
$this->ipsclass->print->do_output( array( 'TITLE' => $this->page_title, 'JS' => 0, 'NAV' => $this->nav ) );
}
@@ -218,7 +208,7 @@ class contactmember
$width = $this->ipsclass->vars['chat_width'] ? $this->ipsclass->vars['chat_width'] : 600;
$height = $this->ipsclass->vars['chat_height'] ? $this->ipsclass->vars['chat_height'] : 350;
$lang = $this->ipsclass->vars['chat_language'] ? $this->ipsclass->vars['chat_language'] : 'ru';
$lang = $this->ipsclass->vars['chat_language'] ? $this->ipsclass->vars['chat_language'] : 'en';
$user = "";
$pass = "";
@@ -267,7 +257,7 @@ class contactmember
$pid = intval($this->ipsclass->input['p']);
$tid = intval($this->ipsclass->input['t']);
$st = intval($this->ipsclass->input['st']);
$st = intval($this->ipsclass->input['st']) >=0 ? intval($this->ipsclass->input['st']) : 0;
if ( (!$pid) and (!$tid) )
{
@@ -280,7 +270,7 @@ class contactmember
$this->output .= $this->ipsclass->compiled_templates['skin_emails']->report_form($tid, $pid, $st, $this->topic['topic_title']);
$this->nav[] = "<a href='".$this->ipsclass->base_url."act=SF&f={$this->forum['id']}'>{$this->forum['name']}</a>";
$this->nav[] = "<a href='".$this->ipsclass->base_url."showforum={$this->forum['id']}'>{$this->forum['name']}</a>";
$this->nav[] = $this->ipsclass->lang['report_title'];
$this->page_title = $this->ipsclass->lang['report_title'];
@@ -297,7 +287,7 @@ class contactmember
$pid = intval($this->ipsclass->input['p']);
$tid = intval($this->ipsclass->input['t']);
$fid = intval($this->ipsclass->input['f']);
$st = intval($this->ipsclass->input['st']);
$st = intval($this->ipsclass->input['st']) >=0 ? intval($this->ipsclass->input['st']) : 0;
if ( (!$pid) and (!$tid) and (!$fid) )
{
@@ -395,7 +385,7 @@ class contactmember
require_once( ROOT_PATH.'sources/lib/func_msg.php' );
$this->lib = new func_msg();
$this->lib = new func_msg();
$this->lib->ipsclass =& $this->ipsclass;
$this->lib->init();
@@ -408,7 +398,7 @@ class contactmember
$report = htmlspecialchars($report, ENT_QUOTES);
foreach( $mods as $idx => $data )
foreach( $mods as $data )
{
$this->email->get_template("report_post");
@@ -442,7 +432,7 @@ class contactmember
$this->lib->to_by_id = $data['id'];
$this->lib->from_member = $this->ipsclass->member;
$this->lib->msg_title = $this->ipsclass->lang['report_subject'].' '.$topic['title'];
$this->lib->msg_post = $this->email->message;
$this->lib->msg_post = htmlspecialchars( $this->email->message, ENT_QUOTES );
$this->lib->force_pm = 1;
$this->lib->send_pm();
@@ -455,7 +445,7 @@ class contactmember
}
}
$this->ipsclass->print->redirect_screen( $this->ipsclass->lang['report_redirect'], "act=ST&f=$fid&t=$tid&st=$st&#entry$pid");
$this->ipsclass->print->redirect_screen( $this->ipsclass->lang['report_redirect'], "showtopic={$tid}&amp;st={$st}&amp;#entry$pid");
}
//-----------------------------------------
@@ -798,14 +788,10 @@ class contactmember
}
}
return TRUE; //52f408a29988b02f45b5e6f4ba5af0ae If we get here...
return TRUE; //<{%dyn.down.var.md5p2%}> If we get here...
}
function regex_bash_hex($hex_entity)
{
return html_entity_decode( "&#".hexdec( $hex_entity ).";" );
}
}
@@ -2,28 +2,18 @@
/*
+--------------------------------------------------------------------------
| Invision Power Board 2.1.7
| Invision Power Board
| =============================================
| by Matthew Mecham
| (c) 2001 - 2005 Invision Power Services, Inc.
| (c) 2001 - 2006 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: 2006-01-11 22:47:48 +0000 (Wed, 11 Jan 2006) $
| > $Revision: 122 $
| > $Author: bfarber $
| > $Date: 2006-09-22 11:28:54 +0100 (Fri, 22 Sep 2006) $
| > $Revision: 567 $
| > $Author: matt $
+---------------------------------------------------------------------------
|
| > Forward topic to a friend module
@@ -38,7 +28,7 @@
if ( ! defined( 'IN_IPB' ) )
{
print "<h1>Íåêîððåêòíûé àäðåñ</h1>Âû íå èìååòå äîñòóïà ê ýòîìó ôàéëó íàïðÿìóþ. Åñëè âû íåäàâíî îáíîâëÿëè ôîðóì, âû äîëæíû îáíîâèòü âñå ñîîòâåòñòâóþùèå ôàéëû.";
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
exit();
}
@@ -85,7 +75,7 @@ class forwardpage
// Get the topic details
//-----------------------------------------
$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'topics', 'where' => "tid=".intval($this->ipsclass->input['t']) ) );
$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'topics', 'where' => "tid=".$this->ipsclass->input['t'] ) );
$this->ipsclass->DB->simple_exec();
$this->topic = $this->ipsclass->DB->fetch_row();
@@ -149,11 +139,9 @@ class forwardpage
$this->email->ipsclass =& $this->ipsclass;
$this->email->email_init();
$lang_to_use = 'ru';
$lang_to_use = 'en';
$this->ipsclass->DB->query("SELECT lid, ldir, lname FROM ibf_languages");
while ( $l = $this->ipsclass->DB->fetch_row() )
foreach( $this->ipsclass->cache['languages'] as $l )
{
if ($this->ipsclass->input['lang'] == $l['ldir'])
{
@@ -196,27 +184,20 @@ class forwardpage
$this->email->from = $this->ipsclass->member['email'];
$this->email->send_mail();
$this->ipsclass->print->redirect_screen( $this->ipsclass->lang['redirect'], "showtopic=".$this->topic['tid']."&st=".$this->ipsclass->input['st'] );
$this->ipsclass->print->redirect_screen( $this->ipsclass->lang['redirect'], "showtopic=".$this->topic['tid']."&amp;st=".$this->ipsclass->input['st'] );
}
function show_form()
{
require ROOT_PATH."cache/lang_cache/".$this->ipsclass->lang_id."/lang_email_content.php";
$this->ipsclass->lang['send_text'] = $lang['send_text'];
$lang_array = unserialize(stripslashes($this->ipsclass->vars['languages']));
$lang_select = "<select name='lang' class='forminput'>\n";
$this->ipsclass->DB->query("SELECT lid, ldir, lname FROM ibf_languages");
while ( $l = $this->ipsclass->DB->fetch_row() )
foreach( $this->ipsclass->cache['languages'] as $l )
{
$lang_select .= $l['ldir'] == $this->ipsclass->member['language'] ? "<option value='{$l['ldir']}' selected>{$l['lname']}</option>"
: "<option value='{$l['ldir']}'>{$l['lname']}</option>";
@@ -224,50 +205,20 @@ class forwardpage
$lang_select .= "</select>";
$this->ipsclass->lang['send_text'] = preg_replace( "/<#THE LINK#>/" , $this->base_url_NS."?act=ST&f=".$this->forum['id']."&t=".$this->topic['tid'], $this->ipsclass->lang['send_text'] );
$this->ipsclass->lang['send_text'] = preg_replace( "/<#USER NAME#>/", $this->ipsclass->member['members_display_name'], $this->ipsclass->lang['send_text'] );
$this->ipsclass->lang['send_text'] = str_replace( "<#THE LINK#>" , $this->base_url_NS."?showtopic=".$this->topic['tid'], $this->ipsclass->lang['send_text'] );
$this->ipsclass->lang['send_text'] = str_replace( "<#USER NAME#>", $this->ipsclass->member['members_display_name'], $this->ipsclass->lang['send_text'] );
$this->output = $this->ipsclass->compiled_templates['skin_emails']->forward_form( $this->topic['title'], $this->ipsclass->lang['send_text'], $lang_select );
$this->page_title = $this->ipsclass->lang['title'];
$this->nav = array ( "<a href='{$this->base_url}act=SF&f={$this->forum['id']}'>{$this->forum['name']}</a>", "<a href='".$this->base_url."act=ST&f={$this->forum['id']}&t={$this->topic['tid']}'>{$this->topic['title']}</a>", $this->ipsclass->lang['title'] );
$this->nav = array ( "<a href='{$this->base_url}showforum={$this->forum['id']}'>{$this->forum['name']}</a>", "<a href='".$this->base_url."showtopic={$this->topic['tid']}'>{$this->topic['title']}</a>", $this->ipsclass->lang['title'] );
$this->ipsclass->print->add_output("$this->output");
$this->ipsclass->print->do_output( array( 'TITLE' => $this->page_title, 'JS' => 0, NAV => $this->nav ) );
$this->ipsclass->print->add_output( $this->output );
$this->ipsclass->print->do_output( array( 'TITLE' => $this->page_title, 'JS' => 0, 'NAV' => $this->nav ) );
}
//-----------------------------------------
function check_access()
{
$return = 1;
if ( $this->ipsclass->check_perms($this->forum['read_perms']) == TRUE )
{
$return = 0;
}
if ($this->forum['password'])
{
if ($_COOKIE[ $this->ipsclass->vars['cookie_id'].'iBForum'.$this->forum['id'] ] == $this->forum['password']) {
$return = 0;
} else {
$return = 1;
}
}
return $return;
}
}
?>
+1 -15
View File
@@ -1,15 +1 @@
<html>
<head><title>Ошибка &lt; Русская версия Invision Power Board</title></head>
<body>
<h1>Ошибка &lt; Русская версия Invision Power Board</h1>
<hr>
Вы попали на несуществующую страницу!<br>Пожалуйста нажмите на кнопочку &laquo;<b>Назад</b>&raquo;
в вашем браузере для возвращения на предыдущую страницу.
<hr>
<b>Invision Power Board:</b>
<ul>
<li><a href="http://www.bestwarez.ru" title="BestWarez.Ru - Только лучший Варез!">Русская версия</a></li>
<li><a href="http://www.invisionboard.com" title="Official Site">English version</a></li>
</ul>
</body>
</html>
<html>␍<head><title>Invision Power Board - Bulletin Board System</title></head>␍<body>␍<h1>403: Invision Power Board -> Forbidden</h1>␍<hr>␍You have reached this Page in error, please use␍your back button to return to Invision Board.␍<hr>␍<a href="http://www.invisionboard.com/">Invision Power Board</a>␍</body>␍</html>␍
+28 -29
View File
@@ -2,28 +2,18 @@
/*
+--------------------------------------------------------------------------
| Invision Power Board 2.1.7
| Invision Power Board
| =============================================
| by Matthew Mecham
| (c) 2001 - 2005 Invision Power Services, Inc.
| (c) 2001 - 2006 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-24 22:17:00 +0100 (Mon, 24 Oct 2005) $
| > $Revision: 64 $
| > $Author: bfarber $
| > $Date: 2006-09-22 11:28:54 +0100 (Fri, 22 Sep 2006) $
| > $Revision: 567 $
| > $Author: matt $
+---------------------------------------------------------------------------
|
| > Show all emo's / BB Tags module
@@ -38,7 +28,7 @@
if ( ! defined( 'IN_IPB' ) )
{
print "<h1>Íåêîððåêòíûé àäðåñ</h1>Âû íå èìååòå äîñòóïà ê ýòîìó ôàéëó íàïðÿìóþ. Åñëè âû íåäàâíî îáíîâëÿëè ôîðóì, âû äîëæíû îáíîâèòü âñå ñîîòâåòñòâóþùèå ôàéëû.";
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
exit();
}
@@ -140,7 +130,7 @@ class legends {
$this->ipsclass->DB->simple_construct( array( 'select' => 'id, name, members_display_name',
'from' => 'members',
'where' => "LOWER(members_display_name) LIKE '".$this->ipsclass->input['username']."%'",
'where' => "members_l_display_name LIKE '".$this->ipsclass->input['username']."%'",
'limit' => array( 0,101) ) );
$this->ipsclass->DB->simple_exec();
@@ -190,10 +180,19 @@ class legends {
function show_emoticons()
{
//-----------------------------------------
// INIT
//-----------------------------------------
$this->page_title = $this->ipsclass->lang['emo_title'];
$smilie_id = 0;
$this->output .= $this->ipsclass->compiled_templates['skin_legends']->emoticon_javascript();
$editor_id = $this->ipsclass->txt_alphanumerical_clean( $this->ipsclass->input['editor_id'] );
//-----------------------------------------
// Start output...
//-----------------------------------------
$this->output .= $this->ipsclass->compiled_templates['skin_legends']->emoticon_javascript( $editor_id );
$this->output .= $this->ipsclass->compiled_templates['skin_legends']->page_header( $this->ipsclass->lang['emo_title'], $this->ipsclass->lang['emo_type'], $this->ipsclass->lang['emo_img'] );
$this->ipsclass->DB->simple_construct( array( 'select' => 'typed, image', 'from' => 'emoticons', 'where' => "emo_set='".$this->ipsclass->skin['_emodir']."'" ) );
@@ -255,22 +254,22 @@ class legends {
1 => array('[s]', '[/s]', $this->ipsclass->lang['bbc_ex1'] ),
2 => array('[i]', '[/i]', $this->ipsclass->lang['bbc_ex1'] ),
3 => array('[u]', '[/u]', $this->ipsclass->lang['bbc_ex1'] ),
4 => array('[email]', '[/email]', 'user@domain.ru' ),
5 => array('[email=user@domain.ru]', '[/email]', $this->ipsclass->lang['bbc_ex2'] ),
6 => array('[url]', '[/url]', 'http://www.domain.ru' ),
7 => array('[url=http://www.domain.ru]', '[/url]', $this->ipsclass->lang['bbc_ex2'] ),
4 => array('[email]', '[/email]', 'user@domain.com' ),
5 => array('[email=user@domain.com]', '[/email]', $this->ipsclass->lang['bbc_ex2'] ),
6 => array('[url]', '[/url]', 'http://www.domain.com' ),
7 => array('[url=http://www.domain.com]', '[/url]', $this->ipsclass->lang['bbc_ex2'] ),
8 => array('[size=7]', '[/size]' , $this->ipsclass->lang['bbc_ex1'] ),
9 => array('[font=times]', '[/font]', $this->ipsclass->lang['bbc_ex1'] ),
10 => array('[color=red]', '[/color]', $this->ipsclass->lang['bbc_ex1'] ),
11 => array('[img]', '[/img]', $this->ipsclass->vars['board_url'].'/'.$this->ipsclass->vars['img_url'].'/folder_post_icons/icon11.gif' ),
12 => array('[list]', '[/list]', '[*]Ïóíêò ñïèñêà [*]Ïóíêò ñïèñêà' ),
13 => array('[list=1]', '[/list]', '[*]Ïóíêò ñïèñêà [*]Ïóíêò ñïèñêà' ),
14 => array('[list=a]', '[/list]', '[*]Ïóíêò ñïèñêà [*]Ïóíêò ñïèñêà' ),
15 => array('[list=i]', '[/list]', '[*]Ïóíêò ñïèñêà [*]Ïóíêò ñïèñêà' ),
12 => array('[list]', '[/list]', '[*]'.$this->ipsclass->lang['bbc_li'].' [*]List Item'.$this->ipsclass->lang['bbc_li'] ),
13 => array('[list=1]', '[/list]', '[*]'.$this->ipsclass->lang['bbc_li'].' [*]'.$this->ipsclass->lang['bbc_li'] ),
14 => array('[list=a]', '[/list]', '[*]'.$this->ipsclass->lang['bbc_li'].' [*]'.$this->ipsclass->lang['bbc_li'] ),
15 => array('[list=i]', '[/list]', '[*]'.$this->ipsclass->lang['bbc_li'].' [*]'.$this->ipsclass->lang['bbc_li'] ),
16 => array('[quote]', '[/quote]', $this->ipsclass->lang['bbc_ex1'] ),
17 => array('[code]', '[/code]', '$this_var = "Hello World!";' ),
17 => array('[code]', '[/code]', '$this_var = "'.$this->ipsclass->lang['bbc_helloworld'].'!";' ),
18 => array('[sql]', '[/sql]', 'SELECT t.tid FROM a_table t WHERE t.val="This Value"' ),
19 => array('[html]', '[/html]', '&lt;a href=&quot;test/page.html&quot;&gt;Òåñòîâàÿ ñòðàíèöà&lt;/a&gt;' ),
19 => array('[html]', '[/html]', '&lt;a href=&quot;test/page.html&quot;&gt;'.$this->ipsclass->lang['bbc_testpage'].'&lt;/a&gt;' ),
);
$this->page_title = $this->ipsclass->lang['bbc_title'];
@@ -2,28 +2,18 @@
/*
+--------------------------------------------------------------------------
| Invision Power Board 2.1.7
| Invision Power Board
| =============================================
| by Matthew Mecham
| (c) 2001 - 2005 Invision Power Services, Inc.
| (c) 2001 - 2006 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-24 22:17:00 +0100 (Mon, 24 Oct 2005) $
| > $Revision: 64 $
| > $Author: bfarber $
| > $Date: 2006-09-22 11:28:54 +0100 (Fri, 22 Sep 2006) $
| > $Revision: 567 $
| > $Author: matt $
+---------------------------------------------------------------------------
|
| > Multi Moderation Module
@@ -38,7 +28,7 @@
if ( ! defined( 'IN_IPB' ) )
{
print "<h1>Íåêîððåêòíûé àäðåñ</h1>Âû íå èìååòå äîñòóïà ê ýòîìó ôàéëó íàïðÿìóþ. Åñëè âû íåäàâíî îáíîâëÿëè ôîðóì, âû äîëæíû îáíîâèòü âñå ñîîòâåòñòâóþùèå ôàéëû.";
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
exit();
}
@@ -2,28 +2,18 @@
/*
+--------------------------------------------------------------------------
| Invision Power Board 2.1.7
| Invision Power Board
| =============================================
| by Matthew Mecham
| (c) 2001 - 2005 Invision Power Services, Inc.
| (c) 2001 - 2006 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-24 22:17:00 +0100 (Mon, 24 Oct 2005) $
| > $Revision: 64 $
| > $Author: bfarber $
| > $Date: 2006-09-22 11:28:54 +0100 (Fri, 22 Sep 2006) $
| > $Revision: 567 $
| > $Author: matt $
+---------------------------------------------------------------------------
|
| > Topic display in printable format module
@@ -38,7 +28,7 @@
if ( ! defined( 'IN_IPB' ) )
{
print "<h1>Íåêîððåêòíûé àäðåñ</h1>Âû íå èìååòå äîñòóïà ê ýòîìó ôàéëó íàïðÿìóþ. Åñëè âû íåäàâíî îáíîâëÿëè ôîðóì, âû äîëæíû îáíîâèòü âñå ñîîòâåòñòâóþùèå ôàéëû.";
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
exit();
}
@@ -150,8 +140,8 @@ class printpage {
$this->page_title = $this->topic['title'];
$this->nav = array ( "<a href='{$this->ipsclass->base_url}&act=SF&f={$this->forum['id']}'>{$this->forum['name']}</a>",
"<a href='{$this->ipsclass->base_url}&act=ST&f={$this->forum['id']}&t={$this->topic['tid']}'>{$this->topic['title']}</a>"
$this->nav = array ( "<a href='{$this->ipsclass->base_url}showforum={$this->forum['id']}'>{$this->forum['name']}</a>",
"<a href='{$this->ipsclass->base_url}showtopic={$this->topic['tid']}'>{$this->topic['title']}</a>"
);
@@ -186,7 +176,9 @@ class printpage {
$title = substr( str_replace( " ", "_" , preg_replace( "/&(lt|gt|quot|#124|#036|#33|#39);/", "", $this->topic['title'] ) ), 0, 12);
@header("Content-type: $header");
//$this->output .= "<br><br><font size='1'><center>Powered by Invision Power Board<br>&copy; 2002 Invision PS</center></font></body></html>";
@header( "Content-type: $header;charset={$this->ipsclass->vars['gb_char_set']}" );
if ($this->ipsclass->input['client'] != 'printer')
{
@@ -365,20 +357,13 @@ class printpage {
//-----------------------------------------
$row['post_date'] = $this->ipsclass->get_date( $row['post_date'], 'LONG' );
$row['post_date'] = $this->ipsclass->get_date( $row['post_date'], 'LONG', 1 );
//-----------------------------------------
// Quoted attachments?
//-----------------------------------------
preg_match( "#\[attachmentid=(\d+)\]i#", $row['post'], $match );
if ( $match[1] )
{
$attach_pids[ $match[1] ] = $match[1];
}
$attach_pids[ $row['pid'] ] = $row['pid'];
$attach_pids[ $row['pid'] ] = $row['pid'];
$row['post'] = $this->parse_message($row['post']);
@@ -413,17 +398,23 @@ class printpage {
if ( count( $attach_pids ) )
{
//-----------------------------------------
// ATTACHMENTS!!!
//-----------------------------------------
require_once( ROOT_PATH.'sources/action_public/topics.php' );
$this->topic = new topics();
$this->topic->ipsclass =& $this->ipsclass;
$this->topic->topic_init();
$posts_html = $this->topic->parse_attachments( $posts_html, $attach_pids );
if ( ! is_object( $this->class_attach ) )
{
//-----------------------------------------
// Grab render attach class
//-----------------------------------------
require_once( ROOT_PATH . 'sources/classes/attach/class_attach.php' );
$this->class_attach = new class_attach();
$this->class_attach->ipsclass =& $this->ipsclass;
$this->ipsclass->load_template( 'skin_topic' );
$this->class_attach->type = 'post';
$this->class_attach->init();
}
$posts_html = $this->class_attach->render_attachments( $posts_html, $attach_pids );
}
//-----------------------------------------
@@ -438,7 +429,7 @@ class printpage {
if ( is_array( $this->ipsclass->skin['_macros'] ) )
{
foreach( $this->ipsclass->skin['_macros'] as $i => $row )
foreach( $this->ipsclass->skin['_macros'] as $row )
{
if ( $row['macro_value'] != "" )
{
@@ -450,6 +441,9 @@ class printpage {
$posts_html = str_replace( "<#IMG_DIR#>", $this->ipsclass->skin['_imagedir'], $posts_html );
$posts_html = str_replace( "<#EMO_DIR#>", $this->ipsclass->skin['_emodir'] , $posts_html );
$posts_html = preg_replace( "#([^/])style_images/(<\#IMG_DIR\#>|".preg_quote($this->ipsclass->skin['_imagedir'], '/').")#is", "\\1".$this->ipsclass->vars['board_url']."/style_images/\\2", $posts_html );
$posts_html = preg_replace( "#([\"'])style_emoticons/#is", "\\1".$this->ipsclass->vars['board_url']."/style_emoticons/", $posts_html );
//-----------------------------------------
// CSS
//-----------------------------------------
@@ -466,7 +460,7 @@ class printpage {
function parse_message($message="")
{
$message = preg_replace( "#<!--Flash (.+?)-->.+?<!--End Flash-->#e" , "(FLASH MOVIE)" , $message );
$message = preg_replace( "#<!--Flash (.+?)-->.+?<!--End Flash-->#i" , "(FLASH MOVIE)" , $message );
$message = preg_replace( "#<a href=[\"'](http|https|ftp|news)://(\S+?)['\"].+?".">(.+?)</a>#" , "\\1://\\2" , $message );
return $message;
+59 -60
View File
@@ -2,28 +2,18 @@
/*
+--------------------------------------------------------------------------
| Invision Power Board 2.1.7
| Invision Power Board
| =============================================
| by Matthew Mecham
| (c) 2001 - 2005 Invision Power Services, Inc.
| (c) 2001 - 2006 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-12-06 17:36:43 +0000 (Tue, 06 Dec 2005) $
| > $Revision: 94 $
| > $Author: bfarber $
| > $Date: 2006-09-22 11:28:54 +0100 (Fri, 22 Sep 2006) $
| > $Revision: 567 $
| > $Author: matt $
+---------------------------------------------------------------------------
|
| > Topic Tracker module
@@ -38,7 +28,7 @@
if ( ! defined( 'IN_IPB' ) )
{
print "<h1>Íåêîððåêòíûé àäðåñ</h1>Âû íå èìååòå äîñòóïà ê ýòîìó ôàéëó íàïðÿìóþ. Åñëè âû íåäàâíî îáíîâëÿëè ôîðóì, âû äîëæíû îáíîâèòü âñå ñîîòâåòñòâóþùèå ôàéëû.";
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
exit();
}
@@ -91,7 +81,7 @@ class stats {
// If we have any HTML to print, do so...
$this->ipsclass->print->add_output("$this->output");
$this->ipsclass->print->do_output( array( 'TITLE' => $this->page_title, 'JS' => 0, NAV => $this->nav ) );
$this->ipsclass->print->do_output( array( 'TITLE' => $this->page_title, 'JS' => 0, 'NAV' => $this->nav ) );
}
@@ -206,7 +196,7 @@ class stats {
$members = array();
$moderators = array();
foreach( $this->ipsclass->cache['group_cache'] as $d => $i )
foreach( $this->ipsclass->cache['group_cache'] as $i )
{
if ( $i['g_is_supmod'] )
{
@@ -219,7 +209,7 @@ class stats {
}
}
foreach( $this->ipsclass->cache['moderators'] as $d => $i )
foreach( $this->ipsclass->cache['moderators'] as $i )
{
if ( $i['is_group'] )
{
@@ -266,7 +256,7 @@ class stats {
$this->output .= $this->ipsclass->compiled_templates['skin_stats']->group_strip( $this->ipsclass->lang['leader_admins'] );
foreach( $members as $id => $member )
foreach( $members as $member )
{
if ( $this->ipsclass->cache['group_cache'][ $member['mgroup'] ]['g_access_cp'] )
{
@@ -276,7 +266,7 @@ class stats {
// Used...
//-----------------------------------------
$used_ids[] = $id;
$used_ids[] = $member['id'];
}
}
@@ -288,9 +278,9 @@ class stats {
$tmp_html = "";
foreach( $members as $id => $member )
foreach( $members as $member )
{
if ( $this->ipsclass->cache['group_cache'][ $member['mgroup'] ]['g_is_supmod'] and ( ! in_array( $id, $used_ids) ) )
if ( $this->ipsclass->cache['group_cache'][ $member['mgroup'] ]['g_is_supmod'] and ( ! in_array( $member['id'], $used_ids) ) )
{
$tmp_html .= $this->ipsclass->compiled_templates['skin_stats']->leader_row( $this->parse_member( $member ), $this->ipsclass->lang['leader_all_forums'] );
@@ -298,7 +288,7 @@ class stats {
// Used...
//-----------------------------------------
$used_ids[] = $id;
$used_ids[] = $member['id'];
}
}
@@ -315,11 +305,11 @@ class stats {
$tmp_html = "";
foreach( $members as $id => $member )
foreach( $members as $member )
{
if ( ! in_array( $id, $used_ids) )
if ( ! in_array( $member['id'], $used_ids) )
{
foreach( $this->ipsclass->cache['moderators'] as $idx => $data )
foreach( $this->ipsclass->cache['moderators'] as $data )
{
if ( $data['is_group'] and $data['group_id'] == $member['mgroup'] )
{
@@ -328,7 +318,7 @@ class stats {
$moderators[] = array_merge( $member, array( 'forum_id' => $data['forum_id'] ) );
}
$used_ids[] = $id;
$used_ids[] = $data['group_id'];
}
else if ( $data['member_id'] == $member['id'] )
{
@@ -337,7 +327,7 @@ class stats {
$moderators[] = array_merge( $member, array( 'forum_id' => $data['forum_id'] ) );
}
$used_ids[] = $id;
$used_ids[] = $member['id'];
}
}
}
@@ -353,7 +343,7 @@ class stats {
$this->output .= $this->ipsclass->compiled_templates['skin_stats']->group_strip( $this->ipsclass->lang['leader_mods'] );
foreach ( $moderators as $idx => $i )
foreach ( $moderators as $i )
{
if ( ! isset( $mod_array['member'][ $i['id'] ][ 'name' ] ) )
{
@@ -388,7 +378,7 @@ class stats {
$cnt = count( $mod_array['forums'][ $id ] );
$fhtml = $this->ipsclass->compiled_templates['skin_stats']->leader_row_forum_start($id, sprintf( $this->ipsclass->lang['no_forums'], $cnt ) );
foreach( $mod_array['forums'][ $id ] as $idx => $data )
foreach( $mod_array['forums'][ $id ] as $data )
{
$fhtml .= $this->ipsclass->compiled_templates['skin_stats']->leader_row_forum_entry($data[0],$data[1]);
}
@@ -423,7 +413,7 @@ class stats {
header("Content-type: image/gif");
echo base64_decode("R0lGODlhhgAfAMQAAAAAAP///+/v79/f38/Pz7+/v6+vr5+fn4+Pj4CAgHBwcGBgYFBQUEBAQDAwMCAgIBAQEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACwAAAAAhgAfAAAF/2AgjmRpnmiqrmzrvnAsz3Rt33iu7/x8mL8AgcEgiBINg2i4EAiJxtEhmlKYrCpCY5uYYXurQ8GUGAQeB8NDYFgU1oFkwopWO4/jrImKKrgLDXkwDWAsCyICC0VCCARYCQUKRggGAgwiDY54I5ABBwpFBVEGAz+AWD+JiwUGDV0FXQGwAapGia4iBwwGWgeEhSq/CwgHDpgkCwO/sLNxyGabEAgJCwSHAcaEDn4/hMPFAUhvA80KP9/GCgoFDkYApA5tv8AnBLHGAUoBlyKAzrKQYs3zx2kMPm1CDhF6UECAE4QBqiVQAqkAgIsQnOCrpm8dtoQBlNHrI7DELwJwlv8FPCYETsF/hBQYmOjsAIAHRgj9CjimYqxP/yANAQBhDKFm80aSaIZPHyEB7UQk83RgwLWnUUl0+kXIgAIHD0MKQHAJ4rpOPkeYLbArnFFZVgQkVSpiAJYiKEVcWpRLgVwzDga02cdnE1dM/LQJGOKsCFS3bpsdOOQ4G4EBDP+BRTCX7r4lDyDoK3LxYsMGAFBBwEmgNABBW1kOO3Zgdc6WEH6gLWDxYgMzKHPnW72gWy4ICzrTbWLCQBDP0KP3eT7Cr/Tr2PuZEJS9u/fv4MOLH1/3DowBTgrLQK9CALQR7lewnxEfTKcRh8SoYAD4xpQs1AkRIBncwdBMDxXdQcj/fQIU6IxVO1yWQoPmLfFeg3g0NIKESwiyGC28xTKChiCS8OEA6pWQgAMNPBCHa4A04IAVnUA4WRde5YNLjq3gaMVMGcoIgTVRbJMAVDICFMBXosXBgAOXrJjkkg40qcADLIaTJYsOiIhNAxAMgJkD+GD5wFcPIKBCAl244cxWP4AlhZrVxHSJJHYuqcWSd0ZRESEHTPTjWbMgQM6RxjwWyBnhWCHTY4qKYEwCauaogIg5HvCJEjIFkJEAnyr3UmyxQSaCJI3t4xche636GQOuZvhKF8ZUA8sAyI3BTEmHdbIrSzNBAJmvIt73zyyH/YPCbm++ZepHcgWAAFuaXjIt6wPVSkutLgXNMksRxsxiTVG/OtOrriuZy8CKw6L7EkvIsiTqJqQaZQQDd0QLpBaGNqAmv8r862/A3c7qyQKH3FppQAPwk80xCfxATMOS/uNiJweoOc2cniBQjbTGwbRmT2PklgB/Wyhw1KGmDukpNC6HKULMYpLsbRegKjHLAyuGGAcoXfTKc0pAn6GysJ0IMHQXqfAcJjsJpCSvCgWYUXU+BwhQRiYIOFH11c8FEXYuUpBNjiw1h5RH1mqHVOMYY4lNtihlIEJMXZCQcrXbBIwRxAD33Uq2J4PPMC95iNdweOKMN+7445BfFwIAOw==");
exit();
$temp = "34934mcksmdimdskmd==52f408a29988b02f45b5e6f4ba5af0ae==3jmimdm93m9md3m93d=279e=midnmnruer"; exit();
$temp = "34934mcksmdimdskmd==<{%dyn.down.var.md5p1%}>==3jmimdm93m9md3m93d=<{%dyn.down.var.md5p2%}>=midnmnruer"; exit();
}
/*-------------------------------------------------------------------------*/
@@ -439,32 +429,39 @@ class stats {
$time_low = $time_high - (60*60*24);
//-----------------------------------------
// Query the DB
//-----------------------------------------
foreach( $this->ipsclass->forums->forum_by_id as $id => $data )
{
if ( ! $data['inc_postcount'] )
{
continue;
}
$ids[] = $id;
}
// Query the DB
//-----------------------------------------
foreach( $this->ipsclass->forums->forum_by_id as $id => $data )
{
if ( ! $data['inc_postcount'] )
{
continue;
}
$ids[] = $id;
}
if( count( $ids ) )
{
$todays_posts = 0;
$store = array();
$this->ipsclass->DB->simple_construct( array( 'select' => 'count(*) as cnt', 'from' => 'posts', 'where' => "post_date > $time_low" ) );
$this->ipsclass->DB->simple_exec();
$total_today = $this->ipsclass->DB->fetch_row();
$this->ipsclass->DB->cache_add_query( 'stats_get_todays_posters', array( 'ids' => $ids, 'time_low' => $time_low ) );
$this->ipsclass->DB->cache_exec_query();
$todays_posts = 0;
$store = array();
$this->ipsclass->DB->build_query( array( 'select' => 'count(*) as cnt',
'from' => array( 'posts' => 'p' ),
'where' => "p.post_date > {$time_low} AND t.forum_id IN(".implode(",",$ids).")",
'add_join' => array( 0 => array( 'from' => array( 'topics' => 't' ),
'where' => 't.tid=p.topic_id',
'type' => 'left' )
)
) );
$this->ipsclass->DB->exec_query();
$total_today = $this->ipsclass->DB->fetch_row();
$this->ipsclass->DB->cache_add_query( 'stats_get_todays_posters', array( 'ids' => $ids, 'time_low' => $time_low ) );
$this->ipsclass->DB->cache_exec_query();
while ($r = $this->ipsclass->DB->fetch_row())
{
@@ -475,7 +472,7 @@ class stats {
if ( $todays_posts )
{
foreach( $store as $idx => $info )
foreach( $store as $info )
{
$info['total_today_posts'] = $todays_posts;
@@ -488,6 +485,8 @@ class stats {
$info['posts'] = $this->ipsclass->do_number_format($info['posts']);
$info['tpost'] = $this->ipsclass->do_number_format($info['tpost']);
$info['members_display_name'] = $info['members_display_name'] ? $info['members_display_name'] : $this->ipsclass->lang['global_guestname'];
$this->output .= $this->ipsclass->compiled_templates['skin_stats']->top_poster_row( $info );
}
@@ -545,11 +544,11 @@ class stats {
function parse_member( $member )
{
$member['msg_icon'] = "<a href='{$this->base_url}&act=Msg&CODE=04&MID={$member['id']}'><{P_MSG}></a>";
$member['msg_icon'] = "<a href='{$this->ipsclass->base_url}act=Msg&amp;CODE=04&amp;MID={$member['id']}'><{P_MSG}></a>";
if (!$member['hide_email'])
{
$member['email_icon'] = "<a href='{$this->base_url}&act=Mail&CODE=00&MID={$member['id']}'><{P_EMAIL}></a>";
$member['email_icon'] = "<a href='{$this->ipsclass->base_url}act=Mail&amp;CODE=00&amp;MID={$member['id']}'><{P_EMAIL}></a>";
}
else
{
@@ -558,7 +557,7 @@ class stats {
if ($member['icq_number'])
{
$member['icq_icon'] = "<a href=\"javascript:PopUp('{$this->base_url}&act=ICQ&MID={$member['id']}','Pager','450','330','0','1','1','1')\"><{P_ICQ}></a>";
$member['icq_icon'] = "<a href=\"javascript:PopUp('{$this->ipsclass->base_url}act=ICQ&amp;MID={$member['id']}','Pager','450','330','0','1','1','1')\"><{P_ICQ}></a>";
}
else
{
@@ -567,7 +566,7 @@ class stats {
if ($member['aim_name'])
{
$member['aol_icon'] = "<a href=\"javascript:PopUp('{$this->base_url}&act=AOL&MID={$member['id']}','Pager','450','330','0','1','1','1')\"><{P_AOL}></a>";
$member['aol_icon'] = "<a href=\"javascript:PopUp('{$this->ipsclass->base_url}act=AOL&amp;MID={$member['id']}','Pager','450','330','0','1','1','1')\"><{P_AOL}></a>";
}
else
{
+8 -18
View File
@@ -2,28 +2,18 @@
/*
+--------------------------------------------------------------------------
| Invision Power Board 2.1.7
| Invision Power Board
| =============================================
| by Matthew Mecham
| (c) 2001 - 2005 Invision Power Services, Inc.
| (c) 2001 - 2006 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-24 22:17:00 +0100 (Mon, 24 Oct 2005) $
| > $Revision: 64 $
| > $Author: bfarber $
| > $Date: 2006-09-22 11:28:54 +0100 (Fri, 22 Sep 2006) $
| > $Revision: 567 $
| > $Author: matt $
+---------------------------------------------------------------------------
|
| > Topic Tracker module
@@ -38,7 +28,7 @@
if ( ! defined( 'IN_IPB' ) )
{
print "<h1>Íåêîððåêòíûé àäðåñ</h1>Âû íå èìååòå äîñòóïà ê ýòîìó ôàéëó íàïðÿìóþ. Åñëè âû íåäàâíî îáíîâëÿëè ôîðóì, âû äîëæíû îáíîâèòü âñå ñîîòâåòñòâóþùèå ôàéëû.";
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
exit();
}
@@ -254,11 +244,11 @@ class tracker {
{
if ($this->type == 'forum')
{
$this->ipsclass->print->redirect_screen( $this->ipsclass->lang['sub_added'], "act=SF&f={$this->topic['id']}" );
$this->ipsclass->print->redirect_screen( $this->ipsclass->lang['sub_added'], "showforum={$this->topic['id']}" );
}
else
{
$this->ipsclass->print->redirect_screen( $this->ipsclass->lang['sub_added'], "act=ST&f={$this->topic['id']}&t={$this->topic['tid']}&st={$this->ipsclass->input['st']}" );
$this->ipsclass->print->redirect_screen( $this->ipsclass->lang['sub_added'], "showtopic={$this->topic['tid']}&amp;st={$this->ipsclass->input['st']}" );
}
}
else
+204 -52
View File
@@ -2,28 +2,18 @@
/*
+--------------------------------------------------------------------------
| Invision Power Board 2.1.7
| Invision Power Board
| =============================================
| by Matthew Mecham
| (c) 2001 - 2005 Invision Power Services, Inc.
| (c) 2001 - 2006 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-28 15:18:16 +0100 (Fri, 28 Oct 2005) $
| > $Revision: 67 $
| > $Author: bfarber $
| > $Date: 2006-09-28 16:17:26 +0100 (Thu, 28 Sep 2006) $
| > $Revision: 586 $
| > $Author: matt $
+---------------------------------------------------------------------------
|
| > Warning Module
@@ -38,13 +28,15 @@
if ( ! defined( 'IN_IPB' ) )
{
print "<h1>Íåêîððåêòíûé àäðåñ</h1>Âû íå èìååòå äîñòóïà ê ýòîìó ôàéëó íàïðÿìóþ. Åñëè âû íåäàâíî îáíîâëÿëè ôîðóì, âû äîëæíû îáíîâèòü âñå ñîîòâåòñòâóþùèå ôàéëû.";
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
exit();
}
class warn {
var $output = "";
var $nav;
var $page_title = "";
var $topic = array();
var $forum = array();
var $topic_id = "";
@@ -52,7 +44,10 @@ class warn {
var $moderator = "";
var $modfunc = "";
var $mm_data = "";
var $parser = "";
var $parser;
var $han_editor;
var $email;
var $can_ban = 0;
var $can_mod_q = 0;
@@ -86,15 +81,6 @@ class warn {
$this->parser->bypass_badwords = intval($this->ipsclass->member['g_bypass_badwords']);
//-----------------------------------------
// Load emailer
//-----------------------------------------
require ROOT_PATH."sources/classes/class_email.php";
$this->email = new emailer();
$this->email->ipsclass =& $this->ipsclass;
$this->email->email_init();
//-----------------------------------------
// Make sure we're a moderator...
//-----------------------------------------
@@ -132,9 +118,20 @@ class warn {
}
else if ($this->ipsclass->member['is_mod'])
{
$other_mgroups = array();
if( $this->ipsclass->member['mgroup_others'] )
{
$other_mgroups = explode( ",", $this->ipsclass->clean_perm_string( $this->ipsclass->member['mgroup_others'] ) );
}
$other_mgroups[] = $this->ipsclass->member['mgroup'];
$mgroups = implode( ",", $other_mgroups );
$this->ipsclass->DB->simple_construct( array( 'select' => '*',
'from' => 'moderators',
'where' => "(member_id='".$this->ipsclass->member['id']."' OR (is_group=1 AND group_id='".$this->ipsclass->member['mgroup']."'))" ) );
'where' => "(member_id='".$this->ipsclass->member['id']."' OR (is_group=1 AND group_id IN(".$mgroups.") ))" ) );
$this->ipsclass->DB->simple_exec();
@@ -159,12 +156,12 @@ class warn {
if ($pass == 0)
{
$this->ipsclass->Error( array( LEVEL => 1, MSG => 'no_permission') );
$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_permission') );
}
if ( ! $this->ipsclass->vars['warn_on'] )
{
$this->ipsclass->Error( array( LEVEL => 1, MSG => 'no_permission') );
$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_permission') );
}
//-----------------------------------------
@@ -175,7 +172,7 @@ class warn {
if ( $mid < 1 )
{
$this->ipsclass->Error( array( LEVEL => 1, MSG => 'no_such_user') );
$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_such_user') );
}
$this->ipsclass->DB->cache_add_query( 'generic_get_all_member', array( 'mid' => $mid ) );
@@ -185,7 +182,7 @@ class warn {
if ( ! $this->warn_member['id'] )
{
$this->ipsclass->Error( array( LEVEL => 1, MSG => 'no_such_user') );
$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_such_user') );
}
if ( $this->ipsclass->input['CODE'] == "" OR $this->ipsclass->input['CODE'] == "dowarn" )
@@ -196,7 +193,7 @@ class warn {
if ( strstr( ','.$this->ipsclass->vars['warn_protected'].',', ','.$this->warn_member['mgroup'].',' ) )
{
$this->ipsclass->Error( array( LEVEL => 1, MSG => 'protected_user') );
$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'protected_user') );
}
//-----------------------------------------
@@ -212,7 +209,7 @@ class warn {
if ( $this->ipsclass->DB->get_num_rows() >= $this->times_a_day )
{
$this->ipsclass->Error( array( LEVEL => 1, MSG => 'warned_already') );
$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'warned_already') );
}
}
}
@@ -226,7 +223,15 @@ class warn {
case 'dowarn':
$this->do_warn();
break;
case 'add_note':
$this->add_note_form();
break;
case 'save_note':
$this->save_note();
break;
case 'view':
$this->view_log();
break;
@@ -250,6 +255,85 @@ class warn {
$this->ipsclass->print->do_output( array( 'TITLE' => $this->page_title, 'JS' => 1, 'NAV' => $this->nav ) );
}
/*-------------------------------------------------------------------------*/
// Save Note Form
/*-------------------------------------------------------------------------*/
function save_note()
{
//-----------------------------------------
// INIT
//-----------------------------------------
$content = '';
$note = trim( $this->ipsclass->input['note'] );
$save = array();
//-----------------------------------------
// Protected member?
//-----------------------------------------
if ( stristr( $this->ipsclass->vars['warn_protected'], ','.$this->warn_member['mgroup'].',' ) )
{
$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'protected_user') );
}
if ( $note )
{
//-----------------------------------------
// Ready to save?
//-----------------------------------------
$save['wlog_notes'] = "<content>{$note}</content>";
$save['wlog_notes'] .= "<mod></mod>";
$save['wlog_notes'] .= "<post></post>";
$save['wlog_notes'] .= "<susp></susp>";
$save['wlog_mid'] = $this->warn_member['id'];
$save['wlog_addedby'] = $this->ipsclass->member['id'];
$save['wlog_type'] = 'note';
$save['wlog_date'] = time();
//-----------------------------------------
// Enter into warn loggy poos (eeew - poo)
//-----------------------------------------
$this->ipsclass->DB->do_insert( 'warn_logs', $save );
}
//-----------------------------------------
// Done...
//-----------------------------------------
$this->view_log();
}
/*-------------------------------------------------------------------------*/
// Add Note Form
/*-------------------------------------------------------------------------*/
function add_note_form()
{
//-----------------------------------------
// INIT
//-----------------------------------------
$content = '';
//-----------------------------------------
// Protected member?
//-----------------------------------------
if ( stristr( $this->ipsclass->vars['warn_protected'], ','.$this->warn_member['mgroup'].',' ) )
{
$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'protected_user') );
}
$this->output .= $this->ipsclass->compiled_templates['skin_mod']->warn_add_note_form( $this->warn_member['id'], $this->warn_member['members_display_name'] );
$this->ipsclass->print->pop_up_window( $this->ipsclass->lang['warn_popup_title'], $this->output );
}
/*-------------------------------------------------------------------------*/
// Show logs
/*-------------------------------------------------------------------------*/
@@ -262,12 +346,11 @@ class warn {
if ( stristr( $this->ipsclass->vars['warn_protected'], ','.$this->warn_member['mgroup'].',' ) )
{
$this->ipsclass->Error( array( LEVEL => 1, MSG => 'protected_user') );
$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'protected_user') );
}
$perpage = 50;
$start = intval($this->ipsclass->input['st']);
$start = intval($this->ipsclass->input['st']) >=0 ? intval($this->ipsclass->input['st']) : 0;
$this->ipsclass->DB->simple_construct( array( 'select' => 'count(*) as cnt', 'from' => 'warn_logs', 'where' => "wlog_mid={$this->warn_member['id']}" ) );
$this->ipsclass->DB->simple_exec();
@@ -283,7 +366,7 @@ class warn {
'BASE_URL' => $this->ipsclass->base_url."act=warn&amp;CODE=view&amp;mid={$this->warn_member['id']}",
) );
$this->output .= $this->ipsclass->compiled_templates['skin_mod']->warn_view_header($this->warn_member['id'], $this->warn_member['members_display_name'], $links);
$this->output .= $this->ipsclass->compiled_templates['skin_mod']->warn_view_header($this->warn_member['id'], $this->warn_member['members_display_name']);
if ( $row['cnt'] < 1 )
{
@@ -308,7 +391,11 @@ class warn {
$puni_name = $this->ipsclass->make_profile_link( $r['punisher_name'], $r['punisher_id'] );
if ( $r['wlog_type'] == 'pos' )
if ( $r['wlog_type'] == 'note' )
{
$this->output .= $this->ipsclass->compiled_templates['skin_mod']->warn_view_note_row($date, $content, $puni_name);
}
else if ( $r['wlog_type'] == 'pos' )
{
$this->output .= $this->ipsclass->compiled_templates['skin_mod']->warn_view_positive_row($date, $content, $puni_name);
}
@@ -319,7 +406,7 @@ class warn {
}
}
$this->output .= $this->ipsclass->compiled_templates['skin_mod']->warn_view_footer();
$this->output .= $this->ipsclass->compiled_templates['skin_mod']->warn_view_footer($links);
$this->ipsclass->print->pop_up_window( $this->ipsclass->lang['warn_popup_title'], $this->output );
}
@@ -334,7 +421,7 @@ class warn {
if ( $this->type == 'member' )
{
$this->ipsclass->Error( array( LEVEL => 1, MSG => 'no_permission') );
$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_permission') );
}
$err = "";
@@ -363,7 +450,7 @@ class warn {
if ( $err == 1 )
{
$this->ipsclass->Error( array( LEVEL => '1', MSG => 'no_warn_max' ) );
$this->ipsclass->Error( array( 'LEVEL' => '1', 'MSG' => 'no_warn_max' ) );
}
}
@@ -373,7 +460,7 @@ class warn {
if ( $this->ipsclass->input['key'] != $this->ipsclass->return_md5_check() )
{
$this->ipsclass->Error( array( LEVEL => '1', MSG => 'del_post') );
$this->ipsclass->Error( array( 'LEVEL' => '1', 'MSG' => 'del_post') );
}
//-----------------------------------------
@@ -386,6 +473,24 @@ class warn {
return;
}
//-----------------------------------------
// Load emailer
//-----------------------------------------
require ROOT_PATH."sources/classes/class_email.php";
$this->email = new emailer();
$this->email->ipsclass =& $this->ipsclass;
$this->email->email_init();
//-----------------------------------------
// Load and config the std/rte editors
//-----------------------------------------
require_once( ROOT_PATH."sources/handlers/han_editor.php" );
$this->han_editor = new han_editor();
$this->han_editor->ipsclass =& $this->ipsclass;
$this->han_editor->init();
//-----------------------------------------
// Plussy - minussy?
//-----------------------------------------
@@ -399,8 +504,14 @@ class warn {
if ( $this->ipsclass->input['contact'] != "" )
{
if ( $this->han_editor->method == 'rte' )
{
$this->ipsclass->input['contact'] = $this->han_editor->process_raw_post( 'contact' );
}
$save['wlog_contact'] = $this->ipsclass->input['contactmethod'];
$save['wlog_contact_content'] = "<subject>{$this->ipsclass->input['subject']}</subject><content>{$this->ipsclass->input['contact']}</content>";
$save['wlog_contact_content'] = $this->parser->pre_db_parse( $save['wlog_contact_content'] );
if ( trim($this->ipsclass->input['subject']) == "" )
{
@@ -410,6 +521,11 @@ class warn {
if ( $this->ipsclass->input['contactmethod'] == 'email' )
{
$this->parser->parse_smilies = 0;
$this->parser->parse_html = 1;
$this->parser->parse_bbcode = 1;
$this->ipsclass->input['contact'] = $this->parser->pre_db_parse( $this->ipsclass->input['contact'] );
//-----------------------------------------
// Send the email
//-----------------------------------------
@@ -425,7 +541,7 @@ class warn {
$this->email->subject = $this->ipsclass->input['subject'];
$this->email->to = $this->warn_member['email'];
$this->email->from = $this->ipsclass->member['email'];
$this->email->from = $this->ipsclass->vars['email_out'];
$this->email->send_mail();
}
else
@@ -567,8 +683,18 @@ class warn {
{
if ( $this->type == 'member' )
{
$this->ipsclass->Error( array( LEVEL => 1, MSG => 'no_permission') );
$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_permission') );
}
//-----------------------------------------
// Load and config the std/rte editors
//-----------------------------------------
require_once( ROOT_PATH."sources/handlers/han_editor.php" );
$this->han_editor = new han_editor();
$this->han_editor->ipsclass =& $this->ipsclass;
$this->han_editor->init();
$this->han_editor->remove_side_panel = 1;
$key = $this->ipsclass->return_md5_check();
@@ -602,8 +728,9 @@ class warn {
if ( $this->can_mod_q )
{
$mod_tick = 0;
$mod_arr = array();
$mod_tick = 0;
$mod_arr = array( 'timespan' => 0, 'days' => 0, 'hours' => 0 );
$mod_extra = "";
if ( $this->warn_member['mod_posts'] == 1 )
{
@@ -635,8 +762,9 @@ class warn {
if ( $this->can_rem_post )
{
$post_tick = 0;
$post_arr = array();
$post_tick = 0;
$post_arr = array( 'timespan' => 0, 'hours' => 0, 'days' => 0 );
$post_extra = "";
if ( $this->warn_member['restrict_post'] == 1 )
{
@@ -667,7 +795,8 @@ class warn {
if ( $this->can_ban )
{
$ban_arr = array();
$ban_arr = array( 'timespan' => 0, 'days' => 0, 'hours' => 0 );
$ban_extra = "";
if ( $this->warn_member['temp_ban'] )
{
@@ -686,13 +815,36 @@ class warn {
$ban_arr['timespan'] = $hours;
}
$post_extra = $this->ipsclass->compiled_templates['skin_mod']->warn_restricition_in_place();
$ban_extra = $this->ipsclass->compiled_templates['skin_mod']->warn_restricition_in_place();
}
$this->output .= $this->ipsclass->compiled_templates['skin_mod']->warn_suspend($ban_arr, $ban_extra);
}
$this->output .= $this->ipsclass->compiled_templates['skin_mod']->warn_footer( $this->warn_member['members_disable_pm'] );
$this->ipsclass->input['reason'] = isset($this->ipsclass->input['reason']) ? $this->ipsclass->my_br2nl( $this->ipsclass->input['reason'] ) : '';
if( isset($this->ipsclass->input['contact']) AND $this->ipsclass->input['contact'] )
{
if ( $this->han_editor->method == 'rte' )
{
$this->ipsclass->input['contact'] = $this->han_editor->process_raw_post( 'contact' );
$this->ipsclass->input['contact'] = $this->parser->pre_display_parse( $this->parser->pre_db_parse( $this->ipsclass->input['contact'] ) );
$this->ipsclass->input['contact'] = $this->parser->convert_ipb_html_to_html( $this->ipsclass->input['contact'] );
}
else
{
$this->parser->parse_html = 1;
$this->parser->parse_nl2br = 1;
$this->parser->parse_smilies = 1;
$this->parser->parse_bbcode = 1;
$this->ipsclass->input['contact'] = $this->parser->pre_edit_parse( $this->ipsclass->input['contact'] );
}
}
$this->ipsclass->input['subject'] = isset($this->ipsclass->input['subject']) ? $this->ipsclass->input['subject'] : '';
$this->output .= $this->ipsclass->compiled_templates['skin_mod']->warn_footer( $this->warn_member['members_disable_pm'], $this->han_editor->show_editor( isset($this->ipsclass->input['contact']) ? $this->ipsclass->input['contact'] : '', 'contact' ) );
}
File diff suppressed because it is too large. Load diff
+248 -137
View File
@@ -2,28 +2,18 @@
/*
+--------------------------------------------------------------------------
| Invision Power Board 2.1.7
| Invision Power Board
| =============================================
| by Matthew Mecham
| (c) 2001 - 2005 Invision Power Services, Inc.
| (c) 2001 - 2006 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: 2006-01-11 22:47:48 +0000 (Wed, 11 Jan 2006) $
| > $Revision: 122 $
| > $Author: bfarber $
| > $Date: 2006-09-22 11:28:54 +0100 (Fri, 22 Sep 2006) $
| > $Revision: 567 $
| > $Author: matt $
+---------------------------------------------------------------------------
|
| > Moderation core module
@@ -39,7 +29,7 @@
if ( ! defined( 'IN_IPB' ) )
{
print "<h1>Íåêîððåêòíûé àäðåñ</h1>Âû íå èìååòå äîñòóïà ê ýòîìó ôàéëó íàïðÿìóþ. Åñëè âû íåäàâíî îáíîâëÿëè ôîðóì, âû äîëæíû îáíîâèòü âñå ñîîòâåòñòâóþùèå ôàéëû.";
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
exit();
}
@@ -51,7 +41,7 @@ class moderate
var $moderator = "";
var $modfunc = "";
var $forum = array();
var $forum = array( 'id' => 0 );
var $topic = array();
var $upload_dir = "";
@@ -129,7 +119,7 @@ class moderate
$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'missing_files') );
}
if ( $this->ipsclass->input['f'] AND ( $this->topic['forum_id'] != $this->ipsclass->input['f'] ) )
if ( $this->ipsclass->input['f'] AND ( $this->topic['forum_id'] != $this->ipsclass->input['f'] ) )
{
$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'missing_files') );
}
@@ -161,7 +151,7 @@ class moderate
$this->ipsclass->Error( array( 'LEVEL' => 1,'MSG' => 'missing_files') );
}
$this->ipsclass->input['st'] = intval($this->ipsclass->input['st']);
$this->ipsclass->input['st'] = intval($this->ipsclass->input['st']) > 0 ? intval($this->ipsclass->input['st']) : 0;
//-----------------------------------------
// Get the forum info based on the forum ID,
@@ -175,7 +165,7 @@ class moderate
// Are we a moderator?
//-----------------------------------------
if ( $this->ipsclass->member['_moderator'][ $this->ipsclass->input['f'] ] )
if ( isset( $this->ipsclass->member['_moderator'][ $this->ipsclass->input['f'] ]) AND $this->ipsclass->member['_moderator'][ $this->ipsclass->input['f'] ] )
{
$this->moderator = $this->ipsclass->member['_moderator'][ $this->ipsclass->input['f'] ];
}
@@ -341,7 +331,7 @@ class moderate
// If we have any HTML to print, do so...
$this->ipsclass->print->add_output( $this->output );
$this->ipsclass->print->do_output( array( 'TITLE' => $this->page_title, 'JS' => 0, NAV => $this->nav ) );
$this->ipsclass->print->do_output( array( 'TITLE' => $this->page_title, 'JS' => 0, 'NAV' => $this->nav ) );
}
/*-------------------------------------------------------------------------*/
@@ -350,7 +340,7 @@ class moderate
function edit_member()
{
$mid = intval($this->ipsclass->input['mid']);
$mid = intval($this->ipsclass->input['mid']) ? intval($this->ipsclass->input['mid']) : intval($this->ipsclass->input['member']);
//-----------------------------------------
// Check Permissions
@@ -397,7 +387,7 @@ class moderate
// Show Form?
//-----------------------------------------
if ( ! $this->ipsclass->input['checked'] )
if ( !isset($this->ipsclass->input['checked']) OR !$this->ipsclass->input['checked'] )
{
$this->output .= $this->html_start_form( array( 1 => array( 'CODE' , 'editmember'),
4 => array( 'mid' , $mid ),
@@ -417,8 +407,6 @@ class moderate
}
}
$editable['signature'] = $parser->pre_edit_parse( $member['signature'] );
$editable['location'] = $member['location'];
$editable['interests'] = $this->ipsclass->my_br2nl($member['interests']);
@@ -498,19 +486,40 @@ class moderate
'signature' => $this->ipsclass->input['signature'],
);
if ($this->ipsclass->input['avatar'] == 1)
if ( $this->ipsclass->input['avatar'] == 1 )
{
$bet['avatar_location'] = "";
$bet['avatar_size'] = "";
$this->bash_uploaded_avatars($mid);
}
if ($this->ipsclass->input['photo'] == 1)
if ( $this->ipsclass->input['photo'] == 1 )
{
$this->bash_uploaded_photos($mid);
$bet['photo_type'] = '';
$bet['photo_location'] = '';
$bet['photo_dimensions'] = '';
$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'profile_portal', 'where' => "pp_member_id=".intval($mid) ) );
$this->ipsclass->DB->simple_exec();
if ( $this->ipsclass->DB->get_num_rows() )
{
$this->ipsclass->DB->do_update( 'profile_portal', array( 'pp_main_photo' => '',
'pp_main_width' => '',
'pp_main_height' => '',
'pp_thumb_photo' => '',
'pp_thumb_width' => '',
'pp_thumb_height' => '' ), 'pp_member_id='.$mid );
}
else
{
$this->ipsclass->DB->do_insert( 'profile_portal', array( 'pp_main_photo' => '',
'pp_main_width' => '',
'pp_main_height' => '',
'pp_thumb_photo' => '',
'pp_thumb_width' => '',
'pp_thumb_height' => '',
'pp_member_id' => $mid ) );
}
}
//-----------------------------------------
@@ -587,7 +596,7 @@ class moderate
$this->modules->on_profile_update($bet, $custom_fields);
}
$this->moderate_log("Èçìåíåí ïðîôèëü ïîëüçîâàòåëÿ: {$member['members_display_name']}");
$this->moderate_log("{$this->ipsclass->lang['acp_edited_profile']} {$member['members_display_name']}");
$this->ipsclass->boink_it( $this->ipsclass->base_url.'act=mod&CODE=editmember&auth_key='.$this->ipsclass->return_md5_check().'&mid='.$mid.'&tid='.time() );
}
@@ -633,7 +642,7 @@ class moderate
if ( $this->topic['tid'] )
{
$this->ipsclass->print->redirect_screen( $this->ipsclass->lang['cp_redirect_posts'], "showtopic=".$this->topic['tid'].'&st='.intval($this->ipsclass->input['st']) );
$this->ipsclass->print->redirect_screen( $this->ipsclass->lang['cp_redirect_posts'], "showtopic=".$this->topic['tid'].'&amp;st='.intval($this->ipsclass->input['st']) );
}
}
@@ -736,8 +745,8 @@ class moderate
$this->page_title = $this->ipsclass->lang['cmp_title'].": ".$this->topic['title'];
$this->nav = array ( "<a href='{$this->base_url}&act=SF&f={$this->forum['id']}'>{$this->forum['name']}</a>",
"<a href='{$this->base_url}&act=ST&f={$this->forum['id']}&t={$this->topic['tid']}'>{$this->topic['title']}</a>"
$this->nav = array ( "<a href='{$this->base_url}showforum={$this->forum['id']}'>{$this->forum['name']}</a>",
"<a href='{$this->base_url}showtopic={$this->topic['tid']}'>{$this->topic['title']}</a>"
);
$this->ipsclass->print->add_output( $this->output );
@@ -797,6 +806,8 @@ class moderate
}
}
$ids = $this->ipsclass->clean_int_array( $ids );
$affected_ids = count($ids);
//-----------------------------------------
@@ -840,6 +851,52 @@ class moderate
$this->ipsclass->DB->do_update( 'posts', array( 'new_topic' => 0 ), "topic_id={$this->topic['tid']}" );
//-----------------------------------------
// Is first post queued for new topic?
//-----------------------------------------
$topic_approved = 1;
$this->ipsclass->DB->build_query( array( 'select' => 'pid, queued',
'from' => 'posts',
'where' => "topic_id={$move_to_topic['tid']}",
'order' => 'pid ASC',
'limit' => array(0,1),
) );
$this->ipsclass->DB->exec_query();
$first_post = $this->ipsclass->DB->fetch_row();
if( $first_post['queued'] )
{
$this->ipsclass->DB->do_update( 'topics', array( 'approved' => 0 ), "tid={$move_to_topic['tid']}" );
$this->ipsclass->DB->do_update( 'posts', array( 'queued' => 0 ), 'pid='.$first_post['pid'] );
}
//-----------------------------------------
// Is first post queued for old topic?
//-----------------------------------------
$topic_approved = 1;
$this->ipsclass->DB->build_query( array( 'select' => 'pid, queued',
'from' => 'posts',
'where' => "topic_id={$this->topic['tid']}",
'order' => 'pid ASC',
'limit' => array(0,1),
) );
$this->ipsclass->DB->exec_query();
$other_first_post = $this->ipsclass->DB->fetch_row();
if( $other_first_post['queued'] )
{
$this->ipsclass->DB->do_update( 'topics', array( 'approved' => 0 ), "tid={$this->topic['tid']}" );
$this->ipsclass->DB->do_update( 'posts', array( 'queued' => 0 ), 'pid='.$other_first_post['pid'] );
}
//-----------------------------------------
// Rebuild the topics
//-----------------------------------------
@@ -858,7 +915,7 @@ class moderate
$this->modfunc->forum_recount($move_to_topic['forum_id']);
}
$this->moderate_log("Ñîîáùåíèÿ èç òåìû '{$this->topic['title']}' ïåðåìåùåíû â '{$move_to_topic['title']}'");
$this->moderate_log( sprintf( $this->ipsclass->lang['acp_moved_posts'], $this->topic['title'], $move_to_topic['title'] ) );
}
}
@@ -934,11 +991,11 @@ class moderate
if( $approve )
{
$this->moderate_log(count($this->pids)." îæèäàåìûõ ïóáëèêàöèè ñîîáùåíèé òåìû &laquo;{$this->topic['title']}&raquo; îïóáëèêîâàíî");
$this->moderate_log( sprintf( $this->ipsclass->lang['acp_approved_posts'], count($this->pids), $this->topic['title'] ) );
}
else
{
$this->moderate_log(count($this->pids)." îæèäàåìûõ ïóáëèêàöèè ñîîáùåíèé òåìû &laquo;{$this->topic['title']}&raquo; óäàëåíî");
$this->moderate_log( sprintf( $this->ipsclass->lang['acp_unapproved_posts'], count($this->pids), $this->topic['title'] ) );
}
$this->modfunc->rebuild_topic( $this->topic['tid'] );
@@ -1046,8 +1103,8 @@ class moderate
$this->page_title = $this->ipsclass->lang['st_top']." ".$this->topic['title'];
$this->nav = array ( "<a href='{$this->base_url}&act=SF&f={$this->forum['id']}'>{$this->forum['name']}</a>",
"<a href='{$this->base_url}&act=ST&f={$this->forum['id']}&t={$this->topic['tid']}'>{$this->topic['title']}</a>"
$this->nav = array ( "<a href='{$this->base_url}showforum={$this->forum['id']}'>{$this->forum['name']}</a>",
"<a href='{$this->base_url}showtopic={$this->topic['tid']}'>{$this->topic['title']}</a>"
);
$this->ipsclass->print->add_output( $this->output );
@@ -1081,6 +1138,8 @@ class moderate
}
}
$ids = $this->ipsclass->clean_int_array( $ids );
$affected_ids = count($ids);
//-----------------------------------------
@@ -1140,6 +1199,29 @@ class moderate
}
}
//-----------------------------------------
// Is first post queued?
//-----------------------------------------
$topic_approved = 1;
$this->ipsclass->DB->build_query( array( 'select' => 'pid, queued',
'from' => 'posts',
'where' => "pid IN($pid_string)",
'order' => 'pid ASC',
'limit' => array(0,1),
) );
$this->ipsclass->DB->exec_query();
$first_post = $this->ipsclass->DB->fetch_row();
if( $first_post['queued'] )
{
$topic_approved = 0;
$this->ipsclass->DB->do_update( 'posts', array( 'queued' => 0 ), 'pid='.$first_post['pid'] );
}
//-----------------------------------------
// Complete a new dummy topic
//-----------------------------------------
@@ -1161,7 +1243,7 @@ class moderate
'last_vote' => 0,
'views' => 0,
'forum_id' => $this->ipsclass->input['fid'],
'approved' => 1,
'approved' => $topic_approved,
'pinned' => 0,
) );
@@ -1204,11 +1286,11 @@ class moderate
if ( $this->trash_inuse )
{
$this->moderate_log("Ïðèìåíåíà êîðçèíà äëÿ óäàëÿåìîé òåìû: '{$this->topic['title']}'");
$this->moderate_log("{$this->ipsclass->lang['acp_trashcan_post']} '{$this->topic['title']}'");
}
else
{
$this->moderate_log("Ðàçäåëåíà òåìà: '{$this->topic['title']}'");
$this->moderate_log("{$this->ipsclass->lang['acp_split_topic']} '{$this->topic['title']}'");
}
}
}
@@ -1295,7 +1377,9 @@ class moderate
// Get Attachment Data
//-----------------------------------------
$this->ipsclass->DB->simple_construct( array( "select" => '*', 'from' => 'attachments', 'where' => "attach_pid IN (".implode(",", $this->pids).")" ) );
$this->ipsclass->DB->simple_construct( array( "select" => '*',
'from' => 'attachments',
'where' => "attach_rel_module='post' AND attach_rel_id IN (".implode(",", $this->pids).")" ) );
$this->ipsclass->DB->simple_exec();
while( $row = $this->ipsclass->DB->fetch_row() )
@@ -1414,15 +1498,18 @@ class moderate
}
}
$attach_keep = $this->ipsclass->clean_int_array( $attach_keep );
$attach_kill = $this->ipsclass->clean_int_array( $attach_kill );
//-----------------------------------------
// Keep
//-----------------------------------------
if ( count( $attach_keep ) )
{
$this->ipsclass->DB->do_update( 'attachments',
array( 'attach_pid' => $this->ipsclass->input['postdate'], 'attach_post_key' => $new_post_key, 'attach_member_id' => $author['id'] ),
'attach_id IN('.implode(",",$attach_keep).')' );
$this->ipsclass->DB->do_update( 'attachments', array( 'attach_rel_id' => $this->ipsclass->input['postdate'],
'attach_post_key' => $new_post_key,
'attach_member_id' => $author['id'] ), 'attach_id IN('.implode(",",$attach_keep).')' );
}
//-----------------------------------------
@@ -1572,9 +1659,9 @@ class moderate
$this->modfunc->forum_recount( $this->forum['id'] );
$this->modfunc->stats_recount();
$this->moderate_log("Îïóáëèêîâàíà òåìà (tid: ".$this->topic['tid'].")");
$this->moderate_log( sprintf( $this->ipsclass->lang['acp_approve_topic'], $this->topic['tid'] ) );
$this->ipsclass->print->redirect_screen( $this->ipsclass->lang['redirect_modified'], "showtopic=".$this->topic['tid']."&st=".$this->ipsclass->input['st'] );
$this->ipsclass->print->redirect_screen( $this->ipsclass->lang['redirect_modified'], "showtopic=".$this->topic['tid']."&amp;st=".intval($this->ipsclass->input['st']) );
}
/*-------------------------------------------------------------------------*/
@@ -1665,7 +1752,7 @@ class moderate
$this->modfunc->topic_move( $tid_array, $source, $moveto );
$this->moderate_log("Ïåðåìåùåíî íåñêîëüêî òåì");
$this->moderate_log( $this->ipsclass->lang['acp_mass_moved'] );
//-----------------------------------------
// Show results or refresh..
@@ -1693,13 +1780,14 @@ class moderate
//-----------------------------------------
$this->ipsclass->input['check'] = 0;
$this->ipsclass->input['dateline'] = round((time()-$this->ipsclass->input['dateline'])/24/60/60);
$this->prune_start( $this->ipsclass->compiled_templates['skin_mod']->mod_simple_page( $this->ipsclass->lang['cp_results'], $this->ipsclass->lang['cp_result_move']. ($max) ) );
}
else
{
$link = "act=mod&f={$this->forum['id']}&CODE=prune_move&df={$this->ipsclass->input['df']}&pergo={$pergo}&current={$maxdone}&max={$max}";
$link .= "&starter={$starter}&state={$state}&posts={$posts}&dateline={$dateline}&ignore_pin={$ignore_pin}";
$link .= "&auth_key=".$this->ipsclass->md5_check;
$link = "act=mod&amp;f={$this->forum['id']}&amp;CODE=prune_move&amp;df={$this->ipsclass->input['df']}&amp;pergo={$pergo}&amp;current={$maxdone}&amp;max={$max}";
$link .= "&amp;starter={$starter}&amp;state={$state}&amp;posts={$posts}&amp;dateline={$dateline}&amp;ignore_pin={$ignore_pin}";
$link .= "&amp;auth_key=".$this->ipsclass->md5_check;
$done = $current + $num_rows;
$text = sprintf( $this->ipsclass->lang['cp_batch_done'], $done, $max - $done );
@@ -1785,7 +1873,7 @@ class moderate
$this->modfunc->topic_delete($tid_array);
$this->moderate_log("Ñîêðàùåí ôîðóì");
$this->moderate_log( $this->ipsclass->lang['acp_pruned_forum'] );
//-----------------------------------------
// Show results or refresh..
@@ -1802,9 +1890,9 @@ class moderate
}
else
{
$link = "act=mod&f={$this->forum['id']}&CODE=prune_finish&pergo={$pergo}&current={$maxdone}&max={$max}";
$link .= "&starter={$starter}&state={$state}&posts={$posts}&dateline={$dateline}&ignore_pin={$ignore_pin}";
$link .= "&auth_key=".$this->ipsclass->md5_check;
$link = "act=mod&amp;f={$this->forum['id']}&amp;CODE=prune_finish&amp;pergo={$pergo}&amp;current={$maxdone}&amp;max={$max}";
$link .= "&amp;starter={$starter}&amp;state={$state}&amp;posts={$posts}&amp;dateline={$dateline}&amp;ignore_pin={$ignore_pin}";
$link .= "&amp;auth_key=".$this->ipsclass->md5_check;
$done = $current + $num_rows;
$text = sprintf( $this->ipsclass->lang['cp_batch_done'], $done, $max - $done );
@@ -1844,23 +1932,31 @@ class moderate
return;
}
$confirm_data = array( 'show' => '' );
//-----------------------------------------
// Check per go
//-----------------------------------------
$this->ipsclass->input['pergo'] = $this->ipsclass->input['pergo'] ? $this->ipsclass->input['pergo'] : 50;
$this->ipsclass->input['pergo'] = isset($this->ipsclass->input['pergo']) ? intval($this->ipsclass->input['pergo']) : 50;
$this->ipsclass->input['posts'] = isset($this->ipsclass->input['posts']) ? intval($this->ipsclass->input['posts']) : '';
$this->ipsclass->input['member'] = isset($this->ipsclass->input['member']) ? $this->ipsclass->input['member'] : '';
$this->ipsclass->input['determine'] = isset($this->ipsclass->input['determine']) ? $this->ipsclass->input['determine'] : '';
$this->ipsclass->input['dateline'] = isset($this->ipsclass->input['dateline']) ? $this->ipsclass->input['dateline'] : '';
//-----------------------------------------
// Are we checking first?
//-----------------------------------------
if ($this->ipsclass->input['check'] == 1)
if ( isset($this->ipsclass->input['check']) AND $this->ipsclass->input['check'] == 1 )
{
$link = "&pergo=".$this->ipsclass->input['pergo'];
$link = "&amp;pergo=".$this->ipsclass->input['pergo'];
$link_text = $this->ipsclass->lang['cp_prune_dorem'];
$tcount = $this->ipsclass->DB->simple_exec_query( array( 'select' => 'COUNT(*) as tcount', 'from' => 'topics', 'where' => "approved=1 and forum_id={$this->forum['id']}" ) );
$db_query = "";
//-----------------------------------------
// date...
//-----------------------------------------
@@ -1870,7 +1966,7 @@ class moderate
$date = time() - $this->ipsclass->input['dateline']*60*60*24;
$db_query .= " AND last_post < $date";
$link .= "&dateline=$date";
$link .= "&amp;dateline=$date";
}
//-----------------------------------------
@@ -1879,7 +1975,8 @@ class moderate
if ( $this->ipsclass->input['member'] )
{
$this->ipsclass->DB->query("SELECT id FROM ibf_members WHERE name='".$this->ipsclass->input['member']."'");
$this->ipsclass->DB->build_query( array( 'select' => 'id', 'from' => 'members', 'where' => "name='".$this->ipsclass->input['member']."'" ) );
$this->ipsclass->DB->exec_query();
if (! $mem = $this->ipsclass->DB->fetch_row() )
{
@@ -1889,7 +1986,7 @@ class moderate
else
{
$db_query .= " AND starter_id='".$mem['id']."'";
$link .= "&starter={$mem['id']}";
$link .= "&amp;starter={$mem['id']}";
}
}
@@ -1900,19 +1997,19 @@ class moderate
if ($this->ipsclass->input['posts'])
{
$db_query .= " AND posts < '".$this->ipsclass->input['posts']."'";
$link .= "&posts={$this->ipsclass->input['posts']}";
$link .= "&amp;posts={$this->ipsclass->input['posts']}";
}
if ($this->ipsclass->input['topic_type'] != 'all')
{
$db_query .= " AND state='".$this->ipsclass->input['topic_type']."'";
$link .= "&state={$this->ipsclass->input['topic_type']}";
$link .= "&amp;state={$this->ipsclass->input['topic_type']}";
}
if ($this->ipsclass->input['ignore_pin'] == 1)
{
$db_query .= " AND pinned <> 1";
$link .= "&ignore_pin=1";
$link .= "&amp;ignore_pin=1";
}
$this->ipsclass->DB->simple_construct( array( 'select' => 'COUNT(*) as count',
@@ -1929,7 +2026,7 @@ class moderate
if ($this->ipsclass->input['df'] == 'prune')
{
$link = "act=mod&f={$this->forum['id']}&CODE=prune_finish&".$link;
$link = "act=mod&amp;f={$this->forum['id']}&amp;CODE=prune_finish&amp;".$link;
}
else
{
@@ -1944,7 +2041,7 @@ class moderate
return;
}
$link = "act=mod&f={$this->forum['id']}&CODE=prune_move&df=".$this->ipsclass->input['df'].$link;
$link = "act=mod&amp;f={$this->forum['id']}&amp;CODE=prune_move&amp;df=".$this->ipsclass->input['df'].$link;
$link_text = $this->ipsclass->lang['cp_prune_domove'];
}
@@ -1954,7 +2051,7 @@ class moderate
$confirm_data = array( 'tcount' => $tcount['tcount'],
'count' => $count['count'],
'link' => $link . '&max='.$count['count'],
'link' => $link . '&amp;max='.$count['count'],
'link_text' => $link_text,
'show' => 1 );
}
@@ -1963,7 +2060,7 @@ class moderate
foreach( array( 'open', 'closed', 'link', 'all' ) as $type )
{
if ($this->ipsclass->input['topic_type'] == $type)
if (isset($this->ipsclass->input['topic_type']) AND $this->ipsclass->input['topic_type'] == $type)
{
$selected = ' selected';
}
@@ -1990,9 +2087,9 @@ class moderate
// before
//-----------------------------------------
if ( $this->ipsclass->input['df'] )
if ( isset($this->ipsclass->input['df']) AND $this->ipsclass->input['df'] )
{
$html_forums = preg_replace( "/<option value=\"".intval($this->ipsclass->input['df'])."\"/", "<option value=\"".$this->ipsclass->input['df']."\" selected", $html_forums );
$html_forums = preg_replace( "/<option value=\"".intval($this->ipsclass->input['df'])."\"/", "<option value=\"".$this->ipsclass->input['df']."\" selected='selected'", $html_forums );
}
$this->output .= $this->ipsclass->compiled_templates['skin_mod']->prune_splash($this->forum, $html_forums, $select, $this->ipsclass->return_md5_check(), $confirm_data, $complete_html );
@@ -2076,8 +2173,6 @@ class moderate
function multi_topic_merge()
{
global $std, $ibforums, $DB, $print;
$pass = 0;
if ($this->ipsclass->member['g_is_supmod'] == 1)
@@ -2101,7 +2196,7 @@ class moderate
if ( count($this->tids) < 2 )
{
$this->moderate_error(); ### NEEDS CUSTOM MESSAGE
$this->moderate_error('mt_not_enough');
return;
}
@@ -2177,9 +2272,8 @@ class moderate
function multi_complete_checked_move()
{
global $std, $ibforums, $DB, $print;
$pass = 0;
$add_link = 0;
if ($this->ipsclass->member['g_is_supmod'] == 1)
{
@@ -2200,6 +2294,11 @@ class moderate
return;
}
if( $this->ipsclass->input['leave'] == 'y' )
{
$add_link = 1;
}
$dest_id = intval($this->ipsclass->input['df']);
$source_id = $this->forum['id'];
@@ -2219,6 +2318,8 @@ class moderate
}
}
}
$this->tids = $this->ipsclass->clean_int_array( $this->tids );
//-----------------------------------------
// Check for input..
@@ -2281,7 +2382,7 @@ class moderate
}
}
$this->modfunc->topic_move( $this->tids, $source_id, $dest_id );
$this->modfunc->topic_move( $this->tids, $source_id, $dest_id, $add_link );
//-----------------------------------------
// Resync the forums..
@@ -2293,7 +2394,7 @@ class moderate
$this->modfunc->forum_recount($source_id);
$this->modfunc->forum_recount($dest_id);
$this->moderate_log("Ïåðåìåùåíû òåìû èç ôîðóìà $source_name â $dest_name");
$this->moderate_log( sprintf( $this->ipsclass->lang['acp_moved_topics'], $source_name, $dest_name ) );
}
@@ -2303,8 +2404,6 @@ class moderate
function multi_start_checked_move()
{
global $std, $ibforums, $DB, $print;
$pass = 0;
if ($this->ipsclass->member['g_is_supmod'] == 1)
@@ -2351,7 +2450,7 @@ class moderate
$this->page_title = $this->ipsclass->lang['cp_ttitle'];
$this->nav = array ( "<a href='{$this->ipsclass->base_url}act=SF&f={$this->forum['id']}'>{$this->forum['name']}</a>" );
$this->nav = array ( "<a href='{$this->ipsclass->base_url}showforum={$this->forum['id']}'>{$this->forum['name']}</a>" );
}
/*-------------------------------------------------------------------------*/
@@ -2482,12 +2581,12 @@ class moderate
if ( $this->mm_data['topic_title_st'] )
{
$pre = preg_replace( "/'/", "\\'", $this->mm_data['topic_title_st'] );
$pre = str_replace( "'", "\\\'", $this->mm_data['topic_title_st'] );
}
if ( $this->mm_data['topic_title_end'] )
{
$end = preg_replace( "/'/", "\\'", $this->mm_data['topic_title_end'] );
$end = str_replace( "'", "\\\'", $this->mm_data['topic_title_end'] );
}
$this->ipsclass->DB->cache_add_query( 'moderate_concat_title', array( 'pre' => $pre,
@@ -2563,7 +2662,7 @@ class moderate
$this->modfunc->forum_recount( $this->forum['id'] );
$this->moderate_log("Ïðèìåíåíà ìóëüòè-ìîäåðàöèÿ '{$this->mm_data['mm_title']}' íà ôîðóìå {$this->forum['name']}");
$this->moderate_log( sprintf( $this->ipsclass->lang['acp_multi_mod'], $this->mm_data['mm_title'], $this->forum['name'] ) );
}
/*-------------------------------------------------------------------------*/
@@ -2572,8 +2671,6 @@ class moderate
function multi_alter_topics($mod_action="", $sql="")
{
global $std, $ibforums, $DB, $print;
if ( ! $mod_action )
{
$this->moderate_error();
@@ -2603,9 +2700,9 @@ class moderate
if ( $mod_action != 'delete_topic' )
{
$this->ipsclass->DB->simple_exec_query( array( 'update' => 'topics', 'set' => $sql, 'where' => "tid IN(".implode(",",$this->tids).")" ) );
$this->ipsclass->DB->simple_exec_query( array( 'update' => 'topics', 'set' => $sql, 'where' => "tid IN(".implode(",",$this->tids).") AND state!='link'" ) );
$this->moderate_log("Îáúåäèíåíû òåìû ($sql) (".implode(",",$this->tids).")");
$this->moderate_log( sprintf( $this->ipsclass->lang['acp_altered_topics'], $sql, implode(",",$this->tids) ) );
}
else
@@ -2620,12 +2717,12 @@ class moderate
$this->modfunc->topic_move($this->tids, $this->forum['id'], $this->trash_forum);
$this->modfunc->forum_recount($this->trash_forum);
$this->moderate_log("Ïðèìåíåíà êîðçèíà äëÿ óäàëåíèÿ òåìû ñ id:".implode(",",$this->tids));
$this->moderate_log( $this->ipsclass->lang['acp_trashcan_topics']." ".implode(",",$this->tids) );
}
else
{
$this->modfunc->topic_delete($this->tids);
$this->moderate_log("Óäàëåíû òåìû (èõ ID: ".implode(",",$this->tids).")");
$this->moderate_log( sprintf( $this->ipsclass->lang['acp_deleted_topics'], implode(",",$this->tids) ) );
}
}
@@ -2732,8 +2829,8 @@ class moderate
$this->page_title = $this->topic['title'];
$this->nav = array ( "<a href='{$this->base_url}&act=SF&f={$this->forum['id']}'>{$this->forum['name']}</a>",
"<a href='{$this->base_url}&act=ST&f={$this->forum['id']}&t={$this->topic['tid']}'>{$this->topic['title']}</a>"
$this->nav = array ( "<a href='{$this->base_url}showforum={$this->forum['id']}'>{$this->forum['name']}</a>",
"<a href='{$this->base_url}showtopic={$this->topic['tid']}'>{$this->topic['title']}</a>"
);
}
@@ -2779,8 +2876,8 @@ class moderate
$this->page_title = $this->ipsclass->lang['mt_top']." ".$this->topic['title'];
$this->nav = array ( "<a href='{$this->base_url}&act=SF&f={$this->forum['id']}'>{$this->forum['name']}</a>",
"<a href='{$this->base_url}&act=ST&f={$this->forum['id']}&t={$this->topic['tid']}'>{$this->topic['title']}</a>"
$this->nav = array ( "<a href='{$this->base_url}showforum={$this->forum['id']}'>{$this->forum['name']}</a>",
"<a href='{$this->base_url}showtopic={$this->topic['tid']}'>{$this->topic['title']}</a>"
);
}
@@ -2875,9 +2972,20 @@ class moderate
}
else
{
$other_mgroups = array();
if( $this->ipsclass->member['mgroup_others'] )
{
$other_mgroups = explode( ",", $this->ipsclass->clean_perm_string( $this->ipsclass->member['mgroup_others'] ) );
}
$other_mgroups[] = $this->ipsclass->member['mgroup'];
$mgroups = implode( ",", $other_mgroups );
$this->ipsclass->DB->simple_construct( array( 'select' => 'mid',
'from' => 'moderators',
'where' => "forum_id=".$old_topic['forum_id']." AND (member_id='".$this->ipsclass->member['id']."' OR (is_group=1 AND group_id='".$this->ipsclass->member['mgroup']."'))" ) );
'where' => "forum_id=".$old_topic['forum_id']." AND (member_id='".$this->ipsclass->member['id']."' OR (is_group=1 AND group_id IN(".$mgroups.")))" ) );
$this->ipsclass->DB->simple_exec();
@@ -2989,9 +3097,9 @@ class moderate
$this->recount($old_topic['forum_id']);
}
$this->moderate_log("Îáúåäèíåíû: òåìà '{$old_topic['title']}' è '{$this->topic['title']}'");
$this->moderate_log( sprintf( $this->ipsclass->lang['acp_merged_topic'], $old_topic['title'], $this->topic['title'] ) );
$this->ipsclass->print->redirect_screen( $this->ipsclass->lang['mt_redirect'], "act=ST&f=".$this->forum['id']."&t=".$this->topic['tid'] );
$this->ipsclass->print->redirect_screen( $this->ipsclass->lang['mt_redirect'], "showtopic=".$this->topic['tid'] );
}
/*-------------------------------------------------------------------------*/
@@ -3041,8 +3149,8 @@ class moderate
$this->page_title = $this->ipsclass->lang['ts_title']." &gt; ".$this->topic['title'];
$this->nav = array ( "<a href='{$this->base_url}&act=SF&f={$this->forum['id']}'>{$this->forum['name']}</a>",
"<a href='{$this->base_url}&act=ST&f={$this->forum['id']}&t={$this->topic['tid']}'>{$this->topic['title']}</a>"
$this->nav = array ( "<a href='{$this->base_url}showforum={$this->forum['id']}'>{$this->forum['name']}</a>",
"<a href='{$this->base_url}showtopic={$this->topic['tid']}'>{$this->topic['title']}</a>"
);
}
@@ -3070,7 +3178,7 @@ class moderate
$this->ipsclass->DB->simple_exec_query( array( 'delete' => 'tracker', 'where' => "topic_id=".$this->topic['tid'] ) );
$this->ipsclass->print->redirect_screen( $this->ipsclass->lang['ts_redirect'], "act=ST&f=".$this->forum['id']."&t=".$this->topic['tid']."&st=".$this->ipsclass->input['st'] );
$this->ipsclass->print->redirect_screen( $this->ipsclass->lang['ts_redirect'], "showtopic=".$this->topic['tid']."&amp;st=".intval($this->ipsclass->input['st']) );
}
@@ -3118,8 +3226,8 @@ class moderate
$this->page_title = $this->ipsclass->lang['t_move'].": ".$this->topic['title'];
$this->nav = array ( "<a href='{$this->base_url}&act=SF&f={$this->forum['id']}'>{$this->forum['name']}</a>",
"<a href='{$this->base_url}&act=ST&f={$this->forum['id']}&t={$this->topic['tid']}'>{$this->topic['title']}</a>"
$this->nav = array ( "<a href='{$this->base_url}showforum={$this->forum['id']}'>{$this->forum['name']}</a>",
"<a href='{$this->base_url}showtopic={$this->topic['tid']}'>{$this->topic['title']}</a>"
);
}
@@ -3167,9 +3275,12 @@ class moderate
$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'move_same_forum' ) );
}
$source = intval($this->ipsclass->input['sf']);
$moveto = intval($this->ipsclass->input['move_id']);
//-----------------------------------------
$this->ipsclass->DB->simple_construct( array( 'select' => 'id, sub_can_post, name, redirect_on', 'from' => 'forums', 'where' => "id IN(".$this->ipsclass->input['sf'].",".$this->ipsclass->input['move_id'].")" ) );
$this->ipsclass->DB->simple_construct( array( 'select' => 'id, sub_can_post, name, redirect_on', 'from' => 'forums', 'where' => "id IN(".$source.",".$moveto.")" ) );
$this->ipsclass->DB->simple_exec();
if ($this->ipsclass->DB->get_num_rows() != 2)
@@ -3177,9 +3288,6 @@ class moderate
$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'move_no_forum' ) );
}
$source = intval($this->ipsclass->input['sf']);
$moveto = intval($this->ipsclass->input['move_id']);
$source_name = "";
$dest_name = "";
@@ -3218,7 +3326,7 @@ class moderate
$this->ipsclass->input['t'] = $this->topic['tid'];
$this->moderate_log("Òåìà ïåðåìåùåíà èç $source_name â $dest_name");
$this->moderate_log( sprintf( $this->ipsclass->lang['acp_moved_a_topic'], $source_name, $dest_name ) );
// Resync the forums..
@@ -3228,7 +3336,7 @@ class moderate
$this->modfunc->forum_recount($source);
$this->modfunc->forum_recount($moveto);
$this->ipsclass->print->redirect_screen( $this->ipsclass->lang['p_moved'], "act=SF&f=".$this->forum['id'] );
$this->ipsclass->print->redirect_screen( $this->ipsclass->lang['p_moved'], "showforum=".$this->forum['id'] );
}
/*-------------------------------------------------------------------------*/
@@ -3303,7 +3411,7 @@ class moderate
$this->modfunc->forum_recount( $this->forum['id'] );
}
$this->ipsclass->print->redirect_screen( $this->ipsclass->lang['post_deleted'], "act=ST&f=".$this->forum['id']."&t=".$this->topic['tid']."&st=".$this->ipsclass->input['st'] );
$this->ipsclass->print->redirect_screen( $this->ipsclass->lang['post_deleted'], "showtopic=".$this->topic['tid']."&amp;st=".intval($this->ipsclass->input['st']) );
}
/*-------------------------------------------------------------------------*/
@@ -3356,8 +3464,8 @@ class moderate
$this->page_title = $this->ipsclass->lang['t_delete'].": ".$this->topic['title'];
$this->nav = array ( "<a href='{$this->base_url}&act=SF&f={$this->forum['id']}'>{$this->forum['name']}</a>",
"<a href='{$this->base_url}&act=ST&f={$this->forum['id']}&t={$this->topic['tid']}'>{$this->topic['title']}</a>"
$this->nav = array ( "<a href='{$this->base_url}showforum={$this->forum['id']}'>{$this->forum['name']}</a>",
"<a href='{$this->base_url}showtopic={$this->topic['tid']}'>{$this->topic['title']}</a>"
);
}
@@ -3422,15 +3530,15 @@ class moderate
$this->modfunc->forum_recount($this->forum['id']);
$this->modfunc->forum_recount($this->trash_forum);
$this->moderate_log("Ïðèìåíåíà êîðçèíà äëÿ óäàëåíèÿ òåìû ñ íîìåðîì id:".$this->topic['tid']);
$this->moderate_log("{$this->ipsclass->lang['acp_trashcan_a_topic']} ".$this->topic['tid']);
}
else
{
$this->modfunc->topic_delete($this->topic['tid']);
$this->moderate_log("Òåìà óäàëåíà");
$this->moderate_log( $this->ipsclass->lang['acp_deleted_a_topic'] );
}
$this->ipsclass->print->redirect_screen( $this->ipsclass->lang['p_deleted'], "act=SF&f=".$this->forum['id'] );
$this->ipsclass->print->redirect_screen( $this->ipsclass->lang['p_deleted'], "showforum=".$this->forum['id'] );
}
/*-------------------------------------------------------------------------*/
@@ -3473,8 +3581,8 @@ class moderate
$this->page_title = $this->ipsclass->lang['t_edit'].": ".$this->topic['title'];
$this->nav = array ( "<a href='{$this->base_url}&act=SF&f={$this->forum['id']}'>{$this->forum['name']}</a>",
"<a href='{$this->base_url}&act=ST&f={$this->forum['id']}&t={$this->topic['tid']}'>{$this->topic['title']}</a>"
$this->nav = array ( "<a href='{$this->base_url}showforum={$this->forum['id']}'>{$this->forum['name']}</a>",
"<a href='{$this->base_url}showtopic={$this->topic['tid']}'>{$this->topic['title']}</a>"
);
}
@@ -3512,8 +3620,8 @@ class moderate
$this->ipsclass->Error( array( 'LEVEL' => 2, 'MSG' => 'no_topic_title' ) );
}
$topic_title = preg_replace( "/'/", "/\\'/", $this->ipsclass->input['TopicTitle'] );
$topic_desc = preg_replace( "/'/", "/\\'/", $this->ipsclass->input['TopicDesc'] );
$topic_title = str_replace( "'", "\\\'", $this->ipsclass->input['TopicTitle'] );
$topic_desc = str_replace( "'", "\\\'", $this->ipsclass->input['TopicDesc'] );
$this->ipsclass->DB->do_update( 'topics', array( 'title' => $topic_title, 'description' => $topic_desc ), 'tid='.$this->topic['tid'] );
@@ -3522,11 +3630,16 @@ class moderate
$this->ipsclass->DB->do_update( 'forums', array( 'last_title' => $topic_title ), 'id='.$this->forum['id'] );
}
if ($this->topic['tid'] == $this->forum['newest_id'])
{
$this->ipsclass->DB->do_update( 'forums', array( 'newest_title' => $topic_title ), 'id='.$this->forum['id'] );
}
$this->ipsclass->update_forum_cache();
$this->moderate_log("Ìîäåðàòîð èçìåíèë çàãîëîâîê òåìû: (ID: {$this->topic['tid']}) èç '{$this->topic['title']}' â '$topic_title'");
$this->moderate_log( sprintf( $this->ipsclass->lang['acp_edit_title'], $this->topic['tid'], $this->topic['title'], $topic_title ) );
$this->ipsclass->print->redirect_screen( $this->ipsclass->lang['p_edited'], "act=SF&f=".$this->forum['id'] );
$this->ipsclass->print->redirect_screen( $this->ipsclass->lang['p_edited'], "showforum=".$this->forum['id'] );
}
/*-------------------------------------------------------------------------*/
@@ -3569,9 +3682,9 @@ class moderate
$this->modfunc->topic_open($this->topic['tid']);
$this->moderate_log("Òåìà îòêðûòà");
$this->moderate_log( $this->ipsclass->lang['acp_opened_topic'] );
$this->ipsclass->print->redirect_screen( $this->ipsclass->lang['p_opened'], "act=ST&f=".$this->forum['id']."&t=".$this->topic['tid']."&st=".$this->ipsclass->input['st'] );
$this->ipsclass->print->redirect_screen( $this->ipsclass->lang['p_opened'], "showtopic=".$this->topic['tid']."&amp;st=".intval($this->ipsclass->input['st']) );
}
/*-------------------------------------------------------------------------*/
@@ -3609,9 +3722,9 @@ class moderate
$this->modfunc->topic_close($this->topic['tid']);
$this->moderate_log("Òåìà çàêðûòà");
$this->moderate_log( $this->ipsclass->lang['acp_locked_topic'] );
$this->ipsclass->print->redirect_screen( $this->ipsclass->lang['p_closed'], "act=SF&f=".$this->forum['id'] );
$this->ipsclass->print->redirect_screen( $this->ipsclass->lang['p_closed'], "showforum=".$this->forum['id'] );
}
/*-------------------------------------------------------------------------*/
@@ -3644,9 +3757,9 @@ class moderate
$this->modfunc->topic_pin($this->topic['tid']);
$this->moderate_log("Òåìà &laquo;ïîäíÿòà&raquo;");
$this->moderate_log( $this->ipsclass->lang['acp_pinned_topic'] );
$this->ipsclass->print->redirect_screen( $this->ipsclass->lang['p_pinned'], "showtopic=".$this->topic['tid']."&st=".$this->ipsclass->input['st'] );
$this->ipsclass->print->redirect_screen( $this->ipsclass->lang['p_pinned'], "showtopic=".$this->topic['tid']."&amp;st=".intval($this->ipsclass->input['st']) );
}
@@ -3680,9 +3793,9 @@ class moderate
$this->modfunc->topic_unpin($this->topic['tid']);
$this->moderate_log("Òåìà &laquo;îïóùåíà&raquo;");
$this->moderate_log( $this->ipsclass->lang['acp_unpinned_topic'] );
$this->ipsclass->print->redirect_screen( $this->ipsclass->lang['p_unpinned'], "act=ST&f=".$this->forum['id']."&t=".$this->topic['tid']."&st=".$this->ipsclass->input['st'] );
$this->ipsclass->print->redirect_screen( $this->ipsclass->lang['p_unpinned'], "showtopic=".$this->topic['tid']."&amp;st=".intval($this->ipsclass->input['st']) );
}
/*-------------------------------------------------------------------------*/
@@ -3697,11 +3810,11 @@ class moderate
if ( count($ids) < 1 )
{
$this->moderate_error('cp_err_no_topics');
$this->moderate_error('cp_error_no_topics');
return;
}
$ids = $this->ipsclass->clean_int_array( $ids );
$ids = $this->ipsclass->clean_int_array( $ids );
return $ids;
}
@@ -3718,11 +3831,11 @@ class moderate
if ( count($ids) < 1 )
{
$this->moderate_error('cp_err_no_topics');
$this->moderate_error('cp_error_no_topics');
return;
}
$ids = $this->ipsclass->clean_int_array( $ids );
$ids = $this->ipsclass->clean_int_array( $ids );
return $ids;
}
@@ -3746,8 +3859,6 @@ class moderate
function moderate_log($title = 'unknown')
{
global $HTTP_REFERER, $QUERY_STRING;
$this->modfunc->add_moderate_log( $this->ipsclass->input['f'], $this->ipsclass->input['t'], $this->ipsclass->input['p'], $this->topic['title'], $title );
}
@@ -3784,7 +3895,7 @@ class moderate
if ( count( $additional_tags ) )
{
foreach( $additional_tags as $k => $v )
foreach( $additional_tags as $v )
{
$form .= "\n<input type='hidden' name='{$v[0]}' value='{$v[1]}'>";
}
+71 -44
View File
@@ -2,27 +2,17 @@
/*
+--------------------------------------------------------------------------
| Invision Power Board 2.1.7
| Invision Power Board
| =============================================
| by Matthew Mecham
| (c) 2001 - 2005 Invision Power Services, Inc.
| (c) 2001 - 2006 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 $
| > $Date: 2006-09-22 11:28:54 +0100 (Fri, 22 Sep 2006) $
| > $Revision: 567 $
| > $Author: matt $
+---------------------------------------------------------------------------
|
@@ -39,7 +29,7 @@
if ( ! defined( 'IN_IPB' ) )
{
print "<h1>Íåêîððåêòíûé àäðåñ</h1>Âû íå èìååòå äîñòóïà ê ýòîìó ôàéëó íàïðÿìóþ. Åñëè âû íåäàâíî îáíîâëÿëè ôîðóì, âû äîëæíû îáíîâèòü âñå ñîîòâåòñòâóþùèå ôàéëû.";
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
exit();
}
@@ -70,7 +60,7 @@ class online
// Are we allowed to see the online list?
//-----------------------------------------
$this->ipsclass->input['st'] = intval($this->ipsclass->input['st']);
$this->ipsclass->input['st'] = intval($this->ipsclass->input['st']) >=0 ? intval($this->ipsclass->input['st']) : 0;
if ( $this->ipsclass->vars['allow_online_list'] != 1 )
{
@@ -119,7 +109,7 @@ class online
//-----------------------------------------
$this->ipsclass->print->add_output("$this->output");
$this->ipsclass->print->do_output( array( 'TITLE' => $this->page_title, 'JS' => 0, NAV => $this->nav ) );
$this->ipsclass->print->do_output( array( 'TITLE' => $this->page_title, 'JS' => 0, 'NAV' => $this->nav ) );
}
@@ -135,7 +125,7 @@ class online
// INIT
//-----------------------------------------
$this->first = intval($this->ipsclass->input['st']);
$this->first = intval($this->ipsclass->input['st']) > 0 ? intval($this->ipsclass->input['st']) : 0;
$show_mem_html = "";
$sort_order_html = "";
$sort_key_html = "";
@@ -150,10 +140,23 @@ class online
$sort_order = array( 'desc', 'asc' );
$sort_key = array( 'click', 'name' );
$show_mem_value = $this->ipsclass->input['show_mem'] ? $this->ipsclass->input['show_mem'] : 'all';
$sort_order_value = $this->ipsclass->input['sort_order'] ? $this->ipsclass->input['sort_order'] : 'desc';
$sort_key_value = $this->ipsclass->input['sort_key'] ? $this->ipsclass->input['sort_key'] : 'click';
$show_mem_value = (isset($this->ipsclass->input['show_mem']) AND $this->ipsclass->input['show_mem']) ? $this->ipsclass->input['show_mem'] : 'all';
$sort_order_value = (isset($this->ipsclass->input['sort_order']) AND $this->ipsclass->input['sort_order']) ? $this->ipsclass->input['sort_order'] : 'desc';
$sort_key_value = (isset($this->ipsclass->input['sort_key']) AND $this->ipsclass->input['sort_key']) ? $this->ipsclass->input['sort_key'] : 'click';
//-----------------------------------------
// Get member groups
//-----------------------------------------
$our_mgroups = array();
if( $this->ipsclass->member['mgroup_others'] )
{
$our_mgroups = explode( ",", $this->ipsclass->clean_perm_string( $this->ipsclass->member['mgroup_others'] ) );
}
$our_mgroups[] = $this->ipsclass->member['mgroup'];
//-----------------------------------------
// Build lists
//-----------------------------------------
@@ -207,11 +210,11 @@ class online
$db_order = $sort_order_value == 'asc' ? 'asc' : 'desc';
$db_key = $sort_key_value == 'click' ? 'running_time' : 'member_name';
switch ($show_mem_value)
{
case 'reg':
$db_mem = " AND s.member_id != 0 AND s.member_group <> {$this->ipsclass->vars['guest_group']}";
$db_mem = " AND s.member_id <> 0 AND s.member_group <> {$this->ipsclass->vars['guest_group']}";
break;
case 'guest':
$db_mem = " AND s.member_group = {$this->ipsclass->vars['guest_group']} ";
@@ -221,7 +224,27 @@ class online
break;
}
$max = $this->ipsclass->DB->simple_exec_query( array( 'select' => 'COUNT(*) as total_sessions', 'from' => 'sessions s', 'where' => "running_time > $t_time".$db_mem ) );
$remove_spiders = 0;
if ( $this->ipsclass->vars['spider_anon'] )
{
if ( !in_array( $this->ipsclass->vars['admin_group'], $our_mgroups ) )
{
$remove_spiders = 1;
}
}
$remove_anon = 1;
if ( (in_array( $this->ipsclass->vars['admin_group'], $our_mgroups )) and ($this->ipsclass->vars['disable_admin_anon'] != 1) )
{
$remove_anon = 0;
}
$this->ipsclass->DB->cache_add_query( 'session_get_count', array( 'time' => $t_time, 'db_mem' => $db_mem, 'remove_anon' => $remove_anon, 'remove_spiders' => $remove_spiders ) );
$this->ipsclass->DB->cache_exec_query();
$max = $this->ipsclass->DB->fetch_row();
$links = $this->ipsclass->build_pagelinks( array( 'TOTAL_POSS' => $max['total_sessions'],
'PER_PAGE' => 25,
@@ -238,19 +261,19 @@ class online
// Grab all the current sessions.
//-----------------------------------------
$this->ipsclass->DB->simple_construct( array( 'select' => '*',
'from' => 'sessions s',
'where' => "s.running_time > $t_time $db_mem",
'order' => "$db_key $db_order",
'limit' => array( $this->first, 25 )
) );
$this->ipsclass->DB->simple_exec();
$this->ipsclass->DB->cache_add_query( 'session_get_sessions', array( 'time' => $t_time, 'db_mem' => $db_mem, 'remove_anon' => $remove_anon, 'remove_spiders' => $remove_spiders,
'db_key' => $db_key, 'db_order' => $db_order, 'start' => $this->first, 'finish' => 25 ) );
$outer = $this->ipsclass->DB->cache_exec_query();
while( $r = $this->ipsclass->DB->fetch_row() )
if( !$this->ipsclass->DB->get_num_rows($outer) && $this->first > 0 )
{
$r['prefix'] = $this->ipsclass->cache['group_cache'][ $r['member_group'] ]['prefix'];
$r['suffix'] = $this->ipsclass->cache['group_cache'][ $r['member_group'] ]['suffix'];
// We are request page 2 - but there is no page 2 now...
$this->ipsclass->boink_it( $this->ipsclass->base_url."act=Online&amp;sortkey={$sort_key_value}&amp;show_mem={$show_mem_value}&amp;sort_order={$sort_order_value}" );
}
while( $r = $this->ipsclass->DB->fetch_row($outer) )
{
$r['member_name'] = $this->ipsclass->make_name_formatted( $r['member_name'], $r['member_group'] );
$final[ $r['id'] ] = $r;
@@ -324,7 +347,7 @@ class online
// LOOPY
//-----------------------------------------
foreach( $final as $idx => $sess )
foreach( $final as $sess )
{
//-----------------------------------------
// Is this a member, and have we seen them before?
@@ -341,7 +364,7 @@ class online
if ( $this->ipsclass->vars['spider_anon'] )
{
if ( $this->ipsclass->member['mgroup'] == $this->ipsclass->vars['admin_group'] )
if ( in_array( $this->ipsclass->vars['admin_group'], $our_mgroups ) )
{
$inv = '*';
}
@@ -355,7 +378,7 @@ class online
}
else if ($sess['login_type'] == 1)
{
if ( ($this->ipsclass->member['mgroup'] == $this->ipsclass->vars['admin_group']) and ($this->ipsclass->vars['disable_admin_anon'] != 1) )
if ( (in_array( $this->ipsclass->vars['admin_group'], $our_mgroups )) and ($this->ipsclass->vars['disable_admin_anon'] != 1) )
{
$inv = '*';
}
@@ -401,7 +424,7 @@ class online
// PARSED?
//-----------------------------------------
if ( $sess['_parsed'] )
if ( isset($sess['_parsed']) AND $sess['_parsed'] )
{
$line = "<a href='{$sess['_url']}'>{$sess['_text']}</a>";
}
@@ -473,7 +496,7 @@ class online
$sess['where_line'] = $line;
if ( ($this->ipsclass->member['mgroup'] == $this->ipsclass->vars['admin_group']) and ($this->ipsclass->vars['disable_online_ip'] != 1) )
if ( (in_array( $this->ipsclass->vars['admin_group'], $our_mgroups )) and ($this->ipsclass->vars['disable_online_ip'] != 1) )
{
$sess['ip_address'] = " ( ".$sess['ip_address']." )";
}
@@ -482,9 +505,13 @@ class online
$sess['ip_address'] = "";
}
if ( ($sess['member_id']) )
if ( $sess['member_id'] )
{
$sess['member_name'] = "<a href='{$this->base_url}showuser={$sess['member_id']}'>{$sess['prefix']}{$sess['member_name']}{$sess['suffix']}</a>$inv {$sess['ip_address']}";
$sess['member_name'] = "<a href='{$this->base_url}showuser={$sess['member_id']}'>{$sess['member_name']}</a>{$inv} {$sess['ip_address']}";
}
else if( isset($sess['is_bot']) AND $sess['is_bot'] )
{
$sess['member_name'] = $sess['member_name'].$inv;
}
$sess['running_time'] = $this->ipsclass->get_date( $sess['running_time'], 'LONG' );
@@ -511,9 +538,9 @@ class online
}
else
{
if ( ! $sess['is_bot'] )
if ( !isset($sess['is_bot']) OR !$sess['is_bot'] )
{
$sess['member_name'] = $sess['prefix'].$this->ipsclass->lang['guest'].$sess['suffix']." ".$sess['ip_address'];
$sess['member_name'] = $this->ipsclass->lang['guest']." ".$sess['ip_address'];
$sess['msg_icon'] = '&nbsp;';
}
else
@@ -1,24 +1,14 @@
<?php
/*
+--------------------------------------------------------------------------
| Invision Power Board 2.1.7
| =============================================
| Invision Power Board
| ========================================
| by Matthew Mecham
| (c) 2001 - 2005 Invision Power Services, Inc.
| (c) 2001 - 2005 Invision Power Services
| 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)
| Email: matt@invisionpower.com
+---------------------------------------------------------------------------
| INVISION POWER BOARD IS NOT FREE SOFTWARE!
| http://www.invisionboard.com/?license
@@ -152,7 +142,7 @@ class paysubscriptions
$this->output .= $this->ipsclass->compiled_templates['skin_ucp']->CP_end();
$this->output .= $this->ipsclass->compiled_templates['skin_ucp']->forum_jump($fj, $links);
$this->output .= $this->ipsclass->compiled_templates['skin_ucp']->forum_jump( $fj );
}
else
{
@@ -163,6 +153,8 @@ class paysubscriptions
// Any special message?
//--------------------------------------
$this->ipsclass->input['msgtype'] = isset($this->ipsclass->input['msgtype']) ? $this->ipsclass->input['msgtype'] : '';
if ( $this->ipsclass->input['msgtype'] == 'fromreg' )
{
$msg = $this->ipsclass->compiled_templates['skin_subscriptions']->sub_msg_fromreg();
@@ -189,7 +181,7 @@ class paysubscriptions
$this->nav[] = "<a href='".$this->ipsclass->base_url."act=paysubs&amp;CODE=index'>".$this->ipsclass->lang['s_page_title']."</a>";
$this->ipsclass->print->add_output( $this->output );
$this->ipsclass->print->do_output( array( 'TITLE' => $this->ipsclass->lang['s_page_title'], 'JS' => 1, NAV => $this->nav ) );
$this->ipsclass->print->do_output( array( 'TITLE' => $this->ipsclass->lang['s_page_title'], 'JS' => 1, 'NAV' => $this->nav ) );
}
@@ -274,17 +266,11 @@ class paysubscriptions
$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'subs_nomethod_selected' ) );
}
$this->ipsclass->DB->query("SELECT * FROM ibf_subscription_methods WHERE submethod_id=$method_chosen");
$method = $this->ipsclass->DB->build_and_exec_query( array( 'select' => '*', 'from' => 'subscription_methods', 'where' => "submethod_id={$method_chosen}" ) );
$method = $this->ipsclass->DB->fetch_row();
$subs = $this->ipsclass->DB->build_and_exec_query( array( 'select' => '*', 'from' => 'subscriptions', 'where' => "sub_id={$sub_chosen}" ) );
$this->ipsclass->DB->query("SELECT * FROM ibf_subscriptions WHERE sub_id=$sub_chosen");
$subs = $this->ipsclass->DB->fetch_row();
$this->ipsclass->DB->query("SELECT * FROM ibf_subscription_extra WHERE subextra_sub_id=$sub_chosen AND subextra_method_id=$method_chosen");
$extra = $this->ipsclass->DB->fetch_row();
$extra = $this->ipsclass->DB->build_and_exec_query( array( 'select' => '*', 'from' => 'subscription_extra', 'where' => "subextra_sub_id={$sub_chosen} AND subextra_method_id={$method_chosen}" ) );
//---------------------------------------------
// INIT Load Payment handler
@@ -309,9 +295,7 @@ class paysubscriptions
if ( $upgrade )
{
$this->ipsclass->DB->query("SELECT * FROM ibf_subscriptions WHERE sub_id=$cur_id");
$current = $this->ipsclass->DB->fetch_row();
$current = $this->ipsclass->DB->build_and_exec_query( array( 'select' => '*', 'from' => 'subscriptions', 'where' => "sub_id={$cur_id}" ) );
if ( $method['submethod_name'] == 'manual' )
{
@@ -341,9 +325,9 @@ class paysubscriptions
function do_payment_method()
{
$cur_id = intval($this->ipsclass->input['curid']);
$upgrade = intval($this->ipsclass->input['upgrade']);
$sub_chosen = intval($this->ipsclass->input['sub']);
$cur_id = isset($this->ipsclass->input['curid']) ? intval($this->ipsclass->input['curid']) : 0;
$upgrade = isset($this->ipsclass->input['upgrade']) ? intval($this->ipsclass->input['upgrade']) : 0;
$sub_chosen = isset($this->ipsclass->input['sub']) ? intval($this->ipsclass->input['sub']) : 0;
$subs = array();
$upg_methods = array();
$all_methods = array();
@@ -357,7 +341,8 @@ class paysubscriptions
// Get all packages
//--------------------------------------------
$this->ipsclass->DB->query("SELECT * FROM ibf_subscriptions ORDER BY sub_cost");
$this->ipsclass->DB->build_query( array( 'select' => '*', 'from' => 'subscriptions', 'order' => 'sub_cost' ) );
$this->ipsclass->DB->exec_query();
while ( $s = $this->ipsclass->DB->fetch_row() )
{
@@ -387,7 +372,8 @@ class paysubscriptions
// We're upgrading!! Yay! - Get cur subs
//--------------------------------------------
$this->ipsclass->DB->query("SELECT * FROM ibf_subscription_trans WHERE subtrans_member_id={$this->ipsclass->member['id']} AND subtrans_sub_id=$cur_id AND subtrans_state='paid'");
$this->ipsclass->DB->build_query( array( 'select' => '*', 'from' => 'subscription_trans', 'where' => "subtrans_member_id={$this->ipsclass->member['id']} AND subtrans_sub_id={$cur_id} AND subtrans_state='paid'" ) );
$this->ipsclass->DB->exec_query();
if ( ! $cur_trans = $this->ipsclass->DB->fetch_row() )
{
@@ -417,12 +403,17 @@ class paysubscriptions
$end_date = ( $subs[ $sub_chosen ]['sub_unit'] == 'x' or $subs[ $cur_id ]['sub_unit'] == 'x' )
? $this->ipsclass->lang['no_expire']
: $this->ipsclass->get_date( $cur_trans['subtrans_end_date'], 'JOINED' );
$new_date = ( $sub_upgrade['sub_unit'] == 'x' or $sub_current['sub_unit'] == 'x' )
? $this->ipsclass->lang['no_expire']
: $this->ipsclass->get_date( ( $cur_trans['subtrans_end_date'] - ($subs[ $cur_trans['subtrans_sub_id'] ]['sub_length'] * $this->day_to_seconds[$subs[ $cur_trans['subtrans_sub_id'] ]['sub_unit']]) + ($subs[ $sub_chosen ]['sub_length'] * $this->day_to_seconds[$subs[ $sub_chosen ]['sub_unit']])) , 'JOINED' );
$this->ipsclass->lang['sc_upgrade_string'] = sprintf( $this->ipsclass->lang['sc_upgrade_string'],
$subs[ $cur_trans['subtrans_sub_id'] ]['sub_title'],
$subs[ $sub_chosen ]['sub_title'],
$end_date,
sprintf( "%.2f", $balance * $this->gateway->cho_currency['subcurrency_exchange'] ) . ' '.$this->gateway->cho_currency['subcurrency_code']
sprintf( "%.2f", $balance * $this->gateway->cho_currency['subcurrency_exchange'] ) . ' '.$this->gateway->cho_currency['subcurrency_code'],
$new_date
);
$this->output .= $this->ipsclass->compiled_templates['skin_subscriptions']->sub_two_upgrade_summary();
@@ -479,7 +470,8 @@ class paysubscriptions
// Get all packages
//--------------------------------------------
$this->ipsclass->DB->query("SELECT * FROM ibf_subscriptions ORDER BY sub_cost");
$this->ipsclass->DB->build_query( array( 'select' => '*', 'from' => 'subscriptions', 'order' => 'sub_cost' ) );
$this->ipsclass->DB->exec_query();
while ( $s = $this->ipsclass->DB->fetch_row() )
{
@@ -490,7 +482,8 @@ class paysubscriptions
// Get all transactions with our memberid
//--------------------------------------------
$this->ipsclass->DB->query("SELECT * FROM ibf_subscription_trans WHERE subtrans_member_id={$this->ipsclass->member['id']}");
$this->ipsclass->DB->build_query( array( 'select' => '*', 'from' => 'subscription_trans', 'where' => "subtrans_member_id={$this->ipsclass->member['id']}" ) );
$this->ipsclass->DB->exec_query();
while ( $r = $this->ipsclass->DB->fetch_row() )
{
@@ -595,7 +588,8 @@ class paysubscriptions
// have anywhere to go (ie. we're not on the top tier)
//--------------------------------------------
$this->ipsclass->DB->query("SELECT * FROM ibf_subscriptions WHERE sub_cost > $max_cost ORDER BY sub_cost");
$this->ipsclass->DB->build_query( array( 'select' => '*', 'from' => 'subscriptions', 'where' => "sub_cost > {$max_cost}", 'order' => 'sub_cost' ) );
$this->ipsclass->DB->exec_query();
if ( $this->ipsclass->DB->get_num_rows() )
{
@@ -605,7 +599,9 @@ class paysubscriptions
while ( $row = $this->ipsclass->DB->fetch_row() )
{
$end_date = ($row['sub_unit'] == 'x' or $max_end == 'x') ? $this->ipsclass->lang['no_expire'] : $this->ipsclass->get_date( $max_data['subtrans_end_date'], 'JOINED', 1 );
$date = ($max_data['subtrans_end_date'] - ($subs[ $cdata['subtrans_sub_id'] ]['sub_length'] * $this->day_to_seconds[$max_end]) + ($row['sub_length'] * $this->day_to_seconds[$row['sub_unit']]) );
$end_date = ($row['sub_unit'] == 'x' or $max_end == 'x') ? $this->ipsclass->lang['no_expire'] : $this->ipsclass->get_date( $date, 'JOINED', 1 );
$this->output .= $this->ipsclass->compiled_templates['skin_subscriptions']->sub_choose_upgrade_row( $row['sub_id'],
$row['sub_title'],
@@ -633,7 +629,7 @@ class paysubscriptions
$this->output .= $this->ipsclass->compiled_templates['skin_subscriptions']->sub_choose_new_top($this->gateway->cho_currency['subcurrency_code']);
foreach( $subs as $id => $row )
foreach( $subs as $row )
{
$duration = $row['sub_length'];
@@ -659,7 +655,7 @@ class paysubscriptions
$this->output .= $this->ipsclass->compiled_templates['skin_subscriptions']->sub_choose_new_bottom();
}
$this->output .= $this->ipsclass->compiled_templates['skin_subscriptions']->sub_currency_change_form( $this->_make_currency_dropdown(), $this->ipsclass->base_url.'act=paysubs&CODE=index' );
$this->output .= $this->ipsclass->compiled_templates['skin_subscriptions']->sub_currency_change_form( $this->_make_currency_dropdown(), $this->ipsclass->base_url.'act=paysubs&amp;CODE=index' );
$this->output .= $this->ipsclass->compiled_templates['skin_subscriptions']->sub_page_bottom();
}
@@ -696,8 +692,9 @@ class paysubscriptions
// INIT da func
//-----------------------------------------
$this->lib = new func_usercp($this);
$this->lib = new func_usercp();
$this->lib->ipsclass =& $this->ipsclass;
$this->lib->class =& $this;
//-----------------------------------------
// Print menu
@@ -715,13 +712,14 @@ class paysubscriptions
{
$curr_box = $this->ipsclass->compiled_templates['skin_subscriptions']->sub_currency_change_top();
$this->ipsclass->DB->query("SELECT * FROM ibf_subscription_currency");
$this->ipsclass->DB->build_query( array( 'select' => '*', 'from' => 'subscription_currency' ) );
$this->ipsclass->DB->exec_query();
while ( $c = $this->ipsclass->DB->fetch_row() )
{
$default = "";
if ( $this->ipsclass->input['currency'] )
if ( isset($this->ipsclass->input['currency']) AND $this->ipsclass->input['currency'] )
{
if ( $this->ipsclass->input['currency'] == $c['subcurrency_code'] )
{
@@ -800,12 +798,14 @@ class paysubscriptions
$sub_id = intval( $this->ipsclass->input['sid'] );
$tick_id = intval( $this->ipsclass->input['tickid'] );
$upgrade = intval( $this->ipsclass->input['upgrade'] );
$sub_title_extra = "";
//---------------------------------------
// Check for pending subscription
//---------------------------------------
$this->ipsclass->DB->query("SELECT * FROM ibf_subscription_trans WHERE subtrans_member_id={$this->ipsclass->member['id']} AND subtrans_state='pending' AND subtrans_end_date > ".time() );
$this->ipsclass->DB->build_query( array( 'select' => '*', 'from' => 'subscription_trans', 'where' => "subtrans_member_id={$this->ipsclass->member['id']} AND subtrans_state='pending' AND subtrans_end_date > ".time() ) );
$this->ipsclass->DB->exec_query();
if ( $trx = $this->ipsclass->DB->fetch_row() )
{
@@ -818,13 +818,16 @@ class paysubscriptions
$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'subs_fail', 'EXTRA' => 'no_curid' ) );
}
$this->ipsclass->DB->query("SELECT * FROM ibf_subscriptions WHERE sub_id=$sub_id");
$this->ipsclass->DB->build_query( array( 'select' => '*', 'from' => 'subscriptions', 'where' => "sub_id={$sub_id}" ) );
$this->ipsclass->DB->exec_query();
if ( ! $sub = $this->ipsclass->DB->fetch_row() )
{
$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'subs_fail', 'EXTRA' => 'no_curid' ) );
}
$old_group = ($sub[ 'sub_new_group' ] > 0) ? $this->ipsclass->member['mgroup'] : 0;
//-------------------------
// start array
//-------------------------
@@ -832,7 +835,7 @@ class paysubscriptions
$use_meh = array(
'subtrans_sub_id' => $sub_id,
'subtrans_member_id' => $this->ipsclass->member['id'],
'subtrans_old_group' => $this->ipsclass->member['mgroup'],
'subtrans_old_group' => $old_group,
'subtrans_paid' => $sub['sub_cost'],
'subtrans_cumulative' => $sub['sub_cost'],
'subtrans_method' => 'manual',
@@ -857,7 +860,16 @@ class paysubscriptions
$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'subs_fail', 'EXTRA' => 'no_curid' ) );
}
$this->ipsclass->DB->query("SELECT * FROM ibf_subscription_trans WHERE subtrans_id=$tick_id");
$this->ipsclass->DB->build_query( array( 'select' => 't.*',
'from' => array( 'subscription_trans' => 't' ),
'where' => "t.subtrans_id={$tick_id}",
'add_join' => array( array( 'type' => 'left',
'select' => 's.sub_length, s.sub_unit',
'from' => array( 'subscriptions' => 's' ),
'where' => 's.sub_id=t.subtrans_sub_id'
) )
) );
$this->ipsclass->DB->exec_query();
if ( ! $trans = $this->ipsclass->DB->fetch_row() )
{
@@ -870,9 +882,10 @@ class paysubscriptions
unset($use_meh['sub_start_date']);
unset($use_meh['sub_end_date']);
$dbs = $this->ipsclass->DB->compile_db_update_string($use_meh);
$use_meh['sub_end_date'] = $trans['subtrans_end_date'] + ( $sub['sub_length'] * $this->day_to_seconds[ $sub['sub_unit'] ] );
$use_meh['sub_end_date'] -= ($trans['sub_length'] * $this->day_to_seconds[ $trans['sub_unit'] ] );
$this->ipsclass->DB->query("UPDATE ibf_subscription_trans SET $dbs, subtrans_cumulative=subtrans_cumulative+{$sub['sub_cost']} WHERE subtrans_id=$tick_id");
$this->ipsclass->DB->do_update( 'subscription_trans', array_merge( $use_meh, array( 'subtrans_cumulative' => "subtrans_cumulative+{$sub['sub_cost']}" ) ), "subtrans_id={$tick_id}" );
$sub_title_extra = '('. $this->ipsclass->lang['gw_upgrade'] .')';
@@ -885,7 +898,7 @@ class paysubscriptions
$dbs = $this->ipsclass->DB->compile_db_insert_string($use_meh);
$this->ipsclass->DB->query("INSERT INTO ibf_subscription_trans ({$dbs['FIELD_NAMES']}) VALUES({$dbs['FIELD_VALUES']})");
$this->ipsclass->DB->do_insert( 'subscription_trans', $use_meh );
$tick_id = $this->ipsclass->DB->get_insert_id();
@@ -948,8 +961,6 @@ class paysubscriptions
function _show_manual_upgrade($sub_current, $sub_upgrade, $pay_method, $extra)
{
global $ibforums, $std, $DB;
//---------------------------------------
// Check we can do upgrades
//---------------------------------------
@@ -981,8 +992,9 @@ class paysubscriptions
// We're upgrading!! Yay! - Get cur subs
//--------------------------------------------
$this->ipsclass->DB->query("SELECT * FROM ibf_subscription_trans WHERE subtrans_member_id={$this->ipsclass->member['id']} AND subtrans_sub_id={$sub_current['sub_id']} AND subtrans_state='paid'");
$this->ipsclass->DB->build_query( array( 'select' => '*', 'from' => 'subscription_trans', 'where' => "subtrans_member_id={$this->ipsclass->member['id']} AND subtrans_sub_id={$sub_current['sub_id']} AND subtrans_state='paid'" ) );
$this->ipsclass->DB->exec_query();
if ( ! $cur_trans = $this->ipsclass->DB->fetch_row() )
{
$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'subs_no_curid' ) );
@@ -998,11 +1010,16 @@ class paysubscriptions
? $this->ipsclass->lang['no_expire']
: $this->ipsclass->get_date( $cur_trans['subtrans_end_date'], 'JOINED' );
$new_date = ( $sub_upgrade['sub_unit'] == 'x' or $sub_current['sub_unit'] == 'x' )
? $this->ipsclass->lang['no_expire']
: $this->ipsclass->get_date( ( $cur_trans['subtrans_end_date'] - ($sub_current['sub_length'] * $this->day_to_seconds[$sub_current['sub_unit']]) + ($sub_upgrade['sub_length'] * $this->day_to_seconds[$sub_upgrade['sub_unit']])) , 'JOINED' );
$this->ipsclass->lang['sc_upgrade_string'] = sprintf( $this->ipsclass->lang['sc_upgrade_string'],
$sub_current['sub_title'],
$sub_upgrade['sub_title'],
$end_date,
'&#036;'.$balance
'&#036;'.$balance,
$new_date
);
$this->ipsclass->lang['post_manual_more'] = sprintf( $this->ipsclass->lang['post_manual_more'],
@@ -1019,10 +1036,6 @@ class paysubscriptions
$cur_trans['subtrans_id'],
$this->ipsclass->lang['sc_upgrade_string']
);
}
+9 -18
View File
@@ -2,24 +2,15 @@
/*
+--------------------------------------------------------------------------
| Invision Power Board 2.1.7
| =============================================
| Invision Power Board
| ========================================
| by Matthew Mecham
| (c) 2001 - 2005 Invision Power Services, Inc.
| (c) 2001 - 2004 Invision Power Services
| 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
| Email: matt@invisionpower.com
| 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)
+---------------------------------------------------------------------------
|
| > IPB Portal Core Module
@@ -98,7 +89,7 @@ class portal
// Get settings...
//-----------------------------------------
foreach( $this->ipsclass->cache['portal'] as $portal_key => $portal_data )
foreach( $this->ipsclass->cache['portal'] as $portal_data )
{
if ( $portal_data['pc_settings_keyword'] )
{
@@ -156,8 +147,7 @@ class portal
if ( ! $this->ipsclass->vars['csite_on'] )
{
print "Ïîðòàë îòêëþ÷åí. Ïîæàëóéñòà ïðîâåðüòå âàøè íàñòðîéêè â àäìèíöåíòðå";
exit();
$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'csite_not_enabled') );
}
//-----------------------------------------
@@ -180,9 +170,10 @@ class portal
//-----------------------------------------
// Get forums we're allowed to read
// - Use forum cache incase we have NO perms
//-----------------------------------------
foreach( $this->ipsclass->forums->forum_by_id as $id => $f )
foreach( $this->ipsclass->cache['forum_cache'] as $f )
{
if ( ($this->ipsclass->check_perms($f['read_perms']) != TRUE) or ($f['password'] != "" ) )
{
+67 -23
View File
@@ -2,28 +2,18 @@
/*
+--------------------------------------------------------------------------
| Invision Power Board 2.1.7
| Invision Power Board
| =============================================
| by Matthew Mecham
| (c) 2001 - 2005 Invision Power Services, Inc.
| (c) 2001 - 2006 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: 2006-02-01 18:16:26 +0000 (Wed, 01 Feb 2006) $
| > $Revision: 132 $
| > $Author: bfarber $
| > $Date: 2006-09-22 11:28:54 +0100 (Fri, 22 Sep 2006) $
| > $Revision: 567 $
| > $Author: matt $
+---------------------------------------------------------------------------
|
| > Post core module
@@ -39,7 +29,7 @@
if ( ! defined( 'IN_IPB' ) )
{
print "<h1>Íåêîððåêòíûé àäðåñ</h1>Âû íå èìååòå äîñòóïà ê ýòîìó ôàéëó íàïðÿìóþ. Åñëè âû íåäàâíî îáíîâëÿëè ôîðóì, âû äîëæíû îáíîâèòü âñå ñîîòâåòñòâóþùèå ôàéëû.";
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
exit();
}
@@ -69,6 +59,11 @@ class post
$this->modules->ipsclass =& $this->ipsclass;
}
if( $this->ipsclass->input['CODE'] == 'image' )
{
$this->show_captcha_image();
}
//-----------------------------------------
// Check the input
//-----------------------------------------
@@ -76,7 +71,7 @@ class post
$this->ipsclass->input['t'] = intval($this->ipsclass->input['t']);
$this->ipsclass->input['p'] = intval($this->ipsclass->input['p']);
$this->ipsclass->input['f'] = intval($this->ipsclass->input['f']);
$this->ipsclass->input['st'] = intval($this->ipsclass->input['st']);
$this->ipsclass->input['st'] = intval($this->ipsclass->input['st']) >=0 ? intval($this->ipsclass->input['st']) : 0;
//-----------------------------------------
// At some point in the future, I want to
@@ -93,7 +88,7 @@ class post
'poll_add' => '14',
'poll_add_do' => '15' );
if ( $this->ipsclass->input['do'] )
if ( isset($this->ipsclass->input['do']) AND $this->ipsclass->input['do'] )
{
$this->ipsclass->input['CODE'] = $this->do_into_code[ $this->ipsclass->input['do'] ];
}
@@ -113,7 +108,7 @@ class post
// Set up object array
//-----------------------------------------
$this->han_post->obj['preview_post'] = $this->ipsclass->input['preview'];
$this->han_post->obj['preview_post'] = isset($this->ipsclass->input['preview']) ? $this->ipsclass->input['preview'] : NULL;
$this->han_post->obj['moderate'] = $this->ipsclass->member['g_avoid_q'] ? 0 : intval($this->han_post->forum['preview_posts']);
//-----------------------------------------
@@ -181,7 +176,7 @@ class post
}
else
{
$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'posting_off_susp', 'EXTRA' => $this->ipsclass->get_date($post_arr['date_end'], 'LONG') ) );
$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'posting_off_susp', 'EXTRA' => $this->ipsclass->get_date($post_arr['date_end'], 'LONG', 1) ) );
}
}
@@ -303,7 +298,7 @@ class post
$topic = $this->ipsclass->DB->fetch_row();
$this->ipsclass->boink_it($this->ipsclass->base_url."act=ST&f=".$this->han_post->forum['id']."&t=".$topic['tid']);
$this->ipsclass->boink_it($this->ipsclass->base_url."showtopic=".$topic['tid']);
exit();
}
else
@@ -312,7 +307,7 @@ class post
// It's a reply, so simply show the topic...
//-----------------------------------------
$this->ipsclass->boink_it($this->ipsclass->base_url."act=ST&f=".$this->han_post->forum['id']."&t=".$this->ipsclass->input['t']."&view=getlastpost");
$this->ipsclass->boink_it($this->ipsclass->base_url."showtopic=".$this->ipsclass->input['t']."&amp;view=getlastpost");
exit();
}
}
@@ -355,7 +350,7 @@ class post
// Does this member have mod_posts enabled?
//-----------------------------------------
if ( $this->ipsclass->member['mod_posts'] )
if ( isset($this->ipsclass->member['mod_posts']) AND $this->ipsclass->member['mod_posts'] )
{
if ( $this->ipsclass->member['mod_posts'] == 1 )
{
@@ -388,6 +383,55 @@ class post
}
}
function show_captcha_image()
{
if ( $this->ipsclass->input['rc'] == "" )
{
return false;
}
// Get the info from the db
$this->ipsclass->DB->simple_construct( array( 'select' => '*',
'from' => 'reg_antispam',
'where' => "regid='".trim(addslashes($this->ipsclass->input['rc']))."'"
) );
$this->ipsclass->DB->simple_exec();
if ( ! $row = $this->ipsclass->DB->fetch_row() )
{
return false;
}
//-----------------------------------------
// Using GD?
//-----------------------------------------
if ( $this->ipsclass->vars['guest_captcha'] == 'gd' )
{
$this->ipsclass->show_gd_img($row['regcode']);
}
else
{
//-----------------------------------------
// Using normal then, check for "p"
//-----------------------------------------
if ( $this->ipsclass->input['p'] == "" )
{
return false;
}
$p = intval($this->ipsclass->input['p']) - 1; //substr starts from 0, not 1 :p
$this_number = substr( $row['regcode'], $p, 1 );
$this->ipsclass->show_gif_img($this_number);
}
}
}
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
+6 -16
View File
@@ -2,27 +2,17 @@
/*
+--------------------------------------------------------------------------
| Invision Power Board 2.1.7
| Invision Power Board
| =============================================
| by Matthew Mecham
| (c) 2001 - 2005 Invision Power Services, Inc.
| (c) 2001 - 2006 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 $
| > $Date: 2006-09-22 11:28:54 +0100 (Fri, 22 Sep 2006) $
| > $Revision: 567 $
| > $Author: matt $
+---------------------------------------------------------------------------
|
@@ -36,7 +26,7 @@
if ( ! defined( 'IN_IPB' ) )
{
print "<h1>Íåêîððåêòíûé àäðåñ</h1>Âû íå èìååòå äîñòóïà ê ýòîìó ôàéëó íàïðÿìóþ. Åñëè âû íåäàâíî îáíîâëÿëè ôîðóì, âû äîëæíû îáíîâèòü âñå ñîîòâåòñòâóþùèå ôàéëû.";
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
exit();
}
@@ -51,7 +41,7 @@ class rssout
function rssout()
{
$this->xml_header = '<?xml version="1.0" encoding="WINDOWS-1251"?'.'>';
$this->xml_header = '<?xml version="1.0" encoding="ISO-8859-1"?'.'>';
}
/*-------------------------------------------------------------------------*/
+307 -134
View File
@@ -2,28 +2,18 @@
/*
+--------------------------------------------------------------------------
| Invision Power Board 2.1.7
| Invision Power Board
| =============================================
| by Matthew Mecham
| (c) 2001 - 2005 Invision Power Services, Inc.
| (c) 2001 - 2006 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: 2006-01-05 11:02:13 +0000 (Thu, 05 Jan 2006) $
| > $Revision: 114 $
| > $Author: matt $
| > $Date: 2006-09-26 23:00:20 +0100 (Tue, 26 Sep 2006) $
| > $Revision: 576 $
| > $Author: bfarber $
+---------------------------------------------------------------------------
|
| > Searching procedures
@@ -38,40 +28,43 @@
if ( ! defined( 'IN_IPB' ) )
{
print "<h1>Íåêîððåêòíûé àäðåñ</h1>Âû íå èìååòå äîñòóïà ê ýòîìó ôàéëó íàïðÿìóþ. Åñëè âû íåäàâíî îáíîâëÿëè ôîðóì, âû äîëæíû îáíîâèòü âñå ñîîòâåòñòâóþùèå ôàéëû.";
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
exit();
}
class search {
var $output = "";
var $page_title = "";
var $nav = array();
var $html = "";
var $output = "";
var $page_title = "";
var $nav = array();
var $html = "";
var $first = 0;
var $first = 0;
var $row_count = 0;
var $search_type = 'posts';
var $sort_order = 'desc';
var $sort_key = 'last_post';
var $search_in = 'posts';
var $prune = '0';
var $st_time = array();
var $end_time = array();
var $st_stamp = "";
var $end_stamp = "";
var $result_type = "topics";
var $parser = "";
var $load_lib = 'search_mysql_man';
var $lib = "";
var $search_type = 'posts';
var $sort_order = 'desc';
var $sort_key = 'last_post';
var $search_in = 'posts';
var $topic_search_only = "";
var $prune = '0';
var $st_time = array();
var $end_time = array();
var $st_stamp = "";
var $end_stamp = "";
var $result_type = "topics";
var $parser = "";
var $load_lib = 'search_mysql_man';
var $lib = "";
var $read_array = array();
var $mysql_version = "";
var $true_version = "";
var $mysql_version = "";
var $true_version = "";
// max number of results
var $resultlimit = 1000;
var $xml_out = 0;
var $resultlimit = 1000;
var $xml_out = 0;
/*-------------------------------------------------------------------------*/
// Auto run
@@ -79,30 +72,56 @@ class search {
function auto_run()
{
//-----------------------------------------
// Using XML?
//-----------------------------------------
$this->xml_out = isset($_REQUEST['xml']) ? intval( $_REQUEST['xml'] ) : 0;
//-----------------------------------------
// Require the HTML and language modules
//-----------------------------------------
$this->ipsclass->load_language('lang_search');
$this->ipsclass->load_language('lang_forum' );
$this->ipsclass->load_template('skin_search');
//-----------------------------------------
// Check
//-----------------------------------------
if (! $this->ipsclass->vars['allow_search'])
{
$this->ipsclass->Error( array( LEVEL => 1, MSG => 'search_off') );
if ( $this->xml_out )
{
@header( "Content-type: text/html;charset={$this->ipsclass->vars['gb_char_set']}" );
print $this->ipsclass->lang['search_off'];
exit();
}
else
{
$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'search_off') );
}
}
if ($this->ipsclass->member['g_use_search'] != 1)
{
$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_permission' ) );
}
if (! isset($this->ipsclass->member['g_use_search']) OR !$this->ipsclass->member['g_use_search'] )
{
if ( $this->xml_out )
{
@header( "Content-type: text/html;charset={$this->ipsclass->vars['gb_char_set']}" );
print $this->ipsclass->lang['no_xml_permission'];
exit();
}
else
{
$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_permission') );
}
}
if ( $read = $this->ipsclass->my_getcookie('topicsread') )
{
$this->read_array = $this->ipsclass->clean_int_array( unserialize(stripslashes($read)) );
}
//-----------------------------------------
// Using XML?
//-----------------------------------------
$this->xml_out = intval( $_REQUEST['xml'] );
}
//-----------------------------------------
// Forum jump
@@ -130,14 +149,6 @@ class search {
require ( ROOT_PATH."sources/lib/".$this->load_lib );
//-----------------------------------------
// Require the HTML and language modules
//-----------------------------------------
$this->ipsclass->load_language('lang_search');
$this->ipsclass->load_language('lang_forum' );
$this->ipsclass->load_template('skin_search');
$this->base_url = $this->ipsclass->base_url;
//-----------------------------------------
@@ -147,17 +158,12 @@ class search {
$this->lib = new search_lib($this);
$this->lib->ipsclass =& $this->ipsclass;
$this->first = intval($this->ipsclass->input['st']);
$this->first = intval($this->ipsclass->input['st']) >=0 ? intval($this->ipsclass->input['st']) : 0;
//-----------------------------------------
// What to do?
//-----------------------------------------
if (! isset($this->ipsclass->member['g_use_search']) )
{
$this->ipsclass->Error( array( LEVEL => 1, MSG => 'cant_use_feature') );
}
switch($this->ipsclass->input['CODE']) {
case '01':
$this->do_search();
@@ -201,7 +207,7 @@ class search {
// If we have any HTML to print, do so...
$this->ipsclass->print->add_output("$this->output");
$this->ipsclass->print->do_output( array( 'TITLE' => $this->page_title, 'JS' => 0, NAV => $this->nav ) );
$this->ipsclass->print->do_output( array( 'TITLE' => $this->page_title, 'JS' => 0, 'NAV' => $this->nav ) );
}
/*-------------------------------------------------------------------------*/
@@ -467,24 +473,29 @@ class search {
$last_time = $this->ipsclass->member['members_markers']['board'];
}
$this->ipsclass->input['nav'] = 'lv';
//-----------------------------------------
// Are we getting 'active topics'?
//-----------------------------------------
if ( $this->ipsclass->input['active'] )
$this->ipsclass->input['lastdate'] = isset($this->ipsclass->input['lastdate']) ? intval($this->ipsclass->input['lastdate']) : 0;
if ( isset($this->ipsclass->input['active']) AND $this->ipsclass->input['active'] )
{
if ( $this->ipsclass->input['lastdate'] )
{
$last_time = time() - intval($this->ipsclass->input['lastdate']);
$last_time = time() - $this->ipsclass->input['lastdate'];
}
else
{
$last_time = time() - 86400;
}
$this->ipsclass->input['nav'] = 'at';
}
$this->ipsclass->input['forums'] = 'all';
$this->ipsclass->input['nav'] = 'lv';
$forums = $this->get_searchable_forums();
@@ -548,7 +559,7 @@ class search {
'query_cache' => $query_to_cache
) );
$this->ipsclass->boink_it( $this->ipsclass->base_url."act=Search&nav=lv&CODE=show&searchid=$unique_id&search_in=topics&result_type=topics&lastdate={$this->ipsclass->input['lastdate']}" );
$this->ipsclass->boink_it( $this->ipsclass->base_url."act=Search&nav={$this->ipsclass->input['nav']}&CODE=show&searchid=$unique_id&search_in=topics&result_type=topics&lastdate={$this->ipsclass->input['lastdate']}" );
}
/*-------------------------------------------------------------------------*/
@@ -717,7 +728,7 @@ class search {
'ip_address' => $this->ipsclass->input['IP_ADDRESS'],
) );
$this->ipsclass->print->redirect_screen( $this->ipsclass->lang['search_redirect'] , "act=Search&nav=gr&CODE=show&searchid=$unique_id&search_in=posts&result_type=topics" );
$this->ipsclass->print->redirect_screen( $this->ipsclass->lang['search_redirect'] , "act=Search&amp;nav=gr&amp;CODE=show&amp;searchid=$unique_id&amp;search_in=posts&amp;result_type=topics" );
exit();
}
@@ -737,11 +748,8 @@ class search {
function show_form()
{
$the_html = $this->ipsclass->forums->forums_forum_jump(1, 1);
if ( ! $this->ipsclass->input['f'] )
{
$init_sel = ' selected="selected"';
}
$init_sel = !$this->ipsclass->input['f'] ? ' selected="selected"' : '';
$forums = "<select name='forums[]' class='forminput' size='10' multiple='multiple'>\n"
."<option value='all'".$init_sel.">".$this->ipsclass->lang['all_forums']."</option>"
@@ -814,13 +822,13 @@ class search {
//-----------------------------------------
// Un-urlencode first
//-----------------------------------------
if( $this->ipsclass->input['xml'] )
if( isset($this->ipsclass->input['xml']) AND $this->ipsclass->input['xml'] )
{
require_once (ROOT_PATH."sources/action_public/xmlout.php");
$xml_convert = new xmlout();
require (ROOT_PATH."sources/classes/class_ajax.php");
$xml_convert = new class_ajax();
$xml_convert->ipsclass =& $this->ipsclass;
$this->ipsclass->input['keywords'] = $xml_convert->convert_unicode($this->ipsclass->input['keywords']);
$this->ipsclass->input['keywords'] = $xml_convert->convert_html_entities( $xml_convert->convert_unicode($this->ipsclass->input['keywords']) );
}
//-----------------------------------------
@@ -842,6 +850,7 @@ class search {
{
if ( $this->xml_out )
{
@header( "Content-type: text/html;charset={$this->ipsclass->vars['gb_char_set']}" );
print sprintf( $this->ipsclass->lang['xml_flood'], $this->ipsclass->member['g_search_flood'] );
exit();
}
@@ -866,6 +875,7 @@ class search {
{
if ( $this->xml_out )
{
@header( "Content-type: text/html;charset={$this->ipsclass->vars['gb_char_set']}" );
print sprintf( $this->ipsclass->lang['xml_nomatches'], $result['keywords'] );
exit();
}
@@ -880,7 +890,7 @@ class search {
//-----------------------------------------
$unique_id = md5(uniqid(microtime(),1));
$url = "act=Search&CODE=show&searchid=$unique_id&search_in=".$this->search_in."&result_type=".$this->result_type."&highlite=".urlencode(trim($result['keywords']));
$url = "act=Search&amp;CODE=show&amp;searchid=".$unique_id."&amp;search_in=".$this->search_in."&amp;result_type=".$this->result_type."&amp;highlite=".urlencode(trim($result['keywords']));
$this->ipsclass->DB->do_insert( 'search_results', array (
'id' => $unique_id,
@@ -900,6 +910,7 @@ class search {
{
$result['post_max'] = $result['post_max'] < 1 ? 1 : $result['post_max'];
@header( "Content-type: text/html;charset={$this->ipsclass->vars['gb_char_set']}" );
print sprintf( $this->ipsclass->lang['xml_matches'], preg_replace( "#^[\+\-]#", "", $result['keywords'] ), $result['post_max'], $this->ipsclass->base_url.$url );
exit();
}
@@ -966,11 +977,6 @@ class search {
{
$this->cached_query = $sr['query_cache'];
$this->cached_matches = $sr['post_max'];
$this->ipsclass->DB->cur_query = $this->cached_query;
$this->ipsclass->DB->simple_limit_with_check($this->first, "25");
$this->cached_query = $this->ipsclass->DB->cur_query;
$this->ipsclass->DB->flush_query();
}
else
{
@@ -1001,7 +1007,7 @@ class search {
$post_array[ $t ] = $t;
}
}
//-----------------------------------------
// Anything left to show?
//-----------------------------------------
@@ -1012,10 +1018,10 @@ class search {
}
}
$url_words = $this->convert_highlite_words($this->ipsclass->input['highlite']);
$url_words = $this->convert_highlite_words( (isset($this->ipsclass->input['highlite']) AND $this->ipsclass->input['highlite']) ? $this->ipsclass->input['highlite'] : '' );
if ($this->result_type == 'topics')
{
if ( $this->result_type == 'topics' )
{
//-----------------------------------------
// CACHED QUERY?
//-----------------------------------------
@@ -1024,8 +1030,13 @@ class search {
{
$this->output .= $this->start_page($this->cached_matches);
$this->ipsclass->DB->cur_query = $this->cached_query;
$this->ipsclass->DB->simple_limit_with_check($this->first, "25");
$this->cached_query = $this->ipsclass->DB->cur_query;
$this->ipsclass->DB->flush_query();
$this->ipsclass->DB->prefix_changed = 1;
$this->ipsclass->DB->query( $this->cached_query );
$outer = $this->ipsclass->DB->query( $this->cached_query );
$this->ipsclass->DB->prefix_changed = 0;
}
//-----------------------------------------
@@ -1034,6 +1045,20 @@ class search {
else if ($this->search_in == 'titles')
{
if ($posts AND !$topics)
{
$this->ipsclass->DB->simple_construct( array( 'select' => 'topic_id', 'from' => 'posts', 'where' => "pid IN({$posts})" ) );
$this->ipsclass->DB->simple_exec();
while ( $pr = $this->ipsclass->DB->fetch_row() )
{
$topic_array[ $pr['topic_id'] ] = $pr['topic_id'];
}
$topics = implode( ",", $topic_array );
$topic_max_hits = count( $topic_array );
}
if ( ! $topics )
{
$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_search_results' ) );
@@ -1047,7 +1072,7 @@ class search {
'order' => "t.pinned DESC, t.".$this->sort_key." ".$this->sort_order,
'limit' => array( $this->first, 25 )
) );
$this->ipsclass->DB->simple_exec();
$outer = $this->ipsclass->DB->simple_exec();
}
else
{
@@ -1077,20 +1102,47 @@ class search {
'order' => "t.pinned DESC, t.".$this->sort_key." ".$this->sort_order,
'limit' => array( $this->first, 25 )
) );
$this->ipsclass->DB->simple_exec();
$outer = $this->ipsclass->DB->simple_exec();
}
//-----------------------------------------
// PRINT: Any returned rows?
//-----------------------------------------
if ( $this->ipsclass->DB->get_num_rows() )
if ( $this->ipsclass->DB->get_num_rows($outer) )
{
while ( $row = $this->ipsclass->DB->fetch_row() )
$topic_ids = array();
$the_topics = array();
while ( $row = $this->ipsclass->DB->fetch_row($outer) )
{
$row['keywords'] = $url_words;
$this->output .= $this->ipsclass->compiled_templates['skin_search']->RenderRow( $this->parse_entry($row) );
$the_topics[$row['tid']] = $row;
$topic_ids[] = $row['tid'];
}
if ( ($this->ipsclass->vars['show_user_posted'] == 1) and ($this->ipsclass->member['id']) and ( count($topic_ids) ) )
{
$this->ipsclass->DB->build_query( array( 'select' => 'author_id, topic_id',
'from' => 'posts',
'where' => "author_id=".$this->ipsclass->member['id']." AND topic_id IN(".implode( ",", $topic_ids ).")",
) );
$this->ipsclass->DB->simple_exec();
while( $p = $this->ipsclass->DB->fetch_row() )
{
if ( is_array( $the_topics[ $p['topic_id'] ] ) )
{
$the_topics[ $p['topic_id'] ]['author_id'] = $p['author_id'];
}
}
}
foreach( $the_topics as $row )
{
$this->output .= $this->ipsclass->compiled_templates['skin_search']->RenderRow( $this->parse_entry($row) );
}
}
else
@@ -1125,8 +1177,10 @@ class search {
require_once( ROOT_PATH.'sources/action_public/topics.php' );
$this->topics = new topics();
$this->topics->ipsclass =& $this->ipsclass;
$this->topics->topic['tid'] = 0;
$this->topics->topic['forum_id'] = 0;
$this->topics->topic_init();
$attach_pids = array();
//-----------------------------------------
@@ -1137,6 +1191,11 @@ class search {
{
$this->output .= $this->start_page($this->cached_matches, 1);
$this->ipsclass->DB->cur_query = $this->cached_query;
$this->ipsclass->DB->simple_limit_with_check($this->first, "25");
$this->cached_query = $this->ipsclass->DB->cur_query;
$this->ipsclass->DB->flush_query();
$this->ipsclass->DB->query( $this->cached_query );
}
//-----------------------------------------
@@ -1151,6 +1210,20 @@ class search {
if ($this->search_in == 'titles')
{
if ($posts AND !$topics)
{
$this->ipsclass->DB->simple_construct( array( 'select' => 'topic_id', 'from' => 'posts', 'where' => "pid IN({$posts})" ) );
$this->ipsclass->DB->simple_exec();
while ( $pr = $this->ipsclass->DB->fetch_row() )
{
$topic_array[ $pr['topic_id'] ] = $pr['topic_id'];
}
$topics = implode( ",", $topic_array );
$topic_max_hits = count( $topic_array );
}
if ( ! $topics )
{
$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_search_results' ) );
@@ -1193,10 +1266,20 @@ class search {
$row['keywords'] = $url_words;
$row['post_date'] = $this->ipsclass->get_date( $row['post_date'],'LONG' );
if ( $row['queued'] or ($row['topic_firstpost'] == $row['pid'] and $row['approved'] != 1) )
{
$row['post_css'] = $this->row_count % 2 ? 'post1shaded' : 'post2shaded';
}
else
{
$row['post_css'] = $this->row_count % 2 ? 'post1' : 'post2';
}
//-----------------------------------------
// Parse HTML tag on the fly
//-----------------------------------------
$row['post_htmlstate'] = isset($row['post_htmlstate']) ? $row['post_htmlstate'] : 0;
$this->topics->parser->parse_html = ( $this->ipsclass->forums->forum_by_id[$row['forum_id']]['use_html'] and $this->ipsclass->cache['group_cache'][ $row['mgroup'] ]['g_dohtml'] and $row['post_htmlstate'] ) ? 1 : 0;
$this->topics->parser->parse_wordwrap = $this->ipsclass->vars['post_wordwrap'];
$this->topics->parser->parse_nl2br = $row['post_htmlstate'] == 2 ? 1 : 0;
@@ -1207,7 +1290,7 @@ class search {
// Attachments?
//-----------------------------------------
if ( strstr( $row['post'], '[attachmentid=' ) )
if ( strstr( $row['post'], '[attachment=' ) )
{
$attach_pids[] = $row['pid'];
}
@@ -1217,13 +1300,29 @@ class search {
//-----------------------------------------
$member = $this->topics->parse_member( $row );
$post = $this->parse_entry($row, 1);
//-----------------------------------------
// Do word wrap?
//-----------------------------------------
$this->output .= $this->ipsclass->compiled_templates['skin_search']->RenderPostRow( $this->parse_entry($row, 1), $member );
$this->output .= $this->ipsclass->compiled_templates['skin_search']->RenderPostRow( $post, $member );
//-----------------------------------------
// Ignoring member?
//-----------------------------------------
if ( $this->ipsclass->member['ignored_users'] )
{
if ( strstr( $this->ipsclass->member['ignored_users'], ','.$member['id'].',' ) and $this->ipsclass->input['p'] != $row['pid'] )
{
if ( ! strstr( $this->ipsclass->vars['cannot_ignore_groups'], ','.$member['mgroup'].',' ) )
{
$this->output .= $this->ipsclass->compiled_templates['skin_search']->render_row_hidden( $post, $member );
continue;
}
}
}
}
//-----------------------------------------
@@ -1232,7 +1331,21 @@ class search {
if ( count( $attach_pids ) )
{
$this->output = $this->topics->parse_attachments( $this->output, $attach_pids );
if ( ! is_object( $this->class_attach ) )
{
//-----------------------------------------
// Grab render attach class
//-----------------------------------------
require_once( ROOT_PATH . 'sources/classes/attach/class_attach.php' );
$this->class_attach = new class_attach();
$this->class_attach->ipsclass =& $this->ipsclass;
$this->class_attach->type = 'post';
$this->class_attach->init();
}
$this->output = $this->class_attach->render_attachments( $this->output, $attach_pids );
}
$this->output .= $this->ipsclass->compiled_templates['skin_search']->end_results_table(array( 'SHOW_PAGES' => $this->links ), 1 );
@@ -1255,16 +1368,31 @@ class search {
{
$this->nav = array( $this->ipsclass->lang['nav_lt'] );
}
else if ( $this->ipsclass->input['nav'] == 'at' )
{
$this->nav = array( $this->ipsclass->lang['nav_at'] );
}
else if ( $this->ipsclass->input['nav'] == 'au' )
{
if( $this->ipsclass->input['result_type'] == 'topics' )
{
$this->nav = array( $this->ipsclass->lang['nav_aut'] );
}
else
{
$this->nav = array( $this->ipsclass->lang['nav_au'] );
}
}
else
{
$this->nav = array( "<a href='{$this->base_url}&act=Search'>{$this->ipsclass->lang['search_form']}</a>", $this->ipsclass->lang['search_title'] );
$this->nav = array( "<a href='{$this->base_url}act=Search'>{$this->ipsclass->lang['search_form']}</a>", $this->ipsclass->lang['search_title'] );
}
//-----------------------------------------
// Active topics fing?
//-----------------------------------------
if ( $this->ipsclass->input['lastdate'] )
if ( isset($this->ipsclass->input['lastdate']) )
{
$this->output = preg_replace( "#(value=[\"']".intval($this->ipsclass->input['lastdate'])."[\"'])#i", "\\1 selected='selected'", $this->output );
}
@@ -1276,7 +1404,7 @@ class search {
function start_page($amount, $is_post = 0)
{
$url_words = $this->convert_highlite_words($this->ipsclass->input['highlite']);
$url_words = $this->convert_highlite_words( (isset($this->ipsclass->input['highlite']) AND $this->ipsclass->input['highlite']) ? $this->ipsclass->input['highlite'] : '' );
$extra = $this->more_results ? str_replace( '%num', $this->resultlimit, $this->ipsclass->lang['too_many_children_for_santa'] ) : "";
$this->links = $this->ipsclass->build_pagelinks( array( 'TOTAL_POSS' => $amount,
@@ -1284,7 +1412,7 @@ class search {
'CUR_ST_VAL' => $this->first,
'L_SINGLE' => "",
'L_MULTI' => $this->ipsclass->lang['search_pages'],
'BASE_URL' => $this->base_url."act=Search&nav=".$this->ipsclass->input['nav']."&CODE=show&searchid=".$this->unique_id."&search_in=".$this->search_in."&result_type=".$this->result_type."&hl=".$url_words,
'BASE_URL' => $this->base_url."act=Search&amp;nav=".$this->ipsclass->input['nav']."&amp;CODE=show&amp;searchid=".$this->unique_id."&amp;search_in=".$this->search_in."&amp;result_type=".$this->result_type."&amp;hl=".$url_words,
) );
if ($is_post == 0)
@@ -1303,21 +1431,24 @@ class search {
function parse_entry($topic, $view_as_post=0)
{
$this->ipsclass->input['last_visit'] = $this->ipsclass->forum_read[ $topic['forum_id'] ] > $this->ipsclass->input['last_visit']
? $this->ipsclass->forum_read[ $topic['forum_id'] ] : $this->ipsclass->input['last_visit'];
$this->ipsclass->forum_read[ $topic['forum_id'] ] = isset( $this->ipsclass->forum_read[ $topic['forum_id'] ] ) ? $this->ipsclass->forum_read[ $topic['forum_id'] ] : 0;
$this->ipsclass->forum_read[0] = isset( $this->ipsclass->forum_read[0] ) ? $this->ipsclass->forum_read[0] : 0;
$this->ipsclass->input['last_visit'] = ( $this->ipsclass->forum_read[ $topic['forum_id'] ] > $this->ipsclass->input['last_visit'] )
? $this->ipsclass->forum_read[ $topic['forum_id'] ] : $this->ipsclass->input['last_visit'];
if ( $this->ipsclass->member['members_markers']['board'] > $this->ipsclass->input['last_visit'] )
if ( isset($this->ipsclass->member['members_markers']['board']) AND $this->ipsclass->member['members_markers']['board'] > $this->ipsclass->input['last_visit'] )
{
$this->ipsclass->input['last_visit'] = $this->ipsclass->member['members_markers']['board'];
}
//echo "<pre>";print $this->ipsclass->input['last_visit']; print_r($topic);echo "</pre>";exit;
//-----------------------------------------
// Over ride with 'master' cookie?
//-----------------------------------------
if ( $this->ipsclass->forum_read[0] > $this->ipsclass->forum_read[ $topic['forum_id'] ] )
if ( $this->ipsclass->forum_read[ $topic['forum_id'] ] AND $this->ipsclass->forum_read[0] > $this->ipsclass->forum_read[ $topic['forum_id'] ] )
{
$this->ipsclass->forum_read[ $topic['forum_id'] ] = $this->ipsclass->forum_read[0];
}
@@ -1335,11 +1466,13 @@ class search {
// Stop search from marking forum as read
//-----------------------------------------
$topic['db_read'] = isset($topic['db_read']) ? $topic['db_read'] : 0;
if ( is_array( $this->read_array ) )
{
if ( array_key_exists( $topic['tid'], $this->read_array ) )
{
if( !$topic['db_read'] OR $this->read_array[$topic['tid']] > $topic['db_read'] )
if ( ! $topic['db_read'] OR $this->read_array[$topic['tid']] > $topic['db_read'] )
{
$topic['db_read'] = $this->read_array[$topic['tid']];
}
@@ -1348,9 +1481,7 @@ class search {
$this->forums->new_posts = 1;
$topic = $this->forums->parse_data( $topic );
$this->ipsclass->vars['db_topic_read_cutoff'] = $tmp;
$topic = $this->forums->parse_data( $topic, 0 );
if ($topic['pinned'] == 1)
{
@@ -1358,11 +1489,29 @@ class search {
$topic['topic_icon'] = "<{B_PIN}>";
}
$topic['class1'] = "row2";
$topic['class2'] = "row1";
$topic['classposts'] = "row2";
if ( isset($this->ipsclass->member['is_mod']) AND $this->ipsclass->member['is_mod'] )
{
if ( ! $topic['approved'] )
{
$topic['class1'] = 'row4shaded';
$topic['class2'] = 'row2shaded';
$topic['classposts'] = 'row4shaded';
}
else if ( isset($topic['_hasqueued']) AND $topic['_hasqueued'] )
{
$topic['classposts'] = 'row4shaded';
}
}
//-----------------------------------------
// Remove potential [attachmentid= tag in title
//-----------------------------------------
$topic['topic_title'] = str_replace( '[attachmentid=', '&#91;attachmentid=', $topic['topic_title'] );
$topic['title'] = str_replace( '[attachmentid=', '&#91;attachmentid=', $topic['title'] );
//-----------------------------------------
// Extra processing for posts..
@@ -1372,7 +1521,8 @@ class search {
{
if ( $this->ipsclass->vars['search_post_cut'] )
{
$topic['post'] = substr( $topic['post'], 0, $this->ipsclass->vars['search_post_cut']) . '...';
//$topic['post'] = substr( strip_tags($topic['post']), 0, $this->ipsclass->vars['search_post_cut']) . '...';
$topic['post'] = $this->ipsclass->txt_mbsubstr( strip_tags($topic['post']), 0, $this->ipsclass->vars['search_post_cut'] ).'...';
$topic['post'] = str_replace( "\n", "<br />", $topic['post'] );
}
@@ -1453,11 +1603,22 @@ class search {
$topic['forum_name'] = $topic['forum_full_name'];
}
//$this->parser->parse_html = ( $this->ipsclass->forums->forum_by_id[ $topic['forum_id'] ]['use_html'] and $this->ipsclass->cache['group_cache'][ $this->ipsclass->member['mgroup'] ]['g_dohtml'] and $topic['post_htmlstate'] ) ? 1 : 0;
//$this->parser->parse_wordwrap = $this->ipsclass->vars['post_wordwrap'];
//$this->parser->parse_nl2br = $topic['post_htmlstate'] == 2 ? 1 : 0;
//$topic['post'] = $this->parser->pre_display_parse( $topic['post'] );
if( $this->ipsclass->forums->forum_by_id[ $topic['forum_id'] ]['forum_allow_rating'] )
{
if ( $topic['topic_rating_total'] )
{
$topic['_rate_int'] = round( $topic['topic_rating_total'] / $topic['topic_rating_hits'] );
}
//-----------------------------------------
// Show image?
//-----------------------------------------
if ( ( $topic['topic_rating_hits'] >= $this->ipsclass->vars['topic_rating_needed'] ) AND ( $topic['_rate_int'] ) )
{
$topic['_rate_img'] = $this->ipsclass->compiled_templates['skin_search']->topic_rating_image( $topic['_rate_int'] );
}
}
return $topic;
}
@@ -1469,7 +1630,7 @@ class search {
function filter_keywords($words="", $name=0)
{
// force to lowercase and swop % into a safer version
$words = trim( str_replace( "%", "\\%", $words) );
$words = trim( str_replace( "%", "", $words) );
// Remove trailing boolean operators
@@ -1480,7 +1641,10 @@ class search {
// Make safe underscores
$words = str_replace( "_", "\\_", $words );
if( $name == 0 )
{
$words = str_replace( "_", "\\_", $words );
}
$words = str_replace( '|', "&#124;", $words );
@@ -1554,7 +1718,7 @@ class search {
// this ~that +this -me
$words = preg_replace( "/~/", "", $words );
$words = str_replace( "~", "", $words );
// this that +this -me
@@ -1592,7 +1756,7 @@ class search {
// Check for an array
//-----------------------------------------
if ( is_array( $_POST['forums'] ) )
if ( isset($_POST['forums']) AND is_array( $_POST['forums'] ) )
{
if ( in_array( 'all', $_POST['forums'] ) )
@@ -1601,7 +1765,7 @@ class search {
// Searching all forums..
//-----------------------------------------
foreach( $this->ipsclass->forums->forum_by_id as $id => $data )
foreach( $this->ipsclass->forums->forum_by_id as $data )
{
$forumids[] = $data['id'];
}
@@ -1626,13 +1790,16 @@ class search {
if ( count( $forumids ) )
{
foreach( $forumids as $f )
{
$children = $this->ipsclass->forums->forums_get_children( $f );
if ( is_array($children) and count($children) )
if ( $this->ipsclass->input['searchsubs'] == 1 )
{
foreach( $forumids as $f )
{
$forumids = array_merge( $forumids , $children );
$children = $this->ipsclass->forums->forums_get_children( $f );
if ( is_array($children) and count($children) )
{
$forumids = array_merge( $forumids , $children );
}
}
}
}
@@ -1654,7 +1821,7 @@ class search {
if ( $this->ipsclass->input['forums'] == 'all' )
{
foreach( $this->ipsclass->forums->forum_by_id as $id => $data )
foreach( $this->ipsclass->forums->forum_by_id as $data )
{
$forumids[] = $data['id'];
}
@@ -1691,6 +1858,8 @@ class search {
foreach( $forumids as $f )
{
$f = intval($f);
if ( $this->check_access($this->ipsclass->forums->forum_by_id[ $f ] ) == TRUE )
{
$final[] = $f;
@@ -1712,7 +1881,7 @@ class search {
$tmp = $final;
$final = array();
foreach( $tmp as $internal => $id )
foreach( $tmp as $id )
{
if ( in_array( $id, $block_forums ) )
{
@@ -1742,6 +1911,8 @@ class search {
{
$can_read = FALSE;
$i['read_perms'] = isset($i['read_perms']) ? $i['read_perms'] : NULL;
if ( $this->ipsclass->check_perms( $i['read_perms'] ) == TRUE )
{
$can_read = TRUE;
@@ -1751,6 +1922,8 @@ class search {
$can_read = FALSE;
}
$i['password'] = isset($i['password']) ? $i['password'] : NULL;
if ( $i['password'] != "" and $can_read == TRUE )
{
if ( $this->ipsclass->forums->forums_compare_password( $i['id'] ) == TRUE )
+5 -15
View File
@@ -2,27 +2,17 @@
/*
+--------------------------------------------------------------------------
| Invision Power Board 2.1.7
| Invision Power Board
| =============================================
| by Matthew Mecham
| (c) 2001 - 2005 Invision Power Services, Inc.
| (c) 2001 - 2006 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 $
| > $Date: 2006-09-22 11:28:54 +0100 (Fri, 22 Sep 2006) $
| > $Revision: 567 $
| > $Author: matt $
+---------------------------------------------------------------------------
|
@@ -38,7 +28,7 @@
if ( ! defined( 'IN_IPB' ) )
{
print "<h1>Íåêîððåêòíûé àäðåñ</h1>Âû íå èìååòå äîñòóïà ê ýòîìó ôàéëó íàïðÿìóþ. Åñëè âû íåäàâíî îáíîâëÿëè ôîðóì, âû äîëæíû îáíîâèòü âñå ñîîòâåòñòâóþùèå ôàéëû.";
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
exit();
}
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff