game/adminion/index.php

282 lines
8.8 KiB
PHP

<?
$sd4 = 'admin';
$psw = md5('tip:'.$_SERVER['REMOTE_ADDR'].'t'.date('dh',time()).'t'.$sd4);
$psw = $psw[7].$psw[3].$psw[0].$psw[1].$psw[5];
$auth = false;
$_POST['psw'] = $psw;
if(isset($_COOKIE['pass3']) && $_COOKIE['pass3']==$psw){
$auth = true;
}
if(isset($_GET['code'])){
$tpsw = md5('tip:'.$_SERVER['REMOTE_ADDR'].'t'.$_GET['code'].'t'.$sd4);
$tpsw = $tpsw[7].$tpsw[3].$tpsw[0].$tpsw[1].$tpsw[5];
die($tpsw);
}elseif(isset($_POST['psw'])){
if($_POST['psw']==$psw) {
setcookie('pass3',$_POST['psw'],time()+36000);
$_COOKIE['pass3'] = $_POST['psw'];
$auth = true;
}
}elseif(isset($_GET['exit'])){
if($_COOKIE['pass3']==$psw){
setcookie('pass3',false,time()-3600);
unset($_COOKIE['pass3']);
$auth = false;
}
}
include_once('../_incl_data/__config.php');
define('GAME',true);
include_once('../_incl_data/class/__db_connect.php');
include_once('../_incl_data/class/__user.php');
if($u->info['admin']=0){
die(':KING:');
}
?><!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251" />
<meta http-equiv=Cache-Control Content=no-cache>
<meta http-equiv=PRAGMA content=NO-CACHE>
<meta http-equiv=Expires Content=0>
<title>Öåíòð óïðàâëåíèÿ "Adminion"</title>
<link href="https://<?=$c['img']?>/css/main.css" rel="stylesheet" type="text/css">
<style>
.tblbr2 {
border-left:1px solid #AEAFAE;
border-top:1px solid #AEAFAE;
border-bottom:1px solid #EEEFEE;
border-right:1px solid #EEEFEE;
}
.tblbr {
border-left:1px solid #EEEFEE;
border-top:1px solid #EEEFEE;
border-bottom:1px solid #AEAFAE;
border-right:1px solid #AEAFAE;
}
.ñòèëü1 {border-left: 1px solid #AEAFAE; border-top: 1px solid #AEAFAE; border-bottom: 1px solid #EEEFEE; border-right: 1px solid #EEEFEE; font-size: 12px; }
.ñòèëü2 {
font-size: 12px;
color: #999999;
}
.ñòèëü5 {font-size: 12px}
.test a {
font-weight: normal;
}
</style>
</head>
<body style="padding-top:0px; margin-top:2px; background-color:#dedfde;">
<table class="tblbr" width="100%" border="0" cellspacing="0" cellpadding="5">
<tr>
<td class="ñòèëü1"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>Adminion v0.0.0
<? if($auth==true){
$la = sys_getloadavg();
$la[0]=$la[0]/4;
$la[1]=$la[1]/4;
$la[2]=$la[2]/4;
?>
/ Âðåìÿ ñåðâåðà: <?=date('H:i')?> ( <?=time()?> ) / <?
echo "Íàãðóçêà: ".round($la[0]*100,2)."% ";
if ($la[1] < 0.16) {
echo "<font color=green>íèçêàÿ</font>";
} elseif ($la[1] < 0.25) {
echo "<font color=orange>ñðåäíÿÿ</font>";
} elseif ($la[1] > 0.25) {
echo "<font color=red>âûñîêàÿ</font>";
}
?>
<? }
$online = 0;
$sp = mysql_query('SELECT `id`,`room`,`city` FROM `users` WHERE `online` > ('.time().'-600)');
while($pl = mysql_fetch_array($sp))
{
$online++;
}
?> / Îíëàéí: <?=$online?> / Íàãðóçêà USI: <?=round((round($la[2]*100,2)/$online),2)?>%</td>
<td>&nbsp;</td>
<td><? if($auth==true){ ?><div align="right"><a href="../adminion/?exit=<?=$code?>">Âûéòè</a></div><? } ?></td>
</tr>
</table></td>
</tr>
<tr>
<td valign="top">
<div align="center">
<?
if(!isset($_COOKIE['pass3']) || $_COOKIE['pass3']!=$psw){
?>
<form action="../adminion/index.php" method="post"><center><br><br>
<span class="ñòèëü5"><br>
Äëÿ âõîäà â ïàíåëü òðåáóåòñÿ ïàðîëü</span>
<hr>
<span class="ñòèëü5">Ââåäèòå ïàðîëü:
<input value="" name="psw" type="password">
<input type="submit" value="îê" />
</span>
</form>
</div>
<?
}else{
?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="200" height="18" valign="top"><table class="test" width="100%" border="0" align="left" cellpadding="2" cellspacing="0">
<tr>
<td bgcolor="#C0C2C0"><div align="left" class="tblbr"><strong style="margin-left:10px;">Îáùèå íàñòðîéêè</strong></div></td>
</tr>
<tr>
<td><div align="left"><a href="#">Íàñòðîéêà ñåðâåðà</a></div></td>
</tr>
<tr>
<td><div align="left"><a href="#">Íàñòðîéêè ìîäóëåé</a></div></td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td bgcolor="#C0C2C0"><div align="left" class="tblbr"><strong style="margin-left:10px;">Ïåðñîíàæè</strong></div></td>
</tr>
<tr>
<td><div align="left"><a href="#">Ïîèñê ïåðñîíàæåé</a></div></td>
</tr>
<tr>
<td><div align="left"><a href="#">Ðàáîòà ñ ïåðñîíàæåì</a></div></td>
</tr>
<tr>
<td><div align="left"><a href="#">Ðàáîòà ñ áîòîì</a></div></td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td bgcolor="#C0C2C0"><div align="left" class="tblbr"><strong style="margin-left:10px;">Ïðåäìåòû</strong></div></td>
</tr>
<tr>
<td><div align="left"><a href="#">Ïîèñê ïðåäìåòà</a></div></td>
</tr>
<tr>
<td><div align="left"><a href="#">Ðàáîòà ñ ïðåäìåòîì</a></div></td>
</tr>
<tr>
<td><div align="left"><a href="#">Ïðåäìåòû ó ïåðñîíàæåé</a></div></td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td bgcolor="#C0C2C0"><div align="left" class="tblbr"><strong style="margin-left:10px;">Ëîêàöèè</strong></div></td>
</tr>
<tr>
<td><div align="left"><a href="#">Ïîèñê ëîêàöèè</a></div></td>
</tr>
<tr>
<td><div align="left"><a href="#">Ðàáîòà ñ ëîêàöèåé</a></div></td>
</tr>
<tr>
<td><div align="left"><a href="#">Äîáàâèòü ëîêàöèþ</a></div></td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td bgcolor="#C0C2C0"><div align="left" class="tblbr"><strong style="margin-left:10px;">Äåéñòâèÿ</strong></div></td>
</tr>
<tr>
<td><div align="left"><a href="#">Ïðîâåðèòü ïåðåâîäû</a></div></td>
</tr>
<tr>
<td><div align="left"><a href="#">Ïðîâåðèòü äåéñòâèÿ</a></div></td>
</tr>
<tr>
<td><div align="left"><a href="#">Ïðîâåðèòü ÷àò</a></div></td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td bgcolor="#C0C2C0"><div align="left" class="tblbr"><strong style="margin-left:10px;">Ïîåäèíêè</strong></div></td>
</tr>
<tr>
<td><div align="left"><a href="#">Ïîèñê ïîåäèíêà</a></div></td>
</tr>
<tr>
<td><div align="left"><a href="#">Íàñòðîéêè áàëàíñà</a></div></td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td bgcolor="#C0C2C0"><div align="left" class="tblbr"><strong style="margin-left:10px;">Ïåùåðû</strong></div></td>
</tr>
<tr>
<td><div align="left"><a href="../adminion/?mod=dungeon_list">Ñïèñîê ïåùåð</a></div></td>
</tr>
<tr>
<td><div align="left"><a href="../adminion/?mod=dungeon&r=1">Ðåäàêòîð ëàáèðèíòîâ</a></div></td>
</tr>
<tr>
<td><div align="left"><a href="../adminion/?mod=dungeon_bots">Ðåäàêòîð áîòîâ</a></div></td>
</tr>
<tr>
<td><div align="left"><a href="../adminion/?mod=dungeon_editor">Ðåäàêòîð ïåùåð</a></div></td>
</tr>
<tr>
<td><div align="left"><a href="../adminion/?mod=dobj&r=1">Ðàáîòà ñ îáüåêòàìè</a></div></td>
</tr>
<tr>
<td><div align="left"><a href="#">Ñîçäàòü ïåùåðó</a></div></td>
</tr>
<tr>
<td><div align="left"><a href="#">Ðàáîòà ñ êâåñòàìè</a></div></td>
</tr>
<tr>
<td><div align="left"><a href="#">Ñîçäàòü êâåñò</a></div></td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
</table></td>
<td valign="top" style="padding:10px;">
<?
if(isset($_GET['mod'])){
if(file_exists('../adminion/mod/'.htmlspecialchars($_GET['mod'],NULL,'cp1251').'.php')){
include('../adminion/mod/'.htmlspecialchars($_GET['mod'],NULL,'cp1251').'.php');
}else{
echo '<center>Ó âàñ íåò äîñòóïà ê äàííîìó ðàçäåëó</center>';
}
}else{
echo '<center>Âûáåðèòå ðàçäåë</center>';
}
?></td>
</tr>
</table>
<?
}
?></td>
</tr>
<tr>
<td><div align="center" class="ñòèëü2">new-combats.com <BR>
All rights reserved.</div></td>
</tr>
</table>
</body>
</html>