View file includes/adm/finance/schet_info.php

File size: 2.61Kb
<?php
# Выбор счета
$q3=@mysql(DBName,"SELECT * FROM `finance_schet` WHERE `id` = '$query3' LIMIT 0, 1");
$s=@mysql_num_rows($q3);

if ($s>0)
	{
	$datas=@mysql_fetch_array($q3);
	print '<table border=0 bgcolor=#70E2A0>';
	print '<tr bgcolor=#D8998B><th width=200><b>Счет</b></th><th>&nbsp;KMX&nbsp;/&nbsp;'.$datas['id_user'].'&nbsp;/&nbsp;'.$datas['id'].'&nbsp;</th></tr>';

	$q__=@mysql(DBName,"SELECT * FROM `users` WHERE `num` = '".$datas['id_user']."' LIMIT 0, 1");
	$data__=mysql_fetch_array($q__);
	print '<tr bgcolor=#96BDE0><th width=200><b>Пользователь</b></th><th>&nbsp;'.$data__['login'].'.'.$data__['domain'].'.ru&nbsp;</th></tr>';

	print '<tr bgcolor=#7AABD8><th width=200><b>Сумма</b></th><th>'.sprintf ("%01.2f",$datas['value']).'</th></tr>';
	print '<tr bgcolor=#96BDE0><th width=200><b>Выписан</b></th><th>'.date("j.m H:i ",$datas['createtime']).'</th></tr>';
	if ($datas['paytime']>0)         print '<tr bgcolor=#7AABD8><th width=200><b>Зачислен</b></th><th>'.date("j.m H:i ",$datas['paytime']).'</th></tr>';
	else                             print '<tr bgcolor=#7AABD8><th width=200><b>Зачислен</b></th><th><font color=gray><i>не зачислен</i></font></th></tr>';
	print '<tr bgcolor=#96BDE0><th width=200><b>Описание</b></th><th>'.$datas['descr'].'</th></tr>';
	if ($datas['comment']=='delete') print '<tr bgcolor=#7AABD8><th width=200><b>Комментарий</b></th><th><font color=gray><i>аннулирован</i></font></th></tr>';
	else                             print '<tr bgcolor=#7AABD8><th width=200><b>Комментарий</b></th><th>'.$datas['comment'].'</th></tr>';
	print '<tr height="2" bgcolor=#000000><th colspan=2></th></tr>';
#	if ($datas['comment']=='delete') print '<tr bgcolor=#96BDE0><th colspan=2><a href="?'.$id.'/finance/schet/null/'.$query3.'">Аннулировать</a></th></tr>';
#	else                             print '<tr bgcolor=#96BDE0><th colspan=2><font color=gray>Аннулировать</font></th></tr>';
	if ($datas['paytime']>0)         print '<tr bgcolor=#7AABD8><th colspan=2><font color=gray>Зачислить</font></th></tr>';
	else                             print '<tr bgcolor=#7AABD8><th colspan=2><a href="?'.$id.'/finance/schet/pay/'.$query3.'">Зачислить</a></th></tr>';
#	print '<tr bgcolor=#96BDE0><th colspan=2><a href="?'.$id.'/finance/schet/edit/'.$query3.'">Корректировать</a></th></tr>';
	print '</table>';
	}
else
	{
	print '<table border=0 bgcolor=#70E2A0>'.
	'<tr bgcolor=#D8998B><th width=200><b>Счет</b></th><th>&nbsp;KMX&nbsp;/&nbsp;???&nbsp;/&nbsp;'.$query3.'&nbsp;</th></tr>'.
	'<tr bgcolor=#000000><th colspan=2><font color=red><b>Счет не найден</b></font></th></tr>'.
	'</table>';
	}

exit;
?>