if ($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} ";
    }
    //echo $strSQL;
    $result = ProductController::GetAllBySQL($strSQL);
    if ($result) {
        echo ProductUtil::createSearchResult($result);
    }
}
if (isset($_REQUEST["action"]) && $_REQUEST["action"] == "search4Arrange") {
    $name = $_REQUEST["name"];
    $type = $_REQUEST["type"];
    $sub_type = $_REQUEST["sub_type"];
    $pricefrom = $_REQUEST["pricefrom"];
    $priceto = $_REQUEST["priceto"];
    $promotion_id = $_REQUEST["promotion_id"];
    $present_type = $_REQUEST["present_type"];
    $strSQL = "select * from product where 1=1 ";
    if (strlen($name) > 0) {
        $strSQL .= " and Name LIKE '%{$name}%' ";
    }
    if ($type != -1) {