Fixed minor things and added missing file
[vanilla-miry.git] / search.php
blob191b038df352cd716e09c12fbd6ca7c169280e26
1 <?php
2 /*
3 * Copyright 2003 Mark O'Sullivan
4 * This file is part of Vanilla.
5 * Vanilla 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.
6 * Vanilla 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.
7 * You should have received a copy of the GNU General Public License along with Vanilla; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
8 * The latest source code for Vanilla is available at www.lussumo.com
9 * Contact Mark O'Sullivan at mark [at] lussumo [dot] com
11 * Description: Web forms that handle running, saving, and removing searches
14 include("appg/settings.php");
15 $Configuration['SELF_URL'] = 'search.php';
16 include("appg/init_vanilla.php");
18 // 1. DEFINE VARIABLES AND PROPERTIES SPECIFIC TO THIS PAGE
20 // Ensure the user is allowed to view this page
21 $Context->Session->Check($Context);
23 // Define properties of the page controls that are specific to this page
24 $Context->PageTitle = $Context->GetDefinition("Search");
25 $Head->BodyId = 'SearchPage';
26 $Menu->CurrentTab = "search";
27 $Panel->CssClass = "SearchPanel";
28 $Panel->BodyCssClass = "Search";
30 // 2. BUILD PAGE CONTROLS
32 // Search form
33 $SearchForm = $Context->ObjectFactory->CreateControl($Context, "SearchForm");
35 // 3. ADD CONTROLS TO THE PAGE
37 $Page->AddRenderControl($Head, $Configuration["CONTROL_POSITION_HEAD"]);
38 $Page->AddRenderControl($Menu, $Configuration["CONTROL_POSITION_MENU"]);
39 $Page->AddRenderControl($Panel, $Configuration["CONTROL_POSITION_PANEL"]);
40 $Page->AddRenderControl($NoticeCollector, $Configuration['CONTROL_POSITION_NOTICES']);
41 $Page->AddRenderControl($SearchForm, $Configuration["CONTROL_POSITION_BODY_ITEM"]);
42 $Page->AddRenderControl($Foot, $Configuration["CONTROL_POSITION_FOOT"]);
43 $Page->AddRenderControl($PageEnd, $Configuration["CONTROL_POSITION_PAGE_END"]);
45 // 4. FIRE PAGE EVENTS
47 $Page->FireEvents();