📄 help.php
字号:
<?php
class help
{
var $output = "";
var $page_title = "";
var $nav = array( );
var $html = "";
function help( )
{
global $ibforums;
global $DB;
global $std;
global $print;
if ( $ibforums->input['CODE'] == "" )
{
$ibforums->input['CODE'] = "00";
}
$ibforums->lang = $std->load_words( $ibforums->lang, "lang_help", $ibforums->lang_id );
$this->html = $std->load_template( "skin_help" );
$this->base_url = "{$ibforums->vars['board_url']}/index.{$ibforums->vars['php_ext']}?s={$ibforums->session_id}";
switch ( $ibforums->input['CODE'] )
{
case "01" :
$this->show_section( );
break;
case "02" :
$this->do_search( );
break;
default :
$this->show_titles( );
break;
}
$print->add_output( "{$this->output}" );
$print->do_output( array(
"TITLE" => $this->page_title,
"JS" => 0,
NAV => $this->nav
) );
}
function show_titles( )
{
global $ibforums;
global $DB;
global $std;
$seen = array( );
$this->output = $this->html->start( $ibforums->lang['page_title'], $ibforums->lang['help_txt'], $ibforums->lang['choose_file'] );
$DB->query( "SELECT id, title, description from ibf_faq ORDER BY title ASC" );
$cnt = 0;
while ( $row = $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->html->row( $row );
}
$this->output .= $this->html->end( );
$this->page_title = $ibforums->lang['page_title'];
$this->nav = array(
$ibforums->lang['page_title']
);
}
function show_section( )
{
global $ibforums;
global $DB;
global $std;
$id = $ibforums->input['HID'];
if ( !preg_match( "/^(\\d+)\$/", $id ) )
{
$std->error( array( 1, "no_help_file" ) );
}
$DB->query( "SELECT id, title, text from ibf_faq WHERE ID='{$id}'" );
$topic = $DB->fetch_row( );
$this->output = $this->html->start( $ibforums->lang['help_topic'], $ibforums->lang['topic_text'], $topic['title'] );
$this->output .= $this->html->display( $std->text_tidy( $topic['text'] ) );
$this->output .= $this->html->end( );
$this->page_title = $ibforums->lang['help_topic'];
$this->nav = array(
"<a href='{$this->base_url}&act=Help'>{$ibforums->lang['help_topics']}</a>",
$ibforums->lang['help_topic']
);
}
function do_search( )
{
global $ibforums;
global $DB;
global $std;
if ( empty( $ibforums->input['search_q'] ) )
{
$std->error( array( 1, "no_help_file" ) );
}
$search_string = strtolower( str_replace( "*", "%", $ibforums->input['search_q'] ) );
$search_string = preg_replace( "/[<>\\!\\@
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -