Deleted sex
from users
table.
This commit is contained in:
parent
8a1a313dca
commit
25011bd254
@ -596,46 +596,112 @@ class fbattle
|
|||||||
$bmfkrit1 = 0; //модификаторы
|
$bmfkrit1 = 0; //модификаторы
|
||||||
// fixme что-то сделать с этой хернёй. рассчёт модификаторов работает не так!
|
// fixme что-то сделать с этой хернёй. рассчёт модификаторов работает не так!
|
||||||
if ($this->user['sila'] >= 25) $bmfud += 1;
|
if ($this->user['sila'] >= 25) $bmfud += 1;
|
||||||
if ($this->user['sila'] >= 50) $bmfud += 2; if ($this->user['sila'] >= 50) $bmfauv += 25; if ($this->user['sila'] >= 50) $bmfakrit += 25;
|
if ($this->user['sila'] >= 50) $bmfud += 2;
|
||||||
if ($this->user['sila'] >= 75) $bmfud += 3; if ($this->user['sila'] >= 75) $bmfauv += 30; if ($this->user['sila'] >= 75) $bmfakrit += 30;
|
if ($this->user['sila'] >= 50) $bmfauv += 25;
|
||||||
if ($this->user['sila'] >= 100) $bmfud += 5; if ($this->user['sila'] >= 100) $bmfauv += 40; if ($this->user['sila'] >= 100) $bmfakrit += 40;
|
if ($this->user['sila'] >= 50) $bmfakrit += 25;
|
||||||
if ($this->user['sila'] >= 125) $bmfud += 11; if ($this->user['sila'] >= 125) $bmfauv += 50; if ($this->user['sila'] >= 125) $bmfakrit += 50;
|
if ($this->user['sila'] >= 75) $bmfud += 3;
|
||||||
if ($this->user['lovk'] >= 25) $bmfauv += 25; if ($this->user['lovk'] >= 25) $bmfakrit += 15;
|
if ($this->user['sila'] >= 75) $bmfauv += 30;
|
||||||
if ($this->user['lovk'] >= 50) $bmfuv += 25; if ($this->user['lovk'] >= 50) $bmfauv += 25; if ($this->user['lovk'] >= 50) $bmfakrit += 10;
|
if ($this->user['sila'] >= 75) $bmfakrit += 30;
|
||||||
if ($this->user['lovk'] >= 75) $bmfuv += 40; if ($this->user['lovk'] >= 75) $bmfauv += 30; if ($this->user['lovk'] >= 75) $bmfakrit += 20;
|
if ($this->user['sila'] >= 100) $bmfud += 5;
|
||||||
if ($this->user['lovk'] >= 100) $bmfuv += 50; if ($this->user['lovk'] >= 100) $bmfauv += 40; if ($this->user['lovk'] >= 100) $bmfakrit += 30;
|
if ($this->user['sila'] >= 100) $bmfauv += 40;
|
||||||
if ($this->user['lovk'] >= 125) $bmfuv += 65; if ($this->user['lovk'] >= 125) $bmfauv += 55; if ($this->user['lovk'] >= 125) $bmfakrit += 45;
|
if ($this->user['sila'] >= 100) $bmfakrit += 40;
|
||||||
|
if ($this->user['sila'] >= 125) $bmfud += 11;
|
||||||
|
if ($this->user['sila'] >= 125) $bmfauv += 50;
|
||||||
|
if ($this->user['sila'] >= 125) $bmfakrit += 50;
|
||||||
|
if ($this->user['lovk'] >= 25) $bmfauv += 25;
|
||||||
|
if ($this->user['lovk'] >= 25) $bmfakrit += 15;
|
||||||
|
if ($this->user['lovk'] >= 50) $bmfuv += 25;
|
||||||
|
if ($this->user['lovk'] >= 50) $bmfauv += 25;
|
||||||
|
if ($this->user['lovk'] >= 50) $bmfakrit += 10;
|
||||||
|
if ($this->user['lovk'] >= 75) $bmfuv += 40;
|
||||||
|
if ($this->user['lovk'] >= 75) $bmfauv += 30;
|
||||||
|
if ($this->user['lovk'] >= 75) $bmfakrit += 20;
|
||||||
|
if ($this->user['lovk'] >= 100) $bmfuv += 50;
|
||||||
|
if ($this->user['lovk'] >= 100) $bmfauv += 40;
|
||||||
|
if ($this->user['lovk'] >= 100) $bmfakrit += 30;
|
||||||
|
if ($this->user['lovk'] >= 125) $bmfuv += 65;
|
||||||
|
if ($this->user['lovk'] >= 125) $bmfauv += 55;
|
||||||
|
if ($this->user['lovk'] >= 125) $bmfakrit += 45;
|
||||||
if ($this->user['inta'] >= 25) $bmfauv += 15;
|
if ($this->user['inta'] >= 25) $bmfauv += 15;
|
||||||
if ($this->user['inta'] >= 50) $bmfkrit += 20; if ($this->user['inta'] >= 50) $bmfauv += 25; if ($this->user['inta'] >= 50) $bmfakrit += 25;
|
if ($this->user['inta'] >= 50) $bmfkrit += 20;
|
||||||
if ($this->user['inta'] >= 75) $bmfkrit += 30; if ($this->user['inta'] >= 75) $bmfauv += 30; if ($this->user['inta'] >= 75) $bmfakrit += 30;
|
if ($this->user['inta'] >= 50) $bmfauv += 25;
|
||||||
if ($this->user['inta'] >= 100) $bmfkrit += 40; if ($this->user['inta'] >= 100) $bmfauv += 40; if ($this->user['inta'] >= 100) $bmfakrit += 40;
|
if ($this->user['inta'] >= 50) $bmfakrit += 25;
|
||||||
if ($this->user['inta'] >= 125) $bmfkrit += 55; if ($this->user['inta'] >= 125) $bmfauv += 55; if ($this->user['inta'] >= 125) $bmfakrit += 55;
|
if ($this->user['inta'] >= 75) $bmfkrit += 30;
|
||||||
|
if ($this->user['inta'] >= 75) $bmfauv += 30;
|
||||||
|
if ($this->user['inta'] >= 75) $bmfakrit += 30;
|
||||||
|
if ($this->user['inta'] >= 100) $bmfkrit += 40;
|
||||||
|
if ($this->user['inta'] >= 100) $bmfauv += 40;
|
||||||
|
if ($this->user['inta'] >= 100) $bmfakrit += 40;
|
||||||
|
if ($this->user['inta'] >= 125) $bmfkrit += 55;
|
||||||
|
if ($this->user['inta'] >= 125) $bmfauv += 55;
|
||||||
|
if ($this->user['inta'] >= 125) $bmfakrit += 55;
|
||||||
if ($this->user['vinos'] >= 25) $bmfbron += 2;
|
if ($this->user['vinos'] >= 25) $bmfbron += 2;
|
||||||
if ($this->user['vinos'] >= 50) $bmfauv += 25; if ($this->user['vinos'] >= 50) $bmfbron += 2; if ($this->user['vinos'] >= 50) $bmfakrit += 25;
|
if ($this->user['vinos'] >= 50) $bmfauv += 25;
|
||||||
if ($this->user['vinos'] >= 75) $bmfauv += 30; if ($this->user['vinos'] >= 75) $bmfbron += 3; if ($this->user['vinos'] >= 75) $bmfakrit += 30;
|
if ($this->user['vinos'] >= 50) $bmfbron += 2;
|
||||||
if ($this->user['vinos'] >= 100) $bmfauv += 40; if ($this->user['vinos'] >= 100) $bmfbron += 5; if ($this->user['vinos'] >= 100) $bmfakrit += 40;
|
if ($this->user['vinos'] >= 50) $bmfakrit += 25;
|
||||||
if ($this->user['vinos'] >= 125) $bmfauv += 55; if ($this->user['vinos'] >= 125) $bmfbron += 8; if ($this->user['vinos'] >= 125) $bmfakrit += 55;
|
if ($this->user['vinos'] >= 75) $bmfauv += 30;
|
||||||
|
if ($this->user['vinos'] >= 75) $bmfbron += 3;
|
||||||
|
if ($this->user['vinos'] >= 75) $bmfakrit += 30;
|
||||||
|
if ($this->user['vinos'] >= 100) $bmfauv += 40;
|
||||||
|
if ($this->user['vinos'] >= 100) $bmfbron += 5;
|
||||||
|
if ($this->user['vinos'] >= 100) $bmfakrit += 40;
|
||||||
|
if ($this->user['vinos'] >= 125) $bmfauv += 55;
|
||||||
|
if ($this->user['vinos'] >= 125) $bmfbron += 8;
|
||||||
|
if ($this->user['vinos'] >= 125) $bmfakrit += 55;
|
||||||
|
|
||||||
if ($this->enemyhar['sila'] >= 25) $bmfud += 1;
|
if ($this->enemyhar['sila'] >= 25) $bmfud += 1;
|
||||||
if ($this->enemyhar['sila'] >= 50) $bmfud += 2; if ($this->enemyhar['sila'] >= 50) $bmfauv += 25; if ($this->enemyhar['sila'] >= 50) $bmfakrit += 25;
|
if ($this->enemyhar['sila'] >= 50) $bmfud += 2;
|
||||||
if ($this->enemyhar['sila'] >= 75) $bmfud += 3; if ($this->enemyhar['sila'] >= 75) $bmfauv += 30; if ($this->enemyhar['sila'] >= 75) $bmfakrit += 30;
|
if ($this->enemyhar['sila'] >= 50) $bmfauv += 25;
|
||||||
if ($this->enemyhar['sila'] >= 100) $bmfud += 5; if ($this->enemyhar['sila'] >= 100) $bmfauv += 40; if ($this->enemyhar['sila'] >= 100) $bmfakrit += 40;
|
if ($this->enemyhar['sila'] >= 50) $bmfakrit += 25;
|
||||||
if ($this->enemyhar['sila'] >= 125) $bmfud += 11; if ($this->enemyhar['sila'] >= 125) $bmfauv += 65; if ($this->enemyhar['sila'] >= 125) $bmfakrit += 65;
|
if ($this->enemyhar['sila'] >= 75) $bmfud += 3;
|
||||||
if ($this->enemyhar['lovk'] >= 25) $bmfauv += 25; if ($this->enemyhar['lovk'] >= 25) $bmfakrit += 15;
|
if ($this->enemyhar['sila'] >= 75) $bmfauv += 30;
|
||||||
if ($this->enemyhar['lovk'] >= 50) $bmfuv += 25; if ($this->enemyhar['lovk'] >= 50) $bmfauv += 25; if ($this->enemyhar['lovk'] >= 50) $bmfakrit += 10;
|
if ($this->enemyhar['sila'] >= 75) $bmfakrit += 30;
|
||||||
if ($this->enemyhar['lovk'] >= 75) $bmfuv += 40; if ($this->enemyhar['lovk'] >= 75) $bmfauv += 30; if ($this->enemyhar['lovk'] >= 75) $bmfakrit += 20;
|
if ($this->enemyhar['sila'] >= 100) $bmfud += 5;
|
||||||
if ($this->enemyhar['lovk'] >= 100) $bmfuv += 50; if ($this->enemyhar['lovk'] >= 100) $bmfauv += 40; if ($this->enemyhar['lovk'] >= 100) $bmfakrit += 30;
|
if ($this->enemyhar['sila'] >= 100) $bmfauv += 40;
|
||||||
if ($this->enemyhar['lovk'] >= 125) $bmfuv += 65; if ($this->enemyhar['lovk'] >= 125) $bmfauv += 55; if ($this->enemyhar['lovk'] >= 125) $bmfakrit += 45;
|
if ($this->enemyhar['sila'] >= 100) $bmfakrit += 40;
|
||||||
|
if ($this->enemyhar['sila'] >= 125) $bmfud += 11;
|
||||||
|
if ($this->enemyhar['sila'] >= 125) $bmfauv += 65;
|
||||||
|
if ($this->enemyhar['sila'] >= 125) $bmfakrit += 65;
|
||||||
|
if ($this->enemyhar['lovk'] >= 25) $bmfauv += 25;
|
||||||
|
if ($this->enemyhar['lovk'] >= 25) $bmfakrit += 15;
|
||||||
|
if ($this->enemyhar['lovk'] >= 50) $bmfuv += 25;
|
||||||
|
if ($this->enemyhar['lovk'] >= 50) $bmfauv += 25;
|
||||||
|
if ($this->enemyhar['lovk'] >= 50) $bmfakrit += 10;
|
||||||
|
if ($this->enemyhar['lovk'] >= 75) $bmfuv += 40;
|
||||||
|
if ($this->enemyhar['lovk'] >= 75) $bmfauv += 30;
|
||||||
|
if ($this->enemyhar['lovk'] >= 75) $bmfakrit += 20;
|
||||||
|
if ($this->enemyhar['lovk'] >= 100) $bmfuv += 50;
|
||||||
|
if ($this->enemyhar['lovk'] >= 100) $bmfauv += 40;
|
||||||
|
if ($this->enemyhar['lovk'] >= 100) $bmfakrit += 30;
|
||||||
|
if ($this->enemyhar['lovk'] >= 125) $bmfuv += 65;
|
||||||
|
if ($this->enemyhar['lovk'] >= 125) $bmfauv += 55;
|
||||||
|
if ($this->enemyhar['lovk'] >= 125) $bmfakrit += 45;
|
||||||
if ($this->enemyhar['inta'] >= 25) $bmfauv += 15;
|
if ($this->enemyhar['inta'] >= 25) $bmfauv += 15;
|
||||||
if ($this->enemyhar['inta'] >= 50) $bmfkrit += 20; if ($this->enemyhar['inta'] >= 50) $bmfauv += 25; if ($this->enemyhar['inta'] >= 50) $bmfakrit += 25;
|
if ($this->enemyhar['inta'] >= 50) $bmfkrit += 20;
|
||||||
if ($this->enemyhar['inta'] >= 75) $bmfkrit += 30; if ($this->enemyhar['inta'] >= 75) $bmfauv += 30; if ($this->enemyhar['inta'] >= 75) $bmfakrit += 30;
|
if ($this->enemyhar['inta'] >= 50) $bmfauv += 25;
|
||||||
if ($this->enemyhar['inta'] >= 100) $bmfkrit += 40; if ($this->enemyhar['inta'] >= 100) $bmfauv += 40; if ($this->enemyhar['inta'] >= 100) $bmfakrit += 40;
|
if ($this->enemyhar['inta'] >= 50) $bmfakrit += 25;
|
||||||
if ($this->enemyhar['inta'] >= 125) $bmfkrit += 55; if ($this->enemyhar['inta'] >= 125) $bmfauv += 55; if ($this->enemyhar['inta'] >= 125) $bmfakrit += 55;
|
if ($this->enemyhar['inta'] >= 75) $bmfkrit += 30;
|
||||||
|
if ($this->enemyhar['inta'] >= 75) $bmfauv += 30;
|
||||||
|
if ($this->enemyhar['inta'] >= 75) $bmfakrit += 30;
|
||||||
|
if ($this->enemyhar['inta'] >= 100) $bmfkrit += 40;
|
||||||
|
if ($this->enemyhar['inta'] >= 100) $bmfauv += 40;
|
||||||
|
if ($this->enemyhar['inta'] >= 100) $bmfakrit += 40;
|
||||||
|
if ($this->enemyhar['inta'] >= 125) $bmfkrit += 55;
|
||||||
|
if ($this->enemyhar['inta'] >= 125) $bmfauv += 55;
|
||||||
|
if ($this->enemyhar['inta'] >= 125) $bmfakrit += 55;
|
||||||
if ($this->enemyhar['vinos'] >= 25) $bmfbron += 2;
|
if ($this->enemyhar['vinos'] >= 25) $bmfbron += 2;
|
||||||
if ($this->enemyhar['vinos'] >= 50) $bmfauv += 25; if ($this->enemyhar['vinos'] >= 50) $bmfbron += 2; if ($this->enemyhar['vinos'] >= 50) $bmfakrit += 25;
|
if ($this->enemyhar['vinos'] >= 50) $bmfauv += 25;
|
||||||
if ($this->enemyhar['vinos'] >= 75) $bmfauv += 30; if ($this->enemyhar['vinos'] >= 75) $bmfbron += 3; if ($this->enemyhar['vinos'] >= 75) $bmfakrit += 30;
|
if ($this->enemyhar['vinos'] >= 50) $bmfbron += 2;
|
||||||
if ($this->enemyhar['vinos'] >= 100) $bmfauv += 40; if ($this->enemyhar['vinos'] >= 100) $bmfbron += 5; if ($this->enemyhar['vinos'] >= 100) $bmfakrit += 40;
|
if ($this->enemyhar['vinos'] >= 50) $bmfakrit += 25;
|
||||||
if ($this->enemyhar['vinos'] >= 125) $bmfauv += 55; if ($this->enemyhar['vinos'] >= 125) $bmfbron += 8; if ($this->enemyhar['vinos'] >= 125) $bmfakrit += 55;
|
if ($this->enemyhar['vinos'] >= 75) $bmfauv += 30;
|
||||||
|
if ($this->enemyhar['vinos'] >= 75) $bmfbron += 3;
|
||||||
|
if ($this->enemyhar['vinos'] >= 75) $bmfakrit += 30;
|
||||||
|
if ($this->enemyhar['vinos'] >= 100) $bmfauv += 40;
|
||||||
|
if ($this->enemyhar['vinos'] >= 100) $bmfbron += 5;
|
||||||
|
if ($this->enemyhar['vinos'] >= 100) $bmfakrit += 40;
|
||||||
|
if ($this->enemyhar['vinos'] >= 125) $bmfauv += 55;
|
||||||
|
if ($this->enemyhar['vinos'] >= 125) $bmfbron += 8;
|
||||||
|
if ($this->enemyhar['vinos'] >= 125) $bmfakrit += 55;
|
||||||
|
|
||||||
//*************
|
//*************
|
||||||
|
|
||||||
@ -764,12 +830,24 @@ class fbattle
|
|||||||
{
|
{
|
||||||
$wep = db::c()->query('SELECT `otdel` FROM `inventory` WHERE `id` = ?i', $idwep)->fetch_assoc();
|
$wep = db::c()->query('SELECT `otdel` FROM `inventory` WHERE `id` = ?i', $idwep)->fetch_assoc();
|
||||||
switch ($wep['otdel']) {
|
switch ($wep['otdel']) {
|
||||||
case 1: return "noj"; break;
|
case 1:
|
||||||
case 11: return "topor"; break;
|
return "noj";
|
||||||
case 12: return "dubina"; break;
|
break;
|
||||||
case 13: return "mech"; break;
|
case 11:
|
||||||
case 14: return "priklad"; break; //???
|
return "topor";
|
||||||
default: return "kulak"; break;
|
break;
|
||||||
|
case 12:
|
||||||
|
return "dubina";
|
||||||
|
break;
|
||||||
|
case 13:
|
||||||
|
return "mech";
|
||||||
|
break;
|
||||||
|
case 14:
|
||||||
|
return "priklad";
|
||||||
|
break; //???
|
||||||
|
default:
|
||||||
|
return "kulak";
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -780,7 +858,7 @@ class fbattle
|
|||||||
*/
|
*/
|
||||||
function get_chanse($persent)
|
function get_chanse($persent)
|
||||||
{
|
{
|
||||||
if (rand(1, 100) <= $persent ) {
|
if (rand(1, 100) <= $persent) {
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
@ -1041,11 +1119,11 @@ class fbattle
|
|||||||
foreach ($this->battle as $k => $v) {
|
foreach ($this->battle as $k => $v) {
|
||||||
if ($k > _BOTSEPARATOR_) {
|
if ($k > _BOTSEPARATOR_) {
|
||||||
$bots = mysql_fetch_array(mysql_query('SELECT * FROM `bots` WHERE `id` = ' . $k . ' LIMIT 1;'));
|
$bots = mysql_fetch_array(mysql_query('SELECT * FROM `bots` WHERE `id` = ' . $k . ' LIMIT 1;'));
|
||||||
$us = mysql_fetch_array(mysql_query('SELECT `hp`, `maxhp`, `sex`,`id`,`battle` FROM `users` WHERE `id` = ' . $bots['prototype'] . ' LIMIT 1;'));
|
$us = mysql_fetch_array(mysql_query('SELECT `hp`, `maxhp`, `id`,`battle` FROM `users` WHERE `id` = ' . $bots['prototype'] . ' LIMIT 1;'));
|
||||||
$us['hp'] = $bots['hp'];
|
$us['hp'] = $bots['hp'];
|
||||||
$us['battle'] = $bots['battle'];
|
$us['battle'] = $bots['battle'];
|
||||||
} else {
|
} else {
|
||||||
$us = mysql_fetch_array(mysql_query('SELECT `hp`, `maxhp`, `sex`,`id`,`battle` FROM `users` WHERE `id` = ' . $k . ' LIMIT 1;'));
|
$us = mysql_fetch_array(mysql_query('SELECT `hp`, `maxhp`, `id`,`battle` FROM `users` WHERE `id` = ' . $k . ' LIMIT 1;'));
|
||||||
}
|
}
|
||||||
if ($us && (int)$us['hp'] <= 0) {
|
if ($us && (int)$us['hp'] <= 0) {
|
||||||
//$battle_data = mysql_fetch_array(mysql_query ('SELECT * FROM `battle` WHERE `id` = '.$this->user['battle'].' LIMIT 1;'));
|
//$battle_data = mysql_fetch_array(mysql_query ('SELECT * FROM `battle` WHERE `id` = '.$this->user['battle'].' LIMIT 1;'));
|
||||||
@ -1054,11 +1132,9 @@ class fbattle
|
|||||||
//$war=array_keys($war);
|
//$war=array_keys($war);
|
||||||
// if(in_array($k,$war)) {
|
// if(in_array($k,$war)) {
|
||||||
unset($this->battle[$k]);
|
unset($this->battle[$k]);
|
||||||
if ($us['sex'] == 1) {
|
|
||||||
$this->add_log('<span class=date>' . date("H:i") . '</span> ' . nick5($k, 'b') . ' проиграл бой!<BR>');
|
$this->add_log('<span class=date>' . date("H:i") . '</span> ' . nick5($k, 'b') . ' проиграл бой!<BR>');
|
||||||
} else {
|
|
||||||
$this->add_log('<span class=date>' . date("H:i") . '</span> ' . nick5($k, 'b') . ' проиграла бой!<BR>');
|
|
||||||
}
|
|
||||||
mysql_query('UPDATE `users` SET `hp` = 0, `fullhptime` = ' . time() . ' WHERE `id` = \'' . $k . '\' LIMIT 1;');
|
mysql_query('UPDATE `users` SET `hp` = 0, `fullhptime` = ' . time() . ' WHERE `id` = \'' . $k . '\' LIMIT 1;');
|
||||||
foreach ($this->battle as $kak => $vav) {
|
foreach ($this->battle as $kak => $vav) {
|
||||||
unset($this->battle[$kak][$k]);
|
unset($this->battle[$kak][$k]);
|
||||||
@ -1952,7 +2028,7 @@ class fbattle
|
|||||||
$mfit = 1.5;
|
$mfit = 1.5;
|
||||||
}
|
}
|
||||||
|
|
||||||
$pls = count($this->t1) + count($this->t2);
|
$pls = count($this->t1) + count($this->t2);
|
||||||
if ($pls > 2) {
|
if ($pls > 2) {
|
||||||
$mfbot = $bot_active == true ? 0.3 : 1;
|
$mfbot = $bot_active == true ? 0.3 : 1;
|
||||||
$mfbot2 = $bot_def == true ? 0.7 : 1;
|
$mfbot2 = $bot_def == true ? 0.7 : 1;
|
||||||
|
File diff suppressed because one or more lines are too long
@ -339,7 +339,7 @@ if($_GET['start']){
|
|||||||
$level = 0;
|
$level = 0;
|
||||||
while($nana = mysql_fetch_array($zax)) {
|
while($nana = mysql_fetch_array($zax)) {
|
||||||
$n_login = $nana['login'];
|
$n_login = $nana['login'];
|
||||||
$rty = mysql_query("SELECT `id`, `level`, `login`, `sex`, `shadow`, `money`, `hp` FROM `users` WHERE `login` = '$n_login' LIMIT 1");
|
$rty = mysql_query("SELECT `id`, `level`, `login`, `shadow`, `money`, `hp` FROM `users` WHERE `login` = '$n_login' LIMIT 1");
|
||||||
$esth = mysql_fetch_array($rty);
|
$esth = mysql_fetch_array($rty);
|
||||||
if($esth['hp'] <= 0) { $esth['hp'] = 1; mysql_query('UPDATE `users` SET `hp` = "'.$esth['hp'].'" WHERE `id` = "'.$esth['id'].'" LIMIT 1'); }
|
if($esth['hp'] <= 0) { $esth['hp'] = 1; mysql_query('UPDATE `users` SET `hp` = "'.$esth['hp'].'" WHERE `id` = "'.$esth['id'].'" LIMIT 1'); }
|
||||||
if($nana['fee']) {
|
if($nana['fee']) {
|
||||||
@ -366,7 +366,7 @@ if($_GET['start']){
|
|||||||
$vrem = 30*60+time();
|
$vrem = 30*60+time();
|
||||||
|
|
||||||
include_once("cavedata.php");
|
include_once("cavedata.php");
|
||||||
mysql_query("INSERT INTO `caveparties` SET `user` = '$esth[id]', `leader` = '$user[id]', `login` = '$esth[login]', `shadow` = '$esth[sex]/0.png', `x` = '".$cavedata[$user['room']+1]['x1']."', `y` = '".$cavedata[$user['room']+1]['y1']."', `dir` = '".$cavedata[$user['room']+1]['dir1']."', `floor` = 1");
|
mysql_query("INSERT INTO `caveparties` SET `user` = '$esth[id]', `leader` = '$user[id]', `login` = '$esth[login]', `shadow` = '0.png', `x` = '".$cavedata[$user['room']+1]['x1']."', `y` = '".$cavedata[$user['room']+1]['y1']."', `dir` = '".$cavedata[$user['room']+1]['dir1']."', `floor` = 1");
|
||||||
|
|
||||||
mysql_query("UPDATE `users`, `online` SET ".($nc?"`users`.`caveleader` = '$user[id]', ":"")." `users`.`room` = '".($user['room']+1)."', `online`.`room` = '".($user['room']+1)."' WHERE `online`.`id` = `users`.`id` AND `online`.`id` = '".$esth['id']."'");
|
mysql_query("UPDATE `users`, `online` SET ".($nc?"`users`.`caveleader` = '$user[id]', ":"")." `users`.`room` = '".($user['room']+1)."', `online`.`room` = '".($user['room']+1)."' WHERE `online`.`id` = `users`.`id` AND `online`.`id` = '".$esth['id']."'");
|
||||||
}
|
}
|
||||||
|
16
forum.php
16
forum.php
@ -1,11 +1,11 @@
|
|||||||
<?php
|
<?php
|
||||||
session_start();
|
session_start();
|
||||||
include('config.php');
|
include('config.php');
|
||||||
|
if ($_SESSION['uid'] == null) header("Location: index.php");
|
||||||
|
|
||||||
|
$user = db::c()->query('SELECT * FROM `users` WHERE `id` = ?i', $_SESSION['uid'])->fetch_assoc();
|
||||||
|
$sleep = db::c()->query('SELECT `id` FROM `effects` WHERE `owner` = ?i AND `time` > ?i AND `type` = 3', $user['id'], time())->fetch_assoc();
|
||||||
|
|
||||||
if (!empty($_SESSION['uid'])) {
|
|
||||||
$user = db::c()->query('SELECT * FROM `users` WHERE `id` = ?i', $_SESSION['uid'])->fetch_assoc();
|
|
||||||
$sleep = db::c()->query('SELECT `id` FROM `effects` WHERE `owner` = ?i AND `time` > ?i AND `type` = 3', $user['id'], time())->fetch_assoc();
|
|
||||||
} else $user = $sleep = [];
|
|
||||||
|
|
||||||
if (!isset($_GET['page'])) {
|
if (!isset($_GET['page'])) {
|
||||||
$ps = 0;
|
$ps = 0;
|
||||||
@ -453,7 +453,8 @@ if (isset($_GET['do']) && $isModerator == true) {
|
|||||||
echo $pages_str;
|
echo $pages_str;
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<div id="leaf<?= $row['id'] ?>" style="background-color: #ddd;margin: 2px;padding:5px;overflow-x: auto;word-wrap: break-word;box-shadow: 1px 2px 3px #ccc;">
|
<div id="leaf<?= $row['id'] ?>"
|
||||||
|
style="background-color: #ddd;margin: 2px;padding:5px;overflow-x: auto;word-wrap: break-word;box-shadow: 1px 2px 3px #ccc;">
|
||||||
<span class="topicTitle">
|
<span class="topicTitle">
|
||||||
<img src="i/forum/icon<?= $icons ?>.gif"> <?= $row['topic'] ?>
|
<img src="i/forum/icon<?= $icons ?>.gif"> <?= $row['topic'] ?>
|
||||||
</span>
|
</span>
|
||||||
@ -486,7 +487,8 @@ if (isset($_GET['do']) && $isModerator == true) {
|
|||||||
if (empty($_GET['page'])) $_GET['page'] = "";
|
if (empty($_GET['page'])) $_GET['page'] = "";
|
||||||
$data = db::c()->query('SELECT * FROM `forum` WHERE `parent` = "?s" ORDER BY `id` ASC LIMIT ?i,20', $_GET['topic'], ($_GET['page'] * 20));
|
$data = db::c()->query('SELECT * FROM `forum` WHERE `parent` = "?s" ORDER BY `id` ASC LIMIT ?i,20', $_GET['topic'], ($_GET['page'] * 20));
|
||||||
while ($row = $data->fetch_assoc()): ?>
|
while ($row = $data->fetch_assoc()): ?>
|
||||||
<div id="leaf<?= $row['id'] ?>" style="background-color: #ddd;margin: 2px;padding:5px;overflow-x: auto;word-wrap: break-word;box-shadow: 1px 2px 3px #ccc;">
|
<div id="leaf<?= $row['id'] ?>"
|
||||||
|
style="background-color: #ddd;margin: 2px;padding:5px;overflow-x: auto;word-wrap: break-word;box-shadow: 1px 2px 3px #ccc;">
|
||||||
<div class="mesTopBar">
|
<div class="mesTopBar">
|
||||||
<table width="100%">
|
<table width="100%">
|
||||||
<tr>
|
<tr>
|
||||||
@ -511,7 +513,7 @@ if (isset($_GET['do']) && $isModerator == true) {
|
|||||||
<?php if ($isAdmin): ?>
|
<?php if ($isAdmin): ?>
|
||||||
<a href="javascript:void(0);" class="contact"
|
<a href="javascript:void(0);" class="contact"
|
||||||
id="<?= $row['id'] ?>">
|
id="<?= $row['id'] ?>">
|
||||||
<small>Редактировать</small>
|
<small>Редактировать</small>
|
||||||
</a>
|
</a>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</td>
|
</td>
|
||||||
|
@ -574,7 +574,7 @@ header("Cache-Control: no-cache");
|
|||||||
function level_up($uid)
|
function level_up($uid)
|
||||||
{
|
{
|
||||||
global $exptable;
|
global $exptable;
|
||||||
$us = db::c()->query('SELECT `id`, `login`, `level`, `money`, `sex`, `exp`, `vinos`, `nextup`, `stats`, `master`, `maxhp`, `refer`, `ip`, `in_tower` FROM `users` WHERE `id` =?i', $uid)->fetch_assoc();
|
$us = db::c()->query('SELECT `id`, `login`, `level`, `money`, `exp`, `vinos`, `nextup`, `stats`, `master`, `maxhp`, `refer`, `ip`, `in_tower` FROM `users` WHERE `id` =?i', $uid)->fetch_assoc();
|
||||||
if (isset($us['id'])) {
|
if (isset($us['id'])) {
|
||||||
if ($us['exp'] >= $us['nextup'] && !$us['in_tower']) {
|
if ($us['exp'] >= $us['nextup'] && !$us['in_tower']) {
|
||||||
if ($exptable[$us['nextup']][4] == 1) {
|
if ($exptable[$us['nextup']][4] == 1) {
|
||||||
|
@ -1,46 +1,31 @@
|
|||||||
<?php
|
<?php
|
||||||
// magic идентификацыя
|
if ($_SESSION['uid'] == null) header("Location: index.php");
|
||||||
//if (rand(1,2)==1) {
|
|
||||||
|
|
||||||
|
$m = mysql_fetch_array(mysql_query("SELECT `id`,`align`,`married`,`login` FROM `users` WHERE `login` = '{$_POST['target']}' LIMIT 1;"));
|
||||||
if ($_SESSION['uid'] == null) header("Location: index.php");
|
$w = mysql_fetch_array(mysql_query("SELECT `id`,`align`,`married`,`login` FROM `users` WHERE `login` = '{$_POST['target1']}' LIMIT 1;"));
|
||||||
|
$muzh = mysql_real_escape_string($_POST['target']);
|
||||||
$m = mysql_fetch_array(mysql_query("SELECT `id`,`align`,`married`,`sex`,`login` FROM `users` WHERE `login` = '{$_POST['target']}' LIMIT 1;"));
|
$zhena = mysql_real_escape_string($_POST['target1']);
|
||||||
$w = mysql_fetch_array(mysql_query("SELECT `id`,`align`,`married`,`sex`,`login` FROM `users` WHERE `login` = '{$_POST['target1']}' LIMIT 1;"));
|
if ($m['id'] and $w['id']) {
|
||||||
$muzh = mysql_real_escape_string($_POST['target']);
|
if ($m['married']) {
|
||||||
$zhena = mysql_real_escape_string($_POST['target1']);
|
echo "<font color=red><b>Персонаж " . $_POST['target'] . " уже состоит в браке!<b></font>";
|
||||||
if ($m['id'] and $w['id']) {
|
} elseif ($w['married']) {
|
||||||
if ($m['married']) {
|
echo "<font color=red><b>Персонаж " . $_POST['target1'] . " уже состоит в браке!<b></font>";
|
||||||
echo "<font color=red><b>Персонаж ".$_POST['target']." уже состоит в браке!<b></font>";
|
} else {
|
||||||
}
|
if (($user['align'] > '2' && $user['align'] < '3') || ($user['align'] > '1.6' && $user['align'] < '2')) {
|
||||||
elseif ($w['married']) {
|
if (mysql_query("UPDATE `users` SET `married`='{$_POST['target1']}' WHERE `id` = '{$m['id']}' LIMIT 1;") && mysql_query("UPDATE `users` SET `married`='{$_POST['target']}' WHERE `id` = '{$w['id']}' LIMIT 1;")) {
|
||||||
echo "<font color=red><b>Персонаж ".$_POST['target1']." уже состоит в браке!<b></font>";
|
$mess = "Регистрация брака между "$muzh" и "$zhena", регистратор "{$user['login']}".";
|
||||||
}
|
mysql_query("INSERT INTO `lichka`(`pers`,`text`,`date`) VALUES ('" . $m['id'] . "','$mess','" . time() . "');");
|
||||||
elseif ($m['sex'] != 1) {
|
mysql_query("INSERT INTO `lichka`(`pers`,`text`,`date`) VALUES ('" . $w['id'] . "','$mess','" . time() . "');");
|
||||||
echo "<font color=red><b>Неправильный пол жениха!<b></font>";
|
mysql_query("INSERT INTO `paldelo`(`author`,`text`,`date`) VALUES ('" . $_SESSION['uid'] . "','$mess','" . time() . "');");
|
||||||
}
|
echo "<font color=red><b>Успешно зарегистрирован брак между \"$muzh\" и \"$zhena\"!</b></font>";
|
||||||
elseif ($w['sex'] != 0) {
|
} else {
|
||||||
echo "<font color=red><b>Неправильный пол невесты!<b></font>";
|
echo "<font color=red><b>Произошла ошибка!<b></font>";
|
||||||
}
|
}
|
||||||
else {
|
} else {
|
||||||
if (($user['align'] > '2' && $user['align'] < '3') || ($user['align'] > '1.6' && $user['align'] < '2')) {
|
echo "<font color=red><b>Вы не можете зарегистрировать брак!<b></font>";
|
||||||
if (mysql_query("UPDATE `users` SET `married`='{$_POST['target1']}' WHERE `id` = '{$m['id']}' LIMIT 1;") && mysql_query("UPDATE `users` SET `married`='{$_POST['target']}' WHERE `id` = '{$w['id']}' LIMIT 1;")) {
|
}
|
||||||
$mess="Регистрация брака между "$muzh" и "$zhena", регистратор "{$user['login']}".";
|
}
|
||||||
mysql_query("INSERT INTO `lichka`(`pers`,`text`,`date`) VALUES ('".$m['id']."','$mess','".time()."');");
|
} else {
|
||||||
mysql_query("INSERT INTO `lichka`(`pers`,`text`,`date`) VALUES ('".$w['id']."','$mess','".time()."');");
|
echo "<font color=red><b>Персонаж \"$muzh\" или \"$zhena\" не существует!<b></font>";
|
||||||
mysql_query("INSERT INTO `paldelo`(`author`,`text`,`date`) VALUES ('".$_SESSION['uid']."','$mess','".time()."');");
|
}
|
||||||
echo "<font color=red><b>Успешно зарегистрирован брак между \"$muzh\" и \"$zhena\"!</b></font>";
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
echo "<font color=red><b>Произошла ошибка!<b></font>";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
echo "<font color=red><b>Вы не можете зарегистрировать брак!<b></font>";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
echo "<font color=red><b>Персонаж \"$muzh\" или \"$zhena\" не существует!<b></font>";
|
|
||||||
}
|
|
||||||
?>
|
?>
|
||||||
|
@ -1,46 +1,30 @@
|
|||||||
<?php
|
<?php
|
||||||
// magic идентификацыя
|
if ($_SESSION['uid'] == null) header("Location: index.php");
|
||||||
//if (rand(1,2)==1) {
|
|
||||||
|
|
||||||
|
$m = mysql_fetch_array(mysql_query("SELECT `id`,`align`,`married`,`login` FROM `users` WHERE `login` = '{$_POST['target']}' LIMIT 1;"));
|
||||||
|
$w = mysql_fetch_array(mysql_query("SELECT `id`,`align`,`married`,`login` FROM `users` WHERE `login` = '{$_POST['target1']}' LIMIT 1;"));
|
||||||
|
|
||||||
if ($_SESSION['uid'] == null) header("Location: index.php");
|
if ($m['id'] and $w['id']) {
|
||||||
|
if ($m['married'] != $_POST['target1']) {
|
||||||
$m = mysql_fetch_array(mysql_query("SELECT `id`,`align`,`married`,`sex`,`login` FROM `users` WHERE `login` = '{$_POST['target']}' LIMIT 1;"));
|
echo "<font color=red><b>Персонаж " . $_POST['target'] . " не состоит в браке с " . $_POST['target1'] . "!<b></font>";
|
||||||
$w = mysql_fetch_array(mysql_query("SELECT `id`,`align`,`married`,`sex`,`login` FROM `users` WHERE `login` = '{$_POST['target1']}' LIMIT 1;"));
|
} elseif ($w['married'] != $_POST['target']) {
|
||||||
$muzh=$_POST['target'];
|
echo "<font color=red><b>Персонаж " . $_POST['target1'] . " не состоит в браке с " . $_POST['target'] . "!<b></font>";
|
||||||
$zhena=$_POST['target1'];
|
} else {
|
||||||
if ($m['id'] and $w['id']) {
|
if (($user['align'] > '2' && $user['align'] < '3') || ($user['align'] > '1.6' && $user['align'] < '2')) {
|
||||||
if ($m['married'] != $_POST['target1']) {
|
if (mysql_query("UPDATE `users` SET `married`='' WHERE `id` = '{$m['id']}' LIMIT 1;") && mysql_query("UPDATE `users` SET `married`='' WHERE `id` = '{$w['id']}' LIMIT 1;")) {
|
||||||
echo "<font color=red><b>Персонаж ".$_POST['target']." не состоит в браке с ".$_POST['target1']."!<b></font>";
|
$mess = "Расторжение брака между "{$m['login']}" и "{$w['login']}", регистратор "{$user['login']}".";
|
||||||
}
|
mysql_query("INSERT INTO `lichka`(`id`,`pers`,`text`,`date`) VALUES ('','" . $m['id'] . "','$mess','" . time() . "');");
|
||||||
elseif ($w['married'] != $_POST['target']) {
|
mysql_query("INSERT INTO `lichka`(`id`,`pers`,`text`,`date`) VALUES ('','" . $w['id'] . "','$mess','" . time() . "');");
|
||||||
echo "<font color=red><b>Персонаж ".$_POST['target1']." не состоит в браке с ".$_POST['target']."!<b></font>";
|
mysql_query("INSERT INTO `paldelo`(`id`,`author`,`text`,`date`) VALUES ('','" . $_SESSION['uid'] . "','$mess','" . time() . "');");
|
||||||
}
|
echo "<font color=red><b>Успешно расторгнут брак между \"$muzh\" и \"$zhena\"!</b></font>";
|
||||||
elseif ($m['sex'] != 1) {
|
} else {
|
||||||
echo "<font color=red><b>Неправильный пол жениха!<b></font>";
|
echo "<font color=red><b>Произошла ошибка!<b></font>";
|
||||||
}
|
}
|
||||||
elseif ($w['sex'] != 0) {
|
} else {
|
||||||
echo "<font color=red><b>Неправильный пол невесты!<b></font>";
|
echo "<font color=red><b>Вы не можете расторгнуть брак!<b></font>";
|
||||||
}
|
}
|
||||||
else {
|
}
|
||||||
if (($user['align'] > '2' && $user['align'] < '3') || ($user['align'] > '1.6' && $user['align'] < '2')) {
|
} else {
|
||||||
if (mysql_query("UPDATE `users` SET `married`='' WHERE `id` = '{$m['id']}' LIMIT 1;") && mysql_query("UPDATE `users` SET `married`='' WHERE `id` = '{$w['id']}' LIMIT 1;")) {
|
echo "<font color=red><b>Персонаж \"$muzh\" или \"$zhena\" не существует!<b></font>";
|
||||||
$mess="Расторжение брака между "$muzh" и "$zhena", регистратор "{$user['login']}".";
|
}
|
||||||
mysql_query("INSERT INTO `lichka`(`id`,`pers`,`text`,`date`) VALUES ('','".$m['id']."','$mess','".time()."');");
|
|
||||||
mysql_query("INSERT INTO `lichka`(`id`,`pers`,`text`,`date`) VALUES ('','".$w['id']."','$mess','".time()."');");
|
|
||||||
mysql_query("INSERT INTO `paldelo`(`id`,`author`,`text`,`date`) VALUES ('','".$_SESSION['uid']."','$mess','".time()."');");
|
|
||||||
echo "<font color=red><b>Успешно расторгнут брак между \"$muzh\" и \"$zhena\"!</b></font>";
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
echo "<font color=red><b>Произошла ошибка!<b></font>";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
echo "<font color=red><b>Вы не можете расторгнуть брак!<b></font>";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
echo "<font color=red><b>Персонаж \"$muzh\" или \"$zhena\" не существует!<b></font>";
|
|
||||||
}
|
|
||||||
?>
|
?>
|
||||||
|
Loading…
Reference in New Issue
Block a user