battles/magic/un_align.php

13 lines
657 B
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?
session_start();
if(empty($_SESSION['uid'])) { exit('Not access ...'); }
$us = mysql_fetch_array(mysql_query('SELECT `id`, `login`, `align` FROM `users` WHERE `login` = "'.mysql_real_escape_string($_POST['target']).'" LIMIT 1'));
if($user['align'] != 2.99) {
echo 'Вы не можете пользоваться этой магией ...';
} elseif(!isset($us['id'])) {
echo 'Персонаж с логином '.$_POST['target'].' не найден ...';
} else {
mysql_query('UPDATE `users` SET `align` = "0" WHERE `id` = "'.$us['id'].'" LIMIT 1');
echo 'С персонажа '.$us['login'].' была снята склонность ...';
}