2018-01-28 16:40:49 +00:00
< ? php
session_start ();
if ( ! isset ( $_SESSION [ 'uid' ])) header ( " Location: index.php " );
include ( " config.php " );
include ( " functions.php " );
if ( $user [ 'in_tower' ] == 1 ) { header ( 'Location: towerin.php' ); die (); }
2018-03-06 18:52:42 +00:00
//$al = mysql_fetch_assoc(mysql_query("SELECT * FROM `aligns` WHERE `align` = '{$user['align']}' LIMIT 1"));
$al = db :: c () -> query ( 'SELECT `accses`,`name` FROM `aligns` WHERE `align` = ?i' , $user [ 'align' ]) -> fetch_assoc ();
2018-01-28 16:40:49 +00:00
header ( " Cache-Control: no-cache " );
# Защита для свитков.
if (( int ) $user [ 'align' ] == 1 ) define ( 'PALADINS' , microtime ());
/*
1.1 > Паладин поднебесья
1.75 > Паладин Солнечной Улыбки
1.7 > Паладин Огненной Зари
1.91 > Паладин Н е б а
1.98 > Старший Паладин Н е б а
1.99 > Верховный
*/
$arr = array (
'delo' => array ( 1.1 , 1.7 , 1.75 , 1.91 , 1.98 , 1.99 ),
'telegraf' => array ( 1.1 , 1.7 , 1.75 , 1.91 , 1.98 , 1.99 ),
'trade' => array ( 1.7 , 1.91 , 1.98 , 1.99 ),
'golos' => array ( 1.99 ),
'showinvis' => array ( 1.7 , 1.75 , 1.91 , 1.98 , 1.99 )
);
?>
2018-03-06 18:52:42 +00:00
<! doctype html >
< html >
< head >
2018-02-13 23:13:16 +00:00
< link rel = stylesheet href = " css/main.css " >
< meta charset = " utf-8 " >
2018-01-28 16:40:49 +00:00
< style >
body {
margin : 5 px ;
background : #d4d4d4;
}
legend {
margin - top : 10 px ;
color : dimgray ;
font - family : consolas , monospace ;
font - size : 18 px ;
}
</ style >
</ head >
< body >
< table align = right >< tr >< td >< INPUT TYPE = " button " onClick = " location.href='main.php'; " value = " Вернуться " title = " Вернуться " ></ table >
< ? php
function imp ( $array ) {
2018-02-13 23:13:16 +00:00
$str = '' ;
2018-01-28 16:40:49 +00:00
foreach ( $array as $k => $v ) $str .= $k . " ; " . $v . " ; " ;
return $str ;
}
function expa ( $str ) {
2018-02-13 23:13:16 +00:00
$rarray = '' ;
2018-01-28 16:40:49 +00:00
$array = explode ( " ; " , $str );
for ( $i = 0 ; $i <= count ( $array ) - 2 ; $i = $i + 2 ) $rarray [ $array [ $i ]] = $array [ $i + 1 ];
return $rarray ;
}
2018-02-13 23:13:16 +00:00
echo " <h1>В с е абилки персонажа { $user [ 'login' ] } тут</h1> " ;
2018-01-28 16:40:49 +00:00
####################################################
## Н Е ТРОГАТЬ! Т У Т ОТКРЫВАЮТСЯ ВСПЛЫВАЮЩИЕ О К Н А !!!##
####################################################
echo " <div align=center id=hint3></div> " ;
####################################################
## пидорасы! © Ins.
/*
Чтобы использовать навык мало иметь доступ сюда .
Н о имея доступ сюда надо ещё и иметь прописанное право использовать е г о в БД .
Именно для этого нужна куча галочек в админке и оттуда парсится массив $al .
Отюда возможны казусы , когда в панели кнопка есть , но она ничего не делает .
Перед нами сборная солянка инклюдов :
1. х » Паладины
2. х » Админы о _О
2 » Нейтрал
3 » Тёмный
4 » Х а о с
5 » Дилер ( Н е применяется , так как deal = 1 проставляет дилеру свой значок ) .
6 » Светлый
7 » Боты или админы
8 » Боты или админы
10 » Админ - бот
50 » Дилер
.
А раз инклюды начинаются тут и строго прописаны , в самих свитках можно пренебречь проверками на склонность .
© Ins .
*/
//print_r($al);
if ( $user [ 'align' ] == 6 ) {
if ( date ( " G " ) > " 8 " && date ( " G " ) < " 20 " ) $moj = expa ( $al [ 'accses' ]);
else echo ( " Ваши способности доступны только днем! " );
}
else $moj = expa ( $al [ 'accses' ]);
if ( in_array ( $_POST [ 'use' ], array_keys ( $moj ))) {
//echo $_GET['use'];
$abil = mysql_fetch_array ( mysql_query ( " SELECT `abil` FROM `users` WHERE `id`=' { $user [ 'id' ] } '; " ));
$abil = unserialize ( $abil [ 'abil' ]);
switch ( $_POST [ 'use' ]) {
case " cure150 " : include ( " ./magic/cure150.php " ); break ;
case " al_neut_power " :
if ( $abil [ 0 ] > 0 && $user [ 'align' ] == 2 ) {
include ( " ./magic/al_neut_power.php " );
if ( $outok == 1 ) { $abil [ 0 ] -= 1 ; mysql_query ( " UPDATE `users` SET `abil`=' " . serialize ( $abil ) . " ' WHERE `id`=' { $user [ 'id' ] } '; " );}
}
elseif ( $user [ 'align' ] != 2 ) include ( " ./magic/al_neut_power.php " );
break ;
case " ct1 " :
if ( $abil [ 0 ] > 0 && $user [ 'align' ] == 6 ) {
include ( " ./magic/ct1.php " );
if ( $outok == 1 ) { $abil [ 0 ] -= 1 ; mysql_query ( " UPDATE `users` SET `abil`=' " . serialize ( $abil ) . " ' WHERE `id`=' { $user [ 'id' ] } '; " );}
}
elseif ( $user [ 'align' ] != 6 ) include ( " ./magic/ct1.php " );
break ;
case " ct2 " :
if ( $abil [ 1 ] > 0 && $user [ 'align' ] == 6 ) {
include ( " ./magic/ct2.php " );
if ( $outok == 1 ) { $abil [ 1 ] -= 1 ; mysql_query ( " UPDATE `users` SET `abil`=' " . serialize ( $abil ) . " ' WHERE `id`=' { $user [ 'id' ] } '; " );}
}
elseif ( $user [ 'align' ] != 6 ) include ( " ./magic/ct2.php " );
break ;
case " ct3 " :
if ( $abil [ 2 ] > 0 && $user [ 'align' ] == 6 ) {
include ( " ./magic/ct3.php " );
if ( $outok == 1 ) { $abil [ 2 ] -= 1 ; mysql_query ( " UPDATE `users` SET `abil`=' " . serialize ( $abil ) . " ' WHERE `id`=' { $user [ 'id' ] } '; " );}
}
elseif ( $user [ 'align' ] != 6 ) include ( " ./magic/ct3.php " );
break ;
case " sleep " : include ( " ./magic/sleep.php " ); break ;
case " sleepf " : include ( " ./magic/sleepf.php " ); break ;
case " sleep_off " : include ( " ./magic/sleep_off.php " ); break ;
case " sleepf_off " : include ( " ./magic/sleepf_off.php " ); break ;
case " haos " : include ( " ./magic/haos.php " ); break ;
case " haos_off " : include ( " ./magic/haos_off.php " ); break ;
case " obezl " : include ( " ./magic/obezl.php " ); break ;
case " obezl_off " : include ( " ./magic/obezl_off.php " ); break ;
case " death " : include ( " ./magic/death.php " ); break ;
case " death_off " : include ( " ./magic/death_off.php " ); break ;
case " ldadd " : include ( " ./magic/ldadd.php " ); break ;
case " pal_off " : include ( " ./magic/pal_off.php " ); break ;
case " marry " : include ( " ./magic/marry.php " ); break ;
case " unmarry " : include ( " ./magic/unmarry.php " ); break ;
case " ct_all " : include ( " ./magic/ct_all.php " ); break ;
case " check " : include ( " ./magic/check.php " ); break ;
case " attack " : include ( " ./magic/eattack.php " ); break ;
case " attack_t " :
include ( " ./magic/attack_t.php " );
if ( $skipper == 1 ) /* header("Location:fbattle.php");*/ die ( " <script>location.href='fbattle.php';</script> " );
break ;
case " battack " : include ( " ./magic/ebattack.php " ); break ;
case " attackk_close " :
if ( $abil [ 1 ] > 0 && $user [ 'align' ] == 2 ) {
include ( " ./magic/attackk_close.php " );
if ( $outok == 1 ) { $abil [ 1 ] -= 1 ; mysql_query ( " UPDATE `users` SET `abil`=' " . serialize ( $abil ) . " ' WHERE `id`=' { $user [ 'id' ] } '; " );
die ( " <script>location.href='fbattle.php';</script> " );}
}
else {
include ( " ./magic/attackk_close.php " );
die ( " <script>location.href='fbattle.php';</script> " );
}
break ;
case " attackk_open " :
if ( $abil [ 1 ] > 0 && $user [ 'align' ] == 2 ) {
include ( " ./magic/attackk_open.php " );
if ( $outok == 1 ) { $abil [ 2 ] -= 1 ; mysql_query ( " UPDATE `users` SET `abil`=' " . serialize ( $abil ) . " ' WHERE `id`=' { $user [ 'id' ] } '; " );
die ( " <script>location.href='fbattle.php';</script> " );}
}
else {
include ( " ./magic/attackk_open.php " );
die ( " <script>location.href='fbattle.php';</script> " );
}
break ;
case " brat " :
include ( " ./magic/brat.php " );
if ( $skipper == 1 ) /* header("Location:fbattle.php"); */ die ( " <script>location.href='fbattle.php';</script> " );
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 ;
case " dlight " : include ( " ./magic/dlight.php " ); break ;
case " ddark " : include ( " ./magic/ddark.php " ); break ;
case " dneit " : include ( " ./magic/dneit.php " ); break ;
case " un_align " : include ( " ./magic/un_align.php " ); break ;
}
}
echo " <table><tr><td><br><br> " ;
foreach ( $moj as $k => $v ) {
//echo $k;
switch ( $k ) {
case " sleep " : $script_name = " runmagic0 " ; $magic_name = " Наложить заклятие молчания " ; break ;
case " sleepf " : $script_name = " runmagicf " ; $magic_name = " Наложить заклятие форумного молчания " ; break ;
case " cure150 " : $script_name = " runmagic1 " ; $magic_name = " Лечение(150) " ; 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 = mysql_fetch_array ( mysql_query ( " SELECT `abil` FROM `users` WHERE `id`=' { $user [ 'id' ] } '; " ));
$abil = unserialize ( $abil [ 'abil' ]);
if ( $user [ 'align' ] == 2 ) {
if ( $k == 'al_neut_power' ) { if ( $abil [ 0 ] < 1 ) $action_ok = 0 ; }
if ( $k == 'attackk_close' ) { if ( $abil [ 1 ] < 1 ) $action_ok = 0 ; }
if ( $k == 'attackk_open' ) { if ( $abil [ 2 ] < 1 ) $action_ok = 0 ; }
}
if ( $user [ 'align' ] == 6 ) {
if ( $k == 'ct1' ) { if ( $abil [ 0 ] < 1 ) $action_ok = 0 ; }
if ( $k == 'ct2' ) { if ( $abil [ 1 ] < 1 ) $action_ok = 0 ; }
if ( $k == 'ct3' ) { if ( $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 [ 'align' ] == 2 ) // Нейтралы
{
$abil = mysql_fetch_array ( mysql_query ( " SELECT `abil` FROM `users` WHERE `id`=' { $user [ 'id' ] } '; " ));
$abil = unserialize ( $abil [ 'abil' ]);
for ( $i = 0 ; $i < 3 ; $i ++ ) if ( ! $abil [ $i ]) $abil [ $i ] = 0 ;
echo ( " <br />Осталось использований:<br /> " );
echo ( " <img src='i/magic/al_neut_power.gif' title='Сила нейтралитета'> Сила нейтралитета - " . $abil [ 0 ] . " <br /> " );
echo ( " <img src='i/magic/attackk_close.gif' title='Кулачное закрытое кровавое нападение'> Кулачное закрытое кровавое нападение - " . $abil [ 1 ] . " <br /> " );
echo ( " <img src='i/magic/attackk_open.gif' title='Кулачное закрытое нападение'> Кулачное закрытое нападение - " . $abil [ 2 ] . " <br /> " );
}
if ( $user [ 'align' ] == 6 ) // Свет
{
$abil = mysql_fetch_array ( mysql_query ( " SELECT `abil` FROM `users` WHERE `id`=' { $user [ 'id' ] } '; " ));
$abil = unserialize ( $abil [ 'abil' ]);
for ( $i = 0 ; $i < 3 ; $i ++ ) if ( ! $abil [ $i ]) $abil [ $i ] = 0 ;
echo ( " <br />Осталось использований:<br /> " );
echo ( " <img src='i/magic/ct1.gif' title='Исцелить легкую травму'> Исцелить легкую травму - " . $abil [ 0 ] . " <br /> " );
echo ( " <img src='i/magic/ct2.gif' title='Исцелить среднюю травму'> Исцелить среднюю травму - " . $abil [ 1 ] . " <br /> " );
echo ( " <img src='i/magic/ct3.gif' title='Исцелить тяжелую травму'> Исцелить тяжелую травму - " . $abil [ 2 ] . " <br /> " );
}
echo " </td></tr></table> " ;
// ПАЛАДИНЫ!
if ( in_array ( $user [ 'align' ], $arr [ 'delo' ])) {
echo " <form method='post' action='orden.php'><legend>Добавить в «дело» игрока заметку о нарушении правил, прокрутке и пр.</legend><input name='ldnick' placeholder='Логин'> <input name='ldtext' size='50' placeholder='Сообщение'> <input type='hidden' name='use' value='ldadd'> <input type='submit' value='Добавить'> " ;
if ( $user [ 'align' ] > '1.4' && $user [ 'align' ] < '2' ) echo " <br><input type='checkbox' name='red' class='input' > Записать, как причину отправки в х а о с /блокировки " ;
echo " </form> " ;
}
if ( in_array ( $user [ 'align' ], $arr [ 'golos' ])) {
echo " <form method='post' action='orden.php'><legend>Отправить системное сообщение в чат</legend><input name='newsmsg' size='74' placeholder='Введите сообщение'> <input type='submit' value='Отправить'></form> " ;
}
if ( $_POST [ 'newsmsg' ] && in_array ( $user [ 'align' ], $arr [ 'golos' ])) {
$from = '<span style="background:yellow"> ' ;
AddChatSystem ( $from . $_POST [ 'newsmsg' ] . " <small>© Орден Света</small></span> " );
echo " <b style= \" color: Red; \" >Системное сообщение отправлено…</b> " ;
}
if ( in_array ( $user [ 'align' ], $arr [ 'telegraf' ])){
if ( $_POST [ 'grn' ] && $_POST [ 'gr' ]) echo telegraph ( $_POST [ 'grn' ], $_POST [ 'gr' ]);
echo " <form method='post' action='orden.php'><legend>Телеграф</legend><input name='grn' placeholder='Логин'> <input name='gr' size='50' placeholder='Сообщение'> <input type='submit' value='Отправить'> " ;
}
if ( in_array ( $user [ 'align' ], $arr [ 'showinvis' ])){
echo '<legend>Невидимки:</legend>' ;
$prs = mysql_query ( 'SELECT `id`, `login` FROM `users` WHERE `invis` = 1 ORDER BY `id` DESC' );
while ( $pl = mysql_fetch_array ( $prs )) {
$effect = mysql_fetch_array ( mysql_query ( " SELECT `time` FROM `effects` WHERE `owner` = ' { $pl [ id ] } ' AND `type` = '1022' LIMIT 1 " ));
echo '<b>[id] = ' . $pl [ 'id' ] . ', ' . $pl [ 'login' ] . ' - [невидимка ' . substr ( $effect [ 0 ], strlen ( $effect [ 0 ]) - 4 ) . ']</b><br />' ;
}
}
if ( in_array ( $user [ 'align' ], $arr [ 'trade' ])){
if ( ! $_POST [ 'logs' ]) $_POST [ 'logs' ] = date ( " d.m.y " );
echo ' < hr >< TABLE >< TR >< TD colspan = 3 >< FORM METHOD = POST ACTION = orden . php >< legend > Переводы </ legend >
< INPUT TYPE = text NAME = filter value = " '. $_POST['filter'] .' " placeholder = " Логин " > за < INPUT TYPE = text NAME = logs size = 12 value = " '. $_POST['logs'] .' " > < INPUT TYPE = submit value = " Просмотреть переводы персонажа " ></ form ></ TD >
</ tr >< tr >< td >< FORM METHOD = POST ACTION = orden . php >< INPUT TYPE = hidden NAME = filter value = " '. $_POST['filter'] .' " >
< INPUT TYPE = hidden NAME = logs value = " '.date( " d . m . y " ,mktime(0, 0, 0, substr( $_POST['logs'] ,3,2), substr( $_POST['logs'] ,0,2)-1, " 20 " .substr( $_POST['logs'] ,6,2))).' " >
< INPUT TYPE = submit value = " « " ></ form ></ TD >
< TD valign = top align = center > Переводы персонажа < b > " '. $_POST['filter'] .' " </ b > за < b > '.$_POST[' logs '].' </ b ></ TD >
< TD >< FORM METHOD = POST ACTION = orden . php >< INPUT TYPE = hidden NAME = logs value = " '.date( " d . m . y " ,mktime(0, 0, 0, substr( $_POST['logs'] ,3,2), substr( $_POST['logs'] ,0,2)+1, " 20 " .substr( $_POST['logs'] ,6,2))).' " >
< INPUT TYPE = hidden NAME = filter value = " '. $_POST['filter'] .' " > < INPUT TYPE = submit value = " » " ></ form ></ TD >
</ TR ></ TABLE ></ form > ' ;
if ( $_POST [ 'filter' ]) {
$perevod = mysql_fetch_array ( mysql_query ( " SELECT login,id,align,admin FROM `users` WHERE `login` = ' { $_POST [ 'filter' ] } ' LIMIT 1; " ));
$per_ok = 0 ;
if ( $perevod [ 'admin' ] != '1' ) $per_ok = 1 ;
$iid = $perevod [ 'id' ];
$logsat = $_POST [ 'logs' ];
if ( $per_ok == 1 ) {
$ddate1 = mktime ( 0 , 0 , 0 , substr ( $_POST [ 'logs' ], 3 , 2 ), substr ( $_POST [ 'logs' ], 0 , 2 ), " 20 " . substr ( $_POST [ 'logs' ], 6 , 2 ));
$ddate2 = mktime ( 23 , 59 , 59 , substr ( $_POST [ 'logs' ], 3 , 2 ), substr ( $_POST [ 'logs' ], 0 , 2 ), " 20 " . substr ( $_POST [ 'logs' ], 6 , 2 ));
$logs = mysql_query ( " SELECT * FROM `delo` WHERE `pers` = ' { $perevod [ 'id' ] } ' AND `date` > ' $ddate1 ' AND `date` < ' $ddate2 ' ORDER by `id` ASC; " );
while ( $row = @ mysql_fetch_array ( $logs )) {
$dat = date ( " d.m.y H:i " , $row [ 'date' ]);
echo " <span class=date> { $dat } </span> { $row [ 'text' ] } <br> " ;
}
}
}
echo " <hr> " ;
}
if ( $user [ 'align' ] == '1.99' || $user [ 'align' ] == '1.98' ) {
echo " <form method='post'><legend>Поменять статус</legend><input type='text' name='login' placeholder='Логин'> <input type='text' name='status' placeholder='Статус'> <input type='submit' value='Изменить статус'></form> " ;
if ( $_POST [ 'login' ] && $_POST [ 'status' ]) {
$dd = mysql_fetch_array ( mysql_query ( " SELECT `ip`, `login` FROM `users` WHERE `login` = ' " . $_POST [ 'login' ] . " '; " ));
if ( $dd ) {
mysql_query ( " UPDATE `users` SET `status` = ' " . $_POST [ 'status' ] . " ' WHERE `login` = ' " . $_POST [ 'login' ] . " '; " );
echo " <font color=red>Статус " , $dd [ 1 ], " изменен на " , $_POST [ 'status' ], " </font><BR> " ;
}
}
}
if ( $user [ 'align' ] == '1.99' ) {
echo " <form method='post'><legend>Отдел кадров.</legend><span style='color:maroon'>Внимание!<br>Эти действия применимы к <u>любой</u> склонности в игре!<br>Даже если человек в клане — ему сменится склонность без выхода из клана.<br>Пользоваться ответственно. Злоупотреление наказуемо!<span><br><input type='text' name='login' placeholder='Логин''> <select name='krest'>
< option disabled selected > Крест </ option >
< option value = '1.1' > Паладин поднебесья </ option >
< option value = '1.75' > Паладин Солнечной Улыбки </ option >
< option value = '1.7' > Паладин Огненной Зари </ option >
< option value = '1.91' > Паладин Н е б а </ option >
< option value = '1.98' > Старший Паладин Н е б а </ option >
< option value = 'del' > Уволить </ option >
</ select > < input type = 'submit' value = 'Применить' ></ form >
" ;
if ( $_POST [ 'login' ] && $_POST [ 'krest' ]) {
switch ( $_POST [ 'krest' ]){
case 1.1 : $rang = 'Паладин Поднебесья' ; break ;
case 1.75 : $rang = 'Паладин Солнечной Улыбки' ; break ;
case 1.7 : $rang = 'Паладин Огненной Зари' ; break ;
case 1.91 : $rang = 'Паладин Н е б а ' ; break ;
case 1.98 : $rang = 'Старший Паладин Н е б а ' ; break ;
case del : $rang = NULL ; $_POST [ 'krest' ] = '' ; break ;
}
$dd = mysql_fetch_array ( mysql_query ( " SELECT `id`, `login`, align FROM `users` WHERE `login` = ' " . $_POST [ 'login' ] . " ' LIMIT 1 " ));
if ( $dd ) {
# Внимание! Верховный Паладин может снять любую склонность и навесить крест на любую склонность!
# Сейчас это игровой элемент. В будущем сюда надо вставить проверку.
# © Ins.
mysql_query ( " UPDATE `users` SET `align` = ' " . $_POST [ 'krest' ] . " ',`status` = ' $rang ' WHERE `login` = ' " . $dd [ 'login' ] . " '; " );
if ( empty ( $_POST [ 'krest' ])){
$messchs = " { $al [ 'name' ] } <b> { $user [ 'login' ] } </b> лишил " . ( $user [ 'sex' ] ? '' : 'а ' ) . " персонажа <b> { $dd [ 'login' ] } </b> е г о склонности. " ;
$mess = " Паладин « { $user [ 'login' ] } » лишь " . ( $user [ 'sex' ] ? '' : 'а ' ) . " « { $dd [ 'login' ] } » из Ордена Света. " ;
}
else {
$messchs = " { $al [ 'name' ] } <b> { $user [ 'login' ] } </b> " . ( $user [ 'sex' ] ? '' : 'а ' ) . " персонажу <b> { $dd [ 'login' ] } </b> звание <b> { $rang } </b>. " ;
$mess = " Паладин « { $user [ 'login' ] } » присвоил " . ( $user [ 'sex' ] ? '' : 'а ' ) . " « { $dd [ 'login' ] } » звание $rang " ;
}
addch ( " <img src=i/magic/dpal.gif> $messchs " );
mysql_query ( " INSERT INTO `lichka`(`id`,`pers`,`text`,`date`) VALUES ('',' " . $dd [ 'id' ] . " ',' $mess ',' " . time () . " '); " );
mysql_query ( " INSERT INTO `paldelo`(`id`,`author`,`text`,`date`) VALUES ('',' " . $_SESSION [ 'uid' ] . " ',' $mess ',' " . time () . " '); " );
}
}
}
?>
< script type = " text/javascript " >
var xmlHttpp = [];
function ajax_func ( func , iid , getpar , postpar ) {
xmlHttpp [ iid ] = GetXmlHttpObject1 ();
if ( xmlHttpp [ iid ] == null ) {
alert ( " Browser does not support HTTP Request " )
return
}
document . getElementById ( iid ) . innerHTML = " <img src='./i/loading2.gif' /> " ;
var url = " ./ajax/ " + func + " .php "
url = url + " ? " + getpar
xmlHttpp [ iid ] . open ( " POST " , url , true );
xmlHttpp [ iid ] . onreadystatechange = function () {
if ( xmlHttpp [ iid ] . readyState == 4 || xmlHttpp [ iid ] . readyState == " complete " ) {
if ( document . getElementById ( iid ) == '[object HTMLInputElement]' )
document . getElementById ( iid ) . value = xmlHttpp [ iid ] . responseText ;
else
document . getElementById ( iid ) . innerHTML = xmlHttpp [ iid ] . responseText ;
document . getElementById ( 'chat' ) . scrollTop = document . getElementById ( 'chat' ) . scrollHeight + 10 ;
}
}
xmlHttpp [ iid ] . setRequestHeader ( " Content-Type " , " application/x-www-form-urlencoded " );
xmlHttpp [ iid ] . send ( postpar );
}
function GetXmlHttpObject1 () {
var 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 ) {
var srcElement = document . getElementById ( ele );
if ( srcElement != null ) {
if ( srcElement . style . display == " block " ) {
srcElement . style . display = 'none' ;
} else {
srcElement . style . display = 'block' ;
}
}
}
var Hint3Name = '' ;
var Hint3Closed = false ;
function runmagic0 ( 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="orden.php" method=POST><table width=100% cellspacing=0 cellpadding=2 bgcolor=FFF6DD><tr><td colspan=2><INPUT TYPE=hidden name=sd4 value="<? echo @$user[' id ']; ?>"><INPUT TYPE=hidden NAME="use" value="' + magic + '">' +
'Укажите логин персонажа:<small><BR>(можно щелкнуть по логину в чате)</TD></TR><TR><TD align=left><INPUT TYPE=text NAME="' + name + '">' +
'<select style="background-color:#eceddf; color:#000000;" name="timer"><option value=15>15 мин</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 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="orden.php" method=POST><table width=100% cellspacing=0 cellpadding=2 bgcolor=FFF6DD><tr><td colspan=2><INPUT TYPE=hidden name=sd4 value="<? echo @$user[' id ']; ?>"><INPUT TYPE=hidden NAME="use" value="' + magic + '">' +
'Укажите логин персонажа:<small><BR>(можно щелкнуть по логину в чате)</TD></TR><TR><TD align=left><INPUT TYPE=text 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><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="orden.php" method=POST><table width=100% cellspacing=0 cellpadding=2 bgcolor=FFF6DD><tr><td colspan=2><INPUT TYPE=hidden name=sd4 value="<? echo @$user[' id ']; ?>"><INPUT TYPE=hidden NAME="use" value="' + magic + '">' +
'Укажите логин персонажа:<small><BR>(можно щелкнуть по логину в чате)</TD></TR><TR><TD align=left><INPUT TYPE=text 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><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 RunMagicSelf ( 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="orden.php" method=POST><table width=100% cellspacing=0 cellpadding=2 bgcolor=FFF6DD><tr><td colspan=2><INPUT TYPE=hidden name=sd4 value="<? echo @$user[' id ']; ?>"> <INPUT TYPE=hidden NAME="use" value="' + magic + '">' +
'Использовать возможность "Сила Нейтралитета?"</TD></TR><TR><TD align=left><INPUT TYPE=hidden NAME="' + name + '" VALUE="<? echo @$user[' login ']; ?>">' +
'</TD><TD width=30><INPUT TYPE="submit" value=" »» " onclick="top.frames[\'main\'].Hint3Closed = false;"></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 ;
Hint3Name = name ;
Hint3Closed = true ;
}
function runmagicf ( 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="orden.php" method=POST><table width=100% cellspacing=0 cellpadding=2 bgcolor=FFF6DD><tr><td colspan=2><INPUT TYPE=hidden name=sd4 value="<? echo @$user[' id ']; ?>"> <INPUT TYPE=hidden NAME="use" value="' + magic + '">' +
'Укажите логин персонажа:<small><BR>(можно щелкнуть по логину в чате)</TD></TR><TR><TD align=left><INPUT TYPE=text NAME="' + name + '">' +
'<select style="background-color:#eceddf; color:#000000;" name="timer"><option value=15>15 мин<option value=30>30 мин<option value=60>1 час' +
'<option value=180>3 часа<option value=360>6 часов<option value=720>12 часов<option value=1440>сутки<option value=4320>3 суток<option value=10080>неделя</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 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="orden.php" method=POST><table width=100% cellspacing=0 cellpadding=2 bgcolor=FFF6DD><tr><td colspan=2><INPUT TYPE=hidden name=sd4 value="<? echo @$user[' id ']; ?>"> <INPUT TYPE=hidden NAME="use" value="' + magic + '">' +
'Укажите логин персонажа:<small><BR>(можно щелкнуть по логину в чате)</TD></TR><TR><TD align=left><INPUT TYPE=text 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 runmagic2 ( 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="orden.php" method=POST><table width=100% cellspacing=0 cellpadding=2 bgcolor=FFF6DD><tr><td colspan=2><INPUT TYPE=hidden name=sd4 value="<? echo @$user[' id ']; ?>"> <INPUT TYPE=hidden NAME="use" value="' + magic + '">' +
'Укажите логин персонажа:<small><BR>(можно щелкнуть по логину в чате)</TD></TR><TR><TD align=left><INPUT TYPE=text NAME="' + name + '">' +
'<select style="background-color:#eceddf; color:#000000;" name="timer"><option value=2>2 дня<option value=3>3 дня<option value=7>неделя<option value=14>2 недели' +
'<option value=30>1 месяц<option value=60>2 месяца<option value=365>бессрочно</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 runmagic3 ( 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="orden.php" method=POST><table width=100% cellspacing=0 cellpadding=2 bgcolor=FFF6DD><tr><td colspan=2><INPUT TYPE=hidden name=sd4 value="<? echo @$user[' id ']; ?>"> <INPUT TYPE=hidden NAME="use" value="' + magic + '">' +
'Укажите логин персонажа:<small><BR>(можно щелкнуть по логину в чате)</TD></TR><TR><TD align=left><INPUT TYPE=text NAME="' + name + '">' +
'<br>Причина: <INPUT TYPE=text size=25 NAME="palcom"></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 runmagic4 ( title , magic , name , name1 ) {
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="orden.php" method=POST><table width=100% cellspacing=0 cellpadding=2 bgcolor=FFF6DD><tr><td><INPUT TYPE=hidden name=sd4 value="<? echo @$user[' id ']; ?>"> <INPUT TYPE=hidden NAME="use" value="' + magic + '">' +
'Укажите логин жениха: <INPUT TYPE=text NAME="' + name + '">' +
'<br>Укажите логин невесты: <INPUT TYPE=text NAME="' + name1 + '">' +
'<br><center><INPUT TYPE="submit" value=" »» "></center></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 >
< script >
var xmlHttpp = []
function ajax_func ( func , iid , getpar , postpar ){
xmlHttpp [ iid ] = GetXmlHttpObject1 ()
if ( xmlHttpp [ iid ] == null ){
alert ( " Browser does not support HTTP Request " )
return
}
document . getElementById ( iid ) . innerHTML = " <img src='./i/loading2.gif' /> " ;
var url = " ./ajax/ " + func + " .php "
url = url + " ? " + getpar
xmlHttpp [ iid ] . open ( " POST " , url , true );
xmlHttpp [ iid ] . onreadystatechange = function () {
if ( xmlHttpp [ iid ] . readyState == 4 || xmlHttpp [ iid ] . readyState == " complete " ) {
if ( document . getElementById ( iid ) == '[object HTMLInputElement]' )
document . getElementById ( iid ) . value = xmlHttpp [ iid ] . responseText ;
else
document . getElementById ( iid ) . innerHTML = xmlHttpp [ iid ] . responseText ;
document . getElementById ( 'chat' ) . scrollTop = document . getElementById ( 'chat' ) . scrollHeight + 10 ;
}
}
xmlHttpp [ iid ] . setRequestHeader ( " Content-Type " , " application/x-www-form-urlencoded " );
xmlHttpp [ iid ] . send ( postpar );
}
function GetXmlHttpObject1 ()
{
var xmlHttp1 = null ;
try
{
// Firefox, Opera 8.0+, Safari
xmlHttp1 = new XMLHttpRequest ();
}
catch ( e )
{
//Internet Explorer
try
{
xmlHttp1 = new ActiveXObject ( " Msxml2.XMLHTTP " );
}
catch ( e )
{
xmlHttp1 = new ActiveXObject ( " Microsoft.XMLHTTP " );
}
}
return xmlHttp1 ;
}
</ script >
</ body >
</ html >