Ejemplo n.º 1
0
/**
 * Prints out a list of program types, along with checkboxes.
/**/
function category_type_list()
{
    foreach (Program::category_types() as $key => $type) {
        $safe_type = html_entities($type);
        echo '<input type="checkbox" name="ctype[]" id="ctype_', $key, '" value="', $safe_type, '"';
        if (in_array($type, $_SESSION['search']['ctype'])) {
            echo ' CHECKED';
        }
        echo '><label for="ctype_', $key, '">', $safe_type, '</label>';
        if ($type == 'movie') {
            echo ': ', movie_star_select('stars_gt'), ' to ', movie_star_select('stars_lt');
        }
        echo '<br>';
    }
}