Subversion Repositories cheapmusic

Rev

Rev 70 | Rev 77 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 70 Rev 72
Line 73... Line 73...
73
    $_SESSION["lowestPrice"]["Book"] = 0.00;
73
    $_SESSION["lowestPrice"]["Book"] = 0.00;
74
    $_SESSION["lowestPrice"]["All"] = 0.00;
74
    $_SESSION["lowestPrice"]["All"] = 0.00;
75
}
75
}
76
 
76
 
77
// search for items on all sites
77
// search for items on all sites
78
function searchAll($searchKey) {
78
function searchAll($searchKey, $batchFlag = false) {
79
    $arr = [];
79
    $arr = [];
80
    if ($_SESSION["filterCondition"]["New"]) {
80
    if ($_SESSION["filterCondition"]["New"]) {
81
        $arr = get_vendor($arr, 'get_ebay', $searchKey, constant("NEW"));
81
        $arr = get_vendor($arr, 'get_ebay', $searchKey, constant("NEW"));
82
    }
82
    }
83
    updatePbFile();
83
    if (!$batchFlag) { updatePbFile(); }
84
    if ($_SESSION["filterCondition"]["New"]) {
84
    if ($_SESSION["filterCondition"]["New"]) {
85
        $arr = get_vendor($arr, 'get_linkshare', $searchKey, constant("NEW"));
85
        $arr = get_vendor($arr, 'get_linkshare', $searchKey, constant("NEW"));
86
    }
86
    }
87
    updatePbFile();
87
    if (!$batchFlag) { updatePbFile(); }
88
    if ($_SESSION["filterCondition"]["New"]) {
88
    if ($_SESSION["filterCondition"]["New"]) {
89
        $arr = get_vendor($arr, 'get_cjaffiliate', $searchKey, constant("NEW"));
89
        $arr = get_vendor($arr, 'get_cjaffiliate', $searchKey, constant("NEW"));
90
    }
90
    }
91
    updatePbFile();
91
    if (!$batchFlag) { updatePbFile(); }
92
    if ($_SESSION["filterCondition"]["New"]) {
92
    if ($_SESSION["filterCondition"]["New"]) {
93
        $arr = get_vendor($arr, 'get_walmart', $searchKey, constant("NEW"));
93
        $arr = get_vendor($arr, 'get_walmart', $searchKey, constant("NEW"));
94
    }
94
    }
95
    updatePbFile();
95
    if (!$batchFlag) { updatePbFile(); }
96
    if ($_SESSION["filterCondition"]["New"]) {
96
    if ($_SESSION["filterCondition"]["New"]) {
97
        $arr = get_vendor($arr, 'get_itunes', $searchKey, constant("NEW"));
97
        $arr = get_vendor($arr, 'get_itunes', $searchKey, constant("NEW"));
98
    }
98
    }
99
    updatePbFile();
99
    if (!$batchFlag) { updatePbFile(); }
100
 
100
 
101
    if ($_SESSION["filterCondition"]["Used"]) {
101
    if ($_SESSION["filterCondition"]["Used"]) {
102
        $arr = get_vendor($arr, 'get_ebay', $searchKey, constant("USED"));
102
        $arr = get_vendor($arr, 'get_ebay', $searchKey, constant("USED"));
103
    }
103
    }
104
    updatePbFile();
104
    if (!$batchFlag) { updatePbFile(); }
105
 
105
 
106
//echo "<pre>";print_r($arr);echo "</pre";
106
//echo "<pre>";print_r($arr);echo "</pre";
107
 
107
 
108
    $arr = applyExchangeRates($arr);
108
    $arr = applyExchangeRates($arr);
109
    usort($arr, 'compare_price');
109
    usort($arr, 'compare_price');
110
    updatePbFile();
110
    if (!$batchFlag) { updatePbFile(); }
111
 
111
 
112
    return $arr;
112
    return $arr;
113
}
113
}
114
 
114
 
115
// Search and merge
115
// Search and merge
Line 394... Line 394...
394
            }
394
            }
395
 
395
 
396
            $str .= "<tr>";
396
            $str .= "<tr>";
397
 
397
 
398
            // Image
398
            // Image
399
            $str .= "<td><a " . $href . " data-toggle=\"tooltip\" title=\"Buy It Now\"><img class=\"responsive-image tn-image\" src=\"" . $row["Image"] . "\" alt=\"Item Image\"></a></td>";
399
            $str .= "<td><a " . $href . " data-toggle=\"tooltip\" title=\"Buy It Now\"><img class=\"responsive-image\" src=\"" . $row["Image"] . "\" alt=\"Item Image\"></a></td>";
400
 
400
 
401
            // Title / Merchant
401
            // Title / Merchant
402
            $str .= "<td class=\"text-left\"><span class=\"font-weight-bold\"><a class=\"bg-info\" " . $href . " data-toggle=\"tooltip\" title=\"Buy It Now\">" . $title . "</a></span>";
402
            $str .= "<td class=\"text-left\"><span class=\"font-weight-bold\"><a class=\"bg-info\" " . $href . " data-toggle=\"tooltip\" title=\"Buy It Now\">" . $title . "</a></span>";
403
            $str .= "<br/><br/>";
403
            $str .= "<br/><br/>";
404
            $str .= "<span class=\"font-weight-bold\">" . $row["Merchant"] . "</span>";
404
            $str .= "<span class=\"font-weight-bold\">" . $row["Merchant"] . "</span>";