本文整理汇总了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';
示例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;
}
示例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']);
示例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))));
}
示例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') {