mirror of
https://github.com/Znote/ZnoteAAC.git
synced 2025-04-29 18:59:21 +02:00
Small fix to achievements.php
Fix #390 Default image medal for achievements without configured image. Secret key set to default if it hasn't been configured already.
This commit is contained in:
parent
4068f42ac4
commit
cba8097d7d
@ -20,23 +20,23 @@ if ($config['Ach'] == true) {
|
|||||||
<tr>
|
<tr>
|
||||||
<?php
|
<?php
|
||||||
foreach ($config['achievements'] as $key => $achName) {
|
foreach ($config['achievements'] as $key => $achName) {
|
||||||
$secret = false;
|
// Set defaults
|
||||||
|
if (!isset($achName['secret'])) $achName['secret'] = false;
|
||||||
|
if (!isset($achName['img'])) $achName['img'] = 'https://i.imgur.com/ZqWp1TE.png';
|
||||||
|
|
||||||
if (($achName['points'] >= 1) and ($achName['points'] <= 3) and (!$achName['img'])) {
|
if (($achName['points'] >= 1) and ($achName['points'] <= 3) and (!$achName['img'])) {
|
||||||
echo '<td><center><img id="wtf" src="https://i.imgur.com/TUCGsr3.gif"></center></td>';
|
echo '<td><center><img id="wtf" src="https://i.imgur.com/TUCGsr3.gif"></center></td>';
|
||||||
}
|
|
||||||
elseif (($achName['points'] >= 4) and ($achName['points'] <= 6) and (!$achName['img']))
|
} elseif (($achName['points'] >= 4) and ($achName['points'] <= 6) and (!$achName['img'])) {
|
||||||
{
|
|
||||||
echo '<td><center><img id="wtf" src="https://i.imgur.com/TUCGsr3.gif"><img id="wtf" src="https://i.imgur.com/TUCGsr3.gif"></center></td>';
|
echo '<td><center><img id="wtf" src="https://i.imgur.com/TUCGsr3.gif"><img id="wtf" src="https://i.imgur.com/TUCGsr3.gif"></center></td>';
|
||||||
}
|
|
||||||
elseif (($achName['points'] >= 7) and ($achName['points'] <= 9) and (!$achName['img']))
|
} elseif (($achName['points'] >= 7) and ($achName['points'] <= 9) and (!$achName['img'])) {
|
||||||
{
|
|
||||||
echo '<td><center><img id="wtf" src="https://i.imgur.com/TUCGsr3.gif"><img id="wtf" src="https://i.imgur.com/TUCGsr3.gif"><img id="wtf" src="https://i.imgur.com/TUCGsr3.gif"></center></td>';
|
echo '<td><center><img id="wtf" src="https://i.imgur.com/TUCGsr3.gif"><img id="wtf" src="https://i.imgur.com/TUCGsr3.gif"><img id="wtf" src="https://i.imgur.com/TUCGsr3.gif"></center></td>';
|
||||||
}
|
|
||||||
elseif (($achName['points'] >= 10) and (!$achName['img']))
|
} elseif (($achName['points'] >= 10) and (!$achName['img'])) {
|
||||||
{
|
|
||||||
echo '<td><center><img id="wtf" src="https://i.imgur.com/TUCGsr3.gif"><img id="wtf" src="https://i.imgur.com/TUCGsr3.gif"><img id="wtf" src="https://i.imgur.com/TUCGsr3.gif"></center></td>';
|
echo '<td><center><img id="wtf" src="https://i.imgur.com/TUCGsr3.gif"><img id="wtf" src="https://i.imgur.com/TUCGsr3.gif"><img id="wtf" src="https://i.imgur.com/TUCGsr3.gif"></center></td>';
|
||||||
}
|
|
||||||
else {
|
} else {
|
||||||
echo '<td><img id="wtf" src="' .$achName['img']. '"><br><br></td>';
|
echo '<td><img id="wtf" src="' .$achName['img']. '"><br><br></td>';
|
||||||
}
|
}
|
||||||
echo '<td>' .$achName[0]. '</td>';
|
echo '<td>' .$achName[0]. '</td>';
|
||||||
@ -48,7 +48,8 @@ echo '<td>'. $achName['points'] .'</td>';
|
|||||||
echo '<td></td><td>'. $achName['points'] .'</td>';
|
echo '<td></td><td>'. $achName['points'] .'</td>';
|
||||||
}
|
}
|
||||||
echo '</tr>';
|
echo '</tr>';
|
||||||
}?>
|
}
|
||||||
|
?>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user