📄 product_add.php
字号:
<?
include("db_conn.php");
include("db_func.php");
// 将类别表中的数据全部取出 BEGIN
$SQLStr = "SELECT * FROM class";
$res = db_query($SQLStr);
//将类别表中的数据全部取出 END
?>
<?
include("up.htm"); // 外挂网页上方的功能栏
?>
<form name="form1" method="post" action="product_process.php?check=add">
<table width="720" border="1" cellpadding="0" cellspacing="0" align="center" bordercolor="#0000FF">
<tr>
<td bgcolor="#FFFFCC">
<table width="400" border="0" align="center">
<tr>
<td width="60%" bgcolor="#9933FF" align="center">
<font color="#FFFFFF">增加产品</font>
</td>
<td width="25%" bgcolor="#9966FF"> </td>
<td width="10%" bgcolor="#9999FF"> </td>
<td width="3%" bgcolor="#9999FF"> </td>
<td width="2%" bgcolor="#99CCFF"> </td>
</tr>
</table>
<table width="720">
<tr>
<td align="center">
<input type="submit" name="submit" value="增加产品">
</td>
</tr>
</table>
<table width="720" border="0" cellpadding="1" cellspacing="1" bgcolor="#99CCFF" bordercolor="#0000FF">
<tr>
<td width="103" align="center">产品序号</td>
<td width="187">
<input type="text" name="p_id" size="10">
</td>
<td width="96" align="center">产品名称</td>
<td width="351">
<input type="text" name="p_name" size="25">
</td>
</tr>
<tr>
<td width="103" align="center">产品来源</td>
<td width="187">
<input type="text" name="p_source" size="20">
</td>
<td width="96" align="center">产品连结</td>
<td width="351">
<input type="text" name="p_link" size="20">
</td>
</tr>
<tr>
<td width="103" align="center">产品售价</td>
<td width="187">
<input type="text" name="p_price" size="8">
</td>
<td width="96" align="center">产品成本</td>
<td width="351">
<input type="text" name="p_cost" size="8">
</td>
</tr>
<tr>
<td width="103" height="22" align="center">库存数量</td>
<td width="187" height="22">
<input type="text" name="p_numbers" size="8">
</td>
<td width="96" height="22" align="center">产品类别</td>
</td>
<td width="187" height="22">
<?
if ($res)
{
$num = db_num_rows($res);
// 将类别名称的字段值以下拉列表的方式呈现于网页上 BEGIN
echo "<select name='c_id'>";
for ($i=0;$i<$num;$i++)
{
$row = db_fetch_array($res);
echo "<option value='" . $row['c_id'] . "'>" . $row['c_name'] . "</option>";
}
echo "</select>";
// 将类别名称的字段值以下拉列表的方式呈现于网页上 END
}
else // 类别表中无类别数据
echo "目前产品无类别区分";
?>
<input type="hidden" name="p_date" value="<?=date("Y-m-d g:i:s")?>">
</td>
</tr>
<tr>
<td width="103" height="22" align="center">热门程度</td>
<td width="187" height="22">
<input type="text" name="p_hot" size="8">
</td>
<td width="96" height="22" align="center">是否推荐</td>
<td width="351" height="22">
<select name="p_commend">
<option value="1">推荐</option>
<option value="0">不推荐</option>
</select>
</td>
</tr>
<tr>
<td width="103" align="center">是否上架</td>
<td width="187">
<select name="p_actival">
<option value="1">上架</option>
<option value="0">下架</option>
</select>
</td>
<td width="96" align="center">产品图片</td>
<td width="351">
<input type="file" name="p_pic">
</td>
</tr>
</table>
<br>
<table width="720" border="0">
<tr bgcolor="#99CCCC">
<td align="center">产品信息</td>
<td align="center">
<textarea name="p_info" cols="50" rows="10"></textarea>
</td>
</tr>
</table>
</td>
</tr>
</table>
</form>
<? include("down.htm"); ?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -