Error executing template "Designs/1883_Iris/_parsed/Ansoegningsblanket-Sendt.parsed.cshtml"
System.NullReferenceException: Object reference not set to an instance of an object.
   at CompiledRazorTemplates.Dynamic.RazorEngine_f41ed5d479294e79a88804e87fb24f9a.Ansoegningsblanket.HexToBytes(String hex) in D:\home\site\wwwroot\Files\Templates\Designs\1883_Iris\_parsed\Ansoegningsblanket-Sendt.parsed.cshtml:line 572
   at CompiledRazorTemplates.Dynamic.RazorEngine_f41ed5d479294e79a88804e87fb24f9a.Ansoegningsblanket.XorDecrypt(String value) in D:\home\site\wwwroot\Files\Templates\Designs\1883_Iris\_parsed\Ansoegningsblanket-Sendt.parsed.cshtml:line 608
   at CompiledRazorTemplates.Dynamic.RazorEngine_f41ed5d479294e79a88804e87fb24f9a.Execute() in D:\home\site\wwwroot\Files\Templates\Designs\1883_Iris\_parsed\Ansoegningsblanket-Sendt.parsed.cshtml:line 637
   at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context, TextWriter reader)
   at RazorEngine.Templating.RazorEngineService.RunCompile(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag)
   at RazorEngine.Templating.RazorEngineServiceExtensions.<>c__DisplayClass16_0.b__0(TextWriter writer)
   at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter)
   at Dynamicweb.Rendering.Template.RenderRazorTemplate()

1 @using System.Web; 2 @using System.IO; 3 @using System.Linq; 4 @using Dynamicweb.Environment 5 6 @* -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- COOKIE -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- *@ 7 @*@{ 8 IList<string> AllowedCookieCategories = new List<string>() { "Essential" }; 9 foreach (string s in CookieManager.GetCategories()) 10 { 11 if (s == "Essential") 12 { 13 continue; 14 } 15 else if (CookieManager.CookieOptInLevelExists && (CookieManager.GetCookieOptInLevel() == CookieOptInLevel.All || (CookieManager.CookieOptInLevelExists && System.Web.HttpContext.Current.Request.Cookies.Get("Dynamicweb.CookieOptInLevel").Value.IndexOf(s) > -1))) 16 { 17 AllowedCookieCategories.Add(s); 18 } 19 } 20 }*@ 21 @* -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- *@ 22 23 <!DOCTYPE html> 24 @{ 25 var thecssfile = new FileInfo(HttpContext.Current.Server.MapPath("~" + @GetString("Template:DesignBaseUrl") + "/css/i_app.css")); 26 var thecssstamp = thecssfile.LastWriteTime.ToString("yyyyMMddhhmmss"); 27 var thejsfile = new FileInfo(HttpContext.Current.Server.MapPath("~" + @GetString("Template:DesignBaseUrl") + "/javascript/compressed/i_compressed.js")); 28 var thejsstamp = thejsfile.LastWriteTime.ToString("yyyyMMddhhmmss"); 29 30 var url = GetGlobalValue("Global:Request.Host"); 31 var imagetag = GetString("Item.OpenGraphImage.Value"); 32 var cookieText = ""; 33 if (!string.IsNullOrEmpty(GetString("DwCookieWarning"))) 34 { 35 cookieText = GetString("Item.Area.CookieText").Replace("\"", "'").Replace(Environment.NewLine, ""); 36 } 37 var headerSettings = ""; 38 if (GetString("Item.Area.FixedHeader") == "False") 39 { 40 headerSettings = "content-after-header"; 41 } 42 else 43 { 44 headerSettings = "content-behind-header"; 45 } 46 47 string maxWidth = ""; 48 if (GetBoolean("Item.Area.ContentMaxWidth")) 49 { 50 maxWidth = "max"; 51 } 52 } 53 <html lang='@GetGlobalValue("Global:Area.LongLang")'> 54 <head> 55 <meta charset="UTF-8"> 56 <title>@GetValue("Title")</title> 57 @GetValue("MetaTags") 58 @GetValue("CopyRightNotice") 59 60 61 <meta name="format-detection" content="telephone=no"> 62 <meta name="Generator" content="Dynamicweb 9"> 63 64 @if (!string.IsNullOrEmpty(GetString("Title"))) 65 { 66 <meta property="og:title" content='@GetString("Title")'> 67 } 68 @if (!string.IsNullOrEmpty(GetString("Meta.Description"))) 69 { 70 <meta property="og:description" content='@GetString("Meta.Description")'> 71 } 72 @if (!string.IsNullOrEmpty(GetString("Item.OpenGraphImage"))) 73 { 74 <meta property="og:image" content='http://@url/@imagetag'> 75 } 76 77 <meta property="og:site_name" content='@GetValue("Item.Area.CompanyName")'> 78 <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"> 79 <link rel="stylesheet" href="/Files/Templates/Designs/1883_Iris/css/i_app.css?v=@thecssstamp"> 80 81 @* 82 Go to https://realfavicongenerator.net/ and create your favicon code and insert it below instead of the- 83 REMEMBER to set the color so they match the style of the site and set the favicon path to images/favicon - AND upload the generated files to that folder in the IRIS theme in the Designs folder 84 *@ 85 86 <link rel="apple-touch-icon" sizes="152x152" href="/Files/Templates/Designs/1883_Iris/images/favicon/apple-touch-icon.png"> 87 <link rel="icon" type="image/png" sizes="32x32" href="/Files/Templates/Designs/1883_Iris/images/favicon/favicon-32x32.png"> 88 <link rel="icon" type="image/png" sizes="16x16" href="/Files/Templates/Designs/1883_Iris/images/favicon/favicon-16x16.png"> 89 90 @* -- -- -- ER INDSAT FOR AT FÅ DE GAMLE FORMULARER "FOR DATALISTER" TIL AT VIRKE -- -- -- *@ 91 @*<link href="/Files/Templates/Designs/1883_Iris/javascript/validation-2013/formValidation.min.css" rel="stylesheet"> 92 <script src="/Files/Templates/Designs/1883_Iris/javascript/validation-2013/formValidation.min.js"></script>*@ 93 94 <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script> 95 96 @* -- -- -- -- --*@ 97 <script src="/Files/Templates/Designs/1883_Iris/javascript/LoanApplication/TjLaanLoanApplication.nocache.js?v=060220231832"></script> 98 <link rel="stylesheet" href="/Files/Templates/Designs/1883_Iris/css/application-tjlaan.css?v=060220231832"> 99 @* -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- *@ 100 101 @GetValue("Item.Area.ScriptsHead") 102 <style> 103 #loading-overlay { 104 background: #fff; 105 position: fixed; 106 height: 100%; 107 width: 100%; 108 z-index: 9999; 109 top: 0; 110 left: 0; 111 float: left; 112 text-align: center; 113 padding-top: 25%; 114 } 115 116 .datepicker.dropdown-menu { 117 position: absolute; 118 } 119 120 #formSave1 .bg-warning { 121 background: #c9df9a; 122 } 123 #formSave1 .help-block { 124 color: #000000; 125 } 126 127 .mobile-nav:focus, .mobile-nav:active, .mobile-nav:hover { 128 color: #83b71b; 129 } 130 131 @@media (max-width:1199px) and (min-width:992px) { 132 .mobile-nav { 133 line-height: 100px; 134 transition: all .3s; 135 } 136 } 137 138 #splashModal .modal-content { 139 border-radius: 0; 140 } 141 142 #splashModal .btn-close { 143 box-sizing: content-box; 144 width: 1em; 145 height: 1em; 146 border: 0; 147 opacity: .5; 148 margin-left: auto; 149 position: absolute; 150 right: 1rem; 151 background: none; 152 top: 15px; 153 } 154 155 #TopNav a[target="_blank"] { background: #e6f1d1; } 156 #TopNav a[target="_blank"]:hover { background: #83b71b; color: white; text-decoration: none; } 157 #TopNav a[target="_blank"]::after { content: "\f061"; margin-left: 5px; display: inline-block; font: normal normal normal 14px/1 FontAwesome; font-size: inherit; text-rendering: auto; -webkit-font-smoothing: antialiased; } 158 159 </style> 160 @GetValue("Stylesheets") 161 @GetValue("Javascripts") 162 </head> 163 164 <body class='@GetGlobalValue("Global:Page.NavigationTag") @headerSettings'> 165 166 167 @GetValue("Item.Area.ScriptsBodyBegin") 168 <div id="loading-overlay"></div> 169 <div class="page-wrap @maxWidth" id="page-wrap"> 170 171 @if (GetBoolean("Item.Area.ShowMetaHeader")) { 172 <header class="container-fluid header Fixed"> 173 <div class="meta-header hidden-xs hidden-sm"> 174 @if (GetString("Item.Area.HeaderContentWidth") != "full") 175 { 176 @:<div class="container"> 177 } 178 <div class="row"> 179 @{ 180 string hasLangs = ""; 181 182 if (GetLoop("Item.Area.AreaLanguages").Any()) { 183 hasLangs = "has-langs"; 184 } 185 } 186 <div class="pull-right"> 187 188 @RenderNavigation(new 189 { 190 StartLevel = 1, 191 EndLevel = 1, 192 Template = "I_MetaMenu.xslt" 193 }) 194 @*<div class="search-btn @hasLangs"><i class="fa fa-search"></i> @Translate("Search","Søg")</div>*@ 195 @if (GetLoop("Item.Area.AreaLanguages").Any()) { 196 197 string langLayout = GetString("Item.Area.LanguageLayout"); 198 string langNavClass = ""; 199 if(langLayout == "dropdown" || langLayout == "dropdown-icon-text"){ 200 langNavClass = "language-picker-dropdown"; 201 } else { 202 langNavClass = "language-picker-row"; 203 } 204 <nav class="@langNavClass hidden-xs"> 205 @if(langNavClass == "language-picker-dropdown"){ 206 <ul class="list-unstyled"> 207 <li> 208 <a> 209 @if(GetString("Item.Area.LanguageDropdownIcon") == "globe") 210 { 211 <i class="fa fa-globe"></i> 212 } else { 213 foreach (LoopItem l in GetLoop("Item.Area.AreaLanguages")) 214 { 215 216 if(l.GetBoolean("Item.Area.AreaLanguages.LanguageActive")){ 217 string langIcon = l.GetString("Item.Area.AreaLanguages.LanguageIcon"); 218 <img class="active-flag" src="@langIcon"> 219 } 220 } 221 } 222 </a> 223 <ul class="list-unstyled"> 224 @foreach (LoopItem l in GetLoop("Item.Area.AreaLanguages")) 225 { 226 string langActive = l.GetBoolean("Item.Area.AreaLanguages.LanguageActive") == true ? "activeitem" : ""; 227 string langUrl = l.GetString("Item.Area.AreaLanguages.LanguageURL"); 228 string langName = l.GetString("Item.Area.AreaLanguages.LanguageName"); 229 string langIcon = l.GetString("Item.Area.AreaLanguages.LanguageIcon"); 230 string langIconPresent = ""; 231 232 if(langLayout == "dropdown-icon-text"){ 233 langIconPresent = "lang-icon"; 234 } 235 <li class="@langActive"> 236 <a href="@langUrl" class="@langActive @langIconPresent" title="@langName">@if(langLayout == "dropdown-icon-text"){<img src="@langIcon">}@langName</a> 237 </li> 238 } 239 </ul> 240 </li> 241 </ul> 242 } else { 243 <ul class="list-unstyled @langNavClass"> 244 @foreach (LoopItem l in GetLoop("Item.Area.AreaLanguages")) 245 { 246 string langActive = l.GetBoolean("Item.Area.AreaLanguages.LanguageActive") == true ? "activeitem" : ""; 247 string langUrl = l.GetString("Item.Area.AreaLanguages.LanguageURL"); 248 string langName = l.GetString("Item.Area.AreaLanguages.LanguageName"); 249 string langIcon = l.GetString("Item.Area.AreaLanguages.LanguageIcon"); 250 251 <li class="@langActive"> 252 <a href="@langUrl" class="@langActive" title="@langName"><img src="@langIcon" alt="@langName"></a> 253 </li> 254 255 } 256 </ul> 257 } 258 </nav> 259 } 260 </div> 261 </div> 262 263 @if (GetString("Item.Area.HeaderContentWidth") != "full") 264 { 265 @:</div> 266 } 267 </div> 268 @if (!string.IsNullOrEmpty(GetString("DwAreaSearchPageID"))) 269 { 270 <div class="search-bar meta-search closed"> 271 <div class="container-fluid closed"> 272 <div class="container"> 273 <div class="row"> 274 <div class="col-xs-12 col-md-8 center-col"> 275 <form method="get" action="/Default.aspx"> 276 <fieldset> 277 <div class="input-group input-group-md"> 278 <input type="hidden" name="ID" value='@GetValue("DwAreaSearchPageID")'> 279 <span class="input-group-addon close-search"><i class="fa fa-times"></i></span> 280 <input type="text" class="form-control placeholder" name="q" id="search-field" placeholder='@Translate("searchfor","Søg efter")...' value=""> 281 <span class="input-group-btn"> 282 <input type="submit" class="btn btn-base-color-2" id="search" value='@Translate("SEARCH", "Søg")'> 283 </span> 284 </div> 285 </fieldset> 286 </form> 287 </div> 288 </div> 289 </div> 290 </div> 291 </div> 292 } 293 294 @if (GetString("Item.Area.HeaderContentWidth") != "full") 295 { 296 @:<div class="container main-header-container"> 297 } 298 <div class="row main-header"> 299 <a href="/" class="logo" title='@GetValue("Item.Area.CompanyName")'> 300 @*<img src="/Files/Templates/Designs/1883_Iris/images/logo.png">*@ 301 <img src='@GetValue("Item.Area.LogoWebsite")' title='@GetValue("Item.Area.CompanyName")' alt='@GetValue("Item.Area.CompanyName")'> 302 </a> 303 304 <div class="top-nav-wrap"> 305 <nav class="top-nav hidden-xs hidden-sm" id="top-nav" role="navigation"> 306 @RenderNavigation(new 307 { 308 StartLevel = 1, 309 EndLevel = 3, 310 ExpandMode = "All", 311 Template = "I_TopNav_Omit_MetaMenu.xslt" 312 }) 313 314 </nav> 315 <div class="search-btn @hasLangs visible-xs-block visible-sm-block"><i></i></div> 316 <a href="#mmenu" class="mobile-nav visible-xs-block visible-sm-block"><i class="fa fa-bars"></i></a> 317 </div> 318 </div> 319 @if (GetString("Item.Area.HeaderContentWidth") != "full") 320 { 321 @:</div> 322 } 323 324 </header> 325 } else { 326 <header class="container-fluid header Fixed"> 327 @if (GetString("Item.Area.HeaderContentWidth") != "full") 328 { 329 @:<div class="container"> 330 } 331 <div class="row main-header"> 332 @*<a href="/" class="logo" title='@GetValue("Item.Area.CompanyName")'><img src="/Files/Templates/Designs/1883_Iris/images/logo.png"></a>*@ 333 334 <a href="/" class="logo" title='@GetValue("Item.Area.CompanyName")'> 335 <img src='@GetValue("Item.Area.LogoWebsite")' title='@GetValue("Item.Area.CompanyName")' alt='@GetValue("Item.Area.CompanyName")'> 336 </a> 337 338 <div class="top-nav-wrap"> 339 <nav class="top-nav hidden-xs hidden-sm hidden-md" id="top-nav" role="navigation"> 340 @RenderNavigation(new 341 { 342 StartLevel = 1, 343 EndLevel = 3, 344 ExpandMode = "All", 345 Template = "I_TopNav.xslt" 346 }) 347 </nav> 348 @{ 349 string hasLangs = ""; 350 351 if (GetLoop("Item.Area.AreaLanguages").Any()) { 352 hasLangs = "has-langs"; 353 } 354 } 355 @*<div class="search-btn @hasLangs"><i></i></div>*@ 356 @if (GetLoop("Item.Area.AreaLanguages").Any()) { 357 358 string langLayout = GetString("Item.Area.LanguageLayout"); 359 string langNavClass = ""; 360 if(langLayout == "dropdown" || langLayout == "dropdown-icon-text"){ 361 langNavClass = "language-picker-dropdown"; 362 } else { 363 langNavClass = "language-picker-row"; 364 } 365 <nav class="@langNavClass hidden-xs"> 366 @if(langNavClass == "language-picker-dropdown"){ 367 <ul class="list-unstyled"> 368 <li> 369 <a> 370 @if(GetString("Item.Area.LanguageDropdownIcon") == "globe") 371 { 372 <i class="fa fa-globe"></i> 373 } else { 374 foreach (LoopItem l in GetLoop("Item.Area.AreaLanguages")) 375 { 376 377 if(l.GetBoolean("Item.Area.AreaLanguages.LanguageActive")){ 378 string langIcon = l.GetString("Item.Area.AreaLanguages.LanguageIcon"); 379 <img class="active-flag" src="@langIcon"> 380 } 381 } 382 } 383 </a> 384 <ul class="list-unstyled"> 385 @foreach (LoopItem l in GetLoop("Item.Area.AreaLanguages")) 386 { 387 string langActive = l.GetBoolean("Item.Area.AreaLanguages.LanguageActive") == true ? "activeitem" : ""; 388 string langUrl = l.GetString("Item.Area.AreaLanguages.LanguageURL"); 389 string langName = l.GetString("Item.Area.AreaLanguages.LanguageName"); 390 string langIcon = l.GetString("Item.Area.AreaLanguages.LanguageIcon"); 391 string langIconPresent = ""; 392 393 if(langLayout == "dropdown-icon-text"){ 394 langIconPresent = "lang-icon"; 395 } 396 <li class="@langActive"> 397 <a href="@langUrl" class="@langActive @langIconPresent" title="@langName">@if(langLayout == "dropdown-icon-text"){<img src="@langIcon">}@langName</a> 398 </li> 399 } 400 </ul> 401 </li> 402 </ul> 403 } else { 404 <ul class="list-unstyled @langNavClass"> 405 @foreach (LoopItem l in GetLoop("Item.Area.AreaLanguages")) 406 { 407 string langActive = l.GetBoolean("Item.Area.AreaLanguages.LanguageActive") == true ? "activeitem" : ""; 408 string langUrl = l.GetString("Item.Area.AreaLanguages.LanguageURL"); 409 string langName = l.GetString("Item.Area.AreaLanguages.LanguageName"); 410 string langIcon = l.GetString("Item.Area.AreaLanguages.LanguageIcon"); 411 412 <li class="@langActive"> 413 <a href="@langUrl" class="@langActive" title="@langName"><img src="@langIcon" alt="@langName"></a> 414 </li> 415 416 } 417 </ul> 418 } 419 </nav> 420 } 421 <a href="#top-nav" class="mobile-nav visible-xs-block visible-sm-block visible-md-block"><i class="fa fa-bars"></i></a> 422 </div> 423 </div> 424 @if (GetString("Item.Area.HeaderContentWidth") != "full") 425 { 426 @:</div> 427 } 428 @*@if (!string.IsNullOrEmpty(GetString("DwAreaSearchPageID"))) 429 { 430 <div class="search-bar closed"> 431 <div class="container-fluid closed"> 432 <div class="container"> 433 <div class="row"> 434 <div class="col-xs-12 col-md-8 center-col"> 435 <form method="get" action="/Default.aspx"> 436 <fieldset> 437 <div class="input-group"> 438 <input type="hidden" name="ID" value='@GetValue("DwAreaSearchPageID")'> 439 <input type="text" class="form-control placeholder" name="q" id="search-field" placeholder='@Translate("searchfor","Søg efter")...' value=""> 440 <span class="input-group-btn"> 441 <input type="submit" class="btn btn-base-color-2" id="search" value='@Translate("SEARCH", "Søg")'> 442 </span> 443 </div> 444 </fieldset> 445 </form> 446 </div> 447 </div> 448 </div> 449 </div> 450 </div> 451 }*@ 452 </header> 453 } 454 455 @if (GetBoolean("Item.Area.ShowBreadcrumb") == true && GetBoolean("Item.Page.HideBreadcrumb") != true) 456 { 457 458 string isNewspage = ""; 459 if (GetString("Item.ItemInstanceType") == "I_NewsPage") 460 { 461 isNewspage = "is-newspage"; 462 } 463 464 <div class="container-fluid breadcrumb-wrap"> 465 <div class="container"> 466 <div class="row"> 467 <nav class="col-xs-12 breadcrumb @isNewspage"> 468 @if(!string.IsNullOrEmpty(GetString("Item.Area.BreadcrumbPrefix"))){<span class="prefix">@GetString("Item.Area.BreadcrumbPrefix")</span>} 469 @GetValue("DwNavigation(BreadCrumb)") 470 </nav> 471 </div> 472 </div> 473 </div> 474 } 475 476 @if (GetString("Item.ItemInstanceType") == "I_NewsPage") 477 { 478 <div class="container-fluid news-list news-page-header"> 479 <div class="container"> 480 <div class="row"> 481 <div class="col-xs-12"> 482 <p class="date-author"><span><i class="fa fa-calendar" aria-hidden="true"></i>@GetDate("Item.DateTime").ToLongDateString() - kl. @GetDate("Item.DateTime").ToShortTimeString()</span><span><i class="fa fa-user-circle-o" aria-hidden="true"></i>@GetString("Item.Author")</span></p> 483 </div> 484 </div> 485 </div> 486 </div> 487 } 488 <div class="content-width"> 489 490 @using System.Data.SqlClient 491 @using System.Text 492 @functions { 493 public class Ansoegningsblanket { 494 public int id { get; set; } 495 public string navn { get; set; } 496 public string bopael { get; set; } 497 public string postnummer { get; set; } 498 public string by { get; set; } 499 public string telefonnummer { get; set; } 500 public string mobiltelefonnummer { get; set; } 501 public string email { get; set; } 502 public string cprnummer { get; set; } 503 public string fil { get; set; } 504 public string anbefaler { get; set; } 505 public DateTime anbefaler_dato { get; set; } 506 public string kommentar { get; set; } 507 public DateTime _dato { get; set; } 508 public string _ip { get; set; } 509 public string _browser { get; set; } 510 public string _data { get; set; } 511 512 public static Ansoegningsblanket LoadBlanket(int rowId) { 513 return LoadBlanket("2016", rowId); 514 } 515 516 public static Ansoegningsblanket LoadBlanket(string suffix, int rowId) { 517 using (var connection = Dynamicweb.Data.Database.CreateConnection()) { 518 using (var command = connection.CreateCommand()) { 519 command.CommandText = "SELECT * FROM Ansoegningsblanket_" + suffix + " WHERE Ansoegningsblanket_" + suffix + "ID = @id"; 520 521 command.Parameters.Add(new SqlParameter("@id", rowId)); 522 523 using (var reader = command.ExecuteReader()) { 524 if (reader.Read()) { 525 return new Ansoegningsblanket { 526 id = reader.GetInt32(reader.GetOrdinal("Ansoegningsblanket_" + suffix + "ID")), 527 navn = reader.GetString(reader.GetOrdinal("Ansoegningsblanket_" + suffix + "_Navn")), 528 bopael = reader.GetString(reader.GetOrdinal("Ansoegningsblanket_" + suffix + "_Bopael")), 529 postnummer = reader.GetString(reader.GetOrdinal("Ansoegningsblanket_" + suffix + "_Postnummer")), 530 by = reader.GetString(reader.GetOrdinal("Ansoegningsblanket_" + suffix + "_By")), 531 telefonnummer = reader.GetString(reader.GetOrdinal("Ansoegningsblanket_" + suffix + "_Telefonnummer")), 532 mobiltelefonnummer = reader.GetString(reader.GetOrdinal("Ansoegningsblanket_" + suffix + "_Mobiltelefonnummer")), 533 email = reader.GetString(reader.GetOrdinal("Ansoegningsblanket_" + suffix + "_Email")), 534 cprnummer = reader.GetString(reader.GetOrdinal("Ansoegningsblanket_" + suffix + "_CPRnummer")), 535 fil = reader.GetString(reader.GetOrdinal("Ansoegningsblanket_" + suffix + "_Fil")), 536 anbefaler = reader.GetString(reader.GetOrdinal("Ansoegningsblanket_" + suffix + "_Anbefaler")), 537 anbefaler_dato = reader.IsDBNull(reader.GetOrdinal("Ansoegningsblanket_" + suffix + "_Anbefaler_Dato")) ? DateTime.MinValue : reader.GetDateTime(reader.GetOrdinal("Ansoegningsblanket_" + suffix + "_Anbefaler_Dato")), 538 kommentar = reader.GetString(reader.GetOrdinal("Ansoegningsblanket_" + suffix + "_Kommentar")), 539 _dato = reader.GetDateTime(reader.GetOrdinal("Ansoegningsblanket_" + suffix + "__Dato")), 540 _ip = reader.GetString(reader.GetOrdinal("Ansoegningsblanket_" + suffix + "__IP")), 541 _browser = reader.GetString(reader.GetOrdinal("Ansoegningsblanket_" + suffix + "__Browser")), 542 _data = reader.GetString(reader.GetOrdinal("Ansoegningsblanket_" + suffix + "__Data")) 543 }; 544 } 545 } 546 } 547 } 548 549 return null; 550 } 551 552 private static int[] XorKeys { 553 get { 554 return new[] { 210, 184, 99, 118, 57, 160, 85, 172, 21, 155, 114, 183, 208, 102, 176, 49 }; 555 } 556 } 557 558 private static string BytesToHex(byte[] bytes) { 559 var c = new char[bytes.Length * 2]; 560 561 for (var i = 0; i < bytes.Length; i++) { 562 var b = (byte)(bytes[i] >> 4); 563 c[i * 2] = (char)(b > 9 ? b + 0x37 + 0x20 : b + 0x30); 564 b = (byte)(bytes[i] & 0xF); 565 c[i * 2 + 1] = (char)(b > 9 ? b + 0x37 + 0x20 : b + 0x30); 566 } 567 568 return new string(c); 569 } 570 571 private static byte[] HexToBytes(string hex) { 572 var bytes = new byte[hex.Length / 2]; 573 574 for (var i = 0; i < bytes.Length; i++) { 575 var c = hex[i * 2]; 576 bytes[i] = (byte)((c > '9' ? (c > 'Z' ? (c - 'a' + 10) : (c - 'A' + 10)) : (c - '0')) << 4); 577 c = hex[i * 2 + 1]; 578 bytes[i] |= (byte)(c > '9' ? (c > 'Z' ? (c - 'a' + 10) : (c - 'A' + 10)) : (c - '0')); 579 } 580 581 return bytes; 582 } 583 584 public static string XorEncrypt(string value) 585 { 586 var buffer = Encoding.UTF8.GetBytes(value); 587 var hashed = new byte[buffer.Length + 16]; 588 var keys = XorKeys; 589 var salt = (Guid.NewGuid()).ToByteArray(); 590 var j = 0; 591 592 for (var i = 0; i < 8; i++) { 593 hashed[i] = (byte)(salt[i] ^ (uint)keys[i]); 594 hashed[i + 8 + buffer.Length] = (byte)(salt[i + 8] ^ (uint)keys[i + 8]); 595 } 596 597 for (var i = 0; i < buffer.Length; i++) { 598 if (j >= 16) 599 j = 0; 600 hashed[i + 8] = (byte)((buffer[i] ^ (uint)salt[j]) ^ 135u); 601 j++; 602 } 603 604 return BytesToHex(hashed); 605 } 606 607 public static string XorDecrypt(string value) { 608 var hashed = HexToBytes(value); 609 var buffer = new byte[hashed.Length - 16]; 610 var keys = XorKeys; 611 var salt = new byte[16]; 612 var j = 0; 613 614 for (var i = 0; i < 8; i++) { 615 salt[i] = (byte)(hashed[i] ^ (uint)keys[i]); 616 salt[i + 8] = (byte)(hashed[i + 8 + buffer.Length] ^ (uint)keys[i + 8]); 617 } 618 619 for (var i = 0; i < buffer.Length; i++) { 620 if (j >= 16) 621 j = 0; 622 buffer[i] = (byte)((hashed[i + 8] ^ 135u) ^ salt[j]); 623 j++; 624 } 625 626 return Encoding.UTF8.GetString(buffer); 627 } 628 } 629 } 630 @SnippetStart("StyleSheet") 631 @SnippetEnd("StyleSheet") 632 @SnippetStart("sidenavheader") 633 @SnippetEnd("sidenavheader") 634 @SnippetStart("sidetags") 635 @SnippetEnd("sidetags") 636 @{ 637 var rowId = Ansoegningsblanket.XorDecrypt(HttpContext.Current.Request.QueryString["rId"]).Split(':')[1]; 638 var blanket = string.IsNullOrWhiteSpace(rowId) ? null : Ansoegningsblanket.LoadBlanket("2016", int.Parse(rowId)); 639 } 640 641 @GetValue("DwContent(content)") 642 @GetValue("DwContent(menuwrap)") 643 644 645 646 @if(blanket != null) { 647 648 var datajson = Newtonsoft.Json.Linq.JObject.Parse(blanket._data); 649 var data_GenerateSend = (string)datajson["_Data_GenerateSend"]["value"]; 650 var cryptId = Ansoegningsblanket.XorEncrypt(DateTime.Now.Ticks + ":" + blanket.id); 651 652 <style type="text/css"> 653 #centerColumn { 654 min-height: auto; 655 } 656 </style> 657 658 if(data_GenerateSend == "PDF") { 659 <div class="container" style="padding-top: 45px;"> 660 <div class="row"> 661 <div class="col-xs-12"> 662 <div class="row "> 663 <div class="col-xs-8 themed-text text-xs-left"> 664 <h1>Du har valgt at sende fysisk</h1> 665 <p>Tak for udfyldelse af lånansøgningen. Du kan ved klik på nedenstående link, printe eller gemme din låneansøgning. Låneansøgningen sender du efterfølgende pr. brev eller via en e-mail til din kontaktperson.</p> 666 <a href="/Admin/Public/Ansoegningsblanket_2016HandlerV2.ashx?methodName=GetPDF&amp;id=@(cryptId)" class="btn btn-default" role="button" target="_blank">Print/Gem ansøgning</a> 667 </div> 668 </div> 669 </div> 670 </div> 671 </div> 672 673 } else { 674 675 <div class="container" style="padding-top: 45px;"> 676 <div class="row"> 677 <div class="col-xs-12"> 678 <div class="row "> 679 <div class="col-xs-8 themed-text text-xs-left"> 680 <h1>Tak for din ansøgning, som du nu har sendt til din faglige organisation.</h1> 681 <p>Når vi modtager ansøgningen fra din organisation, behandler vi ansøgningen og sender afgørelsen til din mail.</p> 682 <p>Er lånet bevilget sender vi samtidig lånedokumenterne via E-Signatur til din mail og de skal underskrives med din NemID. 683 <br> 684 Såfremt du ikke har NemID kan dokumenterne fremsendes med post. Du skal så kontakte låneforeningens kontor.</p> 685 <p>Lånet kan først udbetales til din NemKonto når vi efterfølgende har fået noteret lånet på dit lønkontor.</p> 686 </div> 687 </div> 688 </div> 689 </div> 690 </div> 691 692 } 693 } 694 695 696 697 @GetValue("DwContent(dwcontent)") 698 </div> 699 <footer class="footer container-fluid"> 700 <div class="container"> 701 @*<div class="row footer-top"> 702 703 <div class="col-margin-bottom text-xs-center col-xs-2 footer-logo"> 704 <a href="/" class="logo" title='@GetValue("Item.Area.CompanyName")'> 705 <img src='@GetValue("Item.Area.LogoWebsite")' title='@GetValue("Item.Area.CompanyName")' alt='@GetValue("Item.Area.CompanyName")' class="img-responsive"> 706 </a> 707 </div> 708 709 <div class="col-margin-bottom text-xs-center col-xs-10"> 710 <div class="row"> 711 @using System.Linq; 712 713 @{ 714 var footercolumns = GetLoop("Item.Area.FooterColumns").OrderBy(g => g.GetString("Item.Area.FooterColumns.Sort")).ToList(); 715 716 foreach (LoopItem i in footercolumns) 717 { 718 <div class='col-margin-bottom text-xs-center @ColumnClassFooter(@i.GetString("Item.Area.FooterColumns.WidthSettings.WidthMobile")+" ",@i.GetString("Item.Area.FooterColumns.WidthSettings.WidthTabletPortrait")+" ",@i.GetString("Item.Area.FooterColumns.WidthSettings.WidthTabletLandscape")+" ",@i.GetString("Item.Area.FooterColumns.WidthSettings.WidthDesktop")+" ")'> 719 @i.GetString("Item.Area.FooterColumns.Text") 720 721 @{ 722 var socialmedia = i.GetLoop("Item.Area.FooterColumns.SocialeMedier").OrderBy(d => d.GetString("Item.Area.FooterColumns.SocialeMedier.Sort")).ToList(); 723 724 foreach (LoopItem s in socialmedia) { 725 <a href='@s.GetString("Item.Area.FooterColumns.SocialeMedier.MediaURL")' class='social-media-circle' title='@s.GetString("Item.Area.FooterColumns.SocialeMedier.Name")' target='_blank'> 726 <i class='fa @s.GetString("Item.Area.FooterColumns.SocialeMedier.FontAwesomeClass")'></i> 727 </a> 728 } 729 } 730 731 </div> 732 733 } 734 } 735 736 @functions { 737 public string ColumnClassFooter(string mobile,string portrait,string landscape,string desktop) 738 { 739 if (string.IsNullOrWhiteSpace(mobile)) { 740 mobile = "col-xs-12 "; 741 } 742 743 if (string.IsNullOrWhiteSpace(portrait)) { 744 portrait = ""; 745 } 746 747 if (string.IsNullOrWhiteSpace(landscape)) { 748 landscape = ""; 749 } 750 751 return mobile + portrait + landscape + desktop; 752 } 753 } 754 </div> 755 </div> 756 757 </div>*@ 758 759 <div class="row footer-top"> 760 761 @* <div class="col-margin-bottom text-xs-center col-xs-12 footer-logo"> 762 <a href="/" class="logo" title='@GetValue("Item.Area.CompanyName")'> 763 <img src='@GetValue("Item.Area.FooterLogoWebsite")' title='@GetValue("Item.Area.CompanyName")' alt='@GetValue("Item.Area.CompanyName")' class="img-responsive"> 764 </a> 765 </div> *@ 766 767 <div class="col-margin-bottom text-xs-center col-xs-12"> 768 <div class="row"> 769 @using System.Linq; 770 771 @{ 772 var footercolumns = GetLoop("Item.Area.FooterColumns").OrderBy(g => g.GetString("Item.Area.FooterColumns.Sort")).ToList(); 773 774 foreach (LoopItem i in footercolumns) 775 { 776 <div class='col-margin-bottom text-xs-center @ColumnClassFooter(@i.GetString("Item.Area.FooterColumns.WidthSettings.WidthMobile")+" ",@i.GetString("Item.Area.FooterColumns.WidthSettings.WidthTabletPortrait")+" ",@i.GetString("Item.Area.FooterColumns.WidthSettings.WidthTabletLandscape")+" ",@i.GetString("Item.Area.FooterColumns.WidthSettings.WidthDesktop")+" ")'> 777 @i.GetString("Item.Area.FooterColumns.Text") 778 779 @{ 780 var socialmedia = i.GetLoop("Item.Area.FooterColumns.SocialeMedier").OrderBy(d => d.GetString("Item.Area.FooterColumns.SocialeMedier.Sort")).ToList(); 781 782 foreach (LoopItem s in socialmedia) { 783 <a href='@s.GetString("Item.Area.FooterColumns.SocialeMedier.MediaURL")' class='social-media-circle' title='@s.GetString("Item.Area.FooterColumns.SocialeMedier.Name")' target='_blank'> 784 <i class='fa @s.GetString("Item.Area.FooterColumns.SocialeMedier.FontAwesomeClass")'></i> 785 </a> 786 } 787 } 788 789 </div> 790 791 } 792 } 793 794 @functions { 795 public string ColumnClassFooter(string mobile,string portrait,string landscape,string desktop) 796 { 797 if (string.IsNullOrWhiteSpace(mobile)) { 798 mobile = "col-xs-12 "; 799 } 800 801 if (string.IsNullOrWhiteSpace(portrait)) { 802 portrait = ""; 803 } 804 805 if (string.IsNullOrWhiteSpace(landscape)) { 806 landscape = ""; 807 } 808 809 return mobile + portrait + landscape + desktop; 810 } 811 } 812 </div> 813 </div> 814 815 </div> 816 817 @if(!String.IsNullOrWhiteSpace(GetString("Item.Area.FooterCopyright"))){ 818 819 <div class="row footer-bottom"> 820 <div class="col-xs-12 text-center"> 821 <small> 822 © Copyright @GetGlobalValue("Global:Server.Date.Year") @GetString("Item.Area.FooterCopyright") 823 @if(!String.IsNullOrWhiteSpace(GetString("Item.Area.FooterWebsiteBy"))){ 824 <span>|</span> @GetString("Item.Area.FooterWebsiteBy") 825 } 826 </small> 827 828 </div> 829 </div> 830 } 831 832 </div> 833 </footer> 834 @* remove commenting if the "MetaMenu" is in use on this site *@ 835 836 <nav id="mmenu"> 837 @GetValue("DwNavigation(menupanel)") 838 @if (GetLoop("Item.Area.AreaLanguages").Any()) { 839 string langLayout = GetString("Item.Area.LanguageLayout"); 840 string langNavClass = "language-picker-dropdown"; 841 <ul id="languages-panel"> 842 @foreach (LoopItem l in GetLoop("Item.Area.AreaLanguages")) 843 { 844 string langActive = l.GetBoolean("Item.Area.AreaLanguages.LanguageActive") == true ? "active-language" : ""; 845 string langUrl = l.GetString("Item.Area.AreaLanguages.LanguageURL"); 846 string langName = l.GetString("Item.Area.AreaLanguages.LanguageName"); 847 string langIcon = l.GetString("Item.Area.AreaLanguages.LanguageIcon"); 848 string langIconPresent = ""; 849 850 if(langLayout == "dropdown-icon-text" || langLayout == "icon-row"){ 851 langIconPresent = "lang-icon"; 852 } 853 <li class="@langActive"> 854 <a href="@langUrl" class="@langActive @langIconPresent" title="@langName">@if(langLayout == "dropdown-icon-text" || langLayout == "icon-row"){<img src="@langIcon">}@langName</a> 855 </li> 856 } 857 </ul> 858 } 859 </nav> 860 861 @SnippetStart("sidenav") 862 <nav class="side-sub-nav"> 863 @GetValue("DwNavigation(SideNav)") 864 </nav> 865 @SnippetEnd("sidenav") 866 </div> 867 868 869 @* -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- COOKIE -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- *@ 870 871 872 @*@{ 873 string cookieChoiceId = "cookie-choice-renew"; 874 string cookieWarningClass = "custom-cookie"; 875 if (Dynamicweb.Environment.CookieManager.CookieOptInLevelExists) 876 { 877 cookieWarningClass += " \" style=\"display:none\" tab-index=\"-1\" aria-hidden=\"true\""; 878 } 879 else 880 { 881 cookieChoiceId += "\" style=\"display:none;"; 882 } 883 var cookieSettingsPage = Dynamicweb.Services.Pages.GetPageByNavigationTag(Pageview.AreaID, "cookiesettings"); 884 bool cookieActivated = cookieSettingsPage != null && cookieSettingsPage.Item["CookieActivated"] != null ? (bool)cookieSettingsPage.Item["CookieActivated"] : false; 885 } 886 887 @if (cookieActivated && cookieSettingsPage != null && cookieSettingsPage.Item["CookieCategories"] != null) 888 { 889 var cookieCategoryItems = Dynamicweb.Content.Items.ItemList.GetItemListById((int)cookieSettingsPage.Item["CookieCategories"]).Relations; 890 if (cookieCategoryItems.Any()) 891 { 892 <div id="@cookieChoiceId" title="Cookie valg" aria-label="renew-consent" style="height:35px;width:35px;z-index:500;"> 893 <svg class="svg-inline--fa fa-cookie-bite fa-w-16" aria-hidden="true" focusable="false" data-prefix="fal" data-icon="cookie-bite" role="img" xmlns="http://www.w3.org/2000/svg" viewbox="0 0 512 512" data-fa-i2svg=""><path fill="currentColor" d="M352 328c-13.25 0-24 10.74-24 24 0 13.25 10.75 24 24 24s24-10.75 24-24c0-13.26-10.75-24-24-24zM184 192c0-13.26-10.75-24-24-24s-24 10.74-24 24c0 13.25 10.75 24 24 24s24-10.75 24-24zm8 136c-13.25 0-24 10.74-24 24 0 13.25 10.75 24 24 24s24-10.75 24-24c0-13.26-10.75-24-24-24zm96-96c-13.25 0-24 10.74-24 24 0 13.25 10.75 24 24 24s24-10.75 24-24c0-13.26-10.75-24-24-24zm222.52 23.82c-69.97-.85-126.47-57.69-126.47-127.86-70.17 0-127-56.49-127.86-126.45C249.57.5 242.9 0 236.26 0c-20.68 0-41.18 4.85-59.79 14.33l-69.13 35.22a132.221 132.221 0 0 0-57.79 57.81l-35.1 68.88a132.645 132.645 0 0 0-12.82 80.95l12.08 76.28a132.555 132.555 0 0 0 37.16 72.96l54.77 54.76a132.036 132.036 0 0 0 72.71 37.06l76.71 12.14c6.86 1.09 13.76 1.62 20.64 1.62 20.72 0 41.25-4.88 59.89-14.38l69.13-35.22a132.221 132.221 0 0 0 57.79-57.81l35.1-68.88c12.56-24.63 17.01-52.57 12.91-79.9zm-41.42 65.36L434 390.07c-9.68 19-24.83 34.15-43.81 43.82l-69.13 35.22C307.08 476.23 291.39 480 275.7 480c-5.21 0-10.47-.41-15.63-1.23l-76.7-12.14c-21-3.33-40.05-13.04-55.09-28.08l-54.77-54.76c-15.1-15.09-24.84-34.23-28.18-55.33l-12.08-76.27c-3.35-21.12.02-42.36 9.72-61.41l35.1-68.88c9.68-19 24.83-34.15 43.81-43.82L191 42.85c11.33-5.77 23.8-9.33 36.51-10.46 13.15 63.15 63.84 112.95 127.25 124.86 11.91 63.42 61.71 114.11 124.87 127.25-1.1 12.73-4.64 25.14-10.53 36.68z"></path></svg> 894 </div> 895 <div id="cookieWarningContainer" class="@cookieWarningClass"> 896 <form id="cookieWarningForm" method="post" action="/Admin/Public/CookieOptInLevelConfig.aspx"> 897 <input type="hidden" name="cmd" value="SetCookieOptInLevel"> 898 <input type="hidden" name="OptInLevel" id="OptInLevel" value="1"> 899 900 <fieldset> 901 <div class="p-4"> 902 <div class="row"> 903 <div class="col-xs-12"> 904 <h2>@cookieSettingsPage.Item["CookieHeader"]</h2> 905 @cookieSettingsPage.Item["CookieIntro"] 906 <hr class="mt-4 mb-4 w-100"> 907 <p class="text-center"> 908 <button type="button" class="btn btn-base-color-2 ml-3" onclick="setOptInCookie(1);">@Translate("Tillad valgte")</button> 909 <button type="button" class="btn btn-base-color-3 ml-3" onclick="setOptInCookie(2);">@Translate("Tillad alle")</button> 910 </p> 911 912 </div> 913 </div> 914 </div> 915 @{ 916 string showDetails = Translate("Vis detaljer"); 917 string hideDetails = Translate("Skjul detaljer"); 918 <div class="p-4"> 919 <div class="grid"> 920 @foreach (Dynamicweb.Content.Items.Item category in cookieCategoryItems) 921 { 922 string categoryName = "" + category["Name"]; 923 string categorySysName = "" + category["SysName"]; 924 string categoryID = "cookecategory-" + category.Id; 925 string categoryDescription = "" + category["Description"]; 926 var cookies = Dynamicweb.Content.Items.ItemList.GetItemListById((int)category["Cookies"]).Relations; 927 928 if (cookies.Any()) 929 { 930 <div class="col-xs-4"> 931 <div class="custom-control custom-checkbox text-center" data-nogutter="1"> 932 <span class="d-block">@categoryName</span> 933 @if (categorySysName == "Essential") 934 { 935 <input type="checkbox" class="custom-control-input" id="chk-cookie-@categorySysName" value="@categorySysName" checked="checked" disabled="disabled" disabled="disabled" disabled="disabled" disabled="disabled" disabled="disabled" disabled="disabled" disabled="disabled" disabled="disabled" disabled="disabled" disabled="disabled" disabled="disabled" disabled="disabled" disabled="disabled" disabled="disabled" disabled="disabled" disabled="disabled" disabled="disabled" disabled="disabled" disabled="disabled" disabled="disabled" disabled="disabled" disabled="disabled" disabled="disabled" disabled="disabled" disabled="disabled" disabled="disabled" disabled="disabled" disabled="disabled" disabled="disabled" disabled="disabled" disabled="disabled" disabled="disabled"> 936 } 937 else 938 { 939 if (AllowedCookieCategories.Contains(categorySysName)) 940 { 941 <input type="checkbox" class="custom-control-input" checked="checked" id="chk-cookie-@categorySysName" name="OptInCategory" value="@categorySysName"> 942 } 943 else 944 { 945 <input type="checkbox" class="custom-control-input" id="chk-cookie-@categorySysName" name="OptInCategory" value="@categorySysName"> 946 } 947 } 948 <label class="custom-control-label" for="chk-cookie-@categorySysName"></label> 949 </div> 950 </div> 951 } 952 } 953 954 </div> 955 <div class="row"> 956 <div class="col-xs-12"> 957 <hr class="mt-4 mb-4 w-100"> 958 <p class="text-center"> 959 <button class="btn btn-primary-naked collapsed" id="cookie-details-button" data-toggle="collapse" role="button" aria-expanded="false" data-open-text="@showDetails" data-close-text="@hideDetails" aria-controls="collapse-cookie-info-container"> 960 @showDetails 961 </button> 962 </p> 963 </div> 964 </div> 965 </div> 966 <div class="collapse" id="collapse-cookie-info-container"> 967 <div class="cookie-info-container"> 968 <div class="mb-4"> 969 @foreach (Dynamicweb.Content.Items.Item category in cookieCategoryItems) 970 { 971 string categoryName = "" + category["Name"]; 972 string categorySysName = "" + category["SysName"]; 973 string categoryID = "cookecategory-" + category.Id; 974 string categoryDescription = "" + category["Description"]; 975 var cookies = Dynamicweb.Content.Items.ItemList.GetItemListById((int)category["Cookies"]).Relations; 976 if (cookies.Any()) 977 { 978 <div class="d-block toogle-f-content" data-toggle="collapse" role="button" aria-expanded="false" aria-controls="collapse-cookie-info-@categoryID"> 979 <div class="row"> 980 <div class="col-xs-12 col-sm-3 cookie-info-container-title"> 981 <i class="fa fa-angle-right" aria-hidden="true"></i> 982 983 <strong>@categoryName</strong> 984 985 </div> 986 <div class="col-xs-12 col-sm-9"> 987 @categoryDescription 988 </div> 989 </div> 990 </div> 991 <div class="collapse" id="collapse-cookie-info-@categoryID"> 992 @foreach (Dynamicweb.Content.Items.Item cookie in cookies) 993 { 994 string titleClass = "col-xs-12 col-sm-3"; 995 string contentClass = "col-xs-12 col-sm-9"; 996 997 <div class="grid p-1"> 998 <div class="row collapse-cookie-info-header"> 999 <div class="@titleClass"> 1000 <strong> 1001 @Translate("Databehandler") 1002 </strong> 1003 </div> 1004 <div class="@contentClass"> 1005 <p>@cookie["DataProcessor"]</p> 1006 </div> 1007 </div> 1008 <div class="row"> 1009 <div class="@titleClass"> 1010 <strong> 1011 @Translate("Formål") 1012 </strong> 1013 </div> 1014 <div class="@contentClass"> 1015 @cookie["Purpose"] 1016 </div> 1017 <div class="@titleClass"> 1018 <strong> 1019 @Translate("Privatlivspolitik:") 1020 </strong> 1021 </div> 1022 <div class="@contentClass"> 1023 <p><a target="_blank" href="@cookie[" privacypolicy"]"="">@cookie["PrivacyPolicy"]</a></p> 1024 </div> 1025 <div class="@titleClass"> 1026 <strong> 1027 @Translate("Udløb") 1028 </strong> 1029 </div> 1030 <div class="@contentClass"> 1031 <p>@cookie["Expires"]</p> 1032 </div> 1033 <div class="@titleClass"> 1034 <strong> 1035 @Translate("Navn") 1036 </strong> 1037 </div> 1038 <div class="@contentClass"> 1039 <p>@cookie["Name"]</p> 1040 </div> 1041 <div class="@titleClass"> 1042 <strong> 1043 @Translate("Udbyder") 1044 </strong> 1045 </div> 1046 <div class="@contentClass"> 1047 <p>@cookie["Provider"]</p> 1048 </div> 1049 </div> 1050 </div> 1051 } 1052 </div> 1053 } 1054 } 1055 </div> 1056 </div> 1057 </div> 1058 1059 } 1060 </fieldset> 1061 </form> 1062 1063 <script> 1064 document.getElementById("cookie-choice-renew").onclick = function () { 1065 showCookieChoice(); 1066 }; 1067 document.getElementById("cookie-details-button").onclick = function () { 1068 1069 if (this.classList.contains("opened")) { 1070 this.text = this.getAttribute("data-open-text"); 1071 this.classList.remove("opened"); 1072 document.getElementById("collapse-cookie-info-container").classList.remove("show"); 1073 } else { 1074 this.text = this.getAttribute("data-close-text"); 1075 this.classList.add("opened"); 1076 1077 document.getElementById("collapse-cookie-info-container").classList.add("show"); 1078 } 1079 }; 1080 var cookieExtraInfoElements = document.getElementsByClassName("toogle-f-content"); 1081 for (var i = 0; i < cookieExtraInfoElements.length; i++) { 1082 1083 cookieExtraInfoElements[i].onclick = function () { 1084 var elementToToggle = this.getAttribute("aria-controls"); 1085 if (this.classList.contains("opened")) { 1086 this.classList.remove("opened"); 1087 document.getElementById(elementToToggle).classList.remove("show"); 1088 } else { 1089 this.classList.add("opened"); 1090 document.getElementById(elementToToggle).classList.add("show"); 1091 } 1092 } 1093 } 1094 1095 1096 function setOptInCookie(optInLevel) { 1097 document.getElementById("OptInLevel").value = optInLevel; 1098 var formElement = document.getElementById("cookieWarningForm"); 1099 if (optInLevel == 1) { 1100 var essentialElement = document.createElement('input'); 1101 if (document.getElementById('cookie-essential') === null) { 1102 essentialElement.setAttribute("name", "OptInCategory"); 1103 essentialElement.setAttribute("value", "Essential"); 1104 essentialElement.setAttribute("type", "hidden"); 1105 essentialElement.setAttribute("id", "cookie-essential"); 1106 formElement.appendChild(essentialElement); 1107 } 1108 1109 if (document.getElementById("chk-cookie-Marketing") != null && document.getElementById("chk-cookie-Marketing").checked && typeof fbq !== 'undefined') { 1110 fbq('consent', 'grant'); 1111 } 1112 } 1113 if (optInLevel == 2) { 1114 if (document.getElementById("chk-cookie-Statistical") != null) { 1115 document.getElementById("chk-cookie-Statistical").checked = true; 1116 } 1117 if (document.getElementById("chk-cookie-Marketing") != null) { 1118 document.getElementById("chk-cookie-Marketing").checked = true; 1119 } 1120 1121 if (typeof fbq !== 'undefined') { 1122 fbq('consent', 'grant'); 1123 } 1124 1125 } 1126 var formData = new FormData(formElement); 1127 1128 var xmlhttp = new XMLHttpRequest(); 1129 xmlhttp.onreadystatechange = function () { 1130 if (xmlhttp.readyState == 4 && xmlhttp.status == 200) { 1131 hideCookieChoice(); 1132 return false; 1133 } 1134 } 1135 1136 xmlhttp.open(formElement.method, formElement.action); 1137 xmlhttp.send(formData); 1138 1139 return false; 1140 } 1141 function showCookieChoice() { 1142 1143 var cookieWarningContainer = document.getElementById("cookieWarningContainer"); 1144 cookieWarningContainer.style.display = "flex"; 1145 cookieWarningContainer.removeAttribute("tab-index"); 1146 cookieWarningContainer.removeAttribute("aria-hidden"); 1147 if (document.getElementById("cookie-choice-renew") != null) { 1148 document.getElementById("cookie-choice-renew").style.display = "none"; 1149 } 1150 1151 } 1152 function hideCookieChoice() { 1153 1154 var cookieWarningContainer = document.getElementById("cookieWarningContainer"); 1155 cookieWarningContainer.style.display = "none"; 1156 cookieWarningContainer.setAttribute("tab-index", "-1"); 1157 cookieWarningContainer.setAttribute("aria-hidden", "true"); 1158 1159 if (document.getElementById("cookie-choice-renew") != null) { 1160 document.getElementById("cookie-choice-renew").style.display = "block"; 1161 } 1162 1163 } 1164 </script> 1165 </div> 1166 } 1167 1168 }*@ 1169 1170 @* -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- *@ 1171 1172 @* -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- POPUP -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- *@ 1173 1174 @if (GetBoolean("Item.Area.Popup_Active")) { 1175 1176 string popUpHeader = GetString("Item.Area.Popup_Header"); 1177 string popUpText = GetString("Item.Area.Popup_Text"); 1178 string popUpLink = GetString("Item.Area.Popup_Link"); 1179 string popUpCode = GetString("Item.Area.Popup_Code"); 1180 1181 if (!string.IsNullOrWhiteSpace(popUpCode)) { 1182 if (Dynamicweb.Context.Current.Request.Cookies["splash"] == null || Dynamicweb.Context.Current.Request.Cookies["splash"].Value != popUpCode) { 1183 <div class="modal fade popup" id="splashModal" tabindex="-1" role="dialog" aria-labelledby="splashModal" aria-hidden="true" data-splash-code="@popUpCode"> 1184 <div class="modal-dialog"> 1185 1186 <div class="modal-content"> 1187 <div class="modal-header"> 1188 1189 @if (!string.IsNullOrWhiteSpace(popUpHeader)) { 1190 <h5 class="modal-title" id="ModalLabel">@popUpHeader</h5> 1191 } 1192 1193 <button type="button" class="btn-close" data-dismiss="modal" aria-label="Close"> 1194 <svg aria-hidden="true" focusable="false" data-prefix="fal" data-icon="times" class="svg-inline--fa fa-times fa-w-10" role="img" xmlns="http://www.w3.org/2000/svg" viewbox="0 0 320 512"><path fill="#006c7d" d="M193.94 256L296.5 153.44l21.15-21.15c3.12-3.12 3.12-8.19 0-11.31l-22.63-22.63c-3.12-3.12-8.19-3.12-11.31 0L160 222.06 36.29 98.34c-3.12-3.12-8.19-3.12-11.31 0L2.34 120.97c-3.12 3.12-3.12 8.19 0 11.31L126.06 256 2.34 379.71c-3.12 3.12-3.12 8.19 0 11.31l22.63 22.63c3.12 3.12 8.19 3.12 11.31 0L160 289.94 262.56 392.5l21.15 21.15c3.12 3.12 8.19 3.12 11.31 0l22.63-22.63c3.12-3.12 3.12-8.19 0-11.31L193.94 256z"></path></svg> 1195 </button> 1196 1197 </div> 1198 <div class="modal-body"> 1199 @if (!string.IsNullOrWhiteSpace(popUpText)) { 1200 @popUpText 1201 } 1202 </div> 1203 1204 <div class="modal-footer"> 1205 1206 <button type="button" class="btn btn-base-color-5" data-dismiss="modal">@Translate("Close")</button> 1207 1208 @if (!string.IsNullOrWhiteSpace(popUpLink)) { 1209 <a href="@popUpLink" class="btn btn-base-color-3">@Translate("Read more")</a> 1210 } 1211 1212 </div> 1213 </div> 1214 1215 </div> 1216 </div> 1217 } 1218 } 1219 } 1220 1221 @* -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- *@ 1222 1223 1224 <script type="text/javascript"> 1225 var isTablet = '@GetGlobalValue("Global:Device.IsTablet")'; 1226 var cookieText = "@cookieText"; 1227 var mmenuMenu = '@Translate("Menu","Menu")'; 1228 var mmenuLanguages = '@Translate("Languages","Sprog")'; 1229 var levelTwoPageID = '@GetValue("DwPageID_2")'; 1230 var itemInstanceType = '@GetValue("Item.ItemInstanceType")'; 1231 </script> 1232 1233 @* -- -- POPUP -- -- *@ 1234 1235 <script> 1236 setTimeout(function () { 1237 $('#splashModal').modal(); 1238 }, 2000); 1239 1240 function getCookie(cname) { 1241 var name = cname + "="; 1242 var decodedCookie = decodeURIComponent(document.cookie); 1243 var ca = decodedCookie.split(';'); 1244 for (var i = 0; i < ca.length; i++) { 1245 var c = ca[i]; 1246 while (c.charAt(0) == ' ') { 1247 c = c.substring(1); 1248 } 1249 if (c.indexOf(name) == 0) { 1250 return c.substring(name.length, c.length); 1251 } 1252 } 1253 return ""; 1254 } 1255 1256 function setCookie(cname, cvalue, exdays) { 1257 var d = new Date(); 1258 d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000)); 1259 var expires = "expires=" + d.toUTCString(); 1260 document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/"; 1261 } 1262 1263 $('button,a', '#splashModal').click(function () { 1264 setCookie("splash", $('#splashModal').attr('data-splash-code'), 30); 1265 }); 1266 1267 </script> 1268 1269 @* -- -- -- -- -- -- *@ 1270 1271 1272 <script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script> 1273 @GetValue("Item.Area.Webfonts") 1274 <script type="text/javascript" src="/Files/Templates/Designs/1883_Iris/javascript/compressed/i_compressed.js?v=@thejsstamp"></script> 1275 @GetValue("DwCookieWarning") 1276 @GetValue("Item.Area.ScriptsBodyEnd") 1277 @RenderSnippet("Scripts") 1278 @RenderSnippet("FormScripts") 1279 @RenderSnippet("FormScripts2") 1280 @RenderSnippet("FormScripts3") 1281 1282 </body> 1283 </html> 1284