| | | | |
| | |
| Gast
Beiträge: n/a
| Hallo, habe noch ein Problem. Die Bilder, die für Auktionen eingestellt werden, werden nicht richtig angezeigt. Leider weiß ich nicht woran es liegt. Hier ein Beispiel: http://www.finto.de/auction/item.php?id=386075 noch ein Beispiel: http://www.finto.de/auction/item.php?id=386184 Den Webspace habe ich bei Domaingo, falls es weiterhilft. Danke im Voraus Gruß MasterEd2000 |
| | |
| PHP Code Flüsterer Registriert seit: 21.08.2005 Beiträge: 4682 PHP-Kenntnisse: Fortgeschritten | |
| | |
| Gast
Beiträge: n/a
| Also, dass es nicht mit PHP zusammenhängt hat tocho geschrieben. Aber irgendwie muss es ja mit PHP zusammenhängen. Ok, hier ist hoffentlich die richtige Datei. Sorry aber ich habe wirklich fast keine Ahnung von PHP. <? /* Copyright (c) 2001, 2002 - haggler.de */ require('./includes/messages.inc.php'); require('./includes/config.inc.php'); require('./includes/haggler.fnc.php'); if ( !empty($id) ) { $sessionVars["CURRENT_ITEM"] = $id; putSessionVars(); } elseif ( empty($id) && !empty($sessionVars["CURRENT_ITEM"]) ) { $id = $sessionVars["CURRENT_ITEM"]; } elseif ( empty($id) && empty($sessionVars["CURRENT_ITEM"]) ) { // error message include "header.php"; print "<CENTER>$std_font $ERR_605 </FONT></CENTER>"; include "footer.php"; exit; } require("header.php"); // now check if requested auction exists and is/isn't closed $AuctionIsClosed = false; $query = "SELECT * FROM auctions WHERE id='$id'"; $result = mysql_query ($query); if ( $result ) { // look if such auction exists if ( mysql_num_rows($result)>0 ) { $closed = intval(mysql_result($result,0,"closed")); // look if auction has a "closed" flag if ( $closed==1 ) { $AuctionIsClosed = true; } else { // look if auction isn't closed $c = mysql_result($result,0,"ends"); $c = mktime ( substr($c,8,2),// hour substr($c,10,2),// min substr($c,12,2),// sec substr($c,4,2),// month substr($c,6,2),// day substr($c,0,4)// year ); if ( $c<=time() ) { // auction is closed - set flag $AuctionIsClosed = true; } } } else { print "<CENTER>".$std_font." $ERR_606 </FONT></CENTER>"; include "footer.php"; exit; } } else { print "<CENTER>".$std_font." $ERR_001 </FONT></CENTER>"; include "footer.php"; exit; } $sessionVars["CURRENT_ITEM"] = $id; putSessionVars(); $query = "select bid from bids where auction=\"$id\""; $result = mysql_query($query); if ( mysql_num_rows($result ) > 0) { $TPL_BIDS_value = "<A HREF=\"bidhistory.php?SESSION_ID=".urlencode($sess ionID)."&id=$id\">$MSG_105</A> | "; } /* get auction data */ $query = "select * from auctions where id='$id'"; $result = mysql_query($query); if ( !$result ) { print $ERR_001; exit; } $user = stripslashes(mysql_result ( $result, 0, "user" )); $title = strip_tags(stripslashes(mysql_result ( $result, 0, "title" ))); $date = mysql_result ( $result, 0, "starts" ); $description = stripslashes(mysql_result ( $result, 0, "description" )); $pict_url = mysql_result ( $result, 0, "pict_url" ); $pict_url2 = mysql_result ( $result, 0, "pict_url2" ); $pict_url3 = mysql_result ( $result, 0, "pict_url3" ); $category = mysql_result ( $result, 0, "category" ); $minimum_bid = mysql_result ( $result, 0, "minimum_bid" ); $reserve_price = mysql_result ( $result, 0, "reserve_price" ); $auction_type = mysql_result ( $result, 0, "auction_type" ); $location = mysql_result ( $result, 0, "location" ); $location_zip = mysql_result ( $result, 0, "location_zip" ); $shipping = mysql_result ( $result, 0, "shipping" ); $payment = mysql_result ( $result, 0, "payment" ); $international = mysql_result ( $result, 0, "international" ); $ends = mysql_result ( $result, 0, "ends" ); $current_bid = mysql_result ( $result, 0, "current_bid" ); $phu = intval(mysql_result( $result,0,"photo_uploaded")); $atype = intval(mysql_result($result,0,"auction_type")); $iquantity = mysql_result ($result,0,"quantity"); $izustand = mysql_result ($result,0,"zustand"); $iartnr = mysql_result ($result,0,"artnr"); $izustand = mysql_result ($result,0,"zustand"); $buy_now = mysql_result ($result,0,"buynow"); $privatauktion = mysql_result ($result,0,"privatauktion"); $TPL_auction_type = $auction_types[$atype]; /* if ($atype==2) { */ $TPL_auction_quantity = $iquantity; /* } */ //-- Get RESERVE PRICE information if ($reserve_price > 0) { $TPL_reserve_price = "$MSG_030 "; //-- Has someone reached the reserve price? if($current_bid <= $reserve_price) { $TPL_reserve_price .= " ($MSG_514)"; } else { $TPL_reserve_price .= " ($MSG_515) </FONT>"; } } else { $TPL_reserve_price = "$MSG_029"; } $TPL_id_value = $id; $TPL_artnr_value = $iartnr; $TPL_zustand_value = $izustand; $TPL_title_value = $title; $TPL_description_value = $description; $TPL_buy_now = $buy_now; $TPL_current_bid = $current_bid; $TPL_iquantity = $iquantity; if ( $phu!=0 ) { $thumb_url = $thumb_path.$pict_url; $pict_url = $uploaded_path.$pict_url; } if ($pict_url2 <> "") { $thumb_url2 = $thumb_path.$pict_url2; $pict_url2 = $uploaded_path.$pict_url2; } if ($pict_url3 <> "") { $thumb_url3 = $thumb_path.$pict_url3; $pict_url3 = $uploaded_path.$pict_url3; } /* get user's nick */ $query = "SELECT id,nick,certified,country FROM users WHERE id='$user'"; $result_usr = mysql_query ( $query ); if ( !$result_usr ) { print $MSG_001; exit; } $user_nick = mysql_result ( $result_usr, 0, "nick"); $user_id = mysql_result ( $result_usr, 0, "id"); $seller_cert = mysql_result ( $result_usr, 0, "certified"); $TPL_country = mysql_result ( $result_usr, 0, "country"); $TPL_user_nick_value = $user_nick; /* get bids for current item */ $query = "SELECT MAX(bid) AS maxbid FROM bids WHERE auction='$id' GROUP BY auction"; $result_bids = mysql_query ( $query) ; if ( !$result_bids ) { print $MSG_001; exit; } if ( mysql_num_rows($result_bids ) > 0) { $high_bid = mysql_result ( $result_bids, 0, "maxbid" ); $query = "select bidder from bids where bid=$high_bid and auction='$id'"; $result_bidder = mysql_query ( $query ); $high_bidder_id = mysql_result ( $result_bidder, 0, "bidder" ); } if ( !mysql_num_rows($result_bids) ) { $num_bids = 0; $high_bid = 0; } else { /* Get number of bids */ $query = "select bid from bids where auction='$id'"; $result_numbids = mysql_query ( $query ); if ( !$result_numbids ) { print $ERR_001; exit; } $num_bids = mysql_num_rows ( $result_numbids ); /* Get bidder nickname */ $query = "select id,nick,certified from users where id='$high_bidder_id'"; $result_bidder = mysql_query($query); if ( !$result_bidder ) { print $ERR_001; exit; } $high_bidder_id = mysql_result ( $result_bidder, 0, "id" ); $high_bidder_nick = mysql_result ( $result_bidder, 0, "nick" ); $high_bidder_cert = mysql_result ( $result_bidder, 0, "certified" ); } /* Get bid increment for current bis and calculate minimum bid */ $query = "SELECT increment FROM increments WHERE". "((low<=$high_bid AND high>=$high_bid) OR". "(low<$high_bid AND high<$high_bid)) ORDER BY increment DESC"; $result_incr = mysql_query ( $query ); if(mysql_num_rows($result_incr) != 0) { $increment = mysql_result ( $result_incr, 0, "increment" ); } if ($high_bid == 0) { $query = "SELECT increment FROM increments WHERE". "((low<=$minimum_bid AND high>=$minimum_bid) OR". "(low<$minimum_bid AND high<$minimum_bid)) ORDER BY increment DESC"; $result_incr = mysql_query ( $query ); $increment = mysql_result ( $result_incr, 0, "increment" ); $next_bid = $minimum_bid; } else { $next_bid = $high_bid + $increment; } if ( $pict_url ) { $TPL_pict_url_value = "<A HREF=\"#image\"><IMG SRC=\"./images/picture.gif\" BORDER=0></A>" ."<A HREF=\"#image\">$MSG_108</A>" ."<IMG SRC=\"images/transparent.gif\" WIDTH=15>"; } $year = intval ( date("Y")); $month = intval ( date("m")); $day = intval ( date("d")); $hours = intval ( date("H")); $minutes = intval ( date("i")); $seconds = intval ( date("s")); $ends_year = substr ( $ends, 0, 4 ); $ends_month = substr ( $ends, 4, 2 ); $ends_day = substr ( $ends, 6, 2 ); $ends_hours = substr ( $ends, 8, 2 ); $ends_minutes = substr ( $ends, 10, 2 ); $ends_seconds = substr ( $ends, 12, 2 ); $difference = intval( mktime( $ends_hours,$ends_minutes,$ends_seconds,$ends_mont h,$ends_day,$ends_year)) - time(); if ($difference > 0) { $TPL_days_difference_value = intval($difference / 86400).$MSG_126; $difference = $difference - ($TPL_days_difference_value * 86400); $hours_difference = intval($difference / 3600); if(strlen($hours_difference) == 1) { $hours_difference = "0".$hours_difference; } $TPL_hours_difference_value = $hours_difference.":"; $difference = $difference - ($hours_difference * 3600); $minutes_difference = intval($difference / 60); if (strlen($minutes_difference) == 1) { $minutes_difference = "0".$minutes_difference; } $TPL_minutes_difference_value = $minutes_difference.":"; $difference = $difference - ($minutes_difference * 60); $seconds_difference = $difference; if (strlen($seconds_difference) == 1) { $seconds_difference = "0".$seconds_difference; } $TPL_seconds_difference_value = $seconds_difference; } else { if (($buy_now == $current_bid) && ($current_bid <> 0)) $TPL_days_difference_value = "$err_font beendet </FONT>"; else $TPL_days_difference_value = "$err_font $MSG_911 </FONT>"; $TPL_hours_difference_value = ""; $TPL_minutes_difference_value = ""; $TPL_seconds_difference_value = ""; } $TPL_num_bids_value = $num_bids; $TPL_currency_value1 = print_money($minimum_bid); $TPL_currency_value2 = print_money($high_bid); $TPL_currency_value3 = print_money($increment); $TPL_currency_value4 = print_money($next_bid); $TPL_minimum_bid = $minimum_bid; // $TPL_next_bid = str_replace(".",",",$next_bid); $TPL_next_bid = number_format($next_bid,2,",",""); /* Bidding table */ $TPL_next_bid_value = $next_bid; $TPL_user_id_value = $user_id; $TPL_title_value = $title; $TPL_category_value = $category; $TPL_id_value = $id; $TPL_artnr_value = $iartnr; $TPL_zustand_value = $izustand; /* Description & Image table */ $TPL_description_value = stripslashes($description); if ( $pict_url ) { $info1 = getimagesize($pict_url); if (intval($info1[0]) < 200) $breite1 = intval($info1[0]); else $breite1 = 200; $TPL_pict_url = $pict_url; $TPL_thumb_url = $thumb_url; } if ( $pict_url2 ) { $info1 = getimagesize($pict_url2); if (intval($info1[0]) < 200) $breite1 = intval($info1[0]); else $breite1 = 200; $TPL_pict_url2 = $pict_url2; $TPL_thumb_url2 = $thumb_url2; } if ( $pict_url3 ) { $info1 = getimagesize($pict_url3); if (intval($info1[0]) < 200) $breite1 = intval($info1[0]); else $breite1 = 200; $TPL_pict_url3 = $pict_url3; $TPL_thumb_url3 = $thumb_url3; } $TPL_location_name_value = $location; $TPL_location_zip_value = $location_zip; if ( $shipping == '1' ) { $TPL_shipping_value = $MSG_038; } else { $TPL_shipping_value = $MSG_032; } if ( $international ) { $TPL_international_value = ", $MSG_033"; } else { $TPL_international_value = ", $MSG_043"; } /* Get Payment methods */ $payment_methods = explode("\n",$payment); $i = 0; $c = count($payment_methods); $began = false; while ($i<$c) { if (strlen($payment_methods[$i])!=0 ) { if ($began) $TPL_payment_value .= ", "; else $began = true; $TPL_payment_value .= trim($payment_methods[$i]); } $i++; } $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); $date_string = ArrangeDate($day,$month,$year,$hours,$minutes); $TPL_date_string1 = $date_string; $year = substr($ends,0,4); $month = substr($ends,4,2); $day = substr($ends,6,2); $hours = substr($ends,8,2); $minutes = substr($ends,10,2); $date_string = ArrangeDate($day,$month,$year,$hours,$minutes); $TPL_date_string2 = $date_string; $c_name[] = array(); $c_id[] = array(); $TPL_cat_value = ""; $query = "SELECT cat_id,parent_id,cat_name FROM categories WHERE cat_id='$category'"; $result = mysql_query($query); if ( !$result ) { print $ERR_001; exit; } $result = mysql_fetch_array ( $result ); $parent_id = $result[parent_id]; $cat_id = $categories; $j = $category; $i = 0; do { $query = "SELECT cat_id,parent_id,cat_name FROM categories WHERE cat_id='$j'"; $result = mysql_query($query); if ( !$result ) { print $ERR_001; exit; } $result = mysql_fetch_array ( $result ); if ( $result ) { $parent_id = $result[parent_id]; $c_name[$i] = $result[cat_name]; $c_id[$i] = $result[cat_id]; $i++; $j = $parent_id; } else { // error message print "<CENTER>$err_font $ERR_620 </FONT></CENTER>"; include "footer.php"; exit; } } while ( $parent_id != 0 ); for ($j=$i-1; $j>=0; $j--) { if ( $j == 0) { $TPL_cat_value .= "<A href=\"list_items.php?cat=".$c_id[$j]."\">".$c_name[$j]."</A>"; } else { $TPL_cat_value .= "<A href=\"list_items.php?cat=".$c_id[$j]."\">".$c_name[$j]."</A> / "; } } $tabelle = "counter_auc"; $seite = $TPL_id_value; $sql = "SELECT * from $tabelle WHERE seite = '$seite'"; // Tabelle auslesen $result = mysql_query($sql); $werte = mysql_num_rows($result); if ($werte == 0) { $sql2 = "INSERT INTO $tabelle (seite,stand)"; // neu anlegen $sql2 .= "VALUES "; $sql2 .= "('$seite', '0')"; $result2 = mysql_query($sql2); if ($result2) { $TPL_counter = 1; } } else { $daten = mysql_fetch_array($result); $zaehler = $daten[stand]; $zaehler++; $sql3 = "UPDATE $tabelle SET stand='$zaehler' WHERE seite = '$seite'"; $result3 = mysql_query($sql3); if ($result3) { $TPL_counter = $zaehler; // Wert ausgeben } } include ("./templates/tpl_item.html"); require("footer.php"); ?>[php] |
| Themen-Optionen | |
| Thema bewerten | |
|
|
Ähnliche Themen | ||||
| Thema | Autor | Forum | Antworten | Letzter Beitrag |
| Bilder ohne DB sicher speichern | Diet | PHP Tipps 2005 | 6 | 25.03.2009 00:07 |
| Newsscript wird nicht richtig angezeigt. | albi | PHP Tipps 2008 | 14 | 24.06.2008 13:01 |
| Bilder Diashow? | errox | PHP Tipps 2008 | 2 | 26.01.2008 10:02 |
| Bilder werden nicht angezeigt | sawi | PHP Tipps 2006 | 6 | 05.04.2006 13:53 |
| Bilder werden nicht angezeigt? | seejay | PHP Tipps 2007 | 3 | 20.12.2005 09:33 |
| Bilder löschen | PHP Tipps 2005-2 | 4 | 24.10.2005 11:37 | |
| Warum werden manchmal die bilder nicht angezeigt? | fadass | HTML, Usability und Barrierefreiheit | 7 | 09.10.2005 14:53 |
| Bilder aus einem unterverzeichis anzeigen.Hilfe | PHP Tipps 2005-2 | 3 | 12.09.2005 15:36 | |
| Mehrere Bilder Hochladen und bearbeiten | PHP Tipps 2005-2 | 7 | 23.07.2005 13:48 | |
| [Erledigt] VARIABLEN WERDEN NICHT RICHTIG VERARBEITET!!!! HILFE | PHP Tipps 2005-2 | 6 | 02.07.2005 18:32 | |
| Bilder in Tabellen | nixdorf | HTML, Usability und Barrierefreiheit | 36 | 09.05.2005 21:15 |
| Bilder werden nicht angezeigt | pc-freak | HTML, Usability und Barrierefreiheit | 6 | 12.04.2005 17:58 |
| Bilder aus der Datenbank | Skazi | Datenbanken | 2 | 09.02.2005 13:42 |
| Tabelle wird im IE nicht richtig angezeigt | fantast | HTML, Usability und Barrierefreiheit | 3 | 07.11.2004 13:05 |
| Zeit wird nicht richtig angezeigt ... | PHP Tipps 2004 | 8 | 18.07.2004 16:14 | |
| Besucher kamen über folgende Suchanfragen bei Google auf diese Seite |
| php $tpl_currency_value2, eduard hange, intval(mktime, tpl_date_string1, \eduard hange\, $tpl_pict_url |

Dieser Inhalt ist unter einer Creative Commons-Lizenz lizenziert.