<?php
######################################################################
#
# In accordance with the GPL, this copyright notice MUST remain
# intact:
#
# MySQLauction Release Version 0.1.0 (021001)
# Copyright (C) 2002 High Sierra Networks, Inc.
# http://www.servers-r-us.com
# hide@address.com
#
######################################################################
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston,
# MA 02111-1307, USA.
#
######################################################################
######################################################################
#
# Written by Jorge Gonzalez - Athena Soft, S.A. de C.V.
# http://www.athenasoft.com.mx
# hide@address.com
#
# Name: paymentlist.php
# Date: 021001
# Purpose:
# This script displays the list of items to be payed by a user.
# Restrictions:
# None.
# Change history:
# 021001 First version.
######################################################################
function paymentlist($userid) {
include("auction.conf.php");
include("$LIBDIR/auction.conf.lang.php");
include("$LIBDIR/money.php");
if($link = mysql_connect($DBHOST,$DBUSR,$DBPWRD)){
mysql_select_db($DBNAME) or die($mysql_error);
$result = mysql_query("
SELECT id, seller, name, bprice, highbid, comission, dateout, payed
FROM closed
WHERE seller='$userid'
AND comission>0
AND payed='$DBNO'
ORDER BY dateout");
if(mysql_num_rows($result) > 0) {
while($arow = mysql_fetch_array($result)) {
$name = str_replace("'","\'",$arow[name]);
$bprice = money($arow[bprice]);
$highbid = money($arow[highbid]);
$comission = money($arow[comission]);
$dateout = date($DATEFMT,$arow[dateout]);
print("
<TR><TD CLASS=\"itemlist\" ALIGN=\"left\" VALIGN=\"top\">
<A CLASS=\"itemlist\" HREF=\"JavaScript: itempay('$arow[id]','$name','$arow[comission]');\">$arow[name]</A>
</TD>
<TD CLASS=\"itemlist\" ALIGN=\"right\" VALIGN=\"top\">
$bprice
</TD>
<TD CLASS=\"itemlist\" ALIGN=\"right\" VALIGN=\"top\">
$highbid
</TD>
<TD CLASS=\"itemlist\" ALIGN=\"right\" VALIGN=\"top\">
$comission
</TD>
<TD CLASS=\"itemlist\" ALIGN=\"right\" VALIGN=\"top\">
$dateout
</TD></TR>");}
mysql_close($link);}
else {
mysql_close($link);
print("<TR><TD COLSPAN=5><FONT CLASS=\"error\">$L_NOCOMISSIONS</FONT></TD></TR>");}}
else {
die($mysql_error);}}
?>