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_1bc05f3841c648808aea8007326ef114.Ansoegningsblanket.HexToBytes(String hex) in D:\home\site\wwwroot\Files\Templates\Designs\1883_Iris\_parsed\Ansoegningsblanket-Sendt.parsed.cshtml:line 567
   at CompiledRazorTemplates.Dynamic.RazorEngine_1bc05f3841c648808aea8007326ef114.Ansoegningsblanket.XorDecrypt(String value) in D:\home\site\wwwroot\Files\Templates\Designs\1883_Iris\_parsed\Ansoegningsblanket-Sendt.parsed.cshtml:line 603
   at CompiledRazorTemplates.Dynamic.RazorEngine_1bc05f3841c648808aea8007326ef114.Execute() in D:\home\site\wwwroot\Files\Templates\Designs\1883_Iris\_parsed\Ansoegningsblanket-Sendt.parsed.cshtml:line 632
   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=01032022"></script> 98 <link rel="stylesheet" href="/Files/Templates/Designs/1883_Iris/css/application-tjlaan-20220111.css?v=11012022"> 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 </style> 155 @GetValue("Stylesheets") 156 @GetValue("Javascripts") 157 </head> 158 159 <body class='@GetGlobalValue("Global:Page.NavigationTag") @headerSettings'> 160 161 162 @GetValue("Item.Area.ScriptsBodyBegin") 163 <div id="loading-overlay"></div> 164 <div class="page-wrap @maxWidth" id="page-wrap"> 165 166 @if (GetBoolean("Item.Area.ShowMetaHeader")) { 167 <header class="container-fluid header Fixed"> 168 <div class="meta-header hidden-xs hidden-sm"> 169 @if (GetString("Item.Area.HeaderContentWidth") != "full") 170 { 171 @:<div class="container"> 172 } 173 <div class="row"> 174 @{ 175 string hasLangs = ""; 176 177 if (GetLoop("Item.Area.AreaLanguages").Any()) { 178 hasLangs = "has-langs"; 179 } 180 } 181 <div class="pull-right"> 182 183 @RenderNavigation(new 184 { 185 StartLevel = 1, 186 EndLevel = 1, 187 Template = "I_MetaMenu.xslt" 188 }) 189 @*<div class="search-btn @hasLangs"><i class="fa fa-search"></i> @Translate("Search","Søg")</div>*@ 190 @if (GetLoop("Item.Area.AreaLanguages").Any()) { 191 192 string langLayout = GetString("Item.Area.LanguageLayout"); 193 string langNavClass = ""; 194 if(langLayout == "dropdown" || langLayout == "dropdown-icon-text"){ 195 langNavClass = "language-picker-dropdown"; 196 } else { 197 langNavClass = "language-picker-row"; 198 } 199 <nav class="@langNavClass hidden-xs"> 200 @if(langNavClass == "language-picker-dropdown"){ 201 <ul class="list-unstyled"> 202 <li> 203 <a> 204 @if(GetString("Item.Area.LanguageDropdownIcon") == "globe") 205 { 206 <i class="fa fa-globe"></i> 207 } else { 208 foreach (LoopItem l in GetLoop("Item.Area.AreaLanguages")) 209 { 210 211 if(l.GetBoolean("Item.Area.AreaLanguages.LanguageActive")){ 212 string langIcon = l.GetString("Item.Area.AreaLanguages.LanguageIcon"); 213 <img class="active-flag" src="@langIcon"> 214 } 215 } 216 } 217 </a> 218 <ul class="list-unstyled"> 219 @foreach (LoopItem l in GetLoop("Item.Area.AreaLanguages")) 220 { 221 string langActive = l.GetBoolean("Item.Area.AreaLanguages.LanguageActive") == true ? "activeitem" : ""; 222 string langUrl = l.GetString("Item.Area.AreaLanguages.LanguageURL"); 223 string langName = l.GetString("Item.Area.AreaLanguages.LanguageName"); 224 string langIcon = l.GetString("Item.Area.AreaLanguages.LanguageIcon"); 225 string langIconPresent = ""; 226 227 if(langLayout == "dropdown-icon-text"){ 228 langIconPresent = "lang-icon"; 229 } 230 <li class="@langActive"> 231 <a href="@langUrl" class="@langActive @langIconPresent" title="@langName">@if(langLayout == "dropdown-icon-text"){<img src="@langIcon">}@langName</a> 232 </li> 233 } 234 </ul> 235 </li> 236 </ul> 237 } else { 238 <ul class="list-unstyled @langNavClass"> 239 @foreach (LoopItem l in GetLoop("Item.Area.AreaLanguages")) 240 { 241 string langActive = l.GetBoolean("Item.Area.AreaLanguages.LanguageActive") == true ? "activeitem" : ""; 242 string langUrl = l.GetString("Item.Area.AreaLanguages.LanguageURL"); 243 string langName = l.GetString("Item.Area.AreaLanguages.LanguageName"); 244 string langIcon = l.GetString("Item.Area.AreaLanguages.LanguageIcon"); 245 246 <li class="@langActive"> 247 <a href="@langUrl" class="@langActive" title="@langName"><img src="@langIcon" alt="@langName"></a> 248 </li> 249 250 } 251 </ul> 252 } 253 </nav> 254 } 255 </div> 256 </div> 257 258 @if (GetString("Item.Area.HeaderContentWidth") != "full") 259 { 260 @:</div> 261 } 262 </div> 263 @if (!string.IsNullOrEmpty(GetString("DwAreaSearchPageID"))) 264 { 265 <div class="search-bar meta-search closed"> 266 <div class="container-fluid closed"> 267 <div class="container"> 268 <div class="row"> 269 <div class="col-xs-12 col-md-8 center-col"> 270 <form method="get" action="/Default.aspx"> 271 <fieldset> 272 <div class="input-group input-group-md"> 273 <input type="hidden" name="ID" value='@GetValue("DwAreaSearchPageID")'> 274 <span class="input-group-addon close-search"><i class="fa fa-times"></i></span> 275 <input type="text" class="form-control placeholder" name="q" id="search-field" placeholder='@Translate("searchfor","Søg efter")...' value=""> 276 <span class="input-group-btn"> 277 <input type="submit" class="btn btn-base-color-2" id="search" value='@Translate("SEARCH", "Søg")'> 278 </span> 279 </div> 280 </fieldset> 281 </form> 282 </div> 283 </div> 284 </div> 285 </div> 286 </div> 287 } 288 289 @if (GetString("Item.Area.HeaderContentWidth") != "full") 290 { 291 @:<div class="container main-header-container"> 292 } 293 <div class="row main-header"> 294 <a href="/" class="logo" title='@GetValue("Item.Area.CompanyName")'> 295 @*<img src="/Files/Templates/Designs/1883_Iris/images/logo.png">*@ 296 <img src='@GetValue("Item.Area.LogoWebsite")' title='@GetValue("Item.Area.CompanyName")' alt='@GetValue("Item.Area.CompanyName")'> 297 </a> 298 299 <div class="top-nav-wrap"> 300 <nav class="top-nav hidden-xs hidden-sm" id="top-nav" role="navigation"> 301 @RenderNavigation(new 302 { 303 StartLevel = 1, 304 EndLevel = 3, 305 ExpandMode = "All", 306 Template = "I_TopNav_Omit_MetaMenu.xslt" 307 }) 308 309 </nav> 310 <div class="search-btn @hasLangs visible-xs-block visible-sm-block"><i></i></div> 311 <a href="#mmenu" class="mobile-nav visible-xs-block visible-sm-block"><i class="fa fa-bars"></i></a> 312 </div> 313 </div> 314 @if (GetString("Item.Area.HeaderContentWidth") != "full") 315 { 316 @:</div> 317 } 318 319 </header> 320 } else { 321 <header class="container-fluid header Fixed"> 322 @if (GetString("Item.Area.HeaderContentWidth") != "full") 323 { 324 @:<div class="container"> 325 } 326 <div class="row main-header"> 327 @*<a href="/" class="logo" title='@GetValue("Item.Area.CompanyName")'><img src="/Files/Templates/Designs/1883_Iris/images/logo.png"></a>*@ 328 329 <a href="/" class="logo" title='@GetValue("Item.Area.CompanyName")'> 330 <img src='@GetValue("Item.Area.LogoWebsite")' title='@GetValue("Item.Area.CompanyName")' alt='@GetValue("Item.Area.CompanyName")'> 331 </a> 332 333 <div class="top-nav-wrap"> 334 <nav class="top-nav hidden-xs hidden-sm hidden-md" id="top-nav" role="navigation"> 335 @RenderNavigation(new 336 { 337 StartLevel = 1, 338 EndLevel = 3, 339 ExpandMode = "All", 340 Template = "I_TopNav.xslt" 341 }) 342 </nav> 343 @{ 344 string hasLangs = ""; 345 346 if (GetLoop("Item.Area.AreaLanguages").Any()) { 347 hasLangs = "has-langs"; 348 } 349 } 350 @*<div class="search-btn @hasLangs"><i></i></div>*@ 351 @if (GetLoop("Item.Area.AreaLanguages").Any()) { 352 353 string langLayout = GetString("Item.Area.LanguageLayout"); 354 string langNavClass = ""; 355 if(langLayout == "dropdown" || langLayout == "dropdown-icon-text"){ 356 langNavClass = "language-picker-dropdown"; 357 } else { 358 langNavClass = "language-picker-row"; 359 } 360 <nav class="@langNavClass hidden-xs"> 361 @if(langNavClass == "language-picker-dropdown"){ 362 <ul class="list-unstyled"> 363 <li> 364 <a> 365 @if(GetString("Item.Area.LanguageDropdownIcon") == "globe") 366 { 367 <i class="fa fa-globe"></i> 368 } else { 369 foreach (LoopItem l in GetLoop("Item.Area.AreaLanguages")) 370 { 371 372 if(l.GetBoolean("Item.Area.AreaLanguages.LanguageActive")){ 373 string langIcon = l.GetString("Item.Area.AreaLanguages.LanguageIcon"); 374 <img class="active-flag" src="@langIcon"> 375 } 376 } 377 } 378 </a> 379 <ul class="list-unstyled"> 380 @foreach (LoopItem l in GetLoop("Item.Area.AreaLanguages")) 381 { 382 string langActive = l.GetBoolean("Item.Area.AreaLanguages.LanguageActive") == true ? "activeitem" : ""; 383 string langUrl = l.GetString("Item.Area.AreaLanguages.LanguageURL"); 384 string langName = l.GetString("Item.Area.AreaLanguages.LanguageName"); 385 string langIcon = l.GetString("Item.Area.AreaLanguages.LanguageIcon"); 386 string langIconPresent = ""; 387 388 if(langLayout == "dropdown-icon-text"){ 389 langIconPresent = "lang-icon"; 390 } 391 <li class="@langActive"> 392 <a href="@langUrl" class="@langActive @langIconPresent" title="@langName">@if(langLayout == "dropdown-icon-text"){<img src="@langIcon">}@langName</a> 393 </li> 394 } 395 </ul> 396 </li> 397 </ul> 398 } else { 399 <ul class="list-unstyled @langNavClass"> 400 @foreach (LoopItem l in GetLoop("Item.Area.AreaLanguages")) 401 { 402 string langActive = l.GetBoolean("Item.Area.AreaLanguages.LanguageActive") == true ? "activeitem" : ""; 403 string langUrl = l.GetString("Item.Area.AreaLanguages.LanguageURL"); 404 string langName = l.GetString("Item.Area.AreaLanguages.LanguageName"); 405 string langIcon = l.GetString("Item.Area.AreaLanguages.LanguageIcon"); 406 407 <li class="@langActive"> 408 <a href="@langUrl" class="@langActive" title="@langName"><img src="@langIcon" alt="@langName"></a> 409 </li> 410 411 } 412 </ul> 413 } 414 </nav> 415 } 416 <a href="#top-nav" class="mobile-nav visible-xs-block visible-sm-block visible-md-block"><i class="fa fa-bars"></i></a> 417 </div> 418 </div> 419 @if (GetString("Item.Area.HeaderContentWidth") != "full") 420 { 421 @:</div> 422 } 423 @*@if (!string.IsNullOrEmpty(GetString("DwAreaSearchPageID"))) 424 { 425 <div class="search-bar closed"> 426 <div class="container-fluid closed"> 427 <div class="container"> 428 <div class="row"> 429 <div class="col-xs-12 col-md-8 center-col"> 430 <form method="get" action="/Default.aspx"> 431 <fieldset> 432 <div class="input-group"> 433 <input type="hidden" name="ID" value='@GetValue("DwAreaSearchPageID")'> 434 <input type="text" class="form-control placeholder" name="q" id="search-field" placeholder='@Translate("searchfor","Søg efter")...' value=""> 435 <span class="input-group-btn"> 436 <input type="submit" class="btn btn-base-color-2" id="search" value='@Translate("SEARCH", "Søg")'> 437 </span> 438 </div> 439 </fieldset> 440 </form> 441 </div> 442 </div> 443 </div> 444 </div> 445 </div> 446 }*@ 447 </header> 448 } 449 450 @if (GetBoolean("Item.Area.ShowBreadcrumb") == true && GetBoolean("Item.Page.HideBreadcrumb") != true) 451 { 452 453 string isNewspage = ""; 454 if (GetString("Item.ItemInstanceType") == "I_NewsPage") 455 { 456 isNewspage = "is-newspage"; 457 } 458 459 <div class="container-fluid breadcrumb-wrap"> 460 <div class="container"> 461 <div class="row"> 462 <nav class="col-xs-12 breadcrumb @isNewspage"> 463 @if(!string.IsNullOrEmpty(GetString("Item.Area.BreadcrumbPrefix"))){<span class="prefix">@GetString("Item.Area.BreadcrumbPrefix")</span>} 464 @GetValue("DwNavigation(BreadCrumb)") 465 </nav> 466 </div> 467 </div> 468 </div> 469 } 470 471 @if (GetString("Item.ItemInstanceType") == "I_NewsPage") 472 { 473 <div class="container-fluid news-list news-page-header"> 474 <div class="container"> 475 <div class="row"> 476 <div class="col-xs-12"> 477 <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> 478 </div> 479 </div> 480 </div> 481 </div> 482 } 483 <div class="content-width"> 484 485 @using System.Data.SqlClient 486 @using System.Text 487 @functions { 488 public class Ansoegningsblanket { 489 public int id { get; set; } 490 public string navn { get; set; } 491 public string bopael { get; set; } 492 public string postnummer { get; set; } 493 public string by { get; set; } 494 public string telefonnummer { get; set; } 495 public string mobiltelefonnummer { get; set; } 496 public string email { get; set; } 497 public string cprnummer { get; set; } 498 public string fil { get; set; } 499 public string anbefaler { get; set; } 500 public DateTime anbefaler_dato { get; set; } 501 public string kommentar { get; set; } 502 public DateTime _dato { get; set; } 503 public string _ip { get; set; } 504 public string _browser { get; set; } 505 public string _data { get; set; } 506 507 public static Ansoegningsblanket LoadBlanket(int rowId) { 508 return LoadBlanket("2016", rowId); 509 } 510 511 public static Ansoegningsblanket LoadBlanket(string suffix, int rowId) { 512 using (var connection = Dynamicweb.Data.Database.CreateConnection()) { 513 using (var command = connection.CreateCommand()) { 514 command.CommandText = "SELECT * FROM Ansoegningsblanket_" + suffix + " WHERE Ansoegningsblanket_" + suffix + "ID = @id"; 515 516 command.Parameters.Add(new SqlParameter("@id", rowId)); 517 518 using (var reader = command.ExecuteReader()) { 519 if (reader.Read()) { 520 return new Ansoegningsblanket { 521 id = reader.GetInt32(reader.GetOrdinal("Ansoegningsblanket_" + suffix + "ID")), 522 navn = reader.GetString(reader.GetOrdinal("Ansoegningsblanket_" + suffix + "_Navn")), 523 bopael = reader.GetString(reader.GetOrdinal("Ansoegningsblanket_" + suffix + "_Bopael")), 524 postnummer = reader.GetString(reader.GetOrdinal("Ansoegningsblanket_" + suffix + "_Postnummer")), 525 by = reader.GetString(reader.GetOrdinal("Ansoegningsblanket_" + suffix + "_By")), 526 telefonnummer = reader.GetString(reader.GetOrdinal("Ansoegningsblanket_" + suffix + "_Telefonnummer")), 527 mobiltelefonnummer = reader.GetString(reader.GetOrdinal("Ansoegningsblanket_" + suffix + "_Mobiltelefonnummer")), 528 email = reader.GetString(reader.GetOrdinal("Ansoegningsblanket_" + suffix + "_Email")), 529 cprnummer = reader.GetString(reader.GetOrdinal("Ansoegningsblanket_" + suffix + "_CPRnummer")), 530 fil = reader.GetString(reader.GetOrdinal("Ansoegningsblanket_" + suffix + "_Fil")), 531 anbefaler = reader.GetString(reader.GetOrdinal("Ansoegningsblanket_" + suffix + "_Anbefaler")), 532 anbefaler_dato = reader.IsDBNull(reader.GetOrdinal("Ansoegningsblanket_" + suffix + "_Anbefaler_Dato")) ? DateTime.MinValue : reader.GetDateTime(reader.GetOrdinal("Ansoegningsblanket_" + suffix + "_Anbefaler_Dato")), 533 kommentar = reader.GetString(reader.GetOrdinal("Ansoegningsblanket_" + suffix + "_Kommentar")), 534 _dato = reader.GetDateTime(reader.GetOrdinal("Ansoegningsblanket_" + suffix + "__Dato")), 535 _ip = reader.GetString(reader.GetOrdinal("Ansoegningsblanket_" + suffix + "__IP")), 536 _browser = reader.GetString(reader.GetOrdinal("Ansoegningsblanket_" + suffix + "__Browser")), 537 _data = reader.GetString(reader.GetOrdinal("Ansoegningsblanket_" + suffix + "__Data")) 538 }; 539 } 540 } 541 } 542 } 543 544 return null; 545 } 546 547 private static int[] XorKeys { 548 get { 549 return new[] { 210, 184, 99, 118, 57, 160, 85, 172, 21, 155, 114, 183, 208, 102, 176, 49 }; 550 } 551 } 552 553 private static string BytesToHex(byte[] bytes) { 554 var c = new char[bytes.Length * 2]; 555 556 for (var i = 0; i < bytes.Length; i++) { 557 var b = (byte)(bytes[i] >> 4); 558 c[i * 2] = (char)(b > 9 ? b + 0x37 + 0x20 : b + 0x30); 559 b = (byte)(bytes[i] & 0xF); 560 c[i * 2 + 1] = (char)(b > 9 ? b + 0x37 + 0x20 : b + 0x30); 561 } 562 563 return new string(c); 564 } 565 566 private static byte[] HexToBytes(string hex) { 567 var bytes = new byte[hex.Length / 2]; 568 569 for (var i = 0; i < bytes.Length; i++) { 570 var c = hex[i * 2]; 571 bytes[i] = (byte)((c > '9' ? (c > 'Z' ? (c - 'a' + 10) : (c - 'A' + 10)) : (c - '0')) << 4); 572 c = hex[i * 2 + 1]; 573 bytes[i] |= (byte)(c > '9' ? (c > 'Z' ? (c - 'a' + 10) : (c - 'A' + 10)) : (c - '0')); 574 } 575 576 return bytes; 577 } 578 579 public static string XorEncrypt(string value) 580 { 581 var buffer = Encoding.UTF8.GetBytes(value); 582 var hashed = new byte[buffer.Length + 16]; 583 var keys = XorKeys; 584 var salt = (Guid.NewGuid()).ToByteArray(); 585 var j = 0; 586 587 for (var i = 0; i < 8; i++) { 588 hashed[i] = (byte)(salt[i] ^ (uint)keys[i]); 589 hashed[i + 8 + buffer.Length] = (byte)(salt[i + 8] ^ (uint)keys[i + 8]); 590 } 591 592 for (var i = 0; i < buffer.Length; i++) { 593 if (j >= 16) 594 j = 0; 595 hashed[i + 8] = (byte)((buffer[i] ^ (uint)salt[j]) ^ 135u); 596 j++; 597 } 598 599 return BytesToHex(hashed); 600 } 601 602 public static string XorDecrypt(string value) { 603 var hashed = HexToBytes(value); 604 var buffer = new byte[hashed.Length - 16]; 605 var keys = XorKeys; 606 var salt = new byte[16]; 607 var j = 0; 608 609 for (var i = 0; i < 8; i++) { 610 salt[i] = (byte)(hashed[i] ^ (uint)keys[i]); 611 salt[i + 8] = (byte)(hashed[i + 8 + buffer.Length] ^ (uint)keys[i + 8]); 612 } 613 614 for (var i = 0; i < buffer.Length; i++) { 615 if (j >= 16) 616 j = 0; 617 buffer[i] = (byte)((hashed[i + 8] ^ 135u) ^ salt[j]); 618 j++; 619 } 620 621 return Encoding.UTF8.GetString(buffer); 622 } 623 } 624 } 625 @SnippetStart("StyleSheet") 626 @SnippetEnd("StyleSheet") 627 @SnippetStart("sidenavheader") 628 @SnippetEnd("sidenavheader") 629 @SnippetStart("sidetags") 630 @SnippetEnd("sidetags") 631 @{ 632 var rowId = Ansoegningsblanket.XorDecrypt(HttpContext.Current.Request.QueryString["rId"]).Split(':')[1]; 633 var blanket = string.IsNullOrWhiteSpace(rowId) ? null : Ansoegningsblanket.LoadBlanket("2016", int.Parse(rowId)); 634 } 635 636 @GetValue("DwContent(content)") 637 @GetValue("DwContent(menuwrap)") 638 639 640 641 @if(blanket != null) { 642 643 var datajson = Newtonsoft.Json.Linq.JObject.Parse(blanket._data); 644 var data_GenerateSend = (string)datajson["_Data_GenerateSend"]["value"]; 645 var cryptId = Ansoegningsblanket.XorEncrypt(DateTime.Now.Ticks + ":" + blanket.id); 646 647 <style type="text/css"> 648 #centerColumn { 649 min-height: auto; 650 } 651 </style> 652 653 if(data_GenerateSend == "PDF") { 654 <div class="container" style="padding-top: 45px;"> 655 <div class="row"> 656 <div class="col-xs-12"> 657 <div class="row "> 658 <div class="col-xs-8 themed-text text-xs-left"> 659 <h1>Du har valgt at sende fysisk</h1> 660 <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> 661 <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> 662 </div> 663 </div> 664 </div> 665 </div> 666 </div> 667 668 } else { 669 670 <div class="container" style="padding-top: 45px;"> 671 <div class="row"> 672 <div class="col-xs-12"> 673 <div class="row "> 674 <div class="col-xs-8 themed-text text-xs-left"> 675 <h1>Tak for din ansøgning, som du nu har sendt til din faglige organisation.</h1> 676 <p>Når vi modtager ansøgningen fra din organisation, behandler vi ansøgningen og sender afgørelsen til din mail.</p> 677 <p>Er lånet bevilget sender vi samtidig lånedokumenterne via E-Signatur til din mail og de skal underskrives med din NemID. 678 <br> 679 Såfremt du ikke har NemID kan dokumenterne fremsendes med post. Du skal så kontakte låneforeningens kontor.</p> 680 <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> 681 </div> 682 </div> 683 </div> 684 </div> 685 </div> 686 687 } 688 } 689 690 691 692 @GetValue("DwContent(dwcontent)") 693 </div> 694 <footer class="footer container-fluid"> 695 <div class="container"> 696 @*<div class="row footer-top"> 697 698 <div class="col-margin-bottom text-xs-center col-xs-2 footer-logo"> 699 <a href="/" class="logo" title='@GetValue("Item.Area.CompanyName")'> 700 <img src='@GetValue("Item.Area.LogoWebsite")' title='@GetValue("Item.Area.CompanyName")' alt='@GetValue("Item.Area.CompanyName")' class="img-responsive"> 701 </a> 702 </div> 703 704 <div class="col-margin-bottom text-xs-center col-xs-10"> 705 <div class="row"> 706 @using System.Linq; 707 708 @{ 709 var footercolumns = GetLoop("Item.Area.FooterColumns").OrderBy(g => g.GetString("Item.Area.FooterColumns.Sort")).ToList(); 710 711 foreach (LoopItem i in footercolumns) 712 { 713 <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")+" ")'> 714 @i.GetString("Item.Area.FooterColumns.Text") 715 716 @{ 717 var socialmedia = i.GetLoop("Item.Area.FooterColumns.SocialeMedier").OrderBy(d => d.GetString("Item.Area.FooterColumns.SocialeMedier.Sort")).ToList(); 718 719 foreach (LoopItem s in socialmedia) { 720 <a href='@s.GetString("Item.Area.FooterColumns.SocialeMedier.MediaURL")' class='social-media-circle' title='@s.GetString("Item.Area.FooterColumns.SocialeMedier.Name")' target='_blank'> 721 <i class='fa @s.GetString("Item.Area.FooterColumns.SocialeMedier.FontAwesomeClass")'></i> 722 </a> 723 } 724 } 725 726 </div> 727 728 } 729 } 730 731 @functions { 732 public string ColumnClassFooter(string mobile,string portrait,string landscape,string desktop) 733 { 734 if (string.IsNullOrWhiteSpace(mobile)) { 735 mobile = "col-xs-12 "; 736 } 737 738 if (string.IsNullOrWhiteSpace(portrait)) { 739 portrait = ""; 740 } 741 742 if (string.IsNullOrWhiteSpace(landscape)) { 743 landscape = ""; 744 } 745 746 return mobile + portrait + landscape + desktop; 747 } 748 } 749 </div> 750 </div> 751 752 </div>*@ 753 754 <div class="row footer-top"> 755 756 @* <div class="col-margin-bottom text-xs-center col-xs-12 footer-logo"> 757 <a href="/" class="logo" title='@GetValue("Item.Area.CompanyName")'> 758 <img src='@GetValue("Item.Area.FooterLogoWebsite")' title='@GetValue("Item.Area.CompanyName")' alt='@GetValue("Item.Area.CompanyName")' class="img-responsive"> 759 </a> 760 </div> *@ 761 762 <div class="col-margin-bottom text-xs-center col-xs-12"> 763 <div class="row"> 764 @using System.Linq; 765 766 @{ 767 var footercolumns = GetLoop("Item.Area.FooterColumns").OrderBy(g => g.GetString("Item.Area.FooterColumns.Sort")).ToList(); 768 769 foreach (LoopItem i in footercolumns) 770 { 771 <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")+" ")'> 772 @i.GetString("Item.Area.FooterColumns.Text") 773 774 @{ 775 var socialmedia = i.GetLoop("Item.Area.FooterColumns.SocialeMedier").OrderBy(d => d.GetString("Item.Area.FooterColumns.SocialeMedier.Sort")).ToList(); 776 777 foreach (LoopItem s in socialmedia) { 778 <a href='@s.GetString("Item.Area.FooterColumns.SocialeMedier.MediaURL")' class='social-media-circle' title='@s.GetString("Item.Area.FooterColumns.SocialeMedier.Name")' target='_blank'> 779 <i class='fa @s.GetString("Item.Area.FooterColumns.SocialeMedier.FontAwesomeClass")'></i> 780 </a> 781 } 782 } 783 784 </div> 785 786 } 787 } 788 789 @functions { 790 public string ColumnClassFooter(string mobile,string portrait,string landscape,string desktop) 791 { 792 if (string.IsNullOrWhiteSpace(mobile)) { 793 mobile = "col-xs-12 "; 794 } 795 796 if (string.IsNullOrWhiteSpace(portrait)) { 797 portrait = ""; 798 } 799 800 if (string.IsNullOrWhiteSpace(landscape)) { 801 landscape = ""; 802 } 803 804 return mobile + portrait + landscape + desktop; 805 } 806 } 807 </div> 808 </div> 809 810 </div> 811 812 @if(!String.IsNullOrWhiteSpace(GetString("Item.Area.FooterCopyright"))){ 813 814 <div class="row footer-bottom"> 815 <div class="col-xs-12 text-center"> 816 <small> 817 © Copyright @GetGlobalValue("Global:Server.Date.Year") @GetString("Item.Area.FooterCopyright") 818 @if(!String.IsNullOrWhiteSpace(GetString("Item.Area.FooterWebsiteBy"))){ 819 <span>|</span> @GetString("Item.Area.FooterWebsiteBy") 820 } 821 </small> 822 823 </div> 824 </div> 825 } 826 827 </div> 828 </footer> 829 @* remove commenting if the "MetaMenu" is in use on this site *@ 830 831 <nav id="mmenu"> 832 @GetValue("DwNavigation(menupanel)") 833 @if (GetLoop("Item.Area.AreaLanguages").Any()) { 834 string langLayout = GetString("Item.Area.LanguageLayout"); 835 string langNavClass = "language-picker-dropdown"; 836 <ul id="languages-panel"> 837 @foreach (LoopItem l in GetLoop("Item.Area.AreaLanguages")) 838 { 839 string langActive = l.GetBoolean("Item.Area.AreaLanguages.LanguageActive") == true ? "active-language" : ""; 840 string langUrl = l.GetString("Item.Area.AreaLanguages.LanguageURL"); 841 string langName = l.GetString("Item.Area.AreaLanguages.LanguageName"); 842 string langIcon = l.GetString("Item.Area.AreaLanguages.LanguageIcon"); 843 string langIconPresent = ""; 844 845 if(langLayout == "dropdown-icon-text" || langLayout == "icon-row"){ 846 langIconPresent = "lang-icon"; 847 } 848 <li class="@langActive"> 849 <a href="@langUrl" class="@langActive @langIconPresent" title="@langName">@if(langLayout == "dropdown-icon-text" || langLayout == "icon-row"){<img src="@langIcon">}@langName</a> 850 </li> 851 } 852 </ul> 853 } 854 </nav> 855 856 @SnippetStart("sidenav") 857 <nav class="side-sub-nav"> 858 @GetValue("DwNavigation(SideNav)") 859 </nav> 860 @SnippetEnd("sidenav") 861 </div> 862 863 864 @* -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- COOKIE -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- *@ 865 866 867 @*@{ 868 string cookieChoiceId = "cookie-choice-renew"; 869 string cookieWarningClass = "custom-cookie"; 870 if (Dynamicweb.Environment.CookieManager.CookieOptInLevelExists) 871 { 872 cookieWarningClass += " \" style=\"display:none\" tab-index=\"-1\" aria-hidden=\"true\""; 873 } 874 else 875 { 876 cookieChoiceId += "\" style=\"display:none;"; 877 } 878 var cookieSettingsPage = Dynamicweb.Services.Pages.GetPageByNavigationTag(Pageview.AreaID, "cookiesettings"); 879 bool cookieActivated = cookieSettingsPage != null && cookieSettingsPage.Item["CookieActivated"] != null ? (bool)cookieSettingsPage.Item["CookieActivated"] : false; 880 } 881 882 @if (cookieActivated && cookieSettingsPage != null && cookieSettingsPage.Item["CookieCategories"] != null) 883 { 884 var cookieCategoryItems = Dynamicweb.Content.Items.ItemList.GetItemListById((int)cookieSettingsPage.Item["CookieCategories"]).Relations; 885 if (cookieCategoryItems.Any()) 886 { 887 <div id="@cookieChoiceId" title="Cookie valg" aria-label="renew-consent" style="height:35px;width:35px;z-index:500;"> 888 <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> 889 </div> 890 <div id="cookieWarningContainer" class="@cookieWarningClass"> 891 <form id="cookieWarningForm" method="post" action="/Admin/Public/CookieOptInLevelConfig.aspx"> 892 <input type="hidden" name="cmd" value="SetCookieOptInLevel"> 893 <input type="hidden" name="OptInLevel" id="OptInLevel" value="1"> 894 895 <fieldset> 896 <div class="p-4"> 897 <div class="row"> 898 <div class="col-xs-12"> 899 <h2>@cookieSettingsPage.Item["CookieHeader"]</h2> 900 @cookieSettingsPage.Item["CookieIntro"] 901 <hr class="mt-4 mb-4 w-100"> 902 <p class="text-center"> 903 <button type="button" class="btn btn-base-color-2 ml-3" onclick="setOptInCookie(1);">@Translate("Tillad valgte")</button> 904 <button type="button" class="btn btn-base-color-3 ml-3" onclick="setOptInCookie(2);">@Translate("Tillad alle")</button> 905 </p> 906 907 </div> 908 </div> 909 </div> 910 @{ 911 string showDetails = Translate("Vis detaljer"); 912 string hideDetails = Translate("Skjul detaljer"); 913 <div class="p-4"> 914 <div class="grid"> 915 @foreach (Dynamicweb.Content.Items.Item category in cookieCategoryItems) 916 { 917 string categoryName = "" + category["Name"]; 918 string categorySysName = "" + category["SysName"]; 919 string categoryID = "cookecategory-" + category.Id; 920 string categoryDescription = "" + category["Description"]; 921 var cookies = Dynamicweb.Content.Items.ItemList.GetItemListById((int)category["Cookies"]).Relations; 922 923 if (cookies.Any()) 924 { 925 <div class="col-xs-4"> 926 <div class="custom-control custom-checkbox text-center" data-nogutter="1"> 927 <span class="d-block">@categoryName</span> 928 @if (categorySysName == "Essential") 929 { 930 <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"> 931 } 932 else 933 { 934 if (AllowedCookieCategories.Contains(categorySysName)) 935 { 936 <input type="checkbox" class="custom-control-input" checked="checked" id="chk-cookie-@categorySysName" name="OptInCategory" value="@categorySysName"> 937 } 938 else 939 { 940 <input type="checkbox" class="custom-control-input" id="chk-cookie-@categorySysName" name="OptInCategory" value="@categorySysName"> 941 } 942 } 943 <label class="custom-control-label" for="chk-cookie-@categorySysName"></label> 944 </div> 945 </div> 946 } 947 } 948 949 </div> 950 <div class="row"> 951 <div class="col-xs-12"> 952 <hr class="mt-4 mb-4 w-100"> 953 <p class="text-center"> 954 <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"> 955 @showDetails 956 </button> 957 </p> 958 </div> 959 </div> 960 </div> 961 <div class="collapse" id="collapse-cookie-info-container"> 962 <div class="cookie-info-container"> 963 <div class="mb-4"> 964 @foreach (Dynamicweb.Content.Items.Item category in cookieCategoryItems) 965 { 966 string categoryName = "" + category["Name"]; 967 string categorySysName = "" + category["SysName"]; 968 string categoryID = "cookecategory-" + category.Id; 969 string categoryDescription = "" + category["Description"]; 970 var cookies = Dynamicweb.Content.Items.ItemList.GetItemListById((int)category["Cookies"]).Relations; 971 if (cookies.Any()) 972 { 973 <div class="d-block toogle-f-content" data-toggle="collapse" role="button" aria-expanded="false" aria-controls="collapse-cookie-info-@categoryID"> 974 <div class="row"> 975 <div class="col-xs-12 col-sm-3 cookie-info-container-title"> 976 <i class="fa fa-angle-right" aria-hidden="true"></i> 977 978 <strong>@categoryName</strong> 979 980 </div> 981 <div class="col-xs-12 col-sm-9"> 982 @categoryDescription 983 </div> 984 </div> 985 </div> 986 <div class="collapse" id="collapse-cookie-info-@categoryID"> 987 @foreach (Dynamicweb.Content.Items.Item cookie in cookies) 988 { 989 string titleClass = "col-xs-12 col-sm-3"; 990 string contentClass = "col-xs-12 col-sm-9"; 991 992 <div class="grid p-1"> 993 <div class="row collapse-cookie-info-header"> 994 <div class="@titleClass"> 995 <strong> 996 @Translate("Databehandler") 997 </strong> 998 </div> 999 <div class="@contentClass"> 1000 <p>@cookie["DataProcessor"]</p> 1001 </div> 1002 </div> 1003 <div class="row"> 1004 <div class="@titleClass"> 1005 <strong> 1006 @Translate("Formål") 1007 </strong> 1008 </div> 1009 <div class="@contentClass"> 1010 @cookie["Purpose"] 1011 </div> 1012 <div class="@titleClass"> 1013 <strong> 1014 @Translate("Privatlivspolitik:") 1015 </strong> 1016 </div> 1017 <div class="@contentClass"> 1018 <p><a target="_blank" href="@cookie[" privacypolicy"]"="">@cookie["PrivacyPolicy"]</a></p> 1019 </div> 1020 <div class="@titleClass"> 1021 <strong> 1022 @Translate("Udløb") 1023 </strong> 1024 </div> 1025 <div class="@contentClass"> 1026 <p>@cookie["Expires"]</p> 1027 </div> 1028 <div class="@titleClass"> 1029 <strong> 1030 @Translate("Navn") 1031 </strong> 1032 </div> 1033 <div class="@contentClass"> 1034 <p>@cookie["Name"]</p> 1035 </div> 1036 <div class="@titleClass"> 1037 <strong> 1038 @Translate("Udbyder") 1039 </strong> 1040 </div> 1041 <div class="@contentClass"> 1042 <p>@cookie["Provider"]</p> 1043 </div> 1044 </div> 1045 </div> 1046 } 1047 </div> 1048 } 1049 } 1050 </div> 1051 </div> 1052 </div> 1053 1054 } 1055 </fieldset> 1056 </form> 1057 1058 <script> 1059 document.getElementById("cookie-choice-renew").onclick = function () { 1060 showCookieChoice(); 1061 }; 1062 document.getElementById("cookie-details-button").onclick = function () { 1063 1064 if (this.classList.contains("opened")) { 1065 this.text = this.getAttribute("data-open-text"); 1066 this.classList.remove("opened"); 1067 document.getElementById("collapse-cookie-info-container").classList.remove("show"); 1068 } else { 1069 this.text = this.getAttribute("data-close-text"); 1070 this.classList.add("opened"); 1071 1072 document.getElementById("collapse-cookie-info-container").classList.add("show"); 1073 } 1074 }; 1075 var cookieExtraInfoElements = document.getElementsByClassName("toogle-f-content"); 1076 for (var i = 0; i < cookieExtraInfoElements.length; i++) { 1077 1078 cookieExtraInfoElements[i].onclick = function () { 1079 var elementToToggle = this.getAttribute("aria-controls"); 1080 if (this.classList.contains("opened")) { 1081 this.classList.remove("opened"); 1082 document.getElementById(elementToToggle).classList.remove("show"); 1083 } else { 1084 this.classList.add("opened"); 1085 document.getElementById(elementToToggle).classList.add("show"); 1086 } 1087 } 1088 } 1089 1090 1091 function setOptInCookie(optInLevel) { 1092 document.getElementById("OptInLevel").value = optInLevel; 1093 var formElement = document.getElementById("cookieWarningForm"); 1094 if (optInLevel == 1) { 1095 var essentialElement = document.createElement('input'); 1096 if (document.getElementById('cookie-essential') === null) { 1097 essentialElement.setAttribute("name", "OptInCategory"); 1098 essentialElement.setAttribute("value", "Essential"); 1099 essentialElement.setAttribute("type", "hidden"); 1100 essentialElement.setAttribute("id", "cookie-essential"); 1101 formElement.appendChild(essentialElement); 1102 } 1103 1104 if (document.getElementById("chk-cookie-Marketing") != null && document.getElementById("chk-cookie-Marketing").checked && typeof fbq !== 'undefined') { 1105 fbq('consent', 'grant'); 1106 } 1107 } 1108 if (optInLevel == 2) { 1109 if (document.getElementById("chk-cookie-Statistical") != null) { 1110 document.getElementById("chk-cookie-Statistical").checked = true; 1111 } 1112 if (document.getElementById("chk-cookie-Marketing") != null) { 1113 document.getElementById("chk-cookie-Marketing").checked = true; 1114 } 1115 1116 if (typeof fbq !== 'undefined') { 1117 fbq('consent', 'grant'); 1118 } 1119 1120 } 1121 var formData = new FormData(formElement); 1122 1123 var xmlhttp = new XMLHttpRequest(); 1124 xmlhttp.onreadystatechange = function () { 1125 if (xmlhttp.readyState == 4 && xmlhttp.status == 200) { 1126 hideCookieChoice(); 1127 return false; 1128 } 1129 } 1130 1131 xmlhttp.open(formElement.method, formElement.action); 1132 xmlhttp.send(formData); 1133 1134 return false; 1135 } 1136 function showCookieChoice() { 1137 1138 var cookieWarningContainer = document.getElementById("cookieWarningContainer"); 1139 cookieWarningContainer.style.display = "flex"; 1140 cookieWarningContainer.removeAttribute("tab-index"); 1141 cookieWarningContainer.removeAttribute("aria-hidden"); 1142 if (document.getElementById("cookie-choice-renew") != null) { 1143 document.getElementById("cookie-choice-renew").style.display = "none"; 1144 } 1145 1146 } 1147 function hideCookieChoice() { 1148 1149 var cookieWarningContainer = document.getElementById("cookieWarningContainer"); 1150 cookieWarningContainer.style.display = "none"; 1151 cookieWarningContainer.setAttribute("tab-index", "-1"); 1152 cookieWarningContainer.setAttribute("aria-hidden", "true"); 1153 1154 if (document.getElementById("cookie-choice-renew") != null) { 1155 document.getElementById("cookie-choice-renew").style.display = "block"; 1156 } 1157 1158 } 1159 </script> 1160 </div> 1161 } 1162 1163 }*@ 1164 1165 @* -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- *@ 1166 1167 @* -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- POPUP -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- *@ 1168 @if (GetBoolean("Item.Area.Popup_Active")) { 1169 1170 string popUpHeader = GetString("Item.Area.Popup_Header"); 1171 string popUpText = GetString("Item.Area.Popup_Text"); 1172 string popUpLink = GetString("Item.Area.Popup_Link"); 1173 string popUpCode = GetString("Item.Area.Popup_Code"); 1174 1175 if (!string.IsNullOrWhiteSpace(popUpCode)) { 1176 if (Dynamicweb.Context.Current.Request.Cookies["splash"] == null || Dynamicweb.Context.Current.Request.Cookies["splash"].Value != popUpCode) { 1177 <div class="modal fade popup" id="splashModal" tabindex="-1" role="dialog" aria-labelledby="splashModal" aria-hidden="true" data-splash-code="@popUpCode"> 1178 <div class="modal-dialog"> 1179 1180 <div class="modal-content"> 1181 <div class="modal-header"> 1182 1183 @if (!string.IsNullOrWhiteSpace(popUpHeader)) { 1184 <h5 class="modal-title" id="ModalLabel">@popUpHeader</h5> 1185 } 1186 1187 <button type="button" class="btn-close" data-dismiss="modal" aria-label="Close"> 1188 <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> 1189 </button> 1190 1191 </div> 1192 <div class="modal-body"> 1193 @if (!string.IsNullOrWhiteSpace(popUpText)) { 1194 @popUpText 1195 } 1196 </div> 1197 1198 <div class="modal-footer"> 1199 1200 <button type="button" class="btn btn-base-color-5" data-dismiss="modal">@Translate("Close")</button> 1201 1202 @if (!string.IsNullOrWhiteSpace(popUpLink)) { 1203 <a href="@popUpLink" class="btn btn-base-color-3">@Translate("Read more")</a> 1204 } 1205 1206 </div> 1207 </div> 1208 1209 </div> 1210 </div> 1211 } 1212 } 1213 } 1214 1215 @* -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- *@ 1216 1217 1218 <script type="text/javascript"> 1219 var isTablet = '@GetGlobalValue("Global:Device.IsTablet")'; 1220 var cookieText = "@cookieText"; 1221 var mmenuMenu = '@Translate("Menu","Menu")'; 1222 var mmenuLanguages = '@Translate("Languages","Sprog")'; 1223 var levelTwoPageID = '@GetValue("DwPageID_2")'; 1224 var itemInstanceType = '@GetValue("Item.ItemInstanceType")'; 1225 </script> 1226 1227 @* -- -- POPUP -- -- *@ 1228 1229 <script> 1230 setTimeout(function () { 1231 $('#splashModal').modal(); 1232 }, 2000); 1233 1234 function getCookie(cname) { 1235 var name = cname + "="; 1236 var decodedCookie = decodeURIComponent(document.cookie); 1237 var ca = decodedCookie.split(';'); 1238 for (var i = 0; i < ca.length; i++) { 1239 var c = ca[i]; 1240 while (c.charAt(0) == ' ') { 1241 c = c.substring(1); 1242 } 1243 if (c.indexOf(name) == 0) { 1244 return c.substring(name.length, c.length); 1245 } 1246 } 1247 return ""; 1248 } 1249 1250 function setCookie(cname, cvalue, exdays) { 1251 var d = new Date(); 1252 d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000)); 1253 var expires = "expires=" + d.toUTCString(); 1254 document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/"; 1255 } 1256 1257 $('button,a', '#splashModal').click(function () { 1258 setCookie("splash", $('#splashModal').attr('data-splash-code'), 30); 1259 }); 1260 1261 </script> 1262 1263 @* -- -- -- -- -- -- *@ 1264 1265 1266 <script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script> 1267 @GetValue("Item.Area.Webfonts") 1268 <script type="text/javascript" src="/Files/Templates/Designs/1883_Iris/javascript/compressed/i_compressed.js?v=@thejsstamp"></script> 1269 @GetValue("DwCookieWarning") 1270 @GetValue("Item.Area.ScriptsBodyEnd") 1271 @RenderSnippet("Scripts") 1272 @RenderSnippet("FormScripts") 1273 @RenderSnippet("FormScripts2") 1274 @RenderSnippet("FormScripts3") 1275 1276 </body> 1277 </html> 1278