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


PHP kekezu::get_feed方法代码示例

本文整理汇总了PHP中kekezu::get_feed方法的典型用法代码示例。如果您正苦于以下问题:PHP kekezu::get_feed方法的具体用法?PHP kekezu::get_feed怎么用?PHP kekezu::get_feed使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在kekezu的用法示例。


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

示例1: array_merge

    $strSql = ' select a.case_id,a.obj_id,a.obj_type,a.case_img,a.case_title,a.case_price ';
    $task_open and $strSql .= ',b.work_num,b.model_id,b.username,b.uid ';
    $shop_open and $strSql .= ' ,c.sale_num,c.model_id,c.username,b.uid ';
    $strSql .= ' from ' . TABLEPRE . 'witkey_case a ';
    $task_open and $strSql .= ' left join ' . TABLEPRE . 'witkey_task b ON a.obj_id = b.task_id ';
    $shop_open or $strSql .= ' where a.obj_type="task" ';
    $shop_open and $strSql .= ' left join ' . TABLEPRE . 'witkey_service c on  a.obj_id= c.service_id ';
    $task_open or $strSql .= ' where a.obj_type="service" ';
    $strSql .= " order by a.on_time desc limit 9 ";
    $arrCaseLists = db_factory::query($strSql, 1, $intIndexCacheTime);
    if (!$basic_config['css_auto_fit']) {
        $arrCaseLists = array_merge(array($arrCaseLists[0]), $arrCaseLists);
        if (count($arrCaseLists) > 9) {
            unset($arrCaseLists[9]);
        }
    }
    $arrDynamicPlays = kekezu::get_feed("feedtype='work_accept'", "feed_time desc", 10);
    $arrRecommShops = db_factory::query(sprintf("select a.username,a.uid,b.indus_id,b.indus_pid,a.shop_name,if(b.seller_total_num>0,b.seller_good_num/b.seller_total_num,0) as good_rate from %switkey_shop a " . " left join %switkey_space b on a.uid=b.uid  where b.recommend=1 and b.status=1 and IFNULL(a.is_close,0)=0 and shop_status=1 order by good_rate desc limit 0,6", TABLEPRE, TABLEPRE), 1, $intIndexCacheTime);
    $arrRecommShops1 = db_factory::query(sprintf("select a.username,a.uid,b.indus_id,b.indus_pid,a.shop_name,if(b.seller_total_num>0,b.seller_good_num/b.seller_total_num,0) as good_rate from %switkey_shop a " . " left join %switkey_space b on a.uid=b.uid  where b.recommend=1 and b.status=1 and IFNULL(a.is_close,0)=0 and shop_status=1 order by good_rate desc ", TABLEPRE, TABLEPRE), 1, $intIndexCacheTime);
    $arrArticleTop = db_factory::get_one("select * from " . TABLEPRE . "witkey_article where cat_type='article' and  LENGTH(art_pic)>20 order by pub_time desc limit 1", 1, $intIndexCacheTime);
    $arrArticleLists = db_factory::query("select * from " . TABLEPRE . "witkey_article where cat_type='article' and art_id !='" . $arrArticleTop['art_id'] . "' order by pub_time desc limit 6", 1, $intIndexCacheTime);
    $arrPubToday = db_factory::query("select count(*) as count from " . TABLEPRE . "witkey_task where date(from_unixtime(start_time)) = curdate() and task_status>=2", 1, $intIndexCacheTime);
    $arrAcceptTask = db_factory::query("SELECT obj_id FROM " . TABLEPRE . "witkey_feed where obj_id>0 and feedtype='work_accept' and date(from_unixtime(feed_time)) = curdate() group by obj_id ; ", 1, $intIndexCacheTime);
    $arrAcceptToday = count($arrAcceptTask);
    $arrCashToday = db_factory::query("SELECT sum(fina_cash) as cash FROM " . TABLEPRE . "witkey_finance where (fina_action='task_bid' or fina_action='sale_service')  and date(from_unixtime(fina_time)) = curdate()  ;", 1, $intIndexCacheTime);
    $arrPubAll = db_factory::query("select count(*) as count from " . TABLEPRE . "witkey_task where task_status>=2", 1, $intIndexCacheTime);
    $arrAcceptTasks = db_factory::query("SELECT obj_id FROM " . TABLEPRE . "witkey_feed where obj_id>0 and feedtype='work_accept'  group by obj_id  ;", 1, $intIndexCacheTime);
    $arrAcceptAll = count($arrAcceptTasks);
    $arrCashAll = db_factory::query("SELECT sum(fina_cash)  as cash FROM " . TABLEPRE . "witkey_finance where (fina_action='task_bid' or fina_action='sale_service')  ;", 1, $intIndexCacheTime);
    $arrFlink = kekezu::get_table_data("link_id,link_name,link_url,listorder", "witkey_link", "", " listorder asc", "", "", "", $intIndexCacheTime);
}
开发者ID:xupnge1314,项目名称:project,代码行数:31,代码来源:index.php

示例2: foreach

            break;
        case '4':
            $strWhere .= " order by a.price asc ";
            break;
    }
} else {
    $strWhere .= " order by a.goodstop desc, a.on_time desc ";
}
$strPages = $kekezu->_page_obj->getPages($intCount, $intPagesize, $intPage, $strUrl);
$strWhere .= $strPages['where'];
$arrServices = db_factory::query($strSql . $strWhere);
if (is_array($arrServices)) {
    foreach ($arrServices as $k => $v) {
        $arrFavorite = db_factory::get_count(sprintf('select count(*) from %s where uid = %d and obj_id = %d and keep_type = "service"', TABLEPRE . 'witkey_favorite', intval($gUid), intval($v['service_id'])));
        if ($arrFavorite) {
            $arrServices[$k]['favorite'] = true;
        }
        unset($arrFollow);
    }
}
$arrFeedPubs = kekezu::get_feed("(feedtype='pub_task' or feedtype='pub_service')", "feed_time desc", 8);
$arrRecommShops = db_factory::query(sprintf("select a.username,a.uid,b.indus_id,b.indus_pid,a.shop_name,if(b.seller_total_num>0,b.seller_good_num/b.seller_total_num,0) as good_rate from %switkey_shop a " . " left join %switkey_space b on a.uid=b.uid  where b.recommend=1 and b.status=1 and IFNULL(a.is_close,0)=0 and shop_status=1 order by good_rate desc limit 0,5", TABLEPRE, TABLEPRE), 1, $intIndexCacheTime);
$arrGoodsType = array('6' => '文件', '7' => '服务');
$data = array('地区' => $arrCityone['name'] . $arrCitytwo['name'] . $arrCitythree['name'], '商品类型' => $arrGoodsType[$m], '行业' => $arrIndusPInfo['indus_name'], '子行业' => $arrIndusInfo['indus_name']);
list($strPageTitle, $strPageKeyword, $strPageDescription) = keke_seo_class::getListSEO($pd, $i, $data, 'goods', true);
$_SESSION['spread'] = 'index.php?do=goodslist';
function get_good_rate($rateuid)
{
    $good_rate = db_factory::get_one("select if(seller_total_num>0,seller_good_num/seller_total_num,0) as good_rate from " . TABLEPRE . "witkey_space where uid=" . intval($rateuid));
    return $good_rate[good_rate];
}
开发者ID:pengfeiaaa,项目名称:web,代码行数:31,代码来源:goodslist.php

示例3: in

            case 'buy_service':
                $a = "你选择了<a href='" . $arrDt['feed_username']['url'] . "'>" . $arrDt['feed_username']['content'] . "</a>的服务<a href='" . $arrDt['event']['url'] . "'>" . $arrDt['event']['content'] . "</a>";
                break;
            case 'pub_task':
                $a = "你发布了需求<a href='" . $arrDt['event']['url'] . "'>" . $arrDt['event']['content'] . "</a>";
                break;
            case 'gy':
                $a = "你向<a href='" . $arrDt['feed_username']['url'] . "'>" . $arrDt['feed_username']['content'] . "</a>发起了测试请求";
                break;
        }
        $arr[$key]['dongtai'] = $a;
        $arr[$key]['time'] = $v['feed_time'];
    }
}
if ($strFriends[0]['fuids']) {
    $arrFeeds = kekezu::get_feed(" uid in (" . $strFriends[0]['fuids'] . ") and (feedtype='pub_task' or feedtype='pub_service')", 'feed_time desc', '5');
}
$strSql = " select * from " . TABLEPRE . "witkey_favorite where keep_type = 'service' and uid=" . $gUid . " order by on_date desc limit 0,3";
$arrFavorite = db_factory::query($strSql);
$arrTaskStatus = '3,4,5,6,7,8';
$strSql = "select a.work_id,a.task_id,a.uid,a.username,b.start_time,b.task_title,b.task_cash from " . TABLEPRE . "witkey_task_work as a left join " . TABLEPRE . "witkey_task as b on a.task_id=b.task_id where b.task_status in (" . $arrTaskStatus . ") and b.uid=" . intval($gUid) . " order by a.work_id desc limit 3";
$arrTaskWorkInfo = db_factory::query($strSql);
foreach ($arrTaskWorkInfo as $k => $v) {
    $arrRecord[$v['start_time']]['objname'] = $v['task_title'];
    $arrRecord[$v['start_time']]['url'] = 'index.php?do=task&id=' . $v['task_id'];
    $arrRecord[$v['start_time']]['cash'] = $v['task_cash'];
    $arrRecord[$v['start_time']]['wiki_uid'] = $v['uid'];
    $arrRecord[$v['start_time']]['wiki_username'] = $v['username'];
}
$strSql = "select a.bid_id,a.task_id,a.uid,a.username,b.start_time,b.task_title,b.task_cash from " . TABLEPRE . "witkey_task_bid as a left join " . TABLEPRE . "witkey_task as b on a.task_id=b.task_id where b.task_status in (" . $arrTaskStatus . ") and b.uid=" . intval($gUid) . " order by a.bid_id desc limit 3";
$arrTaskBidInfo = db_factory::query($strSql);
开发者ID:xupnge1314,项目名称:project,代码行数:31,代码来源:gz_index.php


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