本文整理汇总了PHP中kekezu::utftogbk方法的典型用法代码示例。如果您正苦于以下问题:PHP kekezu::utftogbk方法的具体用法?PHP kekezu::utftogbk怎么用?PHP kekezu::utftogbk使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类kekezu
的用法示例。
在下文中一共展示了kekezu::utftogbk方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: save_comment
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;
}
示例2: get_xml_toarr
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;
}
}
示例3: defined
<?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');
}
示例4: implode
<?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;
示例5: Keke_witkey_msg_class
$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);
}
示例6: appWorkReport
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;
}
}
示例7: defined
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":
示例8: set_favor
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);
}
}
示例9: set_task_comment
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;
}
示例10: sprintf
}
$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 = '已通过';
示例11: keke_upload_class
//$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 . '/';
示例12: Keke_witkey_withdraw_class
$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);
示例13: defined
<?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');
示例14: switch
$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":
示例15: defined
<?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) {