Location: PHPKode > scripts > ZBase > zbase/html/create.php
<?
/*****************************************************************************
 * create.php : ZBase create form
 *****************************************************************************
 * $Id: create.php,v 1.4 2000/02/15 14:53:35 massiot Exp $
 *****************************************************************************
 *  ZBase - a gateway between the database and the WWW
 *  Copyright (c) 1999 The ZBase team
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 *****************************************************************************/

require("srv_html.inc");
srv_init();
srv_header(srv_str("html", "create_title"));

/* Use a form object to retrieve the properties of the tables we work on. */
$form = new form;

/* Create a new row object. */
$ROW_OBJ = new row;
$ROW_OBJ->row_begin(array("link" => srv_loadvar("htmlpage", "create_result")));

$nb = $form->form_getnb();

for ($i = 0; $i < $nb; $i++) {
  $attributes = $form->form_getobj();
  srv_include($attributes["name"]);
  $roots[$i] = new $attributes["name"];
  /* such an object cannot be "omitted" */
  $roots[$i]->create_retrieve($form, $attributes["raw"]);
  $roots[$i]->show_row("*", "*", srv_makearray(unserialize(stripslashes($FORM_MERGED))));
}

$ROW_OBJ->row_end($form->form_getattr());

srv_close();
?>
Return current item: ZBase