Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- *
- * @ This file is created by deZender.Net
- * @ deZender (PHP5 Decoder for ionCube Encoder)
- *
- * @ Version : 1.1.5.0
- * @ Author : DeZender
- * @ Release on : 09.06.2012
- * @ Official site : http://DeZender.Net
- *
- */
- include( 'config/config.php' );
- include( 'config/functions.php' );
- include( 'mainvariables.php' );
- $pageName = 'productdetails';
- $smarty->assign( 'pageName', $pageName );
- $smarty->registerPlugin( 'modifier', 'ss', 'stripslashes' );
- $aucid = $_REQUEST['aid'];
- $prid = $_REQUEST['pid'];
- $smarty->assign( 'aucid', $aucid );
- $smarty->assign( 'prid', $prid );
- $front_min_price = getminbidprice( );
- $smarty->assign( 'front_min_price', $front_min_price );
- if ($aucid == '') {
- header( 'location: index.php' );
- }
- $qryauc = db_safe( 'select p.productID as pid,p.' . $lng_prefix . 'name as name,auctionID,picture1,auc_due_time,a.productID,offauction,fixedpriceauction,pennyauction,nightauction,beginnerauction,buynow_flag from auction a left join products p on a.productID=p.productID left join auc_due_table adt on a.auctionID=adt.auction_id left join registration r on a.buy_user=r.id where adt.auction_id not in (\'%1\') and adt.auc_due_time!=0 and a.auc_status=\'2\' and a.auction_delete_flag!=\'1\' order by adt.auc_due_time limit 0,3', $aucid );
- $resauc = mysql_query( $qryauc );
- $totalauc = mysql_num_rows( $resauc );
- if (0 < $totalauc) {
- $logincontentarr = array( );
- $logincounter = 0;
- $a = 1;
- $i = 1;
- $cl = 1;
- while ($objauc = mysql_fetch_array( $resauc )) {
- if (( $a == 1 && $objauc['auc_status'] == 2 )) {
- $co = '\'' . $objauc['auctionID'] . '\'';
- } else {
- if ($objauc['auc_status'] == 2) {
- $co .= ',\'' . $objauc['auctionID'] . '\'';
- }
- }
- $productUrl = 'productdetails.php?aid=' . $objauc['auctionID'];
- $logincontentarr[$logincounter]['producturl'] = $productUrl;
- $logincontentarr[$logincounter]['name'] = stripslashes( $objauc['name'] );
- $logincontentarr[$logincounter]['picture1'] = $objauc['picture1'];
- $logincontentarr[$logincounter]['auctionID'] = $objauc['auctionID'];
- $logincontentarr[$logincounter]['productID'] = $objauc['productID'];
- $t = 0;
- while ($t < $totalicon) {
- $logincontentarr[$logincounter][$iconarr[$t][0]] = $objauc[$iconarr[$t][0]];
- ++$t;
- }
- $logincontentarr[$logincounter]['buynowstatus'] = $buynowstatus;
- $logincontentarr[$logincounter]['auc_due_time'] = $objauc['auc_due_time'];
- ++$a;
- ++$i;
- ++$cl;
- ++$logincounter;
- }
- }
- $smarty->assign( 'totalauc', $totalauc );
- $smarty->assign( 'logincounter', $logincounter );
- $smarty->assign( 'logincontentarr', $logincontentarr );
- $smarty->assign( 'LoginTitle', $smarty->getTemplateVars( 'lng_bidnow' ) );
- $qrysel = db_safe( 'select p.' . $lng_prefix . 'name as name,' . $lng_prefix . 'short_desc as short_desc,' . $lng_prefix . 'long_desc as long_desc , auc_status,picture1,picture2,picture3,picture4,auctionID,auc_due_price,price,auc_fixed_price,auc_due_time,a.productID,pennyauction,beginnerauction,auction_plus_price,auc_end_date,auc_end_time,auc_start_price,buy_user,auc_final_price,username,auc_final_end_date,offauction,fixedpriceauction,nightauction,nailbiterauction,a.categoryID,shipping_title,shippingcharge,buynow_flag,auc_plus_time from products p left join auction a on p.productID=a.productID left join auc_due_table adt on a.auctionID=adt.auction_id left join registration r on a.buy_user=r.id left join shipping s on a.shipping_id=s.id left join auction_management am on am.auc_manage=a.time_duration where a.auctionID=\'%1\' and a.auction_delete_flag!=\'1\'', $aucid );
- $ressel = mysql_query( $qrysel );
- $total = mysql_num_rows( $ressel );
- if ($total <= 0) {
- header( 'location: index.php' );
- }
- $obj = mysql_fetch_array( $ressel );
- $obj['auc_plus_time'];
- $smarty->assign( 'obj', $obj );
- $duration = $obj['auc_plus_time'];
- $smarty->assign( 'duration', $duration );
- if ($obj['auc_status'] == 2) {
- if (( $obj['buynow_flag'] == 1 && $buynowstatus == 0 )) {
- $add .= ',\'' . $objauc['auctionID'] . '\'';
- $but = $obj['auctionID'];
- $arr .= ',' . $obj['auctionID'];
- $prr .= ',' . $obj['auc_due_price'];
- $price = $obj['price'];
- $fprice = $obj['auc_fixed_price'];
- if ($uid != '') {
- $qrybid = db_safe( 'select sum(bid_count) as bidcount from bid_account where bid_flag=\'d\' and auction_id=\'%1\' and user_id=\'%2\' group by auction_id', $aucid, $uid );
- $resbid = mysql_query( $qrybid );
- $total = mysql_num_rows( $resbid );
- $objbid = mysql_fetch_object( $resbid );
- $totbid = $objbid->bidcount;
- if ($totbid == '') {
- $totbid = 0;
- }
- $totbidprice = $totbid * $front_min_price;
- $smarty->assign( 'totbid', $totbid );
- $smarty->assign( 'totbidprice', changepriceformatwithoutcurrency( $totbidprice, 2 ) );
- $smarty->assign( 'totbidprice1', number_format( $totbidprice, 2 ) );
- }
- $smarty->assign( 'fixedprice', changepriceformat( $obj['auc_fixed_price'], 2 ) );
- $smarty->assign( 'saving', changepriceformatwithoutcurrency( $price - $fprice - $totbidprice, 2 ) );
- $smarty->assign( 'saving1', $price - $fprice - $totbidprice );
- $smarty->assign( 'worthupto', changepriceformat( $obj['price'], 2 ) );
- $bidsrebateamount = $totbidprice;
- if ($bidsrebateamount == '') {
- $bidsrebateamount = '0.00';
- }
- $smarty->assign( 'bidsrebateamount', changepriceformatwithoutcurrency( $bidsrebateamount, 2 ) );
- $smarty->assign( 'buynowpricesaving', changepriceformatwithoutcurrency( $obj['price'] - $bidsrebateamount, 2 ) );
- $totalbuynow = gettotalbuynow( $obj['auctionID'], $uid );
- if (0 < gettotalbuynow( $obj['auctionID'], $uid )) {
- $qrybuynow = db_safe( 'select payment_date from auction_buynow where auction_id=\'%1\' and user_id=\'%2\'', $obj['auctionID'], $uid );
- $resbuynow = mysql_query( $qrybuynow );
- $objbuynow = mysql_fetch_array( $resbuynow );
- $smarty->assign( 'objbuynow', $objbuynow );
- }
- $smarty->assign( 'totalbuynow', $totalbuynow );
- } else {
- $add .= ',\'' . $objauc['auctionID'] . '\'';
- $but = $obj['auctionID'];
- $arr .= ',' . $obj['auctionID'];
- $prr .= ',' . $obj['auc_due_price'];
- $price = $obj['price'];
- $fprice = $obj['auc_fixed_price'];
- $qrybid = db_safe( 'select sum(bid_count) as bidcount from bid_account where bid_flag=\'d\' and auction_id=\'%1\' and user_id=\'%2\' group by auction_id', $aucid, $uid );
- $resbid = mysql_query( $qrybid );
- $total = mysql_num_rows( $resbid );
- $objbid = mysql_fetch_array( $resbid );
- $totbid = $objbid['bidcount'];
- if ($totbid == '') {
- $totbid = 0;
- }
- $totbidprice = $totbid * $front_min_price;
- $smarty->assign( 'totbid', $totbid );
- $smarty->assign( 'totbidprice', changepriceformatwithoutcurrency( $totbidprice, 2 ) );
- $smarty->assign( 'totbidprice1', number_format( $totbidprice, 2 ) );
- $smarty->assign( 'fixedprice', changepriceformat( $obj['auc_fixed_price'], 2 ) );
- $smarty->assign( 'saving', changepriceformatwithoutcurrency( $price - $fprice - $totbidprice, 2 ) );
- $smarty->assign( 'saving1', $price - $fprice - $totbidprice );
- $smarty->assign( 'worthupto', changepriceformat( $obj['price'], 2 ) );
- }
- } else {
- if ($obj['auc_status'] == 1) {
- if (( $obj['buynow_flag'] == 1 && $buynowstatus == 0 )) {
- $proprice = $obj['price'];
- $aucprice = $obj['auc_fixed_price'];
- if ($uid != '') {
- $qrybid = db_safe( 'select sum(bid_count) as bidcount from bid_account where bid_flag=\'d\' and auction_id=\'%1\' and user_id=\'%2\' group by auction_id', $aucid, $uid );
- $resbid = mysql_query( $qrybid );
- $total = mysql_num_rows( $resbid );
- $objbid = mysql_fetch_object( $resbid );
- $totbid = $objbid->bidcount;
- if ($totbid == '') {
- $totbid = 0;
- }
- $totbidprice = $totbid * $front_min_price;
- $smarty->assign( 'totbid', $totbid );
- $smarty->assign( 'totbidprice', changepriceformatwithoutcurrency( $totbidprice, 2 ) );
- $smarty->assign( 'totbidprice1', number_format( $totbidprice, 2 ) );
- }
- $smarty->assign( 'fixedprice', changepriceformat( $obj['auc_fixed_price'], 2 ) );
- $smarty->assign( 'saving', changepriceformatwithoutcurrency( $price - $fprice - $totbidprice, 2 ) );
- $smarty->assign( 'saving1', $price - $fprice - $totbidprice );
- $smarty->assign( 'worthupto', changepriceformat( $obj['price'], 2 ) );
- $bidsrebateamount = $totbidprice;
- if ($bidsrebateamount == '') {
- $bidsrebateamount = '0.00';
- }
- $smarty->assign( 'bidsrebateamount', changepriceformatwithoutcurrency( $bidsrebateamount, 2 ) );
- $smarty->assign( 'buynowpricesaving', changepriceformatwithoutcurrency( $obj['price'] - $bidsrebateamount, 2 ) );
- $totalbuynow = gettotalbuynow( $obj['auctionID'], $uid );
- if (0 < gettotalbuynow( $obj['auctionID'], $uid )) {
- $qrybuynow = db_safe( 'select payment_date from auction_buynow where auction_id=\'%1\' and user_id=\'%2\'', $obj['auctionID'], $uid );
- $resbuynow = mysql_query( $qrybuynow );
- $objbuynow = mysql_fetch_array( $resbuynow );
- $smarty->assign( 'objbuynow', $objbuynow );
- }
- $smarty->assign( 'totalbuynow', $totalbuynow );
- } else {
- $add .= ',\'' . $objauc['auctionID'] . '\'';
- $but = $obj['auctionID'];
- $arr .= ',' . $obj['auctionID'];
- $prr .= ',' . $obj['auc_due_price'];
- $price = $obj['price'];
- $fprice = $obj['auc_fixed_price'];
- $proprice = $obj['price'];
- $aucprice = $obj['auc_fixed_price'];
- $qrybid = db_safe( 'select sum(bid_count) as bidcount from bid_account where bid_flag=\'d\' and auction_id=\'%1\' and user_id=\'%2\' group by auction_id', $aucid, $uid );
- $resbid = mysql_query( $qrybid );
- $total = mysql_num_rows( $resbid );
- $objbid = mysql_fetch_array( $resbid );
- $totbid = $objbid['bidcount'];
- if ($totbid == '') {
- $totbid = 0;
- }
- $totbidprice = $totbid * $front_min_price;
- $smarty->assign( 'totbid', $totbid );
- $smarty->assign( 'totbidprice', changepriceformatwithoutcurrency( $totbidprice, 2 ) );
- $smarty->assign( 'totbidprice1', number_format( $totbidprice, 2 ) );
- $smarty->assign( 'fixedprice', changepriceformat( $obj['auc_fixed_price'], 2 ) );
- $smarty->assign( 'saving', changepriceformat( $proprice - $aucprice, 2 ) );
- $smarty->assign( 'worthupto', changepriceformat( $obj['price'], 2 ) );
- }
- } else {
- if ($obj['auc_status'] == 3) {
- if ($add == '') {
- $add = '\'' . $obj['auctionID'] . '\'';
- } else {
- $add .= ',\'' . $obj['auctionID'] . '\'';
- }
- $qrybid = db_safe( 'select sum(bid_count) as bidcount from bid_account where bid_flag=\'d\' and auction_id=\'%1\' and user_id=\'%2\' group by auction_id', $aucid, $obj['buy_user'] );
- $resbid = mysql_query( $qrybid );
- $total = mysql_num_rows( $resbid );
- $objbid = mysql_fetch_array( $resbid );
- $totbid = $objbid['bidcount'];
- $totbidprice = $totbid * $front_min_price;
- if ($totbid != '') {
- $totbid = $totbid;
- } else {
- $totbid = 0;
- }
- $price = $obj['price'];
- if ($obj['fixedpriceauction'] == '1') {
- $fprice = $obj['auc_fixed_price'];
- } else {
- if ($obj['offauction'] == '1') {
- $fprice = '0.00';
- } else {
- $fprice = $obj['auc_final_price'];
- }
- }
- $saving_price = $price - $totbidprice - $fprice;
- $saving_percent = $saving_price * 100 / $price;
- $smarty->assign( 'totbid', $totbid );
- $smarty->assign( 'totbidprice', changepriceformat( $totbidprice, 2 ) );
- $smarty->assign( 'fprice', changepriceformat( $fprice, 2 ) );
- $smarty->assign( 'worthupto', changepriceformat( $obj['price'], 2 ) );
- $smarty->assign( 'saving_price', changepriceformat( $saving_price, 2 ) );
- $smarty->assign( 'savingpercent', number_format( $saving_percent, 2 ) );
- $smarty->assign( 'aucfinalprice', changepriceformat( $obj['auc_final_price'], 2 ) );
- $smarty->assign( 'aucfinalenddate', arrangedate( substr( $obj['auc_final_end_date'], 0, 10 ) ) );
- $smarty->assign( 'aucfinalendtime', substr( $obj['auc_final_end_date'], 10 ) );
- }
- }
- }
- ..................................................
- ............................
- ............
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement