edit-metatype.php
42 lines
| 1.1 KiB
| text/x-php
|
XmlPhpLexer
| r1 | <?php | |||
| require_once('include/admin.inc.php'); | ||||
| auth_redirect(); // Require logged in user to access this page. | ||||
| r30 | $sql = 'SELECT id, name FROM meta_t WHERE id = ?'; | |||
| $stmt = $dbConnection->prepare($sql); | ||||
| $stmt->bindValue(1, $_GET['edit'], PDO::PARAM_INT); | ||||
| $stmt->execute(); | ||||
| $type = $stmt->fetch() | ||||
| r1 | or mtdie("Invalid metatype number!"); | |||
| adminhead('Metatypes'); | ||||
| adminmenu('manage-metatypes.php'); | ||||
| ?> | ||||
| <h2>Edit Metatype Information</h2> | ||||
| <form action="manage-metatypes.php" method="post" name="post" id="post"> | ||||
| <?php nonce_field('save-metatype-'.$type->id); ?> | ||||
| <input type="hidden" name="action" value="edit_meta" /> | ||||
| <input type="hidden" name="type_id" value="<?php echo $type->id; ?>" /> | ||||
| <div id="poststuff"> | ||||
| <table class="editform" width="100%" cellspacing="2" cellpadding="5"> | ||||
| <tr> | ||||
| <th scope="row" width="33%">Name</th> | ||||
| <td width="66%"><input name="name" type="text" id="name" value="<?php echo htmlentities($type->name); ?>" /></td> | ||||
| </tr> | ||||
| </table> | ||||
| r8 | ||||
| r1 | <p class="submit"><input type="submit" value="Save »" name="submit" /></p> | |||
| </div> | ||||
| </form> | ||||
| <?php adminfooter(); ?> | ||||
