コード例 #1
0
 function getBlockCode_QuickSearch()
 {
     $aProfile = isLogged() ? getProfileInfo() : array();
     // default params for search form
     $aDefaultParams = array('LookingFor' => !empty($aProfile['Sex']) ? $aProfile['Sex'] : 'male', 'Sex' => !empty($aProfile['LookingFor']) ? $aProfile['LookingFor'] : 'female', 'Country' => !empty($aProfile['Country']) ? $aProfile['Country'] : getParam('default_country'), 'DateOfBirth' => getParam('search_start_age') . '-' . getParam('search_end_age'));
     $oPF = new BxDolProfileFields(10);
     return array($oPF->getFormCode(array('default_params' => $aDefaultParams)), array(), array(), false);
 }
コード例 #2
0
ファイル: search_home.php プロジェクト: dalinhuang/shopexts
 function getBlockCode_People()
 {
     global $logged;
     $aProfile = $logged['member'] ? getProfileInfo((int) $_COOKIE['memberID']) : 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 $oPF->getFormCode($a);
 }
コード例 #3
0
 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);
 }
コード例 #4
0
ファイル: BxMapPageMain.php プロジェクト: dalinhuang/shopexts
 function getBlockCode_Search()
 {
     global $logged;
     $aProfile = $logged['member'] ? getProfileInfo((int) $_COOKIE['memberID']) : array();
     // default params for search form
     $sCountry = '';
     $mixedCountry = bx_get('Country');
     if ($mixedCountry && is_array($mixedCountry)) {
         $sCountry = process_pass_data($mixedCountry[0], 1);
     } elseif ($mixedCountry && is_string($mixedCountry)) {
         $sCountry = process_pass_data($mixedCountry, 1);
     }
     $sSex = '';
     $mixedSex = bx_get('Sex');
     if ($mixedSex && is_array($mixedSex)) {
         $sSex = array();
         foreach ($mixedSex as $v) {
             $sSex[] = process_pass_data($v, 1);
         }
     } elseif ($mixedSex && is_string($mixedSex)) {
         $sSex = process_pass_data($mixedSex, 1);
     }
     $aDefaultParams = array('LookingFor' => bx_get('LookingFor') ? process_pass_data(bx_get('LookingFor'), 1) : ($aProfile['Sex'] ? $aProfile['Sex'] : 'male'), 'Sex' => $sSex ? $sSex : ($aProfile['LookingFor'] ? $aProfile['LookingFor'] : 'female'), 'Country' => $sCountry ? $sCountry : ($aProfile['Country'] ? $aProfile['Country'] : getParam('default_country')), 'DateOfBirth' => bx_get('DateOfBirth') ? process_pass_data(bx_get('DateOfBirth'), 1) : getParam('search_start_age') . '-' . getParam('search_end_age'), 'Tags' => bx_get('Tags') ? process_pass_data(bx_get('Tags'), 1) : '', 'online_only' => bx_get('online_only') ? process_pass_data(bx_get('online_only'), 1) : '', 'photos_only' => bx_get('photos_only') ? process_pass_data(bx_get('photos_only'), 1) : '');
     bx_import('BxDolProfileFields');
     $oPF = new BxDolProfileFields(9);
     $a = array('default_params' => $aDefaultParams, 'form_attrs' => array('action' => $this->oConfig->getBaseUri()), 'inputs' => array(array('type' => 'hidden', 'name' => 'r', 'value' => $this->oMain->_aModule['uri'])));
     $aVars = array('content' => $oPF->getFormCode($a));
     return $this->oTemplate->parseHtmlByName('search_form_wrapper', $aVars);
 }