View file includes/adm/finance/schet_oplachenye.php

File size: 1.81Kb
<?php
error_reporting(7);

$k=$query3;
if ($k<1) $k=1;

# Выбор списка услуг
$q3=@mysql(DBName,"SELECT * FROM `finance_schet` WHERE `paytime` != '0' ORDER BY `paytime` DESC LIMIT ".($k-1).", 26");
$s=@mysql_num_rows($q3);

print '<table border=0 width=100% bgcolor=#70E2A0><tr bgcolor=#D8998B>'.
'<th width=25><b>№№ п/п</b></th>'.
'<th width=120><b>Счет</b></th>'.
'<th><b>Пользователь</b></th>'.
'<th width=75><b>Сумма</b></th>'.
'<th width=100><b>Выписан</b></th>'.
'<th width=100><b>Зачислен</b></th>'.
'<th><b>Описание</b></th>'.
'<th><b>Комментарий</b></th>'.
'</tr>';

if ($s>25) {$s=25;$nextp=true;} else $nextp=false;
for ($i=0;$i<$s;$i++)
	{
	$data3=@mysql_fetch_array($q3);

	if ($col) {$color='#96BDE0';$col=false;} else {$color='#7AABD8';$col=true;}

	print '<tr bgcolor='.$color.'>';
	print '<th>'.($k+$i).'</th>';
	print '<th align=left>&nbsp;<a href="?'.$id.'/finance/schet/info/'.$data3['id'].'">KMX/'.$data3['id_user'].'/'.$data3['id'].'</a></th>';
	$q__=@mysql(DBName,"SELECT * FROM `users` WHERE `num` = '".$data3['id_user']."' LIMIT 0, 1");
	$data__=mysql_fetch_array($q__);
	print '<th>&nbsp;<a href="?'.$id.'/finance/users/'.$data3['id_user'].'">'.$data__['login'].'.'.$data__['domain'].'.ru</a>&nbsp;</th>';
	print '<th>'.sprintf ("%01.2f",$data3['value']).' у.е.</th>';
	print '<th>'.date("j.m H:i ",$data3['createtime']).'</th>';
	print '<th>'.date("j.m H:i ",$data3['paytime']).'</th>';
	$data3['descr']=str_replace('Пополнение баланса ','',$data3['descr']);
	print '<th>'.$data3['descr'].'</th>';
	print '<th>'.$data3['comment'].'</th>';
	print '</tr>';
	}

print '</table>';

if ($k>1) print '<b><a href="?'.$id.'/finance/schet/opl/'.($k-25).'">&lt;&lt;&lt;Назад</a>';
if ($nextp) print '&nbsp;<a href="?'.$id.'/finance/schet/opl/'.($k+25).'">Далее&gt;&gt;&gt;</a></b>';

exit;
?>