Ответить в теме

functions.php

[PHP]

/**

 *  $args = array(

 *            'tpl'    => 'template file name',

 *            'simple' => $gen_simple_header,

 *          );

 *       OR (string) 'template_file_name'

 *

 *  $type = ''        (common forum page)

 *          'admin'   (adminCP page)

 *          'simple'  (simple page without common header)

 *

 *  $mode = 'no_header'

 *          'no_footer'

 */

function print_page ($args, $type = '', $mode = '')

{

    global $template, $gen_simple_header;


    $tpl = (is_array($args) && !empty($args['tpl'])) ? $args['tpl'] : $args;

    $tpl = ($type === 'admin') ? ADMIN_TPL_DIR . $tpl : $tpl;


    $gen_simple_header = (is_array($args) && !empty($args['simple']) OR $type === 'simple') ? true : $gen_simple_header;


    if ($mode !== 'no_header')

    {

        require(PAGE_HEADER);

    }


    $template->set_filenames(['body' => $tpl]);

    $template->pparse('body');


    if ($mode !== 'no_footer')

    {

        require(PAGE_FOOTER);

    }

}

[/PHP]

В функции даже коменты описание к ней есть


Сверху