+ function handler_applis_js(&$page)
+ {
+ header('Content-Type: text/javascript; charset=utf-8');
+ header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
+ header('Last-Modified:' . gmdate('D, d M Y H:i:s') . ' GMT');
+ header('Cache-Control: no-cache, must-revalidate');
+ header('Pragma: no-cache');
+ $page->changeTpl('profile/applis.js.tpl', NO_SKIN);
+ require_once "applis.func.inc.php";
+ }
+
+ function handler_grades_js(&$page)
+ {
+ header('Content-Type: text/javascript; charset=utf-8');
+ header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
+ header('Last-Modified:' . gmdate('D, d M Y H:i:s') . ' GMT');
+ header('Cache-Control: no-cache, must-revalidate');
+ header('Pragma: no-cache');
+ $page->changeTpl('profile/grades.js.tpl', NO_SKIN);
+ $res = XDB::iterator("SELECT *
+ FROM profile_medals_grades
+ ORDER BY mid, pos");
+ $grades = array();
+ while ($tmp = $res->next()) {
+ $grades[$tmp['mid']][] = $tmp;
+ }
+ $page->assign('grades', $grades);
+
+ $res = XDB::iterator("SELECT *, FIND_IN_SET('validation', flags) AS validate
+ FROM profile_medals
+ ORDER BY type, text");
+ $mlist = array();
+ while ($tmp = $res->next()) {
+ $mlist[$tmp['type']][] = $tmp;
+ }
+ $page->assign('medal_list', $mlist);