📄 mod_cat_form.php
字号:
<?PHP
#############################################################################
#This file is part of Shiftlog. #
# #
# Shiftlog 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 3 of the License, or #
# (at your option) any later version. #
# #
# Shiftlog 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, see <http://www.gnu.org/licenses/>. #
#############################################################################
// Menu For the Category Select
$conn;
$select_db;
$cat_sql = "SELECT cat_id, catname FROM category";
$cat_result = mysql_query($cat_sql);
$cat_options = "";
$cat_num_options = ""; //for possible future use
while ($row = mysql_fetch_array($cat_result))
{
$id = $row["cat_id"];
$cat = $row["catname"];
$cat_options.="<OPTION VALUE=\"$cat\">".$cat;
$cat_num_options.="<OPTION VALUE=\"$cat\">".$cat; //for possible future use
}
?>
<br />
<!--Modify Category -->
<form name="mod_cat" action="<?php echo $HTTP_SERVER_VARS['PHP_SELF']; ?>" method="post">
<table bgcolor="#CCCCCC" width="35%" border="1">
<tr>
<td colspan="2" align="center"><p><strong>Modify Cagtegory</strong></p>
<p><strong><font size="-2" color="#FF0000">Warning: These changes will only apply to future posts, not posts that have already taken place</font></strong></p></td>
</tr>
<tr>
<td width="45%">Select Category:</td>
<td width="55%" align="center"><select name="cat"><option value=0>Select One<?PHP echo $cat_options;?></select></td>
</tr>
<tr>
<td>New Category Name: </td>
<td align="center"><input type="text" name="mod_catname"></td>
</tr>
<tr>
<td align="center"><input type="reset"></td>
<td><input type="submit" name="mod_cat" value="Submit" /></td>
</tr>
</table>
</form>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -