'.$row['catname'].''; } else { $ret .= '
  • '.$row['catname'].'
  • '; } } } return $ret; } $catid = intval($_GET['id']); $current_auction = display_category_2($catid); if($current_auction != '') { $sql = 'SELECT * FROM category_main WHERE status=1 AND catid=\''.intval($catid).'\' '; $res = mysql_query($sql); $num = mysql_num_rows($res); if($num) { $row = mysql_fetch_assoc($res); } $display = '
     '.$row['catname'].'
      '.$current_auction.'
     
    '; } else { $category = cq_get_parent($catid); $category = explode('-', $category ); @array_pop($category); $qs = ''; $bread_cumb = ''; $i=0; foreach($category as $k => $v) { $q = cq_check_quest_id($v); $qs .= $q['quest_select']; $q = 'SELECT * FROM category_main WHERE status=1 AND catid=\''.$v.'\' LIMIT 1'; $s = mysql_query($q); $r = mysql_fetch_assoc($s); $i++; if($i == sizeof($category)) { $bread_cumb .= ''.$r['catname'].''; } else { $bread_cumb .= ''.$r['catname'].''; } } $bread_cumb = ''.$bread_cumb.'
    '; $qs = explode('-', $qs ); @array_pop($qs); $search_opt = ''; foreach($qs as $k => $v) { if($_POST['select_q_id'][$v] != '') { $search_opt .= ' OR ( item_opt_select.select_q_id='.$v.' AND item_opt_select.select_a_id='.$_POST['select_q_id'][$v].' ) '; } } if( $search_opt != '') { $search_opt = substr($search_opt, 3); $search_opt = ' ( '.$search_opt.' ) AND '; } $thetime = date('Y-m-d H:i:s', time()); $thestrtime = time(); $count_down_arr = array(); if($search_opt != '') { $sql = 'SELECT item_list.item_id FROM item_opt_select LEFT JOIN `item_list` ON item_list.item_id=item_opt_select.item_id WHERE '.$search_opt.' item_list.`sale_end` > \''.$thetime.'\' AND item_list.catid=\''.$catid.'\' AND item_list.endstat != 1 AND item_list.item_suspend=0 GROUP BY item_list.item_id ORDER BY item_list.sale_end ASC '; } else { $sql = 'SELECT item_id FROM `item_list` WHERE `sale_end` > \''.$thetime.'\' AND catid=\''.$catid.'\' AND item_list.endstat != 1 AND item_list.item_suspend=0 ORDER BY sale_end ASC '; } $res = mysql_query($sql); $num = @mysql_num_rows($res); if($num) { $page = isset($_GET['page']) && intval($_GET['page']) >= 1 ? intval($_GET['page']):1; $perpage = 10; $param = 'id='.$catid.''; $pagination = paging($perpage, $num, $page, $param); if($search_opt != '') { $sql = 'SELECT item_opt_select.*, item_list.* FROM item_opt_select LEFT JOIN `item_list` ON item_list.item_id=item_opt_select.item_id WHERE '.$search_opt.' item_list.`sale_end` > \''.$thetime.'\' AND item_list.catid=\''.$catid.'\' AND item_list.endstat != 1 AND item_list.item_suspend=0 GROUP BY item_list.item_id ORDER BY item_list.sale_end ASC LIMIT '.$pagination['from'].', '.$perpage.' '; } else { $sql = 'SELECT item_list.* FROM `item_list` WHERE item_list.sale_end > \''.$thetime.'\' AND item_list.catid=\''.$catid.'\' AND item_list.endstat != 1 AND item_list.item_suspend=0 ORDER BY sale_end ASC LIMIT '.$pagination['from'].', '.$perpage.''; } $res = mysql_query($sql); $num = @mysql_num_rows($res); if($num) { $content_valid .= ''; $content_valid .= ' '; $no = $pagination['from']+1; while($row = mysql_fetch_assoc($res)) { $image = $row['mainimagename'] != '' && is_file('./upload/thumb_'.$row['mainimagename']) ? ''.$row['mainimagename'].'' : ' '; $bgcolor = $bgcolor == 'style1' ? 'style2' : 'style1'; $sale_end = strtotime($row['sale_end']); $content_valid .= ' '; $no++; } $content_valid .= '
    Keterangan Barang Sistem penawaran Waktu berakhir Detil
    '.$row['item_name'].'
    '.$image.'
    '.format_uang($row['item_price']).'
    '.($row['sale_method'] == 2 ? 'Jual' : 'Lelang').' '.date('d-m-Y H:i:s', $sale_end) .' '; $content_valid .= 'Lihat detil..
    '; $content_valid .= '

    '.$pagination['first'].$pagination['prev'].''.$pagination['page'].''.$pagination['next'].$pagination['last'].'

    '; } } else { $content_valid .= 'Maaf belum terdapat lelang untuk kategori ini. '; } $display = $content_valid; } ?> Rajalelang.com - Portal Lelang Online dan Jual Beli Barang Terbesar di Indonesia - Online Auction and Online Shopping Portal