PHP код:
<?php
\*======================================================================*/
// ####################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);
// #################### DEFINE IMPORTANT CONSTANTS #######################
define('THIS_SCRIPT', 'search');
define('CSRF_PROTECTION', true);
define('ALTSEARCH', true);
// ################### PRE-CACHE TEMPLATES AND DATA ######################
// get special phrase groups
$phrasegroups = array('search', 'inlinemod', 'prefix', 'socialgroups', 'prefix', 'user');
// get special data templates from the datastore
$specialtemplates = array(
'iconcache',
'searchcloud',
'routes'
);
// pre-cache templates used by all actions
$globaltemplates = array(
'humanverify',
'optgroup',
'search_common',
'search_resultlist',
'search_results_postbit', // result from search posts
'search_results_postbit_lastvisit',
'search_results_forum',
'search_results_visitormessage',
'search_results_socialgroup_discussion',
'search_results_socialgroup_message',
'search_threadbit',
'pagenav_curpage_window',
'pagenav_pagelink_window',
'pagenav_window',
'threadbit', // result from search threads
'threadbit_deleted', // result from deleted search threads
'threadbit_announcement',
'newreply_reviewbit_ignore',
'threadadmin_imod_menu_thread',
'threadadmin_imod_menu_post',
'tag_cloud_link',
'tag_cloud_box_search'
);
// pre-cache templates used by specific actions
$actiontemplates = array(
'intro' => array(
'search_common_select_type',
'search_input_post',
'search_input_searchtypes',
'tag_cloud_box',
),
'showresults' => array(
'bbcode_video',
),
);
if (empty($_REQUEST['do']))
{
if (intval($_REQUEST['searchid']))
{
$_REQUEST['do'] = 'showresults';
}
else
{
$_REQUEST['do'] = 'intro';
}
}
// ######################### REQUIRE BACK-END ############################
//error_reporting(E_ALL & ~E_NOTICE);
require_once('./global.php');
//old stuff, we should start getting rid of this
require_once(DIR . '/includes/functions_forumlist.php');
require_once(DIR . '/includes/functions_misc.php');
require_once(DIR . '/includes/functions_bigthree.php');
require_once(DIR . '/includes/functions_forumdisplay.php');
require_once(DIR . '/includes/functions_search.php');
//error_reporting(E_ALL);
и так далее