/var/www/hkosl.com/sinomax/survey/html_head.php


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?php
    
if (!empty($_GET["id"]) && !empty($_SESSION["id"]) && (int)$_GET["id"] != $_SESSION["id"] && !isset($_GET["end"])) {

        echo 
"<script type='text/javascript'>alert('You will redirect to the first page of survey. \\n你將連結到問卷的首頁。');location.href='campaign.php?id=" . (int)$_GET["id"] . "';</script>";
        exit;
    }

    include_once (
"js/Mobile-Detect-2.8.22/Mobile_Detect.php");
    
$device = new Mobile_Detect;
?>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;">
<title><?=!empty($campaign["name_en"])?$campaign["name_en"]:$campaign["name_tc"?></title>
<link rel="stylesheet" type="text/css" media="screen" href="css/style.css">

<style>
    body {
        <?php if ( $device->isMobile() ) { ?>
        background: url("images/campaign_background/<?=$campaign["background_img_mobile"]?>") no-repeat center center fixed;
        <?php }else{ ?>
        background: url("images/campaign_background/<?=$campaign["background_img"]?>") no-repeat center center fixed;
        <?php ?>

        background-size: contain;
        min-height: 100%;
        background-color: <?=$campaign["background_color"]?>;
    }
</style>