forked from boonex/dolphin.pro
-
Notifications
You must be signed in to change notification settings - Fork 0
/
search_home.php
88 lines (71 loc) · 2.57 KB
/
search_home.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
<?php
/**
* Copyright (c) BoonEx Pty Limited - http://www.boonex.com/
* CC-BY License - http://creativecommons.org/licenses/by/3.0/
*/
require_once( 'inc/header.inc.php' );
require_once( BX_DIRECTORY_PATH_INC . 'design.inc.php' );
require_once( BX_DIRECTORY_PATH_INC . 'admin.inc.php' );
require_once( BX_DIRECTORY_PATH_INC . 'db.inc.php' );
require_once( BX_DIRECTORY_PATH_INC . 'utils.inc.php' );
bx_import ('BxDolPageView');
class BxDolPageSearchMain extends BxDolPageView
{
function BxDolPageSearchMain()
{
parent::BxDolPageView('search_home');
}
function getBlockCode_Keyword()
{
$a = array(
'form_attrs' => array(
'id' => 'searchForm',
'action' => BX_DOL_URL_ROOT . 'searchKeyword.php',
'method' => 'get',
),
'inputs' => array(
'keyword' => array(
'type' => 'text',
'name' => 'keyword',
'caption' => _t('_Keyword'),
),
'search' => array(
'type' => 'submit',
'name' => 'search',
'value' => _t('_Search'),
),
),
);
$oForm = new BxTemplFormView($a);
return array($oForm->getCode(), array(), array(), false);
}
function getBlockCode_People()
{
$iMemberId = getLoggedId();
$aProfile = $iMemberId ? getProfileInfo($iMemberId) : array();
// default params for search form
$aDefaultParams = array(
'LookingFor' => $aProfile['Sex'] ? $aProfile['Sex'] : 'male',
'Sex' => $aProfile['LookingFor'] ? $aProfile['LookingFor'] : 'female',
'Country' => $aProfile['Country'] ? $aProfile['Country'] : getParam('default_country'),
'DateOfBirth' => getParam('search_start_age') . '-' . getParam('search_end_age'),
);
bx_import('BxDolProfileFields');
$oPF = new BxDolProfileFields(9);
$a = array('default_params' => $aDefaultParams);
return array($oPF->getFormCode($a), array(), array(), false);
}
function getBlockCode_History()
{
return MsgBox('Under Development');
}
}
$_page['name_index'] = 81;
check_logged();
$_page['header'] = _t('_sys_search_main_title');
$_page['header_text'] = _t('_sys_search_main_title');
$_page['css_name'] = 'search.css';
$oPage = new BxDolPageSearchMain();
$_ni = $_page['name_index'];
$_page_cont[$_ni]['page_main_code'] = $oPage -> getCode();
PageCode();