Move admin CSS into a subdirectory.
Move admin CSS into a subdirectory.

File last commit:

3b807424bd87
64df00e7cb3d
Show More
edit-metatype.php
42 lines | 1.1 KiB | text/x-php | XmlPhpLexer
/ edit-metatype.php
<?php
require_once('include/admin.inc.php');
auth_redirect(); // Require logged in user to access this page.
$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()
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>
<p class="submit"><input type="submit" value="Save &raquo;" name="submit" /></p>
</div>
</form>
<?php adminfooter(); ?>