Просмотр файла katrinka.ru/admin/user_edit.php

Размер файла: 8.91Kb
<html>
<head><title>тЕДБЛФЙТПЧБОЙЕ РПМШЪПЧБФЕМС</title></head>
<body>
<?php
  include '../wap/config.php';
	include 'acl.php';
	list ($uid, $pl) = priv_level();
    if (!($conn=pg_connect("host=$dbhost port=$dbport dbname=$dbname user=$dbuser password=$dbpass"))) {
      echo ("пЫЙВЛБ РПДЛМАЮЕОЙС Л вд!\n");
    };
	$id=$_GET['id'];
	pg_query($conn,"SET CLIENT_ENCODING TO 'KOI8';");
	$res=pg_query($conn,"select count(id) from wapgbk where uid='$id';");
	$numgb=pg_result($res,0,0);
#	$res=pg_query($conn,"select count(id) from chat where fr_u='$id';");
#	$numch=pg_result($res,0,0);
    $res=pg_query($conn,"select login,passwd,email,name,bday,operator,moder,fr,phonenum,web,info,dreg,cust_status,phonemod,icq,wap,posts,access,invisible,lastact,avatar,job,temp_ban,kmoder,fposts from users where id=$id");
	ereg ("([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})", pg_result($res,$i,4), $regs);
	$moder=pg_result($res,0,6);
	$kmoder=pg_result($res,0,23);
	if ($moder) {
		$resm=pg_query($conn,"select login from users where id='$moder';");
		$moderator=pg_result($resm,0,0);
	}
	if ($kmoder) {
		$resm=pg_query($conn,"select login from users where id='$kmoder';");
		$kmoderator=pg_result($resm,0,0);
	}
	$numch=pg_result($res,0,16);
	$ress=pg_query($conn,"select name_eng,name_rus from user_status where min <= '$numch' and '$numch' <= max;");
	if (pg_numrows($ress)) $status_rus=pg_result($ress,0,1);
	$access=pg_result($res,0,17);
?>
<FORM METHOD=POST ACTION="user_update.php">
<input type=checkbox name="delete" value="1">&nbsp;<b>пФНЕФШФЕ ДМС ХДБМЕОЙС ЙЪ ВБЪЩ ЧУЕК (!) ЙОЖПТНБГЙЙ П РПМШЪПЧБФЕМЕ</b><br>
<?php if (pg_result($res,0,6)) print "<input type=checkbox name=\"moder\" value=\"".$moder."\" checked>"; else print "<input type=checkbox name=\"moder\" value=\"1\">"; ?>
&nbsp;<b>Banned</b>
<?php if ($moder) print " (".$moderator.")"; ?>
<br>
<?php if (pg_result($res,0,18)) print "<input type=checkbox name=\"invisible\" value=\"1\" checked>"; else print "<input type=checkbox name=\"invisible\" value=\"1\">"; ?>
&nbsp;<b>Invisible</b><br>
<table>
<tr><td>Login:</td><td>
<?php print "<input type=\"text\" name=\"login\" value=\"".pg_result($res,0,0)."\" size=\"15\">\n"; ?>
</td></tr><tr><td>
<?php if ($pl==4) { ?>
Password:</td><td>
<?php print "<input type=\"text\" name=\"pass\" value=\"".pg_result($res,0,1)."\" size=\"15\">\n"; ?>
</td></tr><tr><td>
<?php } ?>
Email:</td><td>
<?php print "<input type=\"text\" name=\"email\" value=\"".pg_result($res,0,2)."\" size=\"30\">\n"; ?>
</td></tr><tr><td>
ICQ:</td><td>
<?php print "<input type=\"text\" name=\"icq\" value=\"".pg_result($res,0,14)."\" size=\"10\">\n"; ?>
</td></tr><tr><td>
йНС:</td><td>
<?php print "<input type=\"text\" name=\"name\" value=\"".pg_result($res,0,3)."\" size=\"30\">\n"; ?>
</td></tr><tr><td>
дБФБ ТПЦДЕОЙС:</td><td>
юЙУМП:&nbsp;<select name="day" size="1">
<?php for ($i=1; $i<=31; $i++) if ($i==$regs[3]) print "<option value=\"".$i."\" selected>".$i."</option>\n"; else print "<option value=\"".$i."\">".$i."</option>\n"; ?>
</select>&nbsp;
нЕУСГ:&nbsp;<select name="month" size="1">
<?php
if ($regs[2]==1) print "<option value=\"1\" selected>сОЧБТШ</option>\n"; else print "<option value=\"1\">сОЧБТШ</option>\n";
if ($regs[2]==2) print "<option value=\"2\" selected>жЕЧТБМШ</option>\n"; else print "<option value=\"2\">жЕЧТБМШ</option>\n";
if ($regs[2]==3) print "<option value=\"3\" selected>нБТФ</option>\n"; else print "<option value=\"3\">нБТФ</option>\n";
if ($regs[2]==4) print "<option value=\"4\" selected>бРТЕМШ</option>\n"; else print "<option value=\"4\">бРТЕМШ</option>\n";
if ($regs[2]==5) print "<option value=\"5\" selected>нБК</option>\n"; else print "<option value=\"5\">нБК</option>\n";
if ($regs[2]==6) print "<option value=\"6\" selected>йАОШ</option>\n"; else print "<option value=\"6\">йАОШ</option>\n";
if ($regs[2]==7) print "<option value=\"7\" selected>йАМШ</option>\n"; else print "<option value=\"7\">йАМШ</option>\n";
if ($regs[2]==8) print "<option value=\"8\" selected>бЧЗХУФ</option>\n"; else print "<option value=\"8\">бЧЗХУФ</option>\n";
if ($regs[2]==9) print "<option value=\"9\" selected>уЕОФСВТШ</option>\n"; else print "<option value=\"9\">уЕОФСВТШ</option>\n";
if ($regs[2]==10) print "<option value=\"10\" selected>пЛФСВТШ</option>\n"; else print "<option value=\"10\">пЛФСВТШ</option>\n";
if ($regs[2]==11) print "<option value=\"11\" selected>оПСВТШ</option>\n"; else print "<option value=\"11\">оПСВТШ</option>\n";
if ($regs[2]==12) print "<option value=\"12\" selected>дЕЛБВТШ</option>\n"; else print "<option value=\"12\">дЕЛБВТШ</option>\n";
?>
</select>&nbsp;
зПД:&nbsp;<select name="year" size="1">
<?php for ($i=1970; $i<=2070; $i++) if ($i==$regs[1]) print "<option value=\"".$i."\" selected>".$i."</option>\n"; else print "<option value=\"".$i."\">".$i."</option>\n"; ?>
</select></td></tr><tr><td>
пРЕТБФПТ:</td><td>
<?php print "<input type=\"text\" name=\"operator\" value=\"".pg_result($res,0,5)."\" size=\"20\">\n"; ?>
</td></tr><tr><td>
пФЛХДБ:</td><td>
<?php print "<input type=\"text\" name=\"fr\" value=\"".pg_result($res,0,7)."\" size=\"50\">\n"; ?>
</td></tr><tr><td>
оПНЕТ:</td><td>
<?php print "<input type=\"text\" name=\"phonenum\" value=\"".pg_result($res,0,8)."\" size=\"25\">\n"; ?>
</td></tr><tr><td>
Website:</td><td>
<?php print "<input type=\"text\" name=\"website\" value=\"".pg_result($res,0,9)."\" size=\"50\">\n"; ?>
</td></tr><tr><td>
Wap site:</td><td>
<?php print "<input type=\"text\" name=\"wap\" value=\"".pg_result($res,0,15)."\" size=\"50\">\n"; ?>
</td></tr><tr><td>
нЕУФП ТБВПФЩ/ХЮЈВЩ:</td><td>
<?php print "<input type=\"text\" name=\"job\" value=\"".pg_result($res,0,21)."\" size=\"80\">\n"; ?>
</td></tr><tr><td>
дПР. ЙОЖП:</td><td>
<?php print "<input type=\"text\" name=\"info\" value=\"".pg_result($res,0,10)."\" size=\"80\">\n"; ?>
</td></tr><tr><td>
нПДЕМШ ФЕМЕЖПОБ:</td><td>
<?php print "<input type=\"text\" name=\"phonemodel\" value=\"".pg_result($res,0,13)."\" size=\"20\">\n"; ?>
</td></tr><tr><td>
уФБФХУ:</td><td>
<?php print "<input type=\"text\" name=\"cust_status\" value=\"".pg_result($res,0,12)."\" size=\"30\">&nbsp;&nbsp(".$status_rus.")\n"; ?>
</td></tr><tr><td>
бЧБФБТ:</td><td>
<?php print "<input type=\"text\" name=\"avatar\" value=\"".pg_result($res,0,20)."\" size=\"30\">\n"; ?>
</td></tr><tr><td>
<?php if ($pl==4) { ?>
дПУФХР:</td><td>
<?php
  print "<select name=\"access\">\n";
  if ($access==0) print "<option value=\"0\" selected>рПМШЪПЧБФЕМШ</option>\n";
	else print "<option value=\"0\">рПМШЪПЧБФЕМШ</option>\n";
  if ($access==1) print "<option value=\"1\" selected>VIP</option>\n";
	else print "<option value=\"1\">VIP</option>\n";
  if ($access==2) print "<option value=\"2\" selected>нПДЕТБФПТ</option>\n";
	else print "<option value=\"2\">нПДЕТБФПТ</option>\n";
  if ($access==3) print "<option value=\"3\" selected>уХРЕТ нПДЕТБФПТ</option>\n";
	else print "<option value=\"3\">уХРЕТ нПДЕТБФПТ</option>\n";
  if ($access==4) print "<option value=\"4\" selected>бДНЙОЙУФТБФПТ</option>\n";
	else print "<option value=\"4\">бДНЙОЙУФТБФПТ</option>\n";
  print "</select>\n";
?>
</td></tr><tr><td>
<?php } ?>
дП ПЛПОЮБОЙС Kick'Б:</td><td>
<?php
$kick=pg_result($res,0,22);
$ktime=$kick-time();
if ($ktime>0)
	print $ktime." sec ";
	print "(Last ".$kmoderator.")";
?>
</td></tr><tr><td>
дБФБ ТЕЗЙУФТБГЙЙ:</td><td>
<?php print pg_result($res,0,11)."\n"; ?>
</td></tr><tr><td>
рПУМЕДОЕЕ РПУЕЭЕОЙЕ:</td><td>
<?php print strftime("%d %b %G %T", pg_result($res,0,19))."\n"; ?>
</td></tr><tr><td>
рПУФПЧ Ч ЗПУФЕЧПК:</td><td>
<?php print $numgb."\n"; ?>
</td></tr><tr><td>
рПУФПЧ Ч ЖПТХНЕ:</td><td>
<?php print pg_result($res,0,24)."\n"; ?>
</td></tr><tr><td>
рПУФПЧ Ч ЮБФЕ:</td><td>
<?php print $numch."\n"; ?>
</td></tr>
</table>
<?php print "<input type=hidden name=\"id\" value=\"".$id."\">\n";
print "<input type=hidden name=\"r\" value=\"".$r."\">\n";
print "<input type=hidden name=\"l\" value=\"".$l."\">\n"; ?>
<input type=submit value="Ok">&nbsp;&nbsp;
<input type=reset value="пФНЕОБ">
</form>
<center><h1>дБООЩЕ П УЛБЮЙЧБОЙСИ</h1></center>
<table width="100%">
<tr align=center bgcolor="e0e0e0"><td>Midi</td><td>Time</td><td>Host</td><td>Agent</td></tr>
<?php
    $res=pg_query($conn,"select midi.name_eng,midi.name_rus,downloads.time,downloads.ip,downloads.agent from midi,downloads where downloads.uid='$id' and midi.id=downloads.midi order by downloads.id desc;");
	$rows=pg_numrows($res);
	for ($i=0; $i<$rows; $i++) {
		$midi=pg_result($res,$i,1);
		if ($midi=='') $midi=pg_result($res,$i,0);
		$dltime=strftime("%d %b %G %T", pg_result($res,$i,2));
#		print "<tr bgcolor=\"f0f0f0\"><td>".$midi."</td><td>".$dltime."</td><td><font size=\"1\" face=\"arial\">".gethostbyaddr(pg_result($res,$i,3))." [".pg_result($res,$i,3)."]</font></td><td><font size=\"1\" face=\"arial\">".pg_result($res,$i,4)."</font></td></tr>\n";
		print "<tr bgcolor=\"f0f0f0\"><td>".$midi."</td><td>".$dltime."</td><td><font size=\"1\" face=\"arial\">"." [".pg_result($res,$i,3)."]</font></td><td><font size=\"1\" face=\"arial\">".pg_result($res,$i,4)."</font></td></tr>\n";
	}
    pg_close($conn);
?>
</table>
</body>
</html>