Version 2.1.7
This commit is contained in:
1 parent
0eecc172d9
commit
f73f8bff6d
941 files changed
+215301
-103093
No files matched your search
@@ -0,0 +1,229 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| Invision Power Board 2.1.7
|
||||
| =============================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2005 Invision Power Services, Inc.
|
||||
| http://www.invisionpower.com
|
||||
| =============================================
|
||||
| Web: http://www.invisionboard.com
|
||||
| http://www.ibresource.ru/products/invisionpowerboard/
|
||||
| Time: Tuesday 18th of July 2006 05:56:00 PM
|
||||
| Release: 52f408a29988b02f45b5e6f4ba5af0ae
|
||||
| Licence Info: http://www.invisionboard.com/?license
|
||||
| http://www.ibresource.ru/license
|
||||
+---------------------------------------------------------------------------
|
||||
| INVISION POWER BOARD IS NOT FREE / OPEN SOURCE!
|
||||
+---------------------------------------------------------------------------
|
||||
| INVISION POWER BOARD ÍÅ ßÂËßÅÒÑß ÁÅÑÏËÀÒÍÛÌ ÏÐÎÃÐÀÌÌÍÛÌ ÎÁÅÑÏÅ×ÅÍÈÅÌ!
|
||||
| Ïðàâà íà ÏÎ ïðèíàäëåæàò Invision Power Services
|
||||
| Ïðàâà íà ïåðåâîä IBResource (http://www.ibresource.ru)
|
||||
+---------------------------------------------------------------------------
|
||||
| > $Date: 2005-10-10 14:08:54 +0100 (Mon, 10 Oct 2005) $
|
||||
| > $Revision: 23 $
|
||||
| > $Author: matt $
|
||||
+---------------------------------------------------------------------------
|
||||
|
|
||||
| > Access the help files
|
||||
| > Module written by Matt Mecham
|
||||
| > Date started: 24th 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 help
|
||||
{
|
||||
# Classes
|
||||
var $ipsclass;
|
||||
|
||||
# Others
|
||||
var $output = "";
|
||||
var $page_title = "";
|
||||
var $nav = array();
|
||||
var $html = "";
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Auto run
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function auto_run()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Require the HTML and language modules
|
||||
//-----------------------------------------
|
||||
|
||||
$this->ipsclass->load_language('lang_help');
|
||||
$this->ipsclass->load_template('skin_help');
|
||||
|
||||
$this->base_url = $this->ipsclass->base_url;
|
||||
|
||||
//-----------------------------------------
|
||||
// What to do?
|
||||
//-----------------------------------------
|
||||
|
||||
switch($this->ipsclass->input['CODE'])
|
||||
{
|
||||
case '01':
|
||||
$this->show_section();
|
||||
break;
|
||||
case '02':
|
||||
$this->do_search();
|
||||
break;
|
||||
default:
|
||||
$this->show_titles();
|
||||
break;
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// 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 ) );
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Show Titles
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function show_titles()
|
||||
{
|
||||
$seen = array();
|
||||
|
||||
$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'
|
||||
) );
|
||||
$this->ipsclass->DB->simple_exec();
|
||||
|
||||
$cnt = 0;
|
||||
|
||||
while ($row = $this->ipsclass->DB->fetch_row() )
|
||||
{
|
||||
|
||||
if (isset($seen[ $row['title'] ]) )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
$seen[ $row['title'] ] = 1;
|
||||
}
|
||||
|
||||
$row['CELL_COLOUR'] = $cnt % 2 ? 'row1' : 'row2';
|
||||
|
||||
$cnt++;
|
||||
|
||||
$this->output .= $this->ipsclass->compiled_templates['skin_help']->row($row);
|
||||
|
||||
}
|
||||
|
||||
$this->output .= $this->ipsclass->compiled_templates['skin_help']->help_end();
|
||||
|
||||
$this->page_title = $this->ipsclass->lang['page_title'];
|
||||
$this->nav = array( $this->ipsclass->lang['page_title'] );
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Show section
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function show_section()
|
||||
{
|
||||
$id = $this->ipsclass->input['HID'];
|
||||
|
||||
if (! preg_match( "/^(\d+)$/" , $id ) )
|
||||
{
|
||||
$this->show_titles();
|
||||
return;
|
||||
}
|
||||
|
||||
$this->ipsclass->DB->simple_construct( array( 'select' => 'id, title, text',
|
||||
'from' => 'faq',
|
||||
'where' => "ID='$id'"
|
||||
) );
|
||||
$this->ipsclass->DB->simple_exec();
|
||||
|
||||
$topic = $this->ipsclass->DB->fetch_row();
|
||||
|
||||
$this->output = $this->ipsclass->compiled_templates['skin_help']->start( $this->ipsclass->lang['help_topic'], $this->ipsclass->lang['topic_text'], $topic['title'] );
|
||||
$this->output .= $this->ipsclass->compiled_templates['skin_help']->display( $this->ipsclass->text_tidy( $topic['text'] ) );
|
||||
|
||||
$this->output .= $this->ipsclass->compiled_templates['skin_help']->help_end();
|
||||
|
||||
$this->page_title = $this->ipsclass->lang['help_topic'];
|
||||
$this->nav = array( "<a href='{$this->base_url}&act=Help'>{$this->ipsclass->lang['help_topics']}</a>", $this->ipsclass->lang['help_topic'] );
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Do search
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function do_search()
|
||||
{
|
||||
if (empty( $this->ipsclass->input['search_q'] ) )
|
||||
{
|
||||
$this->ipsclass->Error( array( LEVEL => 1, MSG => 'no_help_file') );
|
||||
}
|
||||
|
||||
$search_string = strtolower( str_replace( "*" , "%", $this->ipsclass->input['search_q'] ) );
|
||||
$search_string = preg_replace( "/[<>\!\@£\$\^&\+\=\=\[\]\{\}\(\)\"':;\.,\/]/", "", $search_string );
|
||||
|
||||
$seen = array();
|
||||
|
||||
$this->output = $this->ipsclass->compiled_templates['skin_help']->start( $this->ipsclass->lang['page_title'], $this->ipsclass->lang['results_txt'], $this->ipsclass->lang['search_results'] );
|
||||
|
||||
$this->ipsclass->DB->cache_add_query( 'help_search', array( 'search_string' => $search_string ) );
|
||||
$this->ipsclass->DB->cache_exec_query();
|
||||
|
||||
$cnt = 0;
|
||||
|
||||
while ($row = $this->ipsclass->DB->fetch_row() )
|
||||
{
|
||||
|
||||
if (isset($seen[ $row['title'] ]) )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
$seen[ $row['title'] ] = 1;
|
||||
}
|
||||
|
||||
$row['CELL_COLOUR'] = $cnt % 2 ? 'row1' : 'row2';
|
||||
|
||||
$cnt++;
|
||||
|
||||
$this->output .= $this->ipsclass->compiled_templates['skin_help']->row($row);
|
||||
|
||||
}
|
||||
|
||||
if ($cnt == 0)
|
||||
{
|
||||
$this->output .= $this->ipsclass->compiled_templates['skin_help']->no_results();
|
||||
}
|
||||
|
||||
$this->output .= $this->ipsclass->compiled_templates['skin_help']->help_end();
|
||||
|
||||
$this->page_title = $this->ipsclass->lang['page_title'];
|
||||
$this->nav = array( "<a href='{$this->base_url}&act=Help'>{$this->ipsclass->lang['help_topics']}</a>", $this->ipsclass->lang['results_title'] );
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in new issue
Block a user