• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • If you're using Gesior 2012 or MyAAC, please review this thread for information about a serious security vulnerability and a fix.

AAC Error Latestnews Tasker

asdzx123

Member
Joined
Jul 1, 2019
Messages
37
Reaction score
8
I have a small problem, but it is not working

$players = $SQL->query('SELECT name,online,level,vocation,promotion,looktype,lookaddons,lookhead,lookbody,looklegs,lookfeet, (count() / '.$taskCount.') 100 as percent FROM player_storage ps inner join players p on(p.id = ps.player_id) WHERE p.deleted = 0 AND p.group_id < '.$config['site']['players_group_id_block'].' AND name != "Account Manager" AND name != "Rook Sample" AND name != "Sorcerer Sample" AND name != "Druid Sample" AND name != "Paladin Sample" AND name != "Knight Sample" and key in('.substr($keys, 0, -2).') group by player_id order by percent desc limit 1;');
$tasks = $config['site']['tasks'];
$taskCount = count($config['site']['tasks']);
$taskCountDone = 0;
$keys = '';
foreach($tasks as $storage => $name)
{
$keys .= ''.$tasks[$storage].'';
$taskCountDone++;
}
{
$name = $player['name'];
if (strlen($name) > 12)
$name = substr($name, 0, 12) . '...';
}
foreach($players as $player)
$task_procent = ( $taskCountDone / $taskCount ) * 100;
{
$main_content .= '
<td id="toptd" width=15%>
<font color="#993333"><b>Top Tasker</b></font><br><br><a class="toptext" href="?subtopic=characters&name='.urlencode($player['name']).'">
<center><div id="imgtop" style="width: 80px; height: 80px;">
<img id="outfit" src="outfit.php?id='.$player['looktype'].'&addons='.$player['lookaddons'].'&head='.$player['lookhead'].'&body='.$player['lookbody'].'&legs='.$player['looklegs'].'&feet='.$player['lookfeet'].'" width="95" height="95"></div></center>
<br>
'.$player['name'].'
</a>
<br/>
<small style="font-size: 10px;"><b><font color="#993333">Done:('.round($task_procent, 0).'%)</font></b></small></td>';
}

Screenshot_4.png
Post automatically merged:

bump
 
Last edited:
Top