本文整理汇总了PHP中kekezu类的典型用法代码示例。如果您正苦于以下问题:PHP kekezu类的具体用法?PHP kekezu怎么用?PHP kekezu使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了kekezu类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: pub_mode_init
function pub_mode_init($std_cache_name, $data = array())
{
global $kekezu;
global $_lang;
$release_info = $this->_std_obj->_release_info;
switch ($this->_pub_mode) {
case "professional":
break;
case "guide":
break;
case "onekey":
if (!$release_info) {
$sql = " select model_id,task_title,task_desc,indus_id,indus_pid,\n\t\t\t\t\t\ttask_cash,work_count,single_cash,contact from %switkey_task where task_id='%d' and model_id='%d'";
$task_info = db_factory::get_one(sprintf($sql, TABLEPRE, $data['t_id'], $this->_model_id));
$task_info or kekezu::show_msg($_lang['operate_notice'], $_SERVER['HTTP_REFERER'], 3, $_lang['not_exsist_relation_task_and_not_user_onekey'], "warning");
$release_info = $this->onekey_mode_format($task_info);
$allow_time = $kekezu->get_show_day($task_info['task_cash'], $this->_model_id);
$task_day = date('Y-m-d', $allow_time * 24 * 3600 + time());
$release_info['txt_task_day'] = $task_day;
$release_info['txt_task_cash'] = intval($task_info['txt_task_cash']);
$release_info['txt_work_count'] = intval($task_info['work_count']);
$release_info['txt_single_cash'] = intval($task_info['single_cash']);
$this->save_task_obj($release_info, $std_cache_name);
}
break;
}
}
示例2: 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;
}
示例3: write
function write($session_id, $session_data)
{
$tablename = TABLEPRE . "witkey_session";
$_SESSION[uid] > 0 and $uid = $_SESSION['uid'] or $uid = 0;
$data_arr = array('session_id' => $session_id, 'session_data' => $session_data, 'session_expirse' => time() + $this->_left_time, 'session_ip' => kekezu::get_ip(), 'session_uid' => $uid);
return $this->_db->inserttable($tablename, $data_arr, 1, 1);
}
示例4: getusercash
protected function getusercash($uid)
{
if (!$this->_a_uinfo[$uid]) {
$this->_a_uinfo[$uid] = kekezu::get_user_info($uid);
}
return $this->_a_uinfo[$uid]['balance'] + $this->_a_uedit_arr[$uid]['balance'];
}
示例5: process_report
public function process_report($op_result, $type)
{
global $_lang;
$trans_name = $this->get_transrights_name($this->_report_type);
$op_result = $this->op_result_format($op_result);
if ($op_result['action']) {
if ($op_result['product_remove'] == 1) {
$res = db_factory::execute(sprintf(" update %switkey_service set service_status='3' where service_id='%d'", TABLEPRE, $this->_obj_info['origin_id']));
$this->process_notify('pass', $this->_report_info, $this->_user_info, $this->_to_user_info, $op_result['process_result']);
$this->change_status($this->_report_id, '4', $op_result, $op_result['process_result']);
$res and kekezu::admin_show_msg($trans_name . $_lang['deal_success'], "index.php?do=trans&view=report&type={$type}", "3", '', 'success') or kekezu::admin_show_msg($trans_name . $_lang['deal_fail'], "index.php?do=trans&view=process&type={$type}&report_id=" . $this->_report_id, "3", '', 'warning');
}
if ($op_result['product_remove'] == 2) {
$this->process_notify('nopass', $this->_report_info, $this->_user_info, $this->_to_user_info, $op_result['process_result']);
$res = $this->change_status($this->_report_id, '3', $op_result, $op_result, $op_result['reply']);
$res and kekezu::admin_show_msg($trans_name . $_lang['deal_success'], "index.php?do=trans&view=rights&type={$type}", "3", '', 'success') or kekezu::admin_show_msg($trans_name . $_lang['deal_fail'], "index.php?do=trans&view=process&type={$type}&report_id=" . $this->_report_id, "3", '', 'warning');
}
if ($op_result['product_remove'] == 3) {
$this->disablePeople();
$this->process_notify('pass', $this->_report_info, $this->_user_info, $this->_to_user_info, $op_result['process_result']);
$res = $this->change_status($this->_report_id, '4', $op_result, $op_result['process_result']);
$res and kekezu::admin_show_msg($trans_name . $_lang['deal_success'], "index.php?do=trans&view=rights&type={$type}", "3", '', 'success') or kekezu::admin_show_msg($trans_name . $_lang['deal_fail'], "index.php?do=trans&view=process&type={$type}&report_id=" . $this->_report_id, "3", '', 'warning');
}
}
}
示例6: send_mail
public function send_mail($email_a_id, $data)
{
global $_K, $_lang;
$md5_code = md5($data['uid'] . $data['username'] . $data['email']);
$title = $_K['html_title'] . '--' . $_lang['email_auth'];
$body = '<font color="red">' . $_K['html_title'] . $_lang['__email_auth'] . '</font><br><br> ' . $_lang['please_click_email_auth_url'] . '<a href="' . $_K[siteurl] . '/index.php?do=user&view=account&op=auth&code=email&email_a_id=' . $email_a_id . '&ac=check_email&step=step3&ver=1&active_code=' . $md5_code . '">' . $_K[siteurl] . '/index.php?do=user&view=account&op=auth&code=email&email_a_id=' . $email_a_id . '&ac=check_email&step=step3&ver=1&active_code=' . $md5_code . '</a>,如果链接无法点击,请复制以下链接到浏览器中执行' . $_K[siteurl] . '/index.php?do=user&view=account&op=auth&code=email&email_a_id=' . $email_a_id . '&ac=check_email&step=step3&ver=1&active_code=' . $md5_code;
return kekezu::send_mail($data['email'], $title, $body);
}
示例7: get_item_info
public static function get_item_info($num_iid)
{
$taoapi = new taoapi_get('item', array('num_iid' => $num_iid));
$data = $taoapi->send();
$status = 1;
$data['code'] && ($status = 0);
kekezu::echojson('', $status, $data);
}
示例8: 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;
}
}
示例9: create_node_attr
function create_node_attr($element = '', $attrname = '', $attrvalue = '')
{
if ($this->_K['charset'] != 'utf-8') {
$attrname = kekezu::gbktoutf($attrname);
$attrvalue = kekezu::gbktoutf($attrvalue);
}
$attr = new DOMAttr($attrname, $attrvalue);
$element->appendChild($attr);
$this->_doc->save($this->_filepath);
}
示例10: __construct
public function __construct()
{
global $kekezu;
$cfg = kekezu::get_payment_config('wxpay');
$this->_appid = $cfg['appid'];
$this->_appsecert = $cfg['appsecert'];
$this->_mchid = $cfg['mchid'];
$this->_key = $cfg['key'];
$this->_sslcert_path = S_ROOT . '/include/payment/wxpay/cert/apiclient_cert.pem';
$this->_sslkey_path = S_ROOT . '/include/payment/wxpay/cert/apiclient_key.pem';
}
示例11: newfilename
public function newfilename($file)
{
$ext = strtolower(trim(substr(strrchr($file, '.'), 1)));
$rand = kekezu::randomkeys(8);
$time = microtime();
$str = $file . $time . $rand;
if (function_exists('sha1')) {
return sha1($str) . '.' . $ext;
}
return md5($str) . '.' . $ext;
}
示例12: __construct
function __construct($charge_type, $model_id = '', $uid = '', $obj_id = '', $order_id = '', $total_fee = '')
{
$this->_userinfo = kekezu::get_user_info($uid);
$this->_model_id = intval($model_id);
$this->_uid = intval($uid);
$this->_username = $this->_userinfo['username'];
$this->_charge_type = $charge_type;
$this->_order_id = intval($order_id);
$this->_total_fee = $total_fee;
$this->_obj_id = intval($obj_id);
}
示例13: get_max_day
public function get_max_day($task_cash)
{
global $kekezu;
global $_lang;
if ($task_cash >= $this->_task_config['min_cash']) {
$time = keke_task_release_class::get_default_max_day($task_cash, $this->_model_id, $this->_task_config['min_day']);
kekezu::echojson($time, 1, $time);
} else {
kekezu::echojson($_lang['task_min_cash_limit_notice'] . $this->_task_config['min_cash'], 0);
die;
}
}
示例14: login
function login($call_back, $url)
{
global $oauth_verifier, $code, $_K;
if (isset($code) && $this->_wb_type == 'sina') {
$oauth_verifier = array('code' => $code, 'redirect_uri' => $url);
}
if ($call_back) {
if (isset($code) && $this->_wb_type == 'sina') {
if ($oauth_verifier) {
oauth_api_factory::create_access_token($oauth_verifier, $this->_wb_type, $this->_app_id, $this->_app_secret);
$oauth_user_info = $this->get_login_user_info();
$bind_info = keke_register_class::is_oauth_bind($this->_wb_type, $oauth_user_info['account']);
if ($oauth_user_info && $bind_info) {
$user_info = kekezu::get_user_info($bind_info['uid']);
$login_obj = new keke_user_login_class();
$login_user_info = $login_obj->user_login($user_info['username'], $user_info['password'], null, 1);
$login_obj->save_user_info($login_user_info, 1);
} else {
$_SESSION['wb_type'] = $this->_wb_type;
header("Location:{$_K['siteurl']}/index.php?do=index");
die;
}
} else {
header("Location:{$_K['siteurl']}/index.php?do=login");
die;
}
} else {
oauth_api_factory::create_access_token($oauth_verifier, $this->_wb_type, $this->_app_id, $this->_app_secret);
$oauth_user_info = $this->get_login_user_info();
$bind_info = keke_register_class::is_oauth_bind($this->_wb_type, $oauth_user_info['account']);
if ($oauth_user_info && $bind_info) {
$user_info = kekezu::get_user_info($bind_info['uid']);
$login_obj = new keke_user_login_class();
$login_user_info = $login_obj->user_login($user_info['username'], $user_info['password'], null, 1);
$login_obj->save_user_info($login_user_info, 1);
} else {
$_SESSION['wb_type'] = $this->_wb_type;
header("Location:{$_K['siteurl']}/index.php?do=index");
die;
}
}
}
$this->_url = $url;
if (oauth_api_factory::get_access_token($this->_wb_type, $this->_app_id, $this->_app_secret)) {
return true;
} else {
$aurl = oauth_api_factory::get_auth_url("{$url}&call_back=1", $this->_wb_type, $this->_app_id, $this->_app_secret);
header('Location:' . $aurl);
die;
}
}
示例15: 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();
}