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

📄 tax_list.ihtml

📁 php做的网上商店系统。简单易懂
💻 IHTML
字号:
<?php 
  search_header($tax_list_lbl, $modulename, "tax_list"); 
?>

<?php 
  // Enable the multi-page search result display
  if (empty($offset))
 	$offset=0;
  if ($keyword) {
     $list  = "SELECT * FROM tax_rate WHERE ";
     $count = "SELECT count(*) as num_rows FROM tax_rate WHERE ";
     $q  = "(tax_state LIKE '%$keyword%' OR ";
     $q .= "tax_country LIKE '%$keyword%'";
     $q .= ") ";
     $q .= "ORDER BY tax_country, tax_state ASC ";
     $list .= $q . " LIMIT $offset, " . SEARCH_ROWS;
     $count .= $q;   
  }
  else 
  {
     $q = "";
     $list  = "SELECT * FROM tax_rate ORDER BY tax_country, tax_state ASC ";
     $count = "SELECT count(*) as num_rows FROM tax_rate"; 
     $list .= $q . " LIMIT $offset, " . SEARCH_ROWS;
     $count .= $q;   
  }
  $db->query($count);
  $db->next_record();
  $num_rows = $db->f("num_rows");
  if ($num_rows == 0) {
     echo "你查找的结果为0.<BR>";
  }
  else {
?>

<table width="100%" border="0" cellspacing="0" cellpadding="2" align="center">
   <tr > 
    <td width="44%"><?php echo $tax_list_country ?></td>
    <td width="38%"><?php echo $tax_list_state ?></td>
    <td width="18%"><?php echo $tax_list_rate ?></td>
  </tr>
<?php
$db->query($list);
$i = 0;
while ($db->next_record()) {
  if ($i++ % 2) 
     $bgcolor=SEARCH_COLOR_1;
  else
     $bgcolor=SEARCH_COLOR_2;
?>
  <tr BGCOLOR=<?php echo $bgcolor ?>> 
    <td width="44%" nowrap><?php $db->p("tax_country") ?> </td>
    <td width="38%"><?php $db->p("tax_state") ?></td>
    <td width="18%"><?php
    $url = SECUREURL . "?page=$modulename/tax_form&tax_rate_id=";
    $url .= $db->f("tax_rate_id");
    echo "<A HREF=" . $sess->url($url) . ">";
    printf("%8.4f", $db->f("tax_rate"));
    echo "</A><BR>";
   ?></td>
  </tr>
  <?php } ?> 
</table>

<?php 
  search_footer($modulename, "tax_list", $offset, $num_rows, $keyword); 
}
?>

⌨️ 快捷键说明

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