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


PHP gexit函数代码示例

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


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

示例1: write_valid_limit

function write_valid_limit($dir, $nmlmtstr, $iplmtstr)
{
    foreach (array('nm', 'ip') as $ar_nm) {
        ${$ar_nm . 'lmtarray'} = explode('|', ${$ar_nm . 'lmtstr'});
        ${$ar_nm . 'lmtlist0'} = ${$ar_nm . 'lmtlist'} = '';
        foreach (${$ar_nm . 'lmtarray'} as $value) {
            ${$ar_nm . 'lmtlist'} .= "'{$value}',";
        }
        if (${$ar_nm . 'lmtlist0'} != ${$ar_nm . 'lmtlist'}) {
            ${$ar_nm . 'lmtlist'} = 'Array(' . substr(${$ar_nm . 'lmtlist'}, 0, -1) . ')';
        } else {
            ${$ar_nm . 'lmtlist'} = 'Array()';
        }
    }
    $vldata = "<?php\n\n\$nmlimit = {$nmlmtlist};\n\$iplimit = {$iplmtlist};\n\n?>";
    if ($fp = fopen("{$dir}banlist.list", 'w')) {
        if (flock($fp, LOCK_EX)) {
            fwrite($fp, $vldata);
        } else {
            exit("Couldn't save the game's info !");
        }
        fclose($fp);
    } else {
        gexit('Can not write to cache files, please check directory ./gamedata/ .', __FILE__, __LINE__);
    }
    return;
}
开发者ID:jiangtiandao,项目名称:phpdts,代码行数:27,代码来源:validlimitmng.php

示例2: parse_template

function parse_template($file, $templateid, $tpldir)
{
    global $language;
    $nest = 5;
    $tplfile = GAME_ROOT . "./{$tpldir}/{$file}.htm";
    $objfile = GAME_ROOT . "./gamedata/templates/{$templateid}_{$file}.tpl.php";
    if (!($fp = fopen($tplfile, 'r'))) {
        gexit("Current template file './{$tpldir}/{$file}.htm' not found or have no access!");
    } elseif (!(include_once language('templates', $templateid, $tpldir))) {
        gexit("<br>Current template pack do not have a necessary language file 'templates.lang.php' or have syntax error!");
    }
    $template = fread($fp, filesize($tplfile));
    fclose($fp);
    $var_regexp = "((\\\$[a-zA-Z_-ÿ][a-zA-Z0-9_-ÿ]*)(\\[[a-zA-Z0-9_\\-\\.\"\\'\\[\\]\$-ÿ]+\\])*)";
    $const_regexp = "([a-zA-Z_-ÿ][a-zA-Z0-9_-ÿ]*)";
    $template = preg_replace("/([\n\r]+)\t+/s", "\\1", $template);
    $template = preg_replace("/\\<\\!\\-\\-\\{(.+?)\\}\\-\\-\\>/s", "{\\1}", $template);
    $template = preg_replace("/\\{lang\\s+(.+?)\\}/ies", "languagevar('\\1')", $template);
    $template = str_replace("{LF}", "<?=\"\\n\"?>", $template);
    $template = preg_replace("/\\{(\\\$[a-zA-Z0-9_\\[\\]\\'\"\$\\.-ÿ]+)\\}/s", "<?=\\1?>", $template);
    $template = preg_replace("/{$var_regexp}/es", "addquote('<?=\\1?>')", $template);
    $template = preg_replace("/\\<\\?\\=\\<\\?\\={$var_regexp}\\?\\>\\?\\>/es", "addquote('<?=\\1?>')", $template);
    $template = "<? if(!defined('IN_GAME')) exit('Access Denied'); ?>\n{$template}";
    $template = preg_replace("/[\n\r\t]*\\{template\\s+([a-z0-9_]+)\\}[\n\r\t]*/is", "\n<? include template('\\1'); ?>\n", $template);
    $template = preg_replace("/[\n\r\t]*\\{template\\s+(.+?)\\}[\n\r\t]*/is", "\n<? include template(\\1); ?>\n", $template);
    $template = preg_replace("/[\n\r\t]*\\{eval\\s+(.+?)\\}[\n\r\t]*/ies", "stripvtags('\n<? \\1 ?>\n','')", $template);
    $template = preg_replace("/[\n\r\t]*\\{echo\\s+(.+?)\\}[\n\r\t]*/ies", "stripvtags('\n<? echo \\1; ?>\n','')", $template);
    $template = preg_replace("/[\n\r\t]*\\{elseif\\s+(.+?)\\}[\n\r\t]*/ies", "stripvtags('\n<? } elseif(\\1) { ?>\n','')", $template);
    $template = preg_replace("/[\n\r\t]*\\{else\\}[\n\r\t]*/is", "\n<? } else { ?>\n", $template);
    for ($i = 0; $i < $nest; $i++) {
        $template = preg_replace("/[\n\r\t]*\\{loop\\s+(\\S+)\\s+(\\S+)\\}[\n\r]*(.+?)[\n\r]*\\{\\/loop\\}[\n\r\t]*/ies", "stripvtags('\n<? if(is_array(\\1)) { foreach(\\1 as \\2) { ?>','\n\\3\n<? } } ?>\n')", $template);
        $template = preg_replace("/[\n\r\t]*\\{loop\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)\\}[\n\r\t]*(.+?)[\n\r\t]*\\{\\/loop\\}[\n\r\t]*/ies", "stripvtags('\n<? if(is_array(\\1)) { foreach(\\1 as \\2 => \\3) { ?>','\n\\4\n<? } } ?>\n')", $template);
        $template = preg_replace("/[\n\r\t]*\\{if\\s+(.+?)\\}[\n\r]*(.+?)[\n\r]*\\{\\/if\\}[\n\r\t]*/ies", "stripvtags('\n<? if(\\1) { ?>','\n\\2\n<? } ?>\n')", $template);
    }
    $template = preg_replace("/\\{{$const_regexp}\\}/s", "<?=\\1?>", $template);
    $template = preg_replace("/ \\?\\>[\n\r]*\\<\\? /s", " ", $template);
    $template = preg_replace("/\\<\\?/s", "<?php", $template);
    $template = preg_replace("/\\<\\?php\\=/s", "<?php echo ", $template);
    if (!($fp = fopen($objfile, 'w'))) {
        gexit("Directory './gamedata/templates/' not found or have no access!");
    }
    $template = preg_replace("/\"(http)?[\\w\\.\\/:]+\\?[^\"]+?&[^\"]+?\"/e", "transamp('\\0')", $template);
    flock($fp, 2);
    fwrite($fp, $template);
    fclose($fp);
}
开发者ID:jiangtiandao,项目名称:phpdts,代码行数:46,代码来源:template.func.php

示例3: eval

require './include/common.inc.php';
require './include/user.func.php';
eval(import_module('cardbase'));
if (!$cuser || !$cpass) {
    gexit($_ERROR['no_login'], __FILE__, __LINE__);
}
$result = $db->query("SELECT * FROM {$gtablepre}users WHERE username='{$cuser}'");
if (!$db->num_rows($result)) {
    gexit($_ERROR['login_check'], __FILE__, __LINE__);
}
$udata = $db->fetch_array($result);
if ($udata['password'] != $cpass) {
    gexit($_ERROR['wrong_pw'], __FILE__, __LINE__);
}
if ($udata['groupid'] <= 0) {
    gexit($_ERROR['user_ban'], __FILE__, __LINE__);
}
if (!isset($mode)) {
    $mode = 'show';
}
if ($mode == 'edit') {
    $gamedata = array();
    $gamedata['innerHTML']['info'] = '';
    if ($opass && $npass && $rnpass) {
        $pass_right = true;
        $pass_check = pass_check($npass, $rnpass);
        if ($pass_check != 'pass_ok') {
            $gamedata['innerHTML']['info'] .= $_ERROR[$pass_check] . '<br />';
            $pass_right = false;
        }
        $opass = md5($opass);
开发者ID:sillycross,项目名称:dts,代码行数:31,代码来源:user.php

示例4: header

    exit;
}
$result = $db->query("SELECT * FROM {$tablepre}players WHERE name = '{$cuser}' AND type = 0");
if (!$db->num_rows($result)) {
    header("Location: valid.php");
    exit;
}
$pdata = $db->fetch_array($result);
if ($pdata['pass'] != $cpass) {
    $tr = $db->query("SELECT `password` FROM {$gtablepre}users WHERE username='{$cuser}'");
    $tp = $db->fetch_array($tr);
    $password = $tp['password'];
    if ($password == $cpass) {
        $db->query("UPDATE {$tablepre}players SET pass='{$password}' WHERE name='{$cuser}'");
    } else {
        gexit($_ERROR['wrong_pw'], __FILE__, __LINE__);
    }
}
if ($gamestate == 0) {
    header("Location: end.php");
    exit;
}
\player\load_playerdata(\player\fetch_playerdata($cuser));
\player\init_playerdata();
\player\init_profile();
$log = '';
//读取聊天信息
$chatdata = getchat(0, $teamID);
$hp_backup_temp = $hp;
$player_dead_flag_backup_temp = $player_dead_flag;
if ($hp <= 0 || $player_dead_flag) {
开发者ID:winddramon,项目名称:dts,代码行数:31,代码来源:game.php

示例5: gexit

    }
    $result = $db->query("SELECT * FROM {$gtablepre}users WHERE username='{$cuser}'");
    if (!$db->num_rows($result)) {
        gexit($_ERROR['login_check'], __FILE__, __LINE__);
    }
    $udata = $db->fetch_array($result);
    if ($udata['password'] != $cpass) {
        gexit($_ERROR['wrong_pw'], __FILE__, __LINE__);
    }
    if ($udata['groupid'] <= 0) {
        gexit($_ERROR['user_ban'], __FILE__, __LINE__);
    }
    extract($udata);
    $curuser = true;
} else {
    $uname = urldecode($_REQUEST["playerID"]);
    $result = $db->query("SELECT * FROM {$gtablepre}users WHERE username='{$uname}'");
    if (!$db->num_rows($result)) {
        gexit($_ERROR['user_not_exists'], __FILE__, __LINE__);
    }
    $udata = $db->fetch_array($result);
    extract($udata);
    $curuser = false;
    if ($uname == $cuser) {
        $curuser = true;
    }
}
$iconarray = get_iconlist($icon);
$select_icon = $icon;
$winning_rate = $validgames ? round($wingames / $validgames * 100) . "%" : '0%';
include template('user_profile');
开发者ID:Tian-hao,项目名称:dts,代码行数:31,代码来源:user_profile.php

示例6: template

    include template('notice');
} elseif ($mode == 'tutorial') {
    if (!isset($tmode)) {
        $tmode = 0;
    }
    $nexttmode = $tmode + 1;
    include template('tutorial');
} else {
    extract($udata);
    $result = $db->query("SELECT * FROM {$tablepre}players WHERE name = '{$cuser}' AND type = 0");
    if ($db->num_rows($result)) {
        header("Location: game.php");
        exit;
    }
    if ($validnum >= $validlimit) {
        gexit($_ERROR['player_limit'], __FILE__, __LINE__);
    }
    $iconarray = get_iconlist($icon);
    $select_icon = $icon;
    include template('valid');
}
function makeclub()
{
    global $wp, $wk, $wg, $wc, $wd, $wf, $money, $mhp, $msp, $hp, $sp, $att, $def;
    $wp = $wk = $wg = $wc = $wd = $wf = 0;
    $dice = rand(0, 105);
    if ($dice < 10) {
        $club = 1;
        $wp = 30;
    } elseif ($dice < 20) {
        $club = 2;
开发者ID:jiangtiandao,项目名称:phpdts,代码行数:31,代码来源:valid.php

示例7: array

            }
            $kres = $t;
        }
        $isnew = array();
        foreach ($kres as $key => $val) {
            if (($ktype == 0 || $ktype == 2) && $choice != $key) {
                $isnew[$key] = "";
                continue;
            }
            if (!in_array($val, $oc)) {
                $isnew[$key] = "<span class=\"L5\">NEW!</span>";
            } else {
                $isnew[$key] = "";
            }
        }
        $ishighlight = array();
        if ($ktype == 0 || $ktype == 2) {
            for ($i = 1; $i <= 4; $i++) {
                $ishighlight[$i] = $i == $choice;
            }
        }
        include template('kujiresult');
    } else {
        gexit($_ERROR['kuji_failure'], __FILE__, __LINE__);
    }
} else {
    //翻卡UI
    include template('kujipick');
}
?>
 
开发者ID:sillycross,项目名称:dts,代码行数:30,代码来源:kuji.php

示例8: define

<?php

define('CURSCRIPT', 'register');
require './include/common.inc.php';
include './include/user.func.php';
include './gamedata/banlist.list';
if (isset($cuser) && isset($cpass)) {
    gexit($_ERROR['logged_in'], __FILE__, __LINE__);
}
if (!isset($cmd)) {
    //$ustate = 'register';
    $icon = 0;
    $gender = 'm';
    $iconarray = get_iconlist();
    $select_icon = 0;
    $motto = $criticalmsg = $killmsg = $lastword = '';
    include template('register');
} elseif ($cmd = 'post_register') {
    //$ustate = 'register';
    $gamedata = array();
    $name_check = name_check($username);
    $pass_check = pass_check($npass, $rnpass);
    $onlineip = real_ip();
    if ($name_check != 'name_ok') {
        $gamedata['innerHTML']['info'] = $_ERROR[$name_check];
    } elseif ($pass_check != 'pass_ok') {
        $gamedata['innerHTML']['info'] = $_ERROR[$pass_check];
    } elseif (preg_match($iplimit, $onlineip)) {
        $gamedata['innerHTML']['info'] = $_ERROR['ip_banned'];
    } else {
        $result = $db->query("SELECT * FROM {$gtablepre}users WHERE username = '{$username}'");
开发者ID:Tian-hao,项目名称:dts,代码行数:31,代码来源:register.php

示例9: define

define('IN_ADMIN', TRUE);
require GAME_ROOT . './gamedata/admincfg.php';
require GAME_ROOT . './include/admin/admin.lang.php';
$admin_cmd_list = array('configmng' => 9, 'systemmng' => 7, 'gamecfgmng' => 7, 'gmlist' => 9, 'urlist' => 9, 'banlistmng' => 6, 'gamecheck' => 2, 'pcmng' => 5, 'npcmng' => 5, 'gameinfomng' => 5, 'antiAFKmng' => 4, 'rankclear' => 9, 'roomclose' => 7);
if (!$cuser || !$cpass) {
    gexit($_ERROR['no_login'], __FILE__, __LINE__);
}
$result = $db->query("SELECT * FROM {$gtablepre}users WHERE username='{$cuser}'");
if (!$db->num_rows($result)) {
    gexit($_ERROR['login_check'], __FILE__, __LINE__);
}
$udata = $db->fetch_array($result);
if ($udata['password'] != $cpass) {
    gexit($_ERROR['wrong_pw'], __FILE__, __LINE__);
} elseif ($udata['groupid'] <= 1 && $cuser !== $gamefounder) {
    gexit($_ERROR['no_admin'], __FILE__, __LINE__);
}
if ($cuser === $gamefounder) {
    $mygroup = 10;
} else {
    $mygroup = $udata['groupid'];
}
$showdata = $cmd_info = false;
if ($mode == 'admin_menu' && in_array($command, array_keys($admin_cmd_list))) {
    //进入子菜单的指令
    if ($mygroup >= $admin_cmd_list[$command]) {
        include_once GAME_ROOT . "./include/admin/{$command}.php";
        $showdata = ob_get_contents();
    } else {
        $cmd_info = $_ERROR['no_power'];
    }
开发者ID:winddramon,项目名称:dts,代码行数:31,代码来源:admin.php

示例10: while

        if (@($fp = fopen(GAME_ROOT . './gamedata/dberror.log', 'r'))) {
            while (!feof($fp) && count($errlog) < 20) {
                $log = explode("\t", fgets($fp, 50));
                if ($timestamp - $log[0] < 86400) {
                    $errlog[$log[0]] = $log[1];
                }
            }
            fclose($fp);
        }
        if (!in_array($dberrno, $errlog)) {
            $errlog[$timestamp] = $dberrno;
            @($fp = fopen(GAME_ROOT . './gamedata/dberror.log', 'w'));
            @flock($fp, 2);
            foreach (array_unique($errlog) as $dateline => $errno) {
                @fwrite($fp, "{$dateline}\t{$errno}");
            }
            @fclose($fp);
            if (function_exists('errorlog')) {
                errorlog('MySQL', basename($GLOBALS['_SERVER']['PHP_SELF']) . " : {$dberror} - " . cutstr($sql, 120), 0);
            }
            if ($GLOBALS['dbreport']) {
                echo "<br><br>An error report has been dispatched to our administrator.";
                @sendmail($GLOBALS['adminemail'], '[bra!] MySQL Error Report', "There seems to have been a problem with the database of your bra game\n\n" . strip_tags($errmsg) . "\n\n" . "Please check-up your MySQL server and forum scripts, similar errors will not be reported again in recent 24 hours\n" . "If you have troubles in solving this problem, please visit loongyou Community http://www.loongyou.com");
            }
        } else {
            echo '<br><br>Similar error report has beed dispatched to administrator before.';
        }
    }
    echo '</p>';
    function_exists('gexit') ? gexit() : exit;
}
开发者ID:jiangtiandao,项目名称:phpdts,代码行数:31,代码来源:db_mysql_error.inc.php

示例11: gexit

}
$udata = $db->fetch_array($result);
if ($udata['password'] != $cpass) {
    gexit($_ERROR['wrong_pw'], __FILE__, __LINE__);
}
if ($udata['groupid'] <= 0) {
    gexit($_ERROR['user_ban'], __FILE__, __LINE__);
}
//write card json
//$objfile = GAME_ROOT."./gamedata/templates/{$templateid}_$file.tpl.php";
require config('card', $gamecfg);
$jfile = GAME_ROOT . "./gamedata/cache/card.json";
$cdfile = GAME_ROOT . "./gamedata/cache/card_1.php";
if (!file_exists($jfile) || filemtime($cdfile) > filemtime($jfile)) {
    if (!($fp = fopen($jfile, 'w'))) {
        gexit("咕咕咕");
    }
    $jdesc = json_encode($carddesc, JSON_UNESCAPED_UNICODE);
    flock($fp, 2);
    fwrite($fp, $jdesc);
    fclose($fp);
}
if (!isset($mode)) {
    $mode = 'show';
}
if ($mode == 'edit') {
    $gamedata = array();
    $gamedata['innerHTML']['info'] = '';
    if ($opass && $npass && $rnpass) {
        $pass_right = true;
        $pass_check = pass_check($npass, $rnpass);
开发者ID:DTS-China,项目名称:dts,代码行数:31,代码来源:user.php

示例12: rs_game

function rs_game($mode = 0)
{
    global $db, $tablepre, $gamecfg, $now, $gamestate, $plsinfo, $typeinfo, $areanum, $areaadd, $afktime, $combonum, $deathlimit;
    //	$stime=getmicrotime();
    $dir = GAME_ROOT . './gamedata/';
    $sqldir = GAME_ROOT . './gamedata/sql/';
    if ($mode & 1) {
        //重设玩家互动信息、聊天记录、地图道具、地图陷阱、进行状况
        $sql = file_get_contents("{$sqldir}reset.sql");
        $sql = str_replace("\r", "\n", str_replace(' bra_', ' ' . $tablepre, $sql));
        $db->queries($sql);
        //重设游戏进行状况的时间
        if ($fp = fopen("{$dir}newsinfo.php", 'wb')) {
            global $checkstr;
            fwrite($fp, $checkstr);
            fclose($fp);
        } else {
            gexit('Can not write to cache files, please check directory ./gamedata/ and ./gamedata/cache/ .', __FILE__, __LINE__);
        }
        //清空战斗信息
        global $hdamage, $hplayer, $noisetime, $noisepls, $noiseid, $noiseid2, $noisemode, $starttime, $gamevars;
        $hdamage = 0;
        $hplayer = '';
        $noisetime = 0;
        $noisepls = 0;
        $noiseid = 0;
        $noiseid2 = 0;
        $noisemode = '';
        save_combatinfo();
        //修改反挂机间隔
        $afktime = $starttime;
        //重设连斗判断死亡数
        $combonum = $deathlimit;
        //重设游戏剧情开关
        $gamevars = 0;
        save_gameinfo();
    }
    if ($mode & 2) {
        //echo " - 禁区初始化 - ";
        global $arealist, $areanum, $weather, $hack, $areatime, $starttime, $startmin, $areaadd, $areahour;
        list($sec, $min, $hour, $day, $month, $year, $wday, $yday, $isdst) = localtime($starttime);
        $areatime = ceil(($starttime + $areahour * 60) / 600) * 600;
        //$areahour已改为按分钟计算,ceil是为了让禁区分钟为10的倍数
        $plsnum = sizeof($plsinfo);
        $arealist = range(1, $plsnum - 1);
        shuffle($arealist);
        array_unshift($arealist, 0);
        $areanum = 0;
        $weather = rand(0, 9);
        $hack = 0;
        movehtm($areatime);
    }
    if ($mode & 4) {
        //echo " - 角色数据库初始化 - ";
        global $validnum, $alivenum, $deathnum;
        $sql = file_get_contents("{$sqldir}players.sql");
        $sql = str_replace("\r", "\n", str_replace(' bra_', ' ' . $tablepre, $sql));
        $db->queries($sql);
        //runquery($sql);
        $validnum = $alivenum = $deathnum = 0;
    }
    if ($mode & 8) {
        //echo " - NPC初始化 - ";
        $db->query("DELETE FROM {$tablepre}players WHERE type>0 ");
        include_once config('npc', $gamecfg);
        //$typenum = sizeof($typeinfo);
        $plsnum = sizeof($plsinfo);
        $npcqry = '';
        //for($i = 1; $i < $typenum; $i++) {
        foreach ($npcinfo as $i => $npcs) {
            if (!empty($npcs)) {
                if (sizeof($npcs['sub']) > $npcs['num']) {
                    shuffle($npcs['sub']);
                }
                for ($j = 1; $j <= $npcs['num']; $j++) {
                    $npc = array_merge($npcinit, $npcs);
                    //$npc = $npcinfo[$i];
                    $npc['type'] = $i;
                    $npc['endtime'] = $now;
                    $npc['sNo'] = $j;
                    //if(($npc['mode'] == 1)&&($npc['num'] <= $npc['sub'])){
                    //	$npc = array_merge($npc,$npc[$j]);
                    //} elseif($npc['mode'] == 2) {
                    //	$k = rand(1,$npc['sub']);
                    //	$npc = array_merge($npc,$npc[$k]);
                    //} else {
                    //	$npc = array_merge($npc,$npc[1]);
                    //}
                    $subnum = sizeof($npc['sub']);
                    $sub = $j % $subnum;
                    $npc = array_merge($npc, $npc['sub'][$sub]);
                    $npc['hp'] = $npc['mhp'];
                    $npc['sp'] = $npc['msp'];
                    $npc['exp'] = round(2 * $npc['lvl'] * $GLOBALS['baseexp']);
                    foreach (array('p', 'k', 'g', 'c', 'd', 'f') as $val) {
                        if (!$npc['w' . $val]) {
                            $npc['w' . $val] = $npc['skill'];
                        }
                    }
                    //$npc['wp'] = $npc['wk'] = $npc['wg'] = $npc['wc'] = $npc['wd'] = $npc['wf'] = $npc['skill'];
//.........这里部分代码省略.........
开发者ID:jiangtiandao,项目名称:phpdts,代码行数:101,代码来源:system.func.php

示例13: gexit

if (!$cuser || !$cpass) {
    gexit($_ERROR['no_login'], __FILE__, __LINE__);
}
$result = $db->query("SELECT * FROM {$gtablepre}users WHERE username='{$cuser}'");
if (!$db->num_rows($result)) {
    gexit($_ERROR['login_check'], __FILE__, __LINE__);
}
$udata = $db->fetch_array($result);
if ($udata['password'] != $cpass) {
    gexit($_ERROR['wrong_pw'], __FILE__, __LINE__);
}
if ($udata['groupid'] <= 0) {
    gexit($_ERROR['user_ban'], __FILE__, __LINE__);
}
if ($udata['gold'] < 100) {
    gexit($_ERROR['not_enough_gold'], __FILE__, __LINE__);
}
extract($udata);
if ($udata['cardlist'] == "") {
    $udata['cardlist'] = "0";
}
require config('card', $gamecfg);
//weight
$sw = 1;
$aw = 6;
$bw = 26;
$cw = 100;
$r = rand(1, $cw);
if ($r <= $sw) {
    $arr = $cardindex['S'];
} else {
开发者ID:DTS-China,项目名称:dts,代码行数:31,代码来源:kuji.php

示例14: gexit

if ($udata['roomid'] == '' || $udata['roomid'][0] != 's') {
    gexit('你不在一个房间内。');
}
$roomid = substr($udata['roomid'], 1);
ignore_user_abort(1);
$_POST = gstrfilter($_POST);
if (!file_exists(GAME_ROOT . './gamedata/tmp/rooms/' . $roomid . '.txt')) {
    gexit('房间不存在。');
}
$result = $db->query("SELECT * FROM {$gtablepre}rooms WHERE roomid='{$roomid}'");
if (!$db->num_rows($result)) {
    gexit('房间不存在。');
}
$zz = $db->fetch_array($result);
if ($zz['status'] == 0) {
    gexit('房间不存在。');
}
if ($zz['status'] == 2) {
    ob_clean();
    $gamedata['url'] = 'game.php';
    echo base64_encode(gzencode(compatible_json_encode($gamedata)));
    die;
}
$roomdata = json_decode(mgzdecode(base64_decode(file_get_contents(GAME_ROOT . './gamedata/tmp/rooms/' . $roomid . '.txt'))), 1);
//载入气泡框模块和发光按钮模块
require GAME_ROOT . './include/modules/extra/misc/bubblebox/module.inc.php';
require GAME_ROOT . './include/modules/extra/misc/glowbutton/module.inc.php';
$timestamp = (int) $_POST['timestamp'];
if ($timestamp < $roomdata['timestamp']) {
    room_showdata($roomdata, $cuser);
    die;
开发者ID:winddramon,项目名称:dts,代码行数:31,代码来源:roomupdate.php

示例15: define

<?php

define('CURSCRIPT', 'user_profile');
require './include/common.inc.php';
if ($cuser == '') {
    gexit('请登录');
    die;
}
\achievement_base\show_achievements();
开发者ID:DTS-China,项目名称:dts,代码行数:9,代码来源:testpage.php


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