cvs: pear /MDB2_Schema/docs/examples example.php

From: Date: Sat, 30 Sep 2006 03:55:34 +0000
Subject: cvs: pear /MDB2_Schema/docs/examples example.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-42313@lists.php.net to get a copy of this message
ifeghali Sat Sep 30 03:55:34 2006 UTC Modified files: /pear/MDB2_Schema/docs/examples example.php Log: - added fields for options http://cvs.php.net/viewvc.cgi/pear/MDB2_Schema/docs/examples/example.php?r1=1.20&r2=1.21&diff_format=u Index: pear/MDB2_Schema/docs/examples/example.php diff -u pear/MDB2_Schema/docs/examples/example.php:1.20 pear/MDB2_Schema/docs/examples/example.php:1.21 --- pear/MDB2_Schema/docs/examples/example.php:1.20 Fri Jun 30 10:11:02 2006 +++ pear/MDB2_Schema/docs/examples/example.php Sat Sep 30 03:55:34 2006 @@ -42,7 +42,7 @@ // | Author: Lukas Smith <smith@pooteeweet.org> | // +----------------------------------------------------------------------+ // -// $Id: example.php,v 1.20 2006/06/30 10:11:02 lsmith Exp $ +// $Id: example.php,v 1.21 2006/09/30 03:55:34 ifeghali Exp $ // /** @@ -93,10 +93,16 @@ $options = array( 'debug' => true, 'log_line_break' => '<br>', -# 'idxname_format' => '%s', -# 'quote_identifier' => true, -# 'force_defaults' => false, + 'idxname_format' => '%s', + 'quote_identifier' => true, + 'force_defaults' => false, ); + + foreach ($options as $k => $v) { + if ((isset($_REQUEST[$k])) && (!empty($_REQUEST[$k]))) + $options[$k] = $_REQUEST[$k]; + } + $schema =& MDB2_Schema::factory($dsn, $options); if (PEAR::isError($schema)) { $error = $schema->getMessage() . ' ' . $schema->getUserInfo(); @@ -224,12 +230,37 @@ <td><input type="radio" name="action" id="create" value="create" <?php if (isset($_REQUEST['action']) && $_REQUEST['action'] == 'create') { echo 'checked="checked"';} ?> /></td> </tr> <tr> - <td><label for="file">Dump SQL:</label></td> + <td><label for="dumpsql">Dump SQL:</label></td> <td><input type="checkbox" name="dumpsql" id="dumpsql" value="1" /></td> </tr> </table> - <p><input type="submit" name="submit" value="ok" /></p> </fieldset> + <fieldset> + <legend>Options</legend> + <table> + <tr> + <td><label for="log_line_break">Log line break:</label></td> + <td><input type="text" name="log_line_break" id="log_line_break" value="<br>" /></td> + </tr> + <tr> + <td><label for="idxname_format">Index Name Format:</label></td> + <td><input type="text" name="idxname_format" id="idxname_format" value="%s" /></td> + </tr> + <tr> + <td><label for="debug">Debug:</label></td> + <td><input type="checkbox" name="debug" id="debug" value="1" checked /></td> + </tr> + <tr> + <td><label for="quote_identifier">Quote Identifier:</label></td> + <td><input type="checkbox" name="quote_identifier" id="quote_identifier" value="1" checked /></td> + </tr> + <tr> + <td><label for="force_defaults">Force Defaults:</label></td> + <td><input type="checkbox" name="force_defaults" id="force_defaults" value="1" checked /></td> + </tr> + </table> + </fieldset> + <p><input type="submit" name="submit" value="ok" /></p> <?php } ?> </form> </body>

« previous php.pear.cvs (#42313) next »