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

    if (isset($_POST['submit'])) {
        // ============== Send a record to the database ==============
            require 'conn_app.php';
            $conn        = Connect();
            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']);
            $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,attachment,filesize,filetype,content,status,sentto)
                            VALUES('" . $fbType . "','" . $name . "','" . $company . "','" . $clientid . "','" . $email . "','" . $telephone . "','" . $application . "','" . $version . "',
                            '" . $reason . "','" . $comments . "','" . $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->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'];

        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/Help/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/Help/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>'
                                                    . '</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="https://documentation.wolterskluwerfs.com/Help/resources/img/favicon.ico" />

        <!-- Stylesheets -->
        <link rel="stylesheet" href="https://documentation.wolterskluwerfs.com/Help/resources/bootstrap/3.3.6/css/bootstrap.min.css" />
        <link rel="stylesheet" href="https://documentation.wolterskluwerfs.com/Help/resources/font-awesome/4.6.3/css/font-awesome.min.css" />
        <link rel="stylesheet" href="https://documentation.wolterskluwerfs.com/Help/resources/font-awesome/4.7.0/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">
            <div class="container-fluid">
                <div class="row">
                    <div class="col-md-4 col-xs-6 support-header">
                        <img class="support-logo" src="https://wolterskluwer.com/images/logo/wolters-kluwer-logo-full.png" />
                    </div>
                    <div class="col-md-8 col-xs-6 support-title">
                        <div><h1>Support <a href="javascript:void(0)" id="trigger" class="closebtn" onclick="closeNav()"><i class="fa fa-times-circle-o"></i></a></h1></div>
                    </div>
                </div>
                <div class="row">
                    <div class="col-md-6">
                        <div class="article">
                            <div class="article_body">
                                <div class="article_div">
                                    <div class="article_content">
                                        <div class="section">
                                        <h2>Customer Service</h2>
                                        <p>To place an order, inquire about the status of an existing order, get answers to invoice questions,
                                            or for any other product inquiries, contact our Customer Service staff. Our philosophy on providing
                                            excellent customer service is reflected in our decision to staff our phones with live people, not an
                                            automated attendant or v-mail. So you’ll receive informed answers and personal service by people
                                            knowledgeable in our products and the industry.
                                        </p>
                                        <p>
                                            <b>Hours:</b> 7:00 am to 6:00 pm Central, Monday through Friday
                                        </p>
                                        <p>
                                            <b>Phone Number:</b> (800) 552-9410
                                        </p>
                                        </div>

                                        <div class="section">
                                        <h2>SupportLine</h2>
                                        <p>
                                            Contact SupportLine for any questions about your Wolters Kluwer Financial Services electronic or
                                            software solutions. Our SupportLine team is experienced both in the financial services lines of
                                            business and the technology designed to make yours more efficient and effective. Each year, our
                                            SupportLine team handles over 70,000 calls across multiple financial services disciplines. When
                                            surveyed, over 98 percent of our software users said they would recommend our software products
                                            based on our support service alone.
                                        </p>
                                        <p>
                                            <b>Hours:</b> 7:00 am to 7:00 pm Central, Monday through Friday
                                        </p>
                                        <p>
                                            <b>Phone Number:</b> (800) 274-2711
                                        </p>
                                        </div>

                                    </div>
                                </div>

                            </div>
                        </div>
                    </div>
                    <div class="col-md-5 col-sm-8">
                        <div class="article_div">
                        <div class="section">
                            <h2>Contact the Support Team</h2>
                            <p>The Wolters Kluwer Support team is here to help you.
                            Complete the information below and a support representative
                            will respond as soon as possible.
                            </p>
                            <!-- CONTACT SUPPORT FORM -->
                            <div class="contactform">
                                <form name="contactform" method="post" action="thankyou-support.php?">

                                    <input type="hidden" id="txtUrl" name="txtUrl" value="" />
                                    <input type="hidden" id="status" name="status" value="Submitted" />
                                    <input type="hidden" id="ver" name="ver" value="" />


                                    <script>
                                        var verValue = (urlParams["ver"]);
                                        document.getElementById('ver').value = verValue;
                                    </script>


                                    <p class="form-para">
                                        All fields are required.
                                    </p>
                                    <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" class="form-control" id="inputName" name="full_name" placeholder="Enter your full 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 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 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" 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 phone number.</span>
                                    </div>

                                    <div class="form-group after-hr">
                                        <div class="input-group">
                                            <input type="hidden" id="prodvalue" name="application">

                                            <script>
                                                document.getElementById('prodvalue').value = RefApp;
                                            </script>

                                        </div>
                                    </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" id="email" 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 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="inputCustomerNumber" name="customernumber" placeholder="Enter your Customer #" 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 Customer Number.</span>
                                    </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="product" name="product" style="width:100%; height:30px; font-size: 1rem;">
                                                <option value="None selected">Product you are working with:</option>;
                                                <option value="Arta Lending">Arta Lending</option>;
                                                <option value="Cash Suite">Cash Suite</option>;
                                                <option value="ComplianceOne Deposit">ComplianceOne Deposit</option>;
                                                <option value="ComplianceOne Lending">ComplianceOne Lending</option>;
                                                <option value="ComplianceOne Interfaces">ComplianceOne Interfaces</option>;
                                                <option value="ComplianceOne manager">ComplianceOne manager</option>;
                                                <option value="ComplianceOne mortgage">ComplianceOne mortgage</option>;
                                                <option value="Document Generation Services">Document Generation Services</option>;
                                                <option value="Expere Document Services">Expere Document Services</option>;
                                                <option value="Medici">Medici</option>;
                                                <option value="Requirements Editor">Requirements Editor</option>;
                                                <option value="Settlement Services">Settlement Services</option>;
                                                <option value="TSoftPlus">TSoftPlus</option>;

                                            </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 addheight">
                                        <!-- <label class="form_field">For further help, see also: (opens in new tab/window) </label> -->
                                        <p class="addheight"><span id="more_help"></span></p>
                                    </div>

                                    <div class="form-group">
                                        <!--<label class="control-label" for="message">Message *</label>-->
                                        <br />
                                        <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" class="form-control" id="comments" name="comments" placeholder="Briefly describe your issue or question." 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>



                                    <button type="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>

                                    <br />


                                </form>
                            </div>
                        </div>
                        </div>
                    </div>
                </div>

                <div class="mainFooter" id="mainFooter">
                    <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>
                </div>

            </div>
        </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-4 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.");
                                }
                            </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>
            <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" 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='https://documentation.wolterskluwerfs.com/Help/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>



        <?php echo $msg; ?>


        <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>
