Example #1
0
<?php

include 'core/config.php';
include 'core/core.php';
include 'core/game.php';
include 'locales/' . $_SESSION[$shortTitle . 'User']['locale'] . '/gl.php';
$db->query('start transaction');
if (isset($_SESSION[$shortTitle . 'User']['id'], $_GET['action'], $_GET['nodeId'])) {
    $node = new node();
    if ($node->get('id', $_GET['nodeId']) == 'done') {
        $flags = flags::get('name');
        $node->checkAll(time());
        switch ($_GET['action']) {
            case 'add':
                if ($flags['combat']) {
                    if (isset($_POST['name'], $_POST['attackerGroupUnitIds'], $_POST['attackerGroups'])) {
                        foreach ($_POST as $key => $value) {
                            if (!in_array($key, array('name', 'attackerGroupUnitIds', 'attackerGroups', 'attackerFocus'))) {
                                $_POST[$key] = misc::clean($value, 'numeric');
                            } else {
                                if (!in_array($key, array('name', 'attackerFocus'))) {
                                    $nr = count($_POST[$key]);
                                    for ($i = 0; $i < $nr; $i++) {
                                        $_POST[$key][$i] = misc::clean($_POST[$key][$i], 'numeric');
                                    }
                                } else {
                                    $_POST[$key] = misc::clean($value);
                                }
                            }
                        }
                        $target = new node();
Example #2
0
<?php

$flags = new flags();
$array = array();
$all_flags = $flags->get_all_flags();
$flags_by_id = array();
if (array_key_exists('module_name', $options) && array_key_exists('module_id', $options)) {
    foreach ($all_flags as $n => $v) {
        $flags_by_id[$v['flag_type_id']] = $v;
        $flags_by_id[$v['flag_type_id']]['selected'] = false;
    }
    $selected = $flags->get_flags_by_module($options['module_name'], $options['module_id']);
    foreach ($selected as $n => $v) {
        $flags_by_id[$v['flag_type_id']]['selected'] = true;
    }
}
$array['data'] = $flags_by_id;
Example #3
0
<?php

$flags = new flags();
$array = array();
$array['data'] = $flags->get_flags_by_module($options['module_name'], $options['module_id']);
Example #4
0
                         case 'remove':
                             foreach ($_POST['value'] as $value) {
                                 $message = $ui[blacklist::remove($_POST['type'], $value)];
                             }
                             break;
                     }
                 } else {
                     $message = $ui['wrongPassword'];
                 }
             } else {
                 $message = $ui['insufficientData'];
             }
             break;
     }
 }
 $flags = flags::get('id');
 $flagNames = '';
 $flagValues = array();
 foreach ($flags as $key => $flag) {
     $flagNames .= '<option value="' . $flag['name'] . '">' . $ui[$flag['name']] . '</option>';
     $flagValues[$key] = '"' . $flag['value'] . '"';
 }
 $blacklist = array('ip' => blacklist::get('ip'), 'email' => blacklist::get('email'));
 $temp = '';
 foreach ($blacklist['ip'] as $item) {
     $temp .= '<option value="' . $item['value'] . '">' . $item['value'] . '</option>';
 }
 $blacklist['ip'] = $temp;
 $temp = '';
 foreach ($blacklist['email'] as $item) {
     $temp .= '<option value="' . $item['value'] . '">' . $item['value'] . '</option>';