/var/www/hkosl.com/survey_demo/thankyou.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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<?php
    
require_once('webadmin/basic_info.php');

    if (!isset(
$_SESSION["id"]) || (int)$_SESSION["id"] <= 0) {
        echo 
"<script type='text/javascript'>alert('Cannot find survey information.'); location.href='index.php';</script>";
        exit;
    } else if (!isset(
$_SESSION["completed_survey"])) {
        echo 
"<script type='text/javascript'>alert('Please complete the survey.'); location.href='campaign.php?id=" $_SESSION["id"] . "';</script>";
        exit;
    } else {
        
$id = (int)$_SESSION["id"];

        
$campaign get_campaign($id);
    }

    unset(
$_SESSION["completed_survey"]);
?>

<!DOCTYPE html>
<html>
<head>
    <?php require_once('html_head.php'); ?>
</head>
<body>

<div class="container">
    <h1>
        <?php
            
foreach ($arraylangcode as $langcode => $langname) {
                if (!empty(
$campaign["name_" $langcode])) {
                    echo 
$campaign["name_" $langcode] . "<br>";
                }
            }
        
?>
    </h1>

    <div style="margin-top: 30px;">
        <?php
            
foreach ($arraylangcode as $langcode => $langname) {
                if (!empty(
$campaign["desc3_" $langcode])) {
                    echo 
$campaign["desc3_" $langcode] . "<br><br>";
                }
            }
        
?>
    </div>

</div>

<?php require_once('html_footer.php'); ?>
</body>
</html>