Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Dahls

Members
  • Joined

  • Last visited

Everything posted by Dahls

  1. Hi i need something similar, so great if i could get some help. working on webid auction system (link) that displays if bidder has highest bid or is outbid. to see that i has to refresh the whole page so i want only to refresh the part of page that displays the bid message. i have tried lots of scripts spend over one week on it getting nowhere, the code is two pages actual there is lots more but think its just those two that is needed, or maybe it needs be installed before you can see what to do, one php page and one tpl page that has the layout and the <div> containing the bid/outbid part, its in html and java the part i need updated is in tpl (line 64) <div class="{YOURBIDCLASS}"> {YOURBIDMSG} </div> the tpl file <!-- IF B_COUNTDOWN --> <script type="text/javascript"> $(document).ready(function() { var currenttime = '{ENDS_IN}'; function padlength(what) { var output=(what.toString().length == 1)? '0' + what : what; return output; } function displaytime() { currenttime -= 1; if (currenttime > 0){ var hours = Math.floor(currenttime / 3600); var mins = Math.floor((currenttime - (hours * 3600)) / 60); var secs = Math.floor(currenttime - (hours * 3600) - (mins * 60)); var timestring = padlength(hours) + ':' + padlength(mins) + ':' + padlength(secs); $("#ending_counter").html(timestring); setTimeout(displaytime, 1000); } else { $("#ending_counter").html('<span class="errfont">{L_911}</span>'); } } setTimeout(displaytime, 1000); }); </script> <!-- ENDIF --> <div class="content"> <div class="tableContent2"> <br><b>{L_041}:</b> {TOPCATSPATH}<br><br> <div class="titTable2 rounded-top rounded-bottom"> <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td> {TITLE} <!-- IF SUBTITLE ne '' --> <p class="smallspan">{SUBTITLE}</p> <!-- ENDIF --> </td> <td align="right">{L_113}: {ID}</td> </tr> <!-- IF B_CANEDIT --> <tr> <td colspan="2"> [<a href="{SITEURL}edit_active_auction.php?id={ID}">{L_30_0069}</a>] </td> </tr> <!-- ENDIF --> </table> </div> <div class="titTable3"> {VIEW_HISTORY1} <a href="{SITEURL}friend.php?id={ID}">{L_106}</a> | <!-- IF B_CANCONTACTSELLER --> <a href="{SITEURL}send_email.php?auction_id={ID}">{L_922}</a> | <!-- ENDIF --> <!-- IF B_LOGGED_IN --> <a href="{SITEURL}item_watch.php?{WATCH_VAR}={ID}">{WATCH_STRING}</a> <!-- ELSE --> <a href="{SITEURL}user_login.php?">{L_5202}</a> <!-- ENDIF --> </div> <!-- IF B_USERBID --> <div class="{YOURBIDCLASS}"> {YOURBIDMSG} </div> <!-- ENDIF --> <br> <div class="table2"> <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td class="titTable5" valign="top"> <table width="100%" border="0" cellpadding="5" cellspacing="0"> <tr> <!-- IF B_HASIMAGE --> <td width="10%" valign="top"> <table bgcolor="#ffffff"> <tr> <td align='center'> <img src="{SITEURL}getthumb.php?w={THUMBWIDTH}&fromfile={PIC_URL}" border="0" align="center"><br> <!-- IF B_HASGALELRY --> <a href="#gallery"><img src="{SITEURL}images/gallery.gif" border="0" alt="gallery"> {L_694}</a> <!-- ENDIF --> </td> </tr> </table> </td> <!-- ENDIF --> <td width="60%" valign="top"> <table width="100%" align="center" cellpadding="0" cellspacing="0" valign="top" border="0"> <tr> <td> </td> <td align="left" valign="top"> {L_611} <font color="#ff3300"><b>{AUCTION_VIEWS}</b></font> {L_612}<br> <a href="#description"><img src="{SITEURL}images/info.gif" border='0'></a> <a href="#description">{L_018}</a> <table border='0' width="100%" cellspacing="0" cellpadding="1"> <!-- auction type --> <tr> <td width="50%" align="left">{L_261}: </td> <td align="left">{AUCTION_TYPE}</td> </tr> <!-- higher bidder --> <!-- IF B_HASBUYER --> <tr> <td width='50%' style="leftpan" valign="top"> {L_117}: </td> <td> <!-- BEGIN high_bidders --> <p> <!-- IF B_BIDDERPRIV --> <b>{high_bidders.BUYER_NAME}</b> <!-- ELSE --> <a href="{SITEURL}profile.php?user_id={high_bidders.BUYER_ID}&auction_id={ID}"><b>{high_bidders.BUYER_NAME}</b></a> <b>(<a href="{SITEURL}feedback.php?id={high_bidders.BUYER_ID}&faction=show">{high_bidders.BUYER_FB}</a>)</b> <!-- ENDIF --> {high_bidders.BUYER_FB_ICON}</p> <!-- END high_bidders --> </td> </tr> <!-- ENDIF --> <!-- IF QTY gt 1 --> <tr> <td width="50%" align="left">{L_901}: </td> <td align="left">{QTY}</td> </tr> <!-- ENDIF --> <tr> <td width="50%" align="left">{L_923}: </td> <td align="left">{COUNTRY}</td> </tr> <tr> <td width="50%" align="left">{L_118}: </td> <td align="left" valign="top"> <!-- IF B_COUNTDOWN --> <span id="ending_counter">{ENDS}</span> <!-- ELSE --> {ENDS}<!-- IF B_SHOWENDTIME --><br><span class="smallspan">({ENDTIME})</span><!-- ENDIF --> <!-- ENDIF --> </td> </tr> <!-- IF B_NOTBNONLY --> <tr> <td width="50%" align="left">{L_119}: </td> <td align="left">{NUMBIDS} {VIEW_HISTORY2}</td> </tr> <!-- IF ATYPE eq 2 --> <tr> <td width="50%" align="left"> {L_038}: </td> <td align="left">{MINBID}</td> </tr> <!-- ENDIF --> <tr> <td width="50%" align="left">{L_116}: </td> <td align="left" valign="middle">{MAXBID}<!-- IF B_HASRESERVE --> <span class="smallspan">{L_514}</span><!-- ENDIF --></td> </tr> <!-- ENDIF --> <tr> <td width="50%" align="left">{L_023}: </td> <td align="left">{SHIPPING_COST}</td> </tr> <!-- IF B_BUY_NOW --> <tr> <td width="50%" align="left">{L_496}:</td> <td align="left"> {BUYNOW2} </td> </tr> <!-- ENDIF --> <!-- IF B_HASENDED --> <tr> <td colspan="2" align="left"><b>{L_904}</b></td> </tr> <!-- ENDIF --> </table> </td> </tr> </table> </td> </tr> </table> </td> <td width="2%"> </td> <td width="37%" valign="top" bgcolor="#ffffff" align="left"> <div class="titTable1"> <b>{L_30_0209}</b> </div> <table width="100%" cellspacing="0" cellpadding="4" border="0" bgcolor="#ffffff"> <tr> <td width="3%" class='table2'> </td> <td class="table2" style="padding:10px;"> <a href='{SITEURL}profile.php?user_id={SELLER_ID}&auction_id={ID}'><b>{SELLER_NICK}</b></a> (<a href='{SITEURL}feedback.php?id={SELLER_ID}&faction=show'>{SELLER_TOTALFB}</A>) {SELLER_FBICON} </td> </tr> <tr> <td width="3%"> </td> <td width="97%"> <li>{L_5509}{SELLER_NUMFB}{L__0151} <li><b>{L_5506}{SELLER_FBPOS}</b> <!-- IF SELLER_FBNEG ne 0 --> <li>{SELLER_FBNEG}</li> <!-- ENDIF --> <li>{L_5508}{SELLER_REG}</li> </td> </tr> <tr> <td width="3%"> </td> <td width="97%"> <a href="{SITEURL}active_auctions.php?user_id={SELLER_ID}">{L_213}</a> <br><br> </td> </tr> </table> <div class="titTable1"> <!-- IF B_HASENDED eq false and B_CAN_BUY --> <!-- IF B_NOTBNONLY --> <table width="100%" border=0 cellpadding=2 cellspacing=0 border=1> <form name="bid" action="{BIDURL}bid.php" method="post"> <tr> <td width="65%"> <table width=100% border=0 cellpadding=2 cellspacing=0> <tr> <td align="left"> <b> <!-- IF QTY gt 1 --> {L_284}: <input type="text" name="qty" size=15 /> {QTY} {L_5408}<br> <!-- ENDIF --> {L_121} <input type="text" name="bid" size="15"> <!-- IF ATYPE eq 1 --> {L_124}: {NEXTBID} <br> <!-- ENDIF --> </td> </tr> </table> </td> <td valign='center' align='center' class='tema' width="50%"> <input type="hidden" name="seller_id" value="{SELLER_ID}"> <input type="hidden" name="title" value="{TITLE}" > <input type="hidden" name="category" value="{CAT_ID}" > <input type="hidden" name="id" value="{ID}"> <input type="hidden" name="csrftoken" value="{_CSRFTOKEN}"> <input type="submit" name="" value="{L_30_0208}" class="button"> </td> </tr> </form> </table> <!-- ELSE --> {BUYNOW} <a href="{BIDURL}buy_now.php?id={ID}"><img border="0" align="absbottom" alt="{L_496}" src="{BNIMG}"></a> <!-- ENDIF --> <!-- ENDIF --> </div> </td> </tr> </table> <br> <div class="tableContent2"> <div class="titTable4"> <a name="description"></a>{L_018} </div> <div class="table2"> {AUCTION_DESCRIPTION} </div> </div> <!-- IF B_HAS_QUESTIONS --> <div class="tableContent2"> <div class="titTable4"> <a name="questions"></a>{L_552} </div> <div class="table2"> <!-- BEGIN questions --> <b>{L_5239}</b> <div class="smallspan padding"> <!-- BEGIN conv --> <p><b>{questions.conv.BY_WHO}</b>: {questions.conv.MESSAGE}</p> <!-- END conv --> </div> <!-- END questions --> </div> </div> <!-- ENDIF --> <!-- IF B_HASGALELRY --> <div class="tableContent2"> <div class="titTable4"> <a name="gallery"></a>{L_663} </div> <div class="table2" style="text-align:center" id="gallery"> <table> <tr> <!-- BEGIN gallery --> <td> <a href="{SITEURL}{UPLOADEDPATH}{ID}/{gallery.V}" title="{gallery.V}"> <img src="{SITEURL}getthumb.php?w={THUMBWIDTH}&fromfile={UPLOADEDPATH}{ID}/{gallery.V}" border="0" width="{THUMBWIDTH}" hspace="10"> </a> </td> <!-- END gallery --> </tr> </table> </div> </div> <!-- ENDIF --> <br> <div class="titTable4"> {L_724} </div> <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td> <div class="tableContent2"> <div class="table2"> <!-- IF COUNTRY ne '' or ZIP ne '' --> <b>{L_014}:</b> {COUNTRY} ({ZIP})<br> <!-- ENDIF --> <b>{L_025}:</b> {SHIPPING}, {INTERNATIONAL}<br> <!-- IF SHIPPINGTERMS ne '' --> <table border="0" cellpadding="0" cellspacing="0"> <tr> <td valign="top"><b>{L_25_0215}:</b> </td> <td valign="top">{SHIPPINGTERMS}</td> </tr> </table> <!-- ENDIF --> <br> <b>{L_026}:</b> {PAYMENTS}<br> <!-- IF ! B_BUY_NOW_ONLY --> <b><!-- IF ATYPE eq 1 -->{L_127}<!-- ELSE -->{L_038}<!-- ENDIF -->:</b> {MINBID}<br> <!-- ENDIF --> <br> <b>{L_111}:</b> {STARTTIME}<br> <b>{L_112}:</b> {ENDTIME}<br> <b>{L_113}:</b> {ID}<br> <br> <b>{L_041}:</b> {CATSPATH}<br> <!-- IF SECCATSPATH ne '' --><b>{L_814}:</b> {SECCATSPATH}<!-- ENDIF --> </div> </div> </td> </tr> </table> <br> </div> </div> </div> <!-- IF B_SHOWHISTORY --> <div class="tableContent2"> <div class="titTable4"> {L_26_0001} </div> <div class="table2"> <a name="history"></a> <table width="100%" border="0" cellpadding="4" cellspacing="1"> <tr> <th width="33%" align="center">{L_176}</th> <th width="33%" align="center">{L_130}</th> <th width="33%" align="center">{L_175}</th> <!-- IF ATYPE eq 2 --> <th width="33%" align="center">{L_284}</th> <!-- ENDIF --> </tr> <!-- BEGIN bidhistory --> <tr valign="top" {bidhistory.BGCOLOUR}> <td> <!-- IF B_BIDDERPRIV --> {bidhistory.NAME} <!-- ELSE --> <a href="{SITEURL}profile.php?user_id={bidhistory.ID}">{bidhistory.NAME}</a> <!-- ENDIF --> </td> <td align="center"> {bidhistory.BID} </td> <td align="center"> {bidhistory.WHEN} </td> <!-- IF ATYPE eq 2 --> <td align="center"> {bidhistory.QTY} </td> <!-- ENDIF --> </tr> <!-- END bidhistory --> </table> </div> </div> <!-- ENDIF --> The Php file <?php include 'includes/common.inc.php'; include $include_path . 'dates.inc.php'; include $include_path . 'membertypes.inc.php'; include $main_path . 'language/' . $language . '/categories.inc.php'; // Get parameters from the URL foreach ($membertypes as $idm => $memtypearr) { $memtypesarr[$memtypearr['feedbacks']] = $memtypearr; } ksort($memtypesarr, SORT_NUMERIC); $id = (isset($_SESSION['CURRENT_ITEM'])) ? intval($_SESSION['CURRENT_ITEM']) : 0; $id = (isset($_REQUEST['id'])) ? intval($_REQUEST['id']) : 0; if (!is_numeric($id)) $id = 0; $bidderarray = array(); $bidderarraynum = 1; $catscontrol = new MPTTcategories(); $_SESSION['CURRENT_ITEM'] = $id; $_SESSION['REDIRECT_AFTER_LOGIN'] = $system->SETTINGS['siteurl'] . 'item.php?id=' . $id; // get auction all needed data $query = "SELECT a.*, ac.counter, u.nick, u.reg_date, u.country, u.zip FROM " . $DBPrefix . "auctions a LEFT JOIN " . $DBPrefix . "users u ON (u.id = a.user) LEFT JOIN " . $DBPrefix . "auccounter ac ON (ac.auction_id = a.id) WHERE a.id = " . $id . " LIMIT 1"; $result = mysql_query($query); $system->check_mysql($result, $query, __LINE__, __FILE__); if (mysql_num_rows($result) == 0) { $_SESSION['msg_title'] = $ERR_622; $_SESSION['msg_body'] = $ERR_623; header('location: message.php'); exit; } $auction_data = mysql_fetch_assoc($result); $category = $auction_data['category']; $auction_type = $auction_data['auction_type']; $ends = $auction_data['ends']; $start = $auction_data['starts']; $user_id = $auction_data['user']; $minimum_bid = $auction_data['minimum_bid']; $high_bid = $auction_data['current_bid']; $customincrement = $auction_data['increment']; $seller_reg = FormatDate($auction_data['reg_date'], '/', false); // sort out counter if (empty($auction_data['counter'])) { $query = "INSERT INTO " . $DBPrefix . "auccounter VALUES (" . $id . ", 1)"; $system->check_mysql(mysql_query($query), $query, __LINE__, __FILE__); $auction_data['counter'] = 1; } else { if (!isset($_SESSION['WEBID_VIEWED_AUCTIONS'])) { $_SESSION['WEBID_VIEWED_AUCTIONS'] = array(); } if (!in_array($id, $_SESSION['WEBID_VIEWED_AUCTIONS'])) { $query = "UPDATE " . $DBPrefix . "auccounter set counter = counter + 1 WHERE auction_id = " . $id; $system->check_mysql(mysql_query($query), $query, __LINE__, __FILE__); $_SESSION['WEBID_VIEWED_AUCTIONS'][] = $id; } } // get watch item data if ($user->logged_in) { // Check if this item is not already added $query = "SELECT item_watch FROM " . $DBPrefix . "users WHERE id = " . $user->user_data['id']; $result = mysql_query($query); $system->check_mysql($result, $query, __LINE__, __FILE__); $watcheditems = trim(mysql_result($result, 0, 'item_watch')); $auc_ids = explode(' ', $watcheditems); if (in_array($id, $auc_ids)) { $watch_var = 'delete'; $watch_string = $MSG['5202_0']; } else { $watch_var = 'add'; $watch_string = $MSG['5202']; } } else { $watch_var = ''; $watch_string = ''; } // get ending time $difference = $ends - time(); $showendtime = true; $has_ended = false; if ($start > time()) { $ending_time = '<span class="errfont">' . $MSG['668'] . '</span>'; } elseif ($difference > 0) { $ending_time = ''; $d = 0; $days_difference = floor($difference / 86400); if ($days_difference > 0) { $daymsg = ($days_difference == 1) ? $MSG['126b'] : $MSG['126']; $ending_time .= $days_difference . ' ' . $daymsg . ' '; $d++; } $difference = $difference % 86400; $hours_difference = floor($difference / 3600); if ($hours_difference > 0) { $ending_time .= $hours_difference . $MSG['25_0037'] . ' '; $d++; } $difference = $difference % 3600; $minutes_difference = floor($difference / 60); $seconds_difference = $difference % 60; if ($minutes_difference > 0 && $d < 2) { $ending_time .= $minutes_difference . $MSG['25_0032'] . ' '; $d++; } if ($seconds_difference > 0 && $d < 2) { $ending_time .= $seconds_difference . $MSG['25_0033']; } $showendtime = true; } else { $ending_time = '<span class="errfont">' . $MSG['911'] . '</span>'; $has_ended = true; } // build bread crumbs $query = "SELECT left_id, right_id, level FROM " . $DBPrefix . "categories WHERE cat_id = " . $auction_data['category']; $res = mysql_query($query); $system->check_mysql($res, $query, __LINE__, __FILE__); $parent_node = mysql_fetch_assoc($res); $cat_value = ''; $crumbs = $catscontrol->get_bread_crumbs($parent_node['left_id'], $parent_node['right_id']); for ($i = 0; $i < count($crumbs); $i++) { if ($crumbs[$i]['cat_id'] > 0) { if ($i > 0) { $cat_value .= ' > '; } $cat_value .= '<a href="' . $system->SETTINGS['siteurl'] . 'browse.php?id=' . $crumbs[$i]['cat_id'] . '">' . $category_names[$crumbs[$i]['cat_id']] . '</a>'; } } $secondcat_value = ''; if ($system->SETTINGS['extra_cat'] == 'y' && intval($auction_data['secondcat']) > 0) { $query = "SELECT left_id, right_id, level FROM " . $DBPrefix . "categories WHERE cat_id = " . $auction_data['secondcat']; $res = mysql_query($query); $system->check_mysql($res, $query, __LINE__, __FILE__); $parent_node = mysql_fetch_assoc($res); $crumbs = $catscontrol->get_bread_crumbs($parent_node['left_id'], $parent_node['right_id']); for ($i = 0; $i < count($crumbs); $i++) { if ($crumbs[$i]['cat_id'] > 0) { if ($i > 0) { $secondcat_value .= ' > '; } $secondcat_value .= '<a href="' . $system->SETTINGS['siteurl'] . 'browse.php?id=' . $crumbs[$i]['cat_id'] . '">' . $category_names[$crumbs[$i]['cat_id']] . '</a>'; } } } // history $query = "SELECT b.*, u.nick, u.rate_sum FROM " . $DBPrefix . "bids b LEFT JOIN " . $DBPrefix . "users u ON (u.id = b.bidder) WHERE b.auction = " . $id . " ORDER BY b.bid DESC, b.quantity DESC, b.id DESC"; $result_numbids = mysql_query($query); $system->check_mysql($result_numbids, $query, __LINE__, __FILE__); $num_bids = mysql_num_rows($result_numbids); $i = 0; $left = $auction_data['quantity']; $hbidder_data = array(); while ($bidrec = mysql_fetch_assoc($result_numbids)) { if (!isset($bidderarray[$bidrec['nick']])) { if ($system->SETTINGS['buyerprivacy'] == 'y' && $user->user_data['id'] != $auction_data['user'] && $user->user_data['id'] != $bidrec['bidder']) { $bidderarray[$bidrec['nick']] = $MSG['176'] . ' ' . $bidderarraynum; $bidderarraynum++; } else { $bidderarray[$bidrec['nick']] = $bidrec['nick']; } } if ($left > 0 && !in_array($bidrec['bidder'], $hbidder_data)) //store highest bidder details { $hbidder_data[] = $bidrec['bidder']; $fb_pos = $fb_neg = 0; // get seller feebacks $query = "SELECT rate FROM " . $DBPrefix . "feedbacks WHERE rated_user_id = " . $bidrec['bidder']; $result = mysql_query($query); $system->check_mysql($result, $query, __LINE__, __FILE__); // count numbers $fb_pos = $fb_neg = 0; while ($fb_arr = mysql_fetch_assoc($result)) { if ($fb_arr['rate'] == 1) { $fb_pos++; } elseif ($fb_arr['rate'] == - 1) { $fb_neg++; } } $total_rate = $fb_pos - $fb_neg; foreach ($memtypesarr as $k => $l) { if ($k >= $total_rate || $i++ == (count($memtypesarr) - 1)) { $buyer_rate_icon = $l['icon']; break; } } $template->assign_block_vars('high_bidders', array( 'BUYER_ID' => $bidrec['bidder'], 'BUYER_NAME' => $bidderarray[$bidrec['nick']], 'BUYER_FB' => $bidrec['rate_sum'], 'BUYER_FB_ICON' => (!empty($buyer_rate_icon) && $buyer_rate_icon != 'transparent.gif') ? '<img src="' . $system->SETTINGS['siteurl'] . 'images/icons/' . $buyer_rate_icon . '" alt="' . $buyer_rate_icon . '" class="fbstar">' : '' )); } $template->assign_block_vars('bidhistory', array( 'BGCOLOUR' => (!($i % 2)) ? '' : 'class="alt-row"', 'ID' => $bidrec['bidder'], 'NAME' => $bidderarray[$bidrec['nick']], 'BID' => $system->print_money($bidrec['bid']), 'WHEN' => ArrangeDateNoCorrection($bidrec['bidwhen'] + $system->tdiff) . ':' . gmdate('s', $bidrec['bidwhen']), 'QTY' => $bidrec['quantity'] )); $left -= $bidrec['quantity']; $i++; } $userbid = false; if ($user->logged_in && $num_bids > 0) { // check if youve bid on this before $query = "SELECT bid FROM " . $DBPrefix . "bids WHERE auction = " . $id . " AND bidder = " . $user->user_data['id'] . " LIMIT 1"; $result = mysql_query($query); $system->check_mysql($result, $query, __LINE__, __FILE__); if (mysql_num_rows($result) > 0) { if (in_array($user->user_data['id'], $hbidder_data)) { $yourbidmsg = $MSG['25_0088']; $yourbidclass = 'yourbidwin'; if ($difference <= 0 && $auction_data['reserve_price'] > 0 && $auction_data['current_bid'] < $auction_data['reserve_price']) { $yourbidmsg = $MSG['514']; $yourbidclass = 'yourbidloss'; } elseif ($difference <= 0 || $auction_data['bn_only'] == 'y') { $yourbidmsg = $MSG['25_0089']; } } else { $yourbidmsg = $MSG['25_0087']; $yourbidclass = 'yourbidloss'; } $userbid = true; } } // sort out user questions $query = "SELECT id FROM " . $DBPrefix . "messages WHERE reply_of = 0 AND public = 1 AND question = " . $id; $res = mysql_query($query); $system->check_mysql($res, $query, __LINE__, __FILE__); $num_questions = mysql_num_rows($res); while ($row = mysql_fetch_assoc($res)) { $template->assign_block_vars('questions', array()); // just need to create the block $query = "SELECT sentfrom, message FROM " . $DBPrefix . "messages WHERE question = " . $id . " AND reply_of = " . $row['id'] . " OR id = " . $row['id'] . " ORDER BY sentat ASC"; $res_ = mysql_query($query); $system->check_mysql($res_, $query, __LINE__, __FILE__); while ($row_ = mysql_fetch_assoc($res_)) { $template->assign_block_vars('questions.conv', array( 'MESSAGE' => $row_['message'], 'BY_WHO' => ($user_id == $row_['sentfrom']) ? $MSG['125'] : $MSG['555'] )); } } $high_bid = ($num_bids == 0) ? $minimum_bid : $high_bid; if ($customincrement == 0) { // Get bid increment for current bid and calculate minimum bid $query = "SELECT increment FROM " . $DBPrefix . "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); $system->check_mysql($result_incr, $query, __LINE__, __FILE__); if (mysql_num_rows($result_incr) != 0) { $increment = mysql_result($result_incr, 0, 'increment'); } } else { $increment = $customincrement; } if ($auction_type == 2) { $increment = 0; } if ($customincrement > 0) { $increment = $customincrement; } if ($num_bids == 0 || $auction_type == 2) { $next_bidp = $minimum_bid; } else { $next_bidp = $high_bid + $increment; } $view_history = ''; if ($num_bids > 0 && !isset($_GET['history'])) { $view_history = '(<a href="' . $system->SETTINGS['siteurl'] . 'item.php?id=' . $id . '&history=view#history">' . $MSG['105'] . '</a>)'; } elseif (isset($_GET['history'])) { $view_history = '(<a href="' . $system->SETTINGS['siteurl'] . 'item.php?id=' . $id . '">' . $MSG['507'] . '</a>)'; } $min_bid = $system->print_money($minimum_bid); $high_bid = $system->print_money($high_bid); if ($difference > 0) { $next_bid = $system->print_money($next_bidp); } else { $next_bid = '--'; } // get seller feebacks $query = "SELECT rate FROM " . $DBPrefix . "feedbacks WHERE rated_user_id = " . $user_id; $result = mysql_query($query); $system->check_mysql($result, $query, __LINE__, __FILE__); $num_feedbacks = mysql_num_rows($result); // count numbers $fb_pos = $fb_neg = 0; while ($fb_arr = mysql_fetch_assoc($result)) { if ($fb_arr['rate'] == 1) { $fb_pos++; } elseif ($fb_arr['rate'] == - 1) { $fb_neg++; } } $total_rate = $fb_pos - $fb_neg; if ($total_rate > 0) { $i = 0; foreach ($memtypesarr as $k => $l) { if ($k >= $total_rate || $i++ == (count($memtypesarr) - 1)) { $seller_rate_icon = $l['icon']; break; } } } // Pictures Gellery $K = 0; $UPLOADED_PICTURES = array(); if (file_exists($uploaded_path . $id)) { $dir = @opendir($uploaded_path . $id); if ($dir) { while ($file = @readdir($dir)) { if ($file != '.' && $file != '..' && strpos($file, 'thumb-') === false) { $UPLOADED_PICTURES[$K] = $file; $K++; } } @closedir($dir); } $GALLERY_DIR = $id; if (is_array($UPLOADED_PICTURES)) { foreach ($UPLOADED_PICTURES as $k => $v) { $TMP = @getimagesize($uploaded_path . $id . '/' . $v); if ($TMP[2] >= 1 && $TMP[2] <= 3) { $template->assign_block_vars('gallery', array( 'V' => $v )); } } } } // payment methods $payment = explode(', ', $auction_data['payment']); $payment_methods = ''; $query = "SELECT * FROM " . $DBPrefix . "gateways"; $res = mysql_query($query); $system->check_mysql($res, $query, __LINE__, __FILE__); $gateways_data = mysql_fetch_assoc($res); $gateway_list = explode(',', $gateways_data['gateways']); $p_first = true; foreach ($gateway_list as $v) { $v = strtolower($v); if ($gateways_data[$v . '_active'] == 1 && _in_array($v, $payment)) { if (!$p_first) { $payment_methods .= ', '; } else { $p_first = false; } $payment_methods .= $system->SETTINGS['gatways'][$v]; } } $payment_options = unserialize($system->SETTINGS['payment_options']); foreach ($payment_options as $k => $v) { if (_in_array($k, $payment)) { if (!$p_first) { $payment_methods .= ', '; } else { $p_first = false; } $payment_methods .= $v; } } if (!$has_ended) { $bn_link = ' <a href="' . $system->SETTINGS['siteurl'] . 'buy_now.php?id=' . $id . '"><img border="0" align="absbottom" alt="' . $MSG['496'] . '" src="' . $system->SETTINGS['siteurl'] . 'language/' . $language . '/img/buy_it_now.gif"></a>'; } $page_title = $auction_data['title']; $sslurl = ($system->SETTINGS['usersauth'] == 'y' && $system->SETTINGS['https'] == 'y') ? str_replace('http://', 'https://', $system->SETTINGS['siteurl']) : $system->SETTINGS['siteurl']; $sslurl = (!empty($system->SETTINGS['https_url'])) ? $system->SETTINGS['https_url'] : $sslurl; $template->assign_vars(array( 'ID' => $auction_data['id'], 'TITLE' => $auction_data['title'], 'SUBTITLE' => $auction_data['subtitle'], 'AUCTION_DESCRIPTION' => stripslashes($auction_data['description']), 'PIC_URL' => $uploaded_path . $id . '/' . $auction_data['pict_url'], 'SHIPPING_COST' => ($auction_data['shipping_cost'] > 0) ? $system->print_money($auction_data['shipping_cost']) : $system->print_money($auction_data['shipping_cost']), 'COUNTRY' => $auction_data['country'], 'ZIP' => $auction_data['zip'], 'QTY' => $auction_data['quantity'], 'ENDS' => $ending_time, 'DIFFERENCE'=> $difference, 'ENDS_IN' => ($ends - time()), 'STARTTIME' => ArrangeDateNoCorrection($start + $system->tdiff), 'ENDTIME' => ArrangeDateNoCorrection($ends + $system->tdiff), 'BUYNOW1' => $auction_data['buy_now'], 'BUYNOW2' => ($auction_data['buy_now'] > 0) ? $system->print_money($auction_data['buy_now']) . $bn_link : $system->print_money($auction_data['buy_now']), 'NUMBIDS' => $num_bids, 'MINBID' => $min_bid, 'MAXBID' => $high_bid, 'NEXTBID' => $next_bid, 'INTERNATIONAL' => ($auction_data['international'] == 1) ? $MSG['033'] : $MSG['043'], 'SHIPPING' => ($auction_data['shipping'] == 1) ? $MSG['031'] : $MSG['032'], 'SHIPPINGTERMS' => nl2br($auction_data['shipping_terms']), 'PAYMENTS' => $payment_methods, 'AUCTION_VIEWS' => $auction_data['counter'], 'AUCTION_TYPE' => ($auction_data['bn_only'] == 'n') ? $system->SETTINGS['auction_types'][$auction_type] : $MSG['933'], 'ATYPE' => $auction_type, 'THUMBWIDTH' => $system->SETTINGS['thumb_show'], 'VIEW_HISTORY1' => (empty($view_history)) ? '' : $view_history . ' | ', 'VIEW_HISTORY2' => $view_history, 'TOPCATSPATH' => ($system->SETTINGS['extra_cat'] == 'y' && isset($_SESSION['browse_id']) && $_SESSION['browse_id'] == $auction_data['secondcat']) ? $secondcat_value : $cat_value, 'CATSPATH' => $cat_value, 'SECCATSPATH' => $secondcat_value, 'CAT_ID' => $auction_data['category'], 'UPLOADEDPATH' => $uploaded_path, 'BNIMG' => get_lang_img('buy_it_now.gif'), 'SELLER_REG' => $seller_reg, 'SELLER_ID' => $auction_data['user'], 'SELLER_NICK' => $auction_data['nick'], 'SELLER_TOTALFB' => $total_rate, 'SELLER_FBICON' => (!empty($seller_rate_icon) && $seller_rate_icon != 'transparent.gif') ? '<img src="' . $system->SETTINGS['siteurl'] . 'images/icons/' . $seller_rate_icon . '" alt="' . $seller_rate_icon . '" class="fbstar">' : '', 'SELLER_NUMFB' => $num_feedbacks, 'SELLER_FBPOS' => ($num_feedbacks > 0) ? '(' . ceil($fb_pos * 100 / $num_feedbacks) . '%)' : '100%', 'SELLER_FBNEG' => ($fb_neg > 0) ? $MSG['5507'] . ' (' . ceil($fb_neg * 100 / $total_rate) . '%)' : '0', 'WATCH_VAR' => $watch_var, 'WATCH_STRING' => $watch_string, 'YOURBIDMSG' => (isset($yourbidmsg)) ? $yourbidmsg : '', 'YOURBIDCLASS' => (isset($yourbidclass)) ? $yourbidclass : '', 'BIDURL' => $sslurl, 'B_HASENDED' => $has_ended, 'B_CANEDIT' => ($user->logged_in && $user->user_data['id'] == $auction_data['user'] && $num_bids == 0 && $difference > 0), 'B_CANCONTACTSELLER' => (($system->SETTINGS['contactseller'] == 'always' || ($system->SETTINGS['contactseller'] == 'logged' && $user->logged_in)) && (!$user->logged_in || $user->user_data['id'] != $auction_data['user'])), 'B_HASIMAGE' => (!empty($auction_data['pict_url'])), 'B_NOTBNONLY' => ($auction_data['bn_only'] == 'n'), 'B_HASRESERVE' => ($auction_data['reserve_price'] > 0 && $auction_data['reserve_price'] > $auction_data['current_bid']), 'B_BNENABLED' => ($system->SETTINGS['buy_now'] == 2), 'B_HASGALELRY' => (count($UPLOADED_PICTURES) > 0), 'B_SHOWHISTORY' => (isset($_GET['history']) && $num_bids > 0), 'B_BUY_NOW' => ($auction_data['buy_now'] > 0 && ($auction_data['bn_only'] == 'y' || $auction_data['bn_only'] == 'n' && ($auction_data['num_bids'] == 0 || ($auction_data['reserve_price'] > 0 && $auction_data['current_bid'] < $auction_data['reserve_price'])))), 'B_BUY_NOW_ONLY' => ($auction_data['bn_only'] == 'y'), 'B_USERBID' => $userbid, 'B_BIDDERPRIV' => ($system->SETTINGS['buyerprivacy'] == 'y' && (!$user->logged_in || ($user->logged_in && $user->user_data['id'] != $auction_data['user']))), 'B_HASBUYER' => (count($hbidder_data) > 0), 'B_COUNTDOWN' => ($system->SETTINGS['hours_countdown'] > (($ends - time()) / 3600)), 'B_HAS_QUESTIONS' => ($num_questions > 0), 'B_CAN_BUY' => $user->can_buy && !($start > time()), 'B_SHOWENDTIME' => $showendtime )); include 'header.php'; $template->set_filenames(array( 'body' => 'item.tpl' )); $template->display('body'); include 'footer.php'; unset($_SESSION['browse_id']); ?>

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.