game/modules_data/_mod2.php
2022-06-07 00:30:34 +03:00

149 lines
4.8 KiB
PHP

<?
if(!defined('GAME')) {
die();
}
$url = 'admin';
if(isset($_GET['light'])) { $url = 'light'; }
if(isset($_GET['dark'])) { $url = 'dark'; }
$pr = array(
0 => 1, //ìîë÷àíêè
1 => 0, //ïðèíÿòü
2 => 0, //âûãíàòü
3 => 0, //èçìåíèòü çâàíèå
4 => 0, //ðåäàêòèðîâàíèå íîâîñòíîé ëåíòû
5 => 0 //1 åñëè ÿâëÿåòñÿ ãëàâîé îðäåíà
);
$align = $u->info['align'];
if( $u->info['admin'] > 0 ) {
$i = 0;
while( $i < count($pr) ) {
$pr[$i] = 1;
$i++;
}
}
//Ïîêèíóòü ÎÌ
if( isset($_GET['exitsm']) ) {
if( $pr[5] > 0 ) {
$u->error = 'Âû ÿâëÿåòåñü Ãëàâîé Îðäåíà è íå ìîæåòå åãî ïîêèíóòü.';
}else{
$align = 0;
if( $u->info['clan'] > 0 ) {
$align = mysql_fetch_array(mysql_query('SELECT * FROM `clan` WHERE `id` = "'.$u->info['clan'].'" LIMIT 1'));
$align = 0 + $align['align'];
}
$u->info['align'] = $align;
unset($align);
mysql_query('UPDATE `users` SET `align` = "'.$u->info['align'].'" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
$u->error = 'Âû óñïåøíî ïîêèíóëè Îðäåí Ìîäåðàòîðîâ!';
$fastend = true;
}
}
//Ñîòðóäíèêè ÎÌ
$sx = 0;
$sh = '';
$sp = mysql_query('SELECT `id`,`align`,`login` FROM `users` WHERE (`align` > 1 AND `align` < 2) OR (`align` > 3 AND `align` < 4) ORDER BY `align` DESC');
while( $pl = mysql_fetch_array($sp) ) {
$pr = '<img class="cp" src="https://img.new-combats.com/i/lock.gif" title="Íàïèñàòü" width="20" height="15" onClick="top.chat.addto(\''.$pl['login'].'\',\'private\');">';
if( $pl['align'] == 1.99 ) {
$sh .= '<div style="padding-bottom:5px;">'.$pr.' '.$u->microLogin($pl['id'],1).' <b style="color:red"> - Ãëàâà Îðäåíà</b></div>';
}else{
$sh .= '<div>'.$pr.' '.$u->microLogin($pl['id'],1).'</div>';
}
$sx++;
}
if( $sh == '' ) {
$sh= '<center>Ñîòðóäíèêîâ íåò</center>';
}
?>
<script>
function mod1() {
top.win.add(
'mod1panel',
'Ïðèíÿòü â ÎÑ &nbsp;',
'<center>Ââåäèòå ëîãèí íîâîãî ñîòðóäíèêà:<br><small>(ìîæíî ùåëêíóòü ïî ëîãèíó â ÷àòå)</small></center>',
{
'a1':'alert(top.$(\'#mod1v1\').val())',
'usewin':'top.chat.inObj = top.$(\'#mod1v1\');top.$(\'#mod1v1\').focus()',
'd':'<center><input style="width:96%; margin:5px;" id="mod1v1" class="inpt2" type="text" value=""></center>'
},
3,
1,
'min-width:300px;'
);
top.chat.inObj = top.$('#mod1v1');
}
</script>
<table width="100%" height="10" border="0" cellspacing="0" cellpadding="0">
<tr>
<td style="padding-left:55px; padding-bottom:5px; padding-top:6px; border:1px solid #a4a6a3;" bgcolor="#c7c7c7" align="left"><h3 style="text-align:left;margin:0;padding:0;"><img class="cp" src="https://img.new-combats.com/i/lock.gif" title="Íàïèñàòü" width="20" height="15" onClick="top.chat.addto('paladins','private');"> Îðäåí Ìîäåðàòîðîâ</h3></td>
<td width="200" align="right">
<input class="btn" onClick="location.href='/main.php?<?=$url?>';" type="button" value="Îáíîâèòü">
<input class="btn" onClick="location.href='/main.php';" type="button" value="Âåðíóòüñÿ">
</td>
</tr>
</table>
<?
if( $u->error != '' ) {
echo '<div style="padding-top:10px;"><font color="red">'.$u->error.'</font></div>';
if(isset($fastend)) {
die();
}
}
?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top">
<fieldset style="border: 1px solid white; padding: 10px;margin-top:15px; padding-bottom:10px;">
<legend style='font-weight:bold; color:#8F0000;'>Âîçìîæíîñòè</legend>
</fieldset>
</td>
<td width="33%" valign="top">
<fieldset style="border: 1px solid white; padding: 10px;margin-top:15px; padding-bottom:10px;">
<legend style='font-weight:bold; color:#8F0000;'>Êíîïêè</legend>
<?
if( $pr[1] > 0 ) {
?>
<input onClick="mod1();" class="btn" type="button" value="Ïðèíÿòü â ÎÌ">
<?
}
if( $pr[2] > 0 ) {
?>
<input class="btn" type="button" value="Âûãíàòü èç ÎÌ">
<?
}
if( $pr[3] > 0 ) {
?>
<input class="btn" type="button" value="Èçìåíèòü çâàíèå">
<?
}
if( $pr[5] == 0 || $u->info['admin'] > 0 ) {
?>
<script>
function btn5() {
if(confirm('Âû äåéñòâèòåëüíî õîòèòå ïîêèíóòü Îðäåí Ìîäåðàòîðîâ?')){ top.frames['main'].location = '/main.php?<?=$url?>&exitsm'; }
}
</script>
<input onclick="btn5()" class="btn" type="button" value="Ïîêèíóòü Îðäåí">
<?
}
?>
</fieldset>
<fieldset style="border: 1px solid white; padding: 10px;margin-top:15px; padding-bottom:10px;">
<legend style='font-weight:bold; color:#8F0000;'>Àáèëêè</legend>
Íåò àáèëîê
</fieldset>
<fieldset style="border: 1px solid white; padding: 10px;margin-top:15px; padding-bottom:10px;">
<legend style='font-weight:bold; color:#8F0000;'>Ñîòðóäíèêè</legend>
<?=$sh?>
</fieldset>
</td>
</tr>
</table>