当前位置: 首页>>代码示例>>PHP>>正文


PHP clearlogstring函数代码示例

本文整理汇总了PHP中clearlogstring函数的典型用法代码示例。如果您正苦于以下问题:PHP clearlogstring函数的具体用法?PHP clearlogstring怎么用?PHP clearlogstring使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了clearlogstring函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: empty

    case 'plugin':
        $script = 'plugin';
        break;
    default:
        $_G['gp_action'] = $script = 'home';
        $modtpl = 'modcp_home';
}
$script = empty($script) ? 'noperm' : $script;
$modtpl = empty($modtpl) ? !empty($script) ? 'modcp_' . $script : '' : $modtpl;
$modtpl = 'forum/' . $modtpl;
$op = isset($op) ? trim($op) : '';
if ($script != 'log') {
    include libfile('function/misc');
    $extra = implodearray(array('GET' => $_GET, 'POST' => $_POST), array('cppwd', 'formhash', 'submit', 'addsubmit'));
    $modcplog = array(TIMESTAMP, $_G['username'], $_G['adminid'], $_G['clientip'], $_G['gp_action'], $op, $_G['fid'], $extra);
    writelog('modcp', implode("\t", clearlogstring($modcplog)));
}
require DISCUZ_ROOT . './source/include/modcp/modcp_' . $script . '.php';
$reportnum = $modpostnum = $modthreadnum = $modforumnum = 0;
$modforumnum = count($modforums['list']);
if ($modforumnum) {
    $modnum = ($_G['group']['allowmodpost'] ? getcountofposts(DB::table('forum_post'), "invisible='-2' AND first='0' and fid IN({$modforums['fids']})") + DB::result_first("SELECT COUNT(*) FROM " . DB::table('forum_thread') . " WHERE fid IN({$modforums['fids']}) AND displayorder='-2'") : 0) + ($_G['group']['allowmoduser'] ? DB::result_first("SELECT COUNT(*) FROM " . DB::table('common_member_validate') . " WHERE status='0'") : 0);
}
switch ($_G['adminid']) {
    case 1:
        $access = '1,2,3,4,5,6,7';
        break;
    case 2:
        $access = '2,3,6,7';
        break;
    default:
开发者ID:Kingson4Wu,项目名称:php_demo,代码行数:31,代码来源:forum_modcp.php

示例2: clearlogstring

function clearlogstring($str)
{
    if (!empty($str)) {
        if (!is_array($str)) {
            $str = dhtmlspecialchars(trim($str));
            $str = str_replace(array("\t", "\r\n", "\n", "   ", "  "), ' ', $str);
        } else {
            foreach ($str as $key => $val) {
                $str[$key] = clearlogstring($val);
            }
        }
    }
    return $str;
}
开发者ID:Kingson4Wu,项目名称:php_demo,代码行数:14,代码来源:function_misc.php

示例3: setcookie

if (empty($_G['uid'])) {
    setcookie('_refer', $_SERVER['SCRIPT_NAME'] . '?action=' . $_GET['action'] . '&m=' . $GET['m']);
    showmessage('admin_login', $b_url);
}
/*
//常見id處理
foreach(array('itemid', 'nid', 'uid', 'catid', 'shopid', 'albumid', 'groupid', 'upid', 'displayorder', 'cmid') as $value) {
	//$_GET[$value] = $_POST[$value] = $_REQUEST[$value] = intval(!empty($_POST[$value])?$_POST[$value]:(!empty($_GET[$value])?$_GET[$value]:0));
}
*/
//載入語言包
include_once B_ROOT . './language/admin.lang.php';
$lang = array_merge($lang, $alang);
//記錄log
$extralog = implodearray(array('GET' => $_GET, 'POST' => $_POST), array('formhash', 'submit', 'action'));
writelog(substr($BASESCRIPT, 0, -4) . 'log', implode("\t", clearlogstring(array($_G['timestamp'], $_G['username'], $_G['clientip'], $_REQUEST['action'], $extralog))));
if (!in_array($_GET['m'], $models)) {
    $_GET['m'] = 'shop';
}
//讀入緩存
if (!in_array($_GET['m'], array('album', 'photo', 'brandlinks'))) {
    $cacheinfo = getmodelinfoall('modelname', $_GET['m']);
    $mname = $cacheinfo['models']['modelname'];
    $mid = $cacheinfo['models']['mid'];
    $categorylist = $_G['categorylist'];
} else {
    $mname = $_GET['m'];
}
//審核等級對應關係
$_SGLOBAL['shopgrade'] = array(3 => $lang['grade_3'], 1 => $lang['grade_1'], 2 => $lang['grade_2'], 0 => $lang['grade_0'], 5 => $lang['grade_5']);
if ($_GET['m'] != 'shop') {
开发者ID:pan289091315,项目名称:Discuz,代码行数:31,代码来源:common.inc.php

示例4: writecplog

 function writecplog()
 {
     global $_G;
     $extralog = implodearray(array('GET' => $_GET, 'POST' => $_POST), array('formhash', 'submit', 'addsubmit', 'admin_password', 'sid', 'action'));
     writelog('cplog', implode("\t", clearlogstring(array($_G['timestamp'], $_G['username'], $_G['adminid'], $_G['clientip'], getgpc('action'), $extralog))));
 }
开发者ID:dalinhuang,项目名称:hlwbbsvincent,代码行数:6,代码来源:class_admincp.php

示例5: is_string

 $operation = !empty($operation) && is_string($operation) ? trim($operation) : '';
 $page = isset($page) ? intval(max(1, $page)) : 0;
 if (!empty($action) && !in_array($action, array('main', 'logs'))) {
     switch ($cpaccess) {
         case 1:
             $extralog = 'AUTHENTIFICATION(ERROR #' . intval($adminsession['errorcount']) . ')';
             break;
         case 3:
             $extralog = implodearray(array('GET' => $_GET, 'POST' => $_POST), array('formhash', 'submit', 'addsubmit', 'admin_password', 'sid', 'action'));
             break;
         default:
             $extralog = '';
     }
     $extralog = trim(str_replace(array('GET={};', 'POST={};'), '', $extralog));
     $extralog = $action == 'home' && isset($securyservice) || $action == 'insenz' && in_array($operation, array('register', 'binding')) ? '' : $extralog;
     writelog('cplog', implode("\t", clearlogstring(array($timestamp, $discuz_userss, $adminid, $onlineip, $action, $extralog))));
     unset($extralog);
 }
 $isfounder = $adminsession->isfounder = isfounder();
 if (empty($action) || isset($frames)) {
     $extra = cpurl('url');
     $extra = $extra && $action ? $extra : (!empty($runwizard) ? 'action=runwizard' : 'action=home');
     require_once DISCUZ_ROOT . './admin/main.inc.php';
 } elseif ($action == 'logout') {
     $adminsession->destroy();
     dheader("Location: {$indexname}");
 } else {
     checkacpaction($action, $operation);
     if (in_array($action, array('home', 'settings', 'members', 'profilefields', 'admingroups', 'usergroups', 'ranks', 'forums', 'threadtypes', 'threads', 'moderate', 'attach', 'smilies', 'recyclebin', 'prune', 'styles', 'plugins', 'tasks', 'magics', 'medals', 'google', 'qihoo', 'video', 'announce', 'faq', 'ec', 'tradelog', 'creditwizard', 'jswizard', 'project', 'counter', 'misc', 'adv', 'insenz', 'logs', 'tools', 'checktools', 'search', 'upgrade')) || $isfounder && in_array($action, array('runwizard', 'templates', 'db'))) {
         require_once DISCUZ_ROOT . './admin/' . $action . '.inc.php';
         $title = 'cplog_' . $action . ($operation ? '_' . $operation : '');
开发者ID:AlexChien,项目名称:EY_BBS,代码行数:31,代码来源:admincp.php


注:本文中的clearlogstring函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。