示例#1
0
function ForceFunc($user_id, $func_id)
{
    setFunc($user_id, $func_id);
    return 1;
}
}
//запуск подмодулей
if (isset($mode)) {
    $action_type = 0;
    switch ($mode) {
        case 601:
            //ForceFunc($user_id,10);
            set_delay_reason_id($user_id, 52);
            include 'quest_engine_types/quest_engine_sudoku.php';
    }
} else {
    // проверка, у Ќѕ÷ ли перс
    if (isset($_GET['npc_id']) and gettype($_GET['npc_id']) == "integer") {
        $owner = myquery("SELECT quest_engine_owners.id FROM quest_engine_owners,game_npc WHERE game_npc.id=quest_owners.npc_id AND game_npc.id=" . $_GET['npc_id'] . " AND game_npc.map_name=" . $char['map_name'] . " and game_npc.xpos=" . $char['xpos'] . " and game_npc.ypos=" . $char['ypos'] . "");
    } else {
        setFunc($user_id, 1);
        echo '<meta http-equiv="refresh" content="0;url=../act.php?main">';
        die;
    }
    if (mysql_num_rows($owner) != 1) {
        //если игрок не попал к Ќѕ÷, отправим его обратно в игру
        OpenTable('title');
        echo '<p align=left>';
        QuoteTable('open');
        echo '<font color=#FF0000>«десь никого нету, кто мог бы дать квест!';
        QuoteTable('close');
        echo '</p>';
        ForceFunc($user_id, 5);
        set_delay_reason_id($user_id, 1);
        setLocation("../act.php?func=main");
        OpenTable('close');
            if ($seat->id_user != $_SESSION['id'] && $seat->reserve_time > $time) {
                $stat = "cantreserveseat";
            } else {
                $stat = "freeseat";
            }
        }
    } else {
        if ($seat->stat == free) {
            $stat = "freeseat";
        } else {
            $stat = "orderseat";
        }
    }
    ?>
	<input type="button" onclick="<?php 
    setFunc($seat, $time, $session);
    ?>
" class = "<?php 
    echo $stat;
    ?>
" value = "<?php 
    echo $seat->num;
    ?>
">
</td>
<?php 
}
?>
</tr>
</table>
</div>
示例#4
0
<?php

include 'inc/config.inc.php';
include 'inc/lib.inc.php';
require_once 'inc/db.inc.php';
if (!defined("MODULE_ID")) {
    define("MODULE_ID", '5');
} else {
    die;
}
include 'inc/lib_session.inc.php';
include 'inc/functions.php';
setFunc($user_id, 5);
if (function_exists("start_debug")) {
    start_debug();
}
if ($_SERVER['PHP_SELF'] != "/act.php") {
    die;
}
if (isset($_GET['func'])) {
    $func = $_GET['func'];
} else {
    $func = 'main';
}
require_once 'inc/template_header.inc.php';
function pay_ref($user_id, $gp_amount)
{
    // реферальные
    $ref_pay = myquery("SELECT * FROM game_invite WHERE invite_id='" . $user_id . "' ");
    if (mysql_num_rows($ref_pay) > 0) {
        $arr_ref_pay = mysql_fetch_array($ref_pay);