Subversion Repositories cheapmusic

Rev

Rev 70 | Rev 73 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 - 1
<?php
65 - 2
include_once ($_SERVER['DOCUMENT_ROOT'] . "/php/dnsexit.php");
3
include_once ($_SERVER['DOCUMENT_ROOT'] . "/php/sessions_db.php");
4
include_once ($_SERVER['DOCUMENT_ROOT'] . "/php/cryptor.php");
5
include_once ($_SERVER['DOCUMENT_ROOT'] . "/php/vendors.php");
6
include_once ($_SERVER['DOCUMENT_ROOT'] . "/php/tools.php");
7
include_once ($_SERVER['DOCUMENT_ROOT'] . "/php/wishlist.php");
7 - 8
 
9 - 9
error_reporting(E_ALL);
10
 
35 - 11
$userData = [];
57 - 12
$userTheme = 'default';
70 - 13
$configFile = parse_ini_file($_SERVER['DOCUMENT_ROOT'] . FCM_CONFIGFILE, true);
7 - 14
$crypt = Cryptor::getInstance($configFile['cryptor']);
15
$tmpSessionTab = (isset($_POST["sessionTab"]) && $_POST["sessionTab"] > 0 ? $_POST["sessionTab"] : null);
16
$handler = MySessionHandler::getInstance($tmpSessionTab, $configFile['mysqli']);
9 - 17
$vendors = Vendors::getInstance();
18
$vendors->setVendor($configFile['ebay'], Vendors::EBAY);
19
$vendors->setVendor($configFile['discogs'], Vendors::DISCOGS);
20 - 20
$vendors->setVendor($configFile['linkshare'], Vendors::LINKSHARE);
21
$vendors->setVendor($configFile['cjaffiliate'], Vendors::CJAFFILIATE);
22
$vendors->setVendor($configFile['walmart'], Vendors::WALMART);
54 - 23
$vendors->setVendor($configFile['itunes'], Vendors::ITUNES);
7 - 24
unset($configFile);
25
 
2 - 26
ini_set("session.cookie_httponly", 1);
27
ini_set("session.cookie_secure", 1);
7 - 28
session_set_save_handler($handler, true);
35 - 29
if (!empty($_COOKIE['PHPSESSID'])) {
30
    session_id($_COOKIE['PHPSESSID']);
31
}
2 - 32
session_start();
35 - 33
 
34
// Check whether user ID is available in cookie
65 - 35
if (!empty($_COOKIE['rememberUserId']) && !empty($_COOKIE['hash']) && empty($_SESSION['sessData']['loginType'])) {
35 - 36
    require_once 'login/includes/config.php';
37
    require_once 'login/includes/User.class.php';
38
    require_once 'login/includes/password.php';
39
    $user = new User();
40
    $conditions['where'] = array(
41
        'id' => $_COOKIE['rememberUserId']
42
    );
43
    $conditions['return_type'] = 'single';
44
    $userData = $user->getRows($conditions);
45
    if (!empty($userData) && password_verify($userData['password'] . $userData['id'], $_COOKIE['hash'])) {
65 - 46
        $_SESSION['sessData']['userLoggedIn'] = true;
35 - 47
        $_SESSION['sessData']['userID'] = $_COOKIE['rememberUserId'];
36 - 48
        $userPicture = getUserImage($userData);
57 - 49
        $userTheme = $userData['theme'];
59 - 50
        $_SESSION["currentLayout"] = ($userData['cardView'] == '1' ? 'CardView' : 'TableView');
57 - 51
        if (empty($_SESSION["manualFilter"])) {
52
            $_SESSION['buyer']['Zip'] = $userData['zip'];
53
            $_SESSION['buyer']['Country'] = 'United States';
54
            $_SESSION['buyer']['Currency'] = 'USD';
65 - 55
            $_SESSION["filterCondition"]["New"] = $userData['conditionNew'];
56
            $_SESSION["filterCondition"]["Used"] = $userData['conditionUsed'];
57
            $_SESSION["filterMediaType"]["CD"] = $userData['mediaCD'];
58
            $_SESSION["filterMediaType"]["Record"] = $userData['mediaRecord'];
59
            $_SESSION["filterMediaType"]["Digital"] = $userData['mediaDigital'];
60
            $_SESSION["filterMediaType"]["Book"] = $userData['mediaBook'];
61
        }
62
    }
63
    else {
35 - 64
        unsetSessData();
65
    }
65 - 66
    // or if the user has already logged in
67
 
68
}
69
else if (isLoggedIn()) {
35 - 70
    require_once 'login/includes/config.php';
71
    require_once 'login/includes/User.class.php';
72
    require_once 'login/includes/password.php';
73
    $user = new User();
74
    $conditions['where'] = array(
75
        'id' => $_SESSION['sessData']['userID']
76
    );
77
    $conditions['return_type'] = 'single';
78
    $userData = $user->getRows($conditions);
57 - 79
 
35 - 80
    if (!empty($userData)) {
36 - 81
        $userPicture = getUserImage($userData);
57 - 82
        $userTheme = $userData['theme'];
59 - 83
        $_SESSION["currentLayout"] = ($userData['cardView'] == '1' ? 'CardView' : 'TableView');
57 - 84
        if (empty($_SESSION["manualFilter"])) {
35 - 85
            $_SESSION['buyer']['Zip'] = $userData['zip'];
86
            $_SESSION['buyer']['Country'] = 'United States';
87
            $_SESSION['buyer']['Currency'] = 'USD';
65 - 88
            $_SESSION["filterCondition"]["New"] = $userData['conditionNew'];
89
            $_SESSION["filterCondition"]["Used"] = $userData['conditionUsed'];
90
            $_SESSION["filterMediaType"]["CD"] = $userData['mediaCD'];
91
            $_SESSION["filterMediaType"]["Record"] = $userData['mediaRecord'];
92
            $_SESSION["filterMediaType"]["Digital"] = $userData['mediaDigital'];
93
            $_SESSION["filterMediaType"]["Book"] = $userData['mediaBook'];
35 - 94
        }
65 - 95
    }
96
    else {
35 - 97
        unsetSessData();
98
    }
65 - 99
    // not logged in
100
 
101
}
102
else {
35 - 103
    unsetSessData();
104
}
57 - 105
 
2 - 106
?>
107
<!DOCTYPE html>
108
<html lang="en-US">
109
<head>
110
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
57 - 111
    <title>Find Cheap Music... CDs, Records, Digital, Books and Sheets</title>
2 - 112
    <meta name="viewport" content="width=device-width, initial-scale=1">
70 - 113
    <?php include_once ($_SERVER['DOCUMENT_ROOT'] . "/php/header.php"); ?>
66 - 114
    <link rel="stylesheet" href="/css/jquery.flexdatalist.min.css" integrity="sha384-IUkltzhO8hiEuEm0UJQvWrrtE1xqVHA0NbUeIY7a+zCokg7LqiDf5HSt69ru8a7R" crossorigin="anonymous">
115
    <script src="/js/jquery.flexdatalist.min.js" integrity="sha384-JKZ5fd3wxuyCR/AhbpbYALE2xwlYMGYu0XpsXixX7YOni1G0is+vwTuSMuGGYhnl" crossorigin="anonymous"></script>
116
    <script src="/js/input-clearer.min.js" integrity="sha384-PPIpFAWvzKO0l06o6zNV8tPFHNistosIDKHylKx5kJIM9zceSlJxAScUWQpt02xy" crossorigin="anonymous"></script>
117
    <script src="/js/paginate.min.js" integrity="sha384-sN78hrw/H8RzeS4ete92bJj3Y0lEBeiryHisgrRm/pvsPyGLf0M14Vnm+cRxVchm" crossorigin="anonymous"></script>
57 - 118
    <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
119
    <link rel="icon" href="/favicon.ico" type="image/x-icon">
2 - 120
</head>
121
<body>
122
 
123
<?php
5 - 124
initSessionVariables();
2 - 125
 
126
if ($_SERVER["REQUEST_METHOD"] == "POST") {
65 - 127
    if ($_POST["submit"] == "Search") {
35 - 128
        if (empty($_SESSION['buyer']['Zip'])) {
65 - 129
            $zip = (empty($_POST['buyerZip']) ? "" : sanitizeInput($_POST['buyerZip']));
130
            if (strlen($zip) == 5 && preg_match("/^[0-9 ]*$/", $zip)) {
57 - 131
                if ($_SESSION["buyer"]["Zip"] != $zip) {
65 - 132
                    $_SESSION["manualFilter"] = true;
133
                    $_SESSION["buyer"]["Zip"] = $zip;
134
                }
135
            }
136
            else if (strlen($zip) == 0) {
137
                $_SESSION["buyer"]["Zip"] = "";
138
            }
139
        }
2 - 140
 
46 - 141
        $_SESSION["discogsTitle"] = "";
142
        $_SESSION["discogsArtist"] = "";
65 - 143
        $searchTerm = (empty($_POST['searchTerm']) ? "" : searchFriendlyString($_POST['searchTerm']));
144
        if (empty($searchTerm)) {
145
            resetSessionVars();
146
        }
147
        else {
148
            $_SESSION["searchTerm"] = $searchTerm;
2 - 149
 
5 - 150
            if (checkSearchFilters()) {
65 - 151
                performSearch();
152
            }
153
        }
154
    }
155
    else if ($_POST["submit"] == "Save") {
156
        $_SESSION["manualFilter"] = true;
66 - 157
        if (!isset($_POST["filterCondition"])) {$_POST["filterCondition"] = []; }
158
        if (!is_array($_POST["filterCondition"])) { $_POST["filterCondition"] = [ $_POST["filterCondition"] ];}
159
        $_SESSION["filterCondition"]["New"] = in_array("New", $_POST["filterCondition"]);
160
        $_SESSION["filterCondition"]["Used"] = in_array("Used", $_POST["filterCondition"]);
161
        if (!isset($_POST["filterMediaType"])) {$_POST["filterMediaType"] = []; }
162
        if (!is_array($_POST["filterMediaType"])) { $_POST["filterMediaType"] = [ $_POST["filterMediaType"] ];}
163
        $_SESSION["filterMediaType"]["CD"] = in_array("CD", $_POST["filterMediaType"]);
164
        $_SESSION["filterMediaType"]["Record"] = in_array("Record", $_POST["filterMediaType"]);
165
        $_SESSION["filterMediaType"]["Digital"] = in_array("Digital", $_POST["filterMediaType"]);
166
        $_SESSION["filterMediaType"]["Book"] = in_array("Book", $_POST["filterMediaType"]);
2 - 167
 
46 - 168
        $_SESSION["discogsTitle"] = "";
169
        $_SESSION["discogsArtist"] = "";
65 - 170
        $searchTerm = searchFriendlyString($_POST['searchTerm']);
171
        if (empty($searchTerm)) {
172
            resetSessionVars();
173
        }
174
        else {
175
            $_SESSION["searchTerm"] = $searchTerm;
27 - 176
 
177
            if (checkSearchFilters()) {
65 - 178
                performSearch();
179
            }
180
        }
181
    }
182
    else if ($_POST["submit"] == "discogsSearch") {
50 - 183
        $searchTerm = "";
184
        if (!empty($_POST['discogsBarcode'])) {
65 - 185
            $searchTerm = searchFriendlyString($_POST['discogsBarcode']);
186
        }
187
        else {
50 - 188
            if (!empty($_POST['discogsTitle'])) {
189
                $searchTerm = $_POST['discogsTitle'];
190
            }
58 - 191
 
50 - 192
            if (!empty($_POST['discogsArtist'])) {
193
                $searchTerm .= " " . $_POST['discogsArtist'];
194
            }
58 - 195
 
50 - 196
            $searchTerm = trim($searchTerm);
197
        }
198
 
65 - 199
        if (empty($searchTerm)) {
200
            resetSessionVars();
201
        }
202
        else {
203
            $_SESSION["searchTerm"] = $searchTerm;
46 - 204
            if (isset($_POST['discogsTitle'])) {
205
                $_SESSION["discogsTitle"] = searchFriendlyString($_POST['discogsTitle']);
206
            }
207
            if (isset($_POST['discogsArtist'])) {
208
                $_SESSION["discogsArtist"] = searchFriendlyString($_POST['discogsArtist']);
209
            }
14 - 210
 
211
            if (checkSearchFilters()) {
65 - 212
                performSearch();
213
            }
214
        }
215
    }
216
    else if (in_array($_POST["submit"], $buttonArr)) {
217
        $_SESSION["currentView"] = $_POST["submit"];
218
        filterResults();
219
    }
220
}
221
else if ($_SERVER["REQUEST_METHOD"] == "GET") {
222
    if (isset($_GET['z'])) {
223
        $_SESSION["buyer"]["Zip"] = "";
224
        $zip = sanitizeInput($_GET['z']);
225
        if (strlen($zip) == 5 && preg_match("/^[0-9 ]*$/", $zip)) {
226
            $_SESSION["buyer"]["Zip"] = $zip;
227
        }
228
    }
2 - 229
 
9 - 230
    $_SESSION["searchTerm"] = "";
65 - 231
    if (isset($_GET['q'])) {
232
        $_SESSION["searchTerm"] = searchFriendlyString($_GET["q"]);
5 - 233
        if (checkSearchFilters()) {
65 - 234
            performSearch();
235
        }
236
    }
2 - 237
}
238
?>
239
 
14 - 240
    <form method="post" action="/index.php">
20 - 241
        <input type="hidden" name="sessionTab" value="<?php echo MySessionHandler::getSessionTab(); ?>">
14 - 242
       	<input type="hidden" name="searchTerm" value="<?php echo getSV("searchTerm") ?>">
65 - 243
       	<input type="hidden" name="buyerZip" value="<?php echo $_SESSION["buyer"]["Zip"]; ?>">
62 - 244
        <nav class="navbar navbar-expand-sm bg-black navbar-dark">
35 - 245
            <div class="navbar-header">
62 - 246
                <button type="submit" name="submit" value="Search" class="btn text-white">Find Cheap Music</button>
35 - 247
            </div>
14 - 248
            <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#collapsibleNavbar">
249
                <span class="navbar-toggler-icon"></span>
250
            </button>
251
            <div class="collapse navbar-collapse" id="collapsibleNavbar">
35 - 252
                <ul class="navbar-nav mr-auto">
14 - 253
                    <li class="nav-item">
47 - 254
                        <button type="submit" name="submit" value="Search" class="nav-link btn"><i class="fas fa-home"></i></button>
35 - 255
                    </li>
256
                    <?php if (isLoggedIn()) { ?>
257
                        <li class="nav-item">
258
                            <button type="submit" name="submit" value="coupons" class="nav-link btn">Coupons</button>
259
                        </li>
45 - 260
                        <li class="nav-item">
261
                            <button type="submit" name="submit" value="wishlist" class="nav-link btn">Wishlist</button>
262
                        </li>
65 - 263
                    <?php
264
} ?>
35 - 265
                    <li class="nav-item">
15 - 266
                        <button type="submit" name="submit" value="terms" class="nav-link btn">Terms of Service</button>
14 - 267
                    </li>
268
                    <li class="nav-item">
15 - 269
                        <button type="submit" name="submit" value="privacy" class="nav-link btn">Privacy Policy</button>
14 - 270
                    </li>
57 - 271
                    <li class="nav-item">
272
                        <button type="submit" name="submit" value="help" class="nav-link btn"><i class="far fa-question-circle"></i></button>
273
                    </li>
14 - 274
                </ul>
35 - 275
                <ul class="navbar-nav">
276
                    <?php if (!isLoggedIn()) { ?>
277
                    <li class="nav-item">
47 - 278
                        <a href="/login/index.php" class="nav-link btn"><i class='fas fa-sign-in-alt'></i> Login</a>
35 - 279
                    </li>
65 - 280
                    <?php
281
}
282
else { ?>
36 - 283
                        <li class="nav-item">
47 - 284
                            <img class="img-fluid hide-extra-small hide-small user-img" src="<?php echo $userPicture ?>" alt="User Image">
36 - 285
                        </li>
35 - 286
                        <li class="nav-item dropdown">
47 - 287
                          <a class="nav-link dropdown-toggle" href="#" id="navbardrop" data-toggle="dropdown"><i class="fas fa-user-cog"></i> Account</a>
35 - 288
                          <div class="dropdown-menu dropdown-menu-right">
47 - 289
                              <button formaction="/login/account.php" type="submit" name="submit" value="account" class="dropdown-item btn"><i class="fas fa-info-circle"></i> Information</button>
290
                              <button formaction="/login/editAccount.php" type="submit" name="submit" value="editAccount" class="dropdown-item btn"><i class="fas fa-edit"></i> Edit Account</button>
36 - 291
                              <?php if (empty($_SESSION['sessData']['loginType']) || $_SESSION['sessData']['loginType'] != 'social') { ?>
47 - 292
                                  <button formaction="/login/changePassword.php" type="submit" name="submit" value="changePassword" class="dropdown-item btn"><i class="fas fa-key"></i> Change Password</button>
65 - 293
                              <?php
294
    } ?>
47 - 295
                              <button formaction="/login/userAccount.php?logoutSubmit=1" type="submit" name="submit" value="logout" class="dropdown-item btn"><i class='fas fa-sign-out-alt'></i> Logout</button>
35 - 296
                          </div>
297
                        </li>
65 - 298
                    <?php
299
} ?>
35 - 300
                </ul>
14 - 301
            </div>
302
        </nav>
303
    </form>
2 - 304
 
3 - 305
    <div class="page-header bg-primary">
306
        <div class="container text-center py-3">
14 - 307
        <?php
65 - 308
if (getPGV('submit') == "terms") {
309
    echo file_get_contents('snippets/headerTerms.txt');
310
}
311
else if (getPGV('submit') == "privacy") {
312
    echo file_get_contents('snippets/headerPrivacy.txt');
313
}
314
else if (getPGV('submit') == "coupons") {
315
    echo file_get_contents('snippets/headerCoupons.txt');
316
}
317
else if (getPGV('submit') == "wishlist") {
318
    echo file_get_contents('snippets/headerWishlist.txt');
319
}
320
else if (getPGV('submit') == "help") {
321
    echo file_get_contents('snippets/headerHelp.txt');
322
}
323
else {
324
    echo '<p id="textslide" class="d-none d-sm-block">FindCheapMusic.com</p>';
325
}
326
?>
2 - 327
        </div>
328
    </div>
329
 
3 - 330
	<div class="container-fluid bg-primary py-3">
5 - 331
        <?php
65 - 332
if (!in_array(getPGV('submit') , array(
333
    "terms",
334
    "privacy",
335
    "coupons",
336
    "wishlist",
337
    "help"
338
))) {
339
    echo $_SESSION["filterWarnings"];
340
}
341
?>
342
        <form <?php if (in_array(getPGV('submit') , array(
343
    "terms",
344
    "privacy",
345
    "coupons",
346
    "wishlist",
347
    "help"
348
))) {
349
    echo "hidden";
350
} ?> method="post" action="/index.php" class="form-inline"
58 - 351
            onsubmit="if (document.getElementById('searchTerm').value != '') { progressBar('Searching for:<br><br><strong>' + document.getElementById('searchTerm').value.toLowerCase().replace(/(?:(^.{1})|\ [a-z]{1})/g, function(a){return a.toUpperCase();}) + '</strong>');document.getElementById('searchBtn').innerHTML = '&lt;span class=\'spinner-border spinner-border-sm\'&gt;&lt;/span&gt; Searching, please wait...'; }">
15 - 352
            <input id="sessionId" type="hidden" name="sessionId" value="<?php echo session_id(); ?>">
20 - 353
            <input id="sessionTab" type="hidden" name="sessionTab" value="<?php echo MySessionHandler::getSessionTab(); ?>">
17 - 354
        	<div class="form-group">
355
                <div class="btn-group">
47 - 356
                    <button class="btn input-group-text mx-1 rounded" type="button" data-toggle="modal" data-target="#searchInfoModal" data-toggle2="tooltip" title="Search Tips"><i class="fas fa-info-circle btn-search"></i></button>
357
                    <button class="btn input-group-text mx-1 rounded" type="button" data-toggle="modal" data-target="#filterModal" data-keyboard="false" data-toggle2="tooltip" title="Search Filter"><i class="fas fa-filter btn-search"></i></button>
17 - 358
                    <div class="btn-group">
62 - 359
                        <button class="btn dropdown-toggle <?php echo ($_SESSION["buyer"]["Zip"] == '' ? "btn-warning" : "input-group-text"); ?> mx-1 rounded" type="button" data-toggle="dropdown" data-toggle2="tooltip" title="<?php echo ($_SESSION["buyer"]["Zip"] == '' ? "Please enter your postal code to get the accurate shipping cost for items listed using a shipping rate table." : "Shipping to"); ?>"><i class="fas fa-shipping-fast btn-search"></i></button>
17 - 360
                        <div class="dropdown-menu">
361
                            <div class="form-inline">
362
                                <label class="m-2">Shipping to:</label>
363
                                <input type="text" class="form-control form-control-sm m-2" maxlength="20" style="width:12em!important" id="buyerCountry" name="buyerCountry" value="United States" readonly>
364
                                <input type="text" class="form-control form-control-sm m-2" maxlength="3" style="width:3.5em!important" id="buyerCurrency" name="buyerCurrency" value="USD" readonly>
65 - 365
                                <input type="text" class="form-control form-control-sm m-2" maxlength="5" style="width:5.5em!important" id="buyerZip" name="buyerZip" placeholder="Zip Code" value="<?php echo $_SESSION["buyer"]["Zip"]; ?>">
17 - 366
                            </div>
367
                        </div>
368
                    </div>
2 - 369
                </div>
370
        	</div>
20 - 371
        	<div class="form-group mx-1">
372
        	    <input id="searchTerm" list="searchHistory" name="searchTerm" type="text" class="form-control flexdatalist searchTerm-width" placeholder="Search by Barcode, Artist, Title, ..." value="<?php echo getSV("searchTerm") ?>">
17 - 373
        	    <datalist id="searchHistory">
374
            	    <?php echo getSearchHistory(); ?>
375
            	</datalist>
376
            </div>
377
        	<div class="form-group">
378
                <button id="searchBtn" type="submit" class="btn btn-success mx-1 rounded" name="submit" value="Search">Go</button>
379
            </div>
2 - 380
        </form>
381
    </div>
382
 
5 - 383
    <?php
65 - 384
if (getPGV('submit') == "terms") {
385
    echo file_get_contents('snippets/terms.txt');
386
}
387
else if (getPGV('submit') == "privacy") {
388
    echo file_get_contents('snippets/privacy.txt');
389
}
390
else if (getPGV('submit') == "help") {
391
    echo file_get_contents('snippets/help.txt');
392
}
393
else if (getPGV('submit') == "coupons") {
394
    //get_linkshareCoupons(); // bugbug
395
    echo getCouponCodes();
396
}
397
else if (getPGV('submit') == "wishlist") {
398
    echo getWishlist();
399
}
400
else if (getPGV('submit') == "random") {
401
    findDiscogsMaster("***RANDOM***");
402
    echo $_SESSION["discogs"];
403
}
404
else {
405
    if ($_SESSION["lowestPrice"]["All"] > 0.00 || !empty($_SESSION["searchTerm"])) {
38 - 406
        echo $_SESSION["discogs"];
68 - 407
        echo "<div id=\"productTable\" class=\"container bg-secondary border pt-2\">";
65 - 408
        echo printResultHeader();
409
        echo printResult();
410
        echo "</div>";
411
    }
412
    else if (!empty($_SESSION["discogs"])) {
413
        echo $_SESSION["discogs"];
414
    }
415
    else {
416
?>
38 - 417
    <div class="container-fluid text-center">
418
    <form method="post" action="/index.php">
419
        <input type="hidden" name="sessionTab" value="<?php echo MySessionHandler::getSessionTab(); ?>">
420
       	<input type="hidden" name="searchTerm" value="<?php echo getSV("searchTerm") ?>">
65 - 421
       	<input type="hidden" name="buyerZip" value="<?php echo $_SESSION["buyer"]["Zip"]; ?>">
43 - 422
        <button id="randomBtn" type="submit" class="btn btn-success mt-5 rounded" name="submit" value="random">Random Album Suggestions</button>
38 - 423
    </form>
424
    </div>
65 - 425
        <?php
14 - 426
    }
65 - 427
    echo printSearchFilterModal();
428
    echo printSearchInfoModal();
429
}
430
?>
2 - 431
 
14 - 432
    <div class="modal" id="progressBarDiv">
17 - 433
        <div class="modal-dialog modal-dialog-centered">
14 - 434
            <div class="modal-content">
435
                <div class="modal-header">
15 - 436
                    <h4 id="progressBarHeader">Searching</h4>
14 - 437
                </div>
438
                <div class="modal-body">
439
                    <div class="progress">
440
                        <div id="progressBar" class="progress-bar" style="width:0%">0%</div>
441
                    </div>
442
                </div>
15 - 443
                <div class="modal-footer">
444
                    <span id="progressBarMessage"></span>
445
                </div>
14 - 446
            </div>
447
        </div>
448
    </div>
449
 
64 - 450
    <footer class="container-fluid text-center bg-primary py-5">
20 - 451
        <?php if (!empty($_SESSION["searchTerm"])) {
65 - 452
    echo "<p>Disclaimer: As an Associate we earn from qualifying purchases.</p>";
453
}
454
?>
20 - 455
        <form method="post" action="/index.php">
456
            <input type="hidden" name="sessionTab" value="<?php echo MySessionHandler::getSessionTab(); ?>">
457
       	    <input type="hidden" name="searchTerm" value="<?php echo getSV("searchTerm") ?>">
65 - 458
           	<input type="hidden" name="buyerZip" value="<?php echo $_SESSION["buyer"]["Zip"]; ?>">
20 - 459
            <ul class="list-inline text-center">
460
                <li class="list-inline-item">
62 - 461
                    <button class="btn btn-sm btn-light" type="submit" name="submit" value="terms">Terms of Service</button>
20 - 462
                </li>
463
                <li class="list-inline-item">
62 - 464
                    <button class="btn btn-sm btn-light" type="submit" name="submit" value="privacy">Privacy Policy</button>
20 - 465
                </li>
466
            </ul>
467
        </form>
17 - 468
        <p>Copyright &#169; <?php echo @date("Y"); ?> FindCheapMusic.com. All rights reserved.</p>
2 - 469
    </footer>
470
 
72 - 471
    <!--script src="js/dr.min.js" defer integrity="sha384-jZ9/EbSWYJ9DZDKRjQIARY++g+ogOpTx1ulGSiHQdP72AjYtXAy3M8b1RxTqMZlC" crossorigin="anonymous"></script-->
472
    <script src="js/dr.js" defer></script-->
36 - 473
    <script>var quotes = [
38 - 474
    <?php
65 - 475
if ($file = fopen("snippets/header.txt", "r")) {
476
    while (($line = fgets($file)) !== false) {
477
        echo "\"" . trim($line) . "\",";
478
    }
479
    fclose($file);
480
}
481
?>
68 - 482
    ]; setInterval(function() { $("#textslide").html(quotes[Math.floor(Math.random() * (quotes.length + 1))]); }, 5 * 1000);</script>
2 - 483
</body>
484
</html>
21 - 485
<?php MySessionHandler::commit(session_id()); ?>