-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprofile.php
More file actions
71 lines (66 loc) · 2.2 KB
/
Copy pathprofile.php
File metadata and controls
71 lines (66 loc) · 2.2 KB
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
61
62
63
64
65
66
67
68
69
70
71
<?php
require_once('includes/allreputation.php');
require_once('includes/alllocales.php');
$query = $_GET["profile"];
require_once('includes/allprofiles.php');
require_once('configs/tplconfig.php');
$smarty->config_load($conf_file, 'profile');
$profile['user'] = userinfo($query);
$profile['inventory'] = citems($query);
$profile['profession'] = userprofs($query);
$profile['achievements'] = $cDB->selectCell('SELECT COUNT(*) FROM character_achievement WHERE guid=?', $query);
$profile['guild']['guid'] = $cDB->selectCell('SELECT guildid FROM guild_member WHERE guid=?', $profile['user']['guid']);
$profile['guild']['name'] = $cDB->selectCell('SELECT name FROM guild WHERE guildid=?', $profile['guild']['guid']);
$url = "http://wowhead.com";
if($viewer == 1)
{
$profile['is_connected'] = is_connected();
}
else
{
$profile['is_connected'] = false;
}
$profile['qcomp'] = $cDB->selectCell('SELECT COUNT(*) FROM character_queststatus WHERE guid=? and status IN(0,1,3)', $query);
$profile['aquests'] = $DB->selectCell('SELECT COUNT(Id)
FROM quest_template
WHERE
Title NOT IN ("","----","?????")
AND Title NOT LIKE "<DEPRECATED>%"
AND Title NOT LIKE "<NYI>%"
AND Title NOT LIKE "<nyi>%"
AND Title NOT LIKE "<TEST>%"
AND Title NOT LIKE "<TXT>%"
AND Title NOT LIKE "<UNUSED%"
');
$profile['questp'] = round(($profile['qcomp'] / $profile['aquests']) * 100,2);
global $page;
$page = array(
'Mapper' => false,
'Book' => false,
'Title' => $profile['user']['name'].' ('.$profile['user']['level'].' '.$profile['user']['tclass'].')',
'tab' => 0,
'type' => 0,
'typeid' => 0,
'username' => $_SESSION['username'],
'path' => ''
);
$smarty->assign('page', $page);
$smarty->assign('mysql', $DB->getStatistics());
$smarty->assign('reputation', getreputation($page['username']));
$smarty->assign('profiler', $profiler);
$smarty->assign('profile', $profile);
global $AoWoWconf, $rDB;
$getuserguid = $rDB->selectCell('SELECT id FROM account WHERE username=?', $_SESSION['username']);
if($AoWoWconf['oprofiles'] == true)
{
$smarty->display('profile.tpl');
}
elseif($profile['user']['account'] == $getuserguid)
{
$smarty->display('profile.tpl');
}
elseif($AoWoWconf['oprofiles'] == false)
{
$smarty->display('pprofile.tpl');
}
?>