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


PHP amessage函数代码示例

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


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

示例1: back_follow

function back_follow($bkname = '', $params = array())
{
    global $bkfollows;
    if (!$bkname) {
        return;
    }
    sys_cache('bkfollows');
    if (($arr = @$bkfollows[$bkname]) && ($url = $arr['url'])) {
        $str = '';
        foreach ($params as $k => $v) {
            $str .= '&' . $k . '=' . rawurlencode($v);
        }
        $str && ($url .= (in_str('?', $url) ? '&' : '?') . substr($str, 1));
        amessage(empty($arr['msg']) ? lang('msgfollow') : $arr['msg'], $url);
    }
    return;
}
开发者ID:polarlight1989,项目名称:08cms,代码行数:17,代码来源:admin.fun.php

示例2: preg_match

            $playernew['exts'] = preg_match("/[^a-z,A-Z0-9]+/", $playernew['exts']) ? $players[$plid]['exts'] : strtolower($playernew['exts']);
            $playernew['available'] = empty($playernew['available']) ? 0 : $playernew['available'];
            $db->query("UPDATE {$tblprefix}players SET \n\t\t\t\t\t\tcname='{$playernew['cname']}',\n\t\t\t\t\t\texts='{$playernew['exts']}',\n\t\t\t\t\t\tavailable='{$playernew['available']}',\n\t\t\t\t\t\tvieworder='{$playernew['vieworder']}' \n\t\t\t\t\t\tWHERE plid='{$plid}'");
        }
        updatecache('players');
        adminlog(lang('edimed'), lang('edimedplalis'));
        amessage('playedifin', '?entry=players&action=playersedit');
    }
} elseif ($action == 'playerdetail' && !empty($plid)) {
    empty($players[$plid]) && amessage('choosepla', '?entry=players&action=playersedit');
    $player = read_cache('player', $plid);
    if (!submitcheck('bplayerdetail')) {
        tabheader(lang('playerset'), 'playerdetail', '?entry=players&action=playerdetail&plid=' . $plid);
        trbasic(lang('playercname'), 'playernew[cname]', $player['cname'], 'text');
        trbasic(lang('playertype'), '', $ptypearr[$player['ptype']], '');
        trbasic(lang('defplayfileformat'), 'playernew[exts]', $player['exts'], 'text');
        echo "<tr class=\"txt\"><td class=\"txtL\">" . lang('playertemplate') . "</td><td class=\"txtL\"><textarea rows=\"25\" name=\"playernew[template]\" id=\"playernew[template]\" cols=\"100\">" . mhtmlspecialchars(str_replace("\t", "    ", $player['template'])) . "</textarea></td></tr>";
        tabfooter('bplayerdetail');
        a_guide('playerdetail');
    } else {
        if (!$playernew['template']) {
            amessage('inpplatem', '?entry=players&action=playerdetail&plid=' . $plid);
        }
        $playernew['cname'] = empty($playernew['cname']) ? $players[$plid]['cname'] : $playernew['cname'];
        $playernew['exts'] = preg_match("/[^a-z,A-Z0-9]+/", $playernew['exts']) ? $players[$plid]['exts'] : strtolower($playernew['exts']);
        $db->query("UPDATE {$tblprefix}players SET \n\t\t\t\t\tcname='{$playernew['cname']}',\n\t\t\t\t\texts='{$playernew['exts']}',\n\t\t\t\t\ttemplate='{$playernew['template']}' \n\t\t\t\t\tWHERE plid='{$plid}'");
        updatecache('players');
        adminlog(lang('detmodmedpla'), lang('detmodmedpla'));
        amessage('playmodfin', '?entry=players&action=playersedit');
    }
}
开发者ID:polarlight1989,项目名称:08cms,代码行数:31,代码来源:players.inc.php

示例3: amessage

            amessage('enameillegal', '?entry=alangs&action=alangsedit');
        }
        $alangnew['ename'] = strtolower(trim(strip_tags($alangnew['ename'])));
        if (in_array($alangnew['ename'], array_keys($alangs))) {
            amessage('enamerepeat', '?entry=alangs&action=alangsedit');
        }
        $alangnew['content'] = trim($alangnew['content']);
        $db->query("INSERT INTO {$tblprefix}alangs SET \n\t\t\t\t\tename='{$alangnew['ename']}', \n\t\t\t\t\tcontent='{$alangnew['content']}',\n\t\t\t\t\tcreatedate='{$timestamp}'\n\t\t\t\t\t");
        adminlog(lang('add_alang'));
        updatecache('alangs');
        amessage('alangaddfin', "?entry=alangs&action=alangsedit");
    }
} elseif ($action == 'alangdetail' && $ename) {
    if (!($alang = $db->fetch_one("SELECT * FROM {$tblprefix}alangs WHERE ename='{$ename}'"))) {
        amessage('chooseclang');
    }
    if (!submitcheck('balangdetail')) {
        tabheader(lang('edit_alang'), 'alangdetail', "?entry=alangs&action=alangdetail&ename={$ename}");
        trbasic(lang('alang_ename'), '', $alang['ename'], '');
        trbasic(lang('alang_content'), 'alangnew[content]', $alang['content'], 'textarea');
        tabfooter('balangdetail');
        a_guide('alangdetail');
    } else {
        $alangnew['content'] = trim($alangnew['content']);
        $sql = $alangnew['content'] != $alang['content'] ? ",createdate='{$timestamp}'" : '';
        $db->query("UPDATE {$tblprefix}alangs SET \n\t\t\t\t\tcontent='{$alangnew['content']}'\n\t\t\t\t\t{$sql}\n\t\t\t\t\tWHERE ename='{$ename}'");
        adminlog(lang('edit_alang_detail'));
        updatecache('alangs');
        amessage('alangmodfin', "?entry=alangs&action=alangsedit");
    }
}
开发者ID:polarlight1989,项目名称:08cms,代码行数:31,代码来源:alangs.inc.php

示例4: exit

<?php

(!defined('M_COM') || !defined('M_ADMIN')) && exit('No Permission');
if (!submitcheck('bmtagadd') && !submitcheck('bmtagsdetail') && !submitcheck('bmtagcode')) {
    templatebox(lang('tagtemplate'), 'mtagnew[template]', empty($mtag['template']) ? '' : $mtag['template'], 10, 110);
    trbasic(lang('usource'), 'mtagnew[setting][tname]', isset($mtag['setting']['tname']) ? $mtag['setting']['tname'] : '', 'text', lang('agusource1'));
    trbasic(lang('arr_pre'), 'mtagnew[setting][val]', empty($mtag['setting']['val']) ? 'u' : $mtag['setting']['val'], 'text', lang('agarr_pre'));
    tabfooter();
} else {
    if (empty($mtagnew['template'])) {
        if (!submitcheck('bmtagcode')) {
            amessage('input_tag_tpl', M_REFERER);
        } else {
            $errormsg = lang('input_tag_tpl');
        }
        //生成代码出错的提示信息
    }
    $mtagnew['setting']['tname'] = trim($mtagnew['setting']['tname']);
    if (!empty($mtagnew['setting']['tname']) && !preg_match("/^[a-zA-Z_\$][a-zA-Z0-9_\\[\\]]*\$/", $mtagnew['setting']['tname'])) {
        if (!submitcheck('bmtagcode')) {
            amessage('sourceillegal', M_REFERER);
        } else {
            $errormsg = lang('sourceillegal');
        }
        //生成代码出错的提示信息
    }
}
开发者ID:polarlight1989,项目名称:08cms,代码行数:27,代码来源:file.php

示例5: url_nav

$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'];
                }
            } elseif ($v['bclass'] == 'cnode') {
                $sclasses = array('catalog' => lang('catalog'), 'coclass' => lang('coclass'));
            } elseif ($v['bclass'] == 'freeinfo') {
                foreach ($fchannels as $chid => $channel) {
开发者ID:polarlight1989,项目名称:08cms,代码行数:31,代码来源:btagsearch.inc.php

示例6: tabheader

        tabheader(lang('pmclearfilter'), 'clearpms', '?entry=pms&action=clearpms');
        trbasic(lang('pmfromids'), 'pmnew[fromids]');
        trbasic(lang('mnamestxt'), 'pmnew[fromnames]');
        trbasic(lang('onlyclearreadpm'), 'pmnew[viewed]', '0', 'radio');
        trbasic(lang('indays'), 'pmnew[days]');
        tabfooter('bclearpms');
        a_guide('pmsclear');
    } else {
        $wheresql = '';
        if (!empty($pmnew['fromids'])) {
            $fromids = array_filter(explode(',', $pmnew['fromids']));
            $fromids = mimplode($fromids);
            $wheresql = empty($fromids) ? "" : "fromid IN ({$fromids})";
        }
        if (!empty($pmnew['fromnames'])) {
            $fromnames = array_filter(explode(',', $pmnew['fromnames']));
            $fromnames = mimplode($fromnames);
            $wheresql .= empty($fromnames) ? "" : (empty($wheresql) ? "" : " OR ") . "fromuser IN ({$fromnames})";
        }
        !empty($wheresql) && ($wheresql = "(" . $wheresql . ")");
        if (!empty($pmnew['viewed'])) {
            $wheresql .= (empty($wheresql) ? "" : " AND ") . "viewed='1'";
        }
        if (!empty($pmnew['days'])) {
            $wheresql .= (empty($wheresql) ? "" : " AND ") . "pmdate<" . ($timestamp - 86400 * $pmnew['days']);
        }
        $wheresql = empty($wheresql) ? "" : "WHERE {$wheresql}";
        $db->query("DELETE FROM {$tblprefix}pms {$wheresql}", 'UNBUFFERED');
        amessage('pmclearfin', '?entry=pms&action=clearpms');
    }
}
开发者ID:polarlight1989,项目名称:08cms,代码行数:31,代码来源:pms.inc.php

示例7: fetch_one

    $splang = fetch_one($slid);
    if (!submitcheck('bsplangdetail')) {
        tabheader(lang('splangset'), 'splangsdetail', '?entry=splangs&action=splangdetail&slid=' . $slid . '&forward=' . urlencode($forward));
        trbasic(lang('splangcname'), '', $splang['cname'], '');
        trbasic(lang('splangtype'), '', $types[$splang['type']], '');
        trbasic(lang('splangcontent'), 'splangnew[content]', $splang['content'], 'btextarea');
        tabfooter('bsplangdetail');
        a_guide('splangdetail');
    } else {
        if (empty($splangnew['content'])) {
            amessage('datamissing', M_REFERER);
        }
        $db->query("UPDATE {$tblprefix}splangs SET content='{$splangnew['content']}' WHERE slid='{$slid}'");
        updatecache('splangs');
        adminlog(lang('detaimodifysplang'));
        amessage('splmodfin', $forward);
    }
}
function fetch_arr($type)
{
    global $db, $tblprefix;
    $items = array();
    $query = $db->query("SELECT * FROM {$tblprefix}splangs " . ($type ? "WHERE type='{$type}'" : '') . " ORDER BY vieworder,slid");
    while ($item = $db->fetch_array($query)) {
        $items[$item['slid']] = $item;
    }
    return $items;
}
function fetch_one($slid)
{
    global $db, $tblprefix;
开发者ID:polarlight1989,项目名称:08cms,代码行数:31,代码来源:splangs.inc.php

示例8: explode

            $temps = explode("\n", $mcommunew['usetting']);
            $mcommunew['usetting'] = array();
            foreach ($temps as $v) {
                $temparr = explode('=', str_replace(array("\r", "\n"), '', $v));
                if (!isset($temparr[1]) || !($temparr[0] = trim($temparr[0]))) {
                    continue;
                }
                $mcommunew['usetting'][$temparr[0]] = trim($temparr[1]);
            }
            unset($temps, $temparr);
        }
        $mcommunew['usetting'] = !empty($mcommunew['usetting']) ? addslashes(serialize($mcommunew['usetting'])) : '';
        $db->query("UPDATE {$tblprefix}mcommus SET \n\t\t\t\t\tcname='{$mcommunew['cname']}',\n\t\t\t\t\tsetting='{$mcommunew['setting']}',\n\t\t\t\t\tcutpl='{$mcommunew['cutpl']}',\n\t\t\t\t\taddtpl='{$mcommunew['addtpl']}',\n\t\t\t\t\tusetting='{$mcommunew['usetting']}',\n\t\t\t\t\tucadd='{$mcommunew['ucadd']}',\n\t\t\t\t\tucvote='{$mcommunew['ucvote']}',\n\t\t\t\t\tuadetail='{$mcommunew['uadetail']}',\n\t\t\t\t\tumdetail='{$mcommunew['umdetail']}',\n\t\t\t\t\tfunc='{$mcommunew['func']}'\n\t\t\t\t\tWHERE cuid='{$cuid}'");
        updatecache('mcommus');
        adminlog(lang('demomecomit'));
        amessage('itemmodifyfinish', axaction(10, "?entry=mcommus&action=mcommudetail&cuid={$cuid}"));
    }
}
function fetch_arr()
{
    global $db, $tblprefix;
    $mcommus = array();
    $query = $db->query("SELECT * FROM {$tblprefix}mcommus WHERE isbk='0' ORDER BY issystem DESC,cuid ASC");
    while ($mcommu = $db->fetch_array($query)) {
        if ($mcommu['setting'] && is_array($setting = unserialize($mcommu['setting']))) {
            $mcommu['setting'] = $setting;
        } else {
            $mcommu['setting'] = array();
        }
        $mcommus[$mcommu['cuid']] = $mcommu;
    }
开发者ID:polarlight1989,项目名称:08cms,代码行数:31,代码来源:mcommus.inc.php

示例9: a_guide

        a_guide('murldetail');
    } else {
        $murlnew['cname'] = empty($murlnew['cname']) ? $murl['cname'] : $murlnew['cname'];
        $submitmode = true;
        include M_ROOT . './include/murls/' . $murl['uclass'] . '.php';
        $murlnew['tplname'] = empty($murlnew['tplname']) ? '' : trim(strip_tags($murlnew['tplname']));
        $murlnew['onlyview'] = empty($murlnew['onlyview']) ? 0 : 1;
        $murlnew['mtitle'] = empty($murlnew['mtitle']) ? '' : trim($murlnew['mtitle']);
        $murlnew['otitle'] = empty($murlnew['otitle']) ? '' : trim($murlnew['otitle']);
        $murlnew['guide'] = empty($murlnew['guide']) ? '' : trim($murlnew['guide']);
        $murlnew['remark'] = trim(strip_tags($murlnew['remark']));
        $murlnew['setting'] = !empty($murlnew['setting']) ? addslashes(serialize($murlnew['setting'])) : '';
        $db->query("UPDATE {$tblprefix}murls SET \n\t\t\t\t\tcname='{$murlnew['cname']}',\n\t\t\t\t\tremark='{$murlnew['remark']}',\n\t\t\t\t\ttplname='{$murlnew['tplname']}',\n\t\t\t\t\tonlyview='{$murlnew['onlyview']}',\n\t\t\t\t\tmtitle='{$murlnew['mtitle']}',\n\t\t\t\t\totitle='{$murlnew['otitle']}',\n\t\t\t\t\tguide='{$murlnew['guide']}',\n\t\t\t\t\turl='{$murlnew['url']}',\n\t\t\t\t\tsetting='{$murlnew['setting']}'\n\t\t\t\t\tWHERE muid='{$muid}'");
        updatecache('murls');
        adminlog(lang('detail_modify_citem'));
        amessage('itemmodifyfinish', axaction(6, "?entry=murls&action=murlsedit"));
    }
}
function fetch_arr($uclass = '')
{
    global $db, $tblprefix;
    $murls = array();
    $query = $db->query("SELECT * FROM {$tblprefix}murls WHERE " . ($uclass ? "uclass='{$uclass}' AND " : '') . "isbk=0 ORDER BY vieworder,muid");
    while ($murl = $db->fetch_array($query)) {
        if ($murl['setting'] && is_array($setting = unserialize($murl['setting']))) {
            $murl['setting'] = $setting;
        } else {
            $murl['setting'] = array();
        }
        $murls[$murl['muid']] = $murl;
    }
开发者ID:polarlight1989,项目名称:08cms,代码行数:31,代码来源:murls.inc.php

示例10: tabfooter

    tabfooter();
    tabheader(lang('pick_setting'));
    $dsidsarr = array(0 => lang('current_system'));
    foreach ($dbsources as $k => $v) {
        $dsidsarr[$k] = $v['cname'];
    }
    $str = "<select style=\"vertical-align: middle;\" name=\"mtagnew[setting][dsid]\" onchange=\"\$id('link_mtagnew_setting_dsid').innerHTML='>><a href=\\'?entry=dbsources&action=viewconfigs&dsid=' + this.options[this.selectedIndex].value + '\\' target=\\'_blank\\'>" . lang('look_configs') . "</a>';\">" . makeoption($dsidsarr, empty($mtag['setting']['dsid']) ? 0 : $mtag['setting']['dsid']) . "</select>&nbsp; &nbsp; <span id=\"link_mtagnew_setting_dsid\">>><a href=\"?entry=dbsources&action=viewconfigs&dsid=" . (empty($mtag['setting']['dsid']) ? 0 : $mtag['setting']['dsid']) . "\" target=\"_blank\">" . lang('look_configs') . "</a></span>";
    trbasic(lang('dbsource'), '', $str, '');
    trbasic(lang('define_content_query_string'), 'mtagnew[setting][sqlstr]', empty($mtag['setting']['sqlstr']) ? '' : $mtag['setting']['sqlstr'], 'textarea');
    trbasic(lang('tagjspick'), 'mtagnew[setting][js]', empty($mtag['setting']['js']) ? 0 : $mtag['setting']['js'], 'radio');
    tabfooter();
} else {
    if (empty($mtagnew['template'])) {
        if (!submitcheck('bmtagcode')) {
            amessage('input_tag_tpl', M_REFERER);
        } else {
            $errormsg = lang('input_tag_tpl');
        }
        //生成代码出错的提示信息
    }
    $mtagnew['setting']['sqlstr'] = empty($mtagnew['setting']['sqlstr']) ? '' : stripslashes(trim($mtagnew['setting']['sqlstr']));
    if (empty($mtagnew['setting']['sqlstr'])) {
        if (!submitcheck('bmtagcode')) {
            amessage('input_query_string', M_REFERER);
        } else {
            $errormsg = lang('inpquerstr');
        }
        //生成代码出错的提示信息
    }
    $mtagnew['setting']['limits'] = empty($mtagnew['setting']['limits']) ? 10 : max(0, intval($mtagnew['setting']['limits']));
}
开发者ID:polarlight1989,项目名称:08cms,代码行数:31,代码来源:outinfos.php

示例11: in_array

            in_array($tagutclass, $clscname) && amessage('utcls_exist', axaction(1, M_REFERER));
            #			$tagclasses[$utc.$clsindex] = array(
            $tagclasses[auto_utc_index()] = array('cname' => $tagutclass, 'vieworder' => max(0, intval($tagutclassorder)));
        }
        if (!empty($utclassnew)) {
            foreach ($utclassnew as $key => $clsnew) {
                if (array_key_exists($key, $tagclasses)) {
                    !empty($clsnew['cname']) && !in_array($clsnew['cname'], $clscname) && ($tagclasses[$key]['cname'] = $clsnew['cname']);
                    $tagclasses[$key]['vieworder'] = max(0, intval($clsnew['vieworder']));
                }
            }
        }
        multisort($tagclasses);
        cache2file($tagclasses, 'tagclasses', 'usualtags', $sid);
        adminlog(lang('edit_tagclasses_mlist'));
        amessage('utcls_fin', axaction(1, M_REFERER));
    }
}
function multisort(&$arr)
{
    if (!is_array($arr) || empty($arr) || !function_exists('array_multisort')) {
        return;
    }
    foreach ($arr as $k => $v) {
        $vorder[$k] = $v['vieworder'];
        $eorder[$k] = $k;
    }
    array_multisort($vorder, SORT_ASC, $eorder, SORT_ASC, $arr);
}
function tag_style($ename, $ttype)
{
开发者ID:polarlight1989,项目名称:08cms,代码行数:31,代码来源:usualtags.inc.php

示例12: empty

    $forward = empty($forward) ? M_REFERER : $forward;
    $catalognew['dirname'] = strtolower($catalognew['dirname']);
    $c_upload = new cls_upload();
    $cafields = fields_order($cafields);
    $a_field = new cls_field();
    $sqlstr = "";
    foreach ($cafields as $k => $v) {
        $a_field->init();
        $a_field->field = $v;
        $a_field->oldvalue = isset($catalog[$k]) ? $catalog[$k] : '';
        $a_field->deal('catalognew');
        if (!empty($a_field->error)) {
            $c_upload->rollback();
            amessage($a_field->error, $forward);
        }
        $sqlstr .= ',' . $k . "='" . $a_field->newvalue . "'";
        if ($arr = multi_val_arr($a_field->newvalue, $v)) {
            foreach ($arr as $x => $y) {
                $sqlstr .= ',' . $k . '_' . $x . "='{$y}'";
            }
        }
    }
    $c_upload->closure(1, $caid, 'catalogs');
    $c_upload->saveuptotal(1);
    unset($a_field, $c_upload);
    $leveldiff = $catalognew['level'] - $catalog['level'];
    $db->query("UPDATE {$tblprefix}catalogs SET\n\t\t\n\t\t\tapmid=0{$sqlstr}\n\t\t\tWHERE caid='{$caid}'");
    adminlog(lang('detail_modify_catalog'));
    updatecache('catalogs', '', $sid);
    amessage('catalogsetfinish', $forward);
}
开发者ID:polarlight1989,项目名称:08cms,代码行数:31,代码来源:cata_manage.php

示例13: trbasic

    trbasic(lang('list_cols'), 'mtagnew[setting][cols]', empty($mtag['setting']['cols']) ? '1' : $mtag['setting']['cols']);
    trbasic(lang('functionscode'), 'mtagnew[setting][func]', empty($mtag['setting']['func']) ? '' : $mtag['setting']['func'], 'btextarea', lang('agfunctionscode'));
    trbasic(lang('functionsmpcode'), 'mtagnew[setting][mpfunc]', empty($mtag['setting']['mpfunc']) ? '' : $mtag['setting']['mpfunc'], 'btextarea', lang('agfunctionsmpcode'));
    trbasic(lang('relay_param'), 'mtagnew[setting][relays]', empty($mtag['setting']['relays']) ? '' : $mtag['setting']['relays'], 'btext', lang('agrelays'));
    trbasic(lang('rrelay_param'), 'mtagnew[setting][rrelays]', empty($mtag['setting']['rrelays']) ? '' : $mtag['setting']['rrelays'], 'btext', lang('agrrelays'));
    tabfooter();
    tabheader(lang('ptnaviset'));
    trbasic(lang('nav_simple'), 'mtagnew[setting][simple]', empty($mtag['setting']['simple']) ? '0' : $mtag['setting']['simple'], 'radio');
    trbasic(lang('nav_length'), 'mtagnew[setting][length]', isset($mtag['setting']['length']) ? $mtag['setting']['length'] : '');
    tabfooter();
} else {
    $mtagnew['setting']['func'] = trim($mtagnew['setting']['func']);
    $mtagnew['setting']['mpfunc'] = trim($mtagnew['setting']['mpfunc']);
    $mtagnew['setting']['func'] = stripslashes($mtagnew['setting']['func']);
    $mtagnew['setting']['mpfunc'] = stripslashes($mtagnew['setting']['mpfunc']);
    if (empty($mtagnew['template']) || empty($mtagnew['setting']['func']) || empty($mtagnew['setting']['mpfunc'])) {
        if (!submitcheck('bmtagcode')) {
            amessage('tag_data_miss', M_REFERER);
        } else {
            $errormsg = lang('tagdatamiss');
        }
        //生成代码出错的提示信息
    }
    $mtagnew['setting']['length'] = $mtagnew['setting']['length'] ? $mtagnew['setting']['length'] : '10';
    $mtagnew['setting']['limits'] = max(0, intval($mtagnew['setting']['limits']));
    $mtagnew['setting']['limits'] = empty($mtagnew['setting']['limits']) ? '10' : $mtagnew['setting']['limits'];
    $mtagnew['setting']['alimits'] = max(0, intval($mtagnew['setting']['alimits']));
    $mtagnew['setting']['cols'] = max(1, intval($mtagnew['setting']['cols']));
    $mtagnew['setting']['relays'] = empty($mtagnew['setting']['relays']) ? '' : trim($mtagnew['setting']['relays']);
    $mtagnew['setting']['rrelays'] = empty($mtagnew['setting']['rrelays']) ? '' : trim($mtagnew['setting']['rrelays']);
}
开发者ID:polarlight1989,项目名称:08cms,代码行数:31,代码来源:functions.php

示例14: trbasic

        trbasic(lang('menuitemcname'), 'menunew[title]', $menu['title'], 'text');
        trbasic(lang('menuitemurl'), 'menunew[url]', $menu['url'], 'btext');
        trbasic(lang('meniteord'), 'menunew[vieworder]', $menu['vieworder'], 'text');
        tabfooter('bmenudetail');
        a_guide('menudetail');
    } else {
        $menunew['title'] = trim(strip_tags($menunew['title']));
        $menunew['url'] = trim(strip_tags($menunew['url']));
        $menunew['vieworder'] = max(0, intval($menunew['vieworder']));
        $menunew['mtid'] = empty($menunew['mtid']) ? 0 : max(0, intval($menunew['mtid']));
        (!$menunew['title'] || !$menunew['url']) && amessage('pleinpmetitandurl');
        !$menunew['mtid'] && amessage('pombecoc');
        $db->query("UPDATE {$tblprefix}menus SET \n\t\t\t\t\ttitle='{$menunew['title']}', \n\t\t\t\t\turl='{$menunew['url']}', \n\t\t\t\t\tmtid='{$menunew['mtid']}', \n\t\t\t\t\tvieworder='{$menunew['vieworder']}'\n\t\t\t\t\tWHERE mnid='{$mnid}'");
        adminlog(lang('edimenitdet'));
        updatecache('menus', $issub);
        amessage('menitemodfin', axaction(6, "?entry=menus&action=menusedit{$sub_suffix}"));
    }
} elseif ($action == 'mtypedel' && $mtid) {
    if ($db->result_one("SELECT COUNT(*) FROM {$tblprefix}menus WHERE mtid='{$mtid}'")) {
        amessage('mecocoutmetedel', "?entry=menus&action=menusedit{$sub_suffix}");
    }
    $db->query("DELETE FROM {$tblprefix}mtypes WHERE mtid='{$mtid}' AND fixed='0'");
    adminlog(lang('delmenucoc'));
    updatecache('menus', $issub);
    amessage('mecocdefi', "?entry=menus&action=menusedit{$sub_suffix}");
} elseif ($action == 'menudel' && $mnid) {
    $db->query("DELETE FROM {$tblprefix}menus WHERE mnid='{$mnid}' AND fixed='0'");
    adminlog(lang('delmenuitem'));
    updatecache('menus', $issub);
    amessage('menitedelfin', "?entry=menus&action=menusedit{$sub_suffix}");
}
开发者ID:polarlight1989,项目名称:08cms,代码行数:31,代码来源:menus.inc.php

示例15: elseif

} elseif ($action == 'gmodeldetail' && $gmid) {
    $gmodel = read_cache('gmodel', $gmid, '', $sid);
    empty($gmodel) && amessage('choosegatmod');
    empty($channels[$gmodel['chid']]) && amessage('modrelarcmodnoe');
    $gfields = empty($gmodel['gfields']) ? array() : $gmodel['gfields'];
    $fields = read_cache('fields', $gmodel['chid']);
    if (!submitcheck('bfieldsedit')) {
        $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($gmodel['cname'] . '-' . lang('gather_field_set'), 'gmodeldetail', "?entry=gmodels&action=gmodeldetail&gmid={$gmid}{$param_suffix}", '5');
        trcategory(array(lang('gather'), lang('onlylink'), array(lang('field_name'), 'txtL'), lang('field_ename'), lang('field_type')));
        foreach ($fields as $k => $field) {
            $islinkstr = $field['datatype'] != 'text' ? '-' : "<input class=\"checkbox\" type=\"checkbox\" name=\"fieldsnew[{$k}][islink]\" value=\"1\"" . (!empty($gfields[$k]) ? ' checked' : '') . ">";
            echo "<tr class=\"txt\">\n" . "<td class=\"txtC w40\"><input class=\"checkbox\" type=\"checkbox\" name=\"fieldsnew[{$k}][available]\" value=\"1\"" . (isset($gfields[$k]) ? ' checked' : '') . "></td>\n" . "<td class=\"txtC w50\">{$islinkstr}</td>\n" . "<td class=\"txtL\">{$field['cname']}</td>\n" . "<td class=\"txtC\">{$k}</td>\n" . "<td class=\"txtC w80\">" . $datatypearr[$field['datatype']] . "</td>\n" . "</tr>";
        }
        tabfooter('bfieldsedit');
        a_guide('gmodeldetail');
    } else {
        foreach ($fields as $k => $v) {
            if (!empty($fieldsnew[$k]['available'])) {
                $islink = empty($fieldsnew[$k]['islink']) ? 0 : 1;
                in_array($v['datatype'], array('image', 'flash', 'file', 'media')) && ($islink = 1);
                $newgfields[$k] = $islink;
            }
        }
        $gfieldsnew = empty($newgfields) ? '' : addslashes(serialize($newgfields));
        $db->query("UPDATE {$tblprefix}gmodels SET gfields='{$gfieldsnew}' WHERE gmid='{$gmid}'");
        updatecache('gmodels', '', $sid);
        adminlog(lang('det_modify_gather_model'));
        amessage('gathmodedifin', axaction(6, "?entry=gmodels&action=gmodeledit{$param_suffix}"));
    }
}
开发者ID:polarlight1989,项目名称:08cms,代码行数:31,代码来源:gmodels.inc.php


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