?#//v.2.5.1 enhanced version /* index.php 2005 - WEB2035.com revision - COPYRIGHT 2004 Phpauction.org 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 (version 2 or later). 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., 675 Mass Ave, Cambridge, MA 02139, USA. */ require('./includes/config.inc.php'); require("./header.php"); #// Run cron according to SETTINGS if($SETTINGS['cron'] == 2) { include_once "cron.php"; } $TIME = mktime(date("H")+$SETTINGS['timecorrection'],date("i"),date("s"),date("m"), date("d"),date("Y")); $NOW = date("YmdHis",$TIME); /* prepare data for templates/template */ /* prepare categories list for templates/template */ # Prepare categories sorting if($SETTINGS['catsorting'] == 'alpha') { $catsorting = " ORDER BY cat_name ASC"; } else { $catsorting = " ORDER BY sub_counter DESC"; } $TPL_categories_value = ""; $query = "select * from PHPAUCTION_categories WHERE parent_id=0 $catsorting"; $result = mysql_query($query); if(!$result) { MySQLError($query); exit; } else { $num_cat = mysql_num_rows($result); $i = 0; // $TPL_categories_value .= "
| ";
// if ( $cat_image != "") {
// $TPL_categories_value .= " | \n";
if ( $cat_colour != "") {
// $TPL_categories_value .= ""; } else { // $TPL_categories_value .= " | "; } $TPL_categories_value .= "$cat_name "."$cat_counter"."\n"; $i++; } // $TPL_categories_value .= "\n"; $TPL_categories_value .= "$MSG_277"; } /* No Zoom Featured Auction pictures */ if(!$zoom == "1"){ require('./view_featured_nz.php'); /* Zoom Featured Auction pictures */ }else{ require('./view_featured.php'); } #// #################################################################################################################### /* get last created auctions */ $query = "select id, title, pict_url, photo_uploaded, current_bid,starts from PHPAUCTION_auctions WHERE closed='0' AND suspended=0 AND private='n' AND starts<=".$NOW." ORDER BY starts DESC LIMIT ".$SETTINGS['lastitemsnumber']; $result = mysql_query($query); if ($result) { $num_auction = mysql_num_rows($result); } else { $num_auction = 0; } $i = 0; $bgcolor = "#ffffff"; $TPL_last_auctions_value = ""; while($i < $num_auction) { if($bgcolor == "#ffffff") { $bgcolor = "$tablebg"; } else { $bgcolor = "#ffffff"; } $title = mysql_result($result,$i,"title"); $id = mysql_result($result,$i,"id"); $date = mysql_result($result,$i,"starts"); $current_bid = mysql_result($result, $i, "current_bid"); $year = substr($date,0,4); $month = substr($date,4,2); $day = substr($date,6,2); $hours = substr($date,8,2); $minutes = substr($date,10,2); $seconds = substr($date,12,2); include("./includes/thumbimage.php"); $query = "select bid from PHPAUCTION_bids where auction='$id'"; $result_numbids = mysql_query($query); $num_bids = mysql_num_rows($result_numbids); //-- Added Zoom feature 8/4/2005 - Max /* Zoom Auction pictures */ if($pict_url !=""){ if($zoom == "1"){ $TPL_last_auctions_value .= "". " | ". $thumbnail ." "."$sml_font". "Current Bid:"." "."$sml_font"."$".print_money ($current_bid). " | ".
"".
"$std_font".stripslashes($title). " ". " | ".
"".
"$sml_font"."Created:"."> "."$sml_font". ArrangeDateNoCorrection($day, $month, $year, $hours, $minutes)." "."Number of bids:"." | ".
"";
}
else
{
/* No zoom Auction pictures */
/* $TPL_last_auctions_value .= "
| ". $thumbnail ." "."$sml_font". "Current Bid:"." "."$sml_font"."$".print_money ($current_bid). " | ".
"".
"$std_font".stripslashes($title). " ". " | ".
"".
"$sml_font"."Created:"."> "."$sml_font". ArrangeDateNoCorrection($day, $month, $year, $hours, $minutes)." "."Number of bids:"." |
"."Number of bids:"."
"."$sml_font".$num_bids.
"
"."Number of bids:"."
"."$sml_font".$num_bids.
"
".
"$sml_font"."Number of bids:"."
"."$sml_font".$num_bids.
"
".
"$sml_font"."Number of bids:"."
"."$sml_font".$num_bids.
"
".
"$sml_font"."Number of bids:"."
"."$sml_font".$num_bids.
"
| " .print_money ($max_bid)." | "."Number of bids: "."".$num_bids. " | ".stripslashes($title)." |