/** * Permanently deletes the selected list of trash items */ function deleteTrash($cid, $option) { global $database, $mainframe, $adminLanguage; $type = mosGetParam($_POST, 'type', array(0)); $total = count($cid); if ($type == "content") { $obj = new mosContent($database); $fp = new mosFrontPage($database); foreach ($cid as $id) { $id = intval($id); $obj->delete($id); $fp->delete($id); } } else { if ($type == "menu") { $obj = new mosMenu($database); foreach ($cid as $id) { $id = intval($id); $obj->delete($id); } } } $msg = $total . " " . $adminLanguage->A_COMP_TRASH_SUCCESS_DEL; mosRedirect("index2.php?option={$option}&mosmsg=" . $msg . ""); }
/** * Permanently deletes the selected list of trash items */ function deleteTrash($cid, $option) { global $database; josSpoofCheck(); $type = mosGetParam($_POST, 'type', array(0)); $total = count($cid); if ($type == 'content') { $obj = new mosContent($database); $fp = new mosFrontPage($database); foreach ($cid as $id) { $id = intval($id); $obj->delete($id); $fp->delete($id); } } else { if ($type == 'menu') { $obj = new mosMenu($database); foreach ($cid as $id) { $id = intval($id); $obj->delete($id); } } } $msg = $total . " Iten(s) apagados com sucesso!"; mosRedirect("index2.php?option={$option}&mosmsg=" . $msg . ""); }
/** * Permanently deletes the selected list of trash items */ function deleteTrash($cid, $option) { global $database, $mainframe; $type = mosGetParam($_POST, 'type', array(0)); $total = count($cid); if ($type == "content") { $obj = new mosContent($database); $fp = new mosFrontPage($database); foreach ($cid as $id) { $id = intval($id); $obj->delete($id); $fp->delete($id); } } else { if ($type == "menu") { $obj = new mosMenu($database); foreach ($cid as $id) { $id = intval($id); $obj->delete($id); } } } $msg = sprintf(Tn_('%s Item successfully Deleted', '%s Items successfully Deleted', $total), $total); mosRedirect("index2.php?option={$option}&mosmsg=" . $msg . ""); }