[ PHPXref.com ] [ Generated: Sun Jul 20 19:28:27 2008 ] [ PgMarket 2.2.3 ]
[ Index ]     [ Variables ]     [ Functions ]     [ Classes ]     [ Constants ]     [ Statistics ]

title

Body

[close]

/shopping/ -> delivery_costs.php (source)

   1  <?php
   2  // (C) 2001 Fabio Molinari <fabio.m@mclink.it>
   3  // (C) 2001-2002 Marco Pratesi <marco@pgmarket.net>
   4  
   5  include  ("../config.inc.php");
   6  include  ("../common.inc.php");
   7  
   8  $qid = new PGM_Sql();
   9  $qid_zone = new PGM_Sql();
  10  
  11  $DOC_TITLE = "DeliveryCosts_Table";
  12  include ($CFG["dirroot"] . "header.php");
  13  
  14  $id = nvl($PGM_SESSION["zone_id"], 1);
  15  
  16  $qid->query("
  17      SELECT maxqty, cost, type
  18      FROM delivery_costs
  19      WHERE zone_id = '$id'
  20      ORDER BY maxqty
  21  ");
  22  
  23  $t = new Template();
  24  $t->set_file("page", "templates/delivery_costs_list.ihtml");
  25  include ($CFG["localelangdir"] . "global-common.inc.php");
  26  include ($CFG["localelangdir"] . "global-admin.inc.php");
  27  $t->set_block("page", "dc_row", "dc_rows");
  28  $t->set_var("dc_rows", "");
  29  while ($qid->next_record()) {
  30      $t->set_var(array(
  31          "dc_id"        => $id,
  32          "dc_fmaxqty"    => formatted_weight($qid->f("maxqty")),
  33          "dc_fcost"    => formatted_price($qid->f("cost")),
  34          "dc_type"    => ($qid->f("type") == "T") ? $t->get_var("DC_Fixed") : $t->get_var("DC_Unitary")
  35      ));
  36      $t->parse("dc_rows", "dc_row", true);
  37  }
  38  get_zone_name($qid_zone, $id);
  39  $qid_zone->next_record();
  40  $zone_name = ($qid_zone->f("lname") != "") ? ov($qid_zone->f("lname")) : ov($qid_zone->f("name"));
  41  $t->set_var("zone_name", $zone_name);
  42  $t->pparse("out", "page");
  43  
  44  include ($CFG["dirroot"] . "footer.php");
  45  
  46  pgm_session_close($PGM_SESSION, $session_name);
  47  
  48  ?>


[ Powered by PHPXref - Served by Debian GNU/Linux ]