当前位置: 首页>>代码示例>>PHP>>正文


PHP getOrderType函数代码示例

本文整理汇总了PHP中getOrderType函数的典型用法代码示例。如果您正苦于以下问题:PHP getOrderType函数的具体用法?PHP getOrderType怎么用?PHP getOrderType使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了getOrderType函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: searchResult

function searchResult($params, $listId)
{
    global $SEARCH_RESULT_ID_VARIABLE;
    global $LIST_ORDER_MATCH_COMPATIBILITY;
    global $LIST_ORDER_DISTANCE;
    global $BOL_SearchService;
    global $USEARCH_BOL_Service;
    global $ow_user;
    global $QuestionService;
    global $PHOTO_BOL_PhotoService_inst;
    global $BOL_AvatarService_inst;
    global $Userservice;
    $listId = OW::getSession()->get($SEARCH_RESULT_ID_VARIABLE);
    $page = !empty($_GET['page']) && intval($_GET['page']) > 0 ? $_GET['page'] : 1;
    $orderType = getOrderType($params);
    //bhushan changes
    if (!$ow_user->isAuthenticated()) {
        if (in_array($orderType, array($LIST_ORDER_MATCH_COMPATIBILITY, $LIST_ORDER_DISTANCE))) {
            throw new Redirect404Exception();
        }
        //    }
        //end bhushan changes
        $limit = 16;
        $itemCount = $BOL_SearchService->countSearchResultItem($listId);
        $list = $USEARCH_BOL_Service->getSearchResultList($listId, $orderType, ($page - 1) * $limit, $limit);
        foreach ($list as $key => $list_id) {
            $ids[] = $list_id->id;
        }
        $user_ids = array_values($ids);
        $single_id = $user_ids[0];
        $userinfoData = array();
        $userinfoData = $QuestionService->getQuestionData($user_ids, array('id', 'username', 'realname', 'birthdate', 'googlemap_location', 'field_f92bbdb57510b86ba6c506c487be3aa1', 'field_d3d1470339c8d689ab705fd19a509655'));
        $avatar = $BOL_AvatarService_inst->getDataForUserAvatars($user_ids);
        $onlineStatus = $Userservice->findOnlineStatusForUserList($user_ids);
        $user_info = array();
        foreach ($userinfoData as $key => $user) {
            $dob = date("Y/m/d", strtotime($user["birthdate"]));
            $age = ageCalculate($dob);
            $userKeyId = $key;
            $photoService = $PHOTO_BOL_PhotoService_inst;
            $photos = $photoService->findPhotoListByUserId($userKeyId, 1, 500);
            $service = null;
            $service_name = null;
            $price = null;
            if (array_key_exists("field_f92bbdb57510b86ba6c506c487be3aa1", $user)) {
                $service = renderQuestion($key, "field_f92bbdb57510b86ba6c506c487be3aa1");
                $service_name = renderQuestion($key, "field_f92bbdb57510b86ba6c506c487be3aa1", true);
            }
            if (array_key_exists("field_d3d1470339c8d689ab705fd19a509655", $user)) {
                $price = $user["field_d3d1470339c8d689ab705fd19a509655"];
            }
            $user_data[] = array("user_id" => $key, "user_name" => $user["username"], "profile_picture" => $avatar[$key]["src"], "available" => !empty($onlineStatus[$key]) ? "Online" : "Offline", "age" => "{$age}", "prices" => $price, "services" => $service, "services_name" => $service_name, "location" => array("latitude" => $user["googlemap_location"]["latitude"], "longitude" => $user["googlemap_location"]["longitude"]), "image" => $photos);
        }
        //    $return_data = array($user_data, $all_services);
        return $user_data;
    }
}
开发者ID:hardikamutech,项目名称:hammu,代码行数:57,代码来源:index_16_6_2015.php

示例2: searchResult

function searchResult($params, $listId)
{
    global $SEARCH_RESULT_ID_VARIABLE;
    global $LIST_ORDER_MATCH_COMPATIBILITY;
    global $LIST_ORDER_DISTANCE;
    global $BOL_SearchService;
    global $USEARCH_BOL_Service;
    global $ow_user;
    global $QuestionService;
    global $PHOTO_BOL_PhotoService_inst;
    global $BOL_AvatarService_inst;
    global $Userservice;
    global $language;
    $listId = OW::getSession()->get($SEARCH_RESULT_ID_VARIABLE);
    $page = !empty($_GET['page']) && intval($_GET['page']) > 0 ? $_GET['page'] : 1;
    $orderType = getOrderType($params);
    //bhushan changes
    if (!$ow_user->isAuthenticated()) {
        if (in_array($orderType, array($LIST_ORDER_MATCH_COMPATIBILITY, $LIST_ORDER_DISTANCE))) {
            throw new Redirect404Exception();
        }
        //    }
        //end bhushan changes
        $limit = 16;
        $itemCount = $BOL_SearchService->countSearchResultItem($listId);
        $list = $USEARCH_BOL_Service->getSearchResultList($listId, $orderType, ($page - 1) * $limit, $limit);
        foreach ($list as $key => $list_id) {
            $ids[] = $list_id->id;
        }
        $user_ids = array_values($ids);
        $single_id = $user_ids[0];
        $userinfoData = array();
        $userinfoData = $QuestionService->getQuestionData($user_ids, array('id', 'username', 'realname', 'birthdate', 'googlemap_location', HAMMU_DB_SERVICES_KEY, HAMMU_DB_PRICE_KEY, HAMMU_HOTEL_SERVICE, HAMMU_HOME_VISIT, HAMMU_AVAILABLE_AT, HAMMU_SECRET_FANTASY, HAMMU_LANGUAGE, HAMMU_COUNTRY, HAMMU_LANG));
        $avatar = $BOL_AvatarService_inst->getDataForUserAvatars($user_ids);
        $onlineStatus = $Userservice->findOnlineStatusForUserList($user_ids);
        //        print_r($userinfoData);
        //        die;
        $user_info = array();
        foreach ($userinfoData as $key => $user) {
            $dob = date("Y/m/d", strtotime($user["birthdate"]));
            $age = ageCalculate($dob);
            $userKeyId = $key;
            $photoService = $PHOTO_BOL_PhotoService_inst;
            $photos = $photoService->findPhotoListByUserId($userKeyId, 1, 500);
            $service = null;
            $service_name = null;
            $price = null;
            if (array_key_exists(HAMMU_LANG, $user)) {
                $language_lable = renderQuestion($key, HAMMU_LANG);
                $language_value = renderQuestion($key, HAMMU_LANG, true);
            } else {
                $language_lable = "";
                $language_value = "";
            }
            if (array_key_exists(HAMMU_DB_SERVICES_KEY, $user)) {
                $service = renderQuestion($key, HAMMU_DB_SERVICES_KEY);
                $service_name = renderQuestion($key, HAMMU_DB_SERVICES_KEY, true);
            }
            if (array_key_exists(HAMMU_DB_PRICE_KEY, $user)) {
                $price = $user[HAMMU_DB_PRICE_KEY];
            }
            $availableUser = checkAvailableOrNot($key);
            if ($availableUser == "online") {
                $available = $language->text("hammu", "available");
                //"Available";
            } else {
                $available = $language->text("hammu", "unavailable");
                //"Unavailable";
            }
            if (array_key_exists(HAMMU_HOTEL_SERVICE, $user)) {
                $HAMMU_HOTEL_SERVICE = $user[HAMMU_HOTEL_SERVICE];
            } else {
                $HAMMU_HOTEL_SERVICE = "0";
            }
            if (array_key_exists(HAMMU_HOME_VISIT, $user)) {
                $HAMMU_HOME_VISIT = $user[HAMMU_HOME_VISIT];
            } else {
                $HAMMU_HOME_VISIT = "0";
            }
            if (array_key_exists(HAMMU_AVAILABLE_AT, $user)) {
                //$HAMMU_AVAILABLE_AT = $user[HAMMU_AVAILABLE_AT];
                $availabel_at_all = getallquestions(array("user_id" => $userKeyId, "fields" => array(HAMMU_AVAILABLE_AT)));
                $HAMMU_AVAILABLE_AT_VALUE = $availabel_at_all[0]["userSelectedValue"];
                //$user[HAMMU_AVAILABLE_AT];
                $HAMMU_AVAILABLE_AT_label = $availabel_at_all[0]["userSelectedLabel"];
                //$user[HAMMU_AVAILABLE_AT];
            } else {
                $HAMMU_AVAILABLE_AT_VALUE = "";
                $HAMMU_AVAILABLE_AT_label = "";
            }
            if (array_key_exists(HAMMU_SECRET_FANTASY, $user)) {
                $HAMMU_SECRET_FANTASY = $user[HAMMU_SECRET_FANTASY];
            } else {
                $HAMMU_SECRET_FANTASY = "0";
            }
            if (array_key_exists(HAMMU_LANGUAGE, $user)) {
                $HAMMU_LANGUAGE = $user[HAMMU_LANGUAGE];
            } else {
                $HAMMU_LANGUAGE = "";
            }
//.........这里部分代码省略.........
开发者ID:bhushansonar,项目名称:hammu,代码行数:101,代码来源:index_4_7_2015.php

示例3: searchResult

function searchResult($params, $listId)
{
    global $SEARCH_RESULT_ID_VARIABLE;
    global $LIST_ORDER_MATCH_COMPATIBILITY;
    global $LIST_ORDER_DISTANCE;
    global $BOL_SearchService;
    global $USEARCH_BOL_Service;
    global $ow_user;
    $listId = OW::getSession()->get($SEARCH_RESULT_ID_VARIABLE);
    $page = !empty($_GET['page']) && intval($_GET['page']) > 0 ? $_GET['page'] : 1;
    $orderType = getOrderType($params);
    if (!$ow_user->isAuthenticated()) {
        if (in_array($orderType, array($LIST_ORDER_MATCH_COMPATIBILITY, $LIST_ORDER_DISTANCE))) {
            throw new Redirect404Exception();
        }
    }
    $limit = 16;
    $itemCount = $BOL_SearchService->countSearchResultItem($listId);
    $list = $USEARCH_BOL_Service->getSearchResultList($listId, $orderType, ($page - 1) * $limit, $limit);
    $filed_array = array("realname", "sex", "googlemap_location", "relationship", "6341ee69d879c97cb0c47507a557372c", "match_sex", "a69350b819c8dc1d926cba6b58451f5f", "31d5d3d7ff420e340cfe3f17c534eba3", "23036b67a077fe7784c7cf4691a96fe3", "36e39f917cbcf4fb10aa753186ced60d", "aboutme", "2b29f145d9d1128a3f57d3af6798fc85", "18af0f3559b872c87467a5a89edf03e", "match_age", "birthdate", "6ed883b3412cab27014a0b68ea32f269", "field_b63db9264225396873b5b6e9a02dbc66", "field_8669de45f87c662844ac8cb7bf1803a4", "email", "username", "field_e9795a9d3be797f58aab38b1033265a4", "avatar");
    //echo "<pre>";
    foreach ($list as $key => $serach_list) {
        $question_data[] = getallquestions(array("user_id" => $serach_list->id, "fields" => $filed_array));
    }
    return $question_data;
}
开发者ID:hardikamutech,项目名称:hammu,代码行数:26,代码来源:index(15-5-2015).php


注:本文中的getOrderType函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。