本文整理汇总了PHP中backallow函数的典型用法代码示例。如果您正苦于以下问题:PHP backallow函数的具体用法?PHP backallow怎么用?PHP backallow使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了backallow函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array_filter
$mnames = array_filter(explode(',', $crsaving['mname']));
$actuser = new cls_userinfo();
foreach ($mnames as $v) {
$v = trim($v);
if (empty($v)) {
continue;
}
$actuser->activeuserbyname($v);
$actuser->cridsaving($crsaving['crid'], $crsaving['savingmode'] ? 0 : 1, $crsaving['currency']);
}
unset($actuser);
adminlog(lang('member_cu_saving'), lang('member_cu_saving'));
amessage('currencyinoutfinish', '?entry=currencys&action=currencysaving');
}
} elseif ($action == 'cradminlogs') {
backallow('save') || amessage('no_apermission');
$url_type = 'cysave';
include 'urlsarr.inc.php';
url_nav(lang('member_inout'), $urlsarr, 'record');
$page = empty($page) ? 1 : $page;
$page = max(1, intval($page));
$viewdetail = empty($viewdetail) ? '' : $viewdetail;
$crid = !isset($crid) ? '-1' : $crid;
$dealmode = empty($dealmode) ? '' : $dealmode;
$mode = empty($mode) ? '' : $mode;
$mnames = empty($mnames) ? '' : $mnames;
$frommnames = empty($frommnames) ? '' : $frommnames;
$startdate = empty($startdate) ? '' : strtotime($startdate);
$enddate = empty($enddate) ? '' : strtotime($enddate);
$filterstr = "&viewdetail={$viewdetail}&crid={$crid}&dealmode={$dealmode}&mode={$mode}&mnames={$mnames}&frommnames={$frommnames}&startdate={$startdate}&enddate={$enddate}";
$currencyarr = array('-1' => lang('nolimit')) + cridsarr(1);
示例2: exit
<?php
(!defined('M_COM') || !defined('M_ADMIN')) && exit('No Permission');
aheader();
backallow('freeinfo') || amessage('no_apermission');
load_cache('fchannels,mtpls,initfields,rprojects');
sys_cache('fieldwords');
include_once M_ROOT . "./include/fields.fun.php";
$url_type = 'fchannel';
include 'urlsarr.inc.php';
if ($action == 'fchannelsedit') {
if (!submitcheck('bfchannelsedit') && !submitcheck('bfchanneladd')) {
url_nav(lang('pluginframework'), $urlsarr, 'channel');
tabheader(lang('channel_manager'), 'fchannelsedit', '?entry=fchannels&action=fchannelsedit', '4');
trcategory(array(lang('id'), lang('channel_name'), lang('edit'), lang('delete')));
foreach ($fchannels as $k => $fchannel) {
echo "<tr class=\"txt\">" . "<td class=\"txtC w30\">{$k}</td>\n" . "<td class=\"txtL\"><input type=\"text\" size=\"30\" maxlength=\"30\" name=\"fchannelnew[{$k}][cname]\" value=\"{$fchannel['cname']}\"></td>\n" . "<td class=\"txtC w40\"><a href=\"?entry=fchannels&action=fchanneldetail&chid={$fchannel['chid']}\" onclick=\"return floatwin('open_fchannelsedit',this)\">" . lang('detail') . "</a></td>\n" . "<td class=\"txtC w40\"><a href=\"?entry=fchannels&action=fchanneldel&chid={$fchannel['chid']}\">" . lang('delete') . "</a></td>\n" . "</tr>\n";
}
tabfooter('bfchannelsedit', lang('modify'));
tabheader(lang('add_channel'), 'fchanneladd', '?entry=fchannels&action=fchannelsedit', 2, 0, 1);
trbasic(lang('channel_name'), 'fchanneladd[cname]');
tabfooter('bfchanneladd', lang('add'));
$submitstr = '';
$submitstr .= makesubmitstr('fchanneladd[cname]', 1, 0, 3, 30);
check_submit_func($submitstr);
a_guide('fchannelsedit');
} elseif (submitcheck('bfchannelsedit')) {
if (isset($fchannelnew)) {
foreach ($fchannelnew as $k => $v) {
$v['cname'] = trim(strip_tags($v['cname']));
$v['cname'] = $v['cname'] ? $v['cname'] : $fchannels[$k]['cname'];
示例3: exit
<?php
(!defined('M_COM') || !defined('M_ADMIN')) && exit('No Permission');
aheader();
backallow('cnode') || amessage('no_apermission');
load_cache('cotypes');
load_cache('catalogs,mtpls,cnconfigs,', $sid);
include_once M_ROOT . "./include/cnode.fun.php";
include_once M_ROOT . "./include/cparse.fun.php";
include_once M_ROOT . "./include/parse/general.php";
$url_type = 'cnode';
include 'urlsarr.inc.php';
if ($action == 'cnconfigs') {
if (!submitcheck('bcnconfigs')) {
url_nav(lang('cnodeadmin'), $urlsarr, 'cnconfigs');
$addstr = " >><a href=\"?entry={$entry}&action=cnconfigsadd{$param_suffix}\" onclick=\"return floatwin('open_cnodes',this)\">" . lang('cnconfigsadd') . "</a>";
tabheader(lang('cnconfigadmin') . $addstr, 'cnodesupdate', "?entry={$entry}&action={$action}{$param_suffix}", 3);
trcategory(array("<input class=\"checkbox\" type=\"checkbox\" name=\"chkall\" onclick=\"checkall(this.form, 'selectid', 'chkall')\">", array(lang('config_name'), 'txtL'), array(lang('catas_configs'), 'txtL'), array(lang('mlclass'), 'txtL'), lang('order'), lang('copy'), lang('edit')));
$cnidsarr = array();
foreach ($cnconfigs as $k => $v) {
$configstr = '';
$i = 0;
$idsarr = cfgs2ids($v['configs'], $sid);
foreach ($v['configs'] as $k1 => $v1) {
$configstr .= ($configstr ? ' x ' : '') . (!$k1 ? lang('catalog') : @$cotypes[$k1]['cname']) . '(' . count($idsarr[$k1]) . ')';
!$i && ($type = lang(!$k1 ? 'catalog' : @$cotypes[$k1]['cname']));
!$i && ($mlclassstr = fetch_mlclass($k1, $v['configs'][$k1]));
$i++;
}
$cnidsarr[$k] = $v['cname'] . '(' . $type . ')';
echo "<tr class=\"txt\">" . "<td class=\"txtC w30\"><input class=\"checkbox\" type=\"checkbox\" name=\"selectid[]\" value=\"{$k}\"></td>\n" . "<td class=\"txtL\"><input type=\"text\" size=\"25\" maxlength=\"30\" name=\"cnconfigsnew[{$k}][cname]\" value=\"{$v['cname']}\"></td>\n" . "<td class=\"txtL\">{$configstr}</td>\n" . "<td class=\"txtL\">{$mlclassstr}</td>\n" . "<td class=\"txtC w40\"><input type=\"text\" size=\"4\" maxlength=\"4\" name=\"cnconfigsnew[{$k}][vieworder]\" value=\"{$v['vieworder']}\"></td>\n" . "<td class=\"txtC w30\"><a href=\"?entry={$entry}&action=cnconfigdetail&cncid={$k}{$param_suffix}&iscopy=1\" onclick=\"return floatwin('open_cnodes',this)\">" . lang('copy') . "</a></td>\n" . "<td class=\"txtC w30\"><a href=\"?entry={$entry}&action=cnconfigdetail&cncid={$k}{$param_suffix}\" onclick=\"return floatwin('open_cnodes',this)\">" . lang('detail') . "</a></td>\n" . "</tr>\n";
示例4: exit
<?php
(!defined('M_COM') || !defined('M_ADMIN')) && exit('No Permission');
aheader();
backallow('member') || amessage('no_apermission');
load_cache('mchannels,catalogs,acatalogs,cotypes,mtconfigs,channels,grouptypes,currencys,rprojects');
include_once M_ROOT . "./include/upload.cls.php";
include_once M_ROOT . "./include/fields.cls.php";
$backamember = backallow('amember');
$actuser = new cls_userinfo();
$actuser->activeuser($mid, 2);
empty($actuser->info['mid']) && amessage('choosemember');
!empty($actuser->info['isfounder']) && $curuser->info['mid'] != $actuser->info['mid'] && amessage('cannotmodifyfounder');
$mchid = $actuser->info['mchid'];
$mchannel = $mchannels[$mchid];
if ($action == 'memberdetail' && $mid) {
$mfields = read_cache('mfields', $mchid);
if (!submitcheck('bmemberdetail')) {
$a_field = new cls_field();
$submitstr = '';
tabheader(lang('base_option') . ' : [' . $mchannel['cname'] . ']' . $actuser->info['mname'], 'memberdetail', "?entry=member&action=memberdetail&mid={$mid}", 2, 1, 1);
trbasic(lang('modify_pwd'), 'minfosnew[password]', '', 'password');
trbasic('*' . lang('email'), 'minfosnew[email]', $actuser->info['email']);
$submitstr .= makesubmitstr('minfosnew[password]', 0, 0, 0, 15);
$submitstr .= makesubmitstr('minfosnew[email]', 1, 'email', 0, 50);
trbasic(lang('space_tpl_prj'), 'minfosnew[mtcid]', makeoption(mtcidsarr($mchid), $actuser->info['mtcid']), 'select');
foreach ($mfields as $k => $field) {
if ($field['available'] && !$field['issystem'] && !$field['isfunc']) {
$a_field->init();
$a_field->field = $field;
$a_field->oldvalue = isset($actuser->info[$k]) ? $actuser->info[$k] : '';
示例5: exit
<?php
(!defined('M_COM') || !defined('M_ADMIN')) && exit('No Permission');
aheader();
backallow('farchive') || amessage('no_apermission');
load_cache('fcatalogs,fchannels,currencys,');
include_once M_ROOT . "./include/farcedit.cls.php";
include_once M_ROOT . "./include/farchive.cls.php";
include_once M_ROOT . "./include/farc_static.fun.php";
if ($action == 'farchivesedit') {
//分析页面设置
$nauid = empty($nauid) ? 0 : $nauid;
$u_checked = $u_valid = -1;
if ($nauid && ($u_url = read_cache('aurl', $nauid))) {
$u_tplname = $u_url['tplname'];
$u_onlyview = empty($u_url['onlyview']) ? 0 : 1;
foreach (array('checked', 'valid', 'consult') as $var) {
${'u_' . $var} = $u_url['setting'][$var];
}
$vars = array('filters', 'lists', 'operates');
foreach ($vars as $var) {
if (!empty($u_url['setting'][$var])) {
${'u_' . $var} = explode(',', $u_url['setting'][$var]);
}
}
if ($u_consult) {
if (in_array(-1, $a_fcaids)) {
$a_fcaids = array();
foreach ($fcatalogs as $k => $v) {
if ($v['cumode']) {
$a_fcaids[] = $k;
示例6: 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)) {
示例7: exit
<?php
(!defined('M_COM') || !defined('M_ADMIN')) && exit('No Permission');
aheader();
backallow('extract') || amessage('no_apermission');
include_once M_ROOT . '/include/extract/extract.cls.php';
$ex = new extract_cash();
$ex->isadmin = 1;
$ex->showlist();
示例8: exit
<?php
(!defined('M_COM') || !defined('M_ADMIN')) && exit('No Permission');
aheader();
backallow('catalog') || amessage('no_apermission');
load_cache('cotypes,channels,grouptypes,permissions,vcps,rprojects,cafields');
sys_cache('fieldwords');
load_cache('catalogs,mtpls', $sid);
cache_merge($channels, 'channels', $sid);
include_once M_ROOT . "./include/upload.cls.php";
include_once M_ROOT . "./include/fields.fun.php";
include_once M_ROOT . "./include/fields.cls.php";
include_once M_ROOT . "./include/cnode.fun.php";
$catalog = read_cache('catalog', $caid, '', $sid);
if (!submitcheck('bcatalogdetail')) {
$submitstr = '';
$a_field = new cls_field();
#$addfieldstr = $sid ? '' : (" >><a href=\"?entry=catalogs&action=cafieldsedit\">".lang('iscustom_catalog_field').'</a>');
$allow = array_filter(explode(",", $allow));
tabheader('页面内容设置' . " [{$catalog['title']}]", 'catalogdetail', "", 2, 1, 1);
foreach ($cafields as $field) {
if (!in_array($field['ename'], $allow)) {
continue;
}
$a_field->init();
$a_field->field = $field;
$a_field->oldvalue = isset($catalog[$field['ename']]) ? $catalog[$field['ename']] : '';
$a_field->trfield('catalognew', '', 'ca');
$submitstr .= $a_field->submitstr;
}
tabfooter('bcatalogdetail');
示例9: exit
<?php
(!defined('M_COM') || !defined('M_ADMIN')) && exit('No Permission');
aheader();
backallow('grouptype') || amessage('no_apermission');
load_cache('grouptypes,currencys,mchannels');
if ($action == 'grouptypesedit') {
if (!submitcheck('bgrouptypesadd') && !submitcheck('bgrouptypesedit')) {
$modearr = array('0' => lang('user_handwork'), '1' => lang('admin_handwork'), '2' => lang('crbase'), '3' => lang('crex'));
$cridsarr = array(0 => lang('noset')) + cridsarr();
$itemstr = '';
foreach ($grouptypes as $k => $grouptype) {
$modestr = $modearr[$grouptype['mode']];
$cridstr = empty($grouptype['crid']) || empty($cridsarr[$grouptype['crid']]) ? '-' : $cridsarr[$grouptype['crid']];
if (empty($grouptype['crid']) && $grouptype['mode'] == 3) {
$cridstr = lang('cash');
}
$itemstr .= "<tr class=\"txt\"><td class=\"txtC w30\">{$k}</td>\n" . "<td class=\"txtC w30\"><input class=\"checkbox\" type=\"checkbox\" name=\"delete[{$k}]\" value=\"{$k}\"" . ($grouptype['issystem'] ? ' disabled' : '') . "></td>\n" . "<td class=\"txtC\"><input type=\"text\" size=\"25\" maxlength=\"30\" name=\"grouptypesnew[{$k}][cname]\" value=\"{$grouptype['cname']}\"></td>\n" . "<td class=\"txtC w60\">{$modestr}</td>\n" . "<td class=\"txtC w60\">{$cridstr}</td>\n" . "<td class=\"txtC w40\"><a href=\"?entry=grouptypes&action=grouptypedetail>id={$k}\" onclick=\"return floatwin('open_grouptypesedit',this)\">" . lang('setting') . "</a></td>\n" . "<td class=\"txtC w50\"><a href=\"?entry=usergroups&action=usergroupsedit>id={$k}\" onclick=\"return floatwin('open_grouptypesedit',this)\">" . lang('admin') . "</a></td></tr>\n";
}
tabheader(lang('edit_grouptype'), 'grouptypesedit', '?entry=grouptypes&action=grouptypesedit', '7');
trcategory(array(lang('id'), lang('delete'), lang('grouptype_name'), lang('deal_mode'), lang('related_currency'), lang('detail'), lang('usergroup')));
echo $itemstr;
tabfooter('bgrouptypesedit', lang('modify'));
tabheader(lang('add_grouptype'), 'grouptypesadd', '?entry=grouptypes&action=grouptypesedit');
trbasic(lang('grouptype_name'), 'grouptypeadd[cname]');
trbasic(lang('deal_mode'), 'grouptypeadd[mode]', makeoption($modearr), 'select');
trbasic(lang('related_cutype'), 'grouptypeadd[crid]', makeoption($cridsarr), 'select');
tabfooter('bgrouptypesadd', lang('add'));
a_guide('grouptypesedit');
} elseif (submitcheck('bgrouptypesadd')) {
if (empty($grouptypeadd['cname']) || $grouptypeadd['mode'] == 2 && empty($grouptypeadd['crid'])) {
示例10: exit
<?php
(!defined('M_COM') || !defined('M_ADMIN')) && exit('No Permission');
aheader();
backallow('static') || amessage('no_apermission');
load_cache('cotypes,channels,currencys,permissions');
load_cache('catalogs,mtpls,cnodes', $sid);
cache_merge($channels, 'channels', $sid);
include_once M_ROOT . "./include/parse.fun.php";
$url_type = 'static';
include 'urlsarr.inc.php';
if ($action == 'archives') {
$staticmode = empty($staticmode) ? 0 : max(0, intval($staticmode));
$numperpic = empty($numperpic) ? 20 : min(500, max(20, intval($numperpic)));
$caid = empty($caid) ? '0' : $caid;
$chid = empty($chid) ? '0' : $chid;
if (!isset($ptypestr)) {
$ptypes = empty($ptypes) ? array() : $ptypes;
$ptypestr = implode(',', $ptypes);
} else {
$ptypes = explode(',', $ptypestr);
}
$indays = empty($indays) ? 0 : max(0, intval($indays));
$outdays = empty($outdays) ? 0 : max(0, intval($outdays));
$fromsql = "FROM {$tblprefix}archives a";
$wheresql = "WHERE a.sid={$sid} AND a.checked='1'";
if (!empty($caid)) {
if ($cnsql = cnsql(0, cnsonids($caid, $catalogs), 'a.')) {
$wheresql .= " AND {$cnsql}";
}
}
示例11: exit
<?php
(!defined('M_COM') || !defined('M_ADMIN')) && exit('No Permission');
aheader();
backallow('sitemap') || amessage('no_apermission');
load_cache('catalogs,cotypes,channels');
if ($action == 'sitemapsedit') {
$sitemaps = fetch_arr();
if (!submitcheck('bsitemapsedit')) {
tabheader(lang('sitepageadmin'), 'sitemapsedit', "?entry=sitemaps&action=sitemapsedit", '8');
trcategory(array(lang('available'), lang('sitemapcname'), lang('dynamicurl'), lang('xmlurl'), lang('setting'), lang('create')));
foreach ($sitemaps as $ename => $sitemap) {
echo "<tr class=\"txt\">" . "<td class=\"txtC w30\"><input class=\"checkbox\" type=\"checkbox\" name=\"sitemapsnew[{$ename}][available]\" value=\"1\"" . (empty($sitemap['available']) ? '' : ' checked') . "></td>\n" . "<td class=\"txtL\">" . mhtmlspecialchars($sitemap['cname']) . "</td>\n" . "<td class=\"txtL\">" . ($cms_abs . $sitemap['d_url']) . "</td>\n" . "<td class=\"txtL\">" . ($cms_abs . $sitemap['xml_url']) . "</td>\n" . "<td class=\"txtC w30\"><a href=\"?entry=sitemaps&action=sitemapdetail&ename={$ename}\">" . lang('setting') . "</a></td>\n" . "<td class=\"txtC w30\"><a href=\"?entry=sitemaps&action=sitemapcreate&ename={$ename}\">" . lang('create') . "</a></td></tr>\n";
}
tabfooter('bsitemapsedit');
a_guide('sitemapsedit');
} else {
foreach ($sitemaps as $ename => $sitemap) {
$sitemap['available'] = empty($sitemapsnew[$ename]['available']) ? 0 : 1;
$db->query("UPDATE {$tblprefix}sitemaps SET available='{$sitemap['available']}' WHERE ename='{$ename}'");
}
updatecache('sitemaps');
amessage('sitmodfin', "?entry=sitemaps&action=sitemapsedit");
}
} elseif ($action == 'sitemapdetail' && $ename) {
$sitemap = fetch_one($ename);
empty($sitemap) && amessage('choosesite', '?entry=sitemaps&action=sitemapsedit');
if ($ename == 'baidu') {
$chids = array();
foreach ($channels as $chid => $channel) {
$channel['baidu'] && ($chids[$chid] = $channel['cname']);
示例12: exit
<?php
(!defined('M_COM') || !defined('M_ADMIN')) && exit('No Permission');
aheader();
backallow('domain') || amessage('no_apermission');
load_cache('domains');
if (empty($action)) {
$action = 'domainsedit';
}
if ($action == 'domainsedit') {
if (!submitcheck('bdomainsedit')) {
tabheader(lang('domain_admin') . " >><a href=\"?entry={$entry}&action=domainadd\" onclick=\"return floatwin('open_domains',this)\">" . lang('add_domain') . '</a>', $actionid . 'arcsedit', "?entry={$entry}&action={$action}");
trcategory(array("<input class=\"checkbox\" type=\"checkbox\" name=\"chkall\" onclick=\"checkall(this.form, 'delete', 'chkall')\">" . lang('del'), array(lang('folder'), 'txtL'), array(lang('domain'), 'txtL'), lang('isregular'), lang('order')));
$query = $db->query("SELECT * FROM {$tblprefix}domains ORDER BY vieworder,id");
while ($item = $db->fetch_array($query)) {
$id = $item['id'];
echo "<tr class=\"txt\">" . "<td class=\"txtC w40\"><input class=\"checkbox\" type=\"checkbox\" name=\"delete[{$id}]\" value=\"{$id}\"></td>\n" . "<td class=\"txtL\"><input type=\"text\" size=\"40\" name=\"domainsnew[{$id}][folder]\" value=\"{$item['folder']}\"></td>\n" . "<td class=\"txtL\"><input type=\"text\" size=\"40\" name=\"domainsnew[{$id}][domain]\" value=\"{$item['domain']}\"></td>\n" . "<td class=\"txtC w60\"><input class=\"checkbox\" type=\"checkbox\" name=\"domainsnew[{$id}][isreg]\" value=\"1\" " . (empty($item['isreg']) ? '' : 'checked') . "></td>\n" . "<td class=\"txtC w40\"><input type=\"text\" size=\"4\" name=\"domainsnew[{$id}][vieworder]\" value=\"{$item['vieworder']}\"></td>\n" . "</tr>\n";
}
tabfooter('bdomainsedit');
a_guide('domainsedit');
} else {
if (!empty($delete)) {
foreach ($delete as $k) {
$db->query("DELETE FROM {$tblprefix}domains WHERE id='{$k}'");
unset($domainsnew[$k]);
}
}
if (!empty($domainsnew)) {
foreach ($domainsnew as $k => $v) {
$v['folder'] = trim(strip_tags($v['folder']));
$v['domain'] = trim(strip_tags($v['domain']));
示例13: exit
<?php
(!defined('M_COM') || !defined('M_ADMIN')) && exit('No Permission');
aheader();
backallow('cotype') || amessage('no_apermission');
load_cache('cotypes');
if (!$coid || empty($cotypes[$coid])) {
amessage('choosecotypem');
}
load_cache('channels,grouptypes,permissions,vcps,rprojects,ccfields,acatalogs');
$catalogs =& $acatalogs;
include_once M_ROOT . "./include/upload.cls.php";
include_once M_ROOT . "./include/fields.fun.php";
include_once M_ROOT . "./include/fields.cls.php";
include_once M_ROOT . "./include/cnode.fun.php";
$cotype = $cotypes[$coid];
$coclasses = read_cache('coclasses', $coid);
$cotypename = $cotype['cname'];
if ($action == 'coclassadd') {
if (!submitcheck('bcoclassadd')) {
$pid = empty($pid) ? 0 : $pid;
if ($pid) {
$pmsg = read_cache('coclass', $coid, $pid);
}
$submitstr = '';
tabheader(lang('add') . " [{$cotypename}] " . lang('coclass') . "-" . lang('base_setting'), 'coclassadd', '?entry=coclass&action=coclassadd&coid=' . $coid, 2, 1, 1);
trbasic(lang('cocname'), 'coclassnew[title]');
$submitstr .= makesubmitstr('coclassnew[title]', 1, 0, 0, 30);
trbasic(lang('coclass_ename'), '', '<input type="text" value="" name="coclassnew[dirname]" id="coclassnew[dirname]" size="25"> <input type="button" value="' . lang('checksubject') . '" onclick="check_repeat(this,\'coclassnew[dirname]\',\'dirname\');">', '');
$submitstr .= makesubmitstr('coclassnew[dirname]', 1, 'tagtype', 0, 30);
trbasic(lang('parent_coclass'), 'coclassnew[pid]', makeoption(array('0' => lang('topiccoclass')) + ccidsarr($coid), $pid), 'select');
示例14: exit
<?php
(!defined('M_COM') || !defined('M_ADMIN')) && exit('No Permission');
aheader();
backallow('subsite') || amessage('no_apermission');
$url_type = 'subsite';
include 'urlsarr.inc.php';
if ($action == 'subsiteadd') {
if (!submitcheck('bsubsiteadd')) {
url_nav(lang('subsitemanager'), $urlsarr, 'add');
$submitstr = '';
tabheader(lang('addconsub'), 'subsiteadd', "?entry=subsites&action=subsiteadd", 2, 1, 1);
trbasic(lang('subsitecname'), 'subsitenew[sitename]', '', 'text');
trbasic(lang('subsstadir'), 'subsitenew[dirname]', '', 'text');
trbasic(lang('substempldir'), 'subsitenew[templatedir]', '', 'text', lang('agtemplatedir'));
$submitstr .= makesubmitstr('subsitenew[sitename]', 1, 0, 0, 80);
$submitstr .= makesubmitstr('subsitenew[dirname]', 1, 'tagtype', 0, 15);
$submitstr .= makesubmitstr('subsitenew[templatedir]', 1, 'tagtype', 0, 15);
tabfooter('bsubsiteadd');
check_submit_func($submitstr);
a_guide('subsiteadd');
} else {
$subsitenew['sitename'] = trim(strip_tags($subsitenew['sitename']));
$subsitenew['dirname'] = trim(strip_tags($subsitenew['dirname']));
$subsitenew['templatedir'] = trim(strip_tags($subsitenew['templatedir']));
if (!$subsitenew['sitename'] || !$subsitenew['dirname'] || !$subsitenew['templatedir']) {
amessage('subdatamiss', M_REFERER);
}
if (preg_match("/[^a-zA-Z_0-9]+/", $subsitenew['dirname'])) {
amessage('substadirill', M_REFERER);
}
示例15: exit
<?php
(!defined('M_COM') || !defined('M_ADMIN')) && exit('No Permission');
include_once M_ROOT . "./include/database.fun.php";
aheader();
backallow('database') || amessage('no_apermission');
$tabletype = $db->version() > '4.1' ? 'Engine' : 'Type';
if (!($backupdir = $db->result_one("SELECT value FROM {$tblprefix}mconfigs WHERE varname='backupdir'"))) {
$backupdir = random(6);
$db->query("REPLACE INTO {$tblprefix}mconfigs (varname, value) values ('backupdir','{$backupdir}')");
}
$backupdir = 'backup_' . $backupdir;
mmkdir(M_ROOT . './dynamic/' . $backupdir);
$url_type = 'data';
include 'urlsarr.inc.php';
if ($action == 'dbexport') {
if (!submitcheck('bdbexport')) {
url_nav(lang('dboperate'), $urlsarr, 'dbbackup');
$dbtables = array();
$query = $db->query("SHOW TABLES FROM `{$dbname}`");
while ($dbtable = $db->fetch_row($query)) {
//如果有外来表,会出现什么情况?
$dbtable[0] = preg_replace("/^" . $tblprefix . "(.*?)/s", "\\1", $dbtable[0]);
$dbtables[] = $dbtable[0];
}
$num = 3;
tabheader(lang('choose_table') . '<input class="checkbox" type="checkbox" name="chkall" onclick="checkall(this.form)">' . lang('selectall'), 'dbexport', '?entry=database&action=dbexport', 2 * $num);
$i = 0;
foreach ($dbtables as $dbtable) {
if (!($i % $num)) {
echo "<tr class=\"txt\">";