<?php

if ( ! @include_once( './mainfile.php' ) ) { exit( '!! INCLUDE ERROR. ACCESS DENIED !!' ); }
error_reporting( _E_VALUE );

/* vim: set expandtab tabstop=4 shiftwidth=4: */

// ***** BEGIN LICENSE BLOCK ( DO NOT REMOVE ) *****

// +----------------------------------------------------------------------+
// | phpBB 1.4.x Forum For MPN 188_8                                      |
// |                                                                      |
// | -> Search The Forums                                                 |
// +----------------------------------------------------------------------+
// | VERSION: 0.1 Alpha                                                   |
// +----------------------------------------------------------------------+
// | LICENSE: GPL 2.0 (see docs/LICENSE_GPL)                              |
// |                                                                      |
// | This file is part of phpBB 1.4.x Forum For MPN 188_8.                |
// |                                                                      |
// | phpBB 1.4.x Forum For MPN 188_8 is free software; you can            |
// | redistribute it and/or modify it under the terms of the GNU          |
// | General Public License as published by the Free Software Foundation; |
// | either version 2 of the License, or (at your option) any             |
// | later version.                                                       |
// |                                                                      |
// | phpBB 1.4.x Forum For MPN 188_8 is distributed in the hope that it   |
// | will be useful, but WITHOUT ANY WARRANTY; without even the implied   |
// | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.     |
// | See the GNU General Public License for more details.                 |
// |                                                                      |
// | You should have received a copy of the GNU General Public License    |
// | along with phpBB 1.4.x Forum For MPN 188_8; if not, write to the     |
// |                                                                      |
// | Free Software Foundation, Inc.                                       |
// | 59 Temple Place, Suite 330                                           |
// | Boston, MA 02111-1307  USA                                           |
// +----------------------------------------------------------------------+
// | AUTHOR(s):                                                           |
// |                                                                      |
// | The Original Code is the phpbb 1.4.4 Forum For MPN 188_8.            |
// | The Initial Developer of the Original Code is Eric Haddix.           |
// |                                                                      |
// | Portions created by Eric Haddix or Kiril Threndor                    |
// | <support@mpn.illearth.net> are                                       |
// | Copyright (C) 2003 Eric Haddix.  All Rights Reserved.                |
// +----------------------------------------------------------------------+
// | HISTORICAL AUTHORS & COPYRIGHTS:                                     |
// |                                                                      |
// | Portions created by Richard Tirtadji or King Richard                 |
// | <rtirtadji@hotmail.com> are                                          |
// | Copyright (C) 2001 Richard Tirtadji.  All Rights Reserved.           |
// |                                                                      |
// | Portions created by Hutdik Hermawan or hotFix                        |
// | <hutdik76@hotmail.com> are                                           |
// | Copyright (C) 2001 Hutdik Hermawan.  All Rights Reserved.            |
// |                                                                      |
// | Portions created by Nathan Codding, Hombergs, or Francisco Burzi     |
// | are Copyright (C) 2001 Francisco Burzi.  All Rights Reserved.        |
// +----------------------------------------------------------------------+
// | CONTRIBUTOR(s):                                                      |
// |                                                                      |
// |                                                                      |
// +----------------------------------------------------------------------+
// | MODIFICATIONS:                                                       |
// |                                                                      |
// |                                                                      |
// +----------------------------------------------------------------------+
// | REQUIRED FILES: core_ForumEntry.php                                  |
// |                                                                      |
// +----------------------------------------------------------------------+
// | NOTES:                                                               |
// |   The MPN 188_8 forum is nearly a complete, and in some cases entire,|
// |   recode of the phpNuke 4.4 forum which was based on phpBB 1.4.x.    |
// +----------------------------------------------------------------------+
// | SUPPORT:                                                             |
// |   WEB:   http://myphpnuke.com/                                       |
// |   EMAIL: support@mpn.illearth.net                                    |
// +----------------------------------------------------------------------+

/**
 * MPN_188_8_Modules
 *
 * @package MPN_188_8_Modules
 * @subpackage forum
 * @version $Id: searchbb.php,v 1.9.2.18 2004/08/23 15:57:20 kirilt Exp $
 *
 * @author Kiril Threndor <support@mpn.illearth.net>
 * @copyright Copyright (C) 2004 Eric Haddix
 * @license http://www.gnu.org/licenses/gpl.html GPL 2.0
 * @support http://myphpnuke.com/
 * @todo finish CSS & XHTML conversion
 * @todo reformat old style formatted code to new coding style
 *
 * @tutorial
 * @filesource
 */

// ***** END LICENSE BLOCK ( DO NOT REMOVE ) *****

@( include_once __ROOT__ . 'core_ForumEntry.php' )
  OR goBack( translate( 'Include Error' ) );

// Check Table Engine Type

$ftsupport = $_SERVER['F_LIB'] -> checkFTISupport( $mpnTables['posts'] );

$post_term = ( ! isset( $_REQUEST['term'] ) || $_REQUEST['term'] == '' )
           ? ( '' )
           : ( $_REQUEST['term'] );

$post_addterms = ( ! isset( $_REQUEST['addterms'] ) || $_REQUEST['addterms'] == '' )
               ? ( 'any' )
               : ( $_REQUEST['addterms'] );

$post_forum = ( ! isset( $_REQUEST['srchforum'] ) || $_REQUEST['srchforum'] == '' )
            ? ( 'all' )
            : ( $_REQUEST['srchforum'] );

$post_username = ( ! isset( $_REQUEST['username'] ) || $_REQUEST['username'] == '' )
               ? ( '' )
               : ( $_REQUEST['username'] );

$ma_srchtype = ( strlen( $post_term ) > 3 && ( $post_addterms == 'exact' || $post_addterms == 'rel' ) );

$post_sortby1 = ( ! isset( $_REQUEST['sortby1'] ) || $_REQUEST['sortby1'] == '' )
              ? ( 'post_time' )
              : ( $_REQUEST['sortby1'] == 'score' && ! $ma_srchtype )
                ? ( 'post_time' )
                : ( $_REQUEST['sortby1'] );

$post_sortby2 = ( ! isset( $_REQUEST['sortby2'] ) || $_REQUEST['sortby2'] == '' )
              ? ( 'forum_id' )
              : ( $_REQUEST['sortby2'] == 'none' || ( $_REQUEST['sortby2'] == 'score' && ! $ma_srchtype ) )
                ? ( NULL )
                : ( $_REQUEST['sortby2'] );

$post_sortby3 = ( ! isset( $_REQUEST['sortby3'] ) || $_REQUEST['sortby3'] == '' )
              ? ( 'topic_id' )
              : ( $_REQUEST['sortby3'] == 'none' || ( $_REQUEST['sortby3'] == 'score' && ! $ma_srchtype ) )
                ? ( NULL )
                : ( $_REQUEST['sortby3'] );

$post_sortdir1 = ( ! isset( $_REQUEST['sortdir1'] ) || $_REQUEST['sortdir1'] == '' )
               ? ( 'DESC' )
               : ( $_REQUEST['sortdir1'] );

$post_sortdir2 = ( ! isset( $_REQUEST['sortdir2'] ) || $_REQUEST['sortdir2'] == '' )
               ? ( 'DESC' )
               : ( $_REQUEST['sortdir2'] );

$post_sortdir3 = ( ! isset( $_REQUEST['sortdir3'] ) || $_REQUEST['sortdir3'] == '' )
               ? ( 'DESC' )
               : ( $_REQUEST['sortdir3'] );

$post_perpage = ( ! isset( $_REQUEST['perpage'] ) || $_REQUEST['perpage'] == '' )
              ? ( 10 )
              : ( $_REQUEST['perpage'] );


// Get Private Forum ID's

$privforums = @mysql_fetch_assoc( getResultSet( 11 ) );


// START PAGE OUTPUT

@( include_once __ROOT__ . 'header.php' )
  OR goBack( translate( 'Include Error' ) );

echo '<div id="forum">' . "\n";

if ( $post_term != '' )
{
    echo '<h1>' . translate( 'Searching Forum For Phrase' ) . ' <i>&quot;' . $post_term . '&quot;</i></h1><br />' . "\n";
}
else
{
    echo '<h1>' . translate( 'Please Enter A Search Phrase' ) . '</h1><br />' . "\n";
}

echo '<div class="forumsrch">' . "\n";

    echo '<form name="search" action="./searchbb.php" method="post">' . "\n";

        echo '<input type="hidden" name="stripit_form" value="term|username" />' . "\n";
        echo '<input type="hidden" name="mpn_sectype" value="1" />' . "\n";
        echo '<input type="hidden" name="bbsearch" value="1">' . "\n";

        echo '<table class="center" style="background:' . $bgcolor1 . ';" summary="forum search"><tr><td colspan="3">' . "\n";

        echo '<label>' . translate( 'Search For Phrase' ) . '</label>' . "\n";

        echo '<input type="text" name="term" value="' . $post_term . '" size="50" />' . "\n";

        echo '</td></tr><tr><td colspan="3">' . "\n";

        echo '<label>' . translate( 'Match' ) . '</label>' . "\n";

        echo '<select name="addterms">' . "\n";

            $optary = array( 'any' => translate( 'Any' ), 'all' => translate( 'All' ), 'exact' => translate( 'Exact' ), 'rel' => translate( 'Adv Bool' ) );

            if ( ! $ftsupport ) { unset( $optary['rel'] ); }

            foreach( $optary AS $val => $text )
            {
                $sel = ( $post_addterms == $val )
                     ? ( 'selected="yes"' )
                     : ( NULL );

                echo '<option value="' . $val . '" ' . $sel . '>' . $text . '</option>' . "\n";
            }

        echo '</select>' . "\n";

        echo '&nbsp;<label>' . translate( 'Words' ) . '</label>' . "\n";

        echo '<label>' . translate( 'From Forum' ) . '</label>' . "\n";

        echo '<select name="srchforum">' . "\n";

            echo '<option value="all">' . translate( 'All Forums' ) . '</option>' . "\n";

            $sql = 'SELECT forum_name,forum_id
                    FROM ' . $mpnTables['forums'] . '
                    WHERE forum_type <> 1';

            if ( @( $result = mysql_query( $sql ) ) && @mysql_data_seek( $result, 0 ) )
            {
                while( $row = @mysql_fetch_assoc( $result ) )
                {
                    $sel = ( $post_forum == $row['forum_id'] )
                         ? ( 'selected="yes"' )
                         : ( NULL );

                    echo '<option value="' . $row['forum_id'] . '" ' . $sel . '>' . $row['forum_name'] . '</option>' . "\n";
                }
            }

            echo '</select>' . "\n";

        echo '</td></tr><tr><td colspan="3">' . "\n";

        echo '<label>' . translate( 'Limit Results To User' ) . '</label>' . "\n";

        echo '<input type="text" name="username" value="' . $post_username . '" />' . "\n";

        echo '<span class="note">&#040;&nbsp;' . translate( 'Must Be A Valid User' ) . '&nbsp;&#041;</span>' . "\n";

        echo '</td></tr><tr><td>' . "\n";

        $sortopt = array( 'post_time' => translate( 'Post Time' ), 'poster_id' => translate( 'Author' ), 'forum_id' => translate( 'Forum' ), 'topic_id' => translate( 'Topic' ) );

        if ( $ma_srchtype )
        {
            $sortopt = array_merge( array( 'score' => translate( 'Score' ) ), $sortopt );
        }

        echo '<label>' . translate( 'Sort First By' ) . '</label>' . "\n";

        echo '<select name="sortby1">' . "\n";

            foreach( $sortopt AS $field => $label )
            {
                $sel = ( $post_sortby1 == $field ) ? ( 'selected="yes"' ) : ( NULL );

                echo '<option value="' . $field . '" ' . $sel . '>' . $label . '</option>' . "\n";
            }

        echo '</select>' . "\n";

        echo '<br />' . "\n";

        $sel1 = ( $post_sortdir1 == 'DESC' ) ? ( 'checked="1"' ) : ( NULL );
        $sel2 = ( $post_sortdir1 == 'ASC' ) ? ( 'checked="1"' ) : ( NULL );

        echo '<input type="radio" name="sortdir1" value="DESC" ' . $sel1 . '>' . translate( 'New First' ) . '</input>' . "\n";

        echo '&nbsp;<input type="radio" name="sortdir1" value="ASC" ' . $sel2 . '>' . translate( 'Old First' ) . '</input>' . "\n";

        echo '</td><td>' . "\n";

        $sortopt = array_merge( array( 'none' => translate( 'None' ) ), $sortopt );

        echo '<label>' . translate( 'Then By' ) . '</label>' . "\n";

        echo '<select name="sortby2">' . "\n";

            foreach( $sortopt AS $field => $label )
            {
                $sel = ( $post_sortby2 == $field ) ? ( 'selected="yes"' ) : ( NULL );

                echo '<option value="' . $field . '" ' . $sel . '>' . $label . '</option>' . "\n";
            }

        echo '</select>' . "\n";

        echo '<br />'. "\n";

        $sel1 = ( $post_sortdir2 == 'DESC' ) ? ( 'checked="1"' ) : ( NULL );
        $sel2 = ( $post_sortdir2 == 'ASC' ) ? ( 'checked="1"' ) : ( NULL );

        echo '<input type="radio" name="sortdir2" value="DESC" ' . $sel1 . '>' . translate( 'New First' ) . '</input>' . "\n";

        echo '&nbsp;<input type="radio" name="sortdir2" value="ASC" ' . $sel2 . '>' . translate( 'Old First' ) . '</input>' . "\n";

        echo '</td><td>' . "\n";

        echo '<label>' . translate( 'Then By' ) . '</label>' . "\n";

        echo '<select name="sortby3">' . "\n";

            foreach( $sortopt AS $field => $label )
            {
                $sel = ( $post_sortby3 == $field ) ? ( 'selected="yes"' ) : ( NULL );

                echo '<option value="' . $field . '" ' . $sel . '>' . $label . '</option>' . "\n";
            }

        echo '</select>' . "\n";

        echo '<br />' . "\n";

        $sel1 = ( $post_sortdir3 == 'DESC' ) ? ( 'checked="1"' ) : ( NULL );
        $sel2 = ( $post_sortdir3 == 'ASC' ) ? ( 'checked="1"' ) : ( NULL );

        echo '<input type="radio" name="sortdir3" value="DESC" ' . $sel1 . '>' . translate( 'New First' ) . '</input>' . "\n";

        echo '&nbsp;<input type="radio" name="sortdir3" value="ASC" ' . $sel2 . '>' . translate( 'Old First' ) . '</input>' . "\n";

        echo '</td></tr><tr><td colspan="3">' . "\n";

        echo '<label>' . translate( 'Show' ) . ' </label>' . "\n";

        echo '<select name="perpage">' . "\n";

            for ( $i = 10; $i < 100; $i += 10 )
            {
                $sel = ( $post_perpage == $i ) ? ( 'selected="1"' ) : ( NULL );

                echo '<option value="' . $i . '" ' . $sel . '>' . $i . '</option>' . "\n";
            }

        echo '</select>' . "\n";

        echo '<label> ' . translate( 'Results Per Page' ) . '</label>' . "\n";

        echo '</td></tr></table>' . "\n";

        echo '<br /><br />' . "\n";

        echo '<input class="button" type="submit" name="submit" value="' . translate( 'Search!' ) . '" />' . "\n";

        echo '&nbsp;&nbsp;' . "\n";

        echo '<input class="button" type="reset" name="reset" value="' . translate( 'Clear!' ) . '" />' . "\n";

    echo '</form>' . "\n";
echo '</div>' . "\n";


if ( $post_term == ''  )
{
    echo '<br /><br />' . "\n";
    echo '<h1>' . translate( 'Please Enter A Search Phrase' ) . '</h1>' . "\n";
    echo '<br /><br />' . "\n";
    echo getFooterNav();
    echo '</div>' . "\n";

    @( include_once __ROOT__ . 'footer.php' )
      OR goBack( translate( 'Include Error' ) );

    exit;
}

$srch_uid = NULL;

if ( isset( $post_username ) && $post_username != '' )
{
    $sql = 'SELECT uid FROM ' . $mpnTables['users'] . ' WHERE uname = "' . $post_username . '"';

    @( ( $result = mysql_query( $sql ) ) && mysql_data_seek( $result, 0 ) )
      OR goBack( translate( 'Query Failed.  User Not Found' ) . '**' . __FILE__ . '***' .  __LINE__ );

    list( $srch_uid ) = @mysql_fetch_row( $result );
}

$cond = null;

$sql = 'SELECT topic_id, forum_id, poster_id, post_text, post_time';

if ( $ma_srchtype )
{
    if ( $ftsupport )
    {
        $srchfor = ( $post_addterms == 'exact' )
                 ? ( '\'"' . addslashes( $post_term ) . '"\'' )
                 : ( '\'' . addslashes( $post_term ) . '\'' ) ;

        $sql .= ', MATCH (post_text) AGAINST (' . $srchfor . ' IN BOOLEAN MODE) AS score';
    }
    else
    {
        $srchfor = '\'' . addslashes( $post_term ) . '\'';
    }
}

$sql .= ' FROM ' . $mpnTables['posts'] . ' WHERE';

if ( isset( $post_forum ) && $post_forum != 'all' )
{
    $cond .= ' forum_id = ' . $post_forum;
}

if ( ! is_null( $srch_uid ) )
{
    $cond .= ( isset( $cond ) ) ? ( ' && ' ) : ( ' ' );
    $cond .= ' poster_id = ' . $srch_uid;
}

if ( isset( $post_term ) && $post_term != '' )
{
    $cond .= ( isset( $cond ) ) ? ( ' && ' ) : ( ' ' );

    if ( $ma_srchtype )
    {
        if ( $post_addterms == 'rel' )
        {
            $terms = explode( ' ', $post_term );

            foreach( $terms AS $v )
            {
                $highlight_terms[] = '<span class="highlight">' . $v . '</span>';
            }
        }
        else
        {
            $terms = array( $post_term );
            $highlight_terms[] = '<span class="highlight">' . $post_term . '</span>';
        }

        if ( $ftsupport )
        {
            $cond .= 'MATCH (post_text) AGAINST (' . $srchfor . ' IN BOOLEAN MODE)';
        }
        else
        {
            $cond .= '(post_text) LIKE ' . $srchfor;
        }
    }
    else
    {

        $spec_chara = array( '%', '_' );
        $repl_chara = array( '\%', '\_' );

        $terms = explode( ' ', $post_term );
        $srch_terms = str_replace( $spec_chara, $repl_chara, $terms );

        $cond .= '(post_text LIKE \'%' . addslashes( $srch_terms[0] ) . '%\')';

        $highlight_terms[0] = '<span class="highlight">' . $srch_terms[0] . '</span>';

        if ( sizeof( $terms ) > 1 )
        {
            $andor = ( $post_addterms == 'any' ) ? ( ' || ' ) : ( ' && ' );


            for( $i = 1; $i < sizeof( $terms ); $i++ )
            {
                $cond .= $andor . '(post_text LIKE \'%' . addslashes( $srch_terms[ $i ] ) . '%\')';

                $highlight_terms[ $i ] = '<span class="highlight">' . $srch_terms[ $i ] . '</span>';
            }
        }
    }

    foreach( $terms AS $key => $v )
    {
        $terms[ $key ] = '/' . preg_quote( $v ) . '/i';
    }
}

if ( ! is_null( $cond ) )
{
    $sql .= $cond;
}

// Restrict Result Set To Non-Private Forums

if ( is_array( $privforums ) )
{
    foreach( $privforums AS $fid )
    {
        $sql .= ' && forum_id != ' . $fid;
    }
}

$sql .= ' ORDER BY ' . $post_sortby1 . ' ' . $post_sortdir1;
if ( ! is_null( $post_sortby2 ) ) { $sql .= ', ' . $post_sortby2 . ' ' . $post_sortdir2; }
if ( ! is_null( $post_sortby3 ) ) { $sql .= ', ' . $post_sortby3 . ' ' . $post_sortdir3; }

@( $result = mysql_query( $sql ) )
  OR goBack( 'Query Failed' . '**' . __FILE__ . '***' .  __LINE__ );

$numresults = mysql_num_rows( $result );

if ( $numresults < 1  )
{
    echo '<h1>' . translate( 'No records match that query. Please broaden your search.' ) . '</h1>' . "\n";

    echo getFooterNav();

    echo '</div>' . "\n";

    @( include_once __ROOT__ . 'footer.php' )
      OR goBack( translate( 'Include Error' ) );

    exit;
}

$tmp = ( $numresults > 1 ) ? ( translate( 'Results' ) ) : ( translate( 'Result' ) );

echo'<br /><h2>' . translate( 'Search For' ) . ' <i>&quot;' . $post_term . '&quot;</i> ' . translate( 'Returned' ) . ' ' . $numresults . ' ' . $tmp . '</h2>';

echo '<hr class="w80" /><br />' . "\n";

if ( $numresults > $post_perpage )
{
    $query_string = 'term=' . $post_term . '&amp;addterms=' . $post_addterms . '&amp;srchforum=' . $post_forum . '&amp;username=' . $post_username . '&amp;sortby1=' . $post_sortby1 . '&amp;sortdir1=' . $post_sortdir1 . '&amp;sortby2=' . $post_sortby2 . '&amp;sortdir2=' . $post_sortdir2 . '&amp;sortby3=' . $post_sortby3 . '&amp;sortdir3=' . $post_sortdir3 . '&amp;perpage=' . $post_perpage;

    // REFERENCE: getPageNav( $loc, $totalcnt = NULL, $limit = NULL, $query = NULL )

    echo getPageNav( 'searchbb', $numresults, $post_perpage, $query_string );

    echo '<br /><br />' . "\n";
}

$count = 0;

echo '<table class="forumposts" summary=-"Search Results">' . "\n";

for( $i = $start; $i < ( $start + $post_perpage ); $i++ )
{
    if ( ! @mysql_data_seek( $result, $i ) || ! @( $resary = mysql_fetch_assoc( $result ) ) )
    {
        continue;
    }

    if ( (bool)FALSE === ( $locinf = $_SERVER['SAN'] -> slashIT( @mysql_fetch_assoc( getResultSet( 10, $resary['forum_id'], $resary['topic_id'] ) ) ) ) )
    {
        continue;
    }

    $sql = 'SELECT uname
            FROM ' . $mpnTables['users'] . '
            WHERE uid = ' . $resary['poster_id'];

    if ( ! @( $tmpres = mysql_query( $sql ) ) || ! @mysql_data_seek( $tmpres, 0 ) )
    {
        $poster_name = translate( 'Unknown' );
    }
    else
    {
        list( $poster_name ) = mysql_fetch_row( $tmpres );
    }

    @mysql_free_result( $tmpres );

    echo '<tr style="background:' . $bgcolor1 . ';"><td class="postinfo">' . "\n";

    echo '<b>' . translate( 'Posted On' ) . '&#058;</b>&nbsp;' . getDisplayTime( $resary['post_time'], 'forumdatestring2' );

    echo '&nbsp;&nbsp;<b>' . translate( 'By' ) . '&#058;</b>&nbsp;' . "\n";

    echo $poster_name;

    if ( isset( $resary['score'] ) )
    {
        echo '&nbsp;&nbsp<b>' . translate( 'Relevance Score' ) . '&#058;</b>&nbsp;' . "\n";

        echo $resary['score'];
    }

    echo '<br />' . "\n";

    echo '<b>' . translate( 'In Forum' ) . '&#058;</b>&nbsp;' . "\n";

    echo '<a href="./viewforum.php?forum=' . $resary['forum_id'] . '" title="' . $locinf['forum_name'] . '">' . $_SERVER['F_LIB'] -> truncateString( $locinf['forum_name'], 30 ) . '</a>' . "\n";

    echo '&nbsp;&nbsp;<b>' . translate( 'Topic' ) . ':</b>&nbsp;' . "\n";

    echo '<a href="./viewtopic.php?forum=' . $resary['forum_id'] . '&amp;topic=' . $resary['topic_id'] . '" title="' . $locinf['topic_title'] . '">' . $_SERVER['F_LIB'] -> truncateString( $locinf['topic_title'], 30 ) . '</a>' . "\n";

    echo '</td></tr><tr style="background:' . $bgcolor3 . ';"><td class="forummessage">' . "\n";

    echo '<div class="bbcode_msg">' . "\n";

        $resary['post_text'] = processMessage( 1, $resary['post_text'], FALSE, NULL, $resary['post_time'] );

        echo preg_replace( $terms, $highlight_terms, $resary['post_text'] );

    echo '</div>' . "\n";

    echo '</td></tr><tr style="height:12px;"><td></td></tr>' . "\n";
}

echo '</table>' . "\n";

if ( $numresults > $post_perpage )
{
    echo '<br /><br />' . "\n";
    echo getPageNav( 'searchbb', $numresults, $post_perpage, $query_string );
}

echo getFooterNav();

echo '</div>' . "\n";

@( include_once __ROOT__ . 'footer.php' )
  OR goBack( translate( 'Include Error' ) );

?>