Ejemplo n.º 1
0
function displaySchedule()
{
    $dao = new DAO();
    $stmt = oci_parse($dao->con, "SELECT TO_CHAR(TIMESTART, 'MM-DD-YYYY HH24:MI') AS TS ,TO_CHAR(TIMEEND, 'MM-DD-YYYY HH24:MI') AS TE, ID, THEATREID, MOVIEID FROM SCREENROOM");
    OCIDefineByName($stmt, "TS", $timeS);
    OCIDefineByName($stmt, "TE", $timeE);
    OCIDefineByName($stmt, "ID", $scroomID);
    OCIDefineByName($stmt, "THEATREID", $tID);
    OCIDefineByName($stmt, "MOVIEID", $mID);
    oci_execute($stmt, OCI_DEFAULT);
    echo '<table border=1>';
    while (oci_fetch($stmt)) {
        echo '<tr>';
        // Use the uppercase column names for the associative array indices
        $bookLink = '<a href=order.php?sID=' . $scroomID . '>&nbsp book</a>';
        $detailLink = '<a href=movieDetail.php?mID=' . $mID . '>&nbsp detaile</a>';
        echo '<td> MOVIE: ' . $dao->fetchMovieName($mID) . '</td>' . ' <td>Start: ' . $timeS . ' </td><td>End: ' . $timeE . ' </td><td> theatre: ' . $dao->fetchTheatreName($tID) . '</td><td>' . $bookLink . ' </td><td>' . $detailLink . '</td>';
        echo '</tr>';
    }
    echo '</table>';
}
Ejemplo n.º 2
0
function getTheatreName($id)
{
    $dao = new DAO();
    return $dao->fetchTheatreName($id);
}
Ejemplo n.º 3
0
function q8()
{
    $dao = new DAO();
    echo "\n\t\t\t\t<form action=\"\" method=\"post\">\n\t\t\t\tchoose a Theare <select name=\"threadselect\" onchange=\"Q8(this.value)\" required> ";
    echo '<option value =\'\' selected=\'selected\' >----must select one---</option>';
    foreach ($dao->fetchTheatreIDs() as $rows) {
        foreach ($rows as $value) {
            echo "<option value ={$value} >" . $dao->fetchTheatreName($value) . '</option>';
        }
    }
    echo "</select>\n\t\t\t\t\n\t\t\t\t</form>";
}