Beispiel #1
0
            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];
}
Beispiel #2
0
<?php

defined('IN_KEKE') or exit('Access Denied');
$strNavActive = 'articlelist';
$strUrl = $_K['siteurl'] . "/index.php?do=articlelist";
$catid and $strUrl .= "&catid=" . intval($catid);
$intPage and $strUrl .= "&intPage=" . $intPage;
$arrArtCats = kekezu::get_table_data("*", "witkey_article_category", "cat_type='article' and art_cat_pid=1", "listorder asc", "", "", "", null);
$page and $intPage = intval($page);
$intPage = intval($intPage) ? $intPage : 1;
$intPagesize = intval($intPagesize) ? $intPagesize : 20;
intval($catid) and $intCatid = intval($catid) or $intCatid = intval($arrArtCats['0']['art_cat_id']);
$intCatid and $strWhere .= " and a.art_cat_id = " . intval($intCatid);
$strWhere .= " and a.is_show!=2";
$strWhere .= " order by is_recommend desc,a.listorder asc,pub_time desc";
$strSql = "select a.* ,b.cat_name from " . TABLEPRE . "witkey_article a left join " . TABLEPRE . "witkey_article_category b on a.art_cat_id=b.art_cat_id where b.cat_type='article'  {$strWhere}";
$strCsql = "select count(a.art_id) as c  from " . TABLEPRE . "witkey_article a left join " . TABLEPRE . "witkey_article_category b on a.art_cat_id=b.art_cat_id where b.cat_type='article'  {$strWhere}";
$intCount = intval(db_factory::get_count($strCsql, 0, NULL, 10 * 60));
$kekezu->_page_obj->setStatic($static);
$strPages = $kekezu->_page_obj->getPages($intCount, $intPagesize, $intPage, $strUrl);
$arrArticleLists = db_factory::query($strSql . $strPages['where'], 5 * 60);
foreach ($arrArtCats as $k => $v) {
    intval($v['art_cat_id']) == $intCatid and $articleType = $v['cat_name'];
}
list($strPageTitle, $strPageKeyword, $strPageDescription) = keke_seo_class::getListSEO(0, 0, array('资讯分类' => $articleType), 'article', true);
$arrHotNews = db_factory::query("select * from " . TABLEPRE . "witkey_article where cat_type='article'  order by views desc limit 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,5", TABLEPRE, TABLEPRE), 1, $intIndexCacheTime);
$_SESSION['spread'] = 'index.php?do=articlelist';
Beispiel #3
0
    $strSql = 'select * from ' . TABLEPRE . 'witkey_case where ';
    $strWhere = ' 1=1 ';
    if ($t == '1') {
        $strWhere .= ' and obj_type="task" ';
    } else {
        if ($t == '2') {
            $strWhere .= ' and obj_type="service" ';
        }
    }
    $intCount = db_factory::get_count(' select count(case_id) as c from ' . TABLEPRE . 'witkey_case where ' . $strWhere, 0, null, 3600);
    $strPages = $kekezu->_page_obj->getPages($intCount, $intPagesize, $intPage, $strUrl);
    $arrCaseLists = db_factory::query($strSql . $strWhere . ' order by on_time desc ' . $strPages['where']);
}
$arrModelLabel = array(0 => '未知', 1 => '单人', 2 => '多人', 3 => '计件', 4 => '招标', 5 => '订金', 6 => '文件', 7 => '服务');
$arrCaseType = array('0' => '全部', '1' => '任务案例', '2' => '商品案例');
list($strPageTitle, $strPageKeyword, $strPageDescription) = keke_seo_class::getListSEO(0, 0, array('案例类型' => $arrCaseType[$t]), 'case', true);
foreach ($arrCaseLists as $caseK => $caseV) {
    if ($caseV['obj_type'] == 'task') {
        $arrTaskSql = 'select model_id,task_id,task_title,work_num,uid,username,task_pic,focus_num from ' . TABLEPRE . 'witkey_task where task_id = ' . $caseV['obj_id'];
        $arrTaskInfo = db_factory::get_one($arrTaskSql);
        $arrCaseLists[$caseK]['labelstyle'] = 'marked-task';
        $arrCaseLists[$caseK]['text'] = '投稿';
        $arrCaseLists[$caseK]['quantifier'] = '个';
        $arrCaseLists[$caseK]['focus_num'] = $arrTaskInfo['focus_num'];
        $arrCaseLists[$caseK]['from'] = '发布者';
        $arrCaseLists[$caseK]['num'] = intval($arrTaskInfo['work_num']);
        $arrCaseLists[$caseK]['objurl'] = $arrTaskInfo['task_id'] ? 'index.php?do=task&id=' . $arrTaskInfo['task_id'] : "javascript:tipsOp('该项目的源不存在,无法访问','warning')";
        $arrCaseLists[$caseK]['label'] = $arrModelLabel[intval($arrTaskInfo['model_id'])];
        $arrCaseLists[$caseK]['fromurl'] = $arrTaskInfo['uid'] ? 'index.php?do=seller&id=' . $arrTaskInfo['uid'] : "javascript:tipsOp('该项目的源不存在,无法访问','warning')";
        $arrCaseLists[$caseK]['username'] = $arrTaskInfo['username'] ? $arrTaskInfo['username'] : '******';
        unset($arrTaskInfo);