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


PHP adminlog函数代码示例

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


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

示例1: db_op_result

function db_op_result($db, $query, $served_line, $served_page)
{
    if ($db->ErrorMsg() == '') {
        return true;
    } else {
        $safe_script_name = htmlentities(strip_tags($_SERVER['PHP_SELF']));
        $dberror = "A Database error occurred in " . $served_page . " on line " . ($served_line - 1) . " (called from: " . $safe_script_name . ": " . $db->ErrorMsg();
        $dberror = str_replace("'", "'", $dberror);
        // Allows the use of apostrophes.
        if ($db->logging) {
            adminlog($db, "LOG_RAW", $dberror);
        }
        return $db->ErrorMsg();
    }
}
开发者ID:kagetenshi,项目名称:xenoberage,代码行数:15,代码来源:db_op_result.php

示例2: kill_all_AFKer

function kill_all_AFKer($timelimit = 1)
{
    global $now, $db, $tablepre, $antiAFKertime, $alivenum, $deathnum, $antiAFKintv, $cmd_info;
    $cmd_info = '';
    if (!is_numeric($timelimit)) {
        $cmd_info .= '时间间隔错误!<br>';
        return;
    } elseif ($timelimit < $antiAFKintv) {
        $cmd_info .= '时间间隔太短,可能波及正常玩家。';
        return;
    }
    $cmd_info .= '将杀死: ' . $timelimit . ' 分钟内没有任何行动的玩家。<br>';
    $timelimit *= 60;
    $deadline = $now - $timelimit;
    $result = $db->query("SELECT * FROM {$tablepre}players WHERE type=0 AND endtime < '{$deadline}' AND hp>'0' AND state<'10'");
    while ($al = $db->fetch_array($result)) {
        $afkerlist[$al['pid']] = array('name' => $al['name'], 'pls' => $al['pls']);
    }
    if (!$afkerlist) {
        $cmd_info .= '没有符合条件的角色。';
        return;
    }
    foreach ($afkerlist as $kid => $kcontent) {
        $db->query("UPDATE {$tablepre}players SET hp='0',state='32' WHERE pid='{$kid}' AND type='0' AND hp>'0' AND state<'10'");
        if ($db->affected_rows()) {
            adminlog('killafker', $kid);
            $cmd_info .= '角色 ' . $kcontent['name'] . ' 被杀死。<br>';
            addnews($now, 'death32', $kcontent['name'], '', $kcontent['pls']);
            $alivenum--;
            $deathnum++;
        } else {
            $cmd_info .= '无法杀死角色 ' . $kcontent['name'] . ' 。<br>';
        }
    }
    save_gameinfo();
    return;
}
开发者ID:winddramon,项目名称:dts,代码行数:37,代码来源:antiAFKmng.php

示例3: amessage

        amessage('chaoutrelocdel', '?entry=fchannels&action=fchannelsedit');
    }
    $db->query("DROP TABLE IF EXISTS {$tblprefix}farchives_{$chid}");
    $db->query("DELETE FROM {$tblprefix}fchannels WHERE chid='{$chid}'");
    $db->query("DELETE FROM {$tblprefix}ffields WHERE chid='{$chid}'");
    del_cache('ffields', $chid);
    @unlink(M_ROOT . './dynamic/mguides/free_' . $chid . '.php');
    adminlog(lang('delete_freeinfo_channel'));
    updatecache('fchannels');
    amessage('frechadelfin', "?entry=fchannels&action=fchannelsedit");
} elseif ($action == 'fielddetail' && $chid && $fieldename) {
    !isset($fchannels[$chid]) && amessage('choosechannel', '?entry=fchannels&action=fchannelsedit');
    $field = read_cache('ffield', $chid, $fieldename);
    empty($field) && amessage('choosefield', '?entry=fchannels&action=fchanneldetail&chid=' . $chid);
    if (!submitcheck('bfielddetail')) {
        tabheader("[" . $fchannels[$chid]['cname'] . "]&nbsp;&nbsp;" . lang('field_edit') . "&nbsp;&nbsp;[{$field['cname']}]", 'fielddetail', "?entry=fchannels&action=fielddetail&chid={$chid}&fieldename={$fieldename}", 2, 0, 1);
        $submitstr = '';
        list($fmode, $fnew, $fsave) = array('fa', false, false);
        include_once M_ROOT . "./include/fields/{$field['datatype']}.php";
        tabfooter('bfielddetail', lang('submit'));
        check_submit_func($submitstr);
        a_guide('ffielddetail');
    } else {
        $fconfigarr = array('altertable' => $tblprefix . 'farchives_' . $chid, 'fieldtable' => $tblprefix . 'ffields', 'wherestr' => "WHERE ename='{$fieldename}' AND chid={$chid}");
        list($fmode, $fnew, $fsave) = array('fa', false, true);
        include_once M_ROOT . "./include/fields/{$field['datatype']}.php";
        adminlog(lang('detail0_modify_freeinfo_channel_field'));
        updatecache('ffields', $chid);
        amessage('fieldeditfinish', axaction(6, '?entry=fchannels&action=fchanneldetail&chid=' . $chid));
    }
}
开发者ID:polarlight1989,项目名称:08cms,代码行数:31,代码来源:fchannels.inc.php

示例4: check_submit_func

        check_submit_func($submitstr);
        a_guide('memberdetail');
    } else {
        foreach ($grouptypes as $gtid => $grouptype) {
            if ($grouptype['mode'] < 2 && !in_array($mchid, explode(',', $grouptype['mchids'])) && ($gtid != 2 || $backamember)) {
                $minfosnew['grouptype' . $gtid . 'date'] = !$minfosnew['grouptype' . $gtid] || !isdate($minfosnew['grouptype' . $gtid . 'date']) ? '0' : strtotime($minfosnew['grouptype' . $gtid . 'date']);
                $actuser->handgrouptype($gtid, $minfosnew['grouptype' . $gtid], $minfosnew['grouptype' . $gtid . 'date']);
            }
        }
        $actuser->updatedb();
        adminlog(lang('detail_edit_member'));
        amessage('membermodifyfinish', M_REFERER);
    }
} elseif ($action == 'allowance' && $mid) {
    if (!submitcheck('bmemberdetail')) {
        $a_field = new cls_field();
        $submitstr = '';
        tabheader(lang('issue_allowance_manager') . '&nbsp;:&nbsp;[' . $mchannel['cname'] . ']' . $actuser->info['mname'], 'memberdetail', "?entry=member&action=allowance&mid={$mid}", 2, 1, 1);
        trbasic(lang('aw_arc_issue_limit'), 'minfosnew[arcallowance]', $actuser->info['arcallowance']);
        trbasic(lang('aw_commu_issue_limit'), 'minfosnew[cuallowance]', $actuser->info['cuallowance']);
        tabfooter('bmemberdetail');
        check_submit_func($submitstr);
        a_guide('memberdetail');
    } else {
        $actuser->updatefield('arcallowance', empty($minfosnew['arcallowance']) ? 0 : max(0, intval($minfosnew['arcallowance'])), 'main');
        $actuser->updatefield('cuallowance', empty($minfosnew['cuallowance']) ? 0 : max(0, intval($minfosnew['cuallowance'])), 'main');
        $actuser->updatedb();
        adminlog(lang('detail_edit_member'));
        amessage('membermodifyfinish', M_REFERER);
    }
}
开发者ID:polarlight1989,项目名称:08cms,代码行数:31,代码来源:member.inc.php

示例5: exit

<?php

if (!defined('IN_ADMIN')) {
    exit('Access Denied');
}
if ($gamestate >= 20) {
    $result = $db->query("SELECT pid FROM {$tablepre}players WHERE type=0");
    $validnum = $db->num_rows($result);
    $result = $db->query("SELECT pid FROM {$tablepre}players WHERE hp>0 AND type=0");
    $alivenum = $db->num_rows($result);
    $result = $db->query("SELECT pid FROM {$tablepre}players WHERE hp<=0 OR state>=10");
    $deathnum = $db->num_rows($result);
    \map\movehtm();
    save_gameinfo();
    adminlog('infomng');
    $cmd_info = "状态更新:激活人数 {$validnum},生存人数 {$alivenum},死亡人数 {$deathnum}<br>";
    $cmd_info .= "已重置移动地点缓存数据";
} else {
    $cmd_info = "当前游戏未开始!";
}
/*$result=$db->query("SHOW FULL COLUMNS FROM {$tablepre}players");
while ($row=$db->fetch_array($result)){
	foreach ($row as $val)
		echo $val."<br>";
}*/
/*
$db->query("ALTER TABLE {$tablepre}swinners ADD cardname text not null AFTER gdlist");
$db->query("ALTER TABLE {$tablepre}winners ADD cardname text not null AFTER gdlist");
$db->query("ALTER TABLE {$tablepre}users ADD gold int(10) unsigned not null default '0' AFTER n_achievements");
$db->query("ALTER TABLE {$tablepre}users ADD cardlist text not null AFTER n_achievements");
$db->query("ALTER TABLE {$tablepre}users ADD card int(10) unsigned not null default '0' AFTER n_achievements");
开发者ID:DTS-China,项目名称:dts,代码行数:31,代码来源:gamecheck.php

示例6: unset

        }
        unset($aedit, $auser);
        if (!empty($select_all)) {
            $npage++;
            if ($npage <= $pages) {
                $fromid = min($selectid);
                $transtr = '';
                $transtr .= "&select_all=1";
                $transtr .= "&pages={$pages}";
                $transtr .= "&npage={$npage}";
                $transtr .= "&barcsedit=1";
                $transtr .= "&fromid={$fromid}";
                mcmessage('operating', "?action=orders&page={$page}{$filterstr}{$transtr}{$parastr}&dealstr={$dealstr}", $pages, $npage, "<a href=\"?action=orders&page={$page}{$filterstr}\">", '</a>');
            }
        }
        adminlog(lang('orders_admin'), lang('orders_list_admin'));
        mcmessage('ordopefin', "?action=orders&page={$page}{$filterstr}");
    }
} else {
    $forward = empty($forward) ? M_REFERER : $forward;
    empty($oid) && mcmessage('chooseord', $forward);
    if (!($order = $db->fetch_one("SELECT * FROM {$tblprefix}orders WHERE mid={$memberid} AND delstate!=2 AND oid={$oid}"))) {
        mcmessage('chooseorders', $forward);
    }
    if ($order['tomid']) {
        $user = new cls_userinfo();
        $user->activeuser($order['tomid'], 1);
        $cfg_paymode = $user->info['paymode'];
        $cfg_ordermode = $user->info['ordermode'];
        $pays = array(2 => array($user->info['alipay'], $user->info['alipid'], $user->info['alikeyt']), 3 => array($user->info['tenpay'], $user->info['tenkeyt']));
    } else {
开发者ID:polarlight1989,项目名称:08cms,代码行数:31,代码来源:orders.inc.php

示例7: empty

        $npage = empty($npage) ? 1 : $npage;
        if (empty($pages)) {
            $itemcount = $db->result_one("SELECT COUNT(*) FROM {$tblprefix}subscribes s LEFT JOIN {$tblprefix}archives a ON a.aid=s.aid {$wheresql}");
            $pages = @ceil($itemcount / $atpp);
        }
        if ($npage <= $pages) {
            $fromstr = empty($fromid) ? "" : "s.id<{$fromid}";
            $nwheresql = !$wheresql ? $fromstr ? "WHERE {$fromstr}" : "" : $wheresql . ($fromstr ? " AND " : "") . $fromstr;
            $query = $db->query("SELECT s.id FROM {$tblprefix}subscribes s LEFT JOIN {$tblprefix}archives a ON a.aid=s.aid {$nwheresql} ORDER BY s.id DESC LIMIT 0,{$atpp}");
            while ($item = $db->fetch_array($query)) {
                $selectid[] = $item['id'];
            }
        }
    }
    $selectid && $db->query("DELETE FROM {$tblprefix}subscribes WHERE id " . multi_str($selectid), 'UNBUFFERED');
    if (!empty($select_all)) {
        $npage++;
        if ($npage <= $pages) {
            $fromid = min($selectid);
            $transtr = '';
            $transtr .= "&select_all=1";
            $transtr .= "&pages={$pages}";
            $transtr .= "&npage={$npage}";
            $transtr .= "&barcsedit=1";
            $transtr .= "&fromid={$fromid}";
            amessage('operating', "?entry=subscribes{$param_suffix}{$transtr}&forward=" . urlencode($forward), $pages, $npage, "<a href=\"?entry=userfiles&action=userfilesedit&page={$page}{$filterstr}\">", '</a>');
        }
    }
    adminlog(lang('subconadm'), lang('subcoliadmoper'));
    amessage('subdelsuc', "?entry=subscribes{$param_suffix}&page={$page}{$filterstr}");
}
开发者ID:polarlight1989,项目名称:08cms,代码行数:31,代码来源:subscribes.inc.php

示例8: trbasic

        trbasic(lang('msgcode_msg'), 'mconfigsnew[msgcode_msg]', @$mconfigs['msgcode_msg'], 'textarea', lang('msgcode_msg_tip'));
        echo "</tbody>";
        tabfooter();
        echo '<input class="button" type="submit" name="bmconfigs" value="' . lang('submit') . '"/>&nbsp; &nbsp;' . '<input type="hidden" name="mobmode" value="1"/>' . '</form>';
        a_guide('cfmail');
    } else {
        if (empty($mobmode)) {
            $mconfigsnew['mail_smtp'] = trim($mconfigsnew['mail_smtp']);
            $mconfigsnew['mail_port'] = trim($mconfigsnew['mail_port']);
            $mconfigsnew['mail_from'] = trim($mconfigsnew['mail_from']);
            $mconfigsnew['mail_user'] = trim($mconfigsnew['mail_user']);
            $mconfigsnew['mail_pwd'] = trim($mconfigsnew['mail_pwd']);
            unset($mconfigsnew['mail_sign'], $mconfigsnew['mail_to']);
        }
        saveconfig('mail');
        adminlog(lang('mailset'), lang('upanddownset'));
        amessage(empty($mobmode) ? 'mailsetfinish' : 'mobilesetfinish', '?entry=mconfigs&action=cfmobmail');
    }
}
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');
}
function alter_purchase()
{
开发者ID:polarlight1989,项目名称:08cms,代码行数:31,代码来源:setting.php

示例9: 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

示例10: min

                }
            }
            if (!empty($select_all)) {
                $npage++;
                if ($npage <= $pages) {
                    $fromid = min($selectid);
                    $transtr = '';
                    $transtr .= "&select_all=1";
                    $transtr .= "&pages={$pages}";
                    $transtr .= "&npage={$npage}";
                    $transtr .= "&barcsedit=1";
                    $transtr .= "&fromid={$fromid}";
                    amessage('operating', "?entry=comments&action=commentsedit&page={$page}{$param_suffix}{$filterstr}{$transtr}{$parastr}&dealstr={$dealstr}", $pages, $npage, "<a href=\"?entry=comments&action=commentsedit&page={$page}{$param_suffix}{$filterstr}\">", '</a>');
                }
            }
            adminlog(lang('commentsetsucceed'), lang('commentsetsucceed'));
            amessage('contentsetsucceed', "?entry=comments&action=commentsedit{$param_suffix}&page={$page}{$filterstr}");
        }
    } else {
        include M_ROOT . $u_tplname;
    }
} elseif ($action == 'commentdetail') {
    $cid = empty($cid) ? 0 : max(0, intval($cid));
    $cuid = $db->result_one("SELECT cuid FROM {$tblprefix}comments WHERE cid='{$cid}'");
    if (!($commu = read_cache('commu', $cuid))) {
        amessage('setcommuitem');
    }
    if (empty($commu['uadetail'])) {
        load_cache('cfields,ucotypes');
        $uedit = new cls_cuedit();
        if ($errno = $uedit->read($cid, 'comment')) {
开发者ID:polarlight1989,项目名称:08cms,代码行数:31,代码来源:comments.inc.php

示例11: 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

示例12: 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

示例13: 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

示例14: read_cache

        $ocache = read_cache('ptag', $k, '', $nsid);
        cache2file($ocache, cache_name('ptag', $k), 'ptag', 0);
    }
    foreach ($rtags as $k => $v) {
        $ocache = read_cache('rtag', $k, '', $nsid);
        cache2file($ocache, cache_name('rtag', $k), 'rtag', 0);
    }
    clear_dir(M_ROOT . $subsite['dirname'], true);
    //清除子站目录
    clear_dir(M_ROOT . "dynamic/cache/{$nsid}/", true);
    //清除子站缓存
    m_unlink($homedefault);
    //清除可能残留的静态首页
    $db->query("DELETE FROM {$tblprefix}subsites WHERE sid='{$nsid}'", 'SILENT');
    rebuild_cache(-1);
    adminlog(lang('subsittranstmsite'));
    amessage('subtramsifin', '?entry=subsites&action=subsitesedit');
} elseif ($action == 'subsitedel' && $nsid) {
    if (empty($confirm)) {
        $message = lang('delsubsite') . '<br><br>' . lang('del_alert') . "<br><br>";
        $message .= lang('confirmclick') . "[<a href=?entry=subsites&action=subsitedel&nsid=" . $nsid . "&confirm=1>" . lang('delete') . "</a>]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
        $message .= lang('giveupclick') . "[<a href=?entry=subsites&action=subsitesedit>" . lang('goback') . "</a>]";
        amessage($message);
    }
    if ($db->result_one("SELECT COUNT(*) FROM {$tblprefix}archives WHERE sid='{$nsid}'")) {
        amessage('subwitarccandel', '?entry=subsites&action=subsitesedit');
    }
    if ($db->result_one("SELECT COUNT(*) FROM {$tblprefix}catalogs WHERE sid='{$nsid}'")) {
        amessage('subwitcatcandel', '?entry=subsites&action=subsitesedit');
    }
    if ($db->result_one("SELECT COUNT(*) FROM {$tblprefix}cnodes WHERE sid='{$nsid}'")) {
开发者ID:polarlight1989,项目名称:08cms,代码行数:31,代码来源:subsites.inc.php

示例15: unset

        }
        unset($aedit);
        if (!empty($select_all)) {
            $npage++;
            if ($npage <= $pages) {
                $fromid = min($selectid);
                $transtr = '';
                $transtr .= "&select_all=1";
                $transtr .= "&pages={$pages}";
                $transtr .= "&npage={$npage}";
                $transtr .= "&barcsedit=1";
                $transtr .= "&fromid={$fromid}";
                amessage('operating', "?entry=marchives&action=marchivesedit&page={$page}{$param_suffix}{$filterstr}{$transtr}{$parastr}&dealstr={$dealstr}", $pages, $npage, "<a href=\"?entry=marchives&action=marchivesedit&page={$page}{$param_suffix}{$filterstr}\">", '</a>');
            }
        }
        adminlog(lang('marchivesedit'));
        amessage('marcfinish', "?entry=marchives&action=marchivesedit{$param_suffix}&page={$page}{$filterstr}");
    }
} elseif ($action == 'marchivedetail') {
    $forward = empty($forward) ? M_REFERER : $forward;
    $forwardstr = '&forward=' . rawurlencode($forward);
    $maid = empty($maid) ? 0 : max(0, intval($maid));
    $matid = empty($matid) ? 0 : max(0, intval($matid));
    $aedit = new cls_marcedit();
    $aedit->set_id($maid, $matid, 0);
    if (!$aedit->maid) {
        amessage('choosemarchive');
    }
    $fields = read_cache('mafields', $matid);
    if (!submitcheck('bmarchive')) {
        $a_field = new cls_field();
开发者ID:polarlight1989,项目名称:08cms,代码行数:31,代码来源:marchives.inc.php


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