Example #1
0
                $pic_manage_link = '<a href="' . append_sid($phpbb_root_path . 'auction_pics_manager.' . $phpEx . '?ao=' . $offer_id) . '">' . $lang['admin_pic_manager_link_1'] . '</a>';
            } elseif ($userdata['user_level'] == MOD and $auction_pic_config['auction_offer_pic_approval_mod'] != 1) {
                $lang['admin_pic_manager_mod_link_1'] = 'Click here to edit the users picture';
                $pic_manage_link = '<a href="' . append_sid($phpbb_root_path . 'auction_pics_manager.' . $phpEx . '?ao=' . $offer_id) . '">' . $lang['admin_pic_manager_mod_link_1'] . '</a>';
            } else {
                if ($offer_pics == 0) {
                    if ($allow_pic_editing == 1) {
                        $pic_manage_link = '<a href="' . append_sid($phpbb_root_path . 'auction_pics_manager.' . $phpEx . '?ao=' . $offer_id) . '">' . '10' . $lang['admin_pic_u_can_upload_or_edit_1'] . '</a>';
                    } else {
                        $pic_manage_link = $lang['admin_pic_no_modification_allowed'];
                    }
                } else {
                    if ($allow_pic_editing == 1) {
                        $pic_manage_link = '<a href="' . append_sid($phpbb_root_path . 'auction_pics_manager.' . $phpEx . '?ao=' . $offer_id) . '">' . '11' . $lang['admin_pic_u_can_edit_1'] . '</a>';
                    } else {
                        $pic_manage_link = $lang['admin_pic_no_modification_allowed'];
                    }
                }
            }
            // end else userlevel
        }
        // end if show_edit_link
    }
    // end else
    // now we populate the template with the manager link
}
$hor_ruler = $pic_hr == 1 ? '<tr><td colspan="2" class="row1"><hr width="90%"></td></tr>' : '';
// Check auction_permission
if (checkBoolPermission('IMAGE_UPLOAD')) {
    $template->assign_block_vars('hr', array('NUMBER_OF_PICS_IN_ROW' => $pic_span, 'L_GALLERY_OR_EDIT_LINK' => $pic_manage_link, 'HR' => $hor_ruler));
}
Example #2
0
 if ($auction_config_data['auction_offer_allow_on_top'] == 1) {
     $template->assign_block_vars('offer_on_top', array('L_AUCTION_OFFER_ON_TOP' => $lang['auction_offer_on_top'] . " ( +" . $auction_config_data['auction_offer_cost_on_top'] . " " . $auction_config_data['currency'] . ")"));
 }
 if ($auction_config_data['auction_offer_allow_special'] == 1 and checkBoolPermission('SPECIAL')) {
     $template->assign_block_vars('offer_special', array('L_AUCTION_OFFER_SPECIAL' => $lang['auction_offer_special'] . " ( +" . $auction_config_data['auction_offer_cost_special'] . " " . $auction_config_data['currency'] . ")"));
 }
 if ($auction_config_data['auction_offer_allow_shipping'] == 1) {
     $template->assign_block_vars('offer_shipping', array('L_AUCTION_OFFER_SHIPPING_PRICE' => $lang['auction_offer_shipping_price'] . "( " . $auction_config_data['currency'] . " )"));
 }
 if ($auction_config_data['auction_allow_direct_sell'] == 1 and checkBoolPermission('DIRECT_SELL')) {
     $template->assign_block_vars('direct_sell', array('L_AUCTION_OFFER_DIRECT_SELL' => $lang['auction_offer_direct_sell'] . " ( +" . $auction_config_data['auction_offer_cost_direct_sell'] . " " . $auction_config_data['currency'] . ")"));
 }
 // we need the simple config values only 2 of them so we get them the direct way
 $allow_upload = get_config_parameter("auction_offer_pictures_allow");
 $allow_url_upload = get_config_parameter("allow_url_upload");
 if ($allow_upload == 1 and checkBoolPermission('IMAGE_UPLOAD')) {
     $template->assign_block_vars('offer_picture', array('L_AUCTION_OFFER_PICTURE' => $lang['upload_pc'], 'L_FILE' => $lang['upload_file']));
     if ($allow_url_upload == 1) {
         $template->assign_block_vars('url_upload', array('L_AUCTION_OFFER_URL_PICTURE' => $lang['auction_offer_upload_net'], 'L_URL' => $lang['upload_url']));
     }
 }
 // Allow coupons
 if ($auction_config_data['auction_allow_coupons'] == 1) {
     $template->assign_block_vars('offer_coupon', array('L_AUCTION_OFFER_COUPON_EXPLAIN' => $lang['coupon_use_explain'], 'L_AUCTION_OFFER_COUPON' => $lang['coupon_use']));
 }
 $sql = "SELECT *\r\n                         FROM " . AUCTION_BID_INCREASE_TABLE . "\r\n                         ORDER BY bid_increase ASC";
 if (!($result = $db->sql_query($sql))) {
     message_die(GENERAL_ERROR, "Couldn't query list of bid-increasements", "", __LINE__, __FILE__, $sql);
 }
 $bid_increasement_select = '<select name="auction_offer_bid_increase">';
 while ($row = $db->sql_fetchrow($result)) {
Example #3
0
    for ($i = 0; $i < $time_total - $time_to_end; $i++) {
        $template->assign_block_vars('timetoend_chart.timetoend_chart_over', array('TIME_TOTAL' => $time_total, 'TIME_TO_END' => $time_to_end));
    }
    for ($i = 0; $i < $time_to_end; $i++) {
        $template->assign_block_vars('timetoend_chart.timetoend_chart_running', array('TIME_TOTAL' => $time_total, 'TIME_TO_END' => $time_to_end));
    }
}
// Output page
$page_title = $lang['auction_user_rating_view_offer'] . ' (' . $lang['auction_offer_time_stop'] . ' ' . $auction_offer_time_stop . ') - ' . $auction_offer_row['auction_offer_title'];
include $phpbb_root_path . 'includes/page_header.' . $phpEx;
include $phpbb_root_path . 'auction/auction_header.' . $phpEx;
// Display bid-fields only if auction is still active
if ($auction_offer_row['auction_offer_time_stop'] > time() && $auction_offer_row['auction_offer_time_start'] < time() && $auction_offer_row['auction_offer_state'] != 2) {
    $template->assign_block_vars('bidnowrow', array('L_AUCTION_YOUR_NAME' => $lang['auction_your_name'], 'L_AUCTION_YOUR_AMOUT' => $lang['auction_your_amount'] . "  (" . $auction_config_data['currency'] . ") :", 'L_AUCTION_BID_NOW' => $lang['auction_bid_now']));
}
if ($auction_config_data['auction_allow_comment'] and checkBoolPermission('COMMENT') and $auction_offer_row['auction_offer_state'] != 2) {
    // comment section for the seller
    // allow if user is sellter and auction is not over
    // we can now check agains users role as if they wouldnt be allowed to comment the if above would have stopped them
    if (($auction_offer_row['FK_auction_offer_user_id'] == $userdata['user_id'] or getRole() == 'administrator' or getRole() == 'moderator' or $userdata['user_level'] == ADMIN) && $auction_offer_row['auction_offer_time_stop'] > time()) {
        // if comment is not set, allow commenting
        if ($auction_offer_row['auction_offer_comment'] == "") {
            $template->assign_block_vars('auction_offer_comment_add', array('L_AUCTION_OFFER_COMMENT_ADD_EDIT' => $lang['auction_offer_comment_add_edit'], 'S_ADD_EDIT_COMMENT' => append_sid("auction_offer.php?mode=add_comment&" . POST_AUCTION_OFFER_URL . "=" . $auction_offer_row['PK_auction_offer_id'] . ""), 'AUCTION_OFFER_COMMENT' => $auction_offer_row['auction_offer_comment']));
        }
        // if
        // if comment is set, just allow commenting if it is switched on in ACP
        if ($auction_offer_row['auction_offer_comment'] != "" && $auction_config_data['auction_allow_change_comment']) {
            $template->assign_block_vars('auction_offer_comment_add', array('L_AUCTION_OFFER_COMMENT_ADD_EDIT' => $lang['auction_offer_comment_add_edit'], 'S_ADD_EDIT_COMMENT' => append_sid("auction_offer.php?mode=add_comment&" . POST_AUCTION_OFFER_URL . "=" . $auction_offer_row['PK_auction_offer_id'] . ""), 'AUCTION_OFFER_COMMENT' => $auction_offer_row['auction_offer_comment']));
        }
        // if
    }