$formHash['delete'] = TRUE; $formHash['submit_mult'] = 'remove_sitehomes'; foreach ($_REQUEST["checked"] as $del) { $tmpPage = new BitSiteHome($del); if ($tmpPage->load() && !empty($tmpPage->mInfo['title'])) { $info = $tmpPage->mInfo['title']; } else { $info = $del; } $formHash['input'][] = '<input type="hidden" name="checked[]" value="' . $del . '"/>' . $info; } $gBitSystem->confirmDialog($formHash, array('warning' => 'Are you sure you want to delete ' . count($_REQUEST["checked"]) . ' sitehomes?', 'error' => 'This cannot be undone!')); } else { foreach ($_REQUEST["checked"] as $deleteId) { $tmpPage = new BitSiteHome($deleteId); if (!$tmpPage->load() || !$tmpPage->expunge()) { array_merge($errors, array_values($tmpPage->mErrors)); } } if (!empty($errors)) { $gBitSmarty->assign_by_ref('errors', $errors); } } } // create new sitehome object $sitehome = new BitSiteHome(); $sitehomesList = $sitehome->getList($_REQUEST); $gBitSmarty->assign_by_ref('sitehomesList', $sitehomesList); // getList() has now placed all the pagination information in $_REQUEST['listInfo'] $gBitSmarty->assign_by_ref('listInfo', $_REQUEST['listInfo']); // Display the template