Subversion Repositories cheapmusic

Rev

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

Rev 151 Rev 153
Line 2... Line 2...
2
// title
2
// title
3
function headTitle($page) {
3
function headTitle($page) {
4
    switch ($page) {
4
    switch ($page) {
5
        case "terms":
5
        case "terms":
6
            $titleText = "Find Cheap Music | Terms of Service";
6
            $titleText = "Find Cheap Music | Terms of Service";
-
 
7
            $canonicalLink = "https://" . $_SERVER['SERVER_NAME'] . "/terms.php";
7
            break;
8
            break;
8
 
9
 
9
        case "privacy":
10
        case "privacy":
10
            $titleText = "Find Cheap Music | Privacy Policy";
11
            $titleText = "Find Cheap Music | Privacy Policy";
-
 
12
            $canonicalLink = "https://" . $_SERVER['SERVER_NAME'] . "/privacy.php";
11
            break;
13
            break;
12
 
14
 
13
        case "help":
15
        case "help":
14
            $titleText = "Find Cheap Music | Help Page";
16
            $titleText = "Find Cheap Music | Help Page";
-
 
17
            $canonicalLink = "https://" . $_SERVER['SERVER_NAME'] . "/help.php";
15
            break;
18
            break;
16
 
19
 
17
        case "wishlist":
20
        case "wishlist":
18
            $titleText = "Find Cheap Music | Wishlist";
21
            $titleText = "Find Cheap Music | Wishlist";
-
 
22
            $canonicalLink = "https://" . $_SERVER['SERVER_NAME'] . "/index.php?submit=wishlist";
19
            break;
23
            break;
20
 
24
 
21
        case "coupons":
25
        case "coupons":
22
            $titleText = "Find Cheap Music | Coupons";
26
            $titleText = "Find Cheap Music | Coupons";
-
 
27
            $canonicalLink = "https://" . $_SERVER['SERVER_NAME'] . "/index.php?submit=coupons";
23
            break;
28
            break;
24
 
29
 
25
        case "priceMonitor":
30
        case "priceMonitor":
26
            $titleText = "Find Cheap Music | Price Monitor";
31
            $titleText = "Find Cheap Music | Price Monitor";
-
 
32
            $canonicalLink = "https://" . $_SERVER['SERVER_NAME'] . "/index.php?submit=priceMonitor";
27
            break;
33
            break;
28
 
34
 
29
        case "random":
35
        case "random":
30
            $titleText = "Find Cheap Music | Random Albums";
36
            $titleText = "Find Cheap Music | Random Albums";
-
 
37
            $canonicalLink = "https://" . $_SERVER['SERVER_NAME'] . "/index.php?submit=random";
31
            break;
38
            break;
32
 
39
 
33
        default:
40
        default:
34
            $titleText = "Find Cheap Music | CDs, Records, Digital, Books and Sheets";
41
            $titleText = "Find Cheap Music | CDs, Records, Digital, Books and Sheets";
-
 
42
            $canonicalLink = "https://" . $_SERVER['SERVER_NAME'] . "/index.php";
35
            break;
43
            break;
36
    }
44
    }
37
 
45
 
-
 
46
    if (!empty($canonicalLink)) {
-
 
47
        $canonicalText = '<link rel="canonical" href="' . $canonicalLink . '" />';
-
 
48
    }
-
 
49
 
38
    return ('<title>' . $titleText . '</title>');
50
    return ('<title>' . $titleText . '</title>&apos; . $canonicalText ?? "";);
39
}
51
}
40
 
52
 
41
// meta description
53
// meta description
42
function metaDescription($page) {
54
function metaDescription($page) {
43
    switch ($page) {
55
    switch ($page) {