$cats = $BILL->GetUrlCategoriesAssoc();
// any action on selected keywords
if (isset($_POST['selected_kwds'])) {
    $selkwds = $_POST['selected_kwds'];
    foreach ($selkwds as $word => $on) {
        if (isset($_POST['btnLeave'])) {
            $BILL->ResolveUrlCategoryConflict($word);
        } elseif (isset($_POST['btnDelete'])) {
            $BILL->DeleteUrlCategoryKeyword($word);
            $BILL->ResolveUrlCategoryConflict($word);
        } elseif (isset($_POST['btnReplace'])) {
            $keyword = $BILL->GetUrlCategoryConflictKeyword($word);
            $BILL->ReplaceUrlCategoryKeyword($word, $keyword['forcid']);
            $BILL->ResolveUrlCategoryConflict($word);
        } elseif (isset($_POST['btnUnsense'])) {
            $BILL->AddUrlCategoryUnsenseword($word);
            $BILL->DeleteUrlCategoryKeyword($word);
            $BILL->ResolveUrlCategoryConflict($word);
        }
    }
}
class conflicts_act_formatter extends grid_formatter
{
    public function format($data, $type, $number = 0, $columns = null)
    {
        return '<input type="checkbox" name="selected_kwds[' . $data['keyword'] . '][]" />';
    }
}
class conflicts_cat_formatter extends grid_formatter
{
    protected $_cats = null;