assign("cntMembers", $res['cntMembers']); $query = mysql_query("select count(*) as cntCompanies from companies", $conn); $res = mysql_fetch_assoc($query); mysql_free_result($query); $smarty->assign("cntCompanies", $res['cntCompanies']); //Mitglieder mit Bild $members = array(); $query = mysql_query("select users.user_id, users.firstname, users.lastname, images_rel.image_id from users, images_rel where users.account_locked = 'N' and users.user_id = images_rel.user_id order by rand() limit 0,30", $conn); while($res = mysql_fetch_assoc($query)) { array_push($members, $res); } mysql_free_result($query); $smarty->assign("members", $members); //Unternehmen mit Logo $companies = array(); $query = mysql_query("select companies.company_id, companies.company_name, images_rel.image_id from companies, images_rel where companies.company_id = images_rel.company_id order by rand() limit 0,30", $conn); while($res = mysql_fetch_assoc($query)) { array_push($companies, $res); } mysql_free_result($query); $smarty->assign("companies", $companies); $smarty->display("main/main_start.tpl.html"); ?>