Немножко допричесал модерацию, с которой теперь можно иметь дело.
This commit is contained in:
parent
0ccc2d1af5
commit
8442eb4e7b
181
admin/admin.php
181
admin/admin.php
@ -47,7 +47,7 @@ $unregisteredClans = new class {
|
|||||||
$shortName = $row[$i]->short_name;
|
$shortName = $row[$i]->short_name;
|
||||||
$info = nl2br($row[$i]->info);
|
$info = nl2br($row[$i]->info);
|
||||||
$i++;
|
$i++;
|
||||||
echo <<<UNREGCLAN
|
echo <<<UNREGCLANLIST
|
||||||
<div>
|
<div>
|
||||||
<fieldset style="display: inline;">
|
<fieldset style="display: inline;">
|
||||||
<legend>$fullName [$shortName]</legend>
|
<legend>$fullName [$shortName]</legend>
|
||||||
@ -58,7 +58,7 @@ $unregisteredClans = new class {
|
|||||||
<button onclick="location.href='?remclan=$id'">Отказать</button>
|
<button onclick="location.href='?remclan=$id'">Отказать</button>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</div>
|
</div>
|
||||||
UNREGCLAN;
|
UNREGCLANLIST;
|
||||||
}
|
}
|
||||||
unset($i);
|
unset($i);
|
||||||
}
|
}
|
||||||
@ -96,11 +96,11 @@ if (!empty($_POST['receiver']) && !empty($_POST['tgmsg'])) {
|
|||||||
echo "Успешно.";
|
echo "Успешно.";
|
||||||
}
|
}
|
||||||
# Показывает невидимок.
|
# Показывает невидимок.
|
||||||
echo '<legend>Невидимки:</legend>';
|
|
||||||
$row = DBPDO::INIT()->ofetchAll('SELECT id,login FROM users LEFT JOIN users_effects ue on users.id = ue.owner_id WHERE type = 1022 ORDER BY `id` DESC');
|
$row = DBPDO::INIT()->ofetchAll('SELECT id,login FROM users LEFT JOIN users_effects ue on users.id = ue.owner_id WHERE type = 1022 ORDER BY `id` DESC');
|
||||||
$i = 0;
|
$i = 0;
|
||||||
|
$invisList = '';
|
||||||
while ($i < count($row)) {
|
while ($i < count($row)) {
|
||||||
echo '<b>[id] = ' . $row[$i]->id . ', ' . $row[$i]->login . ' </b><br>';
|
$invisList .= '<b>[id] = ' . $row[$i]->id . ', ' . $row[$i]->login . ' </b><br>';
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
unset($i);
|
unset($i);
|
||||||
@ -109,6 +109,8 @@ unset($i);
|
|||||||
Template::header('ᐰdminка');
|
Template::header('ᐰdminка');
|
||||||
?>
|
?>
|
||||||
<link rel=stylesheet href="/css/admin.css">
|
<link rel=stylesheet href="/css/admin.css">
|
||||||
|
|
||||||
|
<span class="legend">Абилки. Работают только на себя. Надо дописать цель.</span><br>
|
||||||
<button onclick="location.href='?sleep'"><img src="../i/magic/sleep.gif" alt="sleep"> Молчать 15 мин</button>
|
<button onclick="location.href='?sleep'"><img src="../i/magic/sleep.gif" alt="sleep"> Молчать 15 мин</button>
|
||||||
<button disabled><img src="../i/magic/sleep.gif" alt="sleep"> Молчать 1 час</button>
|
<button disabled><img src="../i/magic/sleep.gif" alt="sleep"> Молчать 1 час</button>
|
||||||
<button disabled><img src="../i/magic/sleep.gif" alt="sleep"> Молчать 1 день</button>
|
<button disabled><img src="../i/magic/sleep.gif" alt="sleep"> Молчать 1 день</button>
|
||||||
@ -125,89 +127,11 @@ Template::header('ᐰdminка');
|
|||||||
<button disabled><img src="../i/magic/death.gif" alt="death"> Заблокировать</button>
|
<button disabled><img src="../i/magic/death.gif" alt="death"> Заблокировать</button>
|
||||||
<button disabled><img src="../i/magic/death_off.gif" alt="death_off"> Разблокировать</button>
|
<button disabled><img src="../i/magic/death_off.gif" alt="death_off"> Разблокировать</button>
|
||||||
<br>
|
<br>
|
||||||
<button disabled>Снять все травмы</button>
|
<button disabled><img src="../i/magic/ct_all.gif" alt="ct_all"> Снять все травмы</button>
|
||||||
<button disabled>Свадьба</button>
|
<button disabled><img src="../i/magic/marry.gif" alt="marry"> Свадьба</button>
|
||||||
<button disabled>Развод</button>
|
<button disabled><img src="../i/magic/unmarry.gif" alt="unmarry"> Развод</button>
|
||||||
<button disabled>Выйти из боя</button>
|
<button disabled><img src="../i/magic/bexit.gif" alt="bexit"> Выйти из боя</button>
|
||||||
<?php
|
<button disabled><img src="../i/magic/check.gif" alt="check"> Проверка</button>
|
||||||
####################################################
|
|
||||||
## НЕ ТРОГАТЬ! ТУТ ОТКРЫВАЮТСЯ ВСПЛЫВАЮЩИЕ ОКНА!!!##
|
|
||||||
####################################################
|
|
||||||
echo "<div class=appblock id=hint3 onclick='closehint3();'></div>";
|
|
||||||
####################################################
|
|
||||||
|
|
||||||
$moj = ['sleep', 'sleepf'];
|
|
||||||
|
|
||||||
|
|
||||||
switch ($_POST['use']) { /* Подключаем строго тот свиток который используем. 36 Свитков править. Мама дорогая! */
|
|
||||||
|
|
||||||
case "check":
|
|
||||||
include("../magic/check.php");
|
|
||||||
break;
|
|
||||||
case "brat":
|
|
||||||
include("../magic/brat.php");
|
|
||||||
break;
|
|
||||||
case "vampir":
|
|
||||||
include("../magic/vampir.php");
|
|
||||||
break;
|
|
||||||
case "crush":
|
|
||||||
include("../magic/devastate.php");
|
|
||||||
break;
|
|
||||||
case "def":
|
|
||||||
include("../magic/defence.php");
|
|
||||||
break;
|
|
||||||
case "bexit":
|
|
||||||
include("../magic/bexit.php");
|
|
||||||
break;
|
|
||||||
case "vip":
|
|
||||||
include("../magic/vips.php");
|
|
||||||
break;
|
|
||||||
|
|
||||||
echo "<div class=abils><span class='legend'>Абилки:</span>Пока что привязаны к общей системе. Работают выборочно.<br>";
|
|
||||||
$script_name = $magic_name = '';
|
|
||||||
foreach ($moj as $k => $v) {
|
|
||||||
switch ($k) { /* 45 скриптов на 36 умелок? Неплохо… */
|
|
||||||
case "vip":
|
|
||||||
$script_name = "vipad";
|
|
||||||
$magic_name = "Вип";
|
|
||||||
break;
|
|
||||||
case "hidden":
|
|
||||||
$script_name = "runmagic1";
|
|
||||||
$magic_name = "Заклятие невидимости";
|
|
||||||
break;
|
|
||||||
case "teleport":
|
|
||||||
$script_name = "runmagic";
|
|
||||||
$magic_name = "Телепортация";
|
|
||||||
break;
|
|
||||||
case "check":
|
|
||||||
$script_name = "runmagic1";
|
|
||||||
$magic_name = "Поставить проверку";
|
|
||||||
break;
|
|
||||||
case "pal_buttons":
|
|
||||||
$script_name = "runmagic";
|
|
||||||
$magic_name = "Отметить о прохождении проверки";
|
|
||||||
break;
|
|
||||||
case "rep":
|
|
||||||
$script_name = "runmagic";
|
|
||||||
$magic_name = "Отчет о переводах";
|
|
||||||
break;
|
|
||||||
case "rost":
|
|
||||||
$script_name = "runmagic";
|
|
||||||
$magic_name = "Присвоить статус";
|
|
||||||
break;
|
|
||||||
case "bexit":
|
|
||||||
$script_name = "runmagic1";
|
|
||||||
$magic_name = "Выйти из боя";
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
# Эта строка генерирует свитки с навыком. Но нам нужен просто перечень всего…
|
|
||||||
if ($script_name) {
|
|
||||||
print "<a onclick=\"$script_name('$magic_name','$k','target','target1') \" href='#'><img src='i/magic/" . $k . ".gif' title='" . $magic_name . "'></a> ";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
echo "</div>";
|
|
||||||
?>
|
|
||||||
|
|
||||||
<form method='post'>
|
<form method='post'>
|
||||||
<legend>Добавить в «дело» игрока заметку о нарушении правил, прокрутке и пр.</legend>
|
<legend>Добавить в «дело» игрока заметку о нарушении правил, прокрутке и пр.</legend>
|
||||||
@ -232,84 +156,5 @@ echo "</div>";
|
|||||||
<input type='submit' value='Изменить статус'>
|
<input type='submit' value='Изменить статус'>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<script>
|
<span class="legend">Невидимки</span><br>
|
||||||
const xmlHttpp = [];
|
<div class="abils" style="width: fit-content;"><?= $invisList ?></div>
|
||||||
|
|
||||||
function GetXmlHttpObject1() {
|
|
||||||
let xmlHttp1 = null;
|
|
||||||
try {
|
|
||||||
xmlHttp1 = new XMLHttpRequest();
|
|
||||||
} catch (e) {
|
|
||||||
try {
|
|
||||||
xmlHttp1 = new ActiveXObject("Msxml2.XMLHTTP");
|
|
||||||
} catch (e) {
|
|
||||||
xmlHttp1 = new ActiveXObject("Microsoft.XMLHTTP");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return xmlHttp1;
|
|
||||||
}
|
|
||||||
|
|
||||||
function show(ele) {
|
|
||||||
const srcElement = document.getElementById(ele);
|
|
||||||
if (srcElement != null) {
|
|
||||||
if (srcElement.style.display == "block") {
|
|
||||||
srcElement.style.display = 'none';
|
|
||||||
} else {
|
|
||||||
srcElement.style.display = 'block';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
let Hint3Name = '';
|
|
||||||
let Hint3Closed = false;
|
|
||||||
|
|
||||||
function vipad(title, magic, name) {
|
|
||||||
document.all("hint3").innerHTML = '<table width=100% cellspacing=1 cellpadding=0 bgcolor=CCC3AA><tr><td align=center><B>' + title + '</td><td width=20 align=right valign=top style="cursor: hand" onclick="closehint3();"><BIG><B>x</b></BIG></td></tr><tr><td colspan=2>' +
|
|
||||||
'<form action="admin.php" method=POST><table width=100% cellspacing=0 cellpadding=2 bgcolor=FFF6DD><tr><td colspan=2><INPUT TYPE=hidden name=sd4 value="<?php echo @$user['id']; ?>"><INPUT TYPE=hidden NAME="use" value="' + magic + '">' +
|
|
||||||
'Укажите логин персонажа:<small><BR>(можно щелкнуть по логину в чате)</TD></TR><TR><TD align=left><INPUT NAME="' + name + '">' +
|
|
||||||
'<br /><select style="background-color:#eceddf; color:#000000;" name="vip_type"><option value=1>Silver</option><option value=2>Gold</option><option value=3>Platinum</option></select>' +
|
|
||||||
'<select style="background-color:#eceddf; color:#000000;" name="time"><option value="1">1 Месяц</option><option value="2">2 Месяца</option><option value="3">3 Месяца</option><option value="4">4 Месяца</option><option value="5">5 Месяцев</option><option value="6">6 Месяцев</option><option value="99999999">Бесконечно</option></select>' +
|
|
||||||
'</TD><TD width=30><INPUT TYPE="submit" value=" »» "></TD></TR></TABLE></FORM></td></tr></table>';
|
|
||||||
document.all("hint3").style.visibility = "visible";
|
|
||||||
document.all("hint3").style.left = 100;
|
|
||||||
document.all("hint3").style.top = 100;
|
|
||||||
document.all(name).focus();
|
|
||||||
Hint3Name = name;
|
|
||||||
Hint3Closed = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
function runmagic(title, magic, name) {
|
|
||||||
document.all("hint3").innerHTML = '<table width=100% cellspacing=1 cellpadding=0 bgcolor=CCC3AA><tr><td align=center><B>' + title + '<td width=20 align=right valign=top style="cursor: hand" onclick="closehint3();"><BIG><B>x</b></BIG><tr><td colspan=2>' +
|
|
||||||
'<form action="admin.php" method=POST><table width=100% cellspacing=0 cellpadding=2 bgcolor=FFF6DD><tr><td colspan=2><INPUT TYPE=hidden name=sd4 value="<?php echo @$user['id']; ?>"><INPUT TYPE=hidden NAME="use" value="' + magic + '">' +
|
|
||||||
'Укажите логин персонажа:<small><BR>(можно щелкнуть по логину в чате)<TR><TD align=left><INPUT NAME="' + name + '">' +
|
|
||||||
'<select style="background-color:#eceddf; color:#000000;" name="timer"><option value=15>15 мин</option><option value=30>30 мин</option>' +
|
|
||||||
'<option value=60>1 час</option><option value=180>3 часа</option><option value=360>6 часов</option><option value=720>12 часов</option><option value=1440>сутки</option> </select>' +
|
|
||||||
'<TD width=30><INPUT TYPE="submit" value=" »» "></TABLE></FORM></table>';
|
|
||||||
document.all("hint3").style.visibility = "visible";
|
|
||||||
document.all("hint3").style.left = 100;
|
|
||||||
document.all("hint3").style.top = 100;
|
|
||||||
document.all(name).focus();
|
|
||||||
Hint3Name = name;
|
|
||||||
Hint3Closed = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
function runmagic1(title, magic, name) {
|
|
||||||
document.all("hint3").innerHTML = '<table width=100% cellspacing=1 cellpadding=0 bgcolor=CCC3AA><tr><td align=center><B>' + title + '</td><td width=20 align=right valign=top style="cursor: hand" onclick="closehint3();"><BIG><B>x</b></BIG></td></tr><tr><td colspan=2>' +
|
|
||||||
'<form action="admin.php" method=POST><table width=100% cellspacing=0 cellpadding=2 bgcolor=FFF6DD><tr><td colspan=2><INPUT TYPE=hidden name=sd4 value="<?php echo @$user['id']; ?>"> <INPUT TYPE=hidden NAME="use" value="' + magic + '">' +
|
|
||||||
'Укажите логин персонажа:<small><BR>(можно щелкнуть по логину в чате)</TD></TR><TR><TD align=left><INPUT NAME="' + name + '">' +
|
|
||||||
'</TD><TD width=30><INPUT TYPE="submit" value=" »» "></TD></TR></TABLE></FORM></td></tr></table>';
|
|
||||||
document.all("hint3").style.visibility = "visible";
|
|
||||||
document.all("hint3").style.left = 100;
|
|
||||||
document.all("hint3").style.top = 100;
|
|
||||||
document.all(name).focus();
|
|
||||||
Hint3Name = name;
|
|
||||||
Hint3Closed = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
function closehint3() {
|
|
||||||
document.all("hint3").style.visibility = "hidden";
|
|
||||||
Hint3Name = '';
|
|
||||||
Hint3Closed = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
</script>
|
|
@ -77,4 +77,10 @@ class Moderation
|
|||||||
{
|
{
|
||||||
DBPDO::INIT()->execute('INSERT INTO chat (user_id,msg,type) VALUES (-1,?,?)', [$message, 'sys']);
|
DBPDO::INIT()->execute('INSERT INTO chat (user_id,msg,type) VALUES (-1,?,?)', [$message, 'sys']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function addUserCheck(int $target): bool
|
||||||
|
{
|
||||||
|
self::addEffectStatusToUserLog($target, UserEffects::$effectName[20]);
|
||||||
|
return User::setUserEffect($target, 20, UserEffects::$effectName[20], strtotime('3days'));
|
||||||
|
}
|
||||||
}
|
}
|
@ -16,7 +16,7 @@ class User
|
|||||||
protected $info;
|
protected $info;
|
||||||
protected $level = 0;
|
protected $level = 0;
|
||||||
protected $align = 0;
|
protected $align = 0;
|
||||||
protected $clan = 0;
|
protected $clan;
|
||||||
protected $money = 0;
|
protected $money = 0;
|
||||||
protected $strength = 0;
|
protected $strength = 0;
|
||||||
protected $dexterity = 0;
|
protected $dexterity = 0;
|
||||||
@ -322,9 +322,9 @@ class User
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return int
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function getClan(): int
|
public function getClan(): string
|
||||||
{
|
{
|
||||||
return $this->clan;
|
return $this->clan;
|
||||||
}
|
}
|
||||||
@ -332,7 +332,7 @@ class User
|
|||||||
/**
|
/**
|
||||||
* @param int $clan
|
* @param int $clan
|
||||||
*/
|
*/
|
||||||
public function setClan(int $clan): void
|
public function setClan(string $clan): void
|
||||||
{
|
{
|
||||||
$this->clan = $clan;
|
$this->clan = $clan;
|
||||||
}
|
}
|
||||||
@ -569,14 +569,6 @@ class User
|
|||||||
return $this->minDamage;
|
return $this->minDamage;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @param int $minDamage
|
|
||||||
*/
|
|
||||||
public function setMinDamage(int $minDamage): void
|
|
||||||
{
|
|
||||||
$this->minDamage = $minDamage;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
@ -585,14 +577,6 @@ class User
|
|||||||
return $this->maxDamage;
|
return $this->maxDamage;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @param int $maxDamage
|
|
||||||
*/
|
|
||||||
public function setMaxDamage(int $maxDamage): void
|
|
||||||
{
|
|
||||||
$this->maxDamage = $maxDamage;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
@ -745,14 +729,6 @@ class User
|
|||||||
return $this->maxHealth;
|
return $this->maxHealth;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @param float|int $maxHealth
|
|
||||||
*/
|
|
||||||
public function setMaxHealth($maxHealth): void
|
|
||||||
{
|
|
||||||
$this->maxHealth = $maxHealth;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return float|int
|
* @return float|int
|
||||||
*/
|
*/
|
||||||
@ -761,13 +737,4 @@ class User
|
|||||||
return $this->maxMana;
|
return $this->maxMana;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @param float|int $maxMana
|
|
||||||
*/
|
|
||||||
public function setMaxMana($maxMana): void
|
|
||||||
{
|
|
||||||
$this->maxMana = $maxMana;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
@ -436,3 +436,9 @@ div.secret-info > span {
|
|||||||
img.building:hover {
|
img.building:hover {
|
||||||
filter: drop-shadow(2px 2px 2px white) sepia(15%);
|
filter: drop-shadow(2px 2px 2px white) sepia(15%);
|
||||||
}
|
}
|
||||||
|
.legend {
|
||||||
|
color: dimgray;
|
||||||
|
font-family: consolas, sans-serif;
|
||||||
|
font-size: 18px;
|
||||||
|
margin-top: 10px;
|
||||||
|
}
|
@ -1,39 +0,0 @@
|
|||||||
<?php
|
|
||||||
if (empty($_SESSION['uid'])) {
|
|
||||||
header("Location: index.php");
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
|
|
||||||
$target = $_POST['target'];
|
|
||||||
$tar = mysql_fetch_array(mysql_query("SELECT * FROM `users` WHERE `login` = '{$_POST['target']}' LIMIT 1;"));
|
|
||||||
$magictime = time() + 259200;
|
|
||||||
if ($tar['id']) {
|
|
||||||
if ($tar['klan'] || $tar['align']) {
|
|
||||||
echo "<font color=red><b>Персонаж \"$target\" состоит в клане, либо имеет склонность!</b></font>";
|
|
||||||
} else {
|
|
||||||
$ok = 0;
|
|
||||||
if ($user['align'] > '2' && $user['align'] < '3') {
|
|
||||||
$ok = 1;
|
|
||||||
} elseif ($user['align'] > '1.6' && $user['align'] < '2') {
|
|
||||||
$ok = 1;
|
|
||||||
}
|
|
||||||
if ($ok == 1) {
|
|
||||||
if (mysql_query("INSERT INTO `effects` (`owner`,`name`,`time`,`type`) values ('" . $tar['id'] . "','Проверка Паладинов','" . $magictime . "','20');")) {
|
|
||||||
$messtel = "Помечено, что персонаж чист перед законом";
|
|
||||||
$mess = "" . $user['login'] . " сделал пометку что " . $_POST['target'] . " чист перед законом";
|
|
||||||
mysql_query("INSERT INTO `lichka`(`id`,`pers`,`text`,`date`) VALUES ('','" . $tar['id'] . "','$mess','" . time() . "');");
|
|
||||||
mysql_query("INSERT INTO `paldelo`(`id`,`author`,`text`,`date`) VALUES ('','" . $_SESSION['uid'] . "','$mess','" . time() . "');");
|
|
||||||
|
|
||||||
/*Тут была привязка к телеграфу*/
|
|
||||||
|
|
||||||
echo "<font color=red><b>Успешно поставлена проверка персонажу \"$target\"</b></font>";
|
|
||||||
} else {
|
|
||||||
echo "<font color=red><b>Произошла ошибка!<b></font>";
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
echo "<font color=red><b>Вы не можете поставить проверку!<b></font>";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
echo "<font color=red><b>Персонаж \"$target\" не существует!<b></font>";
|
|
||||||
}
|
|
134
magic/vips.php
134
magic/vips.php
@ -1,134 +0,0 @@
|
|||||||
<?
|
|
||||||
if(empty($_SESSION['uid'])) { header('Location: ../index.php'); exit; }
|
|
||||||
$us = mysql_fetch_array(mysql_query('SELECT `id`, `vip`, `vip_time`, `login` FROM `users` WHERE `login` = "'.mysql_real_escape_string($_POST['target']).'" LIMIT 1'));
|
|
||||||
$vip = mysql_fetch_array(mysql_query('SELECT `id`, `uid`, `sokr`, `zash`, `invisible`, `attack`, `bloodattack`, `sleep30`, `travmoff`, `dontattack`, `unsleep`, `pers_attack` FROM `abils_vip` WHERE `uid` = "'.$us['id'].'" LIMIT 1'));
|
|
||||||
|
|
||||||
$type = (int)$_POST['vip_type'];
|
|
||||||
$time = (int)$_POST['time'];
|
|
||||||
$n_time = (time()+60*60*24*($time*30));
|
|
||||||
$afected = (($user['vip_time'])+60*60*24*($time*30));
|
|
||||||
$types = array(1 => 'Silver', 2 => 'Gold', 3 => 'Platinum');
|
|
||||||
|
|
||||||
if($time > 10) {
|
|
||||||
$srok = 'Бессрочно.';
|
|
||||||
} else {
|
|
||||||
$srok = $time.' мес.';
|
|
||||||
}
|
|
||||||
|
|
||||||
if($user['align'] != 2.99 && $user['login'] != "father") {
|
|
||||||
echo '<b style=\'color: Red;\'>Вам не доступна данная привелегия ...</b>';
|
|
||||||
} elseif(!isset($us['id'])) {
|
|
||||||
echo '<b style=\'color: Red;\'>Персонаж \''.$_POST['target'].'\' не найден ...</b>';
|
|
||||||
} elseif($type < 1 && $type > 3) {
|
|
||||||
echo '<b style=\'color: Red;\'>Не верный тип аккаунта ...</b>';
|
|
||||||
} else {
|
|
||||||
if($us['vip'] > 0 && $us['vip_time'] > time()) {
|
|
||||||
if($type == 1) {
|
|
||||||
if($us['vip'] == 1) {
|
|
||||||
$vip['sokr'] = 1; $vip['zash'] = 1; $vip['invisible'] = 1; $vip['attack'] = 1; $vip['bloodattack'] = 1;
|
|
||||||
$sql = '`sokr` = "'.$vip['sokr'].'", `zash` = "'.$vip['zash'].'", `invisible` = "'.$vip['invisible'].'", `attack` = "'.$vip['attack'].'", `bloodattack` = "'.$vip['bloodattack'].'", `sleep30` = "0", `dontattack` = "0", `travmoff` = "0", `unsleep` = "0", `pers_attack` = "0"';
|
|
||||||
mysql_query('UPDATE `users` SET `vip` = 1, `vip_time` = "'.$afected.'" WHERE `id` = "'.$us['id'].'" LIMIT 1');
|
|
||||||
$t = 'обновлён'; $add = 'обновил';
|
|
||||||
} elseif($us['vip'] == 2) {
|
|
||||||
$vip['sokr'] = 1; $vip['zash'] = 1; $vip['invisible'] = 2; $vip['attack'] = 1; $vip['bloodattack'] = 1; $vip['sleep30'] = 1; $vip['dontattack'] = 1; $vip['travmoff'] = 1; $vip['unsleep'] = 1;
|
|
||||||
$sql = '`sokr` = "'.$vip['sokr'].'", `zash` = "'.$vip['zash'].'", `invisible` = "'.$vip['invisible'].'", `attack` = "'.$vip['attack'].'", `bloodattack` = "'.$vip['bloodattack'].'", `sleep30` = "'.$vip['sleep30'].'", `dontattack` = "'.$vip['dontattack'].'", `travmoff` = "'.$vip['travmoff'].'", `unsleep` = "'.$vip['unsleep'].'", `pers_attack` = "0"';
|
|
||||||
mysql_query('UPDATE `users` SET `vip` = 1, `vip_time` = "'.$n_time.'" WHERE `id` = "'.$us['id'].'" LIMIT 1');
|
|
||||||
$t = 'выдан'; $add = 'присвоил';
|
|
||||||
} elseif($us['vip'] == 3) {
|
|
||||||
$vip['sokr'] = 1; $vip['zash'] = 1; $vip['invisible'] = 3; $vip['attack'] = 1; $vip['bloodattack'] = 1; $vip['sleep30'] = 1; $vip['dontattack'] = 2; $vip['travmoff'] = 1; $vip['unsleep'] = 2; $vip['pers_attack'] = 1;
|
|
||||||
$sql = '`sokr` = "'.$vip['sokr'].'", `zash` = "'.$vip['zash'].'", `invisible` = "'.$vip['invisible'].'", `attack` = "'.$vip['attack'].'", `bloodattack` = "'.$vip['bloodattack'].'", `sleep30` = "'.$vip['sleep30'].'", `dontattack` = "'.$vip['dontattack'].'", `travmoff` = "'.$vip['travmoff'].'", `unsleep` = "'.$vip['unsleep'].'", `pers_attack` = "'.$vip['pers_attack'].'"';
|
|
||||||
mysql_query('UPDATE `users` SET `vip` = 1, `vip_time` = "'.$n_time.'" WHERE `id` = "'.$us['id'].'" LIMIT 1');
|
|
||||||
$t = 'выдан'; $add = 'присвоил';
|
|
||||||
}
|
|
||||||
mysql_query('UPDATE `abils_vip` SET '.$sql.' WHERE `id` = "'.$vip['id'].'" LIMIT 1');
|
|
||||||
echo '<b style=\'color: Red;\'>Персонажу '.$us['login'].', '.$t.' '.$types[$type].' аккаунт. Сроком '.$srok.'</b>';
|
|
||||||
$txt = 'Ангел <b>'.$user['login'].'</b> '.$add.' вам <b>'.$types[$type].' аккаунт</b>, сроком '.$srok.'';
|
|
||||||
|
|
||||||
addchp('<font color=red>Внимание!</font> '.$txt, '{[]}'.Nick::id($us['id'])->short().'{[]}');
|
|
||||||
} elseif($type == 2) {
|
|
||||||
if($us['vip'] == 1) {
|
|
||||||
$vip['sokr'] = 1; $vip['zash'] = 1; $vip['invisible'] = 1; $vip['attack'] = 1; $vip['bloodattack'] = 1;
|
|
||||||
$sql = '`sokr` = "'.$vip['sokr'].'", `zash` = "'.$vip['zash'].'", `invisible` = "'.$vip['invisible'].'", `attack` = "'.$vip['attack'].'", `bloodattack` = "'.$vip['bloodattack'].'", `sleep30` = "0", `dontattack` = "0", `travmoff` = "0", `unsleep` = "0", `pers_attack` = "0"';
|
|
||||||
mysql_query('UPDATE `users` SET `vip` = 2, `vip_time` = "'.$n_time.'" WHERE `id` = "'.$us['id'].'" LIMIT 1');
|
|
||||||
$t = 'выдан'; $add = 'присвоил';
|
|
||||||
} elseif($us['vip'] == 2) {
|
|
||||||
$vip['sokr'] = 1; $vip['zash'] = 1; $vip['invisible'] = 2; $vip['attack'] = 1; $vip['bloodattack'] = 1; $vip['sleep30'] = 1; $vip['dontattack'] = 1; $vip['travmoff'] = 1; $vip['unsleep'] = 1;
|
|
||||||
$sql = '`sokr` = "'.$vip['sokr'].'", `zash` = "'.$vip['zash'].'", `invisible` = "'.$vip['invisible'].'", `attack` = "'.$vip['attack'].'", `bloodattack` = "'.$vip['bloodattack'].'", `sleep30` = "'.$vip['sleep30'].'", `dontattack` = "'.$vip['dontattack'].'", `travmoff` = "'.$vip['travmoff'].'", `unsleep` = "'.$vip['unsleep'].'", `pers_attack` = "0"';
|
|
||||||
mysql_query('UPDATE `users` SET `vip` = 2, `vip_time` = "'.$afected.'" WHERE `id` = "'.$us['id'].'" LIMIT 1');
|
|
||||||
$t = 'обновлен'; $add = 'обновил';
|
|
||||||
} elseif($us['vip'] == 3) {
|
|
||||||
$vip['sokr'] = 1; $vip['zash'] = 1; $vip['invisible'] = 3; $vip['attack'] = 1; $vip['bloodattack'] = 1; $vip['sleep30'] = 1; $vip['dontattack'] = 2; $vip['travmoff'] = 1; $vip['unsleep'] = 2; $vip['pers_attack'] = 1;
|
|
||||||
$sql = '`sokr` = "'.$vip['sokr'].'", `zash` = "'.$vip['zash'].'", `invisible` = "'.$vip['invisible'].'", `attack` = "'.$vip['attack'].'", `bloodattack` = "'.$vip['bloodattack'].'", `sleep30` = "'.$vip['sleep30'].'", `dontattack` = "'.$vip['dontattack'].'", `travmoff` = "'.$vip['travmoff'].'", `unsleep` = "'.$vip['unsleep'].'", `pers_attack` = "'.$vip['pers_attack'].'"';
|
|
||||||
mysql_query('UPDATE `users` SET `vip` = 2, `vip_time` = "'.$n_time.'" WHERE `id` = "'.$us['id'].'" LIMIT 1');
|
|
||||||
$t = 'выдан'; $add = 'присвоил';
|
|
||||||
}
|
|
||||||
mysql_query('UPDATE `abils_vip` SET '.$sql.' WHERE `id` = "'.$vip['id'].'" LIMIT 1');
|
|
||||||
echo '<b style=\'color: Red;\'>Персонажу '.$us['login'].', '.$t.' '.$types[$type].' аккаунт. Сроком '.$srok.'</b>';
|
|
||||||
$txt = 'Ангел <b>'.$user['login'].'</b> '.$add.' вам <b>'.$types[$type].' аккаунт</b>, сроком '.$srok.'';
|
|
||||||
|
|
||||||
addchp('<font color=red>Внимание!</font> '.$txt, '{[]}'.Nick::id($us['id'])->short().'{[]}');
|
|
||||||
} elseif($type == 3) {
|
|
||||||
if($us['vip'] == 1) {
|
|
||||||
$vip['sokr'] = 1; $vip['zash'] = 1; $vip['invisible'] = 1; $vip['attack'] = 1; $vip['bloodattack'] = 1;
|
|
||||||
$sql = '`sokr` = "'.$vip['sokr'].'", `zash` = "'.$vip['zash'].'", `invisible` = "'.$vip['invisible'].'", `attack` = "'.$vip['attack'].'", `bloodattack` = "'.$vip['bloodattack'].'", `sleep30` = "0", `dontattack` = "0", `travmoff` = "0", `unsleep` = "0", `pers_attack` = "0"';
|
|
||||||
mysql_query('UPDATE `users` SET `vip` = 3, `vip_time` = "'.$n_time.'" WHERE `id` = "'.$us['id'].'" LIMIT 1');
|
|
||||||
$t = 'выдан'; $add = 'присвоил';
|
|
||||||
} elseif($us['vip'] == 2) {
|
|
||||||
$vip['sokr'] = 1; $vip['zash'] = 1; $vip['invisible'] = 2; $vip['attack'] = 1; $vip['bloodattack'] = 1; $vip['sleep30'] = 1; $vip['dontattack'] = 1; $vip['travmoff'] = 1; $vip['unsleep'] = 1;
|
|
||||||
$sql = '`sokr` = "'.$vip['sokr'].'", `zash` = "'.$vip['zash'].'", `invisible` = "'.$vip['invisible'].'", `attack` = "'.$vip['attack'].'", `bloodattack` = "'.$vip['bloodattack'].'", `sleep30` = "'.$vip['sleep30'].'", `dontattack` = "'.$vip['dontattack'].'", `travmoff` = "'.$vip['travmoff'].'", `unsleep` = "'.$vip['unsleep'].'", `pers_attack` = "0"';
|
|
||||||
mysql_query('UPDATE `users` SET `vip` = 3, `vip_time` = "'.$n_time.'" WHERE `id` = "'.$us['id'].'" LIMIT 1');
|
|
||||||
$t = 'выдан'; $add = 'присвоил';
|
|
||||||
} elseif($us['vip'] == 3) {
|
|
||||||
$vip['sokr'] = 1; $vip['zash'] = 1; $vip['invisible'] = 3; $vip['attack'] = 1; $vip['bloodattack'] = 1; $vip['sleep30'] = 1; $vip['dontattack'] = 2; $vip['travmoff'] = 1; $vip['unsleep'] = 2; $vip['pers_attack'] = 1;
|
|
||||||
$sql = '`sokr` = "'.$vip['sokr'].'", `zash` = "'.$vip['zash'].'", `invisible` = "'.$vip['invisible'].'", `attack` = "'.$vip['attack'].'", `bloodattack` = "'.$vip['bloodattack'].'", `sleep30` = "'.$vip['sleep30'].'", `dontattack` = "'.$vip['dontattack'].'", `travmoff` = "'.$vip['travmoff'].'", `unsleep` = "'.$vip['unsleep'].'", `pers_attack` = "'.$vip['pers_attack'].'"';
|
|
||||||
mysql_query('UPDATE `users` SET `vip` = 3, `vip_time` = "'.$afected.'" WHERE `id` = "'.$us['id'].'" LIMIT 1');
|
|
||||||
$t = 'обновлен'; $add = 'обновил';
|
|
||||||
}
|
|
||||||
mysql_query('UPDATE `abils_vip` SET '.$sql.' WHERE `id` = "'.$vip['id'].'" LIMIT 1');
|
|
||||||
echo '<b style=\'color: Red;\'>Персонажу '.$us['login'].', '.$t.' '.$types[$type].' аккаунт. Сроком '.$srok.'</b>';
|
|
||||||
$txt = 'Ангел <b>'.$user['login'].'</b> '.$add.' вам <b>'.$types[$type].' аккаунт</b>, сроком '.$srok.'';
|
|
||||||
|
|
||||||
addchp('<font color=red>Внимание!</font> '.$txt, '{[]}'.Nick::id($us['id'])->short().'{[]}');
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if(isset($vip['id'])) {
|
|
||||||
if($type == 1) {
|
|
||||||
$vip['invisible'] += 1; $vip['attack'] = 1; $vip['bloodattack'] = 1;
|
|
||||||
$sql = '`invisible` = "'.$vip['invisible'].'", `attack` = "'.$vip['attack'].'", `bloodattack` = "'.$vip['bloodattack'].'"';
|
|
||||||
} elseif($type == 2) {
|
|
||||||
$vip['invisible'] += 2; $vip['attack'] = 1; $vip['bloodattack'] = 1; $vip['sleep30'] = 1; $vip['dontattack'] = 1; $vip['travmoff'] = 1; $vip['unsleep'] = 1;
|
|
||||||
$sql = '`invisible` = "'.$vip['invisible'].'", `attack` = "'.$vip['attack'].'", `bloodattack` = "'.$vip['bloodattack'].'", `sleep30` = "'.$vip['sleep30'].'", `dontattack` = "'.$vip['dontattack'].'", `travmoff` = "'.$vip['travmoff'].'", `unsleep` = "'.$vip['unsleep'].'"';
|
|
||||||
} elseif($type == 3) {
|
|
||||||
$vip['invisible'] += 3; $vip['attack'] = 1; $vip['bloodattack'] = 1; $vip['sleep30'] = 1; $vip['dontattack'] += 2; $vip['travmoff'] = 1; $vip['unsleep'] += 2; $vip['pers_attack'] = 1;
|
|
||||||
$sql = '`invisible` = "'.$vip['invisible'].'", `attack` = "'.$vip['attack'].'", `bloodattack` = "'.$vip['bloodattack'].'", `sleep30` = "'.$vip['sleep30'].'", `dontattack` = "'.$vip['dontattack'].'", `travmoff` = "'.$vip['travmoff'].'", `unsleep` = "'.$vip['unsleep'].'", `pers_attack` = "'.$vip['pers_attack'].'"';
|
|
||||||
}
|
|
||||||
$add = 'Выдал';
|
|
||||||
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 '<b style=\'color: Red;\'>Персонажу '.$us['login'].', выдан '.$types[$type].' аккаунт. Сроком '.$srok.'</b>';
|
|
||||||
$txt = 'Ангел <b>'.$user['login'].'</b> '.$add.' вам <b>'.$types[$type].' аккаунт</b>, сроком '.$srok.'';
|
|
||||||
|
|
||||||
addchp('<font color=red>Внимание!</font> '.$txt, '{[]}'.Nick::id($us['id'])->short().'{[]}');
|
|
||||||
|
|
||||||
} else {
|
|
||||||
if($type == 1) {
|
|
||||||
$vip['sokr'] = 1; $vip['zash'] = 1; $vip['invisible'] = 1; $vip['attack'] = 1; $vip['bloodattack'] = 1;
|
|
||||||
$sql = '`sokr` = "'.$vip['sokr'].'", `zash` = "'.$vip['zash'].'", `invisible` = "'.$vip['invisible'].'", `attack` = "'.$vip['attack'].'", `bloodattack` = "'.$vip['bloodattack'].'"';
|
|
||||||
} elseif($type == 2) {
|
|
||||||
$vip['sokr'] = 1; $vip['zash'] = 1; $vip['invisible'] = 2; $vip['attack'] = 1; $vip['bloodattack'] = 1; $vip['sleep30'] = 1; $vip['dontattack'] = 1; $vip['travmoff'] = 1; $vip['unsleep'] = 1;
|
|
||||||
$sql = '`sokr` = "'.$vip['sokr'].'", `zash` = "'.$vip['zash'].'", `invisible` = "'.$vip['invisible'].'", `attack` = "'.$vip['attack'].'", `bloodattack` = "'.$vip['bloodattack'].'"';
|
|
||||||
|
|
||||||
} elseif($type == 3) {
|
|
||||||
$vip['sokr'] = 1; $vip['zash'] = 1; $vip['invisible'] = 3; $vip['attack'] = 1; $vip['bloodattack'] = 1; $vip['sleep30'] = 1; $vip['dontattack'] = 2; $vip['travmoff'] = 1; $vip['unsleep'] = 2; $vip['pers_attack'] = 1;
|
|
||||||
$sql = '`sokr` = "'.$vip['sokr'].'", `zash` = "'.$vip['zash'].'", `invisible` = "'.$vip['invisible'].'", `attack` = "'.$vip['attack'].'", `bloodattack` = "'.$vip['bloodattack'].'"';
|
|
||||||
|
|
||||||
}
|
|
||||||
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 '<b style=\'color: Red;\'>Персонажу '.$us['login'].', выдан '.$types[$type].' аккаунт. Сроком '.$srok.'</b>';
|
|
||||||
$txt = 'Ангел <b>'.$user['login'].'</b> присвоил вам <b>'.$types[$type].' аккаунт</b>, сроком '.$srok.'';
|
|
||||||
|
|
||||||
addchp('<font color=red>Внимание!</font> '.$txt, '{[]}'.Nick::id($us['id'])->short().'{[]}');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -17,10 +17,10 @@ if (!empty($_GET['teleport']) && $user->getAdmin() == 1) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# ORDEN PHP
|
# ORDEN PHP
|
||||||
|
$_POST['use'] = $_POST['use'] ?? null;
|
||||||
if ($user->getAdmin()) {
|
if ($user->getAdmin()) {
|
||||||
$abil = db::c()->query('SELECT abil FROM users WHERE id = ?i', $user->getId())->fetch_assoc();
|
$abil = db::c()->query('SELECT 1 FROM users WHERE id = ?i', $user->getId())->fetch_assoc();
|
||||||
$abil = unserialize($abil['abil']);
|
//$abil = unserialize($abil['abil']);
|
||||||
switch ($_POST['use']) {
|
switch ($_POST['use']) {
|
||||||
case "healing":
|
case "healing":
|
||||||
include("./magic/Healing.php");
|
include("./magic/Healing.php");
|
||||||
@ -68,10 +68,6 @@ if ($user->getAdmin()) {
|
|||||||
//Заменён на CureInjury.php class. Придумать вызов.
|
//Заменён на CureInjury.php class. Придумать вызов.
|
||||||
//include("./magic/ct_all.php");
|
//include("./magic/ct_all.php");
|
||||||
break;
|
break;
|
||||||
case "check":
|
|
||||||
include("./magic/check.php");
|
|
||||||
break;
|
|
||||||
|
|
||||||
case "attack":
|
case "attack":
|
||||||
include("./magic/eattack.php");
|
include("./magic/eattack.php");
|
||||||
break;
|
break;
|
||||||
@ -138,239 +134,9 @@ if ($user->getAdmin()) {
|
|||||||
case "bexit":
|
case "bexit":
|
||||||
include("./magic/bexit.php");
|
include("./magic/bexit.php");
|
||||||
break;
|
break;
|
||||||
case "vip":
|
|
||||||
include("./magic/vips.php");
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#RELIKT PHP
|
|
||||||
function klan_relicts()
|
|
||||||
{
|
|
||||||
global $user;
|
|
||||||
$r = '';
|
|
||||||
if ($user->getClan() > 0) {
|
|
||||||
$abils = db::c()->query('SELECT `id`, `klan`, `sleep15`, `sleep30`, `closebattle`, `heal20`, `heal35`, `heal50`, `travmoff`, `attack`, `bloodattack`, `death`, `comment`, `openbattle`, `reamdeath`, `clone`, `unclone` FROM `abils_klan` WHERE `klan` = ?i', $user->getClan())->fetch_assoc();
|
|
||||||
if ($abils['sleep15'] > 0) {
|
|
||||||
$r .= '<div class="item"><a href=\'javascript: void(0);\' onclick=\'runmagic1("Введите имя персонажа", "?useds=1", "target")\'><img src=\'i/sh/silence15.gif\' title=\'Заклятие молчания 15 минут\' /></a><div class="amount">' . $abils['sleep15'] . '</div></div>';
|
|
||||||
} else {
|
|
||||||
$r .= '<div class="item"><a href=\'javascript: void(0);\'><img src=\'i/sh/silence15.gif\' style=\'opacity: 0.3;\' title=\'Заклятие молчания 15 минут\' /></a><div class="amount">0</div></div>';
|
|
||||||
}
|
|
||||||
if ($abils['sleep30'] > 0) {
|
|
||||||
$r .= '<div class="item"><a href=\'javascript: void(0);\' onclick=\'runmagic1("Введите имя персонажа", "?useds=2", "target")\'><img src=\'i/sh/silence30.gif\' title=\'Заклятие молчания 30 минут\' /></a><div class="amount">' . $abils['sleep30'] . '</div></div>';
|
|
||||||
} else {
|
|
||||||
$r .= '<div class="item"><a href=\'javascript: void(0);\'><img src=\'i/sh/silence30.gif\' style=\'opacity: 0.3;\' title=\'Заклятие молчания 30 минут\' /></a><div class="amount">0</div></div>';
|
|
||||||
}
|
|
||||||
if ($abils['closebattle'] > 0) {
|
|
||||||
$r .= '<div class="item"><a href=\'?useds=3\'><img src=\'i/sh/closebattle.gif\' title=\'Закрыть бой\' /></a><div class="amount">' . $abils['closebattle'] . '</div></div>';
|
|
||||||
} else {
|
|
||||||
$r .= '<div class="item"><a href=\'javascript: void(0);\'><img src=\'i/sh/closebattle.gif\' style=\'opacity: 0.3;\' title=\'Закрыть бой\' /></a><div class="amount">0</div></div>';
|
|
||||||
}
|
|
||||||
if ($abils['heal20'] > 0) {
|
|
||||||
$r .= '<div class="item"><a href=\'?useds=4\'><img src=\'i/sh/cureHP15.gif\' title=\'Исцеление +20%\' /></a><div class="amount">' . $abils['heal20'] . '</div></div>';
|
|
||||||
} else {
|
|
||||||
$r .= '<div class="item"><a href=\'javascript: void(0);\'><img src=\'i/sh/cureHP15.gif\' style=\'opacity: 0.3;\' title=\'Исцеление +20%\' /></a><div class="amount">0</div></div>';
|
|
||||||
}
|
|
||||||
if ($abils['heal35'] > 0) {
|
|
||||||
$r .= '<div class="item"><a href=\'?useds=5\'><img src=\'i/sh/cureHP45.gif\' title=\'Исцеление +35%\' /></a><div class="amount">' . $abils['heal35'] . '</div></div>';
|
|
||||||
} else {
|
|
||||||
$r .= '<div class="item"><a href=\'javascript: void(0);\'><img src=\'i/sh/cureHP45.gif\' style=\'opacity: 0.3;\' title=\'Исцеление +35%\' /></a><div class="amount">0</div></div>';
|
|
||||||
}
|
|
||||||
if ($abils['heal50'] > 0) {
|
|
||||||
$r .= '<div class="item"><a href=\'?useds=6\'><img src=\'i/sh/cureHP60.gif\' title=\'Исцеление +50%\' /></a><div class="amount">' . $abils['heal50'] . '</div></div>';
|
|
||||||
} else {
|
|
||||||
$r .= '<div class="item"><a href=\'javascript: void(0);\'><img src=\'i/sh/cureHP60.gif\' style=\'opacity: 0.3;\' title=\'Исцеление +50%\' /></a><div class="amount">0</div></div>';
|
|
||||||
}
|
|
||||||
if ($abils['travmoff'] > 0) {
|
|
||||||
$r .= '<div class="item"><a href=\'javascript: void(0);\' onclick=\'runmagic1("Введите имя персонажа", "?useds=7", "target")\'><img src=\'i/sh/cure3.gif\' title=\'Лечение тяжелой травмы\' /></a><div class="amount">' . $abils['travmoff'] . '</div></div>';
|
|
||||||
} else {
|
|
||||||
$r .= '<div class="item"><a href=\'javascript: void(0);\'><img src=\'i/sh/cure3.gif\' style=\'opacity: 0.3;\' title=\'Лечение тяжелой травмы\' /></a><div class="amount">0</div></div>';
|
|
||||||
}
|
|
||||||
if ($abils['attack'] > 0) {
|
|
||||||
$r .= '<div class="item"><a href=\'javascript: void(0);\' onclick=\'runmagic1("Введите имя персонажа", "?useds=8", "target")\'><img src=\'i/sh/attack.gif\' title=\'Нападение\' /></a><div class="amount">' . $abils['attack'] . '</div></div>';
|
|
||||||
} else {
|
|
||||||
$r .= '<div class="item"><a href=\'javascript: void(0);\'><img src=\'i/sh/attack.gif\' style=\'opacity: 0.3;\' title=\'Нападение\' /></a><div class="amount">0</div></div>';
|
|
||||||
}
|
|
||||||
if ($abils['bloodattack'] > 0) {
|
|
||||||
$r .= '<div class="item"><a href=\'javascript: void(0);\' onclick=\'runmagic1("Введите имя персонажа", "?useds=10", "target")\'><img src=\'i/sh/attackb.gif\' title=\'Кровавое нападение\' /></a><div class="amount">' . $abils['bloodattack'] . '</div></div>';
|
|
||||||
} else {
|
|
||||||
$r .= '<div class="item"><a href=\'javascript: void(0);\'><img src=\'i/sh/attackb.gif\' style=\'opacity: 0.3;\' title=\'Кровавое нападение\' /></a><div class="amount">0</div></div>';
|
|
||||||
}
|
|
||||||
if ($abils['death'] > 0) {
|
|
||||||
$r .= '<div class="item" style=\'display: none;\'><a href=\'javascript: void(0);\'><img src=\'i/sh/poison_e.gif\' title=\'Объятия смерти\' /></a><div class="amount">' . $abils['death'] . '</div></div>';
|
|
||||||
} else {
|
|
||||||
$r .= '<div class="item" style=\'display: none;\'><a href=\'javascript: void(0);\'><img src=\'i/sh/poison_e.gif\' style=\'opacity: 0.3;\' title=\'Объятия смерти\' /></a><div class="amount">0</div></div>';
|
|
||||||
}
|
|
||||||
if ($abils['comment'] > 0) {
|
|
||||||
$r .= '<div class="item"><a href=\'javascript: void(0);\' onclick=\'note("Запрос", "?useds=11", "target");\'><img src=\'i/sh/note.gif\' title=\'Записки Комментатора\' /></a><div class="amount">' . $abils['comment'] . '</div></div>';
|
|
||||||
} else {
|
|
||||||
$r .= '<div class="item"><a href=\'javascript: void(0);\'><img src=\'i/sh/note.gif\' style=\'opacity: 0.3;\' title=\'Записки Комментатора\' /></a><div class="amount">0</div></div>';
|
|
||||||
}
|
|
||||||
if ($abils['openbattle'] > 0) {
|
|
||||||
$r .= '<div class="item"><a href=\'?useds=12\'><img src=\'i/sh/unlockbattle.gif\' title=\'Открыть бой\' /></a><div class="amount">' . $abils['openbattle'] . '</div></div>';
|
|
||||||
} else {
|
|
||||||
$r .= '<div class="item"><a href=\'javascript: void(0);\'><img src=\'i/sh/unlockbattle.gif\' style=\'opacity: 0.3;\' title=\'Открыть бой\' /></a><div class="amount">0</div></div>';
|
|
||||||
}
|
|
||||||
if ($abils['reamdeath'] > 0) {
|
|
||||||
$r .= '<div class="item" style=\'display: none;\'><a href=\'javascript: void(0);\'><img src=\'i/sh/reanimationD.gif\' title=\'Поднять мертвого\' /></a><div class="amount">' . $abils['reamdeath'] . '</div></div>';
|
|
||||||
} else {
|
|
||||||
$r .= '<div class="item" style=\'display: none;\'><a href=\'javascript: void(0);\'><img src=\'i/sh/reanimationD.gif\' style=\'opacity: 0.3;\' title=\'Поднять мертвого\' /></a><div class="amount">0</div></div>';
|
|
||||||
}
|
|
||||||
if ($abils['clone'] > 0) {
|
|
||||||
$r .= '<div class="item"><a href=\'?useds=14\'><img src=\'i/sh/mirror.gif\' title=\'Клонирование\' /></a><div class="amount">' . $abils['clone'] . '</div></div>';
|
|
||||||
} else {
|
|
||||||
$r .= '<div class="item"><a href=\'javascript: void(0);\'><img src=\'i/sh/mirror.gif\' style=\'opacity: 0.3;\' title=\'Клонирование\' /></a><div class="amount">0</div></div>';
|
|
||||||
}
|
|
||||||
if ($abils['unclone'] > 0) {
|
|
||||||
$r .= '<div class="item"><a href=\'javascript: void(0);\' onclick=\'runmagic1("Введите имя персонажа", "?useds=15", "target")\'><img src=\'i/sh/antimirror.gif\' title=\'Эфирное воздействие\' /></a><div class="amount">' . $abils['unclone'] . '</div></div>';
|
|
||||||
} else {
|
|
||||||
$r .= '<div class="item"><a href=\'javascript: void(0);\'><img src=\'i/sh/antimirror.gif\' style=\'opacity: 0.3;\' title=\'Эфирное воздействие\' /></a><div class="amount">0</div></div>';
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
$r = 'Вы не состоите в клане ...';
|
|
||||||
}
|
|
||||||
return $r;
|
|
||||||
}
|
|
||||||
|
|
||||||
function user_relicts()
|
|
||||||
{
|
|
||||||
global $user;
|
|
||||||
$r = '';
|
|
||||||
$abils = db::c()->query('SELECT `id`, `uid`, `sleep15`, `sleep30`, `closebattle`, `heal20`, `heal35`, `heal50`, `travmoff`, `attack`, `bloodattack`, `death`, `comment`, `openbattle`, `reamdeath`, `clone`, `unclone` FROM `abils_user` WHERE `uid` = ?i', $user->getId())->fetch_assoc();
|
|
||||||
if ($abils['sleep15'] > 0) {
|
|
||||||
$r .= '<div class="item"><a href=\'javascript: void(0);\' onclick=\'runmagic1("Введите имя персонажа", "?used=1", "target")\'><img src=\'i/sh/silence15.gif\' title=\'Заклятие молчания 15 минут\' /></a><div class="amount">' . $abils['sleep15'] . '</div></div>';
|
|
||||||
} else {
|
|
||||||
$r .= '<div class="item"><a href=\'javascript: void(0);\'><img src=\'i/sh/silence15.gif\' style=\'opacity: 0.3;\' title=\'Заклятие молчания 15 минут\' /></a><div class="amount">0</div></div>';
|
|
||||||
}
|
|
||||||
if ($abils['sleep30'] > 0) {
|
|
||||||
$r .= '<div class="item"><a href=\'javascript: void(0);\' onclick=\'runmagic1("Введите имя персонажа", "?used=2", "target")\'><img src=\'i/sh/silence30.gif\' title=\'Заклятие молчания 30 минут\' /></a><div class="amount">' . $abils['sleep30'] . '</div></div>';
|
|
||||||
} else {
|
|
||||||
$r .= '<div class="item"><a href=\'javascript: void(0);\'><img src=\'i/sh/silence30.gif\' style=\'opacity: 0.3;\' title=\'Заклятие молчания 30 минут\' /></a><div class="amount">0</div></div>';
|
|
||||||
}
|
|
||||||
if ($abils['closebattle'] > 0) {
|
|
||||||
$r .= '<div class="item"><a href=\'?used=3\'><img src=\'i/sh/closebattle.gif\' title=\'Закрыть бой\' /></a><div class="amount">' . $abils['closebattle'] . '</div></div>';
|
|
||||||
} else {
|
|
||||||
$r .= '<div class="item"><a href=\'javascript: void(0);\'><img src=\'i/sh/closebattle.gif\' style=\'opacity: 0.3;\' title=\'Закрыть бой\' /></a><div class="amount">0</div></div>';
|
|
||||||
}
|
|
||||||
if ($abils['heal20'] > 0) {
|
|
||||||
$r .= '<div class="item"><a href=\'?used=4\'><img src=\'i/sh/cureHP15.gif\' title=\'Исцеление +20%\' /></a><div class="amount">' . $abils['heal20'] . '</div></div>';
|
|
||||||
} else {
|
|
||||||
$r .= '<div class="item"><a href=\'javascript: void(0);\'><img src=\'i/sh/cureHP15.gif\' style=\'opacity: 0.3;\' title=\'Исцеление +20%\' /></a><div class="amount">0</div></div>';
|
|
||||||
}
|
|
||||||
if ($abils['heal35'] > 0) {
|
|
||||||
$r .= '<div class="item"><a href=\'?used=5\'><img src=\'i/sh/cureHP45.gif\' title=\'Исцеление +35%\' /></a><div class="amount">' . $abils['heal35'] . '</div></div>';
|
|
||||||
} else {
|
|
||||||
$r .= '<div class="item"><a href=\'javascript: void(0);\'><img src=\'i/sh/cureHP45.gif\' style=\'opacity: 0.3;\' title=\'Исцеление +35%\' /></a><div class="amount">0</div></div>';
|
|
||||||
}
|
|
||||||
if ($abils['heal50'] > 0) {
|
|
||||||
$r .= '<div class="item"><a href=\'?used=6\'><img src=\'i/sh/cureHP60.gif\' title=\'Исцеление +50%\' /></a><div class="amount">' . $abils['heal50'] . '</div></div>';
|
|
||||||
} else {
|
|
||||||
$r .= '<div class="item"><a href=\'javascript: void(0);\'><img src=\'i/sh/cureHP60.gif\' style=\'opacity: 0.3;\' title=\'Исцеление +50%\' /></a><div class="amount">0</div></div>';
|
|
||||||
}
|
|
||||||
if ($abils['travmoff'] > 0) {
|
|
||||||
$r .= '<div class="item"><a href=\'javascript: void(0);\' onclick=\'runmagic1("Введите имя персонажа", "?used=7", "target")\'><img src=\'i/sh/cure3.gif\' title=\'Лечение тяжелой травмы\' /></a><div class="amount">' . $abils['travmoff'] . '</div></div>';
|
|
||||||
} else {
|
|
||||||
$r .= '<div class="item"><a href=\'javascript: void(0);\'><img src=\'i/sh/cure3.gif\' style=\'opacity: 0.3;\' title=\'Лечение тяжелой травмы\' /></a><div class="amount">0</div></div>';
|
|
||||||
}
|
|
||||||
if ($abils['attack'] > 0) {
|
|
||||||
$r .= '<div class="item"><a href=\'javascript: void(0);\' onclick=\'runmagic1("Введите имя персонажа", "?used=8", "target")\'><img src=\'i/sh/attack.gif\' title=\'Нападение\' /></a><div class="amount">' . $abils['attack'] . '</div></div>';
|
|
||||||
} else {
|
|
||||||
$r .= '<div class="item"><a href=\'javascript: void(0);\'><img src=\'i/sh/attack.gif\' style=\'opacity: 0.3;\' title=\'Нападение\' /></a><div class="amount">0</div></div>';
|
|
||||||
}
|
|
||||||
if ($abils['bloodattack'] > 0) {
|
|
||||||
$r .= '<div class="item"><a href=\'javascript: void(0);\' onclick=\'runmagic1("Введите имя персонажа", "?used=9", "target")\'><img src=\'i/sh/attackb.gif\' title=\'Кровавое нападение\' /></a><div class="amount">' . $abils['bloodattack'] . '</div></div>';
|
|
||||||
} else {
|
|
||||||
$r .= '<div class="item"><a href=\'javascript: void(0);\'><img src=\'i/sh/attackb.gif\' style=\'opacity: 0.3;\' title=\'Кровавое нападение\' /></a><div class="amount">0</div></div>';
|
|
||||||
}
|
|
||||||
if ($abils['death'] > 0) {
|
|
||||||
$r .= '<div class="item" style=\'display: none;\'><a href=\'javascript: void(0);\' onclick=\'runmagic1("Введите имя персонажа", "?used=10", "target")\'><img src=\'i/sh/poison_e.gif\' title=\'Объятия смерти\' /></a><div class="amount">' . $abils['death'] . '</div></div>';
|
|
||||||
} else {
|
|
||||||
$r .= '<div class="item" style=\'display: none;\'><a href=\'javascript: void(0);\'><img src=\'i/sh/poison_e.gif\' style=\'opacity: 0.3;\' title=\'Объятия смерти\' /></a><div class="amount">0</div></div>';
|
|
||||||
}
|
|
||||||
if ($abils['comment'] > 0) {
|
|
||||||
$r .= '<div class="item"><a href=\'javascript: void(0);\' onclick=\'note("Запрос", "?used=11", "target");\'><img src=\'i/sh/note.gif\' title=\'Записки Комментатора\' /></a><div class="amount">' . $abils['comment'] . '</div></div>';
|
|
||||||
} else {
|
|
||||||
$r .= '<div class="item"><a href=\'javascript: void(0);\'><img src=\'i/sh/note.gif\' style=\'opacity: 0.3;\' title=\'Записки Комментатора\' /></a><div class="amount">0</div></div>';
|
|
||||||
}
|
|
||||||
if ($abils['openbattle'] > 0) {
|
|
||||||
$r .= '<div class="item"><a href=\'?used=12\'><img src=\'i/sh/unlockbattle.gif\' title=\'Открыть бой\' /></a><div class="amount">' . $abils['openbattle'] . '</div></div>';
|
|
||||||
} else {
|
|
||||||
$r .= '<div class="item"><a href=\'javascript: void(0);\'><img src=\'i/sh/unlockbattle.gif\' style=\'opacity: 0.3;\' title=\'Открыть бой\' /></a><div class="amount">0</div></div>';
|
|
||||||
}
|
|
||||||
if ($abils['reamdeath'] > 0) {
|
|
||||||
$r .= '<div class="item" style=\'display: none;\'><a href=\'javascript: void(0);\' onclick=\'runmagic1("Введите имя персонажа", "?used=13", "target")\'><img src=\'i/sh/reanimationD.gif\' title=\'Поднять мертвого\' /></a><div class="amount">' . $abils['reamdeath'] . '</div></div>';
|
|
||||||
} else {
|
|
||||||
$r .= '<div class="item" style=\'display: none;\'><a href=\'javascript: void(0);\'><img src=\'i/sh/reanimationD.gif\' style=\'opacity: 0.3;\' title=\'Поднять мертвого\' /></a><div class="amount">0</div></div>';
|
|
||||||
}
|
|
||||||
if ($abils['clone'] > 0) {
|
|
||||||
$r .= '<div class="item"><a href=\'?used=14\'><img src=\'i/sh/mirror.gif\' title=\'Клонирование\' /></a><div class="amount">' . $abils['clone'] . '</div></div>';
|
|
||||||
} else {
|
|
||||||
$r .= '<div class="item"><a href=\'javascript: void(0);\'><img src=\'i/sh/mirror.gif\' style=\'opacity: 0.3;\' title=\'Клонирование\' /></a><div class="amount">0</div></div>';
|
|
||||||
}
|
|
||||||
if ($abils['unclone'] > 0) {
|
|
||||||
$r .= '<div class="item"><a href=\'javascript: void(0);\' onclick=\'runmagic1("Введите имя персонажа", "?used=15", "target")\'><img src=\'i/sh/antimirror.gif\' title=\'Эфирное воздействие\' /></a><div class="amount">' . $abils['unclone'] . '</div></div>';
|
|
||||||
} else {
|
|
||||||
$r .= '<div class="item"><a href=\'javascript: void(0);\'><img src=\'i/sh/antimirror.gif\' style=\'opacity: 0.3;\' title=\'Эфирное воздействие\' /></a><div class="amount">0</div></div>';
|
|
||||||
}
|
|
||||||
return $r;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isset($_GET['used'])) {
|
|
||||||
if ($_GET['used'] == 3) {
|
|
||||||
include('magic/usability_user/close_battle.php');
|
|
||||||
} elseif ($_GET['used'] == 4) {
|
|
||||||
//include('magic/usability_user/heal20.php');
|
|
||||||
} elseif ($_GET['used'] == 5) {
|
|
||||||
//include('magic/usability_user/heal35.php');
|
|
||||||
} elseif ($_GET['used'] == 6) {
|
|
||||||
//include('magic/usability_user/heal50.php');
|
|
||||||
} elseif ($_GET['used'] == 7) {
|
|
||||||
//Заменён на CureInjury.php class. Придумать вызов.
|
|
||||||
//include('magic/usability_user/travmoff.php');
|
|
||||||
} elseif ($_GET['used'] == 8) {
|
|
||||||
include('magic/usability_user/attack.php');
|
|
||||||
} elseif ($_GET['used'] == 9) {
|
|
||||||
include('magic/usability_user/attack_blood.php');
|
|
||||||
} elseif ($_GET['used'] == 11) {
|
|
||||||
include('magic/usability_user/note.php');
|
|
||||||
} elseif ($_GET['used'] == 12) {
|
|
||||||
include('magic/usability_user/open_battle.php');
|
|
||||||
} elseif ($_GET['used'] == 13) {
|
|
||||||
include('magic/usability_user/reamdeath.php');
|
|
||||||
} elseif ($_GET['used'] == 14) {
|
|
||||||
include('magic/usability_user/clone.php');
|
|
||||||
} elseif ($_GET['used'] == 15) {
|
|
||||||
include('magic/usability_user/unclone.php');
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($_GET['useds'])) {
|
|
||||||
if ($_GET['useds'] == 3) {
|
|
||||||
include('magic/usability_klan/close_battle.php');
|
|
||||||
} elseif ($_GET['useds'] == 4) {
|
|
||||||
//include('magic/usability_klan/heal20.php');
|
|
||||||
} elseif ($_GET['useds'] == 5) {
|
|
||||||
//include('magic/usability_klan/heal35.php');
|
|
||||||
} elseif ($_GET['useds'] == 6) {
|
|
||||||
//include('magic/usability_klan/heal50.php');
|
|
||||||
} elseif ($_GET['useds'] == 7) {
|
|
||||||
//Заменён на CureInjury.php class. Придумать вызов.
|
|
||||||
//include('magic/usability_klan/travmoff.php');
|
|
||||||
} elseif ($_GET['useds'] == 8) {
|
|
||||||
include('magic/usability_klan/attack.php');
|
|
||||||
} elseif ($_GET['useds'] == 9) {
|
|
||||||
include('magic/usability_klan/attack_blood.php');
|
|
||||||
} elseif ($_GET['useds'] == 11) {
|
|
||||||
include('magic/usability_klan/note.php');
|
|
||||||
} elseif ($_GET['useds'] == 12) {
|
|
||||||
include('magic/usability_klan/open_battle.php');
|
|
||||||
} elseif ($_GET['useds'] == 13) {
|
|
||||||
include('magic/usability_klan/reamdeath.php');
|
|
||||||
} elseif ($_GET['useds'] == 14) {
|
|
||||||
include('magic/usability_klan/clone.php');
|
|
||||||
} elseif ($_GET['useds'] == 15) {
|
|
||||||
include('magic/usability_klan/unclone.php');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function show_byu($type)
|
function show_byu($type)
|
||||||
{
|
{
|
||||||
@ -411,8 +177,8 @@ function show_byu($type)
|
|||||||
35 => 'antimirror',
|
35 => 'antimirror',
|
||||||
];
|
];
|
||||||
if ($user->getClan()) {
|
if ($user->getClan()) {
|
||||||
$clan = db::c()->query('SELECT `id`, `glava` FROM `clans` WHERE `id` = ?i', $user->getClan())->fetch_assoc();
|
$clan = db::c()->query('SELECT owner_id FROM clans WHERE short_name = "?s"', $user->getClan())->fetch_assoc();
|
||||||
if ($clan['glava'] == $user->getId()) {
|
if ($clan['owner_id'] == $user->getId()) {
|
||||||
$r = '<div style="text-align: center;"><a href="javascript:void(0);" class="byu_klan" id="' . $type . '">купить 1 шт.</a></div>';
|
$r = '<div style="text-align: center;"><a href="javascript:void(0);" class="byu_klan" id="' . $type . '">купить 1 шт.</a></div>';
|
||||||
} else {
|
} else {
|
||||||
$r = '<div style="text-align: center;"><a href="javascript:void(0);">Вы не глава</a></div>';
|
$r = '<div style="text-align: center;"><a href="javascript:void(0);">Вы не глава</a></div>';
|
||||||
@ -431,250 +197,44 @@ function show_byu($type)
|
|||||||
FFFF;
|
FFFF;
|
||||||
}
|
}
|
||||||
|
|
||||||
$is_ = db::c()->query('SELECT `id` FROM `abils_user` WHERE `uid` = ?i', $user->getId())->fetch_assoc();
|
|
||||||
if (empty($is_['id'])) {
|
|
||||||
db::c()->query('INSERT INTO `abils_user` (`uid`) VALUES (?i)', $user->getId());
|
|
||||||
}
|
|
||||||
|
|
||||||
if (empty($user->getClan())) {
|
|
||||||
$is_ = db::c()->query('SELECT `id` FROM `abils_klan` WHERE `klan` = ?i', $user->getClan())->fetch_assoc();
|
|
||||||
if (empty($is_['id'])) {
|
|
||||||
db::c()->query('INSERT INTO `abils_klan` (`klan`) VALUES (?i)', $user->getClan());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$bank = db::c()->query('SELECT `ekr` FROM `bank` WHERE `id` = ?i ', $_SESSION['uid'])->fetch_assoc();
|
|
||||||
|
|
||||||
|
|
||||||
Template::header('user_abilities');
|
Template::header('user_abilities');
|
||||||
|
echo <<<RELICTS
|
||||||
|
<span class='legend'>Клановые и личные реликты</span><br>
|
||||||
|
<button disabled>sleep15</button>
|
||||||
|
<button disabled>sleep30</button>
|
||||||
|
<button disabled>closebattle</button>
|
||||||
|
<button disabled>heal20</button>
|
||||||
|
<button disabled>heal35</button>
|
||||||
|
<button disabled>heal50</button>
|
||||||
|
<button disabled>travmoff</button>
|
||||||
|
<button disabled>attack</button>
|
||||||
|
<button disabled>bloodattack</button>
|
||||||
|
<button disabled>death</button>
|
||||||
|
<button disabled>comment</button>
|
||||||
|
<button disabled>openbattle</button>
|
||||||
|
<button disabled>reamdeath</button>
|
||||||
|
<button disabled>clone</button>
|
||||||
|
<button disabled>unclone</button>
|
||||||
|
RELICTS;
|
||||||
|
if ($user->getAdmin()) {
|
||||||
|
echo <<<A
|
||||||
|
<button onclick="location.href='?teleport=1'">Телепорт на ЦП</button>
|
||||||
|
A;
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
<div style="float: right;">
|
<div style="float: right;">
|
||||||
<?php if ($user->getAdmin() == 1): ?>
|
|
||||||
<button onclick="location.href='?teleport=1'">Телепорт на ЦП</button>
|
|
||||||
<?php endif; ?>
|
|
||||||
<input type="button" onClick="location.href='main.php';" value="Вернуться">
|
<input type="button" onClick="location.href='main.php';" value="Вернуться">
|
||||||
</div>
|
</div>
|
||||||
<h2>Особые умения</h2>
|
<h2>Особые умения</h2>
|
||||||
<div style="text-align: center;" id=hint3></div>
|
<div style="text-align: center;" id=hint3></div>
|
||||||
<div>
|
<div>
|
||||||
<?php
|
<?php
|
||||||
foreach ($moj as $k => $v) {
|
if ($user->getAlign() == 2 || $user->getAdmin()) // Нейтралы
|
||||||
switch ($k) {
|
|
||||||
case "sleep":
|
|
||||||
$script_name = "runmagic0";
|
|
||||||
$magic_name = "Наложить заклятие молчания";
|
|
||||||
break;
|
|
||||||
case "sleepf":
|
|
||||||
$script_name = "runmagicf";
|
|
||||||
$magic_name = "Наложить заклятие форумного молчания";
|
|
||||||
break;
|
|
||||||
case "healing":
|
|
||||||
$script_name = "runmagic1";
|
|
||||||
$magic_name = "Лечение";
|
|
||||||
break;
|
|
||||||
case "al_neut_power":
|
|
||||||
$script_name = "RunmagicSelf";
|
|
||||||
$magic_name = "Сила нейтралитета";
|
|
||||||
break;
|
|
||||||
case "ct1":
|
|
||||||
$script_name = "runmagic1";
|
|
||||||
$magic_name = "Исцелить легкую травму";
|
|
||||||
break;
|
|
||||||
case "ct2":
|
|
||||||
$script_name = "runmagic1";
|
|
||||||
$magic_name = "Исцелить среднюю травму";
|
|
||||||
break;
|
|
||||||
case "ct3":
|
|
||||||
$script_name = "runmagic1";
|
|
||||||
$magic_name = "Исцелить тяжелую травму";
|
|
||||||
break;
|
|
||||||
case "sleep_off":
|
|
||||||
$script_name = "runmagic1";
|
|
||||||
$magic_name = "Снять заклятие молчания";
|
|
||||||
break;
|
|
||||||
case "sleepf_off":
|
|
||||||
$script_name = "runmagic1";
|
|
||||||
$magic_name = "Снять заклятие форумного молчания";
|
|
||||||
break;
|
|
||||||
case "haos":
|
|
||||||
$script_name = "runmagic2";
|
|
||||||
$magic_name = "Наложить заклятие хаоса";
|
|
||||||
break;
|
|
||||||
case "haos_off":
|
|
||||||
$script_name = "runmagic1";
|
|
||||||
$magic_name = "Снять заклятие хаоса";
|
|
||||||
break;
|
|
||||||
case "death":
|
|
||||||
$script_name = "runmagic1";
|
|
||||||
$magic_name = "Наложить заклятие смерти";
|
|
||||||
break;
|
|
||||||
case "death_off":
|
|
||||||
$script_name = "runmagic1";
|
|
||||||
$magic_name = "Снять заклятие смерти";
|
|
||||||
break;
|
|
||||||
case "obezl":
|
|
||||||
$script_name = "runmagic2";
|
|
||||||
$magic_name = "Наложить заклятие обезличивания";
|
|
||||||
break;
|
|
||||||
case "obezl_off":
|
|
||||||
$script_name = "runmagic1";
|
|
||||||
$magic_name = "Снять заклятие обезличивания";
|
|
||||||
break;
|
|
||||||
case "pal_off":
|
|
||||||
$script_name = "runmagic1";
|
|
||||||
$magic_name = "Лишить звания Паладин";
|
|
||||||
break;
|
|
||||||
case "attack":
|
|
||||||
$script_name = "runmagic1";
|
|
||||||
$magic_name = "Нападение";
|
|
||||||
break;
|
|
||||||
case "attack_t":
|
|
||||||
$script_name = "runmagic1";
|
|
||||||
$magic_name = "Нападение на Темного";
|
|
||||||
break;
|
|
||||||
case "battack":
|
|
||||||
$script_name = "runmagic1";
|
|
||||||
$magic_name = "Кровавое нападение";
|
|
||||||
break;
|
|
||||||
case "attackk_close":
|
|
||||||
$script_name = "runmagic1";
|
|
||||||
$magic_name = "Кулачное закрытое кровавое нападение";
|
|
||||||
break;
|
|
||||||
case "attackk_open":
|
|
||||||
$script_name = "runmagic1";
|
|
||||||
$magic_name = "Кулачное закрытое нападение";
|
|
||||||
break;
|
|
||||||
case "marry":
|
|
||||||
$script_name = "runmagic4";
|
|
||||||
$magic_name = "Зарегистрировать брак";
|
|
||||||
break;
|
|
||||||
case "unmarry":
|
|
||||||
$script_name = "runmagic4";
|
|
||||||
$magic_name = "Расторгнуть брак";
|
|
||||||
break;
|
|
||||||
case "hidden":
|
|
||||||
$script_name = "runmagic1";
|
|
||||||
$magic_name = "Заклятие невидимости";
|
|
||||||
break;
|
|
||||||
case "teleport":
|
|
||||||
$script_name = "runmagic";
|
|
||||||
$magic_name = "Телепортация";
|
|
||||||
break;
|
|
||||||
case "check":
|
|
||||||
$script_name = "runmagic1";
|
|
||||||
$magic_name = "Поставить проверку";
|
|
||||||
break;
|
|
||||||
case "ct_all":
|
|
||||||
$script_name = "runmagic1";
|
|
||||||
$magic_name = "Вылечить от травм";
|
|
||||||
break;
|
|
||||||
case "pal_buttons":
|
|
||||||
$script_name = "runmagic1";
|
|
||||||
$magic_name = "Отметить о прохождении проверки";
|
|
||||||
break;
|
|
||||||
case "vampir":
|
|
||||||
$script_name = "runmagic1";
|
|
||||||
$magic_name = "Вампиризм (выпить энергию другого игрока)";
|
|
||||||
break;
|
|
||||||
case "brat":
|
|
||||||
$script_name = "runmagic1";
|
|
||||||
$magic_name = "Помочь темному собрату (вмешаться в поединок)";
|
|
||||||
break;
|
|
||||||
case "dneit":
|
|
||||||
$script_name = "runmagic1";
|
|
||||||
$magic_name = "Присвоить склонность (Нейтральное Братство)";
|
|
||||||
break;
|
|
||||||
case "dpal":
|
|
||||||
$script_name = "runmagic";
|
|
||||||
$magic_name = "Присвоить склонность (Паладин)";
|
|
||||||
break;
|
|
||||||
case "ddark":
|
|
||||||
$script_name = "runmagic1";
|
|
||||||
$magic_name = "Присвоить склонность (Темное Братство)";
|
|
||||||
break;
|
|
||||||
case "dlight":
|
|
||||||
$script_name = "runmagic1";
|
|
||||||
$magic_name = "Присвоить склонность (Светлое Братство)";
|
|
||||||
break;
|
|
||||||
case "un_align":
|
|
||||||
$script_name = "runmagic1";
|
|
||||||
$magic_name = "Лишить склонности";
|
|
||||||
break;
|
|
||||||
case "note":
|
|
||||||
$script_name = "runmagic";
|
|
||||||
$magic_name = "Редактировать личное дело";
|
|
||||||
break;
|
|
||||||
case "sys":
|
|
||||||
$script_name = "runmagic";
|
|
||||||
$magic_name = "Отправить в чат системное сообщение";
|
|
||||||
break;
|
|
||||||
case "scanner":
|
|
||||||
$script_name = "runmagic";
|
|
||||||
$magic_name = "Показать лог действий модератора";
|
|
||||||
break;
|
|
||||||
case "rep":
|
|
||||||
$script_name = "runmagic";
|
|
||||||
$magic_name = "Отчет о переводах";
|
|
||||||
break;
|
|
||||||
case "rost":
|
|
||||||
$script_name = "runmagic";
|
|
||||||
$magic_name = "Присвоить статус";
|
|
||||||
break;
|
|
||||||
case "ldadd":
|
|
||||||
$script_name = "";
|
|
||||||
$magic_name = "Записать причину отправки в Хаос";
|
|
||||||
break;
|
|
||||||
case "crush":
|
|
||||||
$script_name = "runmagic1";
|
|
||||||
$magic_name = "Сокрушение";
|
|
||||||
break;
|
|
||||||
case "def":
|
|
||||||
$script_name = "runmagic1";
|
|
||||||
$magic_name = "Защита от оружия";
|
|
||||||
break;
|
|
||||||
case "bexit":
|
|
||||||
$script_name = "runmagic1";
|
|
||||||
$magic_name = "Выйти из боя";
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($script_name) {
|
|
||||||
$action_ok = 1;
|
|
||||||
$abil = db::c()->query('SELECT `abil` FROM `users` WHERE `id`= ?i', $_SESSION['uid'])->fetch_assoc();
|
|
||||||
$abil = unserialize($abil['abil']);
|
|
||||||
|
|
||||||
if ($user->getAlign() == 2) {
|
|
||||||
if ($k == 'al_neut_power' && $abil[0] < 1) {
|
|
||||||
$action_ok = 0;
|
|
||||||
}
|
|
||||||
if ($k == 'attackk_close' && $abil[1] < 1) {
|
|
||||||
$action_ok = 0;
|
|
||||||
}
|
|
||||||
if ($k == 'attackk_open' && $abil[2] < 1) {
|
|
||||||
$action_ok = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if ($user->getAlign() == 6) {
|
|
||||||
if ($k == 'ct1' && $abil[0] < 1) {
|
|
||||||
$action_ok = 0;
|
|
||||||
}
|
|
||||||
if ($k == 'ct2' && $abil[1] < 1) {
|
|
||||||
$action_ok = 0;
|
|
||||||
}
|
|
||||||
if ($k == 'ct3' && $abil[2] < 1) {
|
|
||||||
$action_ok = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if ($action_ok > 0) {
|
|
||||||
print "<a onclick=\"javascript:$script_name('$magic_name','$k','target','target1') \" href='#'><img src='i/magic/" . $k . ".gif' title='" . $magic_name . "'></a> ";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if ($user->getAlign() == 2) // Нейтралы
|
|
||||||
{
|
{
|
||||||
|
|
||||||
$abil = db::c()->query('SELECT `abil` FROM `users` WHERE `id`= ?i', $_SESSION['uid'])->fetch_assoc();
|
$abil = db::c()->query('SELECT 1 FROM `users` WHERE `id`= ?i', $_SESSION['uid'])->fetch_assoc();
|
||||||
$abil = unserialize($abil['abil']);
|
//$abil = unserialize($abil['abil']);
|
||||||
for ($i = 0; $i < 3; $i++) {
|
for ($i = 0; $i < 3; $i++) {
|
||||||
if (!$abil[$i]) {
|
if (!$abil[$i]) {
|
||||||
$abil[$i] = 0;
|
$abil[$i] = 0;
|
||||||
@ -686,11 +246,11 @@ Template::header('user_abilities');
|
|||||||
echo("<img src='i/magic/attackk_open.gif' title='Кулачное закрытое нападение'> Кулачное закрытое нападение - " . $abil[2] . "<br />");
|
echo("<img src='i/magic/attackk_open.gif' title='Кулачное закрытое нападение'> Кулачное закрытое нападение - " . $abil[2] . "<br />");
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($user->getAlign() == 6) // Свет
|
if ($user->getAlign() == 6 || $user->getAdmin()) // Свет
|
||||||
{
|
{
|
||||||
|
|
||||||
$abil = db::c()->query('SELECT `abil` FROM `users` WHERE `id`= ?i', $_SESSION['uid'])->fetch_assoc();
|
$abil = db::c()->query('SELECT 1 FROM `users` WHERE `id`= ?i', $_SESSION['uid'])->fetch_assoc();
|
||||||
$abil = unserialize($abil['abil']);
|
//$abil = unserialize($abil['abil']);
|
||||||
for ($i = 0; $i < 3; $i++) {
|
for ($i = 0; $i < 3; $i++) {
|
||||||
if (!$abil[$i]) {
|
if (!$abil[$i]) {
|
||||||
$abil[$i] = 0;
|
$abil[$i] = 0;
|
||||||
@ -710,7 +270,7 @@ Template::header('user_abilities');
|
|||||||
<legend id="personal" class="box_user" href="#inlin" style="cursor: pointer;"
|
<legend id="personal" class="box_user" href="#inlin" style="cursor: pointer;"
|
||||||
title="Магазин персональных реликтов">Персональные :
|
title="Магазин персональных реликтов">Персональные :
|
||||||
</legend>
|
</legend>
|
||||||
<?= user_relicts(); ?>
|
[список в шапке]
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</div>
|
</div>
|
||||||
<div style="padding-top: 15px;">
|
<div style="padding-top: 15px;">
|
||||||
@ -718,7 +278,7 @@ Template::header('user_abilities');
|
|||||||
<legend id="klans" class="box_klan" href="#inlines" style="cursor: pointer;"
|
<legend id="klans" class="box_klan" href="#inlines" style="cursor: pointer;"
|
||||||
title="Магазин клановых реликтов">Клановые :
|
title="Магазин клановых реликтов">Клановые :
|
||||||
</legend>
|
</legend>
|
||||||
<?= klan_relicts(); ?>
|
[список в шапке]
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</div>
|
</div>
|
||||||
<div style="padding-top: 13px; padding-bottom: 13px;">
|
<div style="padding-top: 13px; padding-bottom: 13px;">
|
||||||
|
Loading…
Reference in New Issue
Block a user