本文整理汇总了PHP中updatecache函数的典型用法代码示例。如果您正苦于以下问题:PHP updatecache函数的具体用法?PHP updatecache怎么用?PHP updatecache使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了updatecache函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: registerCloud
public function registerCloud($cloudApiIp = '')
{
try {
$returnData = $this->register();
} catch (Cloud_Service_Client_RestfulException $e) {
if ($e->getCode() == 1 && $cloudApiIp) {
$this->setCloudApiIp($cloudApiIp);
try {
$returnData = $this->register();
C::t('common_setting')->update('cloud_api_ip', $cloudApiIp);
} catch (Cloud_Service_Client_RestfulException $e) {
throw new Cloud_Service_Client_RestfulException($e);
}
} else {
throw new Cloud_Service_Client_RestfulException($e);
}
}
$sId = intval($returnData['sId']);
$sKey = trim($returnData['sKey']);
if ($sId && $sKey) {
C::t('common_setting')->update_batch(array('my_siteid' => $sId, 'my_sitekey' => $sKey, 'cloud_status' => '2'));
updatecache('setting');
} else {
throw new Cloud_Service_Client_RestfulException('Error Response.', 2);
}
return true;
}
开发者ID:dalinhuang,项目名称:healthshop,代码行数:27,代码来源:Cloud.php
示例2: onUserApplicationRemove
public function onUserApplicationRemove($uId, $appIds)
{
$result = C::t('home_userapp')->delete_by_uid_appid($uId, $appIds);
C::t('home_userappfield')->delete_by_uid_appid($uId, $appIds);
updatecreditbyaction('installapp', $uId, array(), $appId, -1);
require_once libfile('function/cache');
updatecache('userapp');
return $result;
}
开发者ID:dalinhuang,项目名称:healthshop,代码行数:9,代码来源:UserApplication.php
示例3: saveconfig
function saveconfig($cftype)
{
global $mconfigs, $mconfigsnew, $db, $tblprefix;
foreach ($mconfigsnew as $k => $v) {
if (!isset($mconfigs[$k]) || $mconfigs[$k] != $v) {
$db->query("REPLACE INTO {$tblprefix}mconfigs (varname,value,cftype) VALUES ('{$k}','{$v}','{$cftype}')");
}
}
updatecache('mconfigs');
}
开发者ID:polarlight1989,项目名称:08cms,代码行数:10,代码来源:backparams.inc.php
示例4: saveLoginConfigure
function saveLoginConfigure(array &$params)
{
$pstr = BIGAPPJSON::encode($params);
//$svalue = str_replace("\\u", "#u", $pstr);
$sql = "INSERT INTO " . DB::table('common_setting') . " values ('bigapp_longin_register_setting','{$pstr}') " . "ON DUPLICATE KEY UPDATE svalue=values(svalue)";
DB::query($sql);
require_once libfile('function/core');
require_once libfile('function/cache');
updatecache('setting');
}
开发者ID:Mushan3420,项目名称:BigApp-PHP7,代码行数:10,代码来源:appcfg.inc.php
示例5: _openCloud
protected function _openCloud()
{
require_once libfile('function/cache');
$result = C::t('common_setting')->update('cloud_status', 1);
try {
C::t('common_setting')->delete(array('connectsiteid', 'connectsitekey', 'my_siteid_old', 'my_sitekey_sign_old'));
} catch (Exception $e) {
}
updatecache('setting');
return true;
}
开发者ID:MCHacker,项目名称:discuz-docker,代码行数:11,代码来源:Cloud.php
示例6: generateUniqueId
public function generateUniqueId()
{
$siteuniqueid = C::t('common_setting')->fetch('siteuniqueid');
if (empty($siteuniqueid) || strlen($siteuniqueid) < 16) {
$chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyz';
$siteuniqueid = 'DX' . $chars[date('y') % 60] . $chars[date('n')] . $chars[date('j')] . $chars[date('G')] . $chars[date('i')] . $chars[date('s')] . substr(md5($_G['clientip'] . $_G['username'] . TIMESTAMP), 0, 4) . random(4);
C::t('common_setting')->update('siteuniqueid', $siteuniqueid);
require_once libfile('function/cache');
updatecache('setting');
}
}
开发者ID:lemonstory,项目名称:bbs,代码行数:11,代码来源:Util.php
示例7: cumonthadd_reset
function cumonthadd_reset()
{
global $cu_nowmonth, $db, $tblprefix;
if ($cu_nowmonth == date('n')) {
return;
}
@set_time_limit(1000);
@ignore_user_abort(TRUE);
include_once M_ROOT . "./include/cache.fun.php";
$db->query("UPDATE {$tblprefix}members SET cuaddmonth = '0'", 'SILENT');
$db->query("REPLACE INTO {$tblprefix}mconfigs (varname,value,cftype) VALUES ('cu_nowmonth','" . date('n') . "','basic')", 'SILENT');
updatecache('mconfigs');
}
开发者ID:polarlight1989,项目名称:08cms,代码行数:13,代码来源:userinfo.cls.php
示例8: delete_by_uid_orgid
public function delete_by_uid_orgid($uids, $orgid, $wxupdate = 1)
{
$uids = (array) $uids;
if ($return = DB::delete($this->_table, "uid IN (" . dimplode($uids) . ") and orgid='{$orgid}'")) {
include_once libfile('function/cache');
updatecache('organization');
if ($wxupdate) {
wx_updateUser($uids);
}
return $return;
} else {
return false;
}
}
开发者ID:druphliu,项目名称:dzzoffice,代码行数:14,代码来源:table_organization_user.php
示例9: option_optimizer
public function option_optimizer($options)
{
$update = array();
foreach ($options as $option) {
if (isset($this->setting[$option])) {
$update[$option] = $this->setting[$option]['optimizedvalue'];
}
}
if ($update) {
C::t('common_setting')->update_batch($update);
updatecache('setting');
}
return true;
}
开发者ID:MCHacker,项目名称:discuz-docker,代码行数:14,代码来源:optimizer_setting.php
示例10: cloudaddons_getuniqueid
function cloudaddons_getuniqueid() {
global $_G;
if (CLOUDADDONS_WEBSITE_URL == 'http://addon.discuz.com') {
return $_G['setting']['siteuniqueid'] ? $_G['setting']['siteuniqueid'] : C::t('common_setting')->fetch('siteuniqueid');
} else {
if (!$_G['setting']['addon_uniqueid']) {
$chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyz';
$addonuniqueid = $chars[date('y') % 60] . $chars[date('n')] . $chars[date('j')] . $chars[date('G')] . $chars[date('i')] . $chars[date('s')] . substr(md5($_G['clientip'] . TIMESTAMP), 0, 4) . random(6);
C::t('common_setting')->update('addon_uniqueid', $addonuniqueid);
require_once libfile('function/cache');
updatecache('setting');
}
return $_G['setting']['addon_uniqueid'];
}
}
开发者ID:rxfu,项目名称:dxbbs,代码行数:15,代码来源:function_cloudaddons.php
示例11: getPushStat
function getPushStat()
{
global $_G;
updatecache('setting');
if (isset($_G['setting']['bigapp_push_config'])) {
$_G['setting']['bigapp_push_config'] = unserialize($_G['setting']['bigapp_push_config']);
}
if (!isset($_G['setting']['bigapp_push_config']['push_enabled'])) {
$_G['setting']['bigapp_push_config']['push_enabled'] = 0;
}
if ($_G['setting']['bigapp_push_config']['push_enabled'] != 0) {
$_G['setting']['bigapp_push_config']['push_enabled'] = 1;
}
return $_G['setting']['bigapp_push_config']['push_enabled'];
}
开发者ID:Mushan3420,项目名称:BigApp-PHP7,代码行数:15,代码来源:plugcfg.php
示例12: onCommonSetConfig
public function onCommonSetConfig($data)
{
$settings = array();
if (is_array($data) && $data) {
foreach ($data as $key => $val) {
if (substr($key, 0, 3) != 'my_') {
continue;
}
$settings[$key] = $val;
}
if ($settings) {
C::t('common_setting')->update_batch($settings);
require_once DISCUZ_ROOT . './source/function/function_cache.php';
updatecache('setting');
return true;
}
}
return false;
}
开发者ID:softhui,项目名称:discuz,代码行数:19,代码来源:Common.php
示例13: readLocalAkSk2
public static function readLocalAkSk2()
{
global $_G;
require_once libfile('function/core');
require_once libfile('function/cache');
updatecache('setting');
//$bigapp_aksk = 'bigapp_aksk_' . md5($_G['siteurl']);
$bigapp_aksk = 'bigapp_aksk';
//!< 不要把siteurl带上,api接口和管理页接口的siteurl是不同的!!!
if (isset($_G['setting'][$bigapp_aksk]) && !is_array($_G['setting'][$bigapp_aksk])) {
$_G['setting'][$bigapp_aksk] = unserialize($_G['setting'][$bigapp_aksk]);
}
if (isset($_G['setting'][$bigapp_aksk]['app_key']) && isset($_G['setting'][$bigapp_aksk]['app_secret'])) {
runlog('bigapp', 'read local ak sk succ [ ak: ' . $_G['setting'][$bigapp_aksk]['app_key'] . ', sk: ' . $_G['setting'][$bigapp_aksk]['app_secret'] . ' ]');
return $_G['setting'][$bigapp_aksk];
}
runlog('bigapp', 'read local ak sk failed');
return false;
}
开发者ID:Mushan3420,项目名称:BigApp-PHP7,代码行数:19,代码来源:utils.inc.php
示例14: inittable
private function inittable()
{
if (!DB::fetch_first("SHOW TABLES LIKE '" . DB::table('common_remote_port') . "'")) {
$orig_tablepre = 'pre_';
$tablepre = getglobal('config/db/1/tablepre');
$dbcharset = getglobal('config/db/1/dbcharset');
$porttable = "CREATE TABLE pre_common_remote_port (id mediumint(8) unsigned NOT NULL default '0' COMMENT '',idtype char(15) NOT NULL default '' COMMENT '',useip char(15) NOT NULL default '' COMMENT '',port smallint(6) unsigned NOT NULL default '0' COMMENT '',PRIMARY KEY (id, idtype)) ENGINE=MyISAM COMMENT=''";
$porttable = str_replace("\r", "\n", str_replace(' ' . $orig_tablepre, ' ' . $tablepre, $porttable));
$porttable = str_replace("\r", "\n", str_replace(' `' . $orig_tablepre, ' `' . $tablepre, $porttable));
$type = strtoupper(preg_replace("/^\\s*CREATE TABLE\\s+.+\\s+\\(.+?\\).*(ENGINE|TYPE)\\s*=\\s*([a-z]+?).*\$/isU", "\\2", $porttable));
$type = in_array($type, array('MYISAM', 'HEAP', 'MEMORY')) ? $type : 'MYISAM';
$dbver = DB::$db->version();
$porttable = preg_replace("/^\\s*(CREATE TABLE\\s+.+\\s+\\(.+?\\)).*\$/isU", "\\1", $porttable) . ($dbver > '4.1' ? " ENGINE={$type} DEFAULT CHARSET=" . $dbcharset : " TYPE={$type}");
DB::query($porttable);
C::t('common_setting')->update('porttable', 1);
require_once libfile('function/cache');
updatecache('setting');
return true;
}
}
开发者ID:MCHacker,项目名称:discuz-docker,代码行数:20,代码来源:table_common_remote_port.php
示例15: onUnionAddAdvs
public function onUnionAddAdvs($advs)
{
$result = array();
if (is_array($advs)) {
foreach ($advs as $advid => $adv) {
$data = $this->_addAdv($adv);
if ($data === true) {
$result['succeed'][$advid] = $advid;
} else {
$result['failed'][$advid] = $data;
}
}
require_once libfile('function/cache');
updatecache('advs');
updatecache('setting');
} else {
$result['error'] = 'no adv';
}
return $result;
}
开发者ID:lemonstory,项目名称:bbs,代码行数:20,代码来源:Union.php
示例16: pay_vip
function pay_vip($in_uid, $day, $in_oldgroup)
{
global $_G;
$uid = $in_uid ? $in_uid : $_G['uid'];
$oldgroup = $in_oldgroup ? $in_oldgroup : $_G['groupid'];
$year_pay = $day >= 360 ? 1 : 0;
$time = $day * 86400;
if (!$this->is_vip($uid)) {
DB::insert('dsu_vip', array('uid' => $uid, 'exptime' => $_G['timestamp'] + $time, 'jointime' => $_G['timestamp'], 'year_pay' => $year_pay, 'level' => 1, 'oldgroup' => $oldgroup), false, true);
$this->query("UPDATE pre_common_member SET groupid='{$this->vars[vip_1_group]}' WHERE uid='{$uid}' AND adminid=0");
$this->vip_cache[] = $uid;
require_once libfile('function/cache');
updatecache('dsu_kkvip');
} else {
if ($year_pay) {
$this->query("UPDATE pre_dsu_vip SET exptime=exptime+'{$time}' , year_pay='1' WHERE uid='{$uid}'");
} else {
$this->query("UPDATE pre_dsu_vip SET exptime=exptime+'{$time}' WHERE uid='{$uid}'");
}
}
}
开发者ID:v998,项目名称:dsu,代码行数:21,代码来源:class_vip.php
示例17: onApplicationSetFlag
public function onApplicationSetFlag($applications, $flag)
{
$flag = $flag == 'disabled' ? -1 : ($flag == 'default' ? 1 : 0);
$appIds = array();
if ($applications && is_array($applications)) {
foreach ($applications as $application) {
$this->refreshApplication($application['appId'], $application['appName'], null, null, null, null, null, null, null, $flag, null, null);
$appIds[] = $application['appId'];
}
}
if ($flag == -1) {
C::t('home_feed')->delete_by_icon($appIds);
C::t('home_userapp')->delete_by_uid_appid(0, $appIds);
C::t('home_userappfield')->delete_by_uid_appid(0, $appIds);
C::t('common_myinvite')->delete_by_appid($appIds);
C::t('home_notification')->delete_by_type($appIds);
}
require_once libfile('function/cache');
updatecache('userapp');
$result = true;
return $result;
}
开发者ID:softhui,项目名称:discuz,代码行数:22,代码来源:Application.php
示例18: step_appOpenWithRegister
private function step_appOpenWithRegister()
{
global $_G;
$return = $this->appOpenWithRegister($this->appIdentifier, $_GET['extra']);
if ($return['errCode']) {
if ($return['errCode'] == '1000') {
$this->step_bindQQ();
} else {
$this->_msg($return['errMessage']);
}
}
if ($return['result']) {
if ($return['result']['sId'] && $return['result']['sKey']) {
C::t('common_setting')->update_batch(array('my_siteid' => $return['result']['sId'], 'my_sitekey' => $return['result']['sKey']));
updatecache('setting');
}
if ($return['result']['needBindQQ']) {
$this->step_bindQQ();
}
}
$this->step_over();
}
开发者ID:MCHacker,项目名称:discuz-docker,代码行数:22,代码来源:class_cloudregister.php
示例19: array
$sub_button = array('displayorder' => $_GET['newsub_button'][$k]['displayorder'][$sk], 'name' => $name, 'keyurl' => $_GET['newsub_button'][$k]['keyurl'][$sk]);
$setting['button'][$k]['sub_button'][] = $sub_button;
}
}
if (count($setting['button'][$k]['sub_button']) > 7) {
cpmsg(lang('plugin/wechat', 'wsq_menu_sub_button_max'), '', 'error');
}
usort($setting['button'][$k]['sub_button'], 'buttoncmp');
}
if (count($setting['button']) > 3) {
cpmsg(lang('plugin/wechat', 'wsq_menu_button_max'), '', 'error');
}
usort($setting['button'], 'buttoncmp');
$settings = array('wechatmenu' => serialize($setting));
C::t('common_setting')->update_batch($settings);
updatecache('setting');
if (submitcheck('pubsubmit')) {
if (!$setting['button']) {
cpmsg(lang('plugin/wechat', 'wsq_menu_button_pub_error'), '', 'error');
}
$pubmenu = array('button' => array());
foreach ($setting['button'] as $button) {
if (!$button['sub_button']) {
if (!$button['name']) {
cpmsg(lang('plugin/wechat', 'wsq_menu_name_empty'), '', 'error');
}
if (!$button['keyurl']) {
cpmsg(lang('plugin/wechat', 'wsq_menu_keyurl_empty'), '', 'error');
}
$parse = parse_url($button['keyurl']);
$item = array('type' => $parse['host'] ? 'view' : 'click', 'name' => convertname($button['name']), $parse['host'] ? 'url' : 'key' => $button['keyurl']);
开发者ID:lemonstory,项目名称:bbs,代码行数:31,代码来源:menu_setting.inc.php
示例20: setstatus
if (!empty($tid)) {
$thread = C::t('forum_thread')->fetch_by_tid_displayorder($tid, 0);
if ($thread['authorid'] == $_G['uid']) {
$thread['status'] = setstatus(6, $status, $thread['status']);
C::t('forum_thread')->update($tid, array('status' => $thread['status']), true);
showmessage('replynotice_success_' . $status);
}
}
showmessage('replynotice_error', 'forum.php?mod=viewthread&tid=' . $tid);
} elseif ($_GET['action'] == 'removeindexheats') {
if ($_G['adminid'] != 1) {
showmessage('no_privilege_indexheats');
}
C::t('forum_thread')->update($_G['tid'], array('heats' => 0));
require_once libfile('function/cache');
updatecache('heats');
dheader('Location: ' . dreferer());
} else {
if (empty($_G['forum']['allowview'])) {
if (!$_G['forum']['viewperm'] && !$_G['group']['readaccess']) {
showmessage('group_nopermission', NULL, array('grouptitle' => $_G['group']['grouptitle']), array('login' => 1));
} elseif ($_G['forum']['viewperm'] && !forumperm($_G['forum']['viewperm'])) {
showmessage('forum_nopermission', NULL, array($_G['group']['grouptitle']), array('login' => 1));
}
}
$thread = C::t('forum_thread')->fetch($_G['tid']);
if (!($thread['displayorder'] >= 0 || $thread['displayorder'] == -4 && $thread['authorid'] == $_G['uid'])) {
$thread = array();
}
if ($thread['readperm'] && $thread['readperm'] > $_G['group']['readaccess'] && !$_G['forum']['ismoderator'] && $thread['authorid'] != $_G['uid']) {
showmessage('thread_nopermission', NULL, array('readperm' => $thread['readperm']), array('login' => 1));
开发者ID:Jaedeok-seol,项目名称:discuz_template,代码行数:31,代码来源:forum_misc.php
注:本文中的updatecache函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论