Пример #1
0
if (preg_match("/\\S{100,}/", $text)) {
    print_page($cw['error'], $st[908] . " ;-)");
}
//send a message to each of the clan mates.
if ($target_id == -2) {
    db2("select login_id from {$db_name}_users where clan_id='{$clan_id}' && clan_id > 0");
    $target_member = dbr2(1);
    while ($target_member) {
        send_message($target_member['login_id'], $text);
        send_templated_email($target_member['login_id'], 'message');
        $target_member = dbr2(1);
    }
    $error_str = $st[909];
    //send message to all players in the game
} elseif ($target_id == -4) {
    $error_str = message_all_players($text, $db_name, $st[910], "<b class=\"b1\">" . $cw['admin'] . "</b>");
    //send message to clan forum
} elseif ($target_id == -5 && $clan_id > 0) {
    send_message($target_id, $text, $clan_id);
    $error_str = $cw['message_sent'] . ".";
    //send message to central forum
} elseif ($target_id == -99 || $target_id == -50) {
    if ($user['login_id'] == OWNER_ID) {
        //server admin
        $sender_name = "<b class=\"b1\">" . $p_user['login_name'] . "</b> (" . $cw['server_admin'] . ")";
    } elseif ($user['login_id'] == 1) {
        //admin
        $sender_name = "<b class=\"b1\">" . $cw['admin'] . "</b> - ({$game_info['admin_name']} - {$game_info['name']})";
    } else {
        //regular player
        $sender_name = "<b class=\"b1\">" . $p_user['login_name'] . "</b> - {$game_info['name']}";
Пример #2
0
    } else {
        $target = (int) $_POST['target'];
        if ($target == -1) {
            $send_to = "All the Admins";
        } elseif ($target == -2) {
            $send_to = "all the players in all the games";
        } elseif ($target == -3) {
            $send_to = "all the game forums";
        } else {
            $send_to = "all players";
        }
        db("select game_id, db_name from se_games");
        while ($dest = dbr(1)) {
            //message only to recipients of this one game, or all players in all games
            if ($target > 0 && $dest['game_id'] == $target || $target == -2) {
                $out_str .= "<p />" . message_all_players($text, $dest['db_name'], $send_to, "<font color='lime'>The Server Operator</font>");
            } elseif ($target == -1 || $target == -3) {
                //all admins or all forums
                if ($target == -1) {
                    $dest_id = 1;
                    $extra_txt = mysql_escape_string("Message to <b class='b1'>All Admins</b> from <font color='lime'>The Server Operator</font>:<p /> " . $text);
                } else {
                    $dest_id = -1;
                    $extra_txt = mysql_escape_string("Message to <b class='b1'>All Game Forums</b> from <font color='lime'>The Server Operator</font>:<p /> " . $text);
                }
                dbn("insert into {$dest['db_name']}_messages (timestamp,sender_name, sender_id, login_id, text) values(" . time() . ",'{$user['login_name']}','{$user['login_id']}','{$dest_id}','{$extra_txt}')");
            }
        }
    }
    //empty the error log.
} elseif (isset($_REQUEST['empty_log'])) {