• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP getcachevars函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: updatecache

function updatecache($cachename = '')
{
    global $db, $bbname, $tablepre, $maxbdays;
    static $cachescript = array('settings' => array('settings'), 'usergroups' => array('usergroups'), 'ipbanned' => array('ipbanned'));
    if ($maxbdays) {
        $cachescript['birthdays'] = array('birthdays');
        $cachescript['index'][] = 'birthdays_index';
    }
    $updatelist = empty($cachename) ? array_values($cachescript) : (is_array($cachename) ? array('0' => $cachename) : array(array('0' => $cachename)));
    $updated = array();
    foreach ($updatelist as $value) {
        foreach ($value as $cname) {
            if (empty($updated) || !in_array($cname, $updated)) {
                $updated[] = $cname;
                getcachearray($cname);
            }
        }
    }
    foreach ($cachescript as $script => $cachenames) {
        if (empty($cachename) || !is_array($cachename) && in_array($cachename, $cachenames) || is_array($cachename) && array_intersect($cachename, $cachenames)) {
            $cachedata = '';
            $query = $db->query("SELECT data FROM {$tablepre}caches WHERE cachename in(" . implodeids($cachenames) . ")");
            while ($data = $db->fetch_array($query)) {
                $cachedata .= $data['data'];
            }
            writetocache($script, $cachenames, $cachedata);
        }
    }
    if (!$cachename || $cachename == 'admingroups') {
        $query = $db->query("SELECT * FROM {$tablepre}admingroups");
        while ($data = $db->fetch_array($query)) {
            writetocache($data['admingid'], '', getcachevars($data), 'admingroup_');
        }
    }
}
开发者ID:tanny2015,项目名称:DataStructure,代码行数:35,代码来源:cache.func.php


示例2: build_cache_plugin

function build_cache_plugin()
{
    $data = array();
    $query = DB::query("SELECT * FROM " . DB::table('common_plugin') . " WHERE available='1'");
    $pluginsetting = array();
    while ($plugin = DB::fetch($query)) {
        $queryvars = DB::query("SELECT * FROM " . DB::table('common_pluginvar') . " WHERE pluginid='{$plugin['pluginid']}'");
        while ($var = DB::fetch($queryvars)) {
            $data[$plugin['identifier']][$var['variable']] = $var['value'];
            if (in_array(substr($var['type'], 0, 6), array('group_', 'forum_'))) {
                $stype = substr($var['type'], 0, 5) . 's';
                $type = substr($var['type'], 6);
                if ($type == 'select') {
                    foreach (explode("\n", $var['extra']) as $key => $option) {
                        $option = trim($option);
                        if (strpos($option, '=') === FALSE) {
                            $key = $option;
                        } else {
                            $item = explode('=', $option);
                            $key = trim($item[0]);
                            $option = trim($item[1]);
                        }
                        $var['select'][] = array($key, $option);
                    }
                }
                $pluginsetting[$stype][$plugin['identifier']]['name'] = $plugin['name'];
                $pluginsetting[$stype][$plugin['identifier']]['setting'][$var['pluginvarid']] = array('title' => $var['title'], 'description' => $var['description'], 'type' => $type, 'select' => $var['select']);
            }
        }
    }
    writetocache('pluginsetting', getcachevars(array('pluginsetting' => $pluginsetting)));
    save_syscache('plugin', $data);
}
开发者ID:v998,项目名称:discuzx-en,代码行数:33,代码来源:cache_plugin.php


示例3: shy9000_famehall_updateCache

function shy9000_famehall_updateCache()
{
    $query = DB::query("SELECT g.groupname, g.grouppic, m.uid, m.gid, m.value FROM " . DB::table('mingrentang') . " m, " . DB::table('mingrentanggroup') . " g WHERE m.gid=g.id ORDER BY m.uid");
    while ($famehall = DB::fetch($query)) {
        $return[$famehall['uid']][] = $famehall['groupname'];
        $return2[$famehall['uid']][] = $famehall['gid'];
        $return3[$famehall['uid']][] = cutstr($famehall['value'], 40);
        $return4[$famehall['uid']][] = $famehall['grouppic'] ? $famehall['grouppic'] : 'def.gif';
    }
    require_once libfile('function/cache');
    writetocache('famehall_cache', getcachevars(array('_FHCACHE' => array('gname' => $return, 'gid' => $return2, 'js' => $return3, 'pic' => $return4))));
    return $return;
}
开发者ID:v998,项目名称:dsu,代码行数:13,代码来源:star.inc.php


示例4: build_cache_plugin

function build_cache_plugin()
{
    global $importtxt;
    $data = array();
    $query = DB::query("SELECT * FROM " . DB::table('common_plugin') . " WHERE available='1'");
    $pluginsetting = array();
    while ($plugin = DB::fetch($query)) {
        $dir = substr($plugin['directory'], 0, -1);
        $plugin['modules'] = unserialize($plugin['modules']);
        if ($plugin['modules']['extra']['langexists']) {
            require_once libfile('function/plugin');
            require_once libfile('function/admincp');
            $file = DISCUZ_ROOT . './source/plugin/' . $dir . '/discuz_plugin_' . $dir . ($plugin['modules']['extra']['installtype'] ? '_' . $plugin['modules']['extra']['installtype'] : '') . '.xml';
            $importtxt = @implode('', file($file));
            $pluginarray = getimportdata('Discuz! Plugin', 1, 1);
            if ($pluginarray) {
                updatepluginlanguage($pluginarray);
            }
        }
        $queryvars = DB::query("SELECT * FROM " . DB::table('common_pluginvar') . " WHERE pluginid='{$plugin['pluginid']}'");
        while ($var = DB::fetch($queryvars)) {
            $data[$plugin['identifier']][$var['variable']] = $var['value'];
            if (in_array(substr($var['type'], 0, 6), array('group_', 'forum_'))) {
                $stype = substr($var['type'], 0, 5) . 's';
                $type = substr($var['type'], 6);
                if ($type == 'select') {
                    foreach (explode("\n", $var['extra']) as $key => $option) {
                        $option = trim($option);
                        if (strpos($option, '=') === FALSE) {
                            $key = $option;
                        } else {
                            $item = explode('=', $option);
                            $key = trim($item[0]);
                            $option = trim($item[1]);
                        }
                        $var['select'][] = array($key, $option);
                    }
                }
                $pluginsetting[$stype][$plugin['identifier']]['name'] = $plugin['name'];
                $pluginsetting[$stype][$plugin['identifier']]['setting'][$var['pluginvarid']] = array('title' => $var['title'], 'description' => $var['description'], 'type' => $type, 'select' => $var['select']);
            }
        }
    }
    writetocache('pluginsetting', getcachevars(array('pluginsetting' => $pluginsetting)));
    save_syscache('plugin', $data);
}
开发者ID:pan289091315,项目名称:Discuz,代码行数:46,代码来源:cache_plugin.php


示例5: build_cache_plugin_mobile

function build_cache_plugin_mobile() {
	if(!defined('DISCUZ_VERSION')) {
	    require './source/discuz_version.php';
	}

	global $_G;

	$setting = array();
	$settings = array('closeforumorderby');
	foreach($settings as $v) {
		$setting[$v] = $_G['setting'][$v];
	}

	if(in_array('mobile', $_G['setting']['plugins']['available'])) {
		$extendsetting = C::t('#mobile#mobile_setting')->fetch_all(array(
			'extend_used',
			'extend_lastupdate'
		));
		$array = array(
			'discuzversion' => DISCUZ_VERSION,
			'charset' => CHARSET,
			'version' => MOBILE_PLUGIN_VERSION,
			'pluginversion' => $_G['setting']['plugins']['version']['mobile'],
			'oemversion' => in_array('mobileoem', $_G['setting']['plugins']['available']) ? $_G['setting']['plugins']['version']['mobileoem'] : '0',
			'regname' => $_G['setting']['regname'],
			'qqconnect' => in_array('qqconnect', $_G['setting']['plugins']['available']) ? '1' : '0',
			'sitename' => $_G['setting']['bbname'],
			'mysiteid' => $_G['setting']['my_siteid'],
			'ucenterurl' => $_G['setting']['ucenterurl'],
			'setting' => $setting,
			'extends' => array('used' => $extendsetting['extend_used'], 'lastupdate' => $extendsetting['extend_lastupdate']),
		);
	} else {
		$array = array();
	}

	require_once './source/plugin/mobile/mobile.class.php';

	$data = array('mobilecheck' => mobile_core::json($array));
	writetocache('mobile', getcachevars($data));
}
开发者ID:hutao1004,项目名称:yintt,代码行数:41,代码来源:cache_mobile.php


示例6: rewrite_list

            $pageinfo .= '<a href="' . rewrite_list($_GET['type'], $page + 1) . '" class="nextpage">' . lang('plugin/dzapp_haodai', 'page_3') . '</a><a href="' . rewrite_list($_GET['type'], $maxpage) . '" class="nextpage">' . lang('plugin/dzapp_haodai', 'page_4') . '</a>';
        }
    }
    if (empty($result['items'])) {
        showmessage('dzapp_haodai:param_wrong');
    }
    $articles = $result['items'];
    include template('dzapp_haodai:list');
} elseif ($action == 'calc') {
    $type = $_GET['type'];
    if (!in_array($type, array('chedai', 'debj', 'debx', 'esjys', 'fd', 'gjj', 'secondhand', 'zhdk'))) {
        showmessage('dzapp_haodai:param_wrong');
    }
    if (!@(include_once DISCUZ_ROOT . './data/sysdata/cache_dzapp_haodai_dkgl_' . $city . '.php' || TIMESTAMP - filemtime(DISCUZ_ROOT . './data/sysdata/cache_dzapp_haodai_dkgl_' . $city . '.php') > $var['refreshtime'])) {
        $dkgl_article = get_article_dkgl_list();
        writetocache('dzapp_haodai_dkgl_' . $city, getcachevars(array('dkgl_article' => $dkgl_article)));
    }
    $seodata = array('bbname' => $_G['setting']['bbname'], 'calc_type' => lang('plugin/dzapp_haodai', 'calc_' . $type));
    list($navtitle, $metadescription, $metakeywords) = get_seosetting('', $seodata, $dzapp_haodai_seo['calc']);
    if (defined('IN_MOBILE') && $type == 'fd') {
        $script_more = '
					var $btnss = $(\'.btn-b\');
                    var $tables = $btnss.siblings(\'.int_table\');
                    $btnss.click(
                            function() {
                            if ($tables.hasClass(\'hide-table\')) {
                            $tables.removeClass(\'hide-table\');
                                    $(this).html(\'' . lang('plugin/dzapp_haodai', 'hide-table') . '\');
                            } else
                            {
                            $tables.addClass(\'hide-table\');
开发者ID:samyex6,项目名称:discuz3.2-lite,代码行数:31,代码来源:dzapp_haodai.inc.php


示例7: getcachevars

	This is NOT a freeware, use is subject to license terms

	$Id: admin.inc.php 21306 2009-11-26 00:56:50Z monkey $
*/

if(!defined('IN_DISCUZ') || !defined('IN_ADMINCP')) {
	exit('Access Denied');
}

$palang = $GLOBALS['scriptlang']['dps_postawards'];

@include_once DISCUZ_ROOT.'./forumdata/cache/cache_usergroups.php';

if(submitcheck('submit')){
	require_once DISCUZ_ROOT.'./include/cache.func.php';
	writetocache('postawards_setting', '', getcachevars(array('PACACHE' => array('userright' => $userright))));
	$cache = serialize($userright);
	$cachedata = "\$PACACHE['userright'] = ".arrayeval($userright).";\n\n";
	$db->query("REPLACE INTO {$tablepre}caches (cachename, type, dateline, data) VALUES ('postawards', '1', '$timestamp', '".addslashes($cachedata)."')");
}

@include_once DISCUZ_ROOT.'./forumdata/cache/cache_postawards_setting.php';

if(is_array($PACACHE)) {
	foreach($PACACHE['userright'] as $key => $item) {
		$postawards_checked[$key] = $item['postawards'] ? ' checked' : '';
		$systemcredit_checked[$key] = $item['systemcredit'] ? ' checked' : '';
		$ratemode_checked[$key] = $item['ratemode'] ? ' checked' : '';
		$ratelowlimit[$key] = $item['ratelowlimit'];
		$ratehighlimit[$key] = $item['ratehighlimit'];
		$ratealllimit[$key] = $item['ratealllimit'];
开发者ID:BGCX262,项目名称:zyyhong-svn-to-git,代码行数:31,代码来源:admin.inc.php


示例8: smart_cache

function smart_cache()
{
    global $_G;
    $smart = $_G['cache']['plugin']['smart_video'];
    $hot = C::t("#smart_video#video")->fetch_all_by_where('smart_video_thread', 'visiable=1', 'play desc,dateline desc', 0, 10);
    $boke = C::t("#smart_video#video")->fetch_all_by_where('smart_video_user', 'threads<>0', 'threads desc', 0, 8);
    if (empty($smart['recom'])) {
        $new = C::t("#smart_video#video")->fetch_all_by_where('smart_video_thread', 'visiable=1', 'dateline desc', 0, 6);
    } else {
        $n_tids = explode("|", $smart['recom']);
        $new = C::t("#smart_video#video")->fetch_all_by_array('smart_video_thread', 'tid', $n_tids);
    }
    $fclass = C::t("#smart_video#video")->fetch_all("type=1");
    $enew = array();
    foreach ($fclass as $k => $v) {
        $enew[] = C::t("#smart_video#video")->fetch_all_by_where('smart_video_thread', 'fcid=' . intval($fclass[$k]['cid']) . " and visiable=1", 'dateline desc', 0, 9);
        if ($k == 8) {
            break;
        }
    }
    $smart_video = array('new' => $new, 'hot' => $hot, 'fclass' => $fclass, 'enew' => $enew, 'boke' => $boke, 'time' => time());
    require_once libfile("function/cache");
    writetocache('smart_video', getcachevars(array('smart_video' => $smart_video)));
    return $smart_video;
}
开发者ID:JX3PVE-Team,项目名称:JX3PVE2015,代码行数:25,代码来源:function_video.php


示例9: exit

<?php

if (!defined('IN_DISCUZ') || !defined('IN_ADMINCP')) {
    exit('Access Denied');
}
if (submitcheck('submit')) {
    require_once libfile('function/cache');
    writetocache('paulissue_setting', getcachevars(array('PACACHE' => array('issuetypeid' => $_G['gp_issuetypeid']))));
    $cache = serialize($_G['gp_issuetypeid']);
    $cachedata = "\$PACACHE['issuetypeid'] = " . arrayeval($_G['gp_issuetypeid']) . ";\n\n";
    DB::query("REPLACE INTO " . DB::table('common_cache') . " (cachekey, cachevalue, dateline) VALUES ('paulissue_setting', '" . addslashes($cachedata) . "', '{$_G['timestamp']}')");
    cpmsg(lang('plugin/dsu_paulissue', 'ht_1'), '', 'succeed');
}
@(include_once DISCUZ_ROOT . './data/cache/cache_paulissue_setting.php');
if (is_array($PACACHE)) {
    foreach ($PACACHE['issuetypeid'] as $key => $item) {
        $dt[$key] = $item['dt'];
        $ot[$key] = $item['ot'];
    }
}
showformheader("plugins&operation=config&do=13&identifier=dsu_paulissue&pmod=admin");
showtableheader('dsu_paulissue');
showsubtitle(array(lang('plugin/dsu_paulissue', 'ht_2'), lang('plugin/dsu_paulissue', 'ht_3'), lang('plugin/dsu_paulissue', 'ht_4')));
loadcache('plugin');
$ofids = dimplode(unserialize($_G['cache']['plugin']['dsu_paulissue']['ofid']));
$query = DB::query("SELECT name,fid FROM " . DB::table('forum_forum') . " WHERE fid IN ({$ofids}) ORDER BY fid");
while ($forum = DB::fetch($query)) {
    $list = showtablerow('', array('class="td35"', 'class="td35"', 'class="td35"', 'class="td35"', 'class="td35"', 'class="td35"', 'class="td35"', 'class="td35"'), array($forum['name'], '<input type="text" name="issuetypeid[' . $forum['fid'] . '][dt]" id="dt" value="' . $dt[$forum['fid']] . '">', '<input type="text" name="issuetypeid[' . $forum['fid'] . '][ot]" id="ot" value="' . $ot[$forum['fid']] . '">'), TRUE);
    echo $list;
}
showsubmit('submit', 'submit', '', '');
开发者ID:v998,项目名称:dsu,代码行数:31,代码来源:admin.inc.php


示例10: array

$data = array();
$query = $db->query("SELECT attach.aid, attach.attachment, t.tid, t.fid, t.subject FROM {$tablepre}attachments attach LEFT JOIN {$tablepre}threads t ON t.displayorder>=0 AND t.tid=attach.tid WHERE attach.readperm='0' AND displayorder>='0' AND filetype='image/pjpeg' {$fids} GROUP BY attach.tid ORDER BY {$orderby} DESC LIMIT {$searchnums}");
while ($pic = $db->fetch_array($query)) {
    $data['pic'][$pic[aid]]['showpicpics'] = $attachurl . '/' . $pic['attachment'];
    $data['pic'][$pic[aid]]['showpiclinks'] = "viewthread.php?tid={$pic['tid']}";
    $data['pic'][$pic[aid]]['showpictexts'] = str_replace('\'', '&nbsp;', $pic['subject']);
}
$data['expiration'] = $cachelife + time();
$data['cacheshownums'] = $shownums;
$data['cachesearchnums'] = $searchnums;
$data['cachecachelife'] = $cachelife;
$data['cacheorderby'] = $orderby;
$data['cachecachename'] = $cachename;
$data['cachesearchfid'] = $searchfid;
require_once DISCUZ_ROOT . './include/cache.func.php';
writetocache($cachename, '', getcachevars($data));
include DISCUZ_ROOT . './forumdata/cache/cache_' . $cachename . '.php';
//}
shuffle($pic);
$i = 0;
$j = 0;
while ($j < $shownums && isset($pic[$i])) {
    if (is_readable($pic[$i]['showpicpics'])) {
        $showpicpics .= $comma . $pic[$i]['showpicpics'];
        $showpiclinks .= $comma . $pic[$i]['showpiclinks'];
        $showpictexts .= $comma . $pic[$i]['showpictexts'];
        $comma = '|';
        $j++;
    }
    $i++;
}
开发者ID:BGCX262,项目名称:zyyhong-svn-to-git,代码行数:31,代码来源:pic.php


示例11: build_cache_setting


//.........这里部分代码省略.........
    $data['sitemessage']['time'] = !empty($data['sitemessage']['time']) ? $data['sitemessage']['time'] * 1000 : 0;
    foreach (array('register', 'login', 'newthread', 'reply') as $type) {
        $data['sitemessage'][$type] = !empty($data['sitemessage'][$type]) ? explode("\n", $data['sitemessage'][$type]) : array();
    }
    $data['cachethreadon'] = DB::result_first("SELECT COUNT(*) FROM " . DB::table('forum_forum') . " WHERE status='1' AND threadcaches>0") ? 1 : 0;
    $data['disallowfloat'] = is_array($data['disallowfloat']) ? implode('|', $data['disallowfloat']) : '';
    if (!$data['imagelib']) {
        unset($data['imageimpath']);
    }
    if (is_array($data['relatedtag']['order'])) {
        asort($data['relatedtag']['order']);
        $relatedtag = array();
        foreach ($data['relatedtag']['order'] as $k => $v) {
            $relatedtag['status'][$k] = $data['relatedtag']['status'][$k];
            $relatedtag['name'][$k] = $data['relatedtag']['name'][$k];
            $relatedtag['limit'][$k] = $data['relatedtag']['limit'][$k];
            $relatedtag['template'][$k] = $data['relatedtag']['template'][$k];
        }
        $data['relatedtag'] = $relatedtag;
        foreach ((array) $data['relatedtag']['status'] as $appid => $status) {
            if (!$status) {
                unset($data['relatedtag']['limit'][$appid]);
            }
        }
        unset($data['relatedtag']['status'], $data['relatedtag']['order'], $relatedtag);
    }
    $data['domain']['defaultindex'] = isset($data['defaultindex']) && $data['defaultindex'] != '#' ? $data['defaultindex'] : '';
    $data['domain']['holddomain'] = isset($data['holddomain']) ? $data['holddomain'] : '';
    $data['domain']['list'] = array();
    $query = DB::query("SELECT * FROM " . DB::table('common_domain') . " WHERE idtype IN('subarea', 'forum', 'topic', 'channel')");
    while ($value = DB::fetch($query)) {
        $data['domain']['list'][$value['domain'] . '.' . $value['domainroot']] = array('id' => $value['id'], 'idtype' => $value['idtype']);
    }
    writetocache('domain', getcachevars(array('domain' => $data['domain'])));
    $data['seccodedata'] = is_array($data['seccodedata']) ? $data['seccodedata'] : array();
    if ($data['seccodedata']['type'] == 2) {
        if (extension_loaded('ming')) {
            unset($data['seccodedata']['background'], $data['seccodedata']['adulterate'], $data['seccodedata']['ttf'], $data['seccodedata']['angle'], $data['seccodedata']['color'], $data['seccodedata']['size'], $data['seccodedata']['animator']);
        } else {
            $data['seccodedata']['animator'] = 0;
        }
    } elseif ($data['seccodedata']['type'] == 99) {
        $data['seccodedata']['width'] = 32;
        $data['seccodedata']['height'] = 24;
    }
    $data['watermarktype'] = !empty($data['watermarktype']) ? unserialize($data['watermarktype']) : array();
    $data['watermarktext'] = !empty($data['watermarktext']) ? unserialize($data['watermarktext']) : array();
    foreach ($data['watermarktype'] as $k => $v) {
        if ($data['watermarktype'][$k] == 'text' && $data['watermarktext']['text'][$k]) {
            if ($data['watermarktext']['text'][$k] && strtoupper(CHARSET) != 'UTF-8') {
                $data['watermarktext']['text'][$k] = diconv($data['watermarktext']['text'][$k], CHARSET, 'UTF-8', true);
            }
            $data['watermarktext']['text'][$k] = bin2hex($data['watermarktext']['text'][$k]);
            if (file_exists('static/image/seccode/font/en/' . $data['watermarktext']['fontpath'][$k])) {
                $data['watermarktext']['fontpath'][$k] = 'static/image/seccode/font/en/' . $data['watermarktext']['fontpath'][$k];
            } elseif (file_exists('static/image/seccode/font/ch/' . $data['watermarktext']['fontpath'][$k])) {
                $data['watermarktext']['fontpath'][$k] = 'static/image/seccode/font/ch/' . $data['watermarktext']['fontpath'][$k];
            } else {
                $data['watermarktext']['fontpath'][$k] = 'static/image/seccode/font/' . $data['watermarktext']['fontpath'][$k];
            }
            $data['watermarktext']['color'][$k] = preg_replace('/#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})/e', "hexdec('\\1').','.hexdec('\\2').','.hexdec('\\3')", $data['watermarktext']['color'][$k]);
            $data['watermarktext']['shadowcolor'][$k] = preg_replace('/#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})/e', "hexdec('\\1').','.hexdec('\\2').','.hexdec('\\3')", $data['watermarktext']['shadowcolor'][$k]);
        } else {
            $data['watermarktext']['text'][$k] = '';
            $data['watermarktext']['fontpath'][$k] = '';
            $data['watermarktext']['color'][$k] = '';
开发者ID:pan289091315,项目名称:Discuz,代码行数:67,代码来源:cache_setting.php


示例12: diconv

            $value['zone_name'] = diconv($value['zone_name'], 'UTF-8', CHARSET);
            $value['Province'] = diconv($value['Province'], 'UTF-8', CHARSET);
            $value['area'] = diconv($value['area'], 'UTF-8', CHARSET);
            $zones[$value['s_EN']] = $value['zone_name'];
            $zonesort['provinces'][$value['Province']][$value['s_EN']] = $value['zone_name'];
            $zonesort['letter_raw'][$value['letter']][$value['s_EN']] = $value['zone_name'];
            $zonesort['area'][$value['area']][$value['s_EN']] = $value['zone_name'];
        }
        foreach (range('A', 'Z') as $letter) {
            if (!empty($zonesort['letter_raw'][$letter])) {
                $zonesort['letter'][$letter] = $zonesort['letter_raw'][$letter];
            }
        }
        require_once libfile('function/cache');
        writetocache('dzapp_haodai_city', getcachevars(array('zones' => $zones)));
        writetocache('dzapp_haodai_city_sort', getcachevars(array('zonesort' => $zonesort)));
    } else {
        showmessage('dzapp_haodai:callback_error_admin');
    }
} else {
    @(include_once DISCUZ_ROOT . './data/sysdata/cache_dzapp_haodai_city_sort.php');
}
if (!$_GET['city']) {
    include template('dzapp_haodai:city');
} else {
    if (!$_GET['city'] || $_GET['formhash'] != FORMHASH || !$zones[$_GET['city']]) {
        showmessage('dzapp_haodai:city_choose_wrong');
    }
    dsetcookie('HD_CITY', $_GET['city']);
    showmessage('dzapp_haodai:city_choose_ok', 'plugin.php?id=dzapp_haodai');
}
开发者ID:lemonstory,项目名称:bbs,代码行数:31,代码来源:city.inc.php


示例13: exit

<?php

/**
 *      [Discuz!] (C)2001-2099 Comsenz Inc.
 *      This is NOT a freeware, use is subject to license terms
 *
 *      $Id: check.php 32817 2013-03-13 11:29:12Z monkey $
 */
if (!defined('IN_DISCUZ')) {
    exit('Access Denied');
}
if (!defined('DISCUZ_VERSION')) {
    require './source/discuz_version.php';
}
global $_G;
$setting = array();
$settings = array('closeforumorderby');
foreach ($settings as $v) {
    $setting[$v] = $_G['setting'][$v];
}
if (in_array('mobile', $_G['setting']['plugins']['available'])) {
    $extendsetting = C::t('#mobile#mobile_setting')->fetch_all(array('extend_used', 'extend_lastupdate'));
    $array = array('discuzversion' => DISCUZ_VERSION, 'charset' => CHARSET, 'version' => MOBILE_PLUGIN_VERSION, 'pluginversion' => $_G['setting']['plugins']['version']['mobile'], 'regname' => $_G['setting']['regname'], 'qqconnect' => in_array('qqconnect', $_G['setting']['plugins']['available']) ? '1' : '0', 'sitename' => $_G['setting']['bbname'], 'mysiteid' => $_G['setting']['my_siteid'], 'ucenterurl' => $_G['setting']['ucenterurl'], 'setting' => $setting, 'extends' => array('used' => $extendsetting['extend_used'], 'lastupdate' => $extendsetting['extend_lastupdate']));
} else {
    $array = array();
}
require_once './source/plugin/mobile/mobile.class.php';
$data = array('mobilecheck' => mobile_core::json($array));
writetocache('mobile', getcachevars($data));
开发者ID:wait121000,项目名称:discuz3.0forsae,代码行数:29,代码来源:cache_mobile.php


示例14: updatespacesettings

function updatespacesettings()
{
    global $db, $tablepre, $initcredits;
    $initcreditarray = explode(',', $initcredits);
    $tmp = array();
    for ($i = 1; $i <= 8; $i++) {
        $tmp['extcredits' . $i] = $initcreditarray[$i];
    }
    $lowercredits = intval($initcredits);
    $groupinfo = $db->fetch_first("SELECT groupid, readaccess FROM {$tablepre}usergroups WHERE creditshigher<={$lowercredits} AND creditslower>{$lowercredits} ORDER BY creditshigher LIMIT 1");
    $fids = 0;
    $query = $db->query("SELECT ff.fid, ff.viewperm, ff.formulaperm FROM {$tablepre}forumfields ff,{$tablepre}forums f WHERE f.fid=ff.fid AND f.status>'0' AND ff.password=''");
    while ($forum = $db->fetch_array($query)) {
        if (empty($forum['viewperm']) || in_array($groupinfo['groupid'], explode("\t", $forum['viewperm']))) {
            $fids .= ',' . $forum['fid'];
        }
    }
    $spacesettings = array('parms' => array('infids' => $fids, 'groupid' => $groupinfo['groupid'], 'readaccess' => $groupinfo['readaccess']));
    writetocache('spacesettings', '', getcachevars($spacesettings));
}
开发者ID:BGCX262,项目名称:zyyhong-svn-to-git,代码行数:20,代码来源:cache.func.php


示例15: build_cache_setting


//.........这里部分代码省略.........
		$data['sitemessage'][$type] = !empty($data['sitemessage'][$type]) ? explode("\n", $data['sitemessage'][$type]) : array();
	}

	$data['cachethreadon'] = C::t('forum_forum')->fetch_threadcacheon_num() ? 1 : 0;
	$data['disallowfloat'] = is_array($data['disallowfloat']) ? implode('|', $data['disallowfloat']) : '';

	if(!$data['imagelib']) unset($data['imageimpath']);

	if(is_array($data['relatedtag']['order'])) {
		asort($data['relatedtag']['order']);
		$relatedtag = array();
		foreach($data['relatedtag']['order'] AS $k => $v) {
			$relatedtag['status'][$k] = $data['relatedtag']['status'][$k];
			$relatedtag['name'][$k] = $data['relatedtag']['name'][$k];
			$relatedtag['limit'][$k] = $data['relatedtag']['limit'][$k];
			$relatedtag['template'][$k] = $data['relatedtag']['template'][$k];
		}
		$data['relatedtag'] = $relatedtag;

		foreach((array)$data['relatedtag']['status'] AS $appid => $status) {
			if(!$status) {
				unset($data['relatedtag']['limit'][$appid]);
			}
		}
		unset($data['relatedtag']['status'], $data['relatedtag']['order'], $relatedtag);
	}

	$data['domain']['defaultindex'] = isset($data['defaultindex']) && $data['defaultindex'] != '#' ? $data['defaultindex'] : '';
	$data['domain']['holddomain'] = isset($data['holddomain']) ? $data['holddomain'] : '';
	$data['domain']['list'] = array();
	foreach(C::t('common_domain')->fetch_all_by_idtype(array('subarea', 'forum', 'topic', 'channel')) as $value) {
		$data['domain']['list'][$value['domain'].'.'.$value['domainroot']] = array('id' => $value['id'], 'idtype' => $value['idtype']);
	}
	writetocache('domain', getcachevars(array('domain' => $data['domain'])));

	$data['seccodedata'] = is_array($data['seccodedata']) ? $data['seccodedata'] : array();
	if($data['seccodedata']['type'] == 2) {
		if(extension_loaded('ming')) {
			unset($data['seccodedata']['background'], $data['seccodedata']['adulterate'],
			$data['seccodedata']['ttf'], $data['seccodedata']['angle'],
			$data['seccodedata']['color'], $data['seccodedata']['size'],
			$data['seccodedata']['animator']);
		} else {
			$data['seccodedata']['animator'] = 0;
		}
	} elseif($data['seccodedata']['type'] == 99) {
		$data['seccodedata']['width'] = 32;
		$data['seccodedata']['height'] = 24;
	}

	$data['watermarktype'] = !empty($data['watermarktype']) ? dunserialize($data['watermarktype']) : array();
	$data['watermarktext'] = !empty($data['watermarktext']) ? dunserialize($data['watermarktext']) : array();
	foreach($data['watermarktype'] as $k => $v) {
		if($data['watermarktype'][$k] == 'text' && $data['watermarktext']['text'][$k]) {
			if($data['watermarktext']['text'][$k] && strtoupper(CHARSET) != 'UTF-8') {
				$data['watermarktext']['text'][$k] = diconv($data['watermarktext']['text'][$k], CHARSET, 'UTF-8', true);
			}
			$data['watermarktext']['text'][$k] = bin2hex($data['watermarktext']['text'][$k]);
			if(file_exists('static/image/seccode/font/en/'.$data['watermarktext']['fontpath'][$k])) {
				$data['watermarktext']['fontpath'][$k] = 'static/image/seccode/font/en/'.$data['watermarktext']['fontpath'][$k];
			} elseif(file_exists('static/image/seccode/font/ch/'.$data['watermarktext']['fontpath'][$k])) {
				$data['watermarktext']['fontpath'][$k] = 'static/image/seccode/font/ch/'.$data['watermarktext']['fontpath'][$k];
			} else {
				$data['watermarktext']['fontpath'][$k] = 'static/image/seccode/font/'.$data['watermarktext']['fontpath'][$k];
			}
			$data['watermarktext']['color'][$k] = preg_replace('/#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})/e', "hexdec('\\1').','.hexdec('\\2').','.hexdec('\\3')", $data['watermarktext']['color'][$k]);
开发者ID:xDiglett,项目名称:discuzx30,代码行数:67,代码来源:cache_setting.php


示例16: refreshApplication

	function refreshApplication($appId, $appName, $version, $displayMethod, $narrow, $flag, $displayOrder) {
		$fields = array();
		if($appName !== null && strlen($appName)>1) {
			$fields['appname'] = $appName;
		}
		if($version !== null) {
			$fields['version'] = $version;
		}
		if($displayMethod !== null) {
			// todo: remove
			$fields['displaymethod'] = $displayMethod;
		}
		if($narrow !== null) {
			$fields['narrow'] = $narrow;
		}
		if($flag !== null) {
			$fields['flag'] = $flag;
		}
		if($displayOrder !== null) {
			$fields['displayorder'] = $displayOrder;
		}
		$sql = sprintf('SELECT * FROM %s WHERE appid=\'%d\'', $GLOBALS['tablepre'].'myapp', $appId);
		$query = $GLOBALS['db']->query($sql);
		if($application = $GLOBALS['db']->fetch_array($query)) {
			$where = sprintf('appid = %d', $appId);
			updatetable('myapp', $fields, $where);
		} else {
			$fields['appid'] = $appId;
			$result = inserttable('myapp', $fields, 1);
		}
		$myapps = array();
		$sql = sprintf('SELECT * FROM %s WHERE flag=\'1\' ORDER BY displayorder', $GLOBALS['tablepre'].'myapp');
		$query = $GLOBALS['db']->query($sql);
		while($application = $GLOBALS['db']->fetch_array($query)) {
			$myapps[$application['appid']] = $application;
		}
		require_once DISCUZ_ROOT.'./include/cache.func.php';
		writetocache('manyou', '', getcachevars(array('myapps' => $myapps)));
	}
开发者ID:BGCX262,项目名称:zyyhong-svn-to-git,代码行数:39,代码来源:MyBase.php


示例17: get_cachedata_setting_plugin


//.........这里部分代码省略.........
                        case 11:
                            $script = $plugin['directory'] . $module['name'];
                            @(include_once DISCUZ_ROOT . './source/plugin/' . $script . '.class.php');
                            $classes = get_declared_classes();
                            $classnames = array();
                            $cnlen = strlen('plugin_' . $plugin['identifier']);
                            foreach ($classes as $classname) {
                                if (substr($classname, 0, $cnlen) == 'plugin_' . $plugin['identifier']) {
                                    $hscript = substr($classname, $cnlen + 1);
                                    $classnames[$hscript ? $hscript : 'global'] = $classname;
                                }
                            }
                            foreach ($classnames as $hscript => $classname) {
                                $hookmethods = get_class_methods($classname);
                                foreach ($hookmethods as $funcname) {
                                    $v = explode('_', $funcname);
                                    $curscript = $v[0];
                                    if (!$curscript || $classname == $funcname) {
                                        continue;
                                    }
                                    if (!@in_array($script, $data['hookscript'][$hscript][$curscript]['module'])) {
                                        $data['hookscript'][$hscript][$curscript]['module'][$plugin['identifier']] = $script;
                                        $data['hookscript'][$hscript][$curscript]['adminid'][$plugin['identifier']] = $module['adminid'];
                                    }
                                    if (preg_match('/\\_output$/', $funcname)) {
                                        $varname = preg_replace('/\\_output$/', '', $funcname);
                                        $data['hookscript'][$hscript][$curscript]['outputfuncs'][$varname][] = array('displayorder' => $module['displayorder'], 'func' => array($plugin['identifier'], $funcname));
                                    } else {
                                        $data['hookscript'][$hscript][$curscript]['funcs'][$funcname][] = array('displayorder' => $module['displayorder'], 'func' => array($plugin['identifier'], $funcname));
                                    }
                                }
                            }
                            break;
                        case 12:
                            $script = $plugin['directory'] . $module['name'];
                            @(include_once DISCUZ_ROOT . './source/plugin/' . $script . '.class.php');
                            if (class_exists('threadplugin_' . $plugin['identifier'])) {
                                $classname = 'threadplugin_' . $plugin['identifier'];
                                $hookclass = new $classname();
                                if ($hookclass->name) {
                                    $data['threadplugins'][$plugin['identifier']]['name'] = $hookclass->name;
                                    $data['threadplugins'][$plugin['identifier']]['icon'] = $hookclass->iconfile;
                                    $data['threadplugins'][$plugin['identifier']]['module'] = $script;
                                }
                            }
                            break;
                    }
                }
            }
        }
        if ($addadminmenu) {
            $adminmenu[] = array('url' => "plugins&operation=config&do={$plugin['pluginid']}", 'action' => 'plugins_config_' . $plugin['pluginid'], 'name' => $plugin['name']);
        }
    }
    $_G['setting']['plugins']['available'] = $data['plugins']['available'];
    $file = DISCUZ_ROOT . './data/plugindata/lang_plugin.php';
    if ($fp = @fopen($file, 'wb')) {
        fwrite($fp, "<?php\n" . getcachevars(array('lang' => $scriptlang)) . '?>');
        fclose($fp);
    }
    writetocache('adminmenu', getcachevars(array('adminmenu' => $adminmenu)));
    $data['pluginhooks'] = array();
    foreach ($data['hookscript'] as $hscript => $hookscript) {
        foreach ($hookscript as $curscript => $scriptdata) {
            if (is_array($scriptdata['funcs'])) {
                foreach ($scriptdata['funcs'] as $funcname => $funcs) {
                    usort($funcs, 'pluginmodulecmp');
                    $tmp = array();
                    foreach ($funcs as $k => $v) {
                        $tmp[$k] = $v['func'];
                    }
                    $data['hookscript'][$hscript][$curscript]['funcs'][$funcname] = $tmp;
                }
            }
            if (is_array($scriptdata['outputfuncs'])) {
                foreach ($scriptdata['outputfuncs'] as $funcname => $funcs) {
                    usort($funcs, 'pluginmodulecmp');
                    $tmp = array();
                    foreach ($funcs as $k => $v) {
                        $tmp[$k] = $v['func'];
                    }
                    $data['hookscript'][$hscript][$curscript]['outputfuncs'][$funcname] = $tmp;
                }
            }
        }
    }
    foreach (array('links', 'spacecp', 'include', 'jsmenu', 'space', 'spacecp', 'spacecp_profile', 'spacecp_credit', 'faq', 'modcp_base', 'modcp_member', 'modcp_forum') as $pluginkey) {
        if (is_array($data['plugins'][$pluginkey])) {
            if (in_array($pluginkey, array('space', 'spacecp', 'spacecp_profile', 'spacecp_credit', 'faq', 'modcp_base', 'modcp_tools'))) {
                uasort($data['plugins'][$pluginkey], 'pluginmodulecmp');
            } else {
                usort($data['plugins'][$pluginkey], 'pluginmodulecmp');
            }
            foreach ($data['plugins'][$pluginkey] as $key => $module) {
                unset($data['plugins'][$pluginkey][$key]['displayorder']);
            }
        }
    }
    return array($data['plugins'], $data['pluginlinks'], $data['hookscript'], $data['threadplugins'], $data['specialicon']);
}
开发者ID:v998,项目名称:discuzx-en,代码行数:101,代码来源:cache_setting.php


示例18: array

    $adminextend = $adminextendnew = array();
    if (file_exists($adminextendfile = DISCUZ_ROOT . './data/sysdata/cache_adminextend.php')) {
        @(include $adminextendfile);
    }
    $menudirhandle = dir($menudir);
    while ($entry = $menudirhandle->read()) {
        if (!in_array($entry, array('.', '..')) && preg_match("/^menu\\_([\\w\\.]+)\$/", $entry, $entryr) && substr($entry, -4) == '.php' && strlen($entry) < 30 && is_file($menudir . '/' . $entry)) {
            @(include_once $menudir . '/' . $entry);
            $adminextendnew[] = $entryr[1];
        }
    }
    if ($adminextend != $adminextendnew) {
        @unlink($adminextendfile);
        if ($adminextendnew) {
            require_once libfile('function/cache');
            writetocache('adminextend', getcachevars(array('adminextend' => $adminextendnew)));
        }
        unset($_G['lang']['admincp']);
    }
}
if ($isfounder) {
    $menu['plugin'] = array(array('menu_addons', 'cloudaddons'), array('menu_plugins', 'plugins'));
}
loadcache('adminmenu');
if (is_array($_G['cache']['adminmenu'])) {
    foreach ($_G['cache']['adminmenu'] as $row) {
        $menu['plugin'][] = array($row['name'], $row['action']);
    }
}
if (!$menu['plugin']) {
    unset($topmenu['plugin']);
开发者ID:tianyunchong,项目名称:php,代码行数:31,代码来源:admincp_menu.php


示例19: getcachevars

该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP getcat函数代码示例发布时间:2022-05-15
下一篇:
PHP getcacheinfo函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap