assign("CHALL_LAST", ''); $date = new Date(); $challenges = new Challenges(); if ($ac) { $site->validate_id($id); $loader->load('user'); $challenges_info = $challenges->list_challenges($id); $content = $challenges_info[0]; $total = $challenges_info[1]; $last = $date->last_update('', 'challenge_tag', $id); $title = $lang['challenges_list_title'].$challenges_info[2]; } else { $title = $lang['challenges_title']; $template->assign_if("intro", 1); $content = $challenges->list_tags(); $template->assign("CONTENT", $content); $total_obj = new Count_Values(); $total = $total_obj->get_total(CHALLENGES_TABLE); $last = $date->last_update('', 'challenge'); } $template->assign("LAST_UPDATE", $last); $template->assign("CHALL_TOTALS", $total); $template->assign("CONTENT", $content); // Process template $template->assign("PAGE_TITLE", $title); $template->assign("HEAD_TITLE", $site->site_title($title, 1)); $template->pparse("layout/challenges.tmpl"); ?>