source: trunk/search_home.php

Last change on this file was 2, checked in by george, 14 years ago
  • Přidáno: Trunk revize 13719.
File size: 3.5 KB
Line 
1<?php
2
3/***************************************************************************
4* Dolphin Smart Community Builder
5* -----------------
6* begin : Mon Mar 23 2006
7* copyright : (C) 2006 BoonEx Group
8* website : http://www.boonex.com/
9* This file is part of Dolphin - Smart Community Builder
10*
11* Dolphin is free software. This work is licensed under a Creative Commons Attribution 3.0 License.
12* http://creativecommons.org/licenses/by/3.0/
13*
14* Dolphin is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
15* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
16* See the Creative Commons Attribution 3.0 License for more details.
17* You should have received a copy of the Creative Commons Attribution 3.0 License along with Dolphin,
18* see license.txt file; if not, write to marketing@boonex.com
19***************************************************************************/
20
21require_once( 'inc/header.inc.php' );
22require_once( BX_DIRECTORY_PATH_INC . 'design.inc.php' );
23require_once( BX_DIRECTORY_PATH_INC . 'admin.inc.php' );
24require_once( BX_DIRECTORY_PATH_INC . 'db.inc.php' );
25require_once( BX_DIRECTORY_PATH_INC . 'utils.inc.php' );
26
27bx_import ('BxDolPageView');
28
29class BxDolPageSearchMain extends BxDolPageView {
30
31 function BxDolPageSearchMain() {
32 parent::BxDolPageView('search_home');
33 }
34
35 function getBlockCode_Keyword() {
36
37 $a = array(
38 'form_attrs' => array(
39 'id' => 'searchForm',
40 'action' => BX_DOL_URL_ROOT . 'searchKeyword.php',
41 'method' => 'get',
42 ),
43 'inputs' => array(
44 'keyword' => array(
45 'type' => 'text',
46 'name' => 'keyword',
47 'caption' => _t('_Keyword'),
48 ),
49 'search' => array(
50 'type' => 'submit',
51 'name' => 'search',
52 'value' => _t('_Search'),
53 ),
54 ),
55 );
56
57 $oForm = new BxTemplFormView($a);
58 return $oForm->getCode();
59
60 }
61
62 function getBlockCode_People() {
63
64 global $logged;
65
66 $aProfile = $logged['member'] ? getProfileInfo((int)$_COOKIE['memberID']) : array();
67
68 // default params for search form
69 $aDefaultParams = array(
70 'LookingFor' => $aProfile['Sex'] ? $aProfile['Sex'] : 'male',
71 'Sex' => $aProfile['LookingFor'] ? $aProfile['LookingFor'] : 'female',
72 'Country' => $aProfile['Country'] ? $aProfile['Country'] : getParam('default_country'),
73 'DateOfBirth' => getParam('search_start_age') . '-' . getParam('search_end_age'),
74 );
75
76 bx_import('BxDolProfileFields');
77 $oPF = new BxDolProfileFields(9);
78 $a = array('default_params' => $aDefaultParams);
79 return $oPF->getFormCode($a);
80 }
81
82 function getBlockCode_History() {
83 return MsgBox('Under Development');
84 }
85}
86
87$_page['name_index'] = 81;
88
89check_logged();
90
91$_page['header'] = _t('_sys_search_main_title');
92$_page['header_text'] = _t('_sys_search_main_title');
93$_page['css_name'] = 'search.css';
94
95$oPage = new BxDolPageSearchMain();
96
97$_ni = $_page['name_index'];
98$_page_cont[$_ni]['page_main_code'] = $oPage -> getCode();
99
100PageCode();
101
102?>
Note: See TracBrowser for help on using the repository browser.