Hey I forgot to post this along time ago, but you still are wondering how to get the alerts on the main nav working..here you go
in the abstract add
--------------------------------------------------------------------------------------------------
$AJAX['ataks'] = $total['count'];
$sql = "SELECT COUNT(*) as count FROM %%FLEETS%% WHERE fleet_start_time > :time AND fleet_mission = :missionId AND fleet_mess = 0 AND fleet_owner <> :userId AND fleet_target_owner = :userId;";
$total = Database::get()->selectSingle($sql, array(
':userId' => $USER['id'],
':time' => TIMESTAMP,
':missionId' => 6
));
$AJAX['spio'] = $total['count'];
$sql = "SELECT COUNT(*) as count FROM %%FLEETS%% WHERE fleet_start_time > :time AND fleet_mission = :missionId AND fleet_mess = 0 AND fleet_owner <> :userId AND fleet_target_owner = :userId;";
$total = Database::get()->selectSingle($sql, array(
':userId' => $USER['id'],
':time' => TIMESTAMP,
':missionId' => 9
));
$AJAX['unic'] = $total['count'];
$sql = "SELECT COUNT(*) as count FROM %%FLEETS%% WHERE fleet_start_time > :time AND fleet_mission = :missionId AND fleet_mess = 0 AND fleet_owner <> :userId AND fleet_target_owner = :userId;";
$total = Database::get()->selectSingle($sql, array(
':userId' => $USER['id'],
':time' => TIMESTAMP,
':missionId' => 10
));
$AJAX['rakets'] = $total['count'];
and add in
$this->assign(array(
'ataks'=> $AJAX['ataks'],
'spio'=> $AJAX['spio'],
'unic'=> $AJAX['unic'],
'rakets'=> $AJAX['rakets'],
in main nav add:
<div id="indicators">
<div id="attack" class="indicator {if $ataks > 0}active_indicator{/if} tooltip" data-tooltip-content="{$LNG.customm_1}">
<div class="icoi"></div>
</div>
<div id="espionage" class="indicator {if $spio > 0}active_indicator{/if} tooltip" data-tooltip-content="{$LNG.customm_4}" href="game.php?page=overview">
<div class="icoi"></div>
</div>
<div id="destruction" class="indicator {if $unic > 0}active_indicator{/if} tooltip" data-tooltip-content="{$LNG.customm_3}">
<div class="icoi"></div>
</div>
<div id="rocket" class="indicator {if $rakets > 0}active_indicator{/if} tooltip" data-tooltip-content="{$LNG.customm_5}">
<div class="icoi"></div>
</div>
</div>
in the abstract add
--------------------------------------------------------------------------------------------------
$AJAX['ataks'] = $total['count'];
$sql = "SELECT COUNT(*) as count FROM %%FLEETS%% WHERE fleet_start_time > :time AND fleet_mission = :missionId AND fleet_mess = 0 AND fleet_owner <> :userId AND fleet_target_owner = :userId;";
$total = Database::get()->selectSingle($sql, array(
':userId' => $USER['id'],
':time' => TIMESTAMP,
':missionId' => 6
));
$AJAX['spio'] = $total['count'];
$sql = "SELECT COUNT(*) as count FROM %%FLEETS%% WHERE fleet_start_time > :time AND fleet_mission = :missionId AND fleet_mess = 0 AND fleet_owner <> :userId AND fleet_target_owner = :userId;";
$total = Database::get()->selectSingle($sql, array(
':userId' => $USER['id'],
':time' => TIMESTAMP,
':missionId' => 9
));
$AJAX['unic'] = $total['count'];
$sql = "SELECT COUNT(*) as count FROM %%FLEETS%% WHERE fleet_start_time > :time AND fleet_mission = :missionId AND fleet_mess = 0 AND fleet_owner <> :userId AND fleet_target_owner = :userId;";
$total = Database::get()->selectSingle($sql, array(
':userId' => $USER['id'],
':time' => TIMESTAMP,
':missionId' => 10
));
$AJAX['rakets'] = $total['count'];
and add in
$this->assign(array(
'ataks'=> $AJAX['ataks'],
'spio'=> $AJAX['spio'],
'unic'=> $AJAX['unic'],
'rakets'=> $AJAX['rakets'],
in main nav add:
<div id="indicators">
<div id="attack" class="indicator {if $ataks > 0}active_indicator{/if} tooltip" data-tooltip-content="{$LNG.customm_1}">
<div class="icoi"></div>
</div>
<div id="espionage" class="indicator {if $spio > 0}active_indicator{/if} tooltip" data-tooltip-content="{$LNG.customm_4}" href="game.php?page=overview">
<div class="icoi"></div>
</div>
<div id="destruction" class="indicator {if $unic > 0}active_indicator{/if} tooltip" data-tooltip-content="{$LNG.customm_3}">
<div class="icoi"></div>
</div>
<div id="rocket" class="indicator {if $rakets > 0}active_indicator{/if} tooltip" data-tooltip-content="{$LNG.customm_5}">
<div class="icoi"></div>
</div>
</div>