[ 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_calc.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  $DOC_TITLE = "DC_Selection";
   9  $qid = new PGM_Sql();
  10  
  11  if (!isset($PGM_SESSION["back"])) {
  12      $PGM_SESSION["back"] = $PGM_SESSION["REFERER_AND_QUERY"];
  13  }
  14  if (!isset($_POST["zone_id"])) {
  15      include ($CFG["dirroot"] . "header.php");
  16      $t = new Template();
  17      $t->set_file("page", "templates/zone_selection_form.ihtml");
  18      include ($CFG["localelangdir"] . "global-common.inc.php");
  19      $t->set_var("ME", $ME);
  20      $t->set_block("page", "delivery_zone_option", "delivery_zone_options");
  21      $t->set_var("delivery_zone_options", "");
  22      get_zones_names($qid);
  23      while ($qid->next_record()) {
  24          $t->set_var(array(
  25              "frm_user_zone_id"        => $qid->f("zone_id"),
  26              "frm_user_zone_selected"    => ($qid->f("zone_id") == nvl($PGM_SESSION["zone_id"], "")) ? "selected" : "",
  27              "frm_user_zone_name"        => ($qid->f("lname") != "") ? ov($qid->f("lname")) : $qid->f("name")
  28          ));
  29          $t->parse("delivery_zone_options", "delivery_zone_option", true);
  30      }
  31      $t->pparse("out", "page");
  32      include ($CFG["dirroot"] . "footer.php");
  33      pgm_session_close($PGM_SESSION, $session_name);
  34  } else {
  35      $PGM_SESSION["zone_id"] = $_POST["zone_id"];
  36      $PGM_SESSION["CART"]->calc_grandtotal();
  37      $back = $PGM_SESSION["back"];
  38      unset($PGM_SESSION["back"]);
  39      pgm_session_close($PGM_SESSION, $session_name);
  40      redirect($back);
  41      die;
  42  }
  43  
  44  ?>


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