$ops = $commentTemplate->get_assoc_array("commentTemplateID", "commentTemplateName", "", array("commentTemplateType" => "productSale")); $TPL["commentTemplateOptions"] = "<option value=\"\">Comment Templates</option>" . page::select_options($ops); include_template("../comment/templates/commentM.tpl"); } } $productID = $_GET["productID"] or $productID = $_POST["productID"]; $productSaleID = $_GET["productSaleID"] or $productSaleID = $_POST["productSaleID"]; $projectID = $_GET["projectID"] or $projectID = $_POST["projectID"]; $clientID = $_GET["clientID"] or $clientID = $_POST["clientID"]; $TPL["projectID"] = $projectID; $productSale = new productSale(); $productSale->read_globals(); if ($productSaleID) { $productSale->set_id($productSaleID); $productSale->select(); $productSale->set_values(); $clientID = $productSale->get_value("clientID"); $projectID = $productSale->get_value("projectID"); $productSaleID = $productSale->get_id(); } else { $TPL["status"] = "create"; } $db = new db_alloc(); $tf = new tf(); $tflist = $tf->get_assoc_array("tfID", "tfName"); if ($_POST["move_forwards"]) { $productSale->move_forwards(); $_POST["save"] = true; } else { if ($_POST["move_backwards"]) { $productSale->move_backwards();