if ($type != -1) { $strSQL .= " and Type = {$type}"; } if ($sub_type != -1) { $strSQL .= "and Sub_Type = {$sub_type} "; } if (strlen($promotion_id) > 0) { $strSQL .= "and Promotion_ID = {$promotion_id} "; } if ($present_type != -1) { $strSQL .= "and Present_Type = {$present_type} "; } if ($pricefrom > 0) { $strSQL .= "and Price >= {$pricefrom} "; } if ($priceto > 0) { $strSQL .= "and Price <= {$priceto} "; } $strSQL .= " and delete_flag = '0'"; $strSQL .= " order by priority "; $result = ProductController::GetAllBySQL($strSQL); if ($result) { echo ProductUtil::createSearchResult4Arrange($result); } } if (isset($_REQUEST["action"]) && $_REQUEST["action"] == "arrange") { $productArr = $_REQUEST["arrProduct"]; foreach ($productArr as $key => $value) { echo ProductController::UpdatePriority($key, $value); } }