本文整理汇总了PHP中db_factory::get_count方法的典型用法代码示例。如果您正苦于以下问题:PHP db_factory::get_count方法的具体用法?PHP db_factory::get_count怎么用?PHP db_factory::get_count使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类db_factory
的用法示例。
在下文中一共展示了db_factory::get_count方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: querySelect
static function querySelect($table_name, $field, $tablefields)
{
$db_factory = new db_factory();
$fori = 0;
$forlimit = 500;
$sqlCount = $db_factory->get_count("select count(*) from " . $table_name);
if (!$sqlCount) {
return false;
}
$tabledump = '';
$numfields = count($tablefields);
while ($fori <= $sqlCount) {
$sql = $db_factory->query("select * from " . $table_name . " limit " . $fori . "," . $forlimit);
foreach ($sql as $r) {
$row = array_values($r);
$sqlmsg = $comma = '';
for ($i = 0; $i < $numfields; $i++) {
$sqlmsg .= $comma . (!empty($row[$i]) && (self::strexists($tablefields[$i]['Type'], 'char') || self::strexists($tablefields[$i]['Type'], 'text')) ? '0x' . bin2hex($row[$i]) : '\'' . mysql_escape_string($row[$i]) . '\'');
$comma = ',';
}
$tabledump .= " INSERT INTO " . $table_name . " VALUES(" . $sqlmsg . ") ;\n";
}
$fori += $forlimit;
}
return $tabledump;
}
示例2: case_obj_exists
function case_obj_exists($id, $obj = 'task')
{
if ($obj == 'task') {
$search_obj = db_factory::get_count(sprintf("select count(task_id) from %switkey_task where task_id='%d' ", TABLEPRE, $id));
} elseif ($obj == 'service') {
$search_obj = db_factory::get_count(sprintf("select count(service_id) from %switkey_service where service_id='%d' ", TABLEPRE, $id));
}
if ($search_obj) {
return true;
} else {
return false;
}
}
示例3: order_charge
function order_charge()
{
global $_K;
$order_id = $this->_order_id;
$sid = $this->_obj_id;
$uid = $this->_uid;
$user_info = $this->_userinfo;
$order_info = db_factory::get_one(sprintf(" select order_status,order_uid,order_username,seller_uid,seller_username from %switkey_order where order_id='%d'", TABLEPRE, $order_id));
$url = $_K['siteurl'] . "/index.php?do=user&view=finance&op=order&obj_type=service&role=2&order_id=" . $order_id;
$s_order_link = "<a href=\"" . $_K['siteurl'] . "/index.php?do=user&view=finance&op=order&obj_type=service&role=1&order_id=" . $order_id . "\">" . $order_info['order_name'] . "</a>";
$b_order_link = "<a href=\"" . $_K['siteurl'] . "/index.php?do=user&view=finance&op=order&obj_type=service&role=2&order_id=" . $order_id . "\">" . $order_info['order_name'] . "</a>";
if ($order_info['order_status'] == 'wait') {
$service_info = keke_shop_class::get_service_info($sid);
$service_status = db_factory::get_count(sprintf(" select service_status from %switkey_service where service_id='%d'", TABLEPRE, $sid));
if ($service_status == '2') {
$data = array(':service_id' => $service_info['service_id'], ':title' => $service_info['title']);
keke_finance_class::init_mem('buy_service', $data);
$this->_total_fee > 0 and $res = keke_finance_class::cash_out($uid, $this->_total_fee, 'buy_service', '0', 'service', $order_id);
if ($res) {
db_factory::execute(sprintf(" update %switkey_order set order_status='ok' where order_id='%d'", TABLEPRE, $order_id));
$v_arr = array('用户名' => $order_info['order_username'], '网站名称' => $kekezu->_sys_config['website_name'], '用户' => $_lang['you'], '动作' => $_lang['haved_confirm_pay'], '订单编号' => $order_id, '订单链接' => $b_order_link);
keke_shop_class::notify_user($order_info['order_uid'], $order_info['order_username'], "order_change", $_lang['goods_order_confirm_pay'], $v_arr);
$v_arr = array('用户名' => $order_info['order_username'], '网站名称' => $kekezu->_sys_config['website_name'], '用户' => $order_info['order_username'], '动作' => $_lang['haved_confirm_pay'], '订单编号' => $order_id, '订单链接' => $s_order_link);
keke_shop_class::notify_user($order_info['seller_uid'], $order_info['seller_username'], "order_change", $_lang['goods_order_confirm_pay'], $v_arr);
$notice = $_lang['goods_pay_success'];
$type = 'success';
} else {
$notice = $_lang['goods_pay_fail'];
$type = 'warning';
}
} else {
db_factory::execute(sprintf(" update %switkey_order set order_status='close' where order_id='%d'", TABLEPRE, $order_id));
$v_arr = array('用户名' => $order_info['seller_username'], '网站名称' => $kekezu->_sys_config['website_name'], "用户" => $_lang['system'], '动作' => $_lang['stop_your_order_and_your_cash_return'], '订单编号' => $order_id, '订单链接' => $s_order_link);
keke_shop_class::notify_user($order_info['seller_uid'], $order_info['seller_username'], "order_change", $_lang['goods_order_close'], $v_arr);
$v_arr = array('用户名' => $order_info['order_username'], '网站名称' => $kekezu->_sys_config['website_name'], "用户" => $_lang['system'], '动作' => $_lang['stop_your_order_and_your_cash_return'], '订单编号' => $order_id, '订单链接' => $b_order_link);
keke_shop_class::notify_user($order_info['order_uid'], $order_info['order_username'], "order_change", $_lang['goods_order_close'], $v_arr);
$notice = $_lang['goods_pay_fail'];
$type = 'warning';
}
} else {
$notice = $_lang['goods_pay_success'];
$type = 'success';
}
return pay_return_fac_class::struct_response($_lang['operate_notice'], $notice, $url, $type);
}
示例4: bindingAccount
public static function bindingAccount($uid, $username, $arrSaveinfo)
{
$returnValue = FALSE;
$strSql = "select count(id) from " . TABLEPRE . "witkey_member_oauth\n\t\t\t\twhere source ='" . $arrSaveinfo['type'] . "' and oauth_id='{$arrSaveinfo['account']}' and uid=" . $uid;
$isBind = db_factory::get_count($strSql);
if (!$isBind) {
$objMemberOauth = new Keke_witkey_member_oauth_class();
$objMemberOauth->setAccount($arrSaveinfo['nickname']);
$objMemberOauth->setOauth_id($arrSaveinfo['account']);
$objMemberOauth->setSource($arrSaveinfo['type']);
$objMemberOauth->setUid($uid);
$objMemberOauth->setUsername($username);
$objMemberOauth->setOn_time(time());
$intRes = $objMemberOauth->create_keke_witkey_member_oauth();
unset($objMemberOauth);
$intRes and $returnValue = TRUE or $returnValue = FALSE;
}
return $returnValue;
}
示例5: alipay_trust_response
public function alipay_trust_response($url)
{
global $_lang;
switch ($this->_action) {
case "sns_bind":
switch ($this->_data['is_success']) {
case "T":
$uid = $this->_data['sns_user_id'];
$username = db_factory::get_count(sprintf("select username from %switkey_member where uid='%d'", TABLEPRE, $uid));
$key = $this->_data['key'];
$account = $this->_data['alipay_login_id'];
$oauth_id = $this->_data['alipay_card_no'];
$id = db_factory::get_count(sprintf(" select id from %switkey_member_oauth where uid='%d' and username='%d' and source='alipay_trust'", TABLEPRE, $uid, $username));
if ($id) {
$sql = " update %switkey_member_oauth set account='%s',oauth_id='%s',bind_key='%s' where id='%d'";
$res = db_factory::execute(sprintf($sql, TABLEPRE, $account, $oauth_id, $key, $id));
} else {
$sql = " insert into %switkey_member_oauth values('','alipay_trust','%s','%d','%s','%d','%s','%s')";
$res = db_factory::execute(sprintf($sql, TABLEPRE, $account, $uid, $username, time(), $oauth_id, $key));
}
break;
case "F":
$res = false;
break;
}
$res and $this->notify($url, $_lang['alipay_db_bind_success']) or $this->notify($url, $_lang['alipay_db_bind_fail'], "fail");
break;
case "cancel_bind":
switch ($this->_data['is_success']) {
case "T":
$uid = $this->_data['sns_user_id'];
$sql = " delete from %switkey_member_oauth where uid='%d' and source='alipay_trust'";
$res = db_factory::execute(sprintf($sql, TABLEPRE, $uid));
break;
case "F":
$res = false;
break;
}
$res and $this->notify($url, $_lang['alipay_db_unbind_success']) or $this->notify($url, $_lang['alipay_db_unbind_fail'], "fail");
break;
}
}
示例6: dispose_task
public function dispose_task()
{
global $kekezu, $_lang;
$prom_obj = $objProm = keke_prom_class::get_instance();
$model_code = $this->_model_code;
$agree_info = $this->_agree_info;
$cash_info = db_factory::get_one(sprintf(" select task_cash,task_union,real_cash from %switkey_task where task_id = '%d'", TABLEPRE, $this->_task_id));
$this->plus_mark_num();
keke_user_mark_class::create_mark_log($model_code, '1', $agree_info['seller_uid'], $agree_info['buyer_uid'], $agree_info['work_id'], $cash_info['task_cash'], $this->_task_id, $this->_seller_username, $this->_buyer_username);
keke_user_mark_class::create_mark_log($model_code, '2', $agree_info['buyer_uid'], $agree_info['seller_uid'], $agree_info['work_id'], $cash_info['real_cash'], $this->_task_id, $this->_buyer_username, $this->_seller_username);
$site_profit = $cash_info['task_cash'] - $cash_info['real_cash'];
$task_title = db_factory::get_count(sprintf(" select task_title from %switkey_task where task_id='%d'", TABLEPRE, $this->_task_id));
$data = array(':task_id' => $this->_task_id, ':task_title' => $task_title);
keke_finance_class::init_mem('task_bid', $data);
keke_finance_class::cash_in($agree_info['seller_uid'], $cash_info['real_cash'], 'task_bid', '', 'task', $this->_task_id, $site_profit);
$feed_arr = array("feed_username" => array("content" => $this->_seller_uid, "url" => "index.php?do=seller&id={$this->_seller_uid}"), "action" => array("content" => $_lang['success_bid_haved'], "url" => ""), "event" => array("content" => $task_title, "url" => "index.php?do=task&id={$this->_task_id}", 'cash' => $cash_info['real_cash']));
kekezu::save_feed($feed_arr, $this->_seller_uid, $this->_seller_username, 'work_accept', $this->_task_id);
$prom_obj->dispose_prom_event("bid_task", $agree_info['seller_uid'], $this->_task_id);
$prom_obj->dispose_prom_event("pub_task", $agree_info['buyer_uid'], $this->_task_id);
}
示例7: install_auth
public static function install_auth($auth_dir)
{
global $_lang;
$tab_obj = keke_table_class::get_instance("witkey_auth_item");
if ($auth_dir) {
$file_path = S_ROOT . "./auth/" . $auth_dir . "/admin/auth_config_inc.php";
if (file_exists($file_path)) {
require $file_path;
$exists = db_factory::get_count(" select auth_code from " . TABLEPRE . "witkey_auth_item where auth_dir = '{$auth_dir}'");
$exists and kekezu::admin_show_msg($_lang['auth_item_exist_add_fail'], $_SERVER['HTTP_REFERER'], '3', '', 'error');
$res = $tab_obj->save($auth_config);
if (file_exists(S_ROOT . "./auth/" . $auth_dir . "/admin/install_sql.php")) {
require S_ROOT . "./auth/" . $auth_dir . "/admin/install_sql.php";
}
$res and kekezu::admin_system_log($_lang['add_auth_item'] . "{$res}");
$res and kekezu::admin_show_msg($_lang['auth_item_add_success'], $_SERVER['HTTP_REFERER'], '3', '', 'success');
} else {
kekezu::admin_show_msg($_lang['unknow_error_add_fail'], $_SERVER['HTTP_REFERER'], '3', '', 'error');
}
} else {
kekezu::admin_show_msg($_lang['unknow_error_add_fail'], $_SERVER['HTTP_REFERER'], '3', '', 'error');
}
}
示例8: analysis_data
function analysis_data($path, $every_year = false)
{
global $year_arr, $_lang;
$detail_arr = array($_lang['total'], $_lang['witkey_task'], $_lang['witkey_shop'], $_lang['payitem_service'], $_lang['user_auth']);
if (strtolower(CHARSET) == 'gbk') {
$detail_arr = kekezu::gbktoutf($detail_arr);
}
$series = '';
$total = $bid_ins = $service_ins = $item_ins = $auth_ins = 0;
foreach ($year_arr as $key => $value) {
$bid_in = db_factory::get_count(sprintf(" select sum(site_profit) as cash from %switkey_finance where (fina_action='task_bid' or fina_action='pub_task') and site_profit>0 and (fina_type='in' or fina_type='out') and YEAR(FROM_UNIXTIME(fina_time))=%d", TABLEPRE, $value['year']));
$bid_ins += $bid_in;
$service_in = db_factory::get_count(sprintf(" select sum(site_profit) as cash from %switkey_finance where fina_action='sale_service' and fina_type='in' and YEAR(FROM_UNIXTIME(fina_time))=%d", TABLEPRE, $value['year']));
$service_ins += $service_in;
$item_in = db_factory::get_count(sprintf(" select sum(site_profit) as cash from %switkey_finance where fina_action='payitem' and fina_type='out' and YEAR(FROM_UNIXTIME(fina_time))=%d", TABLEPRE, $value['year']));
$item_ins += $item_in;
$auth_in = db_factory::get_count(sprintf(" select sum(site_profit) as cash from %switkey_finance where INSTR(fina_action,'_auth') and fina_type='out' and YEAR(FROM_UNIXTIME(fina_time))=%d", TABLEPRE, $value['year']));
$auth_ins += $auth_in;
$point = '';
$point .= '<point name="' . $detail_arr['1'] . '" y="' . $bid_in . '"/>';
$point .= '<point name="' . $detail_arr['2'] . '" y="' . $service_in . '"/>';
$point .= '<point name="' . $detail_arr['3'] . '" y="' . $item_in . '"/>';
$point .= '<point name="' . $detail_arr['4'] . '" y="' . $auth_in . '"/>';
if ($every_year == true) {
$year_path = sprintf($path, $value['year']);
update_xml($year_path, '<data><series name="Series 1">' . $point . '</series></data>', 'analysis');
}
}
$str = '';
$str .= '<series name="Series 1">';
$str .= '<point name="' . $detail_arr['1'] . '" y="' . $bid_ins . '"/>';
$str .= '<point name="' . $detail_arr['2'] . '" y="' . $service_ins . '"/>';
$str .= '<point name="' . $detail_arr['3'] . '" y="' . $item_ins . '"/>';
$str .= '<point name="' . $detail_arr['4'] . '" y="' . $auth_ins . '"/>';
$str .= '</series>';
return update_xml(sprintf($path, 'total'), '<data>' . $str . '</data>', 'analysis');
}
示例9: defined
<?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';
示例10: foreach
case '3':
$strWhere .= " order by a.price desc ";
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));
示例11: get_order_id
public static function get_order_id($obj_type, $obj_id)
{
$sql = "select order_id from %switkey_order_detail where obj_type='%s' and obj_id='%d'";
return db_factory::get_count(sprintf($sql, TABLEPRE, $obj_type, $obj_id));
}
示例12: WHERE
break;
case 'W':
$strWhere .= " and task_status=0 ";
break;
default:
$intTaskStatus = -1;
break;
}
}
} else {
$intTaskStatus = -1;
}
$strSql = "SELECT task_id, model_id, task_title, task_cash, task_cash_coverage, start_time, task_status FROM `" . TABLEPRE . "witkey_task` WHERE (task_id IN ( SELECT task_id FROM " . TABLEPRE . "witkey_task_bid WHERE uid = " . $gUid . " ) OR task_id IN ( SELECT task_id FROM " . TABLEPRE . "witkey_task_work WHERE uid = " . $gUid . " ) )";
$strCountSql = "SELECT count(*) count FROM `" . TABLEPRE . "witkey_task` WHERE ( task_id IN ( SELECT task_id FROM " . TABLEPRE . "witkey_task_bid WHERE uid = " . $gUid . " ) OR task_id IN ( SELECT task_id FROM " . TABLEPRE . "witkey_task_work WHERE uid = " . $gUid . " ) )";
in_array($strOrder, array_keys($arrListOrder)) and $strWhere .= " order by " . $strOrder or $strWhere .= " order by task_id desc";
$intCount = intval(db_factory::get_count($strCountSql . $strWhere));
$strPages = $page_obj->getPages($intCount, $intPagesize, $intPage, $strUrl);
$arrTaskLists = db_factory::query($strSql . $strWhere . $strPages['where']);
if ($arrTaskLists) {
foreach ($arrTaskLists as $k => $v) {
if (in_array($v['model_id'], array('4', '5'))) {
$bidInfo = db_factory::get_one("SELECT bid_id FROM " . TABLEPRE . "witkey_task_bid WHERE uid = " . $gUid . " and task_id = " . $v['task_id'] . " ORDER BY bid_id DESC LIMIT 1");
$arrTaskLists[$k]['bid_id'] = $bidInfo['bid_id'];
} else {
$bidInfo = db_factory::get_one("SELECT work_id FROM " . TABLEPRE . "witkey_task_work WHERE uid = " . $gUid . " and task_id = " . $v['task_id'] . " ORDER BY work_id DESC LIMIT 1");
$arrTaskLists[$k]['work_id'] = $bidInfo['work_id'];
}
}
}
}
function wiki_opera($m_id, $t_id, $w_id, $url)
示例13: defined
<?php
defined('ADMIN_KEKE') or exit('Access Denied');
kekezu::admin_check_role(140);
if (isset($submit)) {
$basic_obj = new Keke_witkey_basic_config_class();
foreach ($conf as $k => $v) {
$basic_obj->setWhere("k = '{$k}'");
$basic_obj->setV($v);
$res .= $basic_obj->edit_keke_witkey_basic_config();
}
!empty($api) and $attent_api = $api or $attent_api = array();
$basic_obj->setWhere("k = 'attent_api_open'");
$basic_obj->setV(serialize($attent_api));
$basic_obj->edit_keke_witkey_basic_config();
kekezu::admin_system_log($_lang['weibo_config_view']);
kekezu::admin_show_msg($_lang['weibo_view_config_success'], "index.php?do=msg&view=attention", 3, '', 'success');
} else {
$attent_api = db_factory::get_count(sprintf(" select v from %switkey_basic_config where type='attent_api'", TABLEPRE));
$attent_api = unserialize($attent_api);
$attent_list = kekezu::get_table_data("k,v,desc", "witkey_basic_config", "type='attention'", 'listorder asc ', "", "", "k");
}
require keke_tpl_class::template(ADMIN_DIRECTORY . '/tpl/admin_' . $do . '_' . $view);
示例14: getmessagecount
static function getmessagecount($uid)
{
$intCountTrends = db_factory::get_count("select count(msg_id) from " . TABLEPRE . "witkey_msg where uid<1 and view_status!=1 and type=1 and to_uid=" . intval($uid));
$intCountNotice = db_factory::get_count("select count(msg_id) from " . TABLEPRE . "witkey_msg where uid<1 and view_status!=1 and type=2 and to_uid=" . intval($uid));
$intCountPrivate = db_factory::get_count("select count(msg_id) from " . TABLEPRE . "witkey_msg where to_uid = " . intval($uid) . " and view_status!=1 and uid>0 and msg_status<>2 ");
return intval($intCountTrends) + intval($intCountNotice) + intval($intCountPrivate);
}
示例15: keke_oauth_login_class
$_footerAbouts = CommonClass::getFooterPage();
$log_account = null;
if (isset($_COOKIE['log_account'])) {
$log_account = $_COOKIE['log_account'];
}
$wb_type = $_SESSION['wb_type'];
if ($wb_type && $_SESSION['auth_' . $wb_type]['last_key']) {
$oa = new keke_oauth_login_class($wb_type);
$oauth_user_info = $oa->get_login_user_info();
}
if (intval($u)) {
if (!isset($_COOKIE['prom'])) {
$objProm = keke_prom_class::get_instance();
$objProm->create_prom_cookie($_SERVER['QUERY_STRING']);
}
}
$arrTopIndus = db_factory::query("SELECT count(task_id) as count ,indus_id FROM " . TABLEPRE . "witkey_task where task_status>=2 group by indus_id order by count desc limit 5");
kekezu::redirect_second_domain();
$arrDisplaypro = CommonClass::getDistrictByPid('0', 'id,upid,name');
if ($gUid) {
//2015-08-02 修改 task_status 由0->8
$intWaitPay = db_factory::query("select count(*) as count from " . TABLEPRE . "witkey_task where uid=" . intval($gUid) . " and task_status=0");
$intChoose = db_factory::query("select count(*) as count from " . TABLEPRE . "witkey_task where uid=" . intval($gUid) . " and task_status=3");
$intShopPay = db_factory::query("select count(*) as count from " . TABLEPRE . "witkey_order a left join " . TABLEPRE . "witkey_order_detail b on a.order_id=b.order_id\n\t\t where a.order_uid=" . intval($gUid) . " and a.order_status='wait' and b.obj_type='service'");
$intMarkG = db_factory::execute("select * from " . TABLEPRE . "witkey_mark where mark_status=0 and mark_type=2 and by_uid=" . intval($gUid));
$intMarkW = db_factory::execute("select * from " . TABLEPRE . "witkey_mark where mark_status=0 and mark_type=1 and by_uid=" . intval($gUid));
$intService = db_factory::get_count("SELECT COUNT(*) as count2 FROM `" . TABLEPRE . "witkey_order` AS a LEFT JOIN " . TABLEPRE . "witkey_order_detail AS b ON a.order_id = b.order_id LEFT JOIN " . TABLEPRE . "witkey_service_order AS c ON b.order_id = c.order_id WHERE 1=1 and a.seller_uid = " . $gUid . " and b.obj_type = 'service' and a.order_status ='seller_confirm' order by b.order_id desc");
$intGy = db_factory::get_count("SELECT count(*) as count2 FROM `" . TABLEPRE . "witkey_service_order` as a LEFT JOIN " . TABLEPRE . "witkey_order_detail as b ON a.order_id = b.order_id\n\t\t\tLEFT JOIN " . TABLEPRE . "witkey_order as c ON a.order_id = c.order_id\n\t\t\tWHERE 1=1 and c.seller_uid= " . $gUid . " and c.order_status!= 'close' and c.order_status ='seller_confirm' order by c.order_time desc");
}
require 'control/' . $do . '.php';
require $kekezu->_tpl_obj->template($do);