Merge pull request #207 from Tandloze/master

[Znote 1.5] Flags by Raggaer reworked
This commit is contained in:
Stefan A. Brannfjell 2015-08-17 02:22:31 +02:00
commit 8ac1b51fff
249 changed files with 455 additions and 247 deletions

View File

@ -1,22 +1,40 @@
<?php require_once 'engine/init.php'; include 'layout/overall/header.php'; <?php require_once 'engine/init.php'; include 'layout/overall/header.php';
if ($config['log_ip']) {
if ($config['log_ip'])
{
znote_visitor_insert_detailed_data(4); znote_visitor_insert_detailed_data(4);
} }
if (isset($_GET['name']) === true && empty($_GET['name']) === false) {
$name = $_GET['name']; if (isset($_GET['name']) === true && empty($_GET['name']) === false)
{
$name = getValue($_GET['name']);
$user_id = user_character_exist($name); $user_id = user_character_exist($name);
if ($user_id !== false) {
if ($config['TFSVersion'] == 'TFS_10') { if ($user_id !== false)
$profile_data = user_character_data($user_id, 'name', 'level', 'vocation', 'lastlogin', 'sex'); {
if ($config['TFSVersion'] == 'TFS_10')
{
$profile_data = user_character_data($user_id, 'account_id', 'name', 'level', 'vocation', 'health', 'healthmax', 'experience', 'mana', 'manamax', 'sex', 'lastlogin');
$profile_data['online'] = user_is_online_10($user_id); $profile_data['online'] = user_is_online_10($user_id);
if ($config['Ach'] == true) {
$achievementPoints = mysql_select_single("SELECT SUM(`value`) AS `sum` FROM `player_storage` WHERE `key` LIKE '30___' AND `player_id`='$user_id'"); if ($config['Ach'])
{
$achievementPoints = mysql_select_single("SELECT SUM(`value`) AS `sum` FROM `player_storage` WHERE `key` LIKE '30___' AND `player_id`=(int)$user_id");
} }
} else $profile_data = user_character_data($user_id, 'name', 'level', 'vocation', 'lastlogin', 'online', 'sex');
}
else
{
$profile_data = user_character_data($user_id, 'name', 'account_id', 'level', 'vocation', 'health', 'healthmax', 'experience', 'mana', 'manamax', 'lastlogin', 'online', 'sex');
}
$profile_znote_data = user_znote_character_data($user_id, 'created', 'hide_char', 'comment'); $profile_znote_data = user_znote_character_data($user_id, 'created', 'hide_char', 'comment');
$account_data = user_znote_account_data($profile_data['account_id'], 'flag');
$guild_exist = false; $guild_exist = false;
if (get_character_guild_rank($user_id) > 0) {
if (get_character_guild_rank($user_id) > 0)
{
$guild_exist = true; $guild_exist = true;
$guild = get_player_guild_data($user_id); $guild = get_player_guild_data($user_id);
$guild_name = get_guild_name($guild['guild_id']); $guild_name = get_guild_name($guild['guild_id']);
@ -25,348 +43,511 @@ if (isset($_GET['name']) === true && empty($_GET['name']) === false) {
?> ?>
<!-- PROFILE MARKUP HERE--> <!-- PROFILE MARKUP HERE-->
<h1><font class="profile_font" name="profile_font_header">Profile: <?php echo $profile_data['name']; ?></font></h1>
<ul class="unstyled">
<li><font class="profile_font" name="profile_font_level">Sex:<?php <!-- Profile name -->
if ($profile_data['sex'] == 1) { <h1><font class="profile_font" name="profile_font_header">Profile: <?php echo $profile_data['name']; ?></font></h1>
echo 'Male'; <ul class="unstyled">
} else { <?php
echo 'Female'; if ($config['country_flags'])
} { ?>
?></font></li> <!-- Player country data -->
<li><font class="profile_font" name="profile_font_level">Level: <?php echo $profile_data['level']; ?></font></li> <li><font class="profile_font" name="profile_font_country">Country: <?php echo '<img src="\flags\\' . $account_data['flag'] . '.png">'; ?></font></li><?php
} ?>
<!-- Player male / female -->
<li>
<font class="profile_font" name="profile_font_level">Sex:
<?php
if ($profile_data['sex'] == 1)
{
echo 'Male';
}
else
{
echo 'Female';
}
?>
</font>
</li>
<!-- Player level -->
<li>
<font class="profile_font" name="profile_font_level">Level:
<?php
echo $profile_data['level'];
?>
</font>
</li>
<!-- Player vocation -->
<li><font class="profile_font" name="profile_font_vocation">Vocation: <?php echo vocation_id_to_name($profile_data['vocation']); ?></font></li> <li><font class="profile_font" name="profile_font_vocation">Vocation: <?php echo vocation_id_to_name($profile_data['vocation']); ?></font></li>
<!-- Player guild -->
<?php <?php
if ($guild_exist) { if ($guild_exist)
{
?> ?>
<li><font class="profile_font" name="profile_font_vocation"><b><?php echo $guild['rank_name']; ?></b> of <a href="guilds.php?name=<?php echo $guild_name; ?>"><?php echo $guild_name; ?></a></font></li> <li>
<font class="profile_font" name="profile_font_vocation">
<b><?php echo $guild['rank_name']; ?> </b> of <a href="guilds.php?name=<?php echo $guild_name; ?>"><?php echo $guild_name; ?></a>
</font>
</li>
<?php <?php
} }
?> ?>
<li><font class="profile_font" name="profile_font_lastlogin">Last Login: <?php <!-- Player last login -->
if ($profile_data['lastlogin'] != 0) { <li>
<font class="profile_font" name="profile_font_lastlogin">Last Login:
<?php
if ($profile_data['lastlogin'] != 0)
{
echo getClock($profile_data['lastlogin'], true, true); echo getClock($profile_data['lastlogin'], true, true);
} else { }
else
{
echo 'Never.'; echo 'Never.';
} }
?>
?></font> </font>
</li> </li>
<!-- Achievement start --> <!-- Achievement start -->
<?php <?php
if ($config['Ach'] == true) { if ($config['Ach'])
foreach ($achievementPoints as $achievement) { {
if ($achievement > 0) //if player doesn't have any achievement points it won't echo the line below. foreach ($achievementPoints as $achievement)
echo '<li>Achievement Points: ' .$achievement. '</li>'; {
//if player doesn't have any achievement points it won't echo the line below.
if ($achievement > 0)
{
echo '<li>Achievement Points: ' . $achievement . '</li>';
}
} }
} }
?> ?>
<!-- Achievement end --> <!-- Achievement end -->
<!-- Display house start --> <!-- Display house start -->
<?php <?php
if ($config['TFSVersion'] !== 'TFS_02') { if ($config['TFSVersion'] !== 'TFS_02')
{
$townid = ($config['TFSVersion'] === 'TFS_03') ? 'town' : 'town_id'; $townid = ($config['TFSVersion'] === 'TFS_03') ? 'town' : 'town_id';
$houses = mysql_select_multi("SELECT `id`, `owner`, `name`, `$townid` AS `town_id` FROM `houses` WHERE `owner` = $user_id;"); $houses = mysql_select_multi("SELECT `id`, `owner`, `name`, `$townid` AS `town_id` FROM `houses` WHERE `owner` = $user_id;");
if ($houses !== false) {
$playerlist = array();
foreach ($houses as $h) {
if ($h['owner'] > 0)
$playerlist[] = $h['owner'];
if ($profile_data['id'] = $h['owner']) { if ($houses)
?> {
$playerlist = array();
foreach ($houses as $h)
{
if ($h['owner'] > 0)
{
$playerlist[] = $h['owner'];
}
if ($profile_data['id'] = $h['owner'])
{
?>
<li>House: <?php echo $h['name']; ?>, <?php <li>House: <?php echo $h['name']; ?>, <?php
foreach ($config['towns'] as $key=>$value) { foreach ($config['towns'] as $key => $value)
if ($key == $h['town_id']) { {
if ($key == $h['town_id'])
{
echo $value; echo $value;
} }
} }
?> ?>
</li> </li>
<?php <?php
} }
} }
} }
} }
?> ?>
<!-- Display house end --> <!-- Display house end -->
<!-- Display player status -->
<li><font class="profile_font" name="profile_font_status">Status:</font> <?php <li><font class="profile_font" name="profile_font_status">Status:</font> <?php
if ($config['TFSVersion'] == 'TFS_10') { if ($config['TFSVersion'] == 'TFS_10')
if ($profile_data['online']) { {
if ($profile_data['online'])
{
echo '<font class="profile_font" name="profile_font_online" color="green"><b>ONLINE</b></font>'; echo '<font class="profile_font" name="profile_font_online" color="green"><b>ONLINE</b></font>';
} else { }
else
{
echo '<font class="profile_font" name="profile_font_online" color="red"><b>OFFLINE</b></font>'; echo '<font class="profile_font" name="profile_font_online" color="red"><b>OFFLINE</b></font>';
} }
} else { }
if ($profile_data['online'] == 1) { else
{
if ($profile_data['online'])
{
echo '<font class="profile_font" name="profile_font_online" color="green"><b>ONLINE</b></font>'; echo '<font class="profile_font" name="profile_font_online" color="green"><b>ONLINE</b></font>';
} else { }
else
{
echo '<font class="profile_font" name="profile_font_online" color="red"><b>OFFLINE</b></font>'; echo '<font class="profile_font" name="profile_font_online" color="red"><b>OFFLINE</b></font>';
} }
} }
?> ?>
</li> </li>
<!-- Display player status end -->
<!-- Player created -->
<li><font class="profile_font" name="profile_font_created">Created: <?php echo getClock($profile_znote_data['created'], true); ?></font></li> <li><font class="profile_font" name="profile_font_created">Created: <?php echo getClock($profile_znote_data['created'], true); ?></font></li>
<li><font class="profile_font" name="profile_font_comment">Comment:</font> <br><textarea name="profile_comment_textarea" cols="70" rows="10" readonly="readonly" class="span12"><?php echo $profile_znote_data['comment']; ?></textarea></li>
<!-- Achievements start --> <!-- Player Comment -->
<?php if ($config['Ach']) { ?> <?php
<h3 class="header-ok">Achievements</h3> //if player doesnt have set a comment dont show it.
<div id="accordion"> if (!empty($profile_znote_data['comment']))
<h3>Show/hide player achievements</h3> { ?>
<div> <li>
<table class="table table-striped table-bordered"> <font class="profile_font" name="profile_font_comment">Comment:</font><br>
<tbody> <textarea name="profile_comment_textarea" cols="70" rows="10" readonly="readonly" class="span12"><?php echo $profile_znote_data['comment']; ?></textarea>
<style> </li>
#secondD { <?php
margin-left:0px; }
} ?>
</style>
<?php <!-- Achievements start -->
foreach ($config['achievements'] as $key => $achiv) { <?php if ($config['Ach'])
$uery = mysql_select_single("SELECT `player_id`, `value`, `key` FROM `player_storage` WHERE `player_id`='$user_id' AND `key`='$key' LIMIT 1;"); { ?>
if (!empty($uery) || $uery !== false) { <h3 class="header-ok">Achievements</h3>
foreach ($uery as $luery) { <div id="accordion">
if ($luery == $key) { <h3>Show/hide player achievements</h3>
if (!array_key_exists($key, $achiv)) { <div>
echo '<tr><td width="17%">' .$achiv[0]. '</td><td>' .$achiv[1]. '</td>'; <table class="table table-striped table-bordered">
if (!isset($achiv['secret'])) { <tbody>
echo '<td><img id="secondD" src="http://img04.imgland.net/PuMz0mVqSG.gif"></td>'; <style>
#secondD {
margin-left:0px;
}
</style>
<?php
foreach ($config['achievements'] as $key => $achiv)
{
$uery = mysql_select_single("SELECT `player_id`, `value`, `key` FROM `player_storage` WHERE `player_id`='$user_id' AND `key`='$key' LIMIT 1;");
if (!empty($uery) || $uery !== false)
{
foreach ($uery as $luery)
{
if ($luery == $key)
{
if (!array_key_exists($key, $achiv))
{
echo '<tr><td width="17%">' .$achiv[0]. '</td><td>' .$achiv[1]. '</td>';
if (!isset($achiv['secret']))
{
echo '<td><img id="secondD" src="http://img04.imgland.net/PuMz0mVqSG.gif"></td>';
}
echo '<td>'. $achiv['points'] .'</td>';
echo '<tr>';
}
}
} }
echo '<td>'. $achiv['points'] .'</td>';
echo '<tr>';
} }
} }
} ?>
} </tbody>
} </table>
?> </div>
</tbody> </div><br>
</table> <?php
</div> }
</div> ?>
<br> <!-- Achievements end -->
<?php } ?>
<!-- Achievements end --> <!-- DEATH LIST -->
<!-- DEATH LIST -->
<li> <li>
<b>Death List:</b><br> <b>Death List:</b><br>
<?php <?php
if ($config['TFSVersion'] == 'TFS_02') { if ($config['TFSVersion'] == 'TFS_02')
{
$array = user_fetch_deathlist($user_id); $array = user_fetch_deathlist($user_id);
if ($array) { if ($array)
//data_dump($array, false, "Data:"); {
?> ?>
<ul> <ul>
<?php
// Design and present the list
foreach ($array as $value)
{ ?>
<li>
<?php <?php
// Design and present the list $value['time'] = getClock($value['time'], true);
foreach ($array as $value) {
echo '<li>';
// $value[0]
$value['time'] = getClock($value['time'], true);
if ($value['is_player'] == 1) {
$value['killed_by'] = 'player: <a href="characterprofile.php?name='. $value['killed_by'] .'">'. $value['killed_by'] .'</a>';
} else {
$value['killed_by'] = 'monster: '. $value['killed_by'] .'.';
}
echo '['. $value['time'] .'] Killed at level '. $value['level'] .' by '. $value['killed_by']; if ($value['is_player'] == 1)
echo '</li>'; {
$value['killed_by'] = 'player: <a href="characterprofile.php?name='. $value['killed_by'] .'">'. $value['killed_by'] .'</a>';
} }
else
{
$value['killed_by'] = 'monster: '. $value['killed_by'] .'.';
}
echo '['. $value['time'] .'] Killed at level '. $value['level'] .' by '. $value['killed_by']; ?>
</li>
<?php
}
?> ?>
</ul> </ul>
<?php <?php
} else { }
echo '<b><font color="green">This player has never died.</font></b>'; else
} {
//Done. echo '<b><font color="green">This player has never died.</font></b>';
} else if ($config['TFSVersion'] == 'TFS_10') { }
$deaths = mysql_select_multi("SELECT }
`player_id`, `time`, `level`, `killed_by`, `is_player`, else if ($config['TFSVersion'] == 'TFS_10')
`mostdamage_by`, `mostdamage_is_player`, `unjustified`, `mostdamage_unjustified` {
FROM `player_deaths` $deaths = mysql_select_multi("SELECT
WHERE `player_id`=$user_id ORDER BY `time` DESC LIMIT 10;"); `player_id`, `time`, `level`, `killed_by`, `is_player`,
`mostdamage_by`, `mostdamage_is_player`, `unjustified`, `mostdamage_unjustified`
FROM `player_deaths`
WHERE `player_id`=$user_id ORDER BY `time` DESC LIMIT 10;");
if (!$deaths) echo '<b><font color="green">This player has never died.</font></b>'; if ($deaths)
else { {
foreach ($deaths as $d) { foreach ($deaths as $d)
{
?>
<li>
<?php echo "<b>".getClock($d['time'], true, true)."</b>";
$lasthit = ($d['is_player']) ? "<a href='characterprofile.php?name=".$d['killed_by']."'>".$d['killed_by']."</a>" : $d['killed_by'];
echo ": Killed at level ".$d['level']." by $lasthit";
if ($d['unjustified'])
{echo " <font color='red' style='font-style: italic;'>(unjustified)</font>";}
$mostdmg = ($d['mostdamage_by'] !== $d['killed_by']) ? true : false;
if ($mostdmg)
{
$mostdmg = ($d['mostdamage_is_player']) ? "<a href='characterprofile.php?name=".$d['mostdamage_by']."'>".$d['mostdamage_by']."</a>" : $d['mostdamage_by'];
echo "<br>and by $mostdmg.";
if ($d['mostdamage_unjustified'])
{ echo " <font color='red' style='font-style: italic;'>(unjustified)</font>"; }
}
else
{ echo " <b>(soloed)</b>"; }
?> ?>
<li> </li>
<?php echo "<b>".getClock($d['time'], true, true)."</b>"; <?php
$lasthit = ($d['is_player']) ? "<a href='characterprofile.php?name=".$d['killed_by']."'>".$d['killed_by']."</a>" : $d['killed_by'];
echo ": Killed at level ".$d['level']." by $lasthit";
if ($d['unjustified']) echo " <font color='red' style='font-style: italic;'>(unjustified)</font>";
$mostdmg = ($d['mostdamage_by'] !== $d['killed_by']) ? true : false;
if ($mostdmg) {
$mostdmg = ($d['mostdamage_is_player']) ? "<a href='characterprofile.php?name=".$d['mostdamage_by']."'>".$d['mostdamage_by']."</a>" : $d['mostdamage_by'];
echo "<br>and by $mostdmg.";
if ($d['mostdamage_unjustified']) echo " <font color='red' style='font-style: italic;'>(unjustified)</font>";
} else echo " <b>(soloed)</b>";
?>
</li>
<?php
}
//data_dump($deaths, false, "Deaths:");
} }
} else if ($config['TFSVersion'] == 'TFS_03') { }
//mysql_select_single("SELECT * FROM players WHERE name='TEST DEBUG';"); else
$array = user_fetch_deathlist03($user_id); {
if ($array) { echo '<b><font color="green">This player has never died.</font></b>';
?> }
}
else if ($config['TFSVersion'] == 'TFS_03')
{
//mysql_select_single("SELECT * FROM players WHERE name='TEST DEBUG';");
$array = user_fetch_deathlist03($user_id);
if ($array)
{?>
<ul> <ul>
<?php <?php
// Design and present the list // Design and present the list
foreach ($array as $value) { foreach ($array as $value)
echo '<li>'; { ?>
<li>
<?php
$value[3] = user_get_killer_id(user_get_kid($value['id'])); $value[3] = user_get_killer_id(user_get_kid($value['id']));
if ($value[3] !== false && $value[3] >= 1) {
if ($value[3] !== false && $value[3] >= 1)
{
$namedata = user_character_data((int)$value[3], 'name'); $namedata = user_character_data((int)$value[3], 'name');
if ($namedata !== false) {
if ($namedata !== false)
{
$value[3] = $namedata['name']; $value[3] = $namedata['name'];
$value[3] = 'player: <a href="characterprofile.php?name='. $value[3] .'">'. $value[3] .'</a>'; $value[3] = 'player: <a href="characterprofile.php?name='. $value[3] .'">'. $value[3] .'</a>';
} else { }
else
{
$value[3] = 'deleted player.'; $value[3] = 'deleted player.';
} }
} else {
$value[3] = user_get_killer_m_name(user_get_kid($value['id']));
if ($value[3] === false) $value[3] = 'deleted player.';
} }
else
{
$value[3] = user_get_killer_m_name(user_get_kid($value['id']));
if ($value[3] === false)
{ $value[3] = 'deleted player.'; }
}
echo '['. getClock($value['date'], true) .'] Killed at level '. $value['level'] .' by '. $value[3]; echo '['. getClock($value['date'], true) .'] Killed at level '. $value['level'] .' by '. $value[3];
echo '</li>'; echo '</li>';
} }
?> ?>
</ul> </ul>
<?php <?php
} else { }
echo '<b><font color="green">This player has never died.</font></b>'; else { echo '<b><font color="green">This player has never died.</font></b>'; }
}
?>
</li>
<!-- END DEATH LIST -->
<!-- QUEST PROGRESSION -->
<?php
$totalquests = 0;
$completedquests = 0;
$firstrun = 1;
if ($config['EnableQuests'] == true)
{
$sqlquests = mysql_select_multi("SELECT `player_id`, `key`, `value` FROM player_storage WHERE `player_id` = $user_id");
foreach ($config['quests'] as $cquest)
{
$totalquests = $totalquests + 1;
foreach ($sqlquests as $dbquest)
{
if ($cquest[0] == $dbquest['key'] && $cquest[1] == $dbquest['value'])
{
$completedquests = $completedquests + 1;
} }
} }
?> if ($cquest[3] == 1)
</li> {
if ($completedquests != 0)
{
if ($firstrun == 1)
{
?>
<li>
<b> Quest progression </b>
<table id="characterprofileQuest" class="table table-striped table-hover">
<tr class="yellow">
<th>Quest:</th>
<th>progression:</th>
</tr>
<?php
$firstrun = 0;
}
$completed = $completedquests / $totalquests * 100;
?>
<tr>
<td><?php echo $cquest[2]; ?></td>
<td id="progress">
<span id="percent"><?php echo round($completed); ?>%</span>
<div id="bar" style="width: '.$completed.'%"></div>
</td>
</tr>
<?php
}
<!-- END DEATH LIST --> $completedquests = 0;
<!-- QUEST PROGRESSION --> $totalquests = 0;
<?php
$totalquests = 0; }
$completedquests = 0; }
$firstrun = 1;
if ($config['EnableQuests'] == true) {
$sqlquests = mysql_select_multi("SELECT `player_id`, `key`, `value` FROM player_storage WHERE `player_id` = $user_id");
foreach ($config['quests'] as $cquest) {
$totalquests = $totalquests + 1;
foreach ($sqlquests as $dbquest) {
if ($cquest[0] == $dbquest['key'] && $cquest[1] == $dbquest['value']) {
$completedquests = $completedquests + 1;
}
}
if ($cquest[3] == 1) {
if ($completedquests != 0) {
if ($firstrun == 1) {
?>
<li>
<b> Quest progression </b>
<table id="characterprofileQuest" class="table table-striped table-hover">
<tr class="yellow">
<th>Quest:</th>
<th>progression:</th>
</tr>
<?php
$firstrun = 0;
} }
$completed = $completedquests / $totalquests * 100;
?> if ($firstrun == 0)
<tr> { ?>
<td><?php echo $cquest[2]; ?></td> </table></li>
<td id="progress">
<span id="percent"><?php echo round($completed); ?>%</span>
<div id="bar" style="width: '.$completed.'%"></div>
</td>
</tr>
<?php <?php
} }
$completedquests = 0; ?>
$totalquests = 0; <!-- END QUEST PROGRESSION -->
}
}
}
if ($firstrun == 0) {
echo '</table></li>';
}
?>
<!-- END QUEST PROGRESSION -->
<!-- CHARACTER LIST --> <!-- CHARACTER LIST -->
<?php <?php
if (user_character_hide($profile_data['name']) != 1 && user_character_list_count(user_character_account_id($name)) > 1) { if (user_character_hide($profile_data['name']) != 1 && user_character_list_count(user_character_account_id($name)) > 1)
{
?> ?>
<li> <li>
<b>Other visible characters on this account:</b><br> <b>Other visible characters on this account:</b><br>
<?php <?php
$characters = user_character_list(user_character_account_id($profile_data['name'])); $characters = user_character_list(user_character_account_id($profile_data['name']));
// characters: [0] = name, [1] = level, [2] = vocation, [3] = town_id, [4] = lastlogin, [5] = online // characters: [0] = name, [1] = level, [2] = vocation, [3] = town_id, [4] = lastlogin, [5] = online
if ($characters && count($characters) > 1) { if ($characters && count($characters) > 0)
{
?> ?>
<table id="characterprofileTable" class="table table-striped table-hover"> <table id="characterprofileTable" class="table table-striped table-hover">
<tr class="yellow"> <tr class="yellow">
<th> <th>Name:</th>
Name: <th>Level:</th>
</th> <th>Vocation:</th>
<th> <th>Last login:</th>
Level: <th>Status:</th>
</th>
<th>
Vocation:
</th>
<th>
Last login:
</th>
<th>
Status:
</th>
</tr> </tr>
<?php <?php
// Design and present the list // Design and present the list
foreach ($characters as $char) { foreach ($characters as $char)
if ($char['name'] != $profile_data['name']) { {
if (hide_char_to_name(user_character_hide($char['name'])) != 'hidden') { if ($char['name'] != $profile_data['name'])
echo '<tr>'; {
echo '<td><a href="characterprofile.php?name='. $char['name'] .'">'. $char['name'] .'</a></td>'; if (hide_char_to_name(user_character_hide($char['name'])) != 'hidden')
echo '<td>'. $char['level'] .'</td>'; { ?>
echo '<td>'. $char['vocation'] .'</td>'; <tr>
echo '<td>'. $char['lastlogin'] .'</td>'; <td><a href="characterprofile.php?name=<?php echo $char['name']; ?>"><?php echo $char['name']; ?></a></td>
echo '<td>'. $char['online'] .'</td>'; <td><?php echo (int)$char['level']; ?></td>
echo '</tr>'; <td><?php echo $char['vocation']; ?></td>
<td><?php echo $char['lastlogin']; ?></td>
<td><?php echo $char['online']; ?></td>
</tr>
<?php
} }
} }
} }
?> ?>
</table> </table>
<?php <?php
} else { }
echo '<b><font color="green">This player has never died.</font></b>'; else
} {
//Done. echo '<b><font color="green">This player has never died.</font></b>';
?> }
?>
</li> </li>
<?php <?php
} }
?> ?>
<!-- END CHARACTER LIST --> <!-- END CHARACTER LIST -->
<li><font class="profile_font" name="profile_font_share_url">Address: <a href="<?php
if ($config['htwrite']) echo "http://".$_SERVER['HTTP_HOST']."/". $profile_data['name'];
else echo "http://".$_SERVER['HTTP_HOST']."/characterprofile.php?name=". $profile_data['name'];
?>"><?php <li>
if ($config['htwrite']) echo "http://".$_SERVER['HTTP_HOST']."/". $profile_data['name']; <font class="profile_font" name="profile_font_share_url">Address:
else echo "http://".$_SERVER['HTTP_HOST']."/characterprofile.php?name=". $profile_data['name']; <a href="
?></a></font></li> <?php
if ($config['htwrite'])
{
echo "http://" . $_SERVER['HTTP_HOST']."/" . $profile_data['name'];
}
else
{
echo "http://" . $_SERVER['HTTP_HOST'] . "/characterprofile.php?name=" . $profile_data['name'];
}
?>">
<?php
if ($config['htwrite'])
{
echo "http://".$_SERVER['HTTP_HOST']."/". $profile_data['name'];
}
else
{
echo "http://".$_SERVER['HTTP_HOST']."/characterprofile.php?name=". $profile_data['name'];
}
?>
</a></font></li>
</ul> </ul>
<!-- END PROFILE MARKUP HERE--> <!-- END PROFILE MARKUP HERE-->
<?php <?php
} else {
echo htmlentities(strip_tags($name, ENT_QUOTES)).' does not exist.';
} }
} else { else
{
echo htmlentities(strip_tags($name, ENT_QUOTES)) . ' does not exist.';
}
}
else
{
header('Location: index.php'); header('Location: index.php');
} }

View File

@ -440,6 +440,9 @@
// Use guild logo system // Use guild logo system
$config['use_guild_logos'] = true; $config['use_guild_logos'] = true;
// Use country flags
$config['country_flags'] = false;
// Level requirement to create guild? (Just set it to 1 to allow all levels). // Level requirement to create guild? (Just set it to 1 to allow all levels).
$config['create_guild_level'] = 8; $config['create_guild_level'] = 8;

View File

@ -32,6 +32,7 @@ CREATE TABLE IF NOT EXISTS `znote_accounts` (
`cooldown` int(10) DEFAULT 0, `cooldown` int(10) DEFAULT 0,
`active` tinyint(4) NOT NULL DEFAULT '0', `active` tinyint(4) NOT NULL DEFAULT '0',
`activekey` int(11) NOT NULL, `activekey` int(11) NOT NULL,
`flag` varchar(20) NOT NULL,
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ; ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;

View File

@ -1088,9 +1088,11 @@ function user_create_account($register_data, $maildata) {
$ip = $register_data['ip']; $ip = $register_data['ip'];
$created = $register_data['created']; $created = $register_data['created'];
$flag = $register_data['flag'];
unset($register_data['ip']); unset($register_data['ip']);
unset($register_data['created']); unset($register_data['created']);
unset($register_data['flag']);
if (config('TFSVersion') == 'TFS_10') $register_data['creation'] = $created; if (config('TFSVersion') == 'TFS_10') $register_data['creation'] = $created;
@ -1101,7 +1103,7 @@ function user_create_account($register_data, $maildata) {
$account_id = user_id($register_data['name']); $account_id = user_id($register_data['name']);
$activeKey = rand(100000000,999999999); $activeKey = rand(100000000,999999999);
mysql_insert("INSERT INTO `znote_accounts` (`account_id`, `ip`, `created`, `activekey`) VALUES ('$account_id', '$ip', '$created', '$activeKey')"); mysql_insert("INSERT INTO `znote_accounts` (`account_id`, `ip`, `created`, `activekey`, `flag`) VALUES ('$account_id', '$ip', '$created', '$activeKey', '$flag')");
if ($maildata['register']) { if ($maildata['register']) {

BIN
flags/ad.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 761 B

BIN
flags/ae.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 518 B

BIN
flags/af.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 688 B

BIN
flags/ag.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 880 B

BIN
flags/ai.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 862 B

BIN
flags/al.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 770 B

BIN
flags/am.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 596 B

BIN
flags/an.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 650 B

BIN
flags/ao.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 809 B

BIN
flags/aq.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 836 B

BIN
flags/ar.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 708 B

BIN
flags/as.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 806 B

BIN
flags/at.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 505 B

BIN
flags/au.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 877 B

BIN
flags/aw.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 722 B

BIN
flags/ax.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 718 B

BIN
flags/az.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 834 B

BIN
flags/ba.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 741 B

BIN
flags/bb.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 813 B

BIN
flags/bd.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 817 B

BIN
flags/be.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 548 B

BIN
flags/bf.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 549 B

BIN
flags/bg.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 539 B

BIN
flags/bh.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 647 B

BIN
flags/bi.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 837 B

BIN
flags/bj.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 607 B

BIN
flags/bm.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 773 B

BIN
flags/bn.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 786 B

BIN
flags/bo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 632 B

BIN
flags/br.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 801 B

BIN
flags/bs.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 620 B

BIN
flags/bt.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 929 B

BIN
flags/bv.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 819 B

BIN
flags/bw.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 680 B

BIN
flags/by.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 567 B

BIN
flags/bz.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 841 B

BIN
flags/ca.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 754 B

BIN
flags/cc.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 717 B

BIN
flags/cd.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 758 B

BIN
flags/cf.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 764 B

BIN
flags/cg.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 645 B

BIN
flags/ch.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 582 B

BIN
flags/ci.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 680 B

BIN
flags/ck.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 796 B

BIN
flags/cl.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 609 B

BIN
flags/cm.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 659 B

BIN
flags/cn.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 523 B

BIN
flags/co.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 489 B

BIN
flags/cr.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 634 B

BIN
flags/cs.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 569 B

BIN
flags/cu.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 766 B

BIN
flags/cv.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 734 B

BIN
flags/cx.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 784 B

BIN
flags/cy.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 768 B

BIN
flags/cz.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 650 B

BIN
flags/de.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 534 B

BIN
flags/dj.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 641 B

BIN
flags/dk.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 625 B

BIN
flags/dm.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 882 B

BIN
flags/do.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 771 B

BIN
flags/dz.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 909 B

BIN
flags/ec.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 670 B

BIN
flags/ee.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 516 B

BIN
flags/eg.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 519 B

BIN
flags/eh.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 643 B

BIN
flags/er.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 789 B

BIN
flags/es.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 634 B

BIN
flags/et.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 830 B

BIN
flags/fi.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 654 B

BIN
flags/fj.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 974 B

BIN
flags/fk.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 730 B

BIN
flags/fm.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 800 B

BIN
flags/fo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 761 B

BIN
flags/fr.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 694 B

BIN
flags/fx.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 694 B

BIN
flags/ga.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 561 B

BIN
flags/gb.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 980 B

BIN
flags/gd.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 754 B

BIN
flags/ge.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 631 B

BIN
flags/gf.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 694 B

BIN
flags/gg.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 530 B

BIN
flags/gh.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 579 B

BIN
flags/gi.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 645 B

BIN
flags/gl.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 702 B

BIN
flags/gm.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 598 B

BIN
flags/gn.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 762 B

BIN
flags/gp.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 694 B

BIN
flags/gq.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 738 B

BIN
flags/gr.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 744 B

BIN
flags/gs.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 745 B

BIN
flags/gt.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 831 B

BIN
flags/gu.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 819 B

BIN
flags/gw.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 557 B

BIN
flags/gy.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 815 B

BIN
flags/hk.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 636 B

BIN
flags/hm.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 789 B

Some files were not shown because too many files have changed in this diff Show More