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

📄 shipping_selected.ihtml

📁 php做的网上商店系统。简单易懂
💻 IHTML
字号:
<?php
eval(load_class("ISshipping", "ps_intershipper"));
$ps_intershipper = new ps_intershipper;


  $db = new ps_DB;

  $q  = "SELECT * FROM ISshipping ";
  $q .= "WHERE ship_publish='Y' ";
  $q .= "AND vendor_id='$ps_vendor_id' ";
  $q .= "ORDER BY ship_carrier_name ASC";
  $db->query($q);

  if ($db->num_rows() > 0) {
    if ($db->num_rows() == 1) {
      $db->next_record(); ?>
      <INPUT TYPE="hidden" NAME="ship_method_id" VALUE="<?php $db->sp("ship_method_id"); ?>"><?php
    } else {
      /* Pass previous forms results to fetch_quote() function.
       * If previous form identified a ship to address, the function
       * will return a quote. Otherwise, it will not.
       */

      if (!$prices = $ps_intershipper->fetch_quote($vars)) {

        /* If we're unable to get a quote, display
         * a ship method select list without shipping costs.
         */
?>
        <TABLE BORDER=0 WIDTH=100% CELLPADDING=2 CELLSPACING=0>
          <?php
        while ($db->next_record()) { ?>
            <TR>
              <TD>
                <INPUT TYPE=radio NAME=ship_method_id VALUE=<?php $db->sp("ship_method_id");
          if ($ship_method_id)
            echo " CHECKED>" . $db->f("ship_carrier_name") . " " . $db->f("ship_method_name") . "\r\n";
          else
            echo ">" . $db->f("ship_carrier_name") . " " . $db->f("ship_method_name") . "\r\n"; ?>
              </TD>
            </TR><?php
        } ?>
        </TABLE><?php
      } else { ?>
        <TABLE BORDER=0 WIDTH=100% CELLPADDING=4 CELLSPACING=0>
          <TR BGCOLOR="#FFCC33">
            
    <TD> <B>运输方法</B> </TD>
            
    <TD> <B>送货日期</B> </TD>
            
    <TD> <B>价格</B> </TD>
          </TR>
        <?php
        while ($db->next_record()) {
          reset($prices);
          while (list($key,$val)=each($prices)) {
            if (strcmp($key,$db->f("ship_method_id")) == 0) { 
             ?>
             <TR>
              <TD>
              <?php
              if ($ship_method_id && (strcmp($ship_method_id,$db->f("ship_method_id")) == 0)) {
                echo $db->f("ship_carrier_name") . " ";
                echo $db->f("ship_method_name") . "\r\n";
              echo "</TD><TD>";
              echo date("m/d/Y H:m", $prices[$key]["ddate"]);
              echo "</TD><TD>";
              printf("%8.2f", $prices[$key]["rate"]);
              }
               ?>
                  </TD><INPUT TYPE=HIDDEN NAME=ship_method_id VALUE=<?php echo $ship_method_id ?> >
                </TR><?php
            }
          }
        } ?>
        </TABLE><?php
      }
    }
  }
?>

⌨️ 快捷键说明

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