Display Total # of Applications, Jobs and Companies
this is a merged script for displaying total number of applications sent through the site, how many active jobs and how many different companies are on your site.
so let’s start. on page_home.php, add:
// get companies $sqlc = 'SELECT DISTINCT company FROM jobs WHERE is_temp = 0 AND is_active = 1 ORDER BY company ASC'; $resultc = $db->QueryArray($sqlc); $smarty->assign('companies_count', count($resultc)); // get total applications $sqlja = 'SELECT COUNT(id) FROM job_applications'; $rsja = $db->QueryItem($sqlja); $smarty->assign('total_applications', $rsja)
and on /_templates/home.tpl, add
<center><h4>now serving <b>{$jobs_count_all|number_format:0:"":","}</b> jobs from <b>{$companies_count|number_format:0:"":","}</b> different companies with a total of <b>{$total_applications|number_format:0:"":","}</b> job applications processed</h4></center>






great add on
Typo error…in code of page_home.php, you forgot ; in last line of code.
Hi, you did not specify where exactly to place tthe code in the php file and tpl files.