<?php 
    # $Id: benchmarkSet_EDIT.php,v 1.4 2007/01/08 12:51:13 jarda Exp $

    /* Page for editating of benchmark set data
    */

    require_once('structuredPage.inc.php');

    class PageClass extends EditDBStructuredPage
    {
        
        function checkEnvironment()
        {
            if (!$_GET['id'])
                return False;

            return True;
        }

        
        function handleInvalidEnvironment()
        {
            header("Location: benchmarkSets_LISTING.php"); /* Redirect browser */
            exit();
        }


        function getTitle()
        {
            return 'Benchmark set editing';
        }


        function printContents() 
        {
            $db = connect();
            
            $query = "SELECT * FROM benchmarkSet WHERE id=$_GET[id]";

            $result = $db->Execute($query);
            
            $row = $result->FetchRow();

            echo("<form action=\"benchmarkSet_CHANGE.php\" method=\"post\">\n");
            echo "<input type=\"hidden\" name=\"id\" value=\"$_GET[id]\">";
            echo("    <table>\n");
            echo("        <tr><td>Name:</td><td><input type=\"text\" name=\"name\" value=\"$row[name]\"></td></tr>\n");
            echo("        <tr><td>Description:</td><td><textarea name=\"description\">$row[description]</textarea></td></tr>\n");
            echo("    </table>\n");
            echo("    <p>\n");
            echo("    <input type=\"submit\" name=\"OK\" value=\"OK\">\n");
            echo("    <input type=\"submit\" name=\"Cancel\" value=\"Cancel\">\n");
            echo("    </p>\n");
            echo("</form>\n");
        }
    }

    launchPage();

    # vim:enc=iso8859-2:fenc=iso8859-2:
?>

