27 lines
771 B
PHP
27 lines
771 B
PHP
<?
|
|
if(!defined('GAME'))
|
|
{
|
|
die();
|
|
}
|
|
|
|
if($u->info['admin'] > 0)
|
|
{
|
|
$uu = mysql_fetch_array(mysql_query('SELECT * FROM `users` WHERE `login` = "'.mysql_real_escape_string($_POST['logingo']).'" LIMIT 1'));
|
|
if(isset($uu['id']))
|
|
{
|
|
if( $_POST['logingo2'] < 0 ) {
|
|
$_POST['logingo2'] = 0;
|
|
}
|
|
$upd = mysql_query('UPDATE `stats` SET `exp` = `exp` + "'.mysql_real_escape_string((int)$_POST['logingo2']).'" WHERE `id` = "'.$uu['id'].'" LIMIT 1');
|
|
if($upd) {
|
|
$uer = 'Âû ðèñàíóëè îïûò ïåðñîíàæó "'.$uu['login'].'" +'.((int)$_POST['logingo2']).' åä.';
|
|
}else{
|
|
$uer = 'Íå óäàëîñü èñïîëüçîâàòü äàííîå çàêëÿòèå';
|
|
}
|
|
}else{
|
|
$uer = 'Ïåðñîíàæ íå íàéäåí â ýòîì ãîðîäå';
|
|
}
|
|
}else{
|
|
$uer = 'Ó Âàñ íåò ïðàâ íà èñïîëüçîâàíèå äàííîãî çàêëÿòèÿ';
|
|
}
|
|
?>
|