info['id']);
$rang = 'Модератор';
if (isset($_GET['remod'])) {
if ($_GET['remod'] == 1) {
$_SESSION['remod'] = 3;
} else {
$_SESSION['remod'] = 1;
}
}
$zv = [1 => 'light', 2 => 'admin', 3 => 'dark'];
$merror = '';
$mod_login = $u->info['login'];
if ($u->info['invise'] > 0) {
$mod_login = "Невидимка";
}
$uer = '';
if (!empty($_POST['logingo'])) {
$moderation = new ModFactory(
strip_tags($_POST['logingo']),
empty($_POST['modReason']) ? '' : $_POST['modReason'],
$u->info['room'],
);
$administration = new AdmFactory(
strip_tags($_POST['logingo'])
);
if (!empty($_POST['silence']) && !empty($_POST['time'])) {
$moderation->silence($_POST['time']);
} elseif (!empty($_POST['unsilence'])) {
$moderation->unsilence();
} elseif (!empty($_POST['prison']) && !empty($_POST['time'])) {
$moderation->prison($_POST['time']);
} elseif (!empty($_POST['unprison'])) {
$moderation->unprison();
} elseif (!empty($_POST['depersonalize']) && !empty($_POST['time'])) {
$moderation->depersonalize($_POST['time']);
} elseif (!empty($_POST['undepersonalize'])) {
$moderation->undepersonalize();
} elseif (!empty($_POST['ban'])) {
$moderation->ban();
} elseif (!empty($_POST['unban'])) {
$moderation->unban();
} elseif (!empty($_POST['addmoderator'])) {
$administration->addmoderator();
} elseif (!empty($_POST['deletemoderator'])) {
$administration->removemoderator();
} elseif (!empty($_POST['changegender'])) {
$administration->changegender();
} elseif (!empty($_POST['changelogin']) && !empty($_POST['newLogin'])) {
$administration->changelogin($_POST['newLogin']);
} elseif (!empty($_POST['giveitem']) && !empty($_POST['itemId'])) {
$administration->additem((int)$_POST['itemId']);
} elseif (!empty($_POST['kickfrombattle'])) {
$administration->kickfrombattle();
} elseif (!empty($_POST['toggleinvisibility'])) {
$administration->toggleinvisibility();
}
if (!empty($moderation->status)) {
$uer = $moderation->status;
} elseif (!empty($administration->status)) {
$uer = $administration->status;
}
}
if (!empty($_POST['marrypartner1']) && !empty($_POST['marrypartner2'])) {
if (!empty($_POST['marry'])) {
$uer = 'marry: Not available';
} elseif (!empty($_POST['unmarry'])) {
$uer = 'unmarry: Not available';
}
}
echo '';
$p = mysql_fetch_array(mysql_query('SELECT * FROM `moder` WHERE `align` = "' . $u->info['align'] . '" LIMIT 1'));
if (!$m->isModerator && $u->info['align'] != 1 && $u->info['align'] != 3) {
return; #########################
}
$a = floor($p['align']);
if ($u->info['admin'] > 0) {
$zv = $zv[2];
} else {
$zv = $zv[$a];
}
$go = 0;
if (isset($_GET['go'])) {
$go = round($_GET['go']);
}
if ($go == 3 && $u->info['admin'] > 0) {
?>
info['admin'] > 0) {
if (isset($_POST['q_name'])) {
$qd = [];
/* Array ([q_act_atr_1] => 0 [q_act_val_1] => [q_tr_atr_1] => 0 [q_tr_val_1] => [q_ng_atr_1] => 0 [q_ng_val_1] => [q_nk_atr_NaN] => 0
[q_nk_val_NaN] => [q_info] => test описание [q_line1] => 1 [q_line2] => 1 [q_fast] => 1 [q_fast_city] => capitalcity [q_align1] => 1 [q_align2] => 1 [q_align3] => 1 ) */
$qd['name'] = $_POST['q_name'];
$qd['lvl'] = explode('-', $_POST['q_lvl']);
$qd['info'] = $_POST['q_info'];
if ($_POST['q_line1'] == 1) {
$qd['line'] = $_POST['q_line2'];
}
if ($_POST['q_fast'] == 1) {
$qd['city'] = $_POST['q_fast_city'];
$gd['fast'] = 1;
}
if ($_POST['align1'] == 1) {
$qd['align'] = 1;
} elseif ($_POST['align2'] == 1) {
$qd['align'] = 3;
} elseif ($_POST['align3'] == 1) {
$qd['align'] = 7;
} elseif ($_POST['align4'] == 1) {
$qd['align'] = 2;
}
$i = 1;
while ($i != -1) {
if (isset($_POST['q_act_atr_' . $i])) {
if ($_POST['q_act_val_' . $i] != '') {
$qd['act_date'] .= $_POST['q_act_atr_' . $i] . ':=:' . $_POST['q_act_val_' . $i] . ':|:';
}
} else {
$i = -2;
$qd['act_date'] = trim($qd['act_date'], ':|:');
}
$i++;
}
$i = 1;
while ($i != -1) {
if (isset($_POST['q_tr_atr_' . $i])) {
if ($_POST['q_tr_val_' . $i] != '') {
$qd['tr_date'] .= $_POST['q_tr_atr_' . $i] . ':=:' . $_POST['q_tr_val_' . $i] . ':|:';
}
} else {
$i = -2;
$qd['tr_date'] = trim($qd['tr_date'], ':|:');
}
$i++;
}
$i = 1;
while ($i != -1) {
if (isset($_POST['q_ng_atr_' . $i])) {
if ($_POST['q_ng_val_' . $i] != '') {
$qd['win_date'] .= $_POST['q_ng_atr_' . $i] . ':=:' . $_POST['q_ng_val_' . $i] . ':|:';
}
} else {
$i = -2;
$qd['win_date'] = trim($qd['win_date'], ':|:');
}
$i++;
}
$i = 1;
while ($i != -1) {
if (isset($_POST['q_nk_atr_' . $i])) {
if ($_POST['q_nk_val_' . $i] != '') {
$qd['lose_date'] .= $_POST['q_nk_atr_' . $i] . ':=:' . $_POST['q_nk_val_' . $i] . ':|:';
}
} else {
$i = -2;
$qd['lose_date'] = trim($qd['lose_date'], ':|:');
}
$i++;
}
mysql_query(
'INSERT INTO `quests` (`name`,`min_lvl`,`max_lvl`,`tr_date`,`act_date`,`win_date`,`lose_date`,`info`,`line`,`align`,`city`,`fast`) VALUES (
"' . mysql_real_escape_string($qd['name']) . '","' . mysql_real_escape_string(
$qd['lvl'][0]
) . '","' . mysql_real_escape_string($qd['lvl'][1]) . '",
"' . mysql_real_escape_string($qd['tr_date']) . '","' . mysql_real_escape_string(
$qd['act_date']
) . '","' . mysql_real_escape_string($qd['win_date']) . '",
"' . mysql_real_escape_string($qd['lose_date']) . '","' . mysql_real_escape_string(
$qd['info']
) . '","' . mysql_real_escape_string($qd['line']) . '",
"' . mysql_real_escape_string($qd['align']) . '","' . mysql_real_escape_string(
$qd['city']
) . '","' . mysql_real_escape_string($qd['fast']) . '")'
);
}
?>
Текстовое поле
Редактор заданий |
|
= $pl['name'] ?>
|
|
Описание: = $pl['info'] ?> |
|