Subversion Repositories cheapmusic

Rev

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