function IndexCategoryList()
{
    echo "<table>";
    $i = 0;
    while (1) {
        if (numberToCategory($i) == "Category doesn't exist") {
            break;
        } else {
            echo "<tr ><td id ='indextable'><a value=\"{$i}\" href = 'search.php?y={$i}'>";
            echo numberToCategory($i);
            echo "</a></td></tr>";
        }
        $i++;
    }
    echo "</table>";
}
Exemplo n.º 2
0
function createCategoryList()
{
    if (ctype_digit($_GET['category'])) {
        $x = $_GET['category'];
    } else {
        $x = 999;
    }
    echo "<option>All Categories</option>";
    $i = 0;
    while (1) {
        if (numberToCategory($i) == "Category Does Not Exist") {
            break;
        } else {
            echo " <option value=\"{$i}\" ";
            if ($i == $x) {
                echo ' SELECTED ';
            }
            echo " >";
            echo numberToCategory($i);
            echo "</option>";
        }
        $i++;
    }
}
Exemplo n.º 3
0
function page_link($y)
{
    if ($y == -1) {
        echo "<div id='selected_link'><a href='index.php?y=-1'> All categories</a></div>";
    } else {
        echo "<div id='page_link'><a href='index.php?y=-1'> All categories</a></div>";
    }
    $i = 0;
    while (1) {
        if (numberToCategory($i) == "Category Does Not Exist") {
            break;
        }
        if ($i != $y) {
            echo "<div id='page_link'><a href='index.php?y={$i}'>" . numberToCategory($i) . "</a></div>";
        } else {
            echo "<div id='selected_link'><a href='index.php?y={$i}'>" . numberToCategory($i) . "</a></div>";
        }
        $i++;
    }
}