the code i got to work last night on the auction count down is having some troubles.
the problem now is that after the auction is over the hours, minutes and seconds start 
over. 
so even thought the auctions over they keep goings
do i need to cfif each 1 and can i base them off of the day?

heres the code
sorry but i havent commented everything out yet

<cfparam name="URL.auctionID" default="1">
<cfquery name="rsIt" datasource="auction">
SELECT *
FROM items
WHERE auctionID = #URL.auctionID#
</cfquery>
<cfquery name="hBid" datasource="auction">
SELECT *
FROM"user"WHERE auctionID = #URL.auctionID#
ORDER BY yourBid DESC
</cfquery>
<html>
<head>
<title><cfoutput>#rsIt.shortDescription#</cfoutput></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="css/main.css" rel="stylesheet" type="text/css">
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}
//-->
</script>
</head>

<body bgcolor="#000000">
<h3><font color="ffcc99">Details for item: 
<cfoutput>#rsIt.shortDescription#</cfoutput></font></h3>
<CFSCRIPT>
timeleft = DateDiff("s", Now(), deadline);
daystogo = Int(timeleft /86400);
leftover1 = timeleft - (daystogo * 86400);
hourstogo = Int(leftover1/3600);
leftover2 = leftover1 - (hourstogo * 3600);
minutestogo= Int(leftover2/60);
leftover3 = leftover2 - (minutestogo * 60);
secondstogo = leftover3;
</CFSCRIPT>
<p>&nbsp;</p>
<table width="539" height="344" border="0" align="center" cellpadding="2" 
cellspacing="0" bgcolor="c2d5f2" >
  <tr>
    <td height="344">
      <table width="100%" height="342" cellpadding="0" cellspacing="0" 
bgcolor="ffffff" >
        <tr>
          <td><table width="100%" cellpadding=" 0" cellspacing=" 0" bgcolor="c2d6f2">
              <tr>
                <td width="51%" height="27" bgcolor="c2d6f2" 
class="dtailBOLD"><cfoutput>#rsIt.shortDescription#</cfoutput></td>
                <td width="49%" bgcolor="c2d6f2" class="main"><div 
align="right"><strong>current high bid:</strong> 
<strong><cfoutput>$#hBid.yourBid#</cfoutput></strong></div></td>
              </tr>
            </table>
          </td>
        </tr>
        <tr>
          <td height="150"><table width="100%" cellspacing=" 0" cellpadding=" 0">
              <tr>
                <td width="41%" rowspan="8" bgcolor="ebebe2"><div align="center"><a 
href="image.cfm?auctionID=<cfoutput>#rsIt.auctionID#</cfoutput>" target="_blank"><img 
src="<cfoutput>uploads/#rsIt.image#</cfoutput>" width="175" height="125" 
border="0"></a><br>
                        <span class="main">click image to expand</span> </div>
                </td>
                <td width="22%" class="dtailBOLD"><div align="center">auction
                    ID </div></td>
                <td width="37%" class="main"><cfoutput>#rsIt.auctionID#</cfoutput></td>
              </tr>
              <tr>
                <td class="dtailBOLD"><div align="center">retail price</div></td>
                <td width="37%" 
class="main"><cfoutput>$#rsIt.retailValue#</cfoutput></td>
              </tr>
              <tr>
                <td class="dtailBOLD"><div align="center">minimum bid </div></td>
                <td width="37%" class="main"><cfoutput>$#rsIt.minBid#</cfoutput></td>
              </tr>
              <tr>
                <td class="dtailBOLD"><div align="center">current price </div></td>
                <td width="37%" class="main">
  <cfif hBid.yourBid LT 1>
   No bids yet
   <cfelse>
  <cfoutput>$#hBid.yourBid#</cfoutput></cfif></td>
              </tr>
              <tr><cfoutput></cfoutput>
                <td height="28" class="dtailBOLD"><div align="center">days 
left</div></td>
                <td width="37%" class="main">
    <cfif daystogo LT 1>
    <strong><img src="images/ALERT.gif" width="18" height="13"> Ends today!</strong>   
 
    <cfelse>
    <cfoutput>#daystogo# days left</cfoutput>
    </cfif></td>
              </tr>
              <tr>
                <td class="dtailBOLD"><div align="center">hours left</div></td>
                <td width="37%" class="main"><cfoutput>#NumberFormat(hourstogo,
                '00')# Hours</cfoutput></td>
              </tr>
              <tr>
                <td height="18" class="dtailBOLD"><div align="center">minutes
                    left</div></td>
                <td width="37%" class="main"><cfoutput>#NumberFormat(minutestogo,
                '00')# minute</cfoutput>s</td>
              </tr>
              <tr>
                <td height="27" class="dtailBOLD"><div align="center">seconds
                    left</div></td>
                <td width="37%" class="main"><cfoutput>#NumberFormat(secondstogo,
                '00')# seconds</cfoutput></td>
              </tr>
            </table>
          </td>
        </tr>
        <tr>
          <td bgcolor="c2d6f2" class="dtailBOLD">description</td>
        </tr>
        <tr>
          <td bgcolor="ebebe2" 
class="spacer"><cfoutput>#rsIt.description#</cfoutput></td>
        </tr>
        <tr>
          <td height="66" bgcolor="#FFFFFF"><div align="center">
              <p class="spacer">
                <!--- .::. determine if the auction is past the deadline .::. --->


<cfif dateCompare(now(), deadline) GT 0><h2><font color="ffcc99">
  <!--- .::. if the auction is over stop page from loading .::. --->
</font></h2><font color="ffcc99"><h3><font color="#000000">this auction is now 
over</font></h3>
</font>

<cfelse>

<!--- .::. if the user is in time then show submit button .::. --->
<!--- original --->
    <input name="button" type='button' style='font:12pt Verdana, Arial, Helvetica, 
sans-serif; border:1 solid #666666; cursor:hand; background:#c2d6f2; color: #666666; ' 
onClick="MM_goToURL('parent','bid.cfm?auctionID=<cfoutput>#rsIt.auctionID#</cfoutput>');return
 document.MM_returnValue" value="click here to place a bid">
              <!--- original --->
     </cfif></p>
          </div>
          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<p align="center">&nbsp;</p>
<p>&nbsp; </p>
</body>
</html>





Dave 




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to