View file money/admin.php

File size: 2.41Kb
<?

include "conf.php";

header ("Content-type:text/html; charset=utf-8");

print"<html><head>
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />
<title>Админка</title>
<style type=\"text/css\">
body {font-family: times; font-size: 14px; color: #000000; background-color: #E2FFE1}
div.alex1 { padding: 1px; background-color: #E1F0FF; border: 0px}
div.alex2 { padding: 1px; background-color: #FFD7D7; border: 0px}
</style>
</head><body>";

if(!isset($go)){
print"
<p align=\"center\">
<form method=\"POST\" action=\"admin.php\">
Логин:<br/>
<input type=\"text\" name=\"login\" maxlength=\"30\"/><br/>
Пароль:<br/>
<input type=\"password\" name=\"password\" maxlength=\"30\"/><br/>
<input type=\"submit\" value=\"OK\" name=\"go\">
</form><br/>
";}
elseif(empty($login)||empty($password)){print"<p align=\"left\">Вы не ввели логин или пароль! <a href=\"./admin.php\">Ввести!</a><br/>";}
else{
$login=coding_alex(substr(trim($login), 0, 30));
$password=coding_alex(substr(trim($password), 0, 30));
if($password==$adminpass&&$login=="Admin"){
print"<p align=\"left\">";
$prin=mysql_query("select * from `user` order by counter desc;");
$alexcolor = 0;
$counterall=0;
while($data=mysql_fetch_array($prin)){
$counterall=$data['counter']+$counterall;
if($alexcolor==0){print"<div class=\"alex1\">";$alexcolor = 1;}else{print"<div class=\"alex2\">";$alexcolor = 0;}
$uearn=round(0.005*$data['counter'],2);
$roublearn=round(0.135*$data['counter'],2);
print "<font color=\"#0000AA\">".$data['login']."</font> (<font color=\"#A00000\">".$data['mail']."</font>|<font color=\"#A00000\"><a href=\"".$data['url']."\">".$data['url']."</a></font>|<font color=\"#A00000\">".$data['wm']."</font>): <font color=\"#E00000\">".$data['counter']." показ.</font> (<font color=\"#E00000\">".$uearn."wmz</font>-<font color=\"#E00000\">".$roublearn."wmr</font>)<br/>";
print"</div>";
}
$q=mysql_query("select * from `kol`");
$countertoday=mysql_num_rows($q);
print "<br/><div class=\"alex1\">Всего за сегодня: ".$countertoday."<br/></div>
<div class=\"alex2\">Всего: ".$counterall."<br/></div>";
}else{print"<p align=\"left\">Логин и/или пароль введены неверно! <a href=\"./admin.php\">Попробовать еще!</a><br/>";}}

print"<br/><a href=\"http://wepp.net.ru\">Главная</a><br/>
</p></body></html>";
?>