diff --git a/ajax/game_mark_shown.php b/ajax/game_mark_shown.php index da69e53f..6910e94a 100644 --- a/ajax/game_mark_shown.php +++ b/ajax/game_mark_shown.php @@ -8,7 +8,6 @@ if (!$user_id) throw new UnexpectedValueException(); - $badge_id = $_POST['badge_id']; $am = new AchievementsManager($user_id); $am->set_all_seen(); diff --git a/assets/css/main.css b/assets/css/main.css index db26f1d2..a085c916 100644 --- a/assets/css/main.css +++ b/assets/css/main.css @@ -1628,3 +1628,15 @@ tr.valign-top td { .ner-entity-text { height: 26px; } + +.single-achievement-wrap { + text-align: center; +} + +.single-achievement-wrap .achievement-wrap { + margin-top: 30px; +} + +.slim-header { + font-weight: 400; +} diff --git a/assets/img/badges/share/aist.png b/assets/img/badges/share/aist.png new file mode 100644 index 00000000..3d630ec0 Binary files /dev/null and b/assets/img/badges/share/aist.png differ diff --git a/assets/img/badges/share/bobr.png b/assets/img/badges/share/bobr.png new file mode 100644 index 00000000..4224b1fe Binary files /dev/null and b/assets/img/badges/share/bobr.png differ diff --git a/assets/img/badges/share/chameleon.png b/assets/img/badges/share/chameleon.png new file mode 100644 index 00000000..1f8460dd Binary files /dev/null and b/assets/img/badges/share/chameleon.png differ diff --git a/assets/img/badges/share/dog.png b/assets/img/badges/share/dog.png new file mode 100644 index 00000000..004fcee9 Binary files /dev/null and b/assets/img/badges/share/dog.png differ diff --git a/assets/img/badges/share/fish.png b/assets/img/badges/share/fish.png new file mode 100644 index 00000000..300e6f4a Binary files /dev/null and b/assets/img/badges/share/fish.png differ diff --git a/assets/img/badges/share/wantmore.png b/assets/img/badges/share/wantmore.png new file mode 100644 index 00000000..e7d4cf3f Binary files /dev/null and b/assets/img/badges/share/wantmore.png differ diff --git a/index.php b/index.php index 20c1115c..d5e9768d 100644 --- a/index.php +++ b/index.php @@ -86,6 +86,24 @@ $smarty->assign('manager', $am); $smarty->display('achievements/all_achievements.tpl'); break; + case 'achievement': + if (!empty($_GET['uid']) && !empty($_GET['type'])) { + $uid = (int)$_GET['uid']; + $type = $_GET['type']; + + $am = new AchievementsManager($uid); + $smarty->assign('user', get_user_info($uid)); + $smarty->assign('user_id', $uid); + + $all = $am->pull_all(); + + if (!empty($all[$type]) && $all[$type]->given) { + + $smarty->assign('achievement', $all[$type]); + $smarty->display('achievements/one_achievement.tpl'); + break; + } + } default: header("Location:index.php"); break; diff --git a/templates/achievements/one_achievement.tpl b/templates/achievements/one_achievement.tpl new file mode 100644 index 00000000..e8eeab00 --- /dev/null +++ b/templates/achievements/one_achievement.tpl @@ -0,0 +1,14 @@ +{extends file='common.tpl'} +{block name='content'} +