⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 productlist.php

📁 电子商务---产品发布系统 采用PHP+MYSQL+APACHE的环境,非常方便的一个小系统,可以嵌入其他系统内使用
💻 PHP
字号:
<?php
	include('dbconnect.php');
	?>
<link href="css/style.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style1 {color: #ffffff}
-->
</style>
<script language="javascript">
	function check() {
	if (form.search1.value=="") {
		alert("查询条件不能加空!")
		form.search1.focus()
		return false
		}
	}
	
</script>
  <p><span class="label">产品信息维护</span></p>
  <p class="data">在这里,您可以查看产品列表。也可以添加新的产地或者修改、删除现有的产地。</p>
  <table width="800" border="1" cellpadding="1" cellspacing="1" bordercolor="#999999">
  <tr bgcolor="#6B5973" class="location">
    <td width="59" nowrap class="style1">种类</td>
    <td width="109" class="style1">编号</td>
    <td width="110" class="style1">名称</td>
    <td width="221" class="style1">价格</td>
    <td width="221" class="style1">产地</td>
    <td width="221" class="style1">产品介绍</td>
    <td width="157" class="style1">操作</td>
  </tr>
  <?php
  	$count=0;
	$sql_product="select *from products order by class_name";
	$result_product=mysql_query($sql_product,$conn);
		
	while ($row_product=mysql_fetch_array($result_product)){
	?>
  <tr>
    <td nowrap><?php echo $row_product['class_name'];?></td>
    <td nowrap><?php echo $row_product['product_id'];?></td>
    <td nowrap><?php echo $row_product['product_name'];?></td>
    <td nowrap><?php echo $row_product['price'];?></td>
    <td nowrap><?php echo $row_product['origin'];?></td>
    <td nowrap><a href="product_view.php?id=<?php echo $row_product['id'];?>" title=<?php echo $row_product['info'];?> ><?php echo substr($row_product['info'],0,20);?></a></td>
    <td nowrap>
      [<a href="product_edit.php?id=<?php echo $row_product['id'];?>">修改</a>]
	  [<a href="upload/uploadimage.php?id=<?php echo $row_product['id'];?>">修改图片</a>] [<a href="process.php?id=<?php echo $row_product['id'];?>&action=delete">删除</a>]</td>
    </tr>
<?php
	$count++;
	}
?>  </table>
  <?php echo  "<p>目前总共有<font color=red> ".$count." </font>种产品</p>"; ?>
  <form action="qsearch.php" method="post" name="form" id="form" onSubmit=" return check() ">
    <input name="search1" type="text" id="search">
    <input type="submit" name="Submit" value="快搜">
  </form>
  <p>&nbsp;</p>
  

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -