game/modules_data/_clan-OLD.php

177 lines
5.4 KiB
PHP
Raw Normal View History

2022-06-06 21:30:34 +00:00
<?
if(!defined('GAME'))
{
die();
}
if(isset($_POST['loginos'])) {
if($u->info['admin'] > 0 || $u->info['align'] == 1.99) {
$inf = mysql_fetch_array(mysql_query('SELECT `id`,`align` FROM `users` WHERE `login` = "'.mysql_real_escape_string($_POST['loginos']).'" LIMIT 1'));
if(isset($inf['id']) && (floor($u->info['align']) == floor($inf['align']) || $u->info['admin'] > 0)) {
mysql_query('UPDATE `users` SET `mod_zvanie` = "'.mysql_real_escape_string($_POST['loginos2']).'" WHERE `id` = "'.$inf['id'].'" LIMIT 1');
}else{
2023-01-10 16:29:32 +00:00
echo 'Нельзя изменить звание данному персонажу...';
2022-06-06 21:30:34 +00:00
}
}
}
?>
<body style="margin:10px; margin-top:5px;" bgcolor=e2e0e0>
<style>
.modpow {
background-color:#ddd5bf;
}
.mt {
background-color:#b1a993;
padding-left:10px;
padding-right:10px;
padding-top:5px;
padding-bottom:5px;
}
.md {
padding:10px;
}
</style>
<script>
function openMod(title,dat)
{
var d = document.getElementById('useMagic');
if(d!=undefined)
{
2023-01-10 16:29:32 +00:00
document.getElementById('modtitle').innerHTML = '<table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td valign="top">'+title+'</td><td width="30" valign="top"><div align="right"><a title="Закрыть окно" onClick="closeMod(); return false;" href="#">x</a></div></td></tr></table>';
2022-06-06 21:30:34 +00:00
document.getElementById('moddata').innerHTML = dat;
d.style.display = '';
}
}
function closeMod()
{
var d = document.getElementById('useMagic');
if(d!=undefined)
{
document.getElementById('modtitle').innerHTML = '';
document.getElementById('moddata').innerHTML = '';
d.style.display = 'none';
}
}
</script>
<div id="useMagic" style="display:none; position:absolute; border:solid 1px #776f59; left: 50px; top: 186px;" class="modpow">
<div class="mt" id="modtitle"></div><div class="md" id="moddata"></div></div>
<center>
<h3><?
$ckln = '';
if(floor($u->info['align'])==1) {
2023-01-10 16:29:32 +00:00
echo 'Орден Света';
2022-06-06 21:30:34 +00:00
}else{
2023-01-10 16:29:32 +00:00
echo 'Армада';
2022-06-06 21:30:34 +00:00
}
?></h3></center>
2023-01-10 16:29:32 +00:00
<input style="float:right;margin:1px" type="button" value="Вернуться" onClick="document.location='main.php'"><input style="float:right;margin:1px" type="button" value="Обновить" onClick="document.location='main.php?clan&rnd=<?=$code;?>'"><br>
2022-06-06 21:30:34 +00:00
<TABLE width="100%" cellpadding="5" cellspacing="10">
<TR><TD valign=top>
<? if($u->info['align'] == '1.99' || $u->info['admin']>0) { ?>
<form action="main.php?clan=1" method="post">
2023-01-10 16:29:32 +00:00
<b>Редактирование звания:</b><br>
Логин: &nbsp; <input id="loginos" width="180" name="loginos" value=""><br>
Звание: <input style="margin-left:2px;" width="180" id="loginos2" name="loginos2" value="">
2022-06-06 21:30:34 +00:00
<br>
2023-01-10 16:29:32 +00:00
<input type="submit" value="Сохранить статус">
2022-06-06 21:30:34 +00:00
</form>
<? } ?>
</TD><TD valign=top align=right>
<TABLE cellspacing=0 cellpadding=2 width="300"><TR><TD>
<center>
<?
$ckln = '';
if(floor($u->info['align'])==1) {
$ckln = 'paladins';
}else{
$ckln = 'tarmans';
}
?>
2023-01-10 16:29:32 +00:00
<h4><a href="javascript:void(0)" onClick="top.chat.addto('<?=$ckln?>','private')"><IMG border=0 SRC=https://img.new-combats.com/i/lock.gif WIDTH=20 HEIGHT=15 ALT="Приватно"></a> Соклановцы</H4>
2022-06-06 21:30:34 +00:00
<table bgcolor=#eeeeee>
<tr>
<td align=left>
<?
$res1 = mysql_query("SELECT `login`,`id`,`align`,`level`,`mod_zvanie`,`online`,`clan_prava` FROM `users` WHERE `align` > '".mysql_real_escape_string(floor($u->info['align']))."' AND `align` < '".mysql_real_escape_string(ceil($u->info['align']))."' AND `real` = 1 ORDER BY `online` DESC");
while($data = mysql_fetch_array($res1)) {
if ($data['online']>time()-120) {
echo '<A href="javascript:void(0)" onClick="top.chat.addto(\''.$data['login'].'\',\'private\')"><img src="https://img.new-combats.com/i/lock.gif" width=20 height=15></A>
2023-01-10 16:29:32 +00:00
<img title="'.$res['name'].'" src="https://img.new-combats.com/i/align/align'.$data['align'].'.gif"><b>'.$data['login'].'</b> ['.$data['level'].']<a href="info/'.$data['id'].'" target="_blank"><img title="Инф. о '.$data['login'].'" src="https://img.new-combats.com/i/inf_capitalcity.gif"></a>';
2022-06-06 21:30:34 +00:00
if ($data['clan_prava'] == 'glava') {
2023-01-10 16:29:32 +00:00
echo ' - <b>Глава клана</b>';
2022-06-06 21:30:34 +00:00
} else {
echo ' - ',$data['mod_zvanie'],'';
}
echo '<BR>';
}
elseif ($data['online']<time()-120) {
echo '<img src="https://img.new-combats.com/i/offline.gif" width=20 height=15>
2023-01-10 16:29:32 +00:00
<img src="https://img.new-combats.com/i/align/align'.$data['align'].'.gif"><font color=grey><b>'.$data['login'].'</b> ['.$data['level'].']<a href="info/'.$data['id'].'" target="_blank"><img title="Инф. о '.$data['login'].'" src="https://img.new-combats.com/inf_dis.gif"></a>';
2022-06-06 21:30:34 +00:00
if ($data['clan_prava'] == 'glava') {
2023-01-10 16:29:32 +00:00
echo ' - <b>Глава клана</b>';
2022-06-06 21:30:34 +00:00
} else {
echo ' - ',$data['mod_zvanie'],'</font>';
}
echo '<BR>';
}
2023-01-10 16:29:32 +00:00
//echo '<img title="Свет" src="https://img.new-combats.com/i/align/align'.$data['align'].'.gif"><img title="'.$res['name'].'" src="https://img.new-combats.com/i/clan/'.$res['name_mini'].'.gif"><b>'.$data['login'].'</b> ['.$data['level'].']<a href="info/'.$data['id'].'" target="_blank"><img title="Инф. о '.$data['login'].'" src="https://img.new-combats.com/i/inf_capitalcity.gif"></a> - '.$data['mod_zvanie'].'<br>';
2022-06-06 21:30:34 +00:00
}
?>
</td>
</tr>
</table>
</center>
</TD></TR><TR><TD>
2023-01-10 16:29:32 +00:00
<small>(список обновляется <strike>в полночь</strike> каждый раз)</small>
2022-06-06 21:30:34 +00:00
</TD></TR></TABLE><br />
</TD>
</TR>
</TABLE>
</FORM>
</body>
<hr>