function intDoSearch(&$smarty) { $user_search_helper = new ReportCollector(); $report_helper = new ReportHelper(); intSetConditions($smarty, $user_search_helper); list($count, $user_ids, $user_infos) = searchUser($smarty, $user_search_helper->getConds(), $report_helper->getFrom(), $report_helper->getTo(), $report_helper->getOrderBy(), $report_helper->getDesc()); $smarty->assign_by_ref("user_infos", $user_infos); $smarty->assign_by_ref("user_ids", $user_ids); $smarty->assign("result_count", $count); $smarty->assign("show_results", TRUE); intShowUserSearch($smarty); }
<?php require_once "search_user_funcs.php"; needAuthType(ADMIN_AUTH_TYPE); $smarty = new IBSSmarty(); if (isInRequest("search")) { intDoSearch($smarty); } else { intShowUserSearch($smarty); }