本文整理汇总了PHP中kekezu::escape方法的典型用法代码示例。如果您正苦于以下问题:PHP kekezu::escape方法的具体用法?PHP kekezu::escape怎么用?PHP kekezu::escape使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类kekezu
的用法示例。
在下文中一共展示了kekezu::escape方法的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: checkFieldName
function checkFieldName($name, $model_id)
{
$result = db_factory::get_one("SELECT f_name FROM `" . TABLEPRE . "witkey_custom_fields` where f_name = '" . kekezu::escape($name) . "' and model_id=" . intval($model_id));
if ($result['f_name']) {
return true;
} else {
return false;
}
}
示例3: SendFeedMsg
static function SendFeedMsg($receiver, $title, $content, $type = '1')
{
$receiverInfo = kekezu::get_user_info(intval($receiver));
if (!$receiverInfo) {
return false;
}
$objMsgM = new Keke_witkey_msg_class();
$objMsgM->setType($type);
$objMsgM->setTo_uid($receiverInfo['uid']);
$objMsgM->setTo_username($receiverInfo['username']);
$objMsgM->setTitle(kekezu::escape($title));
$objMsgM->setContent(kekezu::escape($content));
$objMsgM->setOn_time(time());
return $objMsgM->create_keke_witkey_msg();
}
示例4: editExtData
static function editExtData($objid, $model_id, $data)
{
if (!self::checkCustom($model_id)) {
return false;
}
$extCode = CustomClass::getExtCodeByModelId($model_id);
if ($data) {
foreach ($data as $k => $v) {
if (in_array($k, $extCode)) {
$fieldInfo = self::getFieldName($k);
$extData = array();
$extData[$k]['fieldname'] = $fieldInfo['f_name'];
$extData[$k]['content'] = kekezu::escape($v);
$jsondata = serialize($extData);
$sql = "UPDATE " . TABLEPRE . "witkey_custom_fields_ext SET extdata='{$jsondata}' WHERE objid='{$objid}' AND model_id ='{$model_id}' AND c_id = '{$fieldInfo['id']}' ";
db_factory::execute($sql);
}
}
}
}
示例5: save
function save($fields, $pk = array())
{
foreach ($fields as $k => $v) {
$kk = ucfirst($k);
$set_query = "set" . $kk;
$this->_table_obj->{$set_query}($v);
}
$keys = array_keys($pk);
$key = $keys[0];
if (!empty($pk[$key])) {
$this->_table_obj->setWhere(" {$key} = '" . kekezu::escape($pk[$key]) . "'");
$edit_query = "edit_" . $this->_pre . $this->_table_name;
$res = $this->_table_obj->{$edit_query}();
} else {
$create_query = "create_" . $this->_pre . $this->_table_name;
$res = $this->_table_obj->{$create_query}();
}
if ($res) {
return $res;
} else {
return false;
}
}
示例6: Keke_witkey_task_class
CustomClass::editExtData($task_id, $model_id, $ext_fds);
}
$task_obj = new Keke_witkey_task_class();
$task_obj->setWhere(" task_id ='{$task_id}'");
$task_obj->setTask_title(kekezu::escape($task_title));
if ($txt_task_day) {
$task_obj->setSub_time(strtotime($txt_task_day));
$task_obj->setEnd_time(strtotime($txt_task_day) + $task_config['choose_time'] * 24 * 3600);
}
$task_obj->setIndus_id($slt_indus_id);
$task_obj->setTask_cash($task_cash);
$task_obj->setReal_cash($task_cash * (1 - $task_info['profit_rate'] / 100));
$fds['task_cash_coverage'] and $task_obj->setTask_cash_coverage($fds['task_cash_coverage']);
$fds['budget'] and $task_obj->setBudget($fds['budget']);
$task_obj->setTask_desc($task_desc);
$fields = kekezu::escape($fields);
$task_obj->setSeo_title($fields['seo_title']);
$task_obj->setSeo_keyword($fields['seo_keyword']);
$task_obj->setSeo_desc($fields['seo_desc']);
if ($_FILES['fle_task_pic']['name']) {
$task_pic = keke_file_class::upload_file("fle_task_pic");
} else {
$task_pic = $task_pic_path;
}
$task_obj->setTask_pic($task_pic);
kekezu::admin_system_log($_lang['edit_task'] . ":{$task_title}");
$res = $task_obj->edit_keke_witkey_task();
$v_arr = array($_lang['admin_name'] => $myinfo_arr['username'], $_lang['time'] => date('Y-m-d H:i:s', time()), $_lang['model_name'] => $model_info['model_name'], $_lang['task_id'] => $task_info['task_id'], $_lang['task_title'] => $task_info['task_title']);
keke_msg_class::notify_user($task_info['uid'], $task_info['username'], 'task_edit', $_lang['edit_task'], $v_arr, 1);
} elseif ($sbt_act) {
switch ($sbt_act) {
示例7: Keke_witkey_industry_class
$indus_table_obj = new Keke_witkey_industry_class();
$indus_obj = keke_table_class::get_instance("witkey_industry");
$file_obj = new keke_file_class();
$indus_arr = kekezu::get_industry(0);
isset($indus_id) and intval($indus_id) > 0 and $indus_info = $indus_obj->get_table_info('indus_id', $indus_id);
empty($art_info) or extract($art_info);
if (isset($indus_id) && intval($indus_id) > o) {
$indus_info = $indus_obj->get_table_info('indus_id', $indus_id);
$indus_pid = $indus_info['indus_pid'];
}
if ($sbt_edit) {
$indus_table_obj->setWhere("indus_name = '" . $fs['indus_name'] . "'");
$res = $indus_table_obj->count_keke_witkey_industry();
!$pk && $res and kekezu::admin_show_msg($_lang['operate_fail'], $url, 3, $_lang['indus_has']);
$fs['on_time'] = time();
isset($fs['is_recommend']) or $fs['is_recommend'] = 0;
isset($fs['totask']) or $fs['totask'] = 0;
isset($fs['togoods']) or $fs['togoods'] = 0;
$fs = kekezu::escape($fs);
$res = $indus_obj->save($fs, $pk);
$indus_info = $indus_obj->get_table_info('indus_id', $pk['indus_id']);
$url = "index.php?do=task&view=industry";
!$pk and kekezu::admin_system_log($_lang['add_industry']) or kekezu::admin_system_log($_lang['edit_industry'] . ':' . $indus_info['indus_name']);
$file_obj->delete_files(S_ROOT . "./data/data_cache/");
$file_obj->delete_files(S_ROOT . './data/tpl_c/');
$res and kekezu::admin_show_msg($_lang['operate_success'], $url, 3, '', 'success') or kekezu::admin_show_msg($_lang['operate_fail'], $url, 3, '', 'warning');
}
$temp_arr = array();
kekezu::get_tree($indus_arr, $temp_arr, 'option', $indus_pid, 'indus_id');
$indus_arr = $temp_arr;
require $template_obj->template(ADMIN_DIRECTORY . '/tpl/admin_task_' . $view);
示例8: defined
<?php
defined('ADMIN_KEKE') or exit('Access Denied');
kekezu::admin_check_role(82);
$suggest_obj = new keke_table_class('witkey_proposal');
$proposal_obj = new Keke_witkey_proposal_class();
$suggest_type_arr = array('1' => '我的建议', '2' => '我的问题');
$suggest_status_arr = array('1' => '待回复', '2' => '已回复');
$url = "index.php?do={$do}&view={$view}&suggest_id={$suggest_id}";
if ($suggest_id) {
$suggest_info = db_factory::get_one(sprintf("select * from %switkey_proposal where p_id = '%d'", TABLEPRE, $suggest_id));
$user_info = kekezu::get_user_info($suggest_info['uid']);
if ($sbt_op) {
$proposal_obj->setWhere('p_id = ' . $suggestid);
$proposal_obj->setOp_content(kekezu::escape($op_result['process_result']));
$proposal_obj->setOp_time(time());
$proposal_obj->setPro_status(2);
$proposal_obj->setOp_uid($_SESSION['uid']);
$proposal_obj->setOp_username($_SESSION['username']);
$res_id = $proposal_obj->edit_keke_witkey_proposal();
$v_arr = array('用户名' => $suggest_username, '用户标题' => $suggest_title, '建议内容' => kekezu::escape($pro_desc), '回复内容' => kekezu::escape($op_result['process_result']), $_lang['website_name'] => $kekezu->_sys_config['website_name']);
keke_shop_class::notify_user($suggest_uid, $suggest_username, 'suggest_reply', '建议答复', $v_arr, 2);
$res_id and kekezu::admin_show_msg($_lang['operate_notice'], $url, "2", '回复成功', 'success') or kekezu::admin_show_msg($_lang['operate_notice'], $url, "2", '回复失败', 'warning');
}
}
require $template_obj->template(ADMIN_DIRECTORY . '/tpl/admin_user_suggest_reply');
示例9: switch
$strPageDescription = kekezu::cutstr($arrServiceInfo['content'], 100);
}
}
$floatGoodMark = CommonClass::getGoodsMark(intval($intId));
if ($uid != $arrServiceInfo['uid'] && $arrServiceInfo['service_status'] != 2 && $arrServiceInfo['service_status'] != 5) {
$gUid == ADMIN_UID or kekezu::show_msg('操作提示', "index.php?do=goodslist", '1', '商品不存在', 'warning');
}
if (isset($op)) {
switch ($op) {
case "report":
$transname = keke_report_class::get_transrights_name($type);
$report_reason = keke_report_class::get_report_product_reason();
if (isset($formhash) && kekezu::submitcheck($formhash)) {
$resCheck = keke_report_class::check_if_report($type, $objType, $objId, $uid, $toUid);
if ($resCheck === true) {
$tarContent = kekezu::escape($tarContent);
$toUserInfo = keke_user_class::get_user_info($toUid);
$resText = keke_shop_class::set_report($objId, $toUid, $type, $filepath, $tarContent, $sltReason);
if ($resText === true) {
kekezu::show_msg('感谢您的举报,管理员会尽快受理,请耐心等待处理结果。', 'index.php?do=goods&id=' . $id, 3, NULL, 'ok');
} else {
kekezu::show_msg($resText, null, null, NULL, 'fail');
}
} else {
kekezu::show_msg($resCheck, null, null, NULL, 'fail');
}
} else {
$strUrl .= '&op=report';
require keke_tpl_class::template("tpl/default/ajax/report");
die;
}
示例10: service_shop_class
if ($op == 'basic') {
$service_obj = new service_shop_class();
$service_info = db_factory::get_one(sprintf("select * from %switkey_service where service_id='%d'", TABLEPRE, $service_id));
if ($service_info['pic']) {
$servicePics = explode(',', $service_info['pic']);
}
if ($service_info['file_path']) {
$serviceFiles = explode(',', $service_info['file_path']);
}
$ac_url = "index.php?do=model&model_id=7&view=edit&service_id=" . $service_id;
$status_arr = $service_obj->get_service_status();
unset($status_arr[1]);
$service_info['ext_fields'] = CustomClass::getExtDataList($service_info['service_id'], $service_info['model_id']);
if ($sbt_edit) {
if ($ext_fds) {
CustomClass::editExtData($service_id, $model_id, $ext_fds);
}
kekezu::admin_system_log($_lang['to_witkey_service_name_is'] . $service_info[title] . $_lang['in_edit_operate']);
service_shop_class::set_on_sale_num($pk['service_id'], $fds['service_status']);
$service_obj = keke_table_class::get_instance('witkey_service');
$c = $service['content'];
$fds = kekezu::escape($service);
$service['content'] = $c;
isset($service['is_top']) or $service['is_top'] = 0;
$service_obj->save($service, array("service_id" => $service_id));
kekezu::admin_show_msg($_lang['service_edit_success'], 'index.php?do=model&model_id=7&view=list', 2, $_lang['service_edit_success'], 'success');
}
} else {
require S_ROOT . '/shop/' . $model_info['model_dir'] . '/admin/shop_misc.php';
}
require keke_tpl_class::template('shop/' . $model_info['model_dir'] . '/admin/tpl/service_edit_' . $op);
示例11: get_user_auth_info
public function get_user_auth_info($uid, $is_username = 0, $show_id = '')
{
$sql = "select * from " . TABLEPRE . $this->_auth_table_name;
if ($uid) {
$is_username == '0' and $sql .= " where uid = '" . intval($uid) . "' " or $sql .= " where username = '" . kekezu::escape($uid) . "' ";
$show_id and $sql .= " and " . $this->_primary_key . "=" . intval($show_id);
$sql .= " order by {$this->_primary_key} desc";
$data = db_factory::query($sql);
if (sizeof($data) == 1) {
return $data[0];
} else {
return $data;
}
} else {
return array();
}
}
示例12: keke_register_class
if (strtoupper(CHARSET) == 'GBK') {
$arrOauthInfo = kekezu::utftogbk($arrOauthInfo);
}
$objReg = new keke_register_class();
$objLogin = new keke_user_login_class();
$arrBindInfo = keke_register_class::is_oauth_bind($type, $arrOauthInfo['account']);
$account = $arrBindInfo['username'];
if ($_SESSION[$type . '_oauthInfo'] && $arrBindInfo && !$to_bind) {
$_SESSION[$type . '_oauthInfo'] = null;
setcookie($type . 'uid', 1, time() - 1);
$arrUserInfo = kekezu::get_user_info($arrBindInfo['uid']);
$loginUserInfo = $objLogin->oauth_user_login($arrUserInfo['username'], $arrUserInfo['password'], null, 1);
$objLogin->save_user_info($loginUserInfo, 1);
} elseif ($_SESSION[$type . '_oauthInfo'] && !$arrBindInfo && !$formhash && !$to_bind) {
$password = kekezu::randomkeys(6);
$account = kekezu::escape($arrOauthInfo['nickname']);
$is_nameExist = 1;
while ($is_nameExist) {
$hasUser = db_factory::get_one("select * from " . TABLEPRE . "witkey_space where username='" . $account . "'");
if ($hasUser) {
$is_nameExist = 1;
$code = kekezu::randomkeys(6);
$account = $account . $code;
} else {
$is_nameExist = 0;
}
}
$intRegUid = $objReg->user_register($account, $password, $email, $code, false, $password, 1);
$arrUserInfo = keke_user_class::get_user_info($intRegUid);
UserCenter::bindingAccount($arrUserInfo['uid'], $arrUserInfo['username'], $arrOauthInfo);
$_SESSION['uid'] = $arrUserInfo['uid'];
示例13: keke_rss_class
$objRss = new keke_rss_class();
$objRss->title = $kekezu->_sys_config['rss_title'];
$objRss->link = $kekezu->_sys_config['website_url'];
$objRss->description = $kekezu->_sys_config['rss_content'];
if ($kekezu->_sys_config['rss_choice_task'] == '1') {
$arrTask = db_factory::query(sprintf("select * from %switkey_task where task_status>=2 order by task_id desc limit 10", TABLEPRE));
foreach ($arrTask as $k => $v) {
$arrRss[$v['start_time']]['title'] = '[任务]' . $v['task_title'];
$arrRss[$v['start_time']]['link'] = $kekezu->_sys_config['website_url'] . '/index.php?do=task&id=' . $v['task_id'];
$arrRss[$v['start_time']]['description'] = kekezu::cutstr(kekezu::escape(strip_tags(htmlspecialchars_decode($v['task_desc']))), 100) . '...';
}
}
if ($kekezu->_sys_config['rss_choice_news'] == '1') {
$arrAct = db_factory::query(sprintf("select * from %switkey_article where cat_type = 'article' order by art_id desc limit 10", TABLEPRE));
foreach ($arrAct as $k => $v) {
$arrRss[$v['pub_time']]['title'] = '[资讯]' . $v['art_title'];
$arrRss[$v['pub_time']]['link'] = $kekezu->_sys_config['website_url'] . '/index.php?do=article&id=' . $v['art_id'];
$arrRss[$v['pub_time']]['description'] = kekezu::cutstr(kekezu::escape(strip_tags(htmlspecialchars_decode($v['content']))), 100) . '...';
}
}
krsort($arrRss);
$arr = array_slice($arrRss, 0, 10);
foreach ($arr as $v) {
$objItem = new FeedItem();
$objItem->title = $v['title'];
$objItem->link = $v['link'];
$objItem->description = $v['description'];
$objRss->addItem($objItem);
}
$objRss->saveFeed("RSS2.0", "data/index.xml");
示例14: 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);
}
示例15: strtotime
if (!$fds[indus_id]) {
kekezu::admin_show_msg($_lang['must_select_a_industry'], $_SERVER['HTTP_REFERER'], 3, '', 'warning');
}
if ($_FILES['fle_task_pic']['name']) {
$task_pic = keke_file_class::upload_file("fle_task_pic");
} else {
$task_pic = $task_pic_path;
}
$task_pic and $fds['task_pic'] = $task_pic;
if ($txt_task_day) {
$fds['sub_time'] = strtotime($txt_task_day);
}
$fds['seo_title'] = $fields['seo_title'];
$fds['seo_keyword'] = $fields['seo_keyword'];
$fds['seo_desc'] = $fields['seo_desc'];
$fds = kekezu::escape($fds);
$pk and $success = $task_obj->save($fds, $pk);
kekezu::admin_system_log($_lang['edit_task'], '{$fds[task_title]}');
$v_arr = array($_lang['admin_name'] => $myinfo_arr['username'], $_lang['time'] => date('Y-m-d H:i:s', time()), $_lang['model_name'] => $model_info['model_name'], $_lang['task_id'] => $task_info['task_id'], $_lang['task_title'] => $task_info['task_title']);
keke_msg_class::notify_user($task_info['uid'], $task_info['username'], 'task_edit', $_lang['edit_task'], $v_arr, 1);
kekezu::admin_show_msg($_lang['task_edit_success'], "index.php?do=model&model_id={$model_id}&view=list", 3, '', 'success');
}
$indus_arr = $kekezu->_indus_arr;
$temp_arr = array();
$indus_option_arr = $indus_arr;
$indus_arr = kekezu::get_industry(1);
$temp_arr = array();
$status_arr = dtender_task_class::get_task_status();
$payitem_list = keke_payitem_class::get_payitem_config('employer');
kekezu::get_tree($indus_option_arr, $temp_arr, "option", $task_info['indus_id']);
$indus_option_arr = $temp_arr;