本文整理汇总了PHP中L::config方法的典型用法代码示例。如果您正苦于以下问题:PHP L::config方法的具体用法?PHP L::config怎么用?PHP L::config使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类L
的用法示例。
在下文中一共展示了L::config方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getDetailInfo
function getDetailInfo()
{
global $customfield, $winduid, $groupid;
$customfield = L::config('customfield', 'customfield');
!is_array($customfield) && ($customfield = array());
foreach ($customfield as $key => $value) {
if ($value['viewright'] && $winduid != $this->uid && strpos(",{$value['viewright']},", ",{$groupid},") === false) {
unset($customfield[$key]);
continue;
}
$customfield[$key]['id'] = $value['id'] = (int) $value['id'];
$customfield[$key]['field'] = "field_{$value['id']}";
}
$userService = L::loadClass('UserService', 'user');
/* @var $userService PW_UserService */
if ($detail = $userService->get($this->uid, true, true, true)) {
$days = max(1, ceil(($GLOBALS['timestamp'] - $detail['regdate']) / 86400));
$detail['lastpost'] < $GLOBALS['tdtime'] && ($detail['todaypost'] = 0);
$detail['averagepost'] = round($detail['postnum'] / $days, 2);
$detail['onlinetime_s'] = floor($detail['onlinetime'] / 3600);
$detail['regdate'] = get_date($detail['regdate'], 'Y-m-d');
$detail['lastvisit_s'] = get_date($detail['lastvisit'], 'Y-m-d');
$this->info = array_merge($this->info, $detail);
if ($GLOBALS['db_signwindcode'] && $this->info['signature'] && getstatus($this->info['userstatus'], PW_USERSTATUS_SIGNCHANGE)) {
require_once R_P . 'require/bbscode.php';
$this->info['signature'] = convert($this->info['signature'], $GLOBALS['db_windpic'], 2);
}
$this->info['signature'] = str_replace("\n", "<br/>", $this->info['signature']);
$this->info['introduce'] = str_replace("\n", "<br/>", $this->info['introduce']);
}
}
示例2: getData
function getData($invokename, $title, $loopid = 0)
{
$temp = $this->_getDataFromCache($invokename, $title, $loopid);
if ($temp === false) {
if (L::config('area_static_ifon', 'area_config') != 1) {
$this->index++;
}
$temp = $this->_getDataFromBBS($invokename, $title, $loopid);
}
return $temp;
}
示例3: getInstance
function getInstance($uid, $aid, $num)
{
$saveAttach = null;
L::loadClass('photo', 'colony', false);
$photoService = new PW_Photo($uid, 0, 1, 0);
$albumInfo = $photoService->getAlbumInfo($aid);
$photonums = $albumInfo['photonum'];
$GLOBALS += L::config(null, 'o_config');
if ($albumInfo && (!$GLOBALS['o_maxphotonum'] || $albumInfo['photonum'] + $num <= $GLOBALS['o_maxphotonum'])) {
L::loadClass('photoupload', 'upload', false);
$saveAttach = new saveAttach(new PhotoUpload($aid));
}
return $saveAttach;
}
示例4: checkEditAdmin
function checkEditAdmin($name, $cid)
{
if (isGM($name)) {
return true;
}
if (!$name) {
return false;
}
$area_editadmin = L::config('area_editadmin', 'area_config');
if (!$area_editadmin) {
return false;
}
$area_editadmin = explode(',', $area_editadmin[$cid]);
return in_array($name, $area_editadmin);
}
示例5: get_info
function get_info($uid, $num = 0)
{
require_once R_P . 'require/showimg.php';
$array = array();
list($array['faceurl']) = showfacedesign($this->spaceinfo['icon'], 1, 'm');
$ltitle = L::config('ltitle', 'level');
$array['systitle'] = $this->spaceinfo['groupid'] == '-1' ? '' : $ltitle[$this->spaceinfo['groupid']];
$array['memtitle'] = $ltitle[$this->spaceinfo['memberid']];
$array['thisvisit'] = $this->spaceinfo['thisvisit'];
$array['regdate'] = $this->spaceinfo['regdate'];
$array['lastvisit_s'] = get_date($this->spaceinfo['lastvisit'], 'Y-m-d');
$array['totalcredit'] = $this->_getUserTotalCredit();
$array = array_merge($array, $this->_getDetailInfo($uid));
return $array;
}
示例6: checkEditAdmin
function checkEditAdmin($name, $cid, $pushtype = '')
{
if (isGM($name)) {
return true;
}
if (!$name) {
return false;
}
if ($pushtype == 'show') {
$area_editadmin = L::config('show_editadmin', 'show_config');
} else {
$area_editadmin = L::config('area_editadmin', 'area_config');
}
if (!$area_editadmin) {
return false;
}
$area_editadmin = explode(',', $area_editadmin[$cid]);
return in_array($name, $area_editadmin);
}
示例7: _getClassidAdd
function _getClassidAdd($classID)
{
$classID = (int) $classID;
if (!$classID) {
return '';
}
$o_styledb = L::config('o_styledb', 'o_config');
if (!isset($o_styledb[$classID])) {
return '';
}
if ($o_styledb[$classID]['upid'] != '0') {
return ' AND c.styleid=' . S::sqlEscape($classID);
}
$array = array();
foreach ($o_styledb as $k => $v) {
if ($v['upid'] == $classID) {
$array[] = $k;
}
}
return $array ? ' AND c.styleid IN(' . S::sqlImplode($array) . ')' : ' AND c.styleid=' . S::sqlEscape($classID);
}
示例8: checkEditPurview
/**
* 检查用户是否有管理文章权限
* @param unknown_type $name
* @param unknown_type $cid
* @return string|string|string|boolean
*/
function checkEditPurview($name, $cid = '')
{
if (isGM($name)) {
return true;
}
if (!$name) {
return false;
}
$cms_editadmin = L::config('cms_editadmin', 'cms_config');
if (!S::isArray($cms_editadmin)) {
return false;
}
if (empty($cid)) {
$_keys = array_keys($cms_editadmin);
foreach ($_keys as $key) {
if (S::inArray($name, $cms_editadmin[$key])) {
return true;
}
}
return false;
}
return S::inArray($name, $cms_editadmin[$cid]);
}
示例9: _calculateCredit
/**
* 注意关联函数 apps/groups/lib/colony.class.php
* @param $info
*/
function _calculateCredit($info)
{
require_once R_P . 'require/functions.php';
$info['pnum'] -= $info['tnum'];
return CalculateCredit($info, L::config('o_groups_upgrade', 'o_config'));
}
示例10: setResult
/**
* @return unknown_type
*/
function setResult(&$result)
{
$dcache = L::config(null, $this->filename);
$result = $dcache['_result'];
}
示例11: Showmsg
!$_G['allowhonor'] && Showmsg('抱歉,你没有编辑个性签名的权限');
if (empty($_POST['step'])) {
require_once PrintEot('ajax');
ajax_footer();
} else {
PostCheck();
S::gp(array('content'), 'P');
$content = trim(str_replace("\n", '', $content));
strlen($content) > 90 && ($content = substrs($content, 90));
$wordsfb = L::loadClass('FilterUtil', 'filter');
$banword = $wordsfb->comprise(stripslashes($content));
if ($banword !== false) {
Showmsg('content_wordsfb');
}
if ($winddb['honor'] != stripslashes($content)) {
$userService = L::loadClass('UserService', 'user');
/* @var $userService PW_UserService */
$userService->update($winduid, array('honor' => $content));
//* $_cache = getDatastore();
//* $_cache->delete('UID_'.$winduid);
if (L::config('o_weibopost', 'o_config')) {
$weiboService = L::loadClass('weibo', 'sns');
if ($weiboService->sendCheck($content, $groupid)) {
$weiboService->send($winduid, $content, 'honor');
}
}
}
//require_once (R_P . 'require/postfunc.php');
echo "success\t" . stripslashes($content);
ajax_footer();
}
示例12: list
list($authStep, $remainTime, $waitTime, $mobile) = $authService->getStatus('register');
$authStep_1 = $authStep_2 = 'none';
${'authStep_' . $authStep} = '';
}
!$rg_config['rg_timestart'] && ($rg_config['rg_timestart'] = 1960);
!$rg_config['rg_timeend'] && ($rg_config['rg_timeend'] = 2000);
$img = @opendir(S::escapeDir("{$imgdir}/face"));
while ($imagearray = @readdir($img)) {
if ($imagearray != "." && $imagearray != ".." && $imagearray != "" && $imagearray != "none.gif") {
$imgselect .= "<option value='{$imagearray}'>{$imagearray}</option>";
}
}
@closedir($img);
//require_once(R_P.'require/header.php');
$custominfo = unserialize($db_union[7]);
$customfield = L::config('customfield', 'customfield');
if ($customfield) {
$customfieldService = L::loadClass('CustomerFieldService', 'user');
}
require_once PrintEot('register');
footer();
} elseif ($step == 2) {
PostCheck(0, $db_gdcheck & 1, $db_ckquestion & 1 && $db_question, 0);
if ($_GET['method'] || !($db_gdcheck & 1) && $_POST['gdcode'] || !($db_ckquestion & 1) && ($_POST['qanswer'] || $_POST['qkey'])) {
Showmsg('undefined_action');
}
S::gp(array('regreason', 'regname', 'regpwd', 'regpwdrepeat', 'regemail', 'customdata', 'regemailtoall', 'rgpermit', 'authmobile', 'authverify'), 'P');
S::gp(array('question', 'customquest', 'answer'), 'P');
if ($db_authstate && $db_authreg) {
$authService = L::loadClass('Authentication', 'user');
$status = $authService->checkverify($authmobile, ip2long($onlineip), $authverify);
示例13: intval
} else {
$uid = $uid ? intval($uid) : $winduid;
}
if ($uid) {
//* $_cache = getDatastore();
//* $_cache->delete(array("UID_$uid","UID_CREDIT_$uid","UID_GROUP_$uid"));
//* perf::gatherInfo('changeMembersWithUserIds', array('uid'=>$uid));
//* perf::gatherInfo('changeMemberCreditWithUserIds', array('uid'=>$uid));
//* perf::gatherInfo('changeCmemberAndColonyWithUserIds', array('uid'=>$uid));
}
require_once R_P . 'u/lib/space.class.php';
$newSpace = new PwSpace($uid);
if (!($space =& $newSpace->getInfo())) {
Showmsg('您访问的空间不存在!');
}
$inv_config = L::config(null, 'inv_config');
if (GetCookie('userads') && $inv_linkopen && $inv_linktype == '0') {
list($uid, $a) = explode("\t", GetCookie('userads'));
if (is_numeric($uid) || $a && strlen($a) < 16) {
require_once R_P . 'require/userads.php';
}
}
$newSpace->initSet();
$indexRight = $newSpace->viewRight('index');
$indexValue = $newSpace->getPrivacyByKey('index');
if ($indexRight) {
$data = $newSpace->layout();
//var_dump($data);
} else {
$data = array(0 => $newSpace->getSpaceData(array('info' => 1)));
}
示例14: htmread
function htmread($read, $start_limit)
{
global $imgpath, $db_ipfrom, $db_windpost, $db_windpic, $db_signwindcode, $db_shield;
$lpic = L::config('lpic', 'cache_read');
$ltitle = L::config('ltitle', 'cache_read');
$_MEDALDB = L::config('_MEDALDB', 'cache_read');
$read['lou'] = $start_limit;
$start_limit == $count - 1 && ($read['jupend'] = '<a name=lastatc></a>');
$read['ifsign'] < 2 && ($read['content'] = str_replace("\n", "<br>", $read['content']));
$read['groupid'] == '-1' && ($read['groupid'] = $read['memberid']);
$anonymous = $read['anonymous'] ? 1 : 0;
if ($read['groupid'] != '' && $anonymous == 0) {
!$lpic[$read['groupid']] && ($read['groupid'] = 8);
$read['lpic'] = $lpic[$read['groupid']];
$read['level'] = $ltitle[$read['groupid']];
$read['regdate'] = get_date($read['regdate'], "Y-m-d");
$read['lastlogin'] = get_date($read['lastvisit'], "Y-m-d");
$read['aurvrc'] = floor($read['rvrc'] / 10);
$read['author'] = $read['username'];
$read['ontime'] = (int) ($read['onlinetime'] / 3600);
$tpc_author = $read['author'];
$read['face'] = showfacedesign($read['micon']);
if ($db_ipfrom == 1) {
$read['ipfrom'] = ' From:' . $read['ipfrom'];
}
if (L::config('md_ifopen', 'cache_read') && $read['medals']) {
$medals = '';
$md_a = explode(',', $read['medals']);
foreach ($md_a as $key => $value) {
if ($value) {
$medals .= "<img src=\"hack/medal/image/{$_MEDALDB[$value][picurl]}\" title=\"{$_MEDALDB[$value][name]}\" alt=\"{$_MEDALDB[$value][name]}\"> ";
}
}
$read['medals'] = $medals . '<br />';
} else {
$read['medals'] = '';
}
if ($read['ifsign'] == 1 || $read['ifsign'] == 3) {
global $sign;
if (!$sign[$read['author']]) {
global $db_signmoney, $db_signgroup, $tdtime;
if (strpos($db_signgroup, ",{$read['groupid']},") !== false && $db_signmoney) {
$read['signature'] = '';
} else {
if ($db_signwindcode && getstatus($read['userstatus'], 9)) {
$read['signature'] = convert($read['signature'], $db_windpic, 2);
}
$read['signature'] = str_replace("\n", "<br>", $read['signature']);
}
$sign[$read['author']] = $read['signature'];
} else {
$read['signature'] = $sign[$read['author']];
}
} else {
$read['signature'] = '';
}
} else {
$read['face'] = "<br>";
$read['lpic'] = '8';
$read['level'] = $read['digests'] = $read['postnum'] = $read['money'] = $read['regdate'] = $read['lastlogin'] = $read['aurvrc'] = $read['credit'] = '*';
if ($anonymous) {
$read['signature'] = $read['honor'] = $read['medals'] = $read['ipfrom'] = '';
$read['author'] = $GLOBALS['db_anonymousname'];
$read['authorid'] = 0;
foreach (L::config('customfield', 'cache_read') as $key => $val) {
$field = "field_" . (int) $val['id'];
$read[$field] = '*';
}
}
}
$read['postdate'] = get_date($read['postdate']);
$read['mark'] = '';
if ($read['ifmark']) {
$markdb = explode("\t", $read['ifmark']);
foreach ($markdb as $key => $value) {
$read['mark'] .= "<li>{$value}</li>";
}
}
if ($read['icon']) {
$read['icon'] = "<img src=\"{$imgpath}/post/emotion/{$read['icon']}.gif\" align=left border=0>";
} else {
$read['icon'] = '';
}
/**
* 动态判断发帖是否需要转换
*/
$tpc_shield = 0;
if ($read['ifshield'] || $read['groupid'] == 6 && $db_shield) {
$read['subject'] = $read['icon'] = '';
$read['content'] = shield($read['ifshield'] ? $read['ifshield'] == 1 ? 'shield_article' : 'shield_del_article' : 'ban_article');
$tpc_shield = 1;
}
$creditnames = pwCreditNames();
if (!$tpc_shield) {
$attachs = $aids = array();
if ($read['aid'] && !$read['ifhide']) {
$attachs = $read['aid'];
$aids = attachment($read['content']);
}
$wordsfb = L::loadClass('FilterUtil');
//.........这里部分代码省略.........
示例15: getSaveDir
function getSaveDir($ext)
{
$o_attachdir = L::config('o_attachdir', 'o_config');
$savedir = 'diary/';
if ($o_attachdir) {
if ($o_attachdir == 1) {
$savedir .= "Type_{$ext}/";
} elseif ($o_attachdir == 2) {
$savedir .= 'Mon_' . date('ym') . '/';
} elseif ($o_attachdir == 3) {
$savedir .= 'Day_' . date('ymd') . '/';
}
}
return $savedir;
}