function save_comment($comment_arr, $obj_id, $is_reply = false) { global $_lang, $kekezu, $uid, $username; if (!$uid) { return -1; die; } $r = kekezu::check_session('task_leave', 2, 4); if ($r == false) { return -2; die; } strtolower(CHARSET) == 'gbk' and $comment_arr['content'] = kekezu::utftogbk(kekezu::escape($comment_arr['content'])); if (kekezu::k_match(array($kekezu->_sys_config['ban_content']), $comment_arr['content'])) { return -3; die; } $comment_id = $this->_comment_obj->save($comment_arr); $model_list = $kekezu->_model_list; if (!$is_reply) { if ($this->_comment_type == 'task') { $res = db_factory::execute(sprintf(" update %switkey_task set leave_num =ifnull(leave_num,0)+1 where task_id='%d'", TABLEPRE, $obj_id)); $obj_info = db_factory::get_one(sprintf("select * from %switkey_task where task_id=%d", TABLEPRE, $obj_id)); if ($obj_info['task_cash_coverage']) { $cash = $obj_info['task_cash_coverage']; } else { $cash = $obj_info['task_cash']; } } elseif ($this->_comment_type == 'service') { $res = db_factory::execute(sprintf(" update %switkey_service set leave_num =ifnull(leave_num,0)+1 where service_id='%d'", TABLEPRE, $obj_id)); $obj_info = db_factory::get_one(sprintf("select * from %switkey_service where service_id=%d", TABLEPRE, $obj_id)); } } return $comment_id; }
static function get_xml_toarr($xml_path = '') { global $_K; $xml_o = simplexml_load_file($xml_path); $xml_arr = kekezu::objtoarray($xml_o); if ($_K['charset'] == "gbk" || $_K['charset'] == "GBK") { return kekezu::utftogbk($xml_arr); } else { return $xml_arr; } }
<?php defined('IN_KEKE') or exit('Access Denied'); $indus_p_arr = $kekezu->_indus_p_arr; $objSpaceT = keke_table_class::get_instance('witkey_space'); if ($gUserInfo['indus_id']) { $arrUserIndus = db_factory::get_one(sprintf(" select * from %switkey_industry where indus_id='%d'", TABLEPRE, $gUserInfo['indus_id'])); } if (isset($ac) && $ac === 'getSkill') { $arrSkill = kekezu::get_skill(); isset($arrSkill[$indus_id]) and $get_skill = $arrSkill[$indus_id]; if (isset($arrSkill) && $get_skill) { kekezu::echojson('1', '1', $get_skill); } else { kekezu::echojson('1', '0'); } die; } if (isset($formhash) && kekezu::submitcheck($formhash)) { if (strtoupper(CHARSET) == 'GBK') { $strUserTags = kekezu::utftogbk($strUserTags); } if (strval($strUserTags)) { $strql = sprintf("update %switkey_space set skill_ids = '%s' where uid = '%d'", TABLEPRE, $strUserTags, $gUid); db_factory::execute($strql); } kekezu::show_msg('已保存', NULL, NULL, NULL, 'ok'); }
<?php if (isset($formhash) && kekezu::submitcheck($formhash)) { if (strtoupper(CHARSET) == 'GBK') { $tar_content = kekezu::utftogbk($tar_content); } $tar_content = kekezu::escape($tar_content); $aid = implode(",", array_keys($star)); $aid_star = implode(",", array_values($star)); $res = keke_user_mark_class::exec_mark($markId, $tar_content, $mark_status, $aid, $aid_star); if ($markType == 'gz') { $strJumpUrl = 'index.php?do=user&view=gz&op=mark'; } elseif ($markType == 'wk') { $strJumpUrl = 'index.php?do=user&view=wk&op=mark'; } if ($res === true) { kekezu::show_msg('操作成功', $strJumpUrl, 3, NULL, 'ok'); } else { kekezu::show_msg($res, $strJumpUrl, 3, NULL, 'fail'); } } else { $arrMark = keke_user_mark_class::get_mark_info(array('model_code' => $code, 'obj_id' => $objId, 'by_uid' => $uid, 'uid' => $to_uid)); $markInfo = $arrMark['mark_info']['0']; $markInfo or kekezu::show_msg($_lang['operate_notice'], "", "", $_lang['mark_sya_busy_try_later'], "error"); $aidList = keke_user_mark_class::get_mark_aid($roleType); $aidInfo = keke_user_mark_class::get_user_aid($markInfo['by_uid'], $markInfo['mark_type'], $markInfo['mark_status'], 2, $markInfo['model_code'], $objId); } require keke_tpl_class::template("tpl/default/ajax/mark"); die;
$objMsgM = new Keke_witkey_msg_class(); if (strtoupper(CHARSET) == 'GBK') { $to_username = kekezu::utftogbk($to_username); } $arrSpaceInfo = kekezu::get_user_info($to_username, 1); if (!$arrSpaceInfo) { $tips['errors']['to_username'] = '******'; kekezu::show_msg($tips, NULL, NULL, NULL, 'error'); } if ($arrSpaceInfo['uid'] == $gUid) { $tips['errors']['to_username'] = '******'; kekezu::show_msg($tips, NULL, NULL, NULL, 'error'); } if (strtoupper(CHARSET) == 'GBK') { $title = kekezu::utftogbk($title); $content = kekezu::utftogbk($content); } $objMsgM->setUid($gUid); $objMsgM->setUsername($username); $objMsgM->setTo_uid($arrSpaceInfo['uid']); $objMsgM->setTo_username($arrSpaceInfo['username']); $objMsgM->setTitle(kekezu::str_filter(kekezu::escape($title))); $objMsgM->setContent(kekezu::str_filter(kekezu::escape($content))); $objMsgM->setOn_time(time()); $objMsgM->setType(3); $objMsgM->create_keke_witkey_msg(); unset($objMsgM); kekezu::show_msg('已发送', NULL, NULL, NULL, 'ok'); } else { $userArrData = keke_user_class::get_user_info($id); }
public static function appWorkReport($obj, $obj_id, $to_uid, $to_username, $desc, $report_type, $front_status = null, $origin_id = null, $user_type = null, $file_name = NULL, $reason = NULL, $is_hide = 1) { global $uid, $username, $kekezu, $_lang; kekezu::check_login(); $transname = self::get_transrights_name($report_type); if (CHARSET == 'gbk') { $desc = kekezu::utftogbk($desc); $to_username = kekezu::utftogbk($to_username); $reason = kekezu::utftogbk($reason); } $report_obj = new Keke_witkey_report_class(); $report_obj->setObj($obj); $report_obj->setObj_id($obj_id); $report_obj->setUid($uid); $report_obj->setUsername($username); $report_obj->setUser_type($user_type); $report_obj->setOn_time(time()); $report_obj->setOrigin_id($origin_id); $report_obj->setTo_uid($to_uid); $report_obj->setTo_username($to_username); $report_obj->setReport_desc($desc); $report_obj->setReport_type($report_type); $report_obj->setFront_status($front_status); $report_obj->setReport_file($file_name); $report_obj->setReport_status(1); $report_obj->setIs_hide($is_hide); $report_obj->setReport_reason($reason); $report_id = $report_obj->create_keke_witkey_report(); if ($report_id) { return true; } else { return false; } }
defined('IN_KEKE') or exit('Access Denied'); if ($gUserInfo['user_type'] == '1') { kekezu::show_msg('非法操作', $strUrl . '&step=step2', NULL, NULL, 'ok'); } $step = keke_auth_enterprise_class::get_auth_step($step, $arrAuthInfo); $strUrl = "index.php?do=user&view=account&op=auth&code=" . $code; if ($arrAuthInfo['auth_status'] == 1 && $step == 'step2') { $step = 'step3'; } $strRandKf = kekezu::get_rand_kf(); switch ($step) { case "step1": if (isset($formhash) && kekezu::submitcheck($formhash)) { if (strtoupper(CHARSET) == 'GBK') { $username = kekezu::utftogbk($username); $enterprisename = kekezu::utftogbk($enterprisename); } $arrData = array('username' => $username, 'company' => $enterprisename, 'licen_num' => $licensenum, 'licen_pic' => $filepath); if ($objAuth->add_auth($arrData)) { $sql = "update " . TABLEPRE . "witkey_space set user_type = 2 where uid = " . $gUid; db_factory::execute($sql); kekezu::show_msg('认证信息已提交', $strUrl . '&step=step2', NULL, NULL, 'ok'); } else { $tips['errors']['email'] = '认证信息提交失败'; kekezu::show_msg($tips, NULL, NULL, NULL, 'error'); } } break; case "step2": break; case "step3":
public static function set_favor($pk, $keep_type, $model_code, $obj_uid, $obj_id, $obj_name, $origin_id, $url = '', $output = 'normal') { global $uid, $username; global $_lang; self::check_login($url, $output); self::check_if_favor($uid, $obj_uid, $pk, $keep_type, $model_code, $obj_id, $url, $output); $favor_type = keke_glob_class::get_favor_type(); $favor_obj = new Keke_witkey_favorite_class(); $favor_obj->_f_id = NULL; CHARSET == 'gbk' and $obj_name = kekezu::utftogbk($obj_name); $favor_obj->setKeep_type($keep_type); $favor_obj->setObj_type($model_code); $favor_obj->setObj_id($obj_id); $favor_obj->setObj_name($obj_name); $favor_obj->setOrigin_id($origin_id); $favor_obj->setUid($uid); $favor_obj->setUsername($username); $favor_obj->setOn_date(time()); $f_id = $favor_obj->create_keke_witkey_favorite(); if ($f_id) { if (in_array($keep_type, array('service', 'task', 'shop'))) { $up_tab = TABLEPRE . "witkey_" . $keep_type; db_factory::execute(sprintf("update %s set focus_num = focus_num+1 where %s='%d'", $up_tab, $pk, $obj_id)); } kekezu::keke_show_msg($url, $favor_type[$keep_type] . $_lang['collection_success'], "", $output); } else { kekezu::keke_show_msg($url, $favor_type[$keep_type] . $_lang['collection_fail'], "error", $output); } }
public static function set_task_comment($comment_arr, $is_reply = false) { strtolower(CHARSET) == 'gbk' and $comment_arr['content'] = kekezu::utftogbk($comment_arr['content']); $comment_arr['content'] = kekezu::escape(kekezu::str_filter($comment_arr['content'])); $lid = db_factory::inserttable(TABLEPRE . "witkey_comment", $comment_arr, 1); $is_reply or db_factory::execute(sprintf("update %switkey_task set leave_num = leave_num+1 where task_id = '%d'", TABLEPRE, $comment_arr['obj_id'])); return $lid; }
} $strUrl = "index.php?do=user&view=account&op=auth&code=" . $code; $strAlipayjsSql = sprintf("select * from %switkey_auth_alipayjs where uid=%d", TABLEPRE, $gUid); $arrAlipayjsAuthLists = db_factory::query($strAlipayjsSql); foreach ($arrAlipayjsAuthLists as $k => $v) { $arrAccountLists[] = $v['alipayjs_a_id']; } switch ($step) { case "step1": $arrAuthRecord = db_factory::query("select * from " . TABLEPRE . "witkey_auth_alipayjs where uid ='{$gUid}'"); if (isset($formhash)) { if ($arrAuthRecord) { db_factory::execute("delete from " . TABLEPRE . "witkey_auth_alipayjs where uid ='{$gUid}'"); } if (strtoupper(CHARSET) == 'GBK') { $real_name = kekezu::utftogbk($real_name); } $arrData = array('alipayjs_account' => $account, 'real_name' => $real_name); if ($objAuth->add_auth($arrData)) { kekezu::show_msg('认证信息已提交', $strUrl . '&step=step2', NULL, NULL, 'ok'); } else { $tips['errors']['account'] = '认证信息提交失败'; kekezu::show_msg($tips, NULL, NULL, NULL, 'error'); } } break; case "step2": if ($arrAuthInfo['auth_status'] > 0) { $step = 'step3'; if ($arrAuthInfo['auth_status'] == 1) { $auth_tips = '已通过';
//$bidId = $_POST['bid_id'];//$someVar = $_POST['someKey']; $upload = new keke_upload_class(S_ROOT . $pathDir, $fileFormat, $maxSize); $savename = $upload->run($filename, 1); if (is_array($savename)) { $name = $savename[0]['name']; $path = $pathDir . $savename[0]['saveName']; if ($fileType == 'service') { $size_a = array(100, 100); $size_b = array(210, 210); $result = keke_img_class::resize($path, $size_a, $size_b, true); } if ($fileType != 'sys') { keke_glob_class::waterMark($path); } $objFileT = keke_table_class::get_instance('witkey_file'); $arrData = array('file_name' => strtoupper(CHARSET) == 'GBK' ? kekezu::utftogbk($savename[0]['name']) : $savename[0]['name'], 'save_name' => $path, 'uid' => $gUid, 'username' => $gUsername, 'obj_type' => $objType, 'task_id' => $taskId, 'bid_id' => $objType, 'work_id' => $workId, 'on_time' => time()); $fileId = $objFileT->save($arrData); $msg = array('url' => $path, 'filename' => $filename, 'name' => $name, 'fileid' => intval($fileId)); } else { $err = $msg = $savename; } echo json_encode(array('err' => $err, 'msg' => $msg)); die; } function setUploadPath($fileType, $objType) { $pathDir = 'data/uploads/'; if ($fileType == 'sys' && $objType == 'auth') { $pathDir .= $fileType . '/' . $objType . '/'; } elseif ($fileType == 'sys' && $objType == 'ad') { $pathDir .= $fileType . '/' . $objType . '/';
$arrBankInfo = db_factory::get_one(" select * from " . TABLEPRE . "witkey_auth_bank where uid ='{$uid}' and auth_status=1 and bank_name='{$pay_type}'"); $arrUserBankInfo = kekezu::get_table_data("*", "witkey_member_bank", 'uid=' . $uid, '', "", '', ''); break; } break; case "4": if ($intSbtWithdraw) { $objWithdrawM = new Keke_witkey_withdraw_class(); if (isset($formhash) && kekezu::submitcheck($formhash)) { if ($gUserInfo['balance'] < floatval($intWithdrawCash)) { $tips['errors']['intWithdrawCash'] = '您的金额不足以提现'; kekezu::show_msg($tips, $strUrl . "&strStep=1&intReset=1", NULL, NULL, 'error'); } if (strtoupper(CHARSET) == 'GBK') { $pay_username = kekezu::utftogbk($pay_username); $pay_account = kekezu::utftogbk($pay_account); } $objWithdrawM->setWithdraw_cash(floatval($intWithdrawCash)); $objWithdrawM->setUid($uid); $objWithdrawM->setUsername($username); $objWithdrawM->setPay_username($pay_username); $objWithdrawM->setWithdraw_status(1); $objWithdrawM->setApplic_time(time()); $objWithdrawM->setPay_type($pay_type); $objWithdrawM->setPay_account($pay_account); $intWithdrawId = $objWithdrawM->create_keke_witkey_withdraw(); if ($intWithdrawId) { unset($_SESSION['withdraw_cash']); $arrPayway = array_merge(keke_glob_class::get_bank(), keke_glob_class::get_online_pay()); $data = array(':pay_way' => $arrPayway[$pay_type], ':pay_account' => $pay_account, ':pay_name' => $pay_username); keke_finance_class::init_mem('withdraw', $data);
<?php defined('IN_KEKE') or exit('Access Denied'); if (kekezu::submitcheck(isset($formhash))) { if ($code) { $strCodeCheck = kekezu::check_secode($code); if ($strCodeCheck != 1) { $tips['errors']['code'] = $strCodeCheck; kekezu::show_msg($tips, NULL, NULL, NULL, 'error'); } } if (strtoupper(CHARSET) == 'GBK') { $tar_content = kekezu::utftogbk($tar_content); $txt_title = kekezu::utftogbk($txt_title); } $strDesc = kekezu::escape($tar_content); $strTitle = kekezu::escape($txt_title); $objSuggest = new Keke_witkey_proposal_class(); $objSuggest->setPro_title($strTitle); $objSuggest->setPro_type($slt_type); $objSuggest->setPro_desc($strDesc); $objSuggest->setPro_status(1); $objSuggest->setPro_time(time()); $objSuggest->setUid($uid); $objSuggest->setUsername($username); $intSuggestId = $objSuggest->create_keke_witkey_proposal(); unset($objSuggest); if ($intSuggestId) { kekezu::show_msg('提交成功,感谢您的参与', $_K['siteurl'] . '/index.php', NULL, NULL, 'ok'); } else { kekezu::show_msg('提交失败', NULL, NULL, NULL, 'fail');
$step = keke_auth_techinfo_class::get_auth_step($step, $arrAuthInfo); $strUrl = "index.php?do=user&view=account&op=auth&code=" . $code; if ($arrAuthInfo['auth_status'] == 1 && $step == 'step2') { $step = 'step3'; } switch ($step) { case "step1": if (isset($formhash) && kekezu::submitcheck($formhash)) { $strSql = sprintf('select count(*) from %switkey_auth_techinfo where id_card = \'%s\' and auth_status = 1 and uid != \'%d\'', TABLEPRE, $idcard, $gUid); $intRes = db_factory::get_count($strSql); if ($intRes) { $tips['errors']['idcard'] = '该身份证号码已存在'; kekezu::show_msg($tips, NULL, NULL, NULL, 'error'); } if (strtoupper(CHARSET) == 'GBK') { $truename = kekezu::utftogbk($truename); } $arrData = array('realname' => $truename, 'id_card' => $idcard, 'id_pic' => $filepath); echo $techinfo_card; exit; if (1) { kekezu::show_msg('认证信息已提交', $strUrl . '&step=step2', NULL, NULL, 'ok'); } else { $tips['errors']['email'] = '认证信息提交失败'; kekezu::show_msg($tips, NULL, NULL, NULL, 'error'); } } break; case "step2": break; case "step3":
<?php defined('ADMIN_KEKE') or exit('Access Denied'); kekezu::admin_check_role(67); include_once S_ROOT . '/keke_client/sms/d9.php'; $account_info = $kekezu->_sys_config; $mobile_u = $account_info['mobile_username']; $mobile_p = $account_info['mobile_password']; switch ($ac) { case "ser": $type == 'uid' and $where = " uid='{$u}' " or $where = " INSTR(username,'" . kekezu::utftogbk($u) . "')>0 "; $user_info = db_factory::get_one(" select uid,username,phone,mobile from " . TABLEPRE . "witkey_space where {$where} "); if (!$user_info) { kekezu::echojson($_lang['he_came_from_mars'], '3'); die; } else { if (!$user_info['mobile']) { kekezu::echojson($_lang['no_record_of_his_cellphone'], '2'); die; } else { kekezu::echojson($user_info['mobile'], '1'); die; } } break; case "send": $tar_content = strip_tags($tar_content); if ($slt_type == 'normal') { $tel_arr = db_factory::query(" select mobile from " . TABLEPRE . "witkey_space where mobile is not null "); $tel_group = array(); foreach ($tel_arr as $v) {
<?php defined('ADMIN_KEKE') or exit('Access Denied'); kekezu::admin_check_role(11); if ($check_uid) { CHARSET == 'gbk' and $check_uid = kekezu::utftogbk($check_uid); $info = get_info($check_uid, $t); if ($info) { $info['balance'] = floatval($info['balance']); } if ($t == 1) { $msg = "UID不存在"; } else { $msg = "用户名不存在"; } $info and kekezu::echojson('', 1, $info) or kekezu::echojson($msg, 0); die; } $config = $kekezu->_sys_config; if ($is_submit && kekezu::submitcheck(isset($formhash))) { $url = "index.php?do={$do}&view={$view}"; $user or kekezu::admin_show_msg($_lang['username_uid_can_not_null'], $url, 3, '', 'warning'); $info = get_info($user, $user_type); $cash = floatval($cash); $cash == 0 and kekezu::admin_show_msg($_lang['cash_can_not_null'], $url, 3, '', 'warning'); if ($cash_type == 1) { $res = keke_finance_class::cash_in($info['uid'], floatval($cash), 'admin_charge', '', 'admin_charge'); } else { if ($cash > $info['balance']) { kekezu::admin_show_msg($_lang['user_deduct_limit'] . $info['balance'] . $_lang['yuan'], $url, 3, '', 'warning'); } else {
} die; } $arrProvinces = CommonClass::getDistrictByPid('0', 'id,upid,name'); if ($shopInfo['city']) { $arrCity = CommonClass::getDistrictById($shopInfo['city'], 'id,upid,name'); } if ($shopInfo['area']) { $arrArea = CommonClass::getDistrictById($shopInfo['area'], 'id,upid,name'); } $arrBackgroudStyle = unserialize($shopInfo['shop_backstyle']); $objShopT = keke_table_class::get_instance('witkey_shop'); if (isset($formhash) && kekezu::submitcheck($formhash)) { if (strtoupper(CHARSET) == 'GBK') { $shop_name = kekezu::utftogbk($shop_name); $shop_slogans = kekezu::utftogbk($shop_slogans); $seo_title = kekezu::utftogbk($seo_title); $seo_keyword = kekezu::utftogbk($seo_keyword); $seo_desc = kekezu::utftogbk($seo_desc); $address = kekezu::utftogbk($address); } $arrData = array('shop_name' => $shop_name, 'shop_slogans' => $shop_slogans, 'province' => $province, 'city' => $city, 'area' => $area, 'address' => $address, 'coordinate' => $coordinate); $banner and $arrData['banner'] = $banner; $background and $arrData['shop_background'] = $background; $repeat and $arrBackgroudStyle['repeat'] = $repeat; $position and $arrBackgroudStyle['position'] = $position; is_array($arrBackgroudStyle) and $arrData['shop_backstyle'] = serialize($arrBackgroudStyle); $intRes = $objShopT->save($arrData, array('shop_id' => $shopInfo['shop_id'])); unset($objShopT); kekezu::show_msg('已保存', NULL, NULL, NULL, 'ok'); }
public function work_over($work_desc, $file_id, $modify = 0) { global $_K, $_lang; $work_info = $this->work_exists('', " uid = '{$this->_uid}'"); if (in_array($this->_task_status, array(5, 6)) && $work_info) { $work_obj = new Keke_witkey_task_work_class(); if (CHARSET == 'gbk') { $work_desc = kekezu::utftogbk($work_desc); } $work_obj->setWhere(" work_id = '{$work_info['work_id']}'"); $work_obj->setWork_desc($work_desc); $work_obj->setWork_file($file_id); $res = $work_obj->edit_keke_witkey_task_work(); if ($res) { if ($modify) { $noti = $_lang['work_modify_success']; } else { $this->set_task_status(6); db_factory::execute(sprintf("update %switkey_task set end_time = %d where task_id=%d", TABLEPRE, time() + $this->_task_config['confirm_hour'] * 3600, $this->_task_id)); $noti = $_lang['work_over_success']; } $g_notice = array($_lang['description'] => $_lang['wiki'] . $noti . $_lang['please_accept_quickly'], $_lang['task_title'] => $this->_notice_url); $this->notify_user('match_task', $this->_model_name . $noti, $g_notice); return true; } else { return $_lang['system_is_busy'] . $noti . $_lang['failed']; } } else { return $_lang['system_is_busy'] . $noti . $_lang['failed']; } }
public static function send_private_message($title, $tar_content, $to_uid, $to_username, $url = '', $output = 'normal') { global $uid, $username; global $_lang; if (CHARSET == 'gbk') { $title = kekezu::utftogbk($title); $tar_content = kekezu::utftogbk($tar_content); $to_username = kekezu::utftogbk($to_username); } $msg_obj = new Keke_witkey_msg_class(); $msg_obj->_msg_id = null; $msg_obj->setUid($uid); $msg_obj->setUsername($username); $msg_obj->setTitle($title); $msg_obj->setTo_uid($to_uid); $msg_obj->setTo_username($to_username); $msg_obj->setContent($tar_content); $msg_obj->setOn_time(time()); $msg_obj->setType(2); return $msg_obj->create_keke_witkey_msg(); }
kekezu::show_msg($tips, NULL, NULL, NULL, 'error'); } $strSql = sprintf(" select card_num from %switkey_member_bank where bind_status=1 and card_num='%s'", TABLEPRE, $strCardNum); if (db_factory::get_count($strSql)) { $tips['errors']['card_num'] = '此账号已被他人绑定'; kekezu::show_msg($tips, NULL, NULL, NULL, 'error'); } $arrDistrictData = CommonClass::getAllDistrict('id,upid,name'); $province = $arrDistrictData[$province]['name']; $city = $arrDistrictData[$city]['name']; $strBankAddress = $province . "," . $city; if (strtoupper(CHARSET) == 'GBK') { $strTxtName = kekezu::utftogbk($strTxtName); $strBankName = kekezu::utftogbk($strBankName); $strBankAddress = kekezu::utftogbk($strBankAddress); $strBankFullName = kekezu::utftogbk($strBankFullName); } $arrData = array($strInputName => $strTxtName, 'bank_name' => $strBankName, 'bank_address' => $strBankAddress, 'bank_full_name' => $strBankFullName, 'bank_type' => $intUserRole, 'card_num' => $strCardNum, 'uid' => $gUid, 'on_time' => time(), 'bind_status' => 1); $intBankId = $objMemBankT->save($arrData); if ($intBankId) { unset($_SESSION['bank_zone']); unset($_SESSION['bank_zone_detail']); $strJumpUrl = $strUrl . '&step=step2&intBankType=' . $intUserRole . '&intBankId=' . $intBankId; kekezu::show_msg('账户绑定成功', $strJumpUrl, NULL, NULL, 'ok'); } } break; case "step2": $strSql = sprintf(" select * from %switkey_member_bank where bank_id='%d' and uid='%d' and bind_status='1' ", TABLEPRE, intval($intBankId), $gUid); $arrBankInfo = db_factory::get_one($strSql); $arrBankInfo or kekezu::show_msg('不存在的绑定账号,请先进行绑定', $strUrl . '&step=step1', NULL, NULL, 'ok');
<?php defined('ADMIN_KEKE') or exit('Access Denied'); kekezu::admin_check_role(155); if ($check_uid) { strtolower(CHARSET) == 'gbk' and $check_uid = kekezu::utftogbk($check_uid); $info = get_info($check_uid, $t); if ($info) { $info['balance'] = floatval($info['balance']); } if ($t == 1) { $msg = "UID不存在"; } else { $msg = "用户名不存在"; } $info and kekezu::echojson('', 1, $info) or kekezu::echojson($msg, 0); die; } $config = $kekezu->_sys_config; if ($is_submit && kekezu::submitcheck(isset($formhash))) { $url = "index.php?do={$do}&view={$view}"; $user or kekezu::admin_show_msg($_lang['username_uid_can_not_null'], $url, 3, '', 'warning'); $info = get_info($user, $user_type); $cash = floatval($cash); $cash == 0 and kekezu::admin_show_msg($_lang['cash_can_not_null'], $url, 3, '', 'warning'); if ($cash_type == 1) { $res = keke_finance_class::cash_in($info['uid'], floatval($cash), 'admin_charge', '', 'admin_charge'); } else { if ($cash > $info['balance']) { kekezu::admin_show_msg($_lang['user_deduct_limit'] . $info['balance'] . $_lang['yuan'], $url, 3, '', 'warning'); } else {
<?php $strUrl = 'index.php?do=user&view=shop&op=caseadd'; $shopInfo = db_factory::get_one(sprintf(" select * from %switkey_shop where uid='%d' ", TABLEPRE, $gUid)); keke_shop_release_class::checkShopStatus($uid, 'index.php?do=user&view=shop&op=setting'); $objCaseT = keke_table_class::get_instance('witkey_shop_case'); if ($objId) { $caseInfo = db_factory::get_one(sprintf(" select * from %switkey_shop_case where case_id='%d' ", TABLEPRE, intval($objId))); } if (isset($formhash) && kekezu::submitcheck($formhash)) { if (strtoupper(CHARSET) == 'GBK') { $case_name = kekezu::utftogbk($case_name); $case_desc = kekezu::utftogbk($case_desc); } $arrData = array('shop_id' => $shopInfo['shop_id'], 'case_name' => $case_name, 'case_url' => $case_url, 'case_pic' => $case_pic, 'case_desc' => $case_desc, 'on_time' => time()); if ($objId) { $intRes = $objCaseT->save($arrData, array('case_id' => intval($objId))); } else { $intRes = $objCaseT->save($arrData); } unset($objCaseT); kekezu::show_msg('已保存', 'index.php?do=user&view=shop&op=caselist', NULL, NULL, 'ok'); }
} else { $name = $savename[0]['name']; $path = $pathDir . $savename[0]['saveName']; if ($fileType == 'service') { $size_a = array(100, 100); $size_b = array(210, 210); $result = keke_img_class::resize($path, $size_a, $size_b, true); } if ($fileType != 'sys') { keke_glob_class::waterMark($path); } $savefilename = $savename[0]['name']; } } if (strtoupper(CHARSET) == 'GBK') { $savefilename = kekezu::utftogbk($savefilename); } $data = array(); $data['file_name'] = $savefilename; $data['save_name'] = $path; $data['uid'] = $gUid; $data['username'] = $gUsername; $data['obj_type'] = $objType; $data['task_id'] = $taskId; $data['work_id'] = $workId; $data['on_time'] = time(); $fileId = saveToFiles($data); $msg = array('url' => $path, 'filename' => $filename, 'name' => $name, 'fileid' => intval($fileId)); echo json_encode(array('err' => $err, 'msg' => $msg)); die; }
} if (isset($formhash) && kekezu::submitcheck($formhash)) { if ($arrServiceInfo['uid'] != $gUid) { exit('禁止未授权访问'); } $arrGoodsConfig = unserialize($kekezu->_model_list[6]['config']); $goodsprice = floatval($goodsprice); $floatMinCash = floatval($arrGoodsConfig['min_cash']); if ($floatMinCash && $goodsprice < $floatMinCash) { $tips['errors']['goodsprice'] = '最小金额不能少于' . $floatMinCash . '元'; kekezu::show_msg($tips, null, NULL, NULL, 'error'); } if (strtoupper(CHARSET) == 'GBK') { $goodsname = kekezu::utftogbk($goodsname); $goodsdesc = kekezu::utftogbk($goodsdesc); $unite_price = kekezu::utftogbk($unite_price); } $arrData = array('model_id' => $arrServiceInfo['model_id'] ? $arrServiceInfo['model_id'] : 6, 'uid' => $gUid, 'username' => $gUserInfo['username'], 'indus_id' => $indus_id, 'indus_pid' => $indus_pid, 'title' => $goodsname, 'price' => $goodsprice, 'pic' => $file_ids, 'content' => $goodsdesc, 'unite_price' => $unite_price, 'submit_method' => $submit_method, 'file_path' => $file_path_2, 'confirm_max' => intval($arrGoodsConfig['confirm_max_day']), 'service_time' => $service_time, 'unit_time' => $unit_time); $arrUpdateParts = array(); if ($arrServiceInfo['indus_id'] != $indus_id && $indus_id) { $arrUpdateParts['indus_id'] = $indus_id; $arrUpdateParts['old_indus_id'] = $arrServiceInfo['indus_id']; } if ($arrServiceInfo['indus_pid'] != $indus_pid && $indus_pid) { $arrUpdateParts['indus_pid'] = $indus_pid; $arrUpdateParts['old_indus_pid'] = $arrServiceInfo['indus_pid']; } if ($arrServiceInfo['title'] != $goodsname && $goodsname) { $arrUpdateParts['title'] = $goodsname; $arrUpdateParts['old_title'] = $arrServiceInfo['title']; }
$ord['0'] and $wh .= " order by {$ord['0']} {$ord['1']}" or $wh .= " order by comment_id desc"; $url_str = "index.php?do=task&view=custom&w[comment_id]={$w['comment_id']}&w[username]={$w['username']}&ord[0]={$ord['0']}&ord[1]={$ord['1']}"; $page = $page ? intval($page) : 1; $page_size = $slt_page_size ? intval($slt_page_size) : 10; $table_info = $table_obj->get_grid($wh, $url_str, $page, $page_size, null, 1, 'ajax_dom'); $comment_arr = $table_info['data']; $pages = $table_info['pages']; if ($ac == 'del') { $res = $table_obj->del('comment_id', $comment_id, $url_str); $res and kekezu::admin_show_msg($_lang['delete_success'], "index.php?do={$do}&view={$view}", 3, '', 'success') or kekezu::admin_show_msg($_lang['delete_faile'], "index.php?do={$do}&view={$view}", 3, '', 'warning'); } if ($sbt_action) { $res = $table_obj->del('comment_id', $ckb, $url_str); $res and kekezu::admin_show_msg($_lang['mulit_operate_success'], "index.php?do={$do}&view={$view}", 3, '', 'success') or kekezu::admin_show_msg($_lang['mulit_operate_fail'], "index.php?do={$do}&view={$view}", 3, '', 'warning'); } if ($by) { $t_userinfo = kekezu::get_user_info($to_uid); $to_username = $t_userinfo['username']; if (CHARSET == 'gbk') { $fds = kekezu::utftogbk($fds); } if ($ac) { kekezu::notify_user($fds['msg_title'], $fds['msg_content'], $to_uid, $to_username); $str = $_lang['reply_success']; echo $str; die; } require $template_obj->template(ADMIN_DIRECTORY . '/tpl/admin_task_' . $view . '_reply'); exit; } require $template_obj->template(ADMIN_DIRECTORY . '/tpl/admin_task_' . $view);
$tips['errors']['txt_task_cash'] = '请选择您的预算'; kekezu::show_msg($tips, NULL, NULL, NULL, 'error'); } if ($intEndDate < $intMinDay || $intEndDate > $intMaxDay) { $tips['errors']['txt_task_day'] = '当前预算允许最小天数为:' . intval($arrConfig['min_day']) . '天,最大截止时间:' . $strMaxDay; kekezu::show_msg($tips, NULL, NULL, NULL, 'error'); } $arrPubInfo and $_POST = array_merge($arrPubInfo, $_POST); $objRelease->save_task_obj($_POST, $stdCacheName); kekezu::show_msg($tips, $strUrl . '&step=step2', NULL, NULL, 'ok'); } break; case 'step2': if (isset($formhash) && kekezu::submitcheck($formhash)) { if (strtoupper(CHARSET) == 'GBK') { $_POST = kekezu::utftogbk($_POST); } if ($_POST['province'] == 'p') { $tips['errors']['province'] = '请选择省份'; kekezu::show_msg($tips, null, null, null, 'error'); } $_POST['tar_content'] = kekezu::escape($_POST['tar_content']); if (!$_POST['tar_content']) { $tips['errors']['tar_content'] = '请输入需求描述'; kekezu::show_msg($tips, NULL, NULL, NULL, 'error'); } $arrPubInfo and $_POST = array_merge($arrPubInfo, $_POST); $objRelease->save_task_obj($_POST, $stdCacheName); kekezu::show_msg($tips, $strUrl . '&step=step3', NULL, NULL, 'ok'); } else { !$_SESSION[$stdCacheName] and kekezu::show_msg($_lang['friendly_notice'], "index.php?do=pubtask&id={$id}", 2, "任务已提交,不可再返回修改!", "warning");
$id = intval($comm_id); switch ($ac) { case 'del': $sql = ' delete from %switkey_comment where comment_id=%d'; $type == 1 and $sql .= ' or p_id=%d'; $res = db_factory::execute(sprintf($sql, TABLEPRE, $id, $id)); $res and kekezu::echojson('', 1) or kekezu::echojson('', 0); die; break; case 'load': $list = db_factory::query(sprintf(' select * from %switkey_comment where p_id=%d', TABLEPRE, $id)); require keke_tpl_class::template('task/' . $model_info['model_dir'] . '/admin/tpl/task_edit_ext'); die; break; case 'edit': CHARSET == 'gbk' and $content = kekezu::utftogbk($content); $sql = "update %switkey_comment set content = '%s' where comment_id=%d "; $res = db_factory::execute(sprintf($sql, TABLEPRE, $content, $id)); $res and kekezu::echojson('', 1) or kekezu::echojson('', 0); die; break; } } else { $o = keke_table_class::get_instance('witkey_comment'); $tmp = $o->get_grid('obj_id=' . $task_id . ' and p_id=0', $url, $page, $limit, ' order by on_time desc ', 1, 'ajax_dom'); $list = $tmp['data']; $pages = $tmp['pages']; } break; case 'mark': $list = db_factory::query(sprintf(" select * from %switkey_mark where origin_id=%d and `mark_status`!=0 and model_code='%s'", TABLEPRE, $task_id, $model_info['model_code']));
$objLogin->save_user_info($loginUserInfo, 1); } $inter = $kekezu->_sys_config['user_intergration']; $intLoginTimes = intval($_SESSION['login_times']); if (kekezu::submitcheck(isset($formhash)) || isset($login_type) == 3) { if ($code) { $strCodeCheck = kekezu::check_secode($code); if ($strCodeCheck != 1) { $tips['errors']['code'] = $strCodeCheck; kekezu::show_msg($tips, NULL, NULL, NULL, 'error'); } } $strCode = isset($code) ? $code : ""; $intLoginType = isset($login_type) ? $login_type : ""; $ckb_cookie = isset($ckb_cookie) ? $ckb_cookie : ""; if (strtoupper(CHARSET) == 'GBK') { $account = kekezu::utftogbk($account); } $arrUserInfo = $objLogin->user_login($account, $password, $strCode, $intLoginType, 1); db_factory::execute("delete from " . TABLEPRE . "witkey_space where uid =" . intval($arrBindInfo['uid'])); db_factory::execute("delete from " . TABLEPRE . "witkey_shop where uid=" . intval($arrBindInfo['uid'])); db_factory::execute("delete from " . TABLEPRE . "witkey_member where uid=" . intval($arrBindInfo['uid'])); $objMemberOauth = new Keke_witkey_member_oauth_class(); $objMemberOauth->setWhere(array('oauth_id' => $arrBindInfo['oauth_id'], 'uid' => $arrBindInfo[uid])); $objMemberOauth->setUid($arrUserInfo[uid]); $objMemberOauth->setUsername($arrUserInfo[username]); $objMemberOauth->edit_keke_witkey_member_oauth(); $_SESSION[$type . '_oauthInfo'] = null; $objLogin->save_user_info($arrUserInfo, $account, $ckb_cookie, $intLoginType, 0, true); die; }
<?php defined('ADMIN_KEKE') or exit('Access Denied'); $login_limit = $_SESSION['login_limit']; $remain_times = $login_limit - time(); $allow_times = $admin_obj->times_limit($allow_num); if ($is_submit) { CHARSET == 'gbk' and $user_name = kekezu::utftogbk($user_name); $admin_obj->admin_login($user_name, $pass_word, $allow_num, $token); die; } require keke_tpl_class::template(ADMIN_DIRECTORY . '/tpl/admin_' . $do);