本文整理汇总了PHP中plog函数的典型用法代码示例。如果您正苦于以下问题:PHP plog函数的具体用法?PHP plog怎么用?PHP plog使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了plog函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Errors
public function Errors($caller)
{
switch (json_last_error()) {
case JSON_ERROR_NONE:
return;
default:
plog('JSON->' . $caller . '(): ' . json_last_error_msg());
return;
}
}
示例2: p
function p($data, $log = false)
{
$debug = debug_backtrace();
print "<pre>";
echo "File: " . $debug[0]['file'] . " | Line: " . $debug[0]['line'] . "\n\n";
print_r($data);
print "</pre>";
if ($log) {
plog($data);
}
}
示例3: ACL
static function ACL($required)
{
global $auth, $auth_database;
if (!is_array($auth)) {
return FALSE;
}
if (!isset($auth['acl'])) {
return FALSE;
}
plog('Checking ACL: ' . (is_array($required) ? implode(',', $required) : $required));
return ACL::has($auth['acl'], $required);
}
示例4: AutoLockMechanism
function AutoLockMechanism(&$p, $table, $id)
{
plog("AutoLockMechanism: Start");
$p->HTML('<div class="apadlockarea">' . '<span id="apadlockface" class=""></span>' . ' <span id="apadlockmsg"></span>' . '</div>');
$p->JS('
var page_was_locked=false;
function set_row_mutex(d) {
var msg=$("#apadlockmsg").get(0).innerHTML;
var first_check=(msg.length == 0 );
var page_unlocked_to_me= ( d.unlocked == 1 );
if ( !page_unlocked_to_me ) {
$("input").attr("readonly", "readonly");
$("textarea").attr("readonly", "readonly");
$("select").hide();
page_was_locked=true;
$("#apadlockface").addClass("fi-lock");
$("#apadlockarea").addClass("apadlock");
$("#apadlockmsg").get(0).innerHTML=d.message;
} else
if ( !first_check ) {
if ( page_was_locked && page_unlocked_to_me ) document.location.reload(true);
} else {
$("#apadlockface").removeClass("fi-lock");
$("#apadlockmsg").get(0).innerHTML="You have edit control";
}
}
');
$p->JQ('
$.ajax({
url:"ajax.auto.skeleton.key",
data:{T:"' . $table . '",I:' . $id . '},
dataType:"json",
success:function(d){ set_row_mutex(d); }
});
setInterval(function(){
$.ajax({
url:"ajax.auto.skeleton.key",
data:{T:"' . $table . '",I:' . $id . '},
dataType:"json",
success:function(d){ set_row_mutex(d); }
});
}, 5000 );
');
plog("AutoLockMechanism: End");
}
示例5: pdo_insert
pdo_insert('ewei_shop_saler', $data);
$id = pdo_insertid();
plog('verify.saler.add', "添加核销员 ID: {$id} <br/>核销员信息: ID: {$m['id']} / {$m['openid']}/{$m['nickname']}/{$m['realname']}/{$m['mobile']} ");
}
message('更新核销员成功!', $this->createPluginWebUrl('verify/saler', array('op' => 'display')), 'success');
}
} elseif ($operation == 'delete') {
ca('verify.saler.delete');
$id = intval($_GPC['id']);
$item = pdo_fetch("SELECT id,openid FROM " . tablename('ewei_shop_saler') . " WHERE id = '{$id}'");
if (empty($item)) {
message('抱歉,核销员不存在或是已经被删除!', $this->createPluginWebUrl('verify/saler', array('op' => 'display')), 'error');
}
pdo_delete('ewei_shop_saler', array('id' => $id, 'uniacid' => $_W['uniacid']));
$m = m('member')->getMember($item['openid']);
plog('verify.saler.delete', "删除核销员 ID: {$id} <br/>核销员信息: ID: {$m['id']} / {$m['openid']}/{$m['nickname']}/{$m['realname']}/{$m['mobile']} ");
message('核销员删除成功!', $this->createPluginWebUrl('verify/saler', array('op' => 'display')), 'success');
} elseif ($operation == 'query') {
$kwd = trim($_GPC['keyword']);
$params = array();
$params[':uniacid'] = $_W['uniacid'];
$condition = " and s.uniacid=:uniacid";
if (!empty($kwd)) {
$condition .= " AND ( m.nickname LIKE :keyword or m.realname LIKE :keyword or m.mobile LIKE :keyword or store.storename like :keyword )";
$params[':keyword'] = "%{$kwd}%";
}
$ds = pdo_fetchall("SELECT s.*,m.nickname,m.avatar,m.mobile,m.realname,store.storename FROM " . tablename('ewei_shop_saler') . " s " . " left join " . tablename('ewei_shop_member') . " m on s.openid=m.openid " . " left join " . tablename('ewei_shop_store') . " store on store.id=s.storeid " . " WHERE 1 {$condition} ORDER BY id asc", $params);
include $this->template('query_saler');
exit;
}
load()->func('tpl');
示例6: ca
<?php
global $_W, $_GPC;
//check_shop_auth('http://120.26.212.219/api.php', $this -> pluginname);
ca('sale.enough.view');
$set = $this->getSet();
if (checksubmit('submit')) {
ca('sale.enough.save');
$data = is_array($_GPC['data']) ? $_GPC['data'] : array();
$set['enoughfree'] = intval($data['enoughfree']);
$set['enoughorder'] = round(floatval($data['enoughorder']), 2);
$set['enoughareas'] = $data['enoughareas'];
$set['enoughmoney'] = round(floatval($data['enoughmoney']), 2);
$set['enoughdeduct'] = round(floatval($data['enoughdeduct']), 2);
$this->updateSet($set);
plog('sale.enough.save', '修改满额优惠');
message('满额优惠设置成功!', referer(), 'success');
}
$areafile = IA_ROOT . "/addons/ewei_shop/data/areas";
$areas = json_decode(@file_get_contents($areafile), true);
if (!is_array($areas)) {
require_once EWEI_SHOP_INC . 'json/xml2json.php';
$file = IA_ROOT . "/addons/ewei_shop/static/js/dist/area/Area.xml";
$content = file_get_contents($file);
$json = xml2json::transformXmlStringToJson($content);
$areas = json_decode($json, true);
file_put_contents($areafile, $json);
}
load()->func('tpl');
include $this->template('enough');
示例7: message
message($result['message'], '', 'error');
}
foreach ($list as $row) {
$update = array();
foreach ($row['goods'] as $g) {
$update = array();
if ($row['level'] == 1 && $g['status1'] == 2) {
$update = array('paytime1' => $time, 'status1' => 3);
} else {
if ($row['level'] == 2 && $g['status2'] == 2) {
$update = array('paytime2' => $time, 'status2' => 3);
} else {
if ($row['level'] == 3 && $g['status3'] == 2) {
$update = array('paytime3' => $time, 'status3' => 3);
}
}
}
if (!empty($update)) {
pdo_update('ewei_shop_order_goods', $update, array('id' => $g['id']));
}
}
}
pdo_update('ewei_shop_commission_apply', array('status' => 3, 'paytime' => $time, 'commission_pay' => $totalpay), array('id' => $id, 'uniacid' => $_W['uniacid']));
$log = array('uniacid' => $_W['uniacid'], 'applyid' => $apply['id'], 'mid' => $member['id'], 'commission' => $totalcommission, 'commission_pay' => $totalpay, 'createtime' => $time);
pdo_insert('ewei_shop_commission_log', $log);
$this->model->sendMessage($member['openid'], array('commission' => $totalpay, 'type' => $apply['type'] == 1 ? '微信' : '余额'), TM_COMMISSION_PAY);
plog('commission.apply.pay', "佣金打款 ID: {$id} 申请编号: {$apply['applyno']} 总佣金: {$totalcommission} 审核通过佣金: {$totalpay} ");
message('佣金打款处理成功!', $this->createPluginWebUrl('commission/apply', array('status' => $apply['status'])), 'success');
}
load()->func('tpl');
include $this->template('apply');
示例8: elseif
} elseif ($class1 == 4) {
$member = pdo_fetchall("SELECT openid FROM " . tablename('ewei_shop_member') . " WHERE uniacid = '{$_W['uniacid']}'" . $where, array(), 'openid');
plog('tmessage.send', "会员群发 模板ID: {$id} 方式: 全部会员 分组:{$groupname} 人数: " . count($member));
die(json_encode(array('result' => 1, 'openids' => array_keys($member))));
} elseif ($class1 == 5) {
$where = '';
if ($value1 != '') {
$where .= " and agentlevel =" . intval($value1);
}
$member = pdo_fetchall("SELECT openid FROM " . tablename('ewei_shop_member') . " WHERE uniacid = '{$_W['uniacid']}' and isagent=1 and status=1 " . $where, array(), 'openid');
if (!empty($value1)) {
$levelname = pdo_fetchcolumn('select levelname from ' . tablename('ewei_shop_commission_level') . ' where id=:id limit 1', array(':id' => $value1));
} else {
$levelname = "全部";
}
plog('tmessage.send', "会员群发 模板ID: {$id} 方式: 分销商-{$levelname} 人数: " . count($member));
die(json_encode(array('result' => 1, 'openids' => array_keys($member))));
}
} elseif ($operation == 'sendmessage') {
$id = intval($_GPC['id']);
$template = pdo_fetch('SELECT * FROM ' . tablename('ewei_shop_member_message_template') . ' WHERE id=:id and uniacid=:uniacid ', array(':id' => $id, ':uniacid' => $_W['uniacid']));
if (empty($template)) {
die(json_encode(array('result' => 0, 'mesage' => '未指定群发模板!', 'openid' => $openid)));
}
if (empty($template['template_id'])) {
die(json_encode(array('result' => 0, 'mesage' => '未指定群发模板ID!', 'openid' => $openid)));
}
$openid = $_GPC['openid'];
if (empty($openid)) {
die(json_encode(array('result' => 0, 'mesage' => '未指定openid!', 'openid' => $openid)));
}
示例9: ca
if (empty($id)) {
ca('creditshop.category.add');
} else {
ca('creditshop.category.edit|creditshop.category.view');
}
if (checksubmit('submit')) {
$data = array('uniacid' => $_W['uniacid'], 'name' => trim($_GPC['catename']), 'enabled' => intval($_GPC['enabled']), 'isrecommand' => intval($_GPC['isrecommand']), 'displayorder' => intval($_GPC['displayorder']), 'thumb' => save_media($_GPC['thumb']));
if (!empty($id)) {
pdo_update('ewei_shop_creditshop_category', $data, array('id' => $id));
plog('creditshop.category.edit', "修改积分商城分类 ID: {$id}");
} else {
pdo_insert('ewei_shop_creditshop_category', $data);
$id = pdo_insertid();
plog('creditshop.category.add', "添加积分商城分类 ID: {$id}");
}
message('更新分类成功!', $this->createPluginWebUrl('creditshop/category', array('op' => 'display')), 'success');
}
$item = pdo_fetch("select * from " . tablename('ewei_shop_creditshop_category') . " where id=:id and uniacid=:uniacid limit 1", array(":id" => $id, ":uniacid" => $_W['uniacid']));
} elseif ($operation == 'delete') {
ca('creditshop.category.delete');
$id = intval($_GPC['id']);
$item = pdo_fetch("SELECT id,name FROM " . tablename('ewei_shop_creditshop_category') . " WHERE id = '{$id}' AND uniacid=" . $_W['uniacid'] . "");
if (empty($item)) {
message('抱歉,分类不存在或是已经被删除!', $this->createPluginWebUrl('creditshop/category', array('op' => 'display')), 'error');
}
pdo_delete('ewei_shop_creditshop_category', array('id' => $id));
plog('creditshop.category.delete', "删除积分商城分类 ID: {$id} 标题: {$item['name']} ");
message('分类删除成功!', $this->createPluginWebUrl('creditshop/category', array('op' => 'display')), 'success');
}
load()->func('tpl');
include $this->template('category');
示例10: ca
if (empty($id)) {
ca('creditshop.adv.add');
} else {
ca('creditshop.adv.edit|creditshop.adv.view');
}
if (checksubmit('submit')) {
$data = array('uniacid' => $_W['uniacid'], 'advname' => trim($_GPC['advname']), 'link' => trim($_GPC['link']), 'enabled' => intval($_GPC['enabled']), 'displayorder' => intval($_GPC['displayorder']), 'thumb' => save_media($_GPC['thumb']));
if (!empty($id)) {
pdo_update('ewei_shop_creditshop_adv', $data, array('id' => $id));
plog('creditshop.adv.edit', "修改积分商城幻灯片 ID: {$id}");
} else {
pdo_insert('ewei_shop_creditshop_adv', $data);
$id = pdo_insertid();
plog('creditshop.adv.add', "添加积分商城幻灯片 ID: {$id}");
}
message('更新幻灯片成功!', $this->createPluginWebUrl('creditshop/adv', array('op' => 'display')), 'success');
}
$item = pdo_fetch("select * from " . tablename('ewei_shop_creditshop_adv') . " where id=:id and uniacid=:uniacid limit 1", array(":id" => $id, ":uniacid" => $_W['uniacid']));
} elseif ($operation == 'delete') {
ca('creditshop.adv.delete');
$id = intval($_GPC['id']);
$item = pdo_fetch("SELECT id,advname FROM " . tablename('ewei_shop_creditshop_adv') . " WHERE id = '{$id}' AND uniacid=" . $_W['uniacid'] . "");
if (empty($item)) {
message('抱歉,幻灯片不存在或是已经被删除!', $this->createPluginWebUrl('creditshop/adv', array('op' => 'display')), 'error');
}
pdo_delete('ewei_shop_creditshop_adv', array('id' => $id));
plog('creditshop.adv.delete', "删除积分商城幻灯片 ID: {$id} 标题: {$item['advname']} ");
message('幻灯片删除成功!', $this->createPluginWebUrl('creditshop/adv', array('op' => 'display')), 'success');
}
load()->func('tpl');
include $this->template('adv');
示例11: ca
global $_W, $_GPC;
//check_shop_auth('http://120.26.212.219/api.php', $this -> pluginname);
ca('commission.cover');
$rule = pdo_fetch("select * from " . tablename('rule') . ' where uniacid=:uniacid and module=:module and name=:name limit 1', array(':uniacid' => $_W['uniacid'], ':module' => 'cover', ':name' => "ewei_shop分销中心入口设置"));
if (!empty($rule)) {
$keyword = pdo_fetch("select * from " . tablename('rule_keyword') . ' where uniacid=:uniacid and rid=:rid limit 1', array(':uniacid' => $_W['uniacid'], ':rid' => $rule['id']));
$cover = pdo_fetch("select * from " . tablename('cover_reply') . ' where uniacid=:uniacid and rid=:rid limit 1', array(':uniacid' => $_W['uniacid'], ':rid' => $rule['id']));
}
if (checksubmit('submit')) {
$data = is_array($_GPC['cover']) ? $_GPC['cover'] : array();
if (empty($data['keyword'])) {
message('请输入关键词!');
}
if (!empty($rule)) {
pdo_delete('rule', array('id' => $rule['id'], 'uniacid' => $_W['uniacid']));
pdo_delete('rule_keyword', array('rid' => $rule['id'], 'uniacid' => $_W['uniacid']));
pdo_delete('cover_reply', array('rid' => $rule['id'], 'uniacid' => $_W['uniacid']));
}
$rule_data = array('uniacid' => $_W['uniacid'], 'name' => 'ewei_shop分销中心入口设置', 'module' => 'cover', 'displayorder' => 0, 'status' => intval($data['status']));
pdo_insert('rule', $rule_data);
$rid = pdo_insertid();
$keyword_data = array('uniacid' => $_W['uniacid'], 'rid' => $rid, 'module' => 'cover', 'content' => trim($data['keyword']), 'type' => 1, 'displayorder' => 0, 'status' => intval($data['status']));
pdo_insert('rule_keyword', $keyword_data);
$cover_data = array('uniacid' => $_W['uniacid'], 'rid' => $rid, 'module' => $this->modulename, 'title' => trim($data['title']), 'description' => trim($data['desc']), 'thumb' => $data['thumb'], 'url' => $this->createPluginMobileUrl('commission'));
pdo_insert('cover_reply', $cover_data);
plog('commission.cover', '修改分销商入口设置');
message('分销中心入口设置成功!', referer(), 'success');
}
load()->func('tpl');
include $this->template('cover');
示例12: ca
//decode by 012wz.com QQ:800083075
global $_W, $_GPC;
ca('creditshop.cover');
$rule = pdo_fetch("select * from " . tablename('rule') . ' where uniacid=:uniacid and module=:module and name=:name limit 1', array(':uniacid' => $_W['uniacid'], ':module' => 'cover', ':name' => "ewei_shop积分商城入口设置"));
if (!empty($rule)) {
$keyword = pdo_fetch("select * from " . tablename('rule_keyword') . ' where uniacid=:uniacid and rid=:rid limit 1', array(':uniacid' => $_W['uniacid'], ':rid' => $rule['id']));
$cover = pdo_fetch("select * from " . tablename('cover_reply') . ' where uniacid=:uniacid and rid=:rid limit 1', array(':uniacid' => $_W['uniacid'], ':rid' => $rule['id']));
}
if (checksubmit('submit')) {
$data = is_array($_GPC['cover']) ? $_GPC['cover'] : array();
if (empty($data['keyword'])) {
message('请输入关键词!');
}
if (!empty($rule)) {
pdo_delete('rule', array('id' => $rule['id'], 'uniacid' => $_W['uniacid']));
pdo_delete('rule_keyword', array('rid' => $rule['id'], 'uniacid' => $_W['uniacid']));
pdo_delete('cover_reply', array('rid' => $rule['id'], 'uniacid' => $_W['uniacid']));
}
$rule_data = array('uniacid' => $_W['uniacid'], 'name' => 'ewei_shop积分商城入口设置', 'module' => 'cover', 'displayorder' => 0, 'status' => intval($data['status']));
pdo_insert('rule', $rule_data);
$rid = pdo_insertid();
$keyword_data = array('uniacid' => $_W['uniacid'], 'rid' => $rid, 'module' => 'cover', 'content' => trim($data['keyword']), 'type' => 1, 'displayorder' => 0, 'status' => intval($data['status']));
pdo_insert('rule_keyword', $keyword_data);
$cover_data = array('uniacid' => $_W['uniacid'], 'rid' => $rid, 'module' => $this->modulename, 'title' => trim($data['title']), 'description' => trim($data['desc']), 'thumb' => $data['thumb'], 'url' => $this->createPluginMobileUrl('creditshop'));
pdo_insert('cover_reply', $cover_data);
plog('creditshop.cover', '修改积分商城入口设置');
message('分销中心入口设置成功!', referer(), 'success');
}
load()->func('tpl');
include $this->template('cover');
示例13: ca
if ($paytype == 'refund') {
ca('finance.recharge.refund');
if (!empty($log['type'])) {
message('微信钱包退款失败: 非充值记录!', '', 'error');
}
if ($log['rechargetype'] != 'alipay' && $log['rechargetype'] != 'wechat') {
message('微信钱包退款失败: 后台充值无法退款!', '', 'error');
}
$current_credit = m('member')->getCredit($log['openid'], 'credit2');
if ($log['money'] > $current_credit) {
message('微信钱包退款失败: 会员账户余额不足,无法进行退款!', '', 'error');
}
$result = m('finance')->pay($log['openid'], 1, $log['money'] * 100, $log['logno'], $set['name'] . '充值退款');
if (is_error($result)) {
message('微信钱包退款失败: ' . $result['message'], '', 'error');
}
pdo_update('ewei_shop_member_log', array('status' => 3), array('id' => $id, 'uniacid' => $uniacid));
m('member')->setCredit($log['openid'], 'credit2', -$log['money'], array(0, $set['name'] . '充值退款'));
m('notice')->sendMemberLogMessage($log['id']);
plog('finance.withdraw.withdraw', "充值退款 ID: {$log['id']} 金额: {$log['money']} <br/>会员信息: ID: {$member['id']} / {$member['openid']}/{$member['nickname']}/{$member['realname']}/{$member['mobile']}");
message('充值退款成功!', referer(), 'success');
} else {
message('未找到提现方式!', '', 'error');
}
}
}
}
}
}
load()->func('tpl');
include $this->template('web/finance/log');
示例14: ca
ca('virtual.category.view');
if (!empty($_GPC['catname'])) {
ca('virtual.category.edit|virtual.category.add');
foreach ($_GPC['catname'] as $id => $catname) {
if ($id == 'new') {
ca('virtual.category.add');
pdo_insert('ewei_shop_virtual_category', array('name' => $catname, 'uniacid' => $_W['uniacid']));
$insert_id = pdo_insertid();
plog('virtual.category.add', "添加分类 ID: {$insert_id}");
} else {
pdo_update('ewei_shop_virtual_category', array('name' => $catname), array('id' => $id));
plog('virtual.category.edit', "修改分类 ID: {$id}");
}
}
plog('virtual.category.edit', '批量修改分类');
message('分类更新成功!', $this->createPluginWebUrl('virtual/category', array('op' => 'display')), 'success');
}
$list = pdo_fetchall("SELECT * FROM " . tablename('ewei_shop_virtual_category') . " WHERE uniacid = '{$_W['uniacid']}' ORDER BY id DESC");
} elseif ($operation == 'delete') {
ca('virtual.category.delete');
$id = intval($_GPC['id']);
$item = pdo_fetch("SELECT id,name FROM " . tablename('ewei_shop_virtual_category') . " WHERE id = '{$id}' AND uniacid=" . $_W['uniacid'] . "");
if (empty($item)) {
message('抱歉,分类不存在或是已经被删除!', $this->createPluginWebUrl('virtual/category', array('op' => 'display')), 'error');
}
pdo_delete('ewei_shop_virtual_category', array('id' => $id));
plog('virtual.category.delete', "删除分类 ID: {$id} 标题: {$item['name']} ");
message('分类删除成功!', $this->createPluginWebUrl('virtual/category', array('op' => 'display')), 'success');
}
load()->func('tpl');
include $this->template('category');
示例15: current_page_url
global $session;
$session = NULL;
global $user;
$user = NULL;
global $domain;
$domain = NULL;
global $expired;
$expired = false;
global $pageurl;
$pageurl = current_page_url();
global $is_logged_in;
$is_logged_in = false;
if (!defined('quiet_auth')) {
$domain = explode("/", str_replace("http://", "", $pageurl));
$domain = $domain[0];
}
if (!defined('suppress_auth')) {
$session_model->Active();
plog('$auth: ' . vars($auth));
plog('$session: ' . vars($session));
}
global $plog_level;
if ($plog_level == 1) {
plog('##### $pageurl: ' . vars($pageurl));
if (isset($_SERVER['HTTP_REFERRER'])) {
plog('Referred: ' . $_SERVER['HTTP_REFERRER']);
}
plog('getpost():------' . vars(getpost()));
}
plog('----Executing: ' . vars($pageurl));