Subversion Repositories cheapmusic

Rev

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

Rev Author Line No. Line
2 - 1
<?php
25 - 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");
35 - 6
include_once($_SERVER['DOCUMENT_ROOT'] . "/php/tools.php");
45 - 7
include_once($_SERVER['DOCUMENT_ROOT'] . "/php/wishlist.php");
7 - 8
 
9 - 9
error_reporting(E_ALL);
10
 
35 - 11
$userData = [];
25 - 12
$configFile = parse_ini_file($_SERVER['DOCUMENT_ROOT'] . "/../MyFiles/config/cheapmusic.ini", true);
7 - 13
$crypt = Cryptor::getInstance($configFile['cryptor']);
14
$tmpSessionTab = (isset($_POST["sessionTab"]) && $_POST["sessionTab"] > 0 ? $_POST["sessionTab"] : null);
15
$handler = MySessionHandler::getInstance($tmpSessionTab, $configFile['mysqli']);
9 - 16
$vendors = Vendors::getInstance();
17
$vendors->setVendor($configFile['ebay'], Vendors::EBAY);
18
$vendors->setVendor($configFile['discogs'], Vendors::DISCOGS);
20 - 19
$vendors->setVendor($configFile['linkshare'], Vendors::LINKSHARE);
20
$vendors->setVendor($configFile['cjaffiliate'], Vendors::CJAFFILIATE);
21
$vendors->setVendor($configFile['walmart'], Vendors::WALMART);
54 - 22
$vendors->setVendor($configFile['itunes'], Vendors::ITUNES);
7 - 23
unset($configFile);
24
 
2 - 25
ini_set("session.cookie_httponly", 1);
26
ini_set("session.cookie_secure", 1);
7 - 27
session_set_save_handler($handler, true);
35 - 28
if (!empty($_COOKIE['PHPSESSID'])) {
29
    session_id($_COOKIE['PHPSESSID']);
30
}
2 - 31
session_start();
35 - 32
 
33
// Check whether user ID is available in cookie
34
if(!empty($_COOKIE['rememberUserId']) && !empty($_COOKIE['hash'])){
35
    require_once 'login/includes/config.php';
36
    require_once 'login/includes/User.class.php';
37
    require_once 'login/includes/password.php';
38
    $user = new User();
39
    $conditions['where'] = array(
40
        'id' => $_COOKIE['rememberUserId']
41
    );
42
    $conditions['return_type'] = 'single';
43
    $userData = $user->getRows($conditions);
44
    if (!empty($userData) && password_verify($userData['password'] . $userData['id'], $_COOKIE['hash'])) {
45
        $_SESSION['sessData']['userLoggedIn'] = TRUE;
46
        $_SESSION['sessData']['userID'] = $_COOKIE['rememberUserId'];
47
        $_SESSION['buyer']['Zip'] = $userData['zip'];
48
        $_SESSION['buyer']['Country'] = 'United States';
49
        $_SESSION['buyer']['Currency'] = 'USD';
36 - 50
        $userPicture = getUserImage($userData);
35 - 51
    } else {
52
        unsetSessData();
53
    }
54
// or if the user has already logged in
55
} else if (isLoggedIn()) {
56
    require_once 'login/includes/config.php';
57
    require_once 'login/includes/User.class.php';
58
    require_once 'login/includes/password.php';
59
    $user = new User();
60
    $conditions['where'] = array(
61
        'id' => $_SESSION['sessData']['userID']
62
    );
63
    $conditions['return_type'] = 'single';
64
    $userData = $user->getRows($conditions);
65
    if (!empty($userData)) {
36 - 66
        $userPicture = getUserImage($userData);
35 - 67
        if (!empty($userData['zip'])) {
68
            $_SESSION['buyer']['Zip'] = $userData['zip'];
69
            $_SESSION['buyer']['Country'] = 'United States';
70
            $_SESSION['buyer']['Currency'] = 'USD';
71
        }
72
    } else {
73
        unsetSessData();
74
    }
75
// not logged in
76
} else {
77
    unsetSessData();
78
}
2 - 79
?>
80
<!DOCTYPE html>
81
<html lang="en-US">
82
<head>
83
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
84
    <title>Find Cheap Music...</title>
85
    <meta name="viewport" content="width=device-width, initial-scale=1">
86
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
87
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.0/jquery.min.js" integrity="sha384-JUMjoW8OzDJw4oFpWIB2Bu/c6768ObEthBMVSiIx4ruBIEdyNSUQAjJNFqT5pnJ6" crossorigin="anonymous"></script>
88
    <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
89
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
52 - 90
    <link rel="stylesheet" href="css/style.min.css" integrity="sha384-8kQBxarEDTL1l8Bxq9nf0Lni+WjQ/ytPWzoHmWHvnRFmsFyU4VzbbAugNRA0XzsF" crossorigin="anonymous">
3 - 91
    <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.1/css/all.css" integrity="sha384-50oBUHEmvpQ+1lW4y57PTFmhCaXp0ML5d60M1M7uH2+nqUivzIebhndOJK28anvf" crossorigin="anonymous">
17 - 92
    <link rel="stylesheet" href="css/jquery.flexdatalist.min.css" integrity="sha384-IUkltzhO8hiEuEm0UJQvWrrtE1xqVHA0NbUeIY7a+zCokg7LqiDf5HSt69ru8a7R" crossorigin="anonymous">
93
    <script src="js/jquery.flexdatalist.min.js" integrity="sha384-JKZ5fd3wxuyCR/AhbpbYALE2xwlYMGYu0XpsXixX7YOni1G0is+vwTuSMuGGYhnl" crossorigin="anonymous"></script>
20 - 94
    <script src="js/input-clearer.min.js" integrity="sha384-PPIpFAWvzKO0l06o6zNV8tPFHNistosIDKHylKx5kJIM9zceSlJxAScUWQpt02xy" crossorigin="anonymous"></script>
43 - 95
    <script src="js/paginate.min.js" integrity="sha384-sN78hrw/H8RzeS4ete92bJj3Y0lEBeiryHisgrRm/pvsPyGLf0M14Vnm+cRxVchm" crossorigin="anonymous"></script>
35 - 96
    <link href="https://fonts.googleapis.com/css?family=Roboto+Slab:100,300,400,700Roboto:100,100i,300,300i,400,400i,500,500i,700,700i,900,900iSlabo+27px&subset=cyrillic,cyrillic-ext,greek,greek-ext,latin-ext,vietnamese" rel="stylesheet">
2 - 97
</head>
98
<body>
99
 
100
<?php
101
 
5 - 102
initSessionVariables();
2 - 103
 
104
if ($_SERVER["REQUEST_METHOD"] == "POST") {
5 - 105
	if ($_POST["submit"] == "Search") {
35 - 106
        if (empty($_SESSION['buyer']['Zip'])) {
107
    		$zip = (empty($_POST['buyerZip']) ? "" : sanitizeInput($_POST['buyerZip']));
108
        	if (strlen($zip) == 5 && preg_match("/^[0-9 ]*$/", $zip)) {
109
	        	$_SESSION["buyer"]["Zip"] = $zip;
110
   		    } else if (strlen($zip) == 0) {
111
        		$_SESSION["buyer"]["Zip"] = "";
112
	        }
113
	    }
2 - 114
 
46 - 115
        $_SESSION["discogsTitle"] = "";
116
        $_SESSION["discogsArtist"] = "";
35 - 117
		$searchTerm = (empty($_POST['searchTerm']) ? "" : searchFriendlyString($_POST['searchTerm']));
9 - 118
		if (empty($searchTerm)) {
119
			resetSessionVars();
5 - 120
		} else {
9 - 121
			$_SESSION["searchTerm"] = $searchTerm;
2 - 122
 
5 - 123
            if (checkSearchFilters()) {
124
    			performSearch();
125
    		}
126
		}
127
	} else if ($_POST["submit"] == "Save") {
128
		$_SESSION["filterCondition"]["New"] = checkPV("filterConditionNew");
129
		$_SESSION["filterCondition"]["Used"] = checkPV("filterConditionUsed");
130
		$_SESSION["filterMediaType"]["CD"] = checkPV("filterMediaTypeCD");
131
		$_SESSION["filterMediaType"]["Record"] = checkPV("filterMediaTypeRecord");
132
		$_SESSION["filterMediaType"]["Digital"] = checkPV("filterMediaTypeDigital");
20 - 133
		$_SESSION["filterMediaType"]["Book"] = checkPV("filterMediaTypeBook");
2 - 134
 
46 - 135
        $_SESSION["discogsTitle"] = "";
136
        $_SESSION["discogsArtist"] = "";
27 - 137
		$searchTerm = searchFriendlyString($_POST['searchTerm']);
138
		if (empty($searchTerm)) {
139
			resetSessionVars();
140
		} else {
141
			$_SESSION["searchTerm"] = $searchTerm;
142
 
143
            if (checkSearchFilters()) {
144
    			performSearch();
145
    		}
5 - 146
		}
14 - 147
	} else if ($_POST["submit"] == "discogsSearch") {
50 - 148
        $searchTerm = "";
149
        if (!empty($_POST['discogsBarcode'])) {
150
    		$searchTerm = searchFriendlyString($_POST['discogsBarcode']);
151
        } else {
152
            if (!empty($_POST['discogsTitle'])) {
153
                $searchTerm = $_POST['discogsTitle'];
154
            }
155
 
156
            if (!empty($_POST['discogsArtist'])) {
157
                $searchTerm .= " " . $_POST['discogsArtist'];
158
            }
159
 
160
            $searchTerm = trim($searchTerm);
161
        }
162
 
14 - 163
		if (empty($searchTerm)) {
164
			resetSessionVars();
165
		} else {
166
			$_SESSION["searchTerm"] = $searchTerm;
46 - 167
            if (isset($_POST['discogsTitle'])) {
168
                $_SESSION["discogsTitle"] = searchFriendlyString($_POST['discogsTitle']);
169
            }
170
            if (isset($_POST['discogsArtist'])) {
171
                $_SESSION["discogsArtist"] = searchFriendlyString($_POST['discogsArtist']);
172
            }
14 - 173
 
174
            if (checkSearchFilters()) {
175
    			performSearch();
176
    		}
177
		}
5 - 178
	} else if (in_array($_POST["submit"], $buttonArr)) {
179
		$_SESSION["currentView"] = $_POST["submit"];
180
		filterResults();
181
	}
182
} else if ($_SERVER["REQUEST_METHOD"] == "GET") {
183
	if (isset($_GET['z'])) {
9 - 184
    	$_SESSION["buyer"]["Zip"] = "";
5 - 185
		$zip = sanitizeInput($_GET['z']);
186
		if (strlen($zip) == 5 && preg_match("/^[0-9 ]*$/", $zip)) {
187
			$_SESSION["buyer"]["Zip"] = $zip;
188
		}
189
	}
2 - 190
 
9 - 191
    $_SESSION["searchTerm"] = "";
5 - 192
	if (isset($_GET['q'])) {
14 - 193
		$_SESSION["searchTerm"] = searchFriendlyString($_GET["q"]);
5 - 194
        if (checkSearchFilters()) {
195
    		performSearch();
196
    	}
197
	}
2 - 198
}
199
?>
200
 
14 - 201
    <form method="post" action="/index.php">
20 - 202
        <input type="hidden" name="sessionTab" value="<?php echo MySessionHandler::getSessionTab(); ?>">
14 - 203
       	<input type="hidden" name="searchTerm" value="<?php echo getSV("searchTerm") ?>">
204
       	<input type="hidden" name="buyerZip" value="<?php echo $_SESSION["buyer"]["Zip"];?>">
205
        <nav class="navbar navbar-expand-sm bg-dark navbar-dark">
35 - 206
            <div class="navbar-header">
43 - 207
                <span class="navbar-brand"><button type="submit" name="submit" value="Search" class="nav-link btn text-white">Find Cheap Music</button></span>
35 - 208
            </div>
14 - 209
            <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#collapsibleNavbar">
210
                <span class="navbar-toggler-icon"></span>
211
            </button>
212
            <div class="collapse navbar-collapse" id="collapsibleNavbar">
35 - 213
                <ul class="navbar-nav mr-auto">
14 - 214
                    <li class="nav-item">
47 - 215
                        <button type="submit" name="submit" value="Search" class="nav-link btn"><i class="fas fa-home"></i></button>
35 - 216
                    </li>
217
                    <?php if (isLoggedIn()) { ?>
218
                        <li class="nav-item">
219
                            <button type="submit" name="submit" value="coupons" class="nav-link btn">Coupons</button>
220
                        </li>
45 - 221
                        <li class="nav-item">
222
                            <button type="submit" name="submit" value="wishlist" class="nav-link btn">Wishlist</button>
223
                        </li>
35 - 224
                    <?php } ?>
225
                    <li class="nav-item">
15 - 226
                        <button type="submit" name="submit" value="terms" class="nav-link btn">Terms of Service</button>
14 - 227
                    </li>
228
                    <li class="nav-item">
15 - 229
                        <button type="submit" name="submit" value="privacy" class="nav-link btn">Privacy Policy</button>
14 - 230
                    </li>
231
                </ul>
35 - 232
                <ul class="navbar-nav">
233
                    <?php if (!isLoggedIn()) { ?>
234
                    <li class="nav-item">
47 - 235
                        <a href="/login/index.php" class="nav-link btn"><i class='fas fa-sign-in-alt'></i> Login</a>
35 - 236
                    </li>
237
                    <?php } else { ?>
36 - 238
                        <li class="nav-item">
47 - 239
                            <img class="img-fluid hide-extra-small hide-small user-img" src="<?php echo $userPicture ?>" alt="User Image">
36 - 240
                        </li>
35 - 241
                        <li class="nav-item dropdown">
47 - 242
                          <a class="nav-link dropdown-toggle" href="#" id="navbardrop" data-toggle="dropdown"><i class="fas fa-user-cog"></i> Account</a>
35 - 243
                          <div class="dropdown-menu dropdown-menu-right">
47 - 244
                              <button formaction="/login/account.php" type="submit" name="submit" value="account" class="dropdown-item btn"><i class="fas fa-info-circle"></i> Information</button>
245
                              <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 - 246
                              <?php if (empty($_SESSION['sessData']['loginType']) || $_SESSION['sessData']['loginType'] != 'social') { ?>
47 - 247
                                  <button formaction="/login/changePassword.php" type="submit" name="submit" value="changePassword" class="dropdown-item btn"><i class="fas fa-key"></i> Change Password</button>
36 - 248
                              <?php } ?>
47 - 249
                              <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 - 250
                          </div>
251
                        </li>
252
                    <?php } ?>
253
                </ul>
14 - 254
            </div>
255
        </nav>
256
    </form>
2 - 257
 
3 - 258
    <div class="page-header bg-primary">
259
        <div class="container text-center py-3">
14 - 260
        <?php
20 - 261
            if (getPGV('submit') == "terms") {
14 - 262
                echo file_get_contents('snippets/headerTerms.txt');
20 - 263
            } else if (getPGV('submit') == "privacy") {
14 - 264
                echo file_get_contents('snippets/headerPrivacy.txt');
46 - 265
            } else if (getPGV('submit') == "coupons") {
266
                echo file_get_contents('snippets/headerCoupons.txt');
267
            } else if (getPGV('submit') == "wishlist") {
268
                echo file_get_contents('snippets/headerWishlist.txt');
14 - 269
            } else {
36 - 270
                echo '<p id="textslide" class="d-none d-sm-block">FindCheapMusic.com</p>';
14 - 271
            }
272
        ?>
2 - 273
        </div>
274
    </div>
275
 
3 - 276
	<div class="container-fluid bg-primary py-3">
5 - 277
        <?php
46 - 278
        if (!in_array(getPGV('submit'), array("terms", "privacy", "coupons", "wishlist"))) {
5 - 279
            echo $_SESSION["filterWarnings"];
14 - 280
        }
5 - 281
        ?>
46 - 282
        <form <?php if (in_array(getPGV('submit'), array("terms", "privacy", "coupons", "wishlist"))) {echo "hidden";} ?> method="post" action="/index.php" class="form-inline"
52 - 283
            onsubmit="if (document.getElementById('searchTerm').value != '') { progressBar('Searching for:<br><br><strong>' + document.getElementById('searchTerm').value + '</strong>');document.getElementById('searchBtn').innerHTML = '&lt;span class=\'spinner-border spinner-border-sm\'&gt;&lt;/span&gt; Searching, please wait...'; }">
15 - 284
            <input id="sessionId" type="hidden" name="sessionId" value="<?php echo session_id(); ?>">
20 - 285
            <input id="sessionTab" type="hidden" name="sessionTab" value="<?php echo MySessionHandler::getSessionTab(); ?>">
17 - 286
        	<div class="form-group">
287
                <div class="btn-group">
47 - 288
                    <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>
289
                    <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 - 290
                    <div class="btn-group">
47 - 291
                        <button class="btn dropdown-toggle <?php echo ($_SESSION["buyer"]["Zip"] == '' ? "bg-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 - 292
                        <div class="dropdown-menu">
293
                            <div class="form-inline">
294
                                <label class="m-2">Shipping to:</label>
295
                                <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>
296
                                <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>
297
                                <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"];?>">
298
                            </div>
299
                        </div>
300
                    </div>
2 - 301
                </div>
302
        	</div>
20 - 303
        	<div class="form-group mx-1">
304
        	    <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 - 305
        	    <datalist id="searchHistory">
306
            	    <?php echo getSearchHistory(); ?>
307
            	</datalist>
308
            </div>
309
        	<div class="form-group">
310
                <button id="searchBtn" type="submit" class="btn btn-success mx-1 rounded" name="submit" value="Search">Go</button>
311
            </div>
2 - 312
        </form>
313
    </div>
314
 
5 - 315
    <?php
20 - 316
    if (getPGV('submit') == "terms") {
14 - 317
        echo file_get_contents('snippets/terms.txt');
20 - 318
    } else if (getPGV('submit') == "privacy") {
14 - 319
        echo file_get_contents('snippets/privacy.txt');
35 - 320
    } else if (getPGV('submit') == "coupons") {
41 - 321
        //get_linkshareCoupons(); // bugbug
322
        echo getCouponCodes();
46 - 323
    } else if (getPGV('submit') == "wishlist") {
324
        echo getWishlist();
38 - 325
    } else if (getPGV('submit') == "random") {
326
        findDiscogsMaster("***RANDOM***");
327
        echo $_SESSION["discogs"];
14 - 328
    } else {
9 - 329
        if ($_SESSION["lowestPrice"]["All"] > 0.00 || !empty($_SESSION["searchTerm"])) {
12 - 330
            echo $_SESSION["discogs"];
11 - 331
	        echo "<div id=\"productTable\">";
9 - 332
            echo printTableHeader();
333
            echo buildTable();
11 - 334
            echo "</div>";
46 - 335
        } else if (!empty($_SESSION["discogs"])) {
336
            echo $_SESSION["discogs"];
337
        } else {
338
             ?>
38 - 339
    <div class="container-fluid text-center">
340
    <form method="post" action="/index.php">
341
        <input type="hidden" name="sessionTab" value="<?php echo MySessionHandler::getSessionTab(); ?>">
342
       	<input type="hidden" name="searchTerm" value="<?php echo getSV("searchTerm") ?>">
343
       	<input type="hidden" name="buyerZip" value="<?php echo $_SESSION["buyer"]["Zip"];?>">
43 - 344
        <button id="randomBtn" type="submit" class="btn btn-success mt-5 rounded" name="submit" value="random">Random Album Suggestions</button>
38 - 345
    </form>
346
    </div>
347
        <?php }
5 - 348
        echo printSearchFilterModal();
349
        echo printSearchInfoModal();
14 - 350
    }
5 - 351
    ?>
2 - 352
 
14 - 353
    <div class="modal" id="progressBarDiv">
17 - 354
        <div class="modal-dialog modal-dialog-centered">
14 - 355
            <div class="modal-content">
356
                <div class="modal-header">
15 - 357
                    <h4 id="progressBarHeader">Searching</h4>
14 - 358
                </div>
359
                <div class="modal-body">
360
                    <div class="progress">
361
                        <div id="progressBar" class="progress-bar" style="width:0%">0%</div>
362
                    </div>
363
                </div>
15 - 364
                <div class="modal-footer">
365
                    <span id="progressBarMessage"></span>
366
                </div>
14 - 367
            </div>
368
        </div>
369
    </div>
370
 
43 - 371
    <footer class="container-fluid text-center bg-primary py-5 mt-5">
20 - 372
        <?php if (!empty($_SESSION["searchTerm"])) {
373
            echo "<p>Disclaimer: As an Associate we earn from qualifying purchases.</p>";
374
        }
375
        ?>
376
        <form method="post" action="/index.php">
377
            <input type="hidden" name="sessionTab" value="<?php echo MySessionHandler::getSessionTab(); ?>">
378
       	    <input type="hidden" name="searchTerm" value="<?php echo getSV("searchTerm") ?>">
379
           	<input type="hidden" name="buyerZip" value="<?php echo $_SESSION["buyer"]["Zip"];?>">
380
            <ul class="list-inline text-center">
381
                <li class="list-inline-item">
382
                    <button class="btn btn-sm bg-light" type="submit" name="submit" value="terms">Terms of Service</button>
383
                </li>
384
                <li class="list-inline-item">
385
                    <button class="btn btn-sm bg-light" type="submit" name="submit" value="privacy">Privacy Policy</button>
386
                </li>
387
            </ul>
388
        </form>
17 - 389
        <p>Copyright &#169; <?php echo @date("Y"); ?> FindCheapMusic.com. All rights reserved.</p>
2 - 390
    </footer>
391
 
52 - 392
    <!--script src="js/dr.min.js" integrity="sha384-FL/VpjCnfHGWtXwxie9wD7sUL0dH7754e5+41/shx9YaRujt5F7lf7OXXFuzB9Y8" crossorigin="anonymous"></script-->
393
    <script src="js/dr.js"></script>
36 - 394
    <script>var quotes = [
38 - 395
    <?php
36 - 396
        if ($file = fopen("snippets/header.txt", "r")) {
397
            while (($line = fgets($file)) !== false) {
398
                echo "\"" . trim($line) . "\",";
399
            }
400
            fclose($file);
401
        }
402
     ?>
403
    ]; var i = 0; setInterval(function() { $("#textslide").html(quotes[i]); if (i == quotes.length) i=0; else i++; }, 5 * 1000);</script>
2 - 404
</body>
405
</html>
21 - 406
<?php MySessionHandler::commit(session_id()); ?>