= 1 ? intval($_GET['page_curr']):1; $param_curr = 'id='.$id.''; $sql = 'SELECT adm_membership.* ,item_list.* FROM `item_list` LEFT JOIN adm_membership ON adm_membership.membershipid=item_list.membershipid WHERE item_list.item_id = \''.$id.'\' AND item_list.item_suspend=0 LIMIT 1'; $res = mysql_query($sql); $num = @mysql_num_rows($res); if($num) { $item = mysql_fetch_assoc($res); $rating = get_rating($item['membershipid']); if($item['sale_method'] == 1) { $q = 'SELECT COUNT(bid_id) as bc, MAX(current_offer) as co FROM item_biding WHERE item_id=\''. $id .'\' '; $check_bid = @mysql_fetch_assoc(mysql_query($q)); if( is_array($check_bid) ) { $end_price = is_null($check_bid['co']) ? $item['item_price'] : intval($check_bid['co']); $item['end_price'] = $end_price; $item['bid_count'] = $check_bid['bc']; } } $image = $item['mainimagename'] != '' && is_file('./upload/thumb_'.$item['mainimagename']) ? ''.$item['mainimagename'].'' : ' '; $thetime = time(); $sale_end = strtotime($item['sale_end']); if($sale_end > $thetime ) { $is_end = false; } if($item['endstat'] == 1 ) { $is_end = true; } if($is_end === false) { $timer = timeDiff($sale_end); if( ($sale_end - $thetime) < 3600 ) { $count_down = $sale_end; } } if(ISSET($_POST['question']) && $_SESSION['is_login'] === true) { $question = trim($_POST['question']); if($question == '') { $err_msg = 'Silakan masukkan pertanyaan'; } else { $sql = 'INSERT INTO item_faq SET item_id=\''.$id.'\' , q_user=\''.$_SESSION['membership_session']['membershipid'].'\', question=\''.mysql_real_escape_string($question).'\', answer=\'\' '; if(@mysql_query($sql)) { $err_msg = 'Pertanyaan berhasil dimasukkan'; $tujuan = $item['email']; $pengirim = "From : no-reply@".$this_nama_domain.""; $judul = "[".$this_nama_domain."] Tanya jawab"; $isi = "Anda mendapat email ini karenan salah satu anggota ".$this_nama_domain." telah mengajukan pertanyaan untuk salah satu barang yang Anda tawarkan:\n\n"; $isi .= "URL : http://".$_SERVER['HTTP_HOST'].$this_directory_path. "_item_faq.html?id=".$id."\n\n\n"; $isi .= "Administrator ".$this_nama_domain."\n"; $isi .="no-reply@".$this_nama_domain.""; $headers = 'From: no-reply@'.$this_nama_domain.'' . "\r\n" . 'X-Mailer: PHP/' . phpversion(); @mail($tujuan,$judul,$isi,$headers); } else { $err_msg = 'Maaf, pertanyaan gagal dimasukkan'; } } } if(isset($_POST['answer']) && $_SESSION['membership_session']['membershipid'] === $item['membershipid']) { $answer = trim($_POST['answer']); $faq_id = intval($_POST['faq_id']); if($answer == '') { $err_msg = 'Silakan masukkan jawaban'; } if($faq_id < 1) { $err_msg = 'ID tanya jawab salah'; } $q = 'SELECT item_faq.*, adm_membership.email FROM item_faq LEFT JOIN item_list ON item_list.item_id=item_faq.item_id LEFT JOIN adm_membership ON adm_membership.membershipid=item_faq.q_user WHERE item_faq.faq_id=\''.$faq_id.'\' AND item_list.membershipid=\''.$_SESSION['membership_session']['membershipid'].'\' '; $r = mysql_query($q); $n = @mysql_num_rows($r); if($n) { $faq = mysql_fetch_assoc($r); } else { $err_msg = 'ID tanya jawab salah'; } if($err_msg == '' ) { $sql = 'UPDATE item_faq SET answer=\''.mysql_real_escape_string($answer).'\' WHERE faq_id=\''.$faq_id.'\' '; if(@mysql_query($sql)) { $err_msg = $faq ['answer'] == '' ? 'Jawaban berhasil dimasukkan' : 'Jawaban berhasil diubah'; $tujuan = $faq['email']; $pengirim = "From : no-reply@".$this_nama_domain.""; $judul = "[".$this_nama_domain."] Tanya jawab"; $isi = "Anda mendapat email ini karenan salah satu pertanyaan Anda di ".$this_nama_domain." telah dijawab atau jawaban yang ada telah diubah oleh penjual:\n\n"; $isi .= "URL : http://".$_SERVER['HTTP_HOST'].$this_directory_path. "_item_faq.html?id=".$id."\n\n\n"; $isi .= "Administrator ".$this_nama_domain."\n"; $isi .="no-reply@".$this_nama_domain.""; $headers = 'From: no-reply@'.$this_nama_domain.'' . "\r\n" . 'X-Mailer: PHP/' . phpversion(); @mail($tujuan,$judul,$isi,$headers); } else { $err_msg = 'Maaf, jawaban gagal dimasukkan'; } } } $sql = 'SELECT faq_id FROM `item_faq` WHERE `item_id` =\''.$id.'\' ORDER BY timestamp DESC '; $res = mysql_query($sql); $num = @mysql_num_rows($res); $pagination = paging($perpage, $num, $page_curr, $param_curr, 'page_curr'); $sql = 'SELECT * FROM `item_faq` LEFT JOIN adm_membership ON adm_membership.membershipid=item_faq.q_user WHERE `item_id` =\''.$id.'\' ORDER BY timestamp DESC limit '.$pagination['from'].', '.$perpage.' '; $res = mysql_query($sql); $num = @mysql_num_rows($res); if($num) { $content_valid .= ''; $no = $pagination['from']+1; while($row= mysql_fetch_assoc($res)) { $uimage = is_file('./upload/thumb_'. $row["mainimagename"].'') ? ''. $row[' : ''; if($_SESSION['membership_session']['membershipid'] === $item['membershipid']) { $answer = $row['answer'] == '' ? 'Belum ada jawaban' : '[Ubah]
'.nl2br(htmlspecialchars($row['answer'])); } else { $answer = $row['answer'] == '' ? 'Belum ada jawaban' : nl2br(htmlspecialchars($row['answer'])); } $content_valid .= ' '; if($_SESSION['membership_session']['membershipid'] === $item['membershipid']) { $display_f = $row['answer'] == '' ? '' : 'style="display: none;"'; $content_valid .= ' '; } $no++; } $content_valid .= '
'.$uimage .'
'.$row['membershipusername'].'
'.date('d-m-Y H:i:s', strtotime($row['timestamp'])).'
'.nl2br(htmlspecialchars($row['question'])).'
Jawaban:
'.$answer.'

'; $content_valid .= '

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

'; } else { $content_valid .= '

Maaf, belum ada tanya jawab.

'; } } $sale_cost_config = sale_cost_config(); $opt_array_condition = array(1 => 'Baru', 2 => 'Bekas'); if($err_msg != '') { $_SESSION['err_msg'] = $err_msg; header('location: _item_faq.html?id='.intval($_GET['id']).''); exit(); } ?> Rajalelang.com - Portal Lelang Online dan Jual Beli Barang Terbesar di Indonesia - Online Auction and Online Shopping Portal
 
 
Tanya Jawab '; } ?>  
 
 
'.$_SESSION['err_msg'].'

'; unset($_SESSION['err_msg']); } } echo $content_valid; ?>
 
'.$_SESSION['err_msg'].'

'; unset($_SESSION['err_msg']); } ?>

Kirim pertanyaan

/> />