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


PHP load_cache函数代码示例

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


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

示例1: init

 function init()
 {
     if ($this->crcuarr) {
         return;
     }
     load_cache('currencys,crprojects,grouptypes');
     global $db, $tblprefix, $curuser, $currencys, $crprojects, $grouptypes, $extract_mincount;
     $discount = array();
     #		$mincount = empty($extract_mincount) ? array() : array($extract_mincount);
     $mincount = array(isset($extract_mincount) ? $extract_mincount : 50);
     foreach ($grouptypes as $k => $v) {
         if (!$v['issystem'] && $curuser->info['grouptype' . $k]) {
             $usergroup = read_cache('usergroup', $k, $curuser->info['grouptype' . $k]);
             empty($usergroup[EX_DISCOUNT]) || ($discount[] = $usergroup[EX_DISCOUNT]);
             #				empty($usergroup[EX_MINCOUNT]) || $mincount[] = $usergroup[EX_MINCOUNT];
         }
     }
     #		$discount = array(90);$mincount = array(10);#test code
     (empty($discount) || empty($mincount)) && mcmessage('no_extract_permission');
     $this->crcuarr = array('ex' => array('cname' => lang('cashaccount'), 'unit' => lang('yuan'), 'count' => $curuser->info['currency0'], 'discount' => max($discount), 'mincount' => min($mincount)));
     foreach ($crprojects as $v) {
         $k = $curuser->info["currency{$v['scrid']}"];
         if ($v['ecrid'] == 0 && $k) {
             $this->crcuarr[$v['scrid']] = array('cname' => $currencys[$v['scrid']]['cname'], 'unit' => $currencys[$v['scrid']]['unit'], 'count' => $k, 'discount' => round($v['ecurrency'] / $v['scurrency'], 4) * 100);
         }
     }
 }
开发者ID:polarlight1989,项目名称:08cms,代码行数:27,代码来源:extract.cls.php

示例2: load_cache

<?php

include_once M_ROOT . "./include/arcedit.cls.php";
include_once M_ROOT . "./include/commu.fun.php";
load_cache('permissions,vcps,channels,cotypes,acatalogs');
!defined('M_COM') && exit('No Permission');
$aid = empty($aid) ? 0 : max(0, intval($aid));
//关于文档的个人分类
$uclasses = loaduclasses($curuser->info['mid']);
$ucidsarr = array();
foreach ($uclasses as $k => $v) {
    if (!$v['cuid']) {
        $ucidsarr[$k] = $v['title'];
    }
}
$aedit = new cls_arcedit();
$aedit->set_aid($aid);
$aedit->detail_data();
$chid = $aedit->archive['chid'];
tabheader(lang('basemessage'));
trbasic(lang('archivetitle'), '', $aedit->archive['subject'], '');
trbasic(lang('membercname'), '', $aedit->archive['mname'], '');
trbasic(lang('addtime'), '', date("Y-m-d H:i:s", $aedit->archive['createdate']), '');
trbasic(lang('updatetime'), '', date("Y-m-d H:i:s", $aedit->archive['updatedate']), '');
trbasic(lang('retime'), '', date("Y-m-d H:i:s", $aedit->archive['refreshdate']), '');
trbasic(lang('endtime'), '', $aedit->archive['enddate'] ? date("Y-m-d H:i:s", $aedit->archive['enddate']) : '-', '');
trbasic(lang('checkstate'), '', ($aedit->archive['checked'] ? lang('check') : lang('uncheck')) . '&nbsp;&nbsp;/&nbsp;&nbsp;' . ($aedit->archive['editor'] ? $aedit->archive['editor'] : '-'), '');
trbasic(lang('clickcomment'), '', $aedit->archive['clicks'] . '&nbsp;&nbsp;/&nbsp;&nbsp;' . $aedit->archive['comments'], '');
tabfooter();
tabheader(lang('othermessage'));
trbasic(lang('channel'), '', $aedit->archive['chid'] ? $channels[$aedit->archive['chid']]['cname'] : '-', '');
开发者ID:polarlight1989,项目名称:08cms,代码行数:31,代码来源:arcview.inc.php

示例3: unset

<?php

require_once 'includes/allobjects.php';
require_once 'includes/allitems.php';
require_once 'includes/allcomments.php';
require_once 'includes/allquests.php';
$smarty->config_load($conf_file, 'object');
// номер объекта;
$id = $podrazdel;
if (!($object = load_cache(3, intval($id)))) {
    unset($object);
    // БД
    global $DB;
    // Данные об объекте:
    $object = array();
    $object = objectinfo($id, 1);
    // Начиниают квесты...
    $rows_qs = $DB->select('
		SELECT o.?#
		FROM gameobject_questrelation q, quest_template o
		WHERE
			q.id = ?d
			AND o.entry = q.quest
		', $quest_cols[2], $id);
    if ($rows_qs) {
        $object['starts'] = array();
        foreach ($rows_qs as $numRow => $row) {
            $object['starts'][] = GetQuestInfo($row, 0xffffff);
        }
    }
    unset($rows_qs);
开发者ID:OregonCore,项目名称:AoWoW,代码行数:31,代码来源:object.php

示例4: exit

<?php

!defined('M_COM') && exit('No Permission');
load_cache('channels,acatalogs,currencys,commus,ucotypes,ofields,inmurls');
//分析页面设置
$nmuid = empty($nmuid) ? 0 : max(0, intval($nmuid));
$u_checked = $u_valid = -1;
if ($nmuid && ($u_url = read_cache('murl', $nmuid))) {
    $u_tplname = $u_url['tplname'];
    $u_onlyview = empty($u_url['onlyview']) ? 0 : 1;
    $u_mtitle = @$u_url['mtitle'];
    $u_guide = @$u_url['guide'];
    foreach (array('checked', 'valid') as $var) {
        ${'u_' . $var} = $u_url['setting'][$var];
    }
    $vars = array('caids', 'chids', 'cuids', 'filters', 'lists', 'operates', 'imuids');
    foreach ($vars as $var) {
        if (!empty($u_url['setting'][$var])) {
            ${'u_' . $var} = explode(',', $u_url['setting'][$var]);
        }
    }
}
empty($u_filters) && ($u_filters = array('check', 'catalog'));
empty($u_lists) && ($u_lists = array('catalog', 'uclass', 'channel', 'check'));
if (empty($u_tplname) || !empty($u_onlyview)) {
    include_once M_ROOT . "./include/cuedit.cls.php";
    $catalogs =& $acatalogs;
    //关于文档的个人分类
    $uclasses = loaduclasses($curuser->info['mid']);
    $ocuids = $ucidsarr = array();
    foreach ($commus as $k => $v) {
开发者ID:polarlight1989,项目名称:08cms,代码行数:31,代码来源:offers.inc.php

示例5: exit

<?php

!defined('M_COM') && exit('No Permission');
load_cache('channels,acatalogs,currencys');
include_once M_ROOT . "./include/arcedit.cls.php";
$catalogs =& $acatalogs;
$page = empty($page) ? 1 : max(1, intval($page));
$keyword = empty($keyword) ? '' : $keyword;
$filterstr = '';
foreach (array('keyword') as $k) {
    $filterstr .= "&{$k}=" . rawurlencode(${$k});
}
$wheresql = "WHERE cu.mid={$memberid} AND cu.oid>0";
$keyword && ($wheresql .= " AND a.subject LIKE '%" . str_replace(array(' ', '*'), '%', addcslashes($keyword, '%_')) . "%'");
echo form_str($action . 'arcsedit', "?action={$action}&page={$page}");
tabheader_e();
echo "<tr><td class=\"item2\">";
echo lang('keyword') . "&nbsp; <input class=\"text\" name=\"keyword\" type=\"text\" value=\"{$keyword}\" style=\"vertical-align: middle;\">&nbsp; ";
echo strbutton('bfilter', 'filter0') . '</td></tr>';
tabfooter();
$pagetmp = $page;
do {
    $query = $db->query("SELECT cu.*,cu.createdate AS ucreatedate,a.sid,a.createdate,a.caid,a.chid,a.customurl,a.subject AS asubject FROM {$tblprefix}purchases cu LEFT JOIN {$tblprefix}archives a ON (a.aid=cu.aid) {$wheresql} ORDER BY cu.cid DESC LIMIT " . ($pagetmp - 1) * $mrowpp . ",{$mrowpp}");
    $pagetmp--;
} while (!$db->num_rows($query) && $pagetmp);
$itemstr = '';
$i = $pagetmp * $mrowpp;
while ($item = $db->fetch_array($query)) {
    $i++;
    $item['arcurl'] = view_arcurl($item);
    $item['catalog'] = empty($catalogs[$item['caid']]) ? lang('nocata') : $catalogs[$item['caid']]['title'];
开发者ID:polarlight1989,项目名称:08cms,代码行数:31,代码来源:purchases.inc.php

示例6: JOIN

		}
		FROM ?_factiontemplate, creature_template c
		{ LEFT JOIN (locales_creature l) ON l.entry=c.entry AND ? }
		WHERE
			factiontemplateID=faction_A
			{AND type=?}
		ORDER BY minlevel DESC, name
		{LIMIT ?d}
		', $npc_cols[0], $_SESSION['locale'] > 0 ? $_SESSION['locale'] : DBSIMPLE_SKIP, $_SESSION['locale'] > 0 ? $_SESSION['locale'] : DBSIMPLE_SKIP, $_SESSION['locale'] > 0 ? 1 : DBSIMPLE_SKIP, $type != '' ? $type : DBSIMPLE_SKIP, $AoWoWconf['limit'] != 0 ? $AoWoWconf['limit'] : DBSIMPLE_SKIP);
    $npcs = array();
    foreach ($rows as $row) {
        $npcs[] = creatureinfo2($row);
    }
    save_cache(NPC_LISTING, $cache_key, $npcs);
}
if (!($npc_tot = load_cache(NPC_TOT, 'npc_tot'))) {
    unset($npc_tot);
    $npc_tot = $DB->select('
		SELECT COUNT(entry) as npc_tot
		FROM creature_template c
		');
    save_cache(NPC_TOT, 'npc_tot', $npc_tot);
}
global $page;
$page = array('Mapper' => false, 'Book' => false, 'Title' => $smarty->get_config_vars('NPCs'), 'tab' => 0, 'type' => 0, 'typeid' => 0, 'username' => $_SESSION['username'], 'path' => path(0, 4, $type));
$smarty->assign('page', $page);
$smarty->assign('npcs', $npcs);
$smarty->assign('npc_tot', is_array($npc_tot) ? $npc_tot[0]['npc_tot'] : $npc_tot);
// Количество MySQL запросов
$smarty->assign('mysql', $DB->getStatistics());
$smarty->assign('reputation', getreputation($page['username']));
开发者ID:BACKUPLIB,项目名称:Infinity_MaNGOS,代码行数:31,代码来源:npcs.php

示例7: load_cache

<?php

@set_time_limit(0);
load_cache('btags,channels,cotypes,fchannels,fcatalogs,commus,mcommus,currencys,permissions,votes,vcps,mchannels,dbsources,vcatalogs,acatalogs,freeinfos');
load_cache('catalogs,sptpls', $sid);
cache_merge($channels, 'channels', $sid);
cache_merge($btags, 'btags', $sid);
include_once M_ROOT . './include/refresh.fun.php';
include_once M_ROOT . "./include/cparse.fun.php";
include_once M_ROOT . "./include/parse/general.php";
include_once M_ROOT . "./include/parse/func.php";
function _aenter(&$v, $init = 0, $add = array())
{
    global $_actid, $_midarr, $grouptypes, $cotypes;
    if ($init) {
        $_actid = $_midarr = array();
    }
    $arr = array('aid', 'mid', 'sid', 'ucid', 'chid', 'mchid', 'mcaid', 'fcaid', 'vid', 'addid', 'fid', 'matid', 'rgid');
    foreach ($grouptypes as $x => $y) {
        $arr[] = 'grouptype' . $x;
    }
    if ($add) {
        $arr = array_merge($arr, $add);
    }
    foreach ($arr as $x) {
        if (isset($v[$x])) {
            $_midarr[$x] = $v[$x];
        }
    }
    $arr = array('caid');
    foreach ($cotypes as $x => $y) {
开发者ID:polarlight1989,项目名称:08cms,代码行数:31,代码来源:parse.fun.php

示例8: exit

<?php

(!defined('M_COM') || !defined('M_ADMIN')) && exit('No Permission');
load_cache('btagnames,channels,fchannels');
aheader();
$url_type = 'btags';
include 'urlsarr.inc.php';
url_nav(lang('originallogo'), $urlsarr, 'search');
$bclasses = array('common' => lang('common_message'), 'archive' => lang('archive_related'), 'cnode' => lang('catas_related'), 'freeinfo' => lang('freeinfo_related'), 'commu' => lang('commu_message'), 'member' => lang('member_related'), 'other' => lang('other'));
$datatypearr = array('text' => lang('text'), 'multitext' => lang('multitext'), 'htmltext' => lang('htmltext'), 'image' => lang('image_f'), 'images' => lang('images'), 'flash' => lang('flash'), 'flashs' => lang('flashs'), 'media' => lang('media'), 'medias' => lang('medias'), 'file' => lang('file_f'), 'files' => lang('files_f'), 'select' => lang('select'), 'mselect' => lang('mselect'), 'cacc' => lang('cacc'), 'date' => lang('date_f'), 'int' => lang('int'), 'float' => lang('float'), 'map' => lang('map'), 'vote' => lang('vote'));
tabheader(lang('search_initag'), 'btagsearch', '?entry=btagsearch');
trbasic(lang('tagid_inc_string'), 'bsearch[ename]', empty($bsearch['ename']) ? '' : $bsearch['ename']);
trbasic(lang('tagname_inc_string'), 'bsearch[cname]', empty($bsearch['cname']) ? '' : $bsearch['cname']);
trbasic(lang('tag_coclass'), 'bsearch[bclass]', makeoption(array('' => lang('nolimit')) + $bclasses, empty($bsearch['bclass']) ? '' : $bsearch['bclass']), 'select');
tabfooter('bbtagsearch', lang('search'));
if (submitcheck('bbtagsearch')) {
    $ename = trim(strtolower($bsearch['ename']));
    $cname = trim($bsearch['cname']);
    $bclass = trim($bsearch['bclass']);
    if (empty($ename) && empty($cname) && empty($bclass)) {
        amessage('inputsearchstring');
    }
    tabheader(lang('initag_search_result'), '', '', '8');
    trcategory(array(lang('sn'), lang('tagname'), array(lang('use_style') . '1', 'txtL'), array(lang('use_style') . '2', 'txtL'), array(lang('use_style') . '3', 'txtL'), lang('tagclass'), lang('detail_coclass'), lang('field_type')));
    $i = 1;
    foreach ($btagnames as $k => $v) {
        if ((!$ename || in_str($ename, $v['ename'])) && (!$cname || in_str($cname, $v['cname'])) && (!$bclass || $v['bclass'] == $bclass)) {
            $sclasses = array();
            if ($v['bclass'] == 'archive') {
                foreach ($channels as $chid => $channel) {
                    $sclasses[$chid] = $channel['cname'];
开发者ID:polarlight1989,项目名称:08cms,代码行数:31,代码来源:btagsearch.inc.php

示例9: exit

<?php

!defined('M_COM') && exit('No Permission');
include_once M_ROOT . "./include/arcedit.cls.php";
include_once M_ROOT . "./include/archive.fun.php";
include_once M_ROOT . "./include/upload.cls.php";
include_once M_ROOT . "./include/fields.cls.php";
load_cache('channels,catalogs,currencys,pfields,cotypes');
$oid = empty($oid) ? 0 : max(0, intval($oid));
$statearr = array('*' => lang('nolimit'), '0' => lang('wait_cpcheck'), '1' => lang('wait_pay'), '2' => lang('wait_send'), '3' => lang('goods_send'), '-1' => lang('order_ok'), '-2' => lang('order_cancel'));
$pmodearr = array('*' => lang('nolimit'), '0' => lang('noshiping'), '1' => lang('shipingfee1'), '2' => lang('shipingfee2'), '3' => lang('shipingfee3'));
if (empty($oid)) {
    $page = !empty($page) ? max(1, intval($page)) : 1;
    submitcheck('bfilter') && ($page = 1);
    $state = isset($state) && strlen($state) ? $state : '*';
    $pmode = isset($pmode) && strlen($pmode) ? $pmode : '*';
    $keyword = empty($keyword) ? '' : $keyword;
    $filterstr = '';
    foreach (array('state', 'pmode', 'keyword') as $k) {
        ${$k} && ($filterstr .= "&{$k}=" . rawurlencode(${$k}));
    }
    $wheresql = "mid={$memberid} AND delstate!=2";
    $state != '*' && ($wheresql .= " AND state='{$state}'");
    $pmode != '*' && ($wheresql .= " AND paymode='{$pmode}'");
    if ($keyword) {
        $keyword = str_replace(array(' ', '*'), '%', addcslashes($keyword, '%_'));
        $wheresql .= " AND (mname LIKE '%" . $keyword . "%' OR ordersn LIKE '%" . $keyword . "%')";
    }
    if (!submitcheck('barcsedit')) {
        echo form_str($action . 'arcsedit', "?action=orders");
        tabheader_e();
开发者ID:polarlight1989,项目名称:08cms,代码行数:31,代码来源:orders.inc.php

示例10: exit

<?php

(!defined('M_COM') || !defined('M_ADMIN')) && exit('No Permission');
aheader();
backallow('other') || amessage('no_apermission');
load_cache('channels');
load_cache('catalogs', $sid);
$forward = empty($forward) ? M_REFERER : $forward;
$forwardstr = '&forward=' . rawurlencode($forward);
$page = !empty($page) ? max(1, intval($page)) : 1;
submitcheck('bfilter') && ($page = 1);
$viewdetail = empty($viewdetail) ? '' : $viewdetail;
$isatm = empty($isatm) ? '0' : $isatm;
$caid = empty($caid) ? '0' : $caid;
$chid = empty($chid) ? '0' : $chid;
$mname = empty($mname) ? '' : $mname;
$subject = empty($subject) ? '' : $subject;
$indays = empty($indays) ? 0 : max(0, intval($indays));
$outdays = empty($outdays) ? 0 : max(0, intval($outdays));
$filterstr = '';
foreach (array('viewdetail', 'caid', 'chid', 'subject', 'mname', 'indays', 'outdays') as $k) {
    $filterstr .= "&{$k}=" . rawurlencode(${$k});
}
$wheresql = " WHERE a.sid={$sid} AND s.isatm='{$isatm}'";
if (!empty($caid)) {
    $caids = cnsonids($caid, $catalogs);
    $wheresql .= " AND a.caid " . multi_str($caids);
}
if (!empty($chid)) {
    $wheresql .= " AND a.chid='{$chid}'";
}
开发者ID:polarlight1989,项目名称:08cms,代码行数:31,代码来源:subscribes.inc.php

示例11: array

        $data[$i] = array();
        $data[$i]['entry'] = $row['entry'];
        if (isset($row['skill'])) {
            $data[$i]['skill'] = $row['skill'];
        }
        $data[$i]['name'] = preg_replace('/[\\r\\n]+/', " ", localizedName($row));
        // TODO: Расположение
        $data[$i]['location'] = "[-1]";
        // Тип объекта
        $data[$i]['type'] = isset($type) ? $type : $row['type'];
        $t_name = trim($data[$i]['name']);
        $i++;
    }
    save_cache(OBJECT_LISTING, $cache_key, $data);
}
if (!($object_tot = load_cache(OBJECT_TOT, 'object_tot'))) {
    unset($object_tot);
    // Получаем данные по этому типу объектов
    $object_tot = $DB->select('
			SELECT COUNT(g.entry) as num_objects
			FROM gameobject_template g
			WHERE 
				g.name <> ""
		');
    save_cache(OBJECT_TOT, 'object_tot', $object_tot[0]['num_objects']);
}
global $page;
$page = array('Mapper' => false, 'Book' => false, 'Title' => $smarty->get_config_vars('Objects'), 'tab' => 0, 'type' => 0, 'typeid' => 0, 'path' => path(0, 5, $type));
$smarty->assign('page', $page);
// Передаем массив данных шаблонизатору
$smarty->assign('data', $data);
开发者ID:saqar,项目名称:tc_aowow,代码行数:31,代码来源:objects.php

示例12: make_submitstr

 function make_submitstr($varname = '')
 {
     //需要当前值,单个图片可以处理,图集不要处理了,需要返回错误控件的焦点
     foreach (array('datatype', 'notnull', 'mlimit', 'regular', 'min', 'max') as $var) {
         ${$var} = $this->field[$var];
     }
     if (in_array($datatype, array('select', 'mselect'))) {
         return;
     }
     if (in_array($datatype, array('images', 'flashs', 'medias', 'files'))) {
         $extmode = substr($datatype, 0, strlen($datatype) - 1);
     } elseif (in_array($datatype, array('image', 'flash', 'media', 'file'))) {
         $extmode = $datatype;
     }
     $exts = '';
     if (!empty($extmode)) {
         global $localfiles;
         load_cache('localfiles');
         $exts = implode(',', array_keys($localfiles[$extmode]));
     }
     if (!$notnull && !$mlimit && !$regular && !$min && !$max && !$exts && $datatype != 'date') {
         return;
     }
     $regular = addslashes($regular);
     if (in_array($datatype, array('image', 'flash', 'media', 'file'))) {
         $this->submitstr = "rmsg = checksimple('{$varname}','{$notnull}','{$exts}');\n";
     } elseif (in_array($datatype, array('images', 'flashs', 'medias', 'files'))) {
         $this->submitstr = "rmsg = checkmultiple('{$varname}','{$notnull}','{$exts}','{$min}','{$max}');\n";
     } elseif ($datatype == 'htmltext') {
         $this->submitstr = "rmsg = checkhtmltext('{$varname}','{$notnull}','{$min}','{$max}');\n";
     } elseif ($datatype == 'multitext') {
         $this->submitstr = "rmsg = checkmultitext('{$varname}','{$notnull}','{$min}','{$max}');\n";
     } elseif ($datatype == 'text') {
         $this->submitstr = "rmsg = checktext('{$varname}','{$notnull}','{$mlimit}','{$regular}','{$min}','{$max}');\n";
     } elseif ($datatype == 'date') {
         $this->submitstr = "rmsg = checkdate('{$varname}','{$notnull}','{$min}','{$max}');\n";
     } elseif ($datatype == 'int') {
         $this->submitstr = "rmsg = checkint('{$varname}','{$notnull}','{$regular}','{$min}','{$max}');\n";
     } elseif ($datatype == 'float') {
         $this->submitstr = "rmsg = checkfloat('{$varname}','{$notnull}','{$regular}','{$min}','{$max}');\n";
     } elseif (in_array($datatype, array('cacc', 'map'))) {
         $this->submitstr = "rmsg = checktext('{$varname}','{$notnull}');\n";
     }
     $this->submitstr .= "if(rmsg){\n\tif(dom=\$id('alert_{$varname}'))dom.innerHTML = rmsg;\n\ti = false;\n}\n";
 }
开发者ID:polarlight1989,项目名称:08cms,代码行数:45,代码来源:fields.cls.php

示例13: unset

 * Released under the terms and conditions of the
 * GNU General Public License (http://gnu.org).
 *
 */
require_once 'includes/allspells.php';
require_once 'includes/allquests.php';
require_once 'includes/allnpcs.php';
require_once 'includes/allcomments.php';
// Настраиваем Smarty ;)
$smarty->config_load($conf_file, 'npc');
global $DB;
global $spell_cols;
global $npc_cols;
// Заголовок страницы
$id = $podrazdel;
if (!($npc = load_cache(1, intval($id)))) {
    unset($npc);
    // Ищем NPC:
    $npc = array();
    $row = $DB->selectRow('
		SELECT
			?#, c.entry, c.name,
			{
				l.name_loc' . $_SESSION['locale'] . ' as `name_loc`,
				l.subname_loc' . $_SESSION['locale'] . ' as `subname_loc`,
				?,
			}
			f.name_loc' . $_SESSION['locale'] . ' as `faction-name`, ft.factionID as `factionID`
		FROM ?_aowow_factiontemplate ft, ?_aowow_factions f, ?_creature_template c
		{
			LEFT JOIN (?_locales_creature l)
开发者ID:Refuge89,项目名称:World-of-Warcraft-Trinity-Core-MaNGOS,代码行数:31,代码来源:npc.php

示例14: exit

<?php

(!defined('M_COM') || !defined('M_ADMIN')) && exit('No Permission');
aheader();
backallow('cfmcommu') || amessage('no_apermission');
load_cache('grouptypes,currencys,rprojects,channels,permissions');
sys_cache('fieldwords');
load_cache('mtpls', $sid);
include_once M_ROOT . "./include/fields.fun.php";
$cclassarr = array('score' => lang('score'), 'friend' => lang('friend'), 'flink' => lang('flink'), 'comment' => lang('comment'), 'reply' => lang('reply'), 'report' => lang('pickbug'), 'favorite' => lang('favorite'));
$action = empty($action) ? 'mcommusedit' : $action;
$url_type = 'mcufield';
include 'urlsarr.inc.php';
if ($action == 'mcommusedit') {
    $mcommus = fetch_arr();
    if (!submitcheck('bmcommusedit')) {
        url_nav(lang('memberinterconfig'), $urlsarr, 'mcommu');
        tabheader(lang('memcomitad'), 'mcommusedit', "?entry=mcommus&action=mcommusedit", '7');
        trcategory(array(lang('delete'), lang('enable'), array(lang('item_name'), 'txtL'), lang('type'), array(lang('pick_url_style'), 'txtL'), lang('copy'), lang('edit')));
        foreach ($mcommus as $cuid => $mcommu) {
            $cclass = $cclassarr[$mcommu['cclass']];
            $pickurl = '{$mspaceurl}' . $mcommu['cclass'] . '.php?mid={mid}';
            if ($mcommu['cclass'] == 'score') {
                $pickurl .= '&score=xx (xx-' . lang('score_amount') . ')';
            }
            echo "<tr class=\"txt\">" . "<td class=\"txtC w30\"><input class=\"checkbox\" type=\"checkbox\" name=\"delete[{$cuid}]\" value=\"{$cuid}\"" . ($mcommu['issystem'] || $sid ? ' disabled' : '') . "></td>\n" . "<td class=\"txtC w30\"><input class=\"checkbox\" type=\"checkbox\" name=\"mcommusnew[{$cuid}][available]\" value=\"1\"" . (empty($mcommu['available']) ? '' : ' checked') . "></td>\n" . "<td class=\"txtL w200\"><input type=\"text\" size=\"30\" maxlength=\"30\" name=\"mcommusnew[{$cuid}][cname]\" value=\"{$mcommu['cname']}\"></td>\n" . "<td class=\"txtC w60\">{$cclass}</td>\n" . "<td class=\"txtL\">{$pickurl}</td>\n" . "<td class=\"txtC w30\">" . ($mcommu['ch'] ? "<a href=\"?entry=mcommus&action=mcommucopy&cuid={$cuid}\" onclick=\"return floatwin('open_mcommusedit',this)\">" . lang('copy') . "</a>" : '-') . "</td>\n" . "<td class=\"txtC w30\"><a href=\"?entry=mcommus&action=mcommudetail&cuid={$cuid}\" onclick=\"return floatwin('open_mcommusedit',this)\">" . lang('detail') . "</a></td></tr>\n";
        }
        tabfooter('bmcommusedit', lang('modify'));
        a_guide('mcommusedit');
    } else {
        if (!empty($delete)) {
开发者ID:polarlight1989,项目名称:08cms,代码行数:31,代码来源:mcommus.inc.php

示例15: exit

<?php

(!defined('M_COM') || !defined('M_ADMIN')) && exit('No Permission');
aheader();
backallow('lang') || amessage('no_apermission');
load_cache('cmsgs');
if (empty($action)) {
    $action = 'cmsgsedit';
}
$url_type = 'langs';
include 'urlsarr.inc.php';
url_nav(lang('lanpackmanage'), $urlsarr, 'cmsg');
if ($action == 'cmsgsedit') {
    $page = !empty($page) ? max(1, intval($page)) : 1;
    submitcheck('bfilter') && ($page = 1);
    $keyword = empty($keyword) ? '' : $keyword;
    $wheresql = '';
    $fromsql = "FROM {$tblprefix}cmsgs";
    $keyword && ($wheresql = "WHERE ename LIKE '%" . str_replace(array(' ', '*'), '%', addcslashes($keyword, '%_')) . "%' OR content LIKE '%" . str_replace(array(' ', '*'), '%', addcslashes($keyword, '%_')) . "%'");
    $filterstr = '';
    foreach (array('keyword') as $k) {
        $filterstr .= "&{$k}=" . rawurlencode(stripslashes(${$k}));
    }
    if (!submitcheck('bcmsgsedit')) {
        echo form_str($actionid . 'arcsedit', "?entry=cmsgs&action=cmsgsedit&page={$page}");
        tabheader_e();
        echo "<tr><td class=\"txt txtleft\">";
        echo lang('search_keyword') . "&nbsp; <input class=\"text\" name=\"keyword\" type=\"text\" value=\"{$keyword}\" size=\"10\">&nbsp; ";
        echo strbutton('bfilter', 'filter0');
        echo "</td></tr>";
        tabfooter();
开发者ID:polarlight1989,项目名称:08cms,代码行数:31,代码来源:cmsgs.inc.php


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