<?php
    $showDivFlag=true;
    $showSuccess=false;
    $msg = "";
    $contactMeReply = "";
    $appName = "";
    $sentTo = "";

    if (isset($_POST['submit'])) {
        // ============== Send a record to the database ==============
        $dbhost = 'localhost';
        $dbuser = 'root';
        // $dbpass = 'd1nRpH$K'; //development
        // $dbpass = 'M$Q2N1E8'; //testing
        // $dbpass = 'VsQ$vxK3'; //staging
        $dbpass = 'nz2@z5Wv'; //production
        $dbname = 'feedback';

        $conn = mysqli_connect($dbhost, $dbuser, $dbpass) or die("Unable to Connect to '$dbhost'");
        mysqli_select_db($conn, $dbname) or die("Could not open the db '$dbname'");

        mysqli_query($conn, "SET SESSION sql_mode = ''");
        $name        = $conn->real_escape_string($_POST['name']);
        $fbType      = $conn->real_escape_string($_POST['fbtype']);
        $company     = $conn->real_escape_string($_POST['company']);
        $clientid    = $conn->real_escape_string($_POST['clientid']);
        $email       = $conn->real_escape_string($_POST['email']);
        $telephone   = $conn->real_escape_string($_POST['telephone']);
        $application = $conn->real_escape_string($_POST['application']);
        $version     = $conn->real_escape_string($_POST['version']);
        $reason      = $conn->real_escape_string($_POST['reason']);
        $comments    = $conn->real_escape_string($_POST['body']);
        $url     = $conn->real_escape_string($_POST['url']);
        $status      = $conn->real_escape_string($_POST['status']);
        //$sentTo      = $conn->real_escape_string($_POST['status']);
        $fileName    = $_['userfile']['name'];              //The original name of the file on the client machine.
        $tmpName     = $_FILES['userfile']['tmp_name'];     //The mime type of the file, if the browser provided this information. An example would be "image/gif".
        $fileSize    = $_FILES['userfile']['size'];         //The size, in bytes, of the uploaded file.
        $fileType    = $_FILES['userfile']['type'];         //The temporary filename of the file in which the uploaded file was stored on the server.
        //$_FILES['userfile']['error']                        //The error code associated with this file upload. ['error'] was added in PHP 4.2.0

        $fp      = fopen($tmpName, 'r');
        $content = fread($fp, filesize($tmpName));
        $content = addslashes($content);
        fclose($fp);

        if(!get_magic_quotes_gpc())
        {
            $fileName = addslashes($fileName);
        }

        $status      = $conn->real_escape_string($_POST['status']);
        $query       = "INSERT into tb_feedback (fbtype,full_name,company,clientid,email,telephone,application,version,reason,comments,url,attachment,filesize,filetype,content,status,sentto)
                        VALUES('" . $fbType . "','" . $name . "','" . $company . "','" . $clientid . "','" . $email . "','" . $telephone . "','" . $application . "','" . $version . "',
                        '" . $reason . "','" . $comments . "','" . $url . "','" . $fileName . "','" . $fileSize . "','" . $fileType . "','" . $content . "','" . $status . "','" . $sentTo . "')";
        $success     = $conn->query($query);

        if (!$success) {
            die("Couldn't enter data: ".$conn->error);
        }

        $conn->close();
        // ============== End Send a record to the database ==============

        require 'resources/phpmailer/PHPMailerAutoload.php';

        function sendemail($to, $from, $fromName, $body, $attachment = "") {
			$mail = new PHPMailer();
			$mail->setFrom($from, $fromName);
            $mail->addAddress($to);
            $mail->addBCC('kelly.mankenberg@wolterskluwer.com');
            $mail->addBCC('todd.stupnik@wolterskluwer.com');
			$mail->addAttachment($attachment);
			$mail->Subject = 'InfoDev Feedback Received';
			$mail->Body = $body;
			$mail->isHTML(true);

			return $mail->send();
		}

        $name        = $_POST['name'];
        $email       = $_POST['email'];
        $product    = $_POST['application'];
        $body         = $_POST['body'];
        $url            = $_POST['url'];

        if ($_POST['contactme'] == 'on') {
            $contactMeReply = 'yes';
        } else {
            $contactMeReply = 'no';
        }

        // Compose a simple HTML email message
        $message = '<html>';
        $message .= '<head>';
        $message .= '<script>
            function downloadCSV(csv, filename) {
                var csvFile;
                var downloadLink;

                // CSV file
                csvFile = new Blob([csv], {type: "text/csv"});

                // Download link
                downloadLink = document.createElement("a");

                // File name
                downloadLink.download = filename;

                // Create a link to the file
                downloadLink.href = window.URL.createObjectURL(csvFile);

                // Hide download link
                downloadLink.style.display = "none";

                // Add the link to DOM
                document.body.appendChild(downloadLink);

                // Click download link
                downloadLink.click();
            }

            function exportTableToCSV(filename) {
                var csv = [];
                var rows = document.querySelectorAll("table tr");

                for (var i = 0; i < rows.length; i++) {
                    var row = [], cols = rows[i].querySelectorAll("td, th");

                    for (var j = 0; j < cols.length; j++)
                        row.push(cols[j].innerText);

                    csv.push(row.join(","));
                }

                // Download CSV file
                downloadCSV(csv.join("\n"), filename);
            }
            </script>';
        $message .= '</head>';
            $message .= '<body style="font-family:Calibri Regular">';
                $message .= '<table border="0" cellspacing="0" cellpadding="0" width="100%" style="font-family:Calibri Regular">
                    <tr>
                        <td valign="top"><div align="center">
                        <table border="0" cellspacing="0" cellpadding="0" width="600">
                            <tr>
                            <td><table border="0" cellspacing="0" cellpadding="0" align="left">
                                <tr>
                                <td style="padding-left:50px"><p><img src="https://documentation.wolterskluwerfs.com/resources/img/logos/Wolters-Kluwer-logo_wht.png" /></p>&nbsp;<p></p></td>
                                </tr>
                            </table></td>
                            </tr>
                            <tr>
                            <td style="padding: 0in; background: rgb(0, 122, 195) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;">
                                <table style="border-collapse: collapse;" align="right" border="0" cellpadding="0" cellspacing="0">
                                    <tr bgcolor="#0007ac3">
                                        <td  style="padding: 7.5pt; background: rgb(133, 188, 32) none repeat scroll 0% 50%; width: 70%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" width="70%"><p style="text-align: center;" align="center"><span style="font-family: &quot;Fira Sans&quot;,sans-serif; color: white;">Financial Services</p></td>
                                    </tr>
                                </table>
                            </td>
                            </tr>
                            <tr>
                            <td colspan="2" style="padding: 15pt 30pt;"><p><span style="font-size: 18pt; font-family: &quot;Fira Sans&quot;,sans-serif;">Information Development</span><span style="font-size: 12pt; font-family: &quot;Fira Sans&quot;,sans-serif;"><o:p></o:p></span></p></td>
                            </tr>
                            <tr>
                            <td style="padding: 0in; background: rgb(230, 231, 233) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;">
                                <p align="center"><img width="526" height="150" src="https://documentation.wolterskluwerfs.com/resources/img/mockups/MacMock_WebHelp-1.png" alt="Wolters Kluwer" /></p></td>
                            <td></td>
                            </tr>
                            <tr>
                            <td style="padding: 0in 30pt 30pt; background: rgb(230, 231, 233) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" valign="top">
                                <div align="center"><span style="font-size: 10.5pt; font-family: &quot;Fira Sans&quot;,sans-serif; color: rgb(40, 40, 40);">
                                <table style="background: white none repeat scroll 0% 50%; width: 100%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; border-collapse: collapse;" align="left" border="0" cellpadding="0" cellspacing="0" width="100%">
                                <tr>
                                    <td valign="top"><table border="0" cellspacing="0" cellpadding="0" align="left" width="100%">
                                    <tr>
                                        <td colspan="2" style="padding: 15pt 30pt 7.5pt 15pt;" valign="top">
                                        <h2><span style="font-family: &quot;Fira Sans&quot;,sans-serif; color: rgb(0, 122, 195);">Application Feedback</span></h2>
                                        <p style="line-height: 15pt;">
                                            <span style="font-size: 10.5pt; font-family: &quot;Calibri&quot;,sans-serif; color: rgb(40, 40, 40);">
                                            The following feedback was received from the application detailed below.
                                            </span></p>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td colspan="2" style="padding: 15pt 30pt 7.5pt 15pt;" valign="top">';
                                            $message .= '<table>'
                                                        . '<tr>'
                                                            . '<td><span style="font-size: 10.5pt; font-family: &quot;Calibri&quot;,sans-serif; color: rgb(40, 40, 40);">'
                                                                . '<b>Date and Time: </b></span></td>'
                                                            . '<td><span style="font-size: 10.5pt; font-family: &quot;Calibri&quot;,sans-serif; color: rgb(40, 40, 40);">'
                                                                . date('m/d/Y, H:i:s') . '</span></td>'
                                                        . '</tr>'
                                                        . '<tr>'
                                                            . '<td><span style="font-size: 10.5pt; font-family: &quot;Calibri&quot;,sans-serif; color: rgb(40, 40, 40);">'
                                                                . '<b>Name: </b></span></td>'
                                                            . '<td><span style="font-size: 10.5pt; font-family: &quot;Calibri&quot;,sans-serif; color: rgb(40, 40, 40);">'
                                                                . strip_tags($_POST['name']) . '</span></td>'
                                                        . '</tr>'
                                                        . '<tr>'
                                                            . '<td><span style="font-size: 10.5pt; font-family: &quot;Calibri&quot;,sans-serif; color: rgb(40, 40, 40);">'
                                                                . '<b>Company: </b></span></td>'
                                                            . '<td><span style="font-size: 10.5pt; font-family: &quot;Calibri&quot;,sans-serif; color: rgb(40, 40, 40);">'
                                                                . strip_tags($_POST['company']) . '</span></td>'
                                                        . '</tr>'
                                                        . '<tr>'
                                                            . '<td><span style="font-size: 10.5pt; font-family: &quot;Calibri&quot;,sans-serif; color: rgb(40, 40, 40);">'
                                                                . '<b>Client ID: </b></span></td>'
                                                            . '<td><span style="font-size: 10.5pt; font-family: &quot;Calibri&quot;,sans-serif; color: rgb(40, 40, 40);">'
                                                                . strip_tags($_POST['clientid']) . '</span></td>'
                                                        . '</tr>'
                                                        . '<tr>'
                                                            . '<td><span style="font-size: 10.5pt; font-family: &quot;Calibri&quot;,sans-serif; color: rgb(40, 40, 40);">'
                                                                . '<b>Email: </b></span></td>'
                                                            . '<td><span style="font-size: 10.5pt; font-family: &quot;Calibri&quot;,sans-serif; color: rgb(40, 40, 40);">'
                                                                . strip_tags($_POST['email']) . '</span></td>'
                                                        . '</tr>'
                                                        . '<tr>'
                                                            . '<td><span style="font-size: 10.5pt; font-family: &quot;Calibri&quot;,sans-serif; color: rgb(40, 40, 40);">'
                                                                . '<b>Contact me?: </b></span></td>'
                                                            . '<td><span style="font-size: 10.5pt; font-family: &quot;Calibri&quot;,sans-serif; color: rgb(40, 40, 40);">'
                                                                . $contactMeReply . '</span></td>'
                                                        . '</tr>'
                                                        . '<tr>'
                                                            . '<td><span style="font-size: 10.5pt; font-family: &quot;Calibri&quot;,sans-serif; color: rgb(40, 40, 40);">'
                                                                . '<b>Product: </b></span></td>'
                                                            . '<td><span style="font-size: 10.5pt; font-family: &quot;Calibri&quot;,sans-serif; color: rgb(40, 40, 40);">'
                                                                . $product . '</span></td>'
                                                        . '</tr>'
                                                        . '<tr>'
                                                            . '<td><span style="font-size: 10.5pt; font-family: &quot;Calibri&quot;,sans-serif; color: rgb(40, 40, 40);">'
                                                                . '<b>Product version: </b></span></td>'
                                                            . '<td><span style="font-size: 10.5pt; font-family: &quot;Calibri&quot;,sans-serif; color: rgb(40, 40, 40);">'
                                                                . strip_tags($_POST['version']) . '</span></td>'
                                                        . '</tr>'
                                                        . '<tr>'
                                                            . '<td><span style="font-size: 10.5pt; font-family: &quot;Calibri&quot;,sans-serif; color: rgb(40, 40, 40);">'
                                                                . '<b>Reason: </b></span></td>'
                                                            . '<td><span style="font-size: 10.5pt; font-family: &quot;Calibri&quot;,sans-serif; color: rgb(40, 40, 40);">'
                                                                . strip_tags($_POST['reason']) . '</span></td>'
                                                        . '</tr>'
                                                        . '<tr>'
                                                            . '<td><span style="font-size: 10.5pt; font-family: &quot;Calibri&quot;,sans-serif; color: rgb(40, 40, 40);">'
                                                                . '<b>Comments: </b></span></td>'
                                                            . '<td><span style="font-size: 10.5pt; font-family: &quot;Calibri&quot;,sans-serif; color: rgb(40, 40, 40);">'
                                                                . strip_tags($_POST['body']) . '</span></td>'
                                                        . '</tr>'
                                                        . '<tr>'
                                                            . '<td><span style="font-size: 10.5pt; font-family: &quot;Calibri&quot;,sans-serif; color: rgb(40, 40, 40);">'
                                                                . '<b>URL: </b></span></td>'
                                                            . '<td><span style="font-size: 10.5pt; font-family: &quot;Calibri&quot;,sans-serif; color: rgb(40, 40, 40);">'
                                                                . strip_tags($_POST['url']) . '</span></td>'
                                                        . '</tr>'
                                                    . '</table>';
                                            $message .= '
                                        </td>
                                    </tr>';
                                        $message .= '</table></span>
                                        </td>
                                        <td></td>
                                    </tr>
                                    </table></td>
                                </tr>
                                <tr>
                                    <td>
                                        <div align="center">

                                        </div>
                                    </td>
                                </tr>
                                </table>
                            </div></td>
                            <td></td>
                            </tr>
                        </table>
                        </div></td>
                    </tr>
                </table>';



            $message .= '</body></html>';


        $file = "attachment/" . basename($_FILES['attachment']['name']);
		if (move_uploaded_file($_FILES['attachment']['tmp_name'], $file)) {
            if (sendemail('WKFS-InfoDevSupport@wolterskluwer.com', 'WKFS-InfoDevSupport@wolterskluwer.com', $name, $message, $file)) {
                $showDivFlag=false;
                $showSuccess=true;
                // $msg = 'Your feedback has been sent. Thank you!';
                //sendemail('WKFS-InfoDevSupport@wolterskluwer.com', 'WKFS-InfoDevSupport@wolterskluwer.com', $name, $message, $file);
            }
        }
        else
            // $msg = 'Please check your attachment and try again.';
            if (sendemail('WKFS-InfoDevSupport@wolterskluwer.com', 'WKFS-InfoDevSupport@wolterskluwer.com', $name, $message)) {
                $showDivFlag=false;
                $showSuccess=true;
                // $msg = 'Your feedback has been sent. Thank you!';
                //sendemail('WKFS-InfoDevSupport@wolterskluwer.com', 'WKFS-InfoDevSupport@wolterskluwer.com', $name, $message);
            }
    }
?>


<html>
    <head>
        <meta charset="utf-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <meta name="author" content="" />
        <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
        <meta http-equiv="Pragma" content="no-cache" />
        <meta http-equiv="Expires" content="0" />

        <title>WKFS Feedback Form</title>

        <link rel="shortcut icon" href="/resources/img/favicon.ico" />

        <!-- Stylesheets -->
        <link rel="stylesheet" href="/resources/bootstrap/3.3.6/css/bootstrap.min.css" />
        <link rel="stylesheet" href="/resources/font-awesome/css/font-awesome.min.css"/>
        <!--<link rel="stylesheet" href="https://cdn.wolterskluwer.io/wk.css/0.13.x/with-bootstrap.min.css" type="text/css"/>-->
        <link rel="stylesheet" href="resources/css/feedback.css" />

        <!-- Javascript -->
        <script type="text/javascript" src="resources/js/feedback.js"></script>

    </head>
    <body id="mainBody">
        <script type="text/javascript" src="resources/js/feedback_apps.js"></script>

            <!-- Support Panel -->

        <div id="mySidenav" class="sidenav">
            <iframe src="support.php" height="100%" width="100%"></iframe>
        </div>

        <!-- ===== Header ===== -->
        <div class="container-fluid" <?php if ($showDivFlag===false){?>style="display:none"<?php } ?>>
            <div class="row">
                <div class="col-md-4 col-xs-6 logo" id="logo"></div>
                <div class="col-md-8 col-xs-6 title wk-blue">
                    <script>
                        $appName = RefApp;
                        if($appName == "location.search.split('app=')[1]") {

                        }
                        if(RefApp !== "location.search.split('app=')[1]")
                        {
                            document.write("<h1>Application Feedback</h1>");
                        }
                        else{
                            document.write("<h1>Documentation Feedback</h1>");
                        }
                    </script>
                </div>
            </div>
            <div class="row bdr-bottom-blu">
                <div class="col-md-4 col-xs-4"></div>
                <div class="col-md-8 col-xs-8 bdr-right">
                        <h2 class="subtitle">Direct Voice of Customer</h2>
                </div>
            </div>

            <script>
                if(typeof AppVer !== "undefined")
                {
                    document.write("<div class='row row-title'>");
                    document.write("<div class='col-md-3 col-xs-1'></div>");
                    document.write("<div class='col-md-6 col-xs-10'>");
                    document.write("<img id='AppLogo' src='' class='logo' />");
                    document.write("<script>document.getElementById('AppLogo').src=IcoSrc;<\/script>");
                    document.write("<span class='AppTitle'>");
                    document.write("<script>document.write(RefApp + ' Feedback');<\/script>");
                    document.write("</span>");
                    document.write("</div>");
                    document.write("</div>");
                } else {
                    document.write("<p></p>");
                }
            </script>

            <div class="row">
                <div class="col-md-3 col-xs-1"></div>
                <div class="col-xs-10 col-sm-6 col-lg-4">
                    <p id="feedbackType">
                        <span style="font-weight:700">
                            <script>
                                if(typeof AppVer !== "undefined")
                                {
                                    document.write("This form is provided for feedback regarding " + RefApp + " (ver. " + AppVer + ").");
                                    document.getElementById('ver').value = AppVer;
                                } else {
                                    document.write("This form is provided for feedback regarding Wolters Kluwer Financial Services documentation for " + RefApp + ".");
                                }
                            </script>
                        </span><br/>
                        <span style="font-size:12px;">If you need support regarding any of our products and documentation, please click the Need Support button.</span>
                    </p>
                </div>
                <div class="col-xs-8 col-sm-2 col-lg-2">
                    <div class="supportbtn"><a class="btn btn-lg btn-success" href="#" onclick="openNav()" ><i class="fa fa-life-ring"></i> Need Support?</a></div>
                </div>
            </div>
        </div>

        <!-- ===== Main Form ===== -->
       

        <div id="divForm" <?php if ($showDivFlag===false){?>style="display:none"<?php } ?>>
            <form id="myForm" method="post" action="index.php" enctype="multipart/form-data">
            <div class="col-md-3 col-xs-1"></div>

            <input type="hidden" id="url" class="form-control" name="url">
            <script>
                // document.getElementById('url').value = window.location.href;
                var urlValue = (urlParams["url"]);
                document.getElementById("url").value = urlValue;
                // console.log("urlValue = " + urlValue);
            </script>

        
            <div class="col-md-6 col-xs-10">
                <div class="form-group">
                    <div class="input-group">
                        <span class="input-group-addon"><i class="fa fa-user" aria-hidden="true"></i></span>
                        <input type="text" id="name" class="form-control" name="name" placeholder="Enter your full name" required>
                        <span class="input-group-addon"></span>
                    </div>
                    <span class="help-block" style="display: none;">Please enter your name.</span>
                </div>

                <div class="form-group">
                    <div class="input-group">
                        <span class="input-group-addon"><i class="fa fa-building" aria-hidden="true"></i></span>
                        <input type="text" class="form-control" id="inputCompany" name="company" placeholder="Enter your Company name" required/>
                        <span class="input-group-addon"><!--<i class="glyphicon glyphicon-unchecked form-control-feedback"></i>--></span>
                    </div>
                    <span class="help-block" style="display: none;">Please enter your Company name.</span>
                </div>

                <div class="form-group">
                    <div class="input-group">
                        <span class="input-group-addon"><i class="fa fa-id-card-o" aria-hidden="true"></i></span>
                        <input type="text" class="form-control" id="inputClientID" name="clientid" placeholder="Enter your Client ID" />
                        <span class="input-group-addon"><!--<i class="glyphicon glyphicon-unchecked form-control-feedback"></i>--></span>
                    </div>
                    <span class="help-block" style="display: none;">Please enter your Company name.</span>
                </div>

                <div class="form-group">
                    <div class="input-group">
                        <span class="input-group-addon"><i class="fa fa-envelope" aria-hidden="true"></i></span>
                        <input type="email" class="form-control" name="email" placeholder="Enter your email address" required>
                        <span class="input-group-addon"><!--<i class="glyphicon glyphicon-unchecked form-control-feedback"></i>--></span>
                    </div>
                    <span class="help-block" style="display: none;">Please enter a valid e-mail address.</span>
                </div>

                <div style="margin-left:50px">
                    <div class="checkbox checkbox-inline" style="margin:0px; width:350px">
                        <input type="checkbox" name="contactme" id="ContactMe" />
                        <label for="ContactMe" style="margin-left:-20px; font-size: 10pt; margin-bottom: 10px;">I would like to be contacted.</label>
                    </div>
                </div>

                <div class="form-group before-hr">
                    <div class="input-group">
                        <span class="input-group-addon"><i class="fa fa-phone" aria-hidden="true"></i></span>
                        <input type="tel" class="form-control" id="telephone" name="telephone" placeholder="Enter your telephone number" />
                        <span class="input-group-addon"><!--<i class="glyphicon glyphicon-unchecked form-control-feedback"></i>--></span>
                    </div>
                    <span class="help-block" style="display: none;">Please enter a valid phone number.</span>
                </div>

                <hr />

                <div class="form-group after-hr">
                    <div class="input-group">
                        <input type="hidden" id="application" name="application">
                        <script>
                            if(RefApp != "location.search.split('app=')[1]") {
                                document.getElementById('application').value = RefApp;
                            }
                        </script>
                    </div>
                    <div class="input-group">
                        <input type="hidden" id="version" name="version">
                        <script>
                            if(typeof AppVer !== "undefined") {
                                document.getElementById('version').value = AppVer;
                            }
                        </script>
                    </div>
                    <div class="input-group">
                        <input type="hidden" id="fbtype" name="fbtype">
                        <script>
                            if(RefApp != "location.search.split('app=')[1]"){
                                document.getElementById('fbtype').value = "application";
                            }
                            else {
                                document.getElementById('fbtype').value = "documentation";
                            }
                        </script>

                    </div>
                </div>

                <div class="form-group">
                    <div class="input-group">
                        <span class="input-group-addon"><i class="fa fa-list" aria-hidden="true"></i></span>
                        <select id="reason" name="reason" style="width:100%; height:30px; font-size: 1rem;">

                            <script>
                                if (urlParams["app"] ==="PubAssistFTP") {
                                        document.write('<option value="None selected">Reason for your feedback...</option>');
                                        document.write('<option value="General Comment">General Comment</option>');
                                        document.write('<option value="Feature Request">Feature Request</option>');
                                        document.write('<option value="Possible Defect Identified">Possible Defect Identified</option>');
                                        document.write('<option value="Team Email Feature">Team Email Feature</option>');
                                }
                                else if (urlParams["app"] ==="ExpAuthLP") {
                                        document.write('<option value="None selected">Select application...</option>');
                                        document.write('<option value="Administration Tool">Administration Tool</option>');
                                        document.write('<option value="Data Dictionary Viewer">Data Dictionary Viewer</option>');
                                        document.write('<option value="Requirements and Content Editor">Requirements and Content Editor</option>');
                                }
                                else if (urlParams["app"] ==="ExpEngLP") {
                                        document.write('<option value="None selected">Select application...</option>');
                                        document.write('<option value="Administration Tool">Administration Tool</option>');
                                        document.write('<option value="Data Dictionary Viewer">Data Dictionary Viewer</option>');
                                        document.write('<option value="Requirements and Content Editor">Requirements and Content Editor</option>');
                                }
                                else {
                                        document.write('<option value="None selected">Reason for your feedback...</option>');
                                        document.write('<option value="General Comment">General Comment</option>');
                                        document.write('<option value="Feature Request">Feature Request</option>');
                                        document.write('<option value="Possible Defect Identified">Possible Defect Identified</option>');
                                }
                            </script>
                        </select>
                        <span class="input-group-addon"><!--<i class="glyphicon glyphicon-unchecked form-control-feedback"></i>--></span>
                    </div>
                    <span class="help-block" style="display: none;">Please select a reason for submitting feedback (this helps us route your comments).</span>
                </div>

                <div class="form-group">
                    <div class="input-group">
                        <span class="input-group-addon"><i class="fa fa-pencil-square-o" aria-hidden="true"></i></span>
                        <textarea rows="5" cols="30" name="body" class="form-control" placeholder="Enter your message" required></textarea>
                        <span class="input-group-addon"><!--<i class="glyphicon glyphicon-unchecked form-control-feedback"></i>--></span>
                    </div>
                    <span class="help-block" style="display: none;">Please enter a message.</span>
                </div>

                <!-- <div class="form-group">
                    <div class="input-group">
                        <input type="hidden" name="MAX_FILE_SIZE" value="2000000">
                        <input type="file" id="userfile" name="attachment">
                    </div>
                </div> -->

                <button type="submit"
                        name="submit"
                        id="feedbackSubmit"
                        class="btn btn-success btn-lg"
                        data-loading-text="Sending..."
                        style="display: block; margin-top: 10px; margin-left: 10px; text-align:right">
                    <i class="fa fa-send-o fa-2x pull-left">&nbsp;<span class="submitbtn">&nbsp;Submit</span></i>
                </button>
            </div>
            </form>
        </div>


        <!-- ===== Success Form ===== -->
        <div id="success" <?php if ($showSuccess===false){?>style="display:none"<?php } ?> style="font-family:Calibri; margin:0 auto; margin-top:50px; width: 600px">
            <img src='/resources/img/checkbox-720.png' style='width:200px; display:block; margin:auto' /><br />
            <div style='text-align:center'>
                <h2 style='color:rgb(0, 122, 195);font-size:32px'>Thank you for contacting us.</h2>
                <p style='font-size:22px'>We value our customers and your opinion.<br />
                You can now close this window.</p>
            </div>
        </div>



        
        

        <script>
            function myFunction() {
                var x = document.getElementById('contact-form');
                if (x.style.display === 'none') {
                    x.style.display = 'block';
                } else {
                    x.style.display = 'none';
                }
            }
            function ShowSuccess() {
                var x = document.getElementById('success');
                if (x.style.display === 'none') {
                    x.style.display = 'block';
                } else {
                    x.style.display = 'none';
                }
            }

        </script>



        <!-- Footer -->
        <footer class="col-md-12 col-xs-12 footer">
            <div class="mainFooter_sections mainFooter_sections--logo">
                <a class="mainFooter_logo" href="#" title="Wolters Kluwer Corporate homepage">Wolters Kluwer Corporate</a>
                <div class="mainFooter_logoSection mainFooter_logoSection--note">
                When you have to be right
                </div>
            </div>
        </footer>




    </body>
</html>
