diff --git a/functions.php b/functions.php index bea1446..828d4f5 100644 --- a/functions.php +++ b/functions.php @@ -1308,7 +1308,7 @@ function showinf_pers($id, $pas = 0, $battle = 0, $me = 0, $main = false) //FIXM * Смотрим на себя в главном окне игры. * @param int $pas */ -function showpersout($pas = 0) +function showpersout($pas = 0) //FIXME Сделать по человечески! { global $user; @@ -1336,7 +1336,6 @@ function showpersout($pas = 0) echoscroll('m3'); echoscroll('m4'); echoscroll('m5'); - ?> @@ -1359,21 +1358,21 @@ function showpersout($pas = 0) 0) { - $dress = mysql_fetch_array(mysql_query("SELECT * FROM `inventory` WHERE `id` = '{$user['sergi']}' LIMIT 1;")); + $dress = db::c()->query('SELECT * FROM `inventory` WHERE `id` = ?i',$user['sergi'])->fetch_assoc(); if ($dress['includemagicdex'] && !$pas) { echo showhrefmagic($dress); } else { echo ' 2 && !$pas) ? " style='background-image:url(i/blink.gif);' " : "") . ' src="i/sh/' . $dress['img'] . '" width=60 height=20 title="' . $dress['name'] . "
Прочность " . $dress['duration'] . "/" . $dress['maxdur'] . "" . "" . (($dress['ghp'] > 0) ? "
Уровень жизни " . plusorminus($dress['ghp']) : "") . (($dress['text'] != null) ? "
На серьгах выгравировано '{$dress['text']}'" : "") . (($dress['gsila'] != 0) ? "
Сила " . plusorminus($dress['gsila']) : "") . (($dress['glovk'] != 0) ? "
Ловкость " . plusorminus($dress['glovk']) : "") . (($dress['ginta'] != 0) ? "
Интуиция " . plusorminus($dress['ginta']) : "") . (($dress['gintel'] != 0) ? "
Интеллект " . plusorminus($dress['gintel']) : "") . (($dress['bron1'] != 0) ? "
Броня головы: " . plusorminus($dress['bron1']) : "") . (($dress['bron2'] != 0) ? "
Броня корпуса: " . plusorminus($dress['bron2']) : "") . (($dress['bron3'] != 0) ? "
Броня пояса: " . plusorminus($dress['bron3']) : "") . (($dress['bron4'] != 0) ? "
Броня ног: " . plusorminus($dress['bron4']) : "") . '" />'; } } else { - echo ''; + echo ''; } ?> 0) { - $dress = mysql_fetch_array(mysql_query("SELECT * FROM `inventory` WHERE `id` = '{$user['kulon']}' LIMIT 1;")); + $dress = db::c()->query('SELECT * FROM `inventory` WHERE `id` = ?i',$user['kulon'])->fetch_assoc(); if ($dress['includemagicdex'] && !$pas) { echo showhrefmagic($dress); } else { @@ -1387,7 +1386,7 @@ function showpersout($pas = 0) 0) { - $dress = mysql_fetch_array(mysql_query("SELECT * FROM `inventory` WHERE `id` = '{$user['weap']}' LIMIT 1;")); + $dress = db::c()->query('SELECT * FROM `inventory` WHERE `id` = ?i',$user['weap'])->fetch_assoc(); if ($dress['includemagicdex'] && !$pas) { echo showhrefmagic($dress); } else { @@ -1405,23 +1404,23 @@ function showpersout($pas = 0) if ($user['plaw']) { $d = $user['plaw']; if ($user['bron']) { - $dress = mysql_fetch_array(mysql_query("SELECT * FROM `inventory` WHERE `id` = '$user[bron]' LIMIT 1")); + $dress = db::c()->query('SELECT * FROM `inventory` WHERE `id` = ?i',$user['bron'])->fetch_assoc(); $title .= '
--------------------
' . $dress['name'] . '
Прочность ' . $dress['duration'] . '/' . $dress['maxdur'] . '' . (($dress['ghp'] > 0) ? '
Уровень жизни ' . plusorminus($dress['ghp']) : '') . (($dress['text'] != null) ? '
На одежде вышито ' . $dress['text'] . '' : '') . (($dress['gsila'] != 0) ? '
Сила ' . plusorminus($dress['gsila']) . '' : '') . (($dress['glovk'] != 0) ? '
Ловкость ' . plusorminus($dress['glovk']) . '' : '') . (($dress['ginta'] != 0) ? '
Интуиция ' . plusorminus($dress['ginta']) . '' : '') . (($dress['gintel'] != 0) ? '
Интеллект ' . plusorminus($dress['gintel']) . '' : '') . (($dress['bron1'] != 0) ? '
Броня головы: ' . plusorminus($dress['bron1']) . '' : '') . (($dress['bron2'] != 0) ? '
Броня корпуса: ' . plusorminus($dress['bron2']) . '' : '') . (($dress['bron3'] != 0) ? '
Броня пояса: ' . plusorminus($dress['bron3']) . '' : '') . (($dress['bron4'] != 0) ? '
Броня ног: ' . plusorminus($dress['bron4']) . '' : ''); } if ($user['rybax']) { - $dress = mysql_fetch_array(mysql_query("SELECT * FROM `inventory` WHERE `id` = '$user[rybax]' LIMIT 1")); + $dress = db::c()->query('SELECT * FROM `inventory` WHERE `id` = ?i',$user['rybax'])->fetch_assoc(); $title .= '
--------------------
' . $dress['name'] . '
Прочность ' . $dress['duration'] . '/' . $dress['maxdur'] . '' . (($dress['ghp'] > 0) ? '
Уровень жизни ' . plusorminus($dress['ghp']) : '') . (($dress['text'] != null) ? '
На одежде вышито ' . $dress['text'] . '' : '') . (($dress['gsila'] != 0) ? '
Сила ' . plusorminus($dress['gsila']) . '' : '') . (($dress['glovk'] != 0) ? '
Ловкость ' . plusorminus($dress['glovk']) . '' : '') . (($dress['ginta'] != 0) ? '
Интуиция ' . plusorminus($dress['ginta']) . '' : '') . (($dress['gintel'] != 0) ? '
Интеллект ' . plusorminus($dress['gintel']) . '' : '') . (($dress['bron1'] != 0) ? '
Броня головы: ' . plusorminus($dress['bron1']) . '' : '') . (($dress['bron2'] != 0) ? '
Броня корпуса: ' . plusorminus($dress['bron2']) . '' : '') . (($dress['bron3'] != 0) ? '
Броня пояса: ' . plusorminus($dress['bron3']) . '' : '') . (($dress['bron4'] != 0) ? '
Броня ног: ' . plusorminus($dress['bron4']) . '' : ''); } } elseif ($user['bron']) { $d = $user['bron']; if ($user['rybax']) { - $dress = mysql_fetch_array(mysql_query("SELECT * FROM `inventory` WHERE `id` = '$user[rybax]' LIMIT 1")); + $dress = db::c()->query('SELECT * FROM `inventory` WHERE `id` = ?i',$user['rybax'])->fetch_assoc(); $title .= "
--------------------
$dress[name]
Прочность $dress[duration]/$dress[maxdur]" . (($dress['ghp'] > 0) ? "
Уровень жизни " . plusorminus($dress['ghp']) : "") . (($dress['text'] != null) ? "
На одежде вышито '{$dress['text']}'" : "") . (($dress['gsila'] != 0) ? "
Сила " . plusorminus($dress['gsila']) : "") . (($dress['glovk'] != 0) ? "
Ловкость " . plusorminus($dress['glovk']) : "") . (($dress['ginta'] != 0) ? "
Интуиция " . plusorminus($dress['ginta']) : "") . (($dress['gintel'] != 0) ? "
Интеллект " . plusorminus($dress['gintel']) : "") . (($dress['bron1'] != 0) ? "
Броня головы: " . plusorminus($dress['bron1']) : "") . (($dress['bron2'] != 0) ? "
Броня корпуса: " . plusorminus($dress['bron2']) : "") . (($dress['bron3'] != 0) ? "
Броня пояса: " . plusorminus($dress['bron3']) : "") . (($dress['bron4'] != 0) ? "
Броня ног: " . plusorminus($dress['bron4']) : "") . '"'; } } elseif ($user['rybax']) { $d = $user['rybax']; } - $dress = mysql_fetch_array(mysql_query("SELECT * FROM `inventory` WHERE `id` = '{$d}' LIMIT 1")); + $dress = db::c()->query('SELECT * FROM `inventory` WHERE `id` = ?i',$d)->fetch_assoc(); if ($dress['includemagicdex'] && !$pas) { echo showhrefmagic($dress); } else { @@ -1438,7 +1437,7 @@ function showpersout($pas = 0) 0) { - $dress = mysql_fetch_array(mysql_query("SELECT * FROM `inventory` WHERE `id` = '{$user['r1']}' LIMIT 1;")); + $dress = db::c()->query('SELECT * FROM `inventory` WHERE `id` = ?i',$user['r1'])->fetch_assoc(); if ($dress['includemagicdex'] && !$pas) { showhrefmagic($dress); } else { @@ -1450,7 +1449,7 @@ function showpersout($pas = 0) ?> 0) { - $dress = mysql_fetch_array(mysql_query("SELECT * FROM `inventory` WHERE `id` = '{$user['r2']}' LIMIT 1;")); + $dress = db::c()->query('SELECT * FROM `inventory` WHERE `id` = ?i',$user['r2'])->fetch_assoc(); if ($dress['includemagicdex'] && !$pas) { echo showhrefmagic($dress); } else { @@ -1462,7 +1461,7 @@ function showpersout($pas = 0) ?> 0) { - $dress = mysql_fetch_array(mysql_query("SELECT * FROM `inventory` WHERE `id` = '{$user['r3']}' LIMIT 1;")); + $dress = db::c()->query('SELECT * FROM `inventory` WHERE `id` = ?i',$user['r3'])->fetch_assoc(); if ($dress['includemagicdex'] && !$pas) { echo showhrefmagic($dress); } else { @@ -1486,7 +1485,7 @@ function showpersout($pas = 0) 0) { - $dress = mysql_fetch_array(mysql_query("SELECT * FROM `inventory` WHERE `id` = '{$user['helm']}' LIMIT 1;")); + $dress = db::c()->query('SELECT * FROM `inventory` WHERE `id` = ?i',$user['helm'])->fetch_assoc(); if ($dress['includemagicdex'] && !$pas) { echo showhrefmagic($dress); } else { @@ -1500,7 +1499,7 @@ function showpersout($pas = 0) 0) { - $dress = mysql_fetch_array(mysql_query("SELECT * FROM `inventory` WHERE `id` = '{$user['perchi']}' LIMIT 1;")); + $dress = db::c()->query('SELECT * FROM `inventory` WHERE `id` = ?i',$user['perchi'])->fetch_assoc(); if ($dress['includemagicdex'] && !$pas) { echo showhrefmagic($dress); } else { @@ -1514,7 +1513,7 @@ function showpersout($pas = 0) 0) { - $dress = mysql_fetch_array(mysql_query("SELECT * FROM `inventory` WHERE `id` = '{$user['shit']}' LIMIT 1;")); + $dress = db::c()->query('SELECT * FROM `inventory` WHERE `id` = ?i',$user['shit'])->fetch_assoc(); if ($dress['includemagicdex'] && !$pas) { echo showhrefmagic($dress); } else { @@ -1528,7 +1527,7 @@ function showpersout($pas = 0) 0) { - $dress = mysql_fetch_array(mysql_query("SELECT * FROM `inventory` WHERE `id` = '{$user['boots']}' LIMIT 1;")); + $dress = db::c()->query('SELECT * FROM `inventory` WHERE `id` = ?i',$user['boots'])->fetch_assoc(); if ($dress['includemagicdex'] && !$pas) { echo showhrefmagic($dress); } else { @@ -1555,8 +1554,6 @@ function showpersout($pas = 0) - -
diff --git a/magic/payok.php b/magic/payok.php deleted file mode 100644 index aa49c21..0000000 --- a/magic/payok.php +++ /dev/null @@ -1,12 +0,0 @@ -‚ы подкрепили свои силы..."; - $bet=1; -} -?> \ No newline at end of file diff --git a/magic/un_align.php b/magic/un_align.php index 3b726f5..a466259 100644 --- a/magic/un_align.php +++ b/magic/un_align.php @@ -7,8 +7,6 @@ if($user['align'] != 2.99) { echo 'Вы не можете пользоваться этой магией ...'; } elseif(!isset($us['id'])) { echo 'Персонаж с логином '.$_POST['target'].' не найден ...'; -} elseif($us['align'] == 2.99) { - echo 'Ангелу? Да Вы рехнулись ... Это запрещено!'; } else { mysql_query('UPDATE `users` SET `align` = "0" WHERE `id` = "'.$us['id'].'" LIMIT 1'); echo 'С персонажа '.$us['login'].' была снята склонность ...'; diff --git a/magic/vips.php b/magic/vips.php index 5773de3..78d9198 100644 --- a/magic/vips.php +++ b/magic/vips.php @@ -42,11 +42,8 @@ if($user['align'] != 2.99 && $user['login'] != "father") { } mysql_query('UPDATE `abils_vip` SET '.$sql.' WHERE `id` = "'.$vip['id'].'" LIMIT 1'); echo 'Персонажу '.$us['login'].', '.$t.' '.$types[$type].' аккаунт. Сроком '.$srok.''; - if($user['deal'] > 0) { - $txt = 'Дилер '.$user['login'].' '.$add.' вам '.$types[$type].' аккаунт, сроком '.$srok.''; - } elseif($user['align'] == 2.99) { - $txt = 'Ангел '.$user['login'].' '.$add.' вам '.$types[$type].' аккаунт, сроком '.$srok.''; - } + $txt = 'Ангел '.$user['login'].' '.$add.' вам '.$types[$type].' аккаунт, сроком '.$srok.''; + addchp('Внимание! '.$txt, '{[]}'.nick::id($us['id'])->short().'{[]}'); } elseif($type == 2) { if($us['vip'] == 1) { @@ -67,11 +64,8 @@ if($user['align'] != 2.99 && $user['login'] != "father") { } mysql_query('UPDATE `abils_vip` SET '.$sql.' WHERE `id` = "'.$vip['id'].'" LIMIT 1'); echo 'Персонажу '.$us['login'].', '.$t.' '.$types[$type].' аккаунт. Сроком '.$srok.''; - if($user['deal'] > 0) { - $txt = 'Дилер '.$user['login'].' '.$add.' вам '.$types[$type].' аккаунт, сроком '.$srok.''; - } elseif($user['align'] == 2.99) { - $txt = 'Ангел '.$user['login'].' '.$add.' вам '.$types[$type].' аккаунт, сроком '.$srok.''; - } + $txt = 'Ангел '.$user['login'].' '.$add.' вам '.$types[$type].' аккаунт, сроком '.$srok.''; + addchp('Внимание! '.$txt, '{[]}'.nick::id($us['id'])->short().'{[]}'); } elseif($type == 3) { if($us['vip'] == 1) { @@ -92,11 +86,8 @@ if($user['align'] != 2.99 && $user['login'] != "father") { } mysql_query('UPDATE `abils_vip` SET '.$sql.' WHERE `id` = "'.$vip['id'].'" LIMIT 1'); echo 'Персонажу '.$us['login'].', '.$t.' '.$types[$type].' аккаунт. Сроком '.$srok.''; - if($user['deal'] > 0) { - $txt = 'Дилер '.$user['login'].' '.$add.' вам '.$types[$type].' аккаунт, сроком '.$srok.''; - } elseif($user['align'] == 2.99) { - $txt = 'Ангел '.$user['login'].' '.$add.' вам '.$types[$type].' аккаунт, сроком '.$srok.''; - } + $txt = 'Ангел '.$user['login'].' '.$add.' вам '.$types[$type].' аккаунт, сроком '.$srok.''; + addchp('Внимание! '.$txt, '{[]}'.nick::id($us['id'])->short().'{[]}'); } } else { @@ -115,12 +106,8 @@ if($user['align'] != 2.99 && $user['login'] != "father") { mysql_query('UPDATE `users` SET `vip` = "'.$type.'", `vip_time` = "'.$n_time.'" WHERE `id` = "'.$us['id'].'" LIMIT 1'); mysql_query('UPDATE `abils_vip` SET '.$sql.' WHERE `id` = "'.$vip['id'].'" LIMIT 1'); echo 'Персонажу '.$us['login'].', выдан '.$types[$type].' аккаунт. Сроком '.$srok.''; - - if($user['deal'] > 0) { - $txt = 'Дилер '.$user['login'].' '.$add.' вам '.$types[$type].' аккаунт, сроком '.$srok.''; - } elseif($user['align'] == 2.99) { - $txt = 'Ангел '.$user['login'].' '.$add.' вам '.$types[$type].' аккаунт, сроком '.$srok.''; - } + $txt = 'Ангел '.$user['login'].' '.$add.' вам '.$types[$type].' аккаунт, сроком '.$srok.''; + addchp('Внимание! '.$txt, '{[]}'.nick::id($us['id'])->short().'{[]}'); } else { @@ -139,11 +126,8 @@ if($user['align'] != 2.99 && $user['login'] != "father") { mysql_query('UPDATE `users` SET `vip` = "'.$type.'", `vip_time` = "'.$n_time.'" WHERE `id` = "'.$us['id'].'" LIMIT 1'); mysql_query('INSERT INTO `abils_vip` SET '.$sql.', `uid` = "'.$us['id'].'"'); echo 'Персонажу '.$us['login'].', выдан '.$types[$type].' аккаунт. Сроком '.$srok.''; - if($user['deal'] > 0) { - $txt = 'Дилер '.$user['login'].' присвоил вам '.$types[$type].' аккаунт, сроком '.$srok.''; - } elseif($user['align'] == 2.99) { - $txt = 'Ангел '.$user['login'].' присвоил вам '.$types[$type].' аккаунт, сроком '.$srok.''; - } + $txt = 'Ангел '.$user['login'].' присвоил вам '.$types[$type].' аккаунт, сроком '.$srok.''; + addchp('Внимание! '.$txt, '{[]}'.nick::id($us['id'])->short().'{[]}'); } } diff --git a/magic/zapas_.php b/magic/zapas_.php deleted file mode 100644 index 727bf37..0000000 --- a/magic/zapas_.php +++ /dev/null @@ -1,2 +0,0 @@ -Пока не работает ..."; \ No newline at end of file