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


PHP implodearray函数代码示例

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


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

示例1: empty

        $script = 'stat';
        break;
    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';
开发者ID:Kingson4Wu,项目名称:php_demo,代码行数:31,代码来源:forum_modcp.php

示例2: implodearray

function implodearray($array, $skip = array())
{
    $return = '';
    if (is_array($array) && !empty($array)) {
        foreach ($array as $key => $value) {
            if (empty($skip) || !in_array($key, $skip)) {
                if (is_array($value)) {
                    $return .= "{$key}={" . implodearray($value, $skip) . "}; ";
                } else {
                    $return .= "{$key}={$value}; ";
                }
            }
        }
    }
    return $return;
}
开发者ID:Kingson4Wu,项目名称:php_demo,代码行数:16,代码来源: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']);
开发者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: dexit

 // OpenID4Discuz
 if (!empty($action) && !empty($openid_identifier)) {
     include DISCUZ_ROOT . './openid.php';
     dexit();
 }
 $username = !empty($username) ? dhtmlspecialchars($username) : '';
 $action = !empty($action) && is_string($action) ? trim($action) : '';
 $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') {
开发者ID:AlexChien,项目名称:EY_BBS,代码行数:31,代码来源:admincp.php


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