if (intval($m)) { $strWhere .= " and a.model_id = " . intval($m); } if (intval($p)) { $arrCityone = CommonClass::getDistrictById($p); $strWhere .= " and a.province = " . intval($p); $two = db_factory::get_table_data("*", "witkey_district", "upid=" . intval($p)); } if (intval($twoid)) { $arrCitytwo = CommonClass::getDistrictById($twoid); $strWhere .= " and a.city = " . intval($twoid); $three = db_factory::get_table_data("*", "witkey_district", "upid=" . intval($twoid)); $twoid and $strUrl .= "&twoid=" . intval($twoid); } if (intval($threeid)) { $arrCitythree = CommonClass::getDistrictById($threeid); $strWhere .= " and a.area = " . intval($threeid); } $ky and $strWhere .= " and a.title like '%{$ky}%' "; $intCount = db_factory::execute($strSql . $strWhere); if (isset($o)) { switch (intval($o)) { case '1': $strWhere .= " order by a.sale_num desc "; break; case '2': $strWhere .= " order by a.sale_num asc "; break; case '3': $strWhere .= " order by a.price desc "; break;
<?php $regionCfg = keke_glob_class::getRegionConfig(); $arrDistrictInfo = db_factory::get_one("select * from " . TABLEPRE . "witkey_task where task_id=" . intval($id)); $province = CommonClass::getDistrictById($arrDistrictInfo['province']); $city = CommonClass::getDistrictById($arrDistrictInfo['city']); $area = CommonClass::getDistrictById($arrDistrictInfo['area']); $page and $page = intval($page); $page = intval($page) ? $page : 1; $pagesize = intval($pagesize) ? $pagesize : 10; $objTask = preward_task_class::get_instance($arrTaskInfo); $arrTaskInfo = $objTask->_task_info; $objTask->plus_view_num(); $intFollow = db_factory::get_count(sprintf('select count(*) from %s where uid = %d and fuid = %d', TABLEPRE . 'witkey_free_follow', intval($gUid), intval($arrTaskInfo['uid']))); $intFavorite = db_factory::get_count(sprintf('select count(*) from %s where uid = %d and obj_id = %d and keep_type = "task"', TABLEPRE . 'witkey_favorite', intval($gUid), intval($arrTaskInfo['task_id']))); if ($arrTaskInfo['task_pic']) { $arrTaskPics = explode(',', $arrTaskInfo['task_pic']); } $arrProcess_can = $objTask->process_can(); $arrTaskFiles = $objTask->get_task_file(); $arrPayitemShow = $objTask->getPayitemShow(); $arrWorkStatus = $objTask->get_work_status(); if (strtoupper(CHARSET) == 'GBK') { $arrWorkStatus = kekezu::gbktoutf($arrWorkStatus); } $jsonWorkStatus = json_encode($arrWorkStatus); $Exitworker = db_factory::get_one("select * from " . TABLEPRE . "witkey_task_work where task_id = " . $arrTaskInfo['task_id'] . " and uid=" . $gUid); $arrProjectProgress = $objTask->getProjectProgressDesc(); $objTime = new preward_time_class(); $objTime->validtaskstatus(); $intBidCount = $objTask->get_work_count("work_status=6");
$strWhere .= " order by a.tasktop desc,a.task_id desc "; break; } $strTaskSql = "select a.*,d.* from " . TABLEPRE . "witkey_task as a left join " . TABLEPRE . "witkey_task_cash_cove d on a.task_cash_coverage=d.cash_rule_id\n\t\twhere "; $intCount = db_factory::execute($strTaskSql . $strWhere); $arrDatas = $page_obj->getPages($intCount, $intPagesize, $intPage, $strUrl); $arrTaskLists = db_factory::query($strTaskSql . $strWhere . $arrDatas['where']); if (is_array($arrTaskLists)) { foreach ($arrTaskLists as $k => $v) { $arrFavorite = db_factory::get_count(sprintf('select count(*) from %s where uid = %d and obj_id = %d and keep_type = "task"', TABLEPRE . 'witkey_favorite', intval($gUid), intval($v['task_id']))); if ($arrFavorite) { $arrTaskLists[$k]['favorite'] = true; } $province = CommonClass::getDistrictById($v['province']); $city = CommonClass::getDistrictById($v['city']); $area = CommonClass::getDistrictById($v['area']); $arrTaskLists[$k]['province_name'] = $province['name']; $arrTaskLists[$k]['city_name'] = $city['name']; $arrTaskLists[$k]['area_name'] = $area['name']; unset($arrFollow); } } $strPages = $arrDatas['page']; $arrSJ = array('1' => '未托管', '2' => '已托管'); $arrTaskS = array('1' => '工作中', '2' => '选稿中', '3' => '交付中', '4' => '已结束'); $data = array('地区' => $arrCityone['name'] . $arrCitytwo['name'] . $arrCitythree['name'], '任务模式' => $arrTaskNavs[$m]['model_name'], '赏金状态' => $arrSJ[$r], '任务状态' => $arrTaskS[$s], '行业' => $arrIndusPInfo['indus_name'], '子行业' => $arrIndusInfo['indus_name']); list($strPageTitle, $strPageKeyword, $strPageDescription) = keke_seo_class::getListSEO($pd, $i, $data, 'task', true); unset($objTaskT); $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); $_SESSION['spread'] = 'index.php?do=tasklist';
$strWhere .= " order by if(b.seller_total_num>0,b.seller_good_num/b.seller_total_num,0) desc "; break; case '4': $strWhere .= " order by if(b.seller_total_num>0,b.seller_good_num/b.seller_total_num,0) asc"; break; case '5': $strWhere .= " order by totalcash desc"; break; case '6': $strWhere .= " order by totalcash asc "; break; } } else { $strWhere .= " order by b.seller_credit desc,b.recommend desc,a.shop_id desc "; } $arrCityInfo = CommonClass::getDistrictById($p); $intCount = db_factory::execute($strSql . $strWhere); $strPages = $kekezu->_page_obj->getPages($intCount, $intPagesize, $intPage, $strUrl); $strWhere .= $strPages['where']; $arrSellerLists = db_factory::query($strSql . $strWhere); if (is_array($arrSellerLists)) { $arrNerLists = array(); foreach ($arrSellerLists as $k => $v) { $arrService = db_factory::query("select * from " . TABLEPRE . "witkey_service where service_status=2 and uid=" . intval($v['uid']) . " order by sale_num desc limit 0,3"); $arrNerLists[$k] = $v; $arrNerLists[$k]['service'] = $arrService; if (is_array($arrNerLists[$k]['service'])) { foreach ($arrNerLists[$k]['service'] as $kk => $vv) { $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($vv['service_id']))); if ($arrFavorite) { $arrNerLists[$k]['service'][$kk]['favorite'] = true;
//添加 2015-07-25 /*$stdCacheName = 'task_cache_'.$id.'_' . substr ( md5 ( $gUid ), 0, 6 ); $objRelease = tender_release_class::get_instance ($id,$pub_mode); $objRelease->get_task_obj ( $stdCacheName ); $objRelease->pub_mode_init( $stdCacheName,$init_info); $arrPubInfo = $objRelease->_std_obj->_release_info; $arrPubInfo['indus_pid'] and $arrAllIndustrys = CommonClass::getIndustryByPid($arrPubInfo['indus_pid'],'indus_id,indus_pid,indus_name'); $arrCashCove = $objRelease->_cash_cove; $arrPubInfo and $_POST = array_merge ( $arrPubInfo, $_POST );*/ $arrModelInfo = $model_list[$arrTaskInfo['model_id']]; $arrProvinces = CommonClass::getDistrictByPid('0', 'id,upid,name'); if ($gUserInfo['city']) { $arrCity = CommonClass::getDistrictById($gUserInfo['city'], 'id,upid,name'); } if ($gUserInfo['area']) { $arrArea = CommonClass::getDistrictById($gUserInfo['area'], 'id,upid,name'); } switch ($arrModelInfo['model_code']) { case 'sreward': $objTask = sreward_task_class::get_instance($arrTaskInfo); break; case 'preward': $objTask = preward_task_class::get_instance($arrTaskInfo); break; case 'mreward': $objTask = mreward_task_class::get_instance($arrTaskInfo); break; case 'tender': $objTask = tender_task_class::get_instance($arrTaskInfo); break; case 'dtender':
<?php if ($op == 'showMap') { $shopInfo = db_factory::get_one(sprintf(" select * from %switkey_shop where uid='%d' ", TABLEPRE, intval($id))); $arrProvinces = CommonClass::getDistrictByPid('0', 'id,upid,name'); if ($shopInfo['province']) { $province = $arrProvinces[intval($shopInfo['province'])]['name']; if ($shopInfo['city']) { $arrCity = CommonClass::getDistrictById($shopInfo['city'], 'id,upid,name'); $city = $arrCity['name']; } } $coordinateArr = explode(',', $shopInfo['coordinate']); $lng = $coordinateArr[0]; $lat = $coordinateArr[1]; }