Version 2.0.0
This commit is contained in:
1 parent
5699abfc0e
commit
0eecc172d9
696 files changed
+120723
-77160
No files matched your search
@@ -2,16 +2,15 @@
|
||||
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| Invision Power Board v1.3.1 Final
|
||||
| ========================================
|
||||
| Invision Power Board v2.0.0
|
||||
| =============================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2003 Invision Power Services
|
||||
| (c) 2001 - 2004 Invision Power Services, Inc.
|
||||
| http://www.invisionpower.com
|
||||
| ========================================
|
||||
| =============================================
|
||||
| Web: http://www.invisionboard.com
|
||||
| Time: Thu, 23 Sep 2004 23:05:01 GMT
|
||||
| Release: 3cb325c445e1909182084806ae7f8226
|
||||
| Email: matt@invisionpower.com
|
||||
| Time: Tue, 21 Sep 2004 16:34:28 GMT
|
||||
| Release: 150aa7a702c3c8b6f6eb90ad49305d2f
|
||||
| Licence Info: http://www.invisionboard.com/?license
|
||||
+---------------------------------------------------------------------------
|
||||
|
|
||||
@@ -20,13 +19,18 @@
|
||||
| > Date started: 21st March 2002
|
||||
|
|
||||
| > Module Version Number: 1.0.0
|
||||
| > DBA Checked: Mon 24th May 2004
|
||||
+--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
$idx = new Forward;
|
||||
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 Forward {
|
||||
class forwardpage {
|
||||
|
||||
var $output = "";
|
||||
var $base_url = "";
|
||||
@@ -37,69 +41,59 @@ class Forward {
|
||||
var $category = array();
|
||||
|
||||
|
||||
/***********************************************************************************/
|
||||
/*-------------------------------------------------------------------------*/
|
||||
//
|
||||
// Our constructor, load words, load skin, print the topic listing
|
||||
//
|
||||
/***********************************************************************************/
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function Forward() {
|
||||
|
||||
|
||||
global $ibforums, $DB, $std, $print, $skin_universal;
|
||||
function forwardpage()
|
||||
{
|
||||
global $ibforums, $DB, $std, $print, $forums;
|
||||
|
||||
//-------------------------------------
|
||||
//-----------------------------------------
|
||||
// Compile the language file
|
||||
//-------------------------------------
|
||||
//-----------------------------------------
|
||||
|
||||
$ibforums->lang = $std->load_words($ibforums->lang, 'lang_emails', $ibforums->lang_id);
|
||||
|
||||
$this->html = $std->load_template('skin_emails');
|
||||
|
||||
//-------------------------------------
|
||||
//-----------------------------------------
|
||||
// Check the input
|
||||
//-------------------------------------
|
||||
//-----------------------------------------
|
||||
|
||||
$ibforums->input['t'] = $std->is_number($ibforums->input['t']);
|
||||
$ibforums->input['f'] = $std->is_number($ibforums->input['f']);
|
||||
$ibforums->input['t'] = intval($ibforums->input['t']);
|
||||
$ibforums->input['f'] = intval($ibforums->input['f']);
|
||||
|
||||
if ($ibforums->input['t'] < 0 or $ibforums->input['f'] < 0)
|
||||
if ( !$ibforums->input['t'] )
|
||||
{
|
||||
$std->Error( array( LEVEL => 1, MSG => 'missing_files') );
|
||||
}
|
||||
|
||||
//-------------------------------------
|
||||
// Get the forum info based on the forum ID, get the category name, ID, and get the topic details
|
||||
//-------------------------------------
|
||||
//-----------------------------------------
|
||||
// Get the topic details
|
||||
//-----------------------------------------
|
||||
|
||||
$DB->query("SELECT t.*, f.name as forum_name, f.id as forum_id, f.read_perms, f.reply_perms, f.start_perms, f.allow_poll, f.posts as forum_posts, f.topics as forum_topics, c.name as cat_name, c.id as cat_id FROM ibf_topics t, ibf_forums f , ibf_categories c where t.tid='".$ibforums->input[t]."' and f.id = t.forum_id and f.category=c.id");
|
||||
$DB->simple_construct( array( 'select' => '*', 'from' => 'topics', 'where' => "tid=".intval($ibforums->input['t']) ) );
|
||||
$DB->simple_exec();
|
||||
|
||||
$this->topic = $DB->fetch_row();
|
||||
|
||||
$this->forum = array( 'id' => $this->topic['forum_id'] ,
|
||||
'name' => $this->topic['forum_name'] ,
|
||||
'posts' => $this->topic['forum_posts'] ,
|
||||
'topics' => $this->topic['forum_topics'] ,
|
||||
'read_perms' => $this->topic['read_perms'] ,
|
||||
'allow_poll' => $this->topic['allow_poll'] ,
|
||||
);
|
||||
|
||||
$this->category = array( 'name' => $this->topic['cat_name'],
|
||||
'id' => $this->topic['cat_id'] ,
|
||||
);
|
||||
$this->forum = $forums->forum_by_id[ $this->topic['forum_id'] ];
|
||||
|
||||
//-------------------------------------
|
||||
//-----------------------------------------
|
||||
// Error out if we can not find the forum
|
||||
//-------------------------------------
|
||||
//-----------------------------------------
|
||||
|
||||
if (!$this->forum['id'])
|
||||
if ( ! $this->forum['id'] )
|
||||
{
|
||||
$std->Error( array( LEVEL => 1, MSG => 'missing_files') );
|
||||
}
|
||||
|
||||
//-------------------------------------
|
||||
//-----------------------------------------
|
||||
// Error out if we can not find the topic
|
||||
//-------------------------------------
|
||||
//-----------------------------------------
|
||||
|
||||
if (!$this->topic['tid'])
|
||||
{
|
||||
@@ -110,24 +104,21 @@ class Forward {
|
||||
|
||||
$this->base_url_NS = "{$ibforums->vars['board_url']}/index.{$ibforums->vars['php_ext']}";
|
||||
|
||||
//-------------------------------------
|
||||
//-----------------------------------------
|
||||
// Check viewing permissions, private forums,
|
||||
// password forums, etc
|
||||
//-------------------------------------
|
||||
//-----------------------------------------
|
||||
|
||||
if (! $ibforums->member['id'] )
|
||||
{
|
||||
$std->Error( array( LEVEL => 1, MSG => 'no_guests') );
|
||||
}
|
||||
|
||||
$bad_entry = $this->check_access();
|
||||
|
||||
if ($bad_entry == 1)
|
||||
{
|
||||
$std->Error( array( LEVEL => 1, MSG => 'no_view_topic') );
|
||||
}
|
||||
$forums->forums_check_access( $this->forum['id'] );
|
||||
|
||||
//-----------------------------------------
|
||||
// What to do?
|
||||
//-----------------------------------------
|
||||
|
||||
if ($ibforums->input['CODE'] == '01')
|
||||
{
|
||||
@@ -137,15 +128,14 @@ class Forward {
|
||||
{
|
||||
$this->show_form();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
function send_email() {
|
||||
function send_email()
|
||||
{
|
||||
global $std, $ibforums, $DB, $print;
|
||||
|
||||
require "./sources/lib/emailer.php";
|
||||
require ROOT_PATH."sources/classes/class_email.php";
|
||||
|
||||
$this->email = new emailer();
|
||||
|
||||
@@ -182,11 +172,10 @@ class Forward {
|
||||
$std->Error( array( 'LEVEL' => 1, 'MSG' => 'invalid_email' ) );
|
||||
}
|
||||
|
||||
|
||||
$this->email->get_template("forward_page", $lang_to_use);
|
||||
|
||||
$this->email->build_message( array(
|
||||
'THE_MESSAGE' => str_replace( "<br>", "\n", $ibforums->input['message'] ),
|
||||
'THE_MESSAGE' => str_replace( "<br />", "\n", $ibforums->input['message'] ),
|
||||
'TO_NAME' => $ibforums->input['to_name'],
|
||||
'FROM_NAME' => $ibforums->member['name'],
|
||||
)
|
||||
@@ -197,7 +186,7 @@ class Forward {
|
||||
$this->email->from = $ibforums->member['email'];
|
||||
$this->email->send_mail();
|
||||
|
||||
$print->redirect_screen( $ibforums->lang['redirect'], "act=ST&f=".$this->forum['id']."&t=".$this->topic['tid']."&st=".$ibforums->input['st'] );
|
||||
$print->redirect_screen( $ibforums->lang['redirect'], "showtopic=".$this->topic['tid']."&st=".$ibforums->input['st'] );
|
||||
|
||||
}
|
||||
|
||||
@@ -205,12 +194,13 @@ class Forward {
|
||||
|
||||
|
||||
|
||||
function show_form() {
|
||||
function show_form()
|
||||
{
|
||||
global $std, $ibforums, $DB, $print;
|
||||
|
||||
require ROOT_PATH."lang/".$ibforums->lang_id."/email_content.php";
|
||||
require ROOT_PATH."lang/".$ibforums->lang_id."/lang_email_content.php";
|
||||
|
||||
$ibforums->lang['send_text'] = $EMAIL['send_text'];
|
||||
$ibforums->lang['send_text'] = $lang['send_text'];
|
||||
|
||||
$lang_array = unserialize(stripslashes($ibforums->vars['languages']));
|
||||
|
||||
@@ -229,7 +219,7 @@ class Forward {
|
||||
$ibforums->lang['send_text'] = preg_replace( "/<#THE LINK#>/" , $this->base_url_NS."?act=ST&f=".$this->forum['id']."&t=".$this->topic['tid'], $ibforums->lang['send_text'] );
|
||||
$ibforums->lang['send_text'] = preg_replace( "/<#USER NAME#>/", $ibforums->member['name'], $ibforums->lang['send_text'] );
|
||||
|
||||
$this->output = $this->html->forward_form( $this->topic['title'], $ibforums->lang ['send_text'], $lang_select );
|
||||
$this->output = $this->html->forward_form( $this->topic['title'], $ibforums->lang['send_text'], $lang_select );
|
||||
|
||||
$this->page_title = $ibforums->lang['title'];
|
||||
|
||||
@@ -246,7 +236,7 @@ class Forward {
|
||||
|
||||
|
||||
|
||||
//+----------------------------------------------------------------------------------
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
function check_access()
|
||||
@@ -274,9 +264,4 @@ class Forward {
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
?>
|
||||
Reference in new issue
Block a user