-
Notifications
You must be signed in to change notification settings - Fork 3
/
profile.php
60 lines (42 loc) · 1.93 KB
/
profile.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<?php
session_start();
define ('IN_SITE', 1);
include_once ('includes/global.php');
include_once ('includes/class_formchecker.php');
include_once ('includes/class_custom_field.php');
include_once ('includes/class_user.php');
include_once ('includes/class_fees.php');
include_once ('includes/class_item.php');
require ('global_header.php');
$user_id = intval($_REQUEST['user_id']);
$user_details = $db->get_sql_row("SELECT * FROM
" . DB_PREFIX . "users WHERE user_id=" . $user_id . " AND enable_profile_page=1");
if (item::count_contents($user_details) && $setts['enable_profile_page'])
{
$template->set('user_id', $user_id);
$template->set('auction_id', $_REQUEST['auction_id']);
$template->set('user_details', $user_details);
$tax = new tax();
$seller_country = $tax->display_countries($user_details['country']);
$template->set('seller_country', $seller_country);
$bidding_times = $db->count_rows('bids', "WHERE bidder_id='" . $user_id . "'");
$template->set('bidding_times', $bidding_times);
$bidding_auctions = $db->count_rows('bids', "WHERE bidder_id='" . $user_id . "' GROUP BY auction_id");
$template->set('bidding_auctions', $bidding_auctions);
$nb_open_items = $db->count_rows('auctions', "WHERE owner_id='" . $user_id . "' AND
closed=0 AND deleted=0 AND creation_in_progress=0 AND is_draft=0");
$template->set('nb_open_items', $nb_open_items);
$nb_sold_items = $db->count_rows('winners', "WHERE seller_id='" . $user_id . "' AND
s_deleted=0");
$template->set('nb_sold_items', $nb_sold_items);
$template_output .= $template->process('profile.tpl.php');
}
else
{
$template->set('message_header', header5(MSG_VIEW_MEMBER_PROFILE));
$template->set('message_content', '<p align="center">' . MSG_USER_DOESNT_EXIST_PROFILE_DISABLED . '</p>');
$template_output .= $template->process('single_message.tpl.php');
}
include_once ('global_footer.php');
echo $template_output;
?>