Удаляем функции дилеров из админпанели.
This commit is contained in:
parent
44d106696f
commit
f7d95e3a56
129
admin/admin.php
129
admin/admin.php
@ -9,6 +9,8 @@ session_start();
|
|||||||
include "../config.php";
|
include "../config.php";
|
||||||
include "../functions.php";
|
include "../functions.php";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (empty($user['admin'])) {
|
if (empty($user['admin'])) {
|
||||||
echo "<!DOCTYPE HTML><html><head><title>404 Not Found</title></head><body><h1>Not Found</h1><p>The requested URL /admin.php was not found on this server.</p><hr><address>Apache/2.2.22 (@RELEASE@) Server at Hetzner Datacenter 426</address></body></html>";
|
echo "<!DOCTYPE HTML><html><head><title>404 Not Found</title></head><body><h1>Not Found</h1><p>The requested URL /admin.php was not found on this server.</p><hr><address>Apache/2.2.22 (@RELEASE@) Server at Hetzner Datacenter 426</address></body></html>";
|
||||||
exit;
|
exit;
|
||||||
@ -115,7 +117,8 @@ if ($_POST['ali']) { //Что делает эта штука?
|
|||||||
array_shift($accs);
|
array_shift($accs);
|
||||||
array_shift($accs);
|
array_shift($accs);
|
||||||
array_shift($accs);
|
array_shift($accs);
|
||||||
mysql_query("INSERT INTO `aligns` (`align`,`img`,`name`,`accses`) values ('{$_POST['ali']}','{$_POST['im']}','{$_POST['txt']}','" . imp($accs) . "') ON DUPLICATE KEY UPDATE `img` = '{$_POST['im']}', `name` = '{$_POST['txt']}', accses = '" . imp($accs) . "';");
|
db::c()->query('INSERT INTO `aligns` (`align`,`img`,`name`,`accses`) VALUES ("?s","?s","?s","?s") ON DUPLICATE KEY UPDATE `img` = "?s", `name` = "?s", `accses` = "?s"',$_POST['ali'],$_POST['im'],$_POST['txt'],imp($accs),$_POST['im'],$_POST['txt'],imp($accs));
|
||||||
|
#mysql_query("INSERT INTO `aligns` (`align`,`img`,`name`,`accses`) values ('{$_POST['ali']}','{$_POST['im']}','{$_POST['txt']}','" . imp($accs) . "') ON DUPLICATE KEY UPDATE `img` = '{$_POST['im']}', `name` = '{$_POST['txt']}', accses = '" . imp($accs) . "';");
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($_POST['sbr_par']) {
|
if ($_POST['sbr_par']) {
|
||||||
@ -137,7 +140,7 @@ if ($_POST['sbr_par']) {
|
|||||||
|
|
||||||
<form action='admin.php' method='post'>
|
<form action='admin.php' method='post'>
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<legend><a href='#' onclick='show(\"sk\")'>Склонности</a></legend>
|
<legend><a href='#' onclick='show("sk")'>Склонности</a></legend>
|
||||||
<div id=sk style='display:none;'>
|
<div id=sk style='display:none;'>
|
||||||
<table>
|
<table>
|
||||||
<?php
|
<?php
|
||||||
@ -1041,129 +1044,7 @@ if ($_POST['login'] && $_POST['krest']) {
|
|||||||
else mysql_query("UPDATE `users` SET `align` = '" . $_POST['krest'] . "',`status` = '$rang' WHERE `login` = '" . $_POST['login'] . "';");
|
else mysql_query("UPDATE `users` SET `align` = '" . $_POST['krest'] . "',`status` = '$rang' WHERE `login` = '" . $_POST['login'] . "';");
|
||||||
}
|
}
|
||||||
|
|
||||||
# ДИЛЕР ФУНКЦИИ
|
|
||||||
if (($user['deal'] == 1) || $user['admin'] == 1) {
|
|
||||||
if ($_POST['putekr']) {
|
|
||||||
if (($_POST['ekr']) && ($_POST['bank'])) {
|
|
||||||
# $deallerekr=mysql_fetch_array(mysql_query("SELECT ekr FROM `bank` WHERE `owner` = '{$user['id']}' LIMIT 1;"));
|
|
||||||
# $numdeallerekr=$deallerekr['ekr'];
|
|
||||||
if ($user['ekr'] < $_POST['ekr']) {
|
|
||||||
print "<b><font color=red>На Вашем счету не хватает екров!</font></b>";
|
|
||||||
} else {
|
|
||||||
$bank = mysql_fetch_array(mysql_query("SELECT owner,id FROM `bank` WHERE `id` = '{$_POST['bank']}' LIMIT 1;"));
|
|
||||||
$_POST['ekr'] = round($_POST['ekr'], 2);
|
|
||||||
if (mysql_query("UPDATE `bank` set `ekr` = ekr+'{$_POST['ekr']}' WHERE `id` = '{$_POST['bank']}' LIMIT 1;")) {
|
|
||||||
mysql_query("INSERT INTO `dilerdelo` (dilerid,dilername,bank,owner,ekr) values ('{$user['id']}','{$user['login']}','{$_POST['bank']}','{$_POST['tonick']}','{$_POST['ekr']}');");
|
|
||||||
mysql_query("INSERT INTO `delo`(`id` , `author` ,`pers`, `text`, `type`, `date`) VALUES ('','0','{$tonick['id']}','Получено " . $_POST['ekr'] . " екр на счет №" . $_POST['bank'] . " от дилера " . $user['login'] . "',1,'" . time() . "');");
|
|
||||||
mysql_query("UPDATE `users` set `ekr` = ekr-'{$_POST['ekr']}' WHERE `id` = '{$user['id']}' LIMIT 1;");
|
|
||||||
print "<b><font color=red>Успешно зачислено {$_POST['ekr']} екр. на счет {$_POST['bank']}!</font></b>";
|
|
||||||
} else {
|
|
||||||
print "<b><font color=red>Ошибка записи в базу данных!</font></b>";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
print "<b><font color=red>Введите сумму и номер счета!</font></b>";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($_POST['checkbank']) {
|
|
||||||
if ($_POST['charlogin']) {
|
|
||||||
$tonick = mysql_fetch_array(mysql_query("SELECT login,id FROM `users` WHERE `login` = '{$_POST['charlogin']}' LIMIT 1;"));
|
|
||||||
$bankdb = mysql_query("SELECT owner,id FROM `bank` WHERE `owner` = '{$tonick['id']}'");
|
|
||||||
print "Персонажу {$_POST['charlogin']} принадлежат счета: <br>";
|
|
||||||
while ($bank = mysql_fetch_array($bankdb)) {
|
|
||||||
print "№ {$bank['id']} <br>";
|
|
||||||
}
|
|
||||||
} else if ($_POST['charbank']) {
|
|
||||||
$bank = mysql_fetch_array(mysql_query("SELECT owner,id FROM `bank` WHERE `id` = '{$_POST['charbank']} 'LIMIT 1;"));
|
|
||||||
$tonick = mysql_fetch_array(mysql_query("SELECT login,id FROM `users` WHERE `id` = '{$bank['owner']}' LIMIT 1;"));
|
|
||||||
print "Счет № {$_POST['charbank']} принадлежит персонажу {$tonick['login']} <br>";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
?>
|
|
||||||
<h4>Дилерская панель (недоработано)</h4>
|
|
||||||
На счету: <b><?= $user['ekr']; ?></b> екр.<p>
|
|
||||||
<form method=post>
|
|
||||||
<legend>Зачислить екры на счет</legend>
|
|
||||||
<input name='ekr' placeholder="Введите сумму "> <input name='bank' placeholder="Номер счета "> <input
|
|
||||||
type=submit name=putekr value='Зачислить'>
|
|
||||||
</form>
|
|
||||||
<form method=post>
|
|
||||||
<legend>Проверить логин / номер счета</legend>
|
|
||||||
<input name='charlogin' placeholder="Логин"> <input name='charbank' placeholder="Номер счета"> <input
|
|
||||||
type=submit name=checkbank value='Проверить'>
|
|
||||||
</form>
|
|
||||||
<form method=post>
|
|
||||||
<legend>Присвоить склонность <sup>[выключено]</sup></legend>
|
|
||||||
<input name='sklonkalog' placeholder="Логин" disabled>
|
|
||||||
<select name='sklonka' disabled>
|
|
||||||
<option value='0'>Склонность</option>
|
|
||||||
<option value='6'>Светлое Братство</option>
|
|
||||||
<option value='2'>Нейтральное Братство</option>
|
|
||||||
<option value='3'>Темное Братство</option>
|
|
||||||
</select>
|
|
||||||
<input type=submit name=givesklonka value='Присвоить' disabled>
|
|
||||||
</form>
|
|
||||||
<?php
|
|
||||||
|
|
||||||
echo "<hr>";
|
|
||||||
if (!$_POST['dlogs']) $_POST['dlogs'] = date("d.m.y");
|
|
||||||
|
|
||||||
if ($user['admin'] == 1) {
|
|
||||||
echo '<TABLE><TR><TD colspan=3><FORM METHOD=POST>
|
|
||||||
Просмотреть дилерские переводы персонажа: <INPUT NAME=dfilter value="' . $_POST['dfilter'] . '"> за <INPUT NAME=dlogs size=12 value="' . $_POST['dlogs'] . '"> <INPUT TYPE=submit value="Просмотреть!"></form></TD>
|
|
||||||
</tr><tr><td><FORM METHOD=POST><INPUT TYPE=hidden NAME=dfilter value="' . $_POST['dfilter'] . '">
|
|
||||||
<INPUT TYPE=hidden NAME=dlogs value="' . date("d.m.y", mktime(0, 0, 0, substr($_POST['dlogs'], 3, 2), substr($_POST['dlogs'], 0, 2) - 1, "20" . substr($_POST['dlogs'], 6, 2))) . '">
|
|
||||||
<INPUT TYPE=submit value=" « "></form></TD>
|
|
||||||
<TD valign=top align=center>Дилерские переводы персонажа <b>"' . $_POST['dfilter'] . '"</b> за <b>' . $_POST['dlogs'] . '</b></TD>
|
|
||||||
<TD><FORM METHOD=POST><INPUT TYPE=hidden NAME=dlogs value="' . date("d.m.y", mktime(0, 0, 0, substr($_POST['dlogs'], 3, 2), substr($_POST['dlogs'], 0, 2) + 1, "20" . substr($_POST['dlogs'], 6, 2))) . '">
|
|
||||||
<INPUT TYPE=hidden NAME=dfilter value="' . $_POST['dfilter'] . '"> <INPUT TYPE=submit value=" » "></form></TD>
|
|
||||||
</TR></TABLE></form>';
|
|
||||||
} elseif ($user['deal'] == 1) {
|
|
||||||
echo '<TABLE><TR><TD colspan=3><FORM METHOD=POST>
|
|
||||||
Просмотреть дилерские переводы <INPUT TYPE=hidden NAME=dfilter value="' . $user['login'] . '">за <INPUT NAME=dlogs size=12 value="' . $_POST['dlogs'] . '"> <INPUT TYPE=submit value="Просмотреть!"></form></TD>
|
|
||||||
</tr><tr><td><FORM METHOD=POST><INPUT TYPE=hidden NAME=dfilter value="' . $_POST['dfilter'] . '">
|
|
||||||
<INPUT TYPE=hidden NAME=dlogs value="' . date("d.m.y", mktime(0, 0, 0, substr($_POST['dlogs'], 3, 2), substr($_POST['dlogs'], 0, 2) - 1, "20" . substr($_POST['dlogs'], 6, 2))) . '">
|
|
||||||
<INPUT TYPE=submit value=" « "></form></TD>
|
|
||||||
<TD valign=top align=center>Дилерские переводы персонажа <b>"' . $_POST['dfilter'] . '"</b> за <b>' . $_POST['dlogs'] . '</b></TD>
|
|
||||||
<TD><FORM METHOD=POST><INPUT TYPE=hidden NAME=dlogs value="' . date("d.m.y", mktime(0, 0, 0, substr($_POST['dlogs'], 3, 2), substr($_POST['dlogs'], 0, 2) + 1, "20" . substr($_POST['dlogs'], 6, 2))) . '">
|
|
||||||
<INPUT TYPE=hidden NAME=dfilter value="' . $_POST['dfilter'] . '"> <INPUT TYPE=submit value=" » "></form></TD>
|
|
||||||
</TR></TABLE></form>';
|
|
||||||
}
|
|
||||||
if ($_POST['dfilter']) {
|
|
||||||
$perevod1 = mysql_fetch_array(mysql_query("SELECT `login`,`id`,`align` FROM `users` WHERE `login` = '{$_POST['dfilter']}' LIMIT 1;"));
|
|
||||||
$aa = $perevod1['id'];
|
|
||||||
if ($user['admin'] == 1 || $user['deal'] == 1) {
|
|
||||||
$logsat = $_POST['dlogs'];
|
|
||||||
$ddate33 = "20" . substr($_POST['dlogs'], 6, 2) . "-" . substr($_POST['dlogs'], 3, 2) . "-" . substr($_POST['dlogs'], 0, 2) . "";
|
|
||||||
$dlogs = mysql_query("SELECT * FROM `dilerdelo` WHERE `dilerid` = '{$perevod1['id']}' AND `date` like '$ddate33%' ORDER by `id` ASC;");
|
|
||||||
while ($row = @mysql_fetch_array($dlogs)) {
|
|
||||||
switch ($row['addition']) {
|
|
||||||
case "2":
|
|
||||||
$sklo = "Нейтральная";
|
|
||||||
echo "<span class=date>{$row['date']}</span> Продана {$sklo} склонность персонажу {$row['owner']} (50 екр.)<br>";
|
|
||||||
break;
|
|
||||||
case "3":
|
|
||||||
$sklo = "Темная";
|
|
||||||
echo "<span class=date>{$row['date']}</span> Продана {$sklo} склонность персонажу {$row['owner']} (50 екр.)<br>";
|
|
||||||
break;
|
|
||||||
case "6":
|
|
||||||
$sklo = "Светлая";
|
|
||||||
echo "<span class=date>{$row['date']}</span> Продана {$sklo} склонность персонажу {$row['owner']} (50 екр.)<br>";
|
|
||||||
break;
|
|
||||||
case "0":
|
|
||||||
echo "<span class=date>{$row['date']}</span> Переведено {$row['ekr']} екр. персонажу {$row['owner']} (счет №{$row['bank']})<br>";
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
|
|
||||||
|
|
||||||
<?php
|
|
||||||
################################################
|
################################################
|
||||||
################ ВСЕ ЯВАСКРИПТЫ ################
|
################ ВСЕ ЯВАСКРИПТЫ ################
|
||||||
################################################
|
################################################
|
||||||
|
Loading…
Reference in New Issue
Block a user