Error executing template "Designs/ProjectZero/_parsed/news.parsed.cshtml"
System.InvalidCastException: Specified cast is not valid.
   at CompiledRazorTemplates.Dynamic.RazorEngine_1b1ade76d85c477692b5e20e55c2b5cf.Execute() in D:\dynamicweb.net\Solutions\Earned\pz.net.dynamicweb-cms.com\files\Templates\Designs\ProjectZero\_parsed\news.parsed.cshtml:line 514
   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 @inherits RazorTemplateBase< RazorTemplateModel< Template >> 2 @using System; 3 @using Dynamicweb.Rendering; 4 @using Dynamicweb.Frontend; 5 @using System.Web; 6 7 <!DOCTYPE html> 8 <html lang="en"> 9 <head> 10 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 11 <meta http-equiv="X-UA-Compatible" content="IE=edge"> 12 <meta name="viewport" content="width=device-width, initial-scale=1"> 13 <meta property="og:url" content='@HttpContext.Current.Request.Url.AbsoluteUri'> 14 <meta property="og:type" content="website"> 15 <meta property="og:title" content='@GetString("Item.Title")'> 16 <meta property="og:author" content='ProjectZero'> 17 @{ 18 string metaTeaser = @GetString("Item.Teaser"); 19 metaTeaser = HttpUtility.HtmlEncode(metaTeaser); 20 } 21 <meta property="og:description" content='@metaTeaser'> 22 @{ 23 string metaImageUrl = "http://www.projectzero.dk"; 24 if(@GetString("Item.NewsLetterImage") == ""){ 25 metaImageUrl += "/Files/Templates/Designs/ProjectZero/images/placeholder.jpg"; 26 } 27 else{ 28 metaImageUrl += "" + @GetString("Item.NewsLetterImage"); 29 } 30 } 31 <meta property="og:image" content='@metaImageUrl'> 32 33 <title>@GetValue("Title")</title> 34 @GetValue("MetaTags") 35 @GetValue("CopyRightNotice") 36 37 <!--Bootstrap--> 38 <!-- <link rel="shortcut icon" type="image/ico" href="/images/favicon.ico"/>--> 39 <link href="/Files/Templates/Designs/ProjectZero/css/bootstrap.min.css" rel="stylesheet"> 40 <link href="/Files/Templates/Designs/ProjectZero/css/style.css" rel="stylesheet"> 41 <link href="/Files/Templates/Designs/ProjectZero/css/jquery.bxslider.css" rel="stylesheet"> 42 <link href="/Files/Templates/Designs/ProjectZero/css/yamm.css" rel="stylesheet"> 43 <link href="/Files/Templates/Designs/ProjectZero/css/owl.carousel.css" rel="stylesheet"> 44 <link href="/Files/Templates/Designs/ProjectZero/css/owl.theme.css" rel="stylesheet"> 45 <link href='/Files/Templates/Designs/ProjectZero/css/OpenSans.css' rel='stylesheet' type='text/css'> 46 <link href="/Files/Templates/Designs/ProjectZero/css/font-awesome.css" rel="stylesheet"> 47 <link rel="stylesheet" href="/Files/Templates/Designs/ProjectZero/css/datepicker.css" type="text/css"> 48 <link rel="stylesheet" href="/Files/Templates/Designs/ProjectZero/css/jquery.cookiebar.css" type="text/css"> 49 <!-- <link rel="stylesheet" href="css/prettyPhoto.css" type="text/css" /> --> 50 51 <!--[if IE]><link rel="shortcut icon" href="/Files/Templates/Designs/ProjectZero/images/favicon.ico"><![endif]--> 52 <link rel="icon" href="/Files/Templates/Designs/ProjectZero/images/favicon.ico"> 53 54 55 56 <!-- @if(@GetString("DwTopPageID") != "1") 57 { 58 <link href='css/@GetString("DwTopPageID")theme.css' rel="stylesheet"> 59 } --> 60 <!-- Google Analytics --> 61 <script> 62 (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ 63 (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), 64 m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) 65 })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); 66 67 68 if(@GetInteger("DwAreaID") == 1) { 69 ga('create', 'UA-66343544-1', 'auto'); 70 } 71 if(@GetInteger("DwAreaID") == 20) { 72 ga('create', 'UA-66343544-2', 'auto'); 73 } 74 if(@GetInteger("DwAreaID") == 21) { 75 ga('create', 'UA-66343544-3', 'auto'); 76 } 77 console.log(ga); 78 ga('require', 'linkid'); 79 ga('send', 'pageview'); 80 81 </script> 82 <!-- Hotjar Tracking Code for http://www.projectzero.dk/ --> 83 <script> 84 (function(h,o,t,j,a,r){ 85 h.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)}; 86 h._hjSettings={hjid:293440,hjsv:5}; 87 a=o.getElementsByTagName('head')[0]; 88 r=o.createElement('script');r.async=1; 89 r.src=t+h._hjSettings.hjid+j+h._hjSettings.hjsv; 90 a.appendChild(r); 91 })(window,document,'//static.hotjar.com/c/hotjar-','.js?sv='); 92 </script> 93 94 <!-- End Google Analytics --> 95 <script src="https://maps.googleapis.com/maps/api/js?v=3.exp"></script> 96 @GetValue("Stylesheets") 97 @GetValue("Javascripts") 98 </head> 99 <body class='@GetString("DwAreaName")'> 100 <!-- The headsection of the homepage --> 101 <header> 102 <!-- The top bar with language and topmenu --> 103 <div class="topbar"> 104 <div class="container nopad"> 105 <div class="row"> 106 <div class="col-md-4 languagebar"> 107 <ul class="lang-selector languagelist"> 108 <li><a href="http://www.projectzero.dk"><img class="languageimage" src='/Files/Templates/Designs/ProjectZero/images/dk.png'></a></li> 109 <li><a href="http://www.brightgreenbusiness.com"><img class="languageimage" src='/Files/Templates/Designs/ProjectZero/images/uk.png'></a></li> 110 <li><a href="http://www.projectzero.dk/default.aspx?id=100523"><img class="languageimage" src='/Files/Templates/Designs/ProjectZero/images/cn.png'></a></li> 111 </ul> 112 </div> 113 <div class="col-md-8 topmenu"> 114 @GetValue("DwNavigation(topnav)") 115 </div> 116 </div> 117 </div> 118 </div> 119 <div class="container nopad"> 120 <div class="menuwrapper"> 121 <div class="col-md-12 menu"> 122 @{ 123 string homelink = ""; 124 if(@GetInteger("DwAreaID") == 20) 125 { 126 homelink = "http://brightgreenbusiness.com"; 127 }else if(@GetInteger("DwAreaID") == 21) 128 { 129 homelink = "http://www.projectzero.dk/default.aspx?id=100523"; 130 }else 131 { 132 homelink = "http://www.projectzero.dk/"; 133 } 134 } 135 <a href='@homelink'> 136 <div class="logowrapper"> 137 <!-- <img class="img-responsive logoimage" src="images/logo.png" /> --> 138 </div> 139 </a> 140 <div class="navbar-header"> 141 <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-mobile-menu"> 142 <span class="menubutton">Forside</span><i class="fa fa-chevron-right suggestedsearchicon"></i> 143 </button> 144 </div> 145 <div class="collapse nav yamm navbar-collapse " id="bs-main-menu"> 146 @GetValue("DwNavigation(mainmenu)") 147 </div> 148 <div class="menu-wrapper"> 149 <div class="collapse nav navbar-collapse " id="bs-mobile-menu"> 150 @GetValue("DwNavigation(mobilemenu)") 151 @GetValue("DwNavigation(topnav2)") 152 <ul class="lang-selector languagelist"> 153 <li><a href="http://www.projectzero.dk"><img class="languageimage" src='/Files/Templates/Designs/ProjectZero/images/dk.png'></a></li> 154 <li><a href="http://brightgreenbusiness.com"><img class="languageimage" src='/Files/Templates/Designs/ProjectZero/images/uk.png'></a></li> 155 <li><a href="http://www.projectzero.dk/default.aspx?id=100523"><img class="languageimage" src='/Files/Templates/Designs/ProjectZero/images/cn.png'></a></li> 156 </ul> 157 </div> 158 </div> 159 <div class="searchwrapper"> 160 <form method="get" action="/Default.aspx" class="form-search"> 161 <input type="hidden" name="ID" value='@GetString("DwAreaSearchPageID")'> 162 <input type="text" class="form-control searchfield" name="search" id="q" value="S&oslash;g"> 163 <input type="submit" value="Search" class="btn" style="display:none"> 164 </form> 165 <div id="suggestedsearch"></div> 166 </div> 167 </div> 168 </div> 169 </div> 170 </header> 171 172 <!-- The slider --> 173 <div class="container nopad sliderwrapper"> 174 <div class="bgwhite"> 175 176 <!-- The Content of the homepage --> 177 178 <div class="container nopad mainnewswrapper"> 179 <!-- Menu --> 180 <div class="col-md-3 col-push-3 mobilepullbottom"> 181 <div class="leftmenu-wrapper"> 182 <div class="leftmenu-header"> 183 <div class="leftmenu-heading"> 184 <h3 class="leftmenu-title">@GetGlobalValue("Global:Page.Name")</h3> 185 </div> 186 </div> 187 @GetValue("DwNavigation(leftmenu)") 188 </div> 189 </div> 190 <!-- News content --> 191 <div id="outernewswrapper" class="col-md-9"> 192 @if(GetString("Item.PageReferenceId.Id") == ""){ 193 if(!string.IsNullOrEmpty(GetString("Item.Image"))){ 194 <div class="row liquid"> 195 <div class="col-md-12 nopad"> 196 <img src='/Admin/Public/GetImage.ashx?Image=@GetString("Item.Image")&Format=jpg&Width=878' class="img-responsive" title='@GetString("Item.Image")'> 197 </div> 198 <div class="col-md-12 nopad newsimagecaption"> 199 <p>@GetString("Item.ImageCaption")</p> 200 </div> 201 </div> 202 <div class="row nopad"> 203 <div class="divider"> 204 </div> 205 </div> 206 207 } 208 }else 209 { 210 211 var sql = "SELECT N.Title, N.Image, N.ImageCaption, N.HideTitle, N.Teaser, N.Content, N.HideDate, N.Date FROM Page P JOIN ItemType_Nyhed N ON N.Id = P.PageItemId WHERE N.Id = '" + GetString("Item.PageReferenceId.Id") + "'"; 212 using (var reader = Dynamicweb.Data.Database.CreateDataReader(sql)) { 213 while (reader.Read()) { 214 if(!string.IsNullOrEmpty((String)reader["Image"])){ 215 <div class="row liquid"> 216 <div class="col-md-12 nopad"> 217 <img src='/Admin/Public/GetImage.ashx?Image=@reader["Image"]&Format=jpg&Width=878' class="img-responsive" title='@reader["Image"]'> 218 </div> 219 <div class="col-md-12 nopad newsimagecaption"> 220 <p>@reader["ImageCaption"]</p> 221 </div> 222 </div> 223 <div class="row nopad"> 224 <div class="divider"> 225 </div> 226 </div> 227 228 } 229 } 230 } 231 } 232 233 <div class="row nopad"> 234 <div class="col-md-8 newstext"> 235 @if(GetString("Item.PageReferenceId.Id") == ""){ 236 <div class="row padright"> 237 <br> 238 @if(GetBoolean("Item.HideTitle") == false){ 239 <h2 class="headline">@GetString("Item.Title")</h2> 240 } 241 <div class="runningtext">@GetString("Item.Teaser")</div> 242 <div class="nopadleft contenttext"> 243 <article>@GetString("Item.Content")</article> 244 </div> 245 </div> 246 }else 247 { 248 var sql = "SELECT N.Title, N.Image, N.ImageCaption, N.HideTitle, N.Teaser, N.Content, N.HideDate, N.Date FROM Page P JOIN ItemType_Nyhed N ON N.Id = P.PageItemId WHERE N.Id = '" + GetString("Item.PageReferenceId.Id") + "'"; 249 using (var reader = Dynamicweb.Data.Database.CreateDataReader(sql)) { 250 while (reader.Read()) { 251 <div class="row padright"> 252 <br> 253 @if((Boolean)@reader["HideTitle"] == false){ 254 <h2 class="headline">@reader["Title"]</h2> 255 } 256 <div class="runningtext">@reader["Teaser"]</div> 257 <div class="nopadleft contenttext"> 258 <article>@reader["Content"]</article> 259 </div> 260 </div> 261 } 262 } 263 } 264 265 <div class="row padright"> 266 <div id="Indholdsafsnit">@GetValue("DwContent(Indholdsafsnit)")</div> 267 </div> 268 </div> 269 <div class="col-md-4"> 270 @if(GetString("Item.PageReferenceId.Id") == ""){ 271 if(GetBoolean("Item.HideDate") == false){ 272 <div class="row"> 273 <div class="col-md-12"> 274 @if(GetBoolean("Item.Event") != false){ 275 string fromdate = ""; 276 string todate = ""; 277 string fromtime = ""; 278 string totime = ""; 279 280 if(!string.IsNullOrEmpty(@GetString("Item.StartDate").ToString())){ 281 fromdate = @GetDate("Item.StartDate").ToString("d. MMMM yyyy"); 282 } 283 if(!string.IsNullOrEmpty(@GetString("Item.EventFromTime").ToString())){ 284 fromtime = @GetString("Item.EventFromTime"); 285 } 286 if(!string.IsNullOrEmpty(@GetString("Item.EndDate").ToString())){ 287 todate = @GetDate("Item.EndDate").ToString("d. MMMM yyyy"); 288 } 289 if(!string.IsNullOrEmpty(@GetString("Item.EventToTime").ToString())){ 290 totime = @GetString("Item.EventToTime"); 291 } 292 <p class="nomarg"> 293 @if(todate != "" && fromdate != "" && todate == fromdate) 294 { 295 @fromdate 296 if(@fromtime != "") 297 { 298 <span>kl. @fromtime </span> 299 } 300 if(@totime != "") 301 { 302 <span> - @totime</span> 303 } 304 }else 305 { 306 @fromdate 307 if(@fromtime != "") 308 { 309 <span>kl. @fromtime </span> 310 } 311 <span> - </span> 312 @todate 313 if(@totime != "") 314 { 315 <span>kl. @totime</span> 316 } 317 } 318 </p> 319 320 <!-- if(!string.IsNullOrEmpty(@GetString("Item.StartDate").ToString())){ 321 <p class="nomarg"> 322 @GetDate("Item.StartDate").ToString("d. MMMM yyyy") 323 @if(!string.IsNullOrEmpty(@GetString("Item.EventFromTime").ToString())){ 324 <span>Kl: </span> 325 @GetString("Item.EventFromTime") 326 327 } 328 </p> 329 } 330 331 if(!string.IsNullOrEmpty(@GetString("Item.EndDate").ToString())){ 332 <p class="nomarg"> 333 @GetDate("Item.EndDate").ToString("d. MMMM yyyy") 334 @if(!string.IsNullOrEmpty(@GetString("Item.EventToTime").ToString())){ 335 <span>Kl: </span> 336 @GetString("Item.EventToTime") 337 } 338 </p> 339 } --> 340 if(!string.IsNullOrEmpty(@GetString("Item.EventPrice").ToString())){ 341 <p class="nomarg">Pris: @GetString("Item.EventPrice")</p> 342 } 343 } 344 else 345 { 346 <p class="nomarg">@GetDate("Item.Date").ToString("d. MMMM yyyy")</p> 347 } 348 349 </div> 350 </div> 351 <div class="row nopad"> 352 <div class="dividerSmall"> 353 </div> 354 </div> 355 } 356 }else 357 { 358 359 var sql = "SELECT N.Title, N.Image, N.ImageCaption, N.HideTitle, N.Teaser, N.Content, N.HideDate, N.Date, N.Event, N.StartDate, N.EndDate, N.EventFromTime, N.EventToTime, N.EventPrice FROM Page P JOIN ItemType_Nyhed N ON N.Id = P.PageItemId WHERE N.Id = '" + GetString("Item.PageReferenceId.Id") + "'"; 360 using (var reader = Dynamicweb.Data.Database.CreateDataReader(sql)) { 361 while (reader.Read()) { 362 if((Boolean)@reader["HideDate"] == false){ 363 <div class="row"> 364 <div class="col-md-12"> 365 @if((Boolean)@reader["Event"] != false){ 366 string fromdate = ""; 367 string todate = ""; 368 string fromtime = ""; 369 string totime = ""; 370 371 if(!string.IsNullOrEmpty(@GetString("Item.StartDate").ToString())){ 372 fromdate = @GetDate("Item.StartDate").ToString("d. MMMM yyyy"); 373 } 374 if(!string.IsNullOrEmpty(@GetString("Item.EventFromTime").ToString())){ 375 fromtime = @GetString("Item.EventFromTime"); 376 } 377 if(!string.IsNullOrEmpty(@GetString("Item.EndDate").ToString())){ 378 todate = @GetDate("Item.EndDate").ToString("d. MMMM yyyy"); 379 } 380 if(!string.IsNullOrEmpty(@GetString("Item.EventToTime").ToString())){ 381 totime = @GetString("Item.EventToTime"); 382 } 383 <p class="nomarg"> 384 @if(todate != "" && fromdate != "" && todate == fromdate) 385 { 386 @fromdate 387 if(@fromtime != "") 388 { 389 <span>kl. @fromtime </span> 390 } 391 if(@totime != "") 392 { 393 <span> - @totime</span> 394 } 395 }else 396 { 397 @fromdate 398 if(@fromtime != "") 399 { 400 <span>kl. @fromtime </span> 401 } 402 <span> - </span> 403 @todate 404 if(@totime != "") 405 { 406 <span>kl. @totime</span> 407 } 408 } 409 </p> 410 <!-- if(!string.IsNullOrEmpty(reader["StartDate"].ToString())){ 411 <p class="nomarg"> 412 @(((DateTime)@reader["StartDate"]).ToString("d. MMMM yyyy")) 413 @if(!string.IsNullOrEmpty(reader["EventFromTime"].ToString())){ 414 @reader["EventFromTime"] 415 } 416 </p> 417 } 418 419 if(!string.IsNullOrEmpty(reader["EndDate"].ToString())){ 420 <p class="nomarg"> 421 @(((DateTime)@reader["EndDate"]).ToString("d. MMMM yyyy")) 422 @if(!string.IsNullOrEmpty(reader["EventToTime"].ToString())){ 423 @reader["EventToTime"] 424 } 425 </p> 426 } --> 427 if(!string.IsNullOrEmpty(reader["EventPrice"].ToString())){ 428 <p class="nomarg">Pris: @reader["EventPrice"]</p> 429 } 430 } 431 else 432 { 433 <p class="nomarg">@(((DateTime)@reader["Date"]).ToString("d. MMMM yyyy"))</p> 434 } 435 </div> 436 </div> 437 <div class="row nopad"> 438 <div class="dividerSmall"> 439 </div> 440 </div> 441 } 442 } 443 } 444 } 445 446 <span class='st_facebook_large' displaytext='Facebook'></span> 447 <span class='st_linkedin_large' displaytext='LinkedIn'></span> 448 <span class='st_email_large' displaytext='Email'></span> 449 <span style="display:inline-block;vertical-align:top;"><a href='http://www.projectzero.dk/Default.aspx?ID=110802&PageItemId=@GetString("Item.Id")&pageId=@GetString("DwPageID")&pdf=true&topBottomMargin=10&filename=@(GetString("DwPageName")).pdf'><img src="/Files/Templates/Designs/ProjectZero/images/printer.png"></a></span> 450 451 <div id="Højre kolonne">@GetValue("DwContent(Hjrekolonne)")</div> 452 453 </div> 454 </div> 455 <div> 456 @{ 457 var sqlRelated = ""; 458 var regex = new System.Text.RegularExpressions.Regex("(<([^>]+)>)"); 459 } 460 @if(GetString("Item.PageReferenceId.Id") == ""){ 461 462 sqlRelated = 463 "SELECT DISTINCT P.PageID, N.Title, N.date, N.teaser, N.predefinedtags, COALESCE(NULLIF(N.carousel_image,''), NULLIF(N.image,''), NULLIF(NP.picture,''), '/Files/Templates/Designs/ProjectZero/images/placeholder.jpg') AS image " + 464 "FROM Page P " + 465 " JOIN ItemType_Nyhed N ON N.id = P.PageItemId " + 466 " LEFT JOIN newsPictures NP ON NP.PageId = P.PageID " + 467 " WHERE P.PageId = (SELECT RelatedNews1 FROM [Page] JOIN Itemtype_Nyhed ON Itemtype_Nyhed.id = Page.pageItemId WHERE pageId = " + GetString("DwPageID") + ") " + 468 "UNION " + 469 "SELECT DISTINCT P.PageID, N.Title, N.date, N.teaser, N.predefinedtags, COALESCE(NULLIF(N.carousel_image,''), NULLIF(N.image,''), NULLIF(NP.picture,''), '/Files/Templates/Designs/ProjectZero/images/placeholder.jpg') AS image " + 470 "FROM Page P " + 471 " JOIN ItemType_Nyhed N ON N.id = P.PageItemId " + 472 " LEFT JOIN newsPictures NP ON NP.PageId = P.PageID " + 473 " WHERE P.PageId = (SELECT RelatedNews2 FROM [Page] JOIN Itemtype_Nyhed ON Itemtype_Nyhed.id = Page.pageItemId WHERE pageId = " + GetString("DwPageID") + ") " + 474 "UNION " + 475 "SELECT DISTINCT P.PageID, N.Title, N.date, N.teaser, N.predefinedtags, COALESCE(NULLIF(N.carousel_image,''), NULLIF(N.image,''), NULLIF(NP.picture,''), '/Files/Templates/Designs/ProjectZero/images/placeholder.jpg') AS image " + 476 "FROM Page P " + 477 " JOIN ItemType_Nyhed N ON N.id = P.PageItemId " + 478 " LEFT JOIN newsPictures NP ON NP.PageId = P.PageID " + 479 " WHERE P.PageId = (SELECT RelatedNews3 FROM [Page] JOIN Itemtype_Nyhed ON Itemtype_Nyhed.id = Page.pageItemId WHERE pageId = " + GetString("DwPageID") + ") "; 480 }else 481 { 482 sqlRelated = 483 "SELECT DISTINCT P.PageID, N.Title, N.date, N.teaser, N.predefinedtags, COALESCE(NULLIF(N.carousel_image,''), NULLIF(N.image,''), NULLIF(NP.picture,''), '/Files/Templates/Designs/ProjectZero/images/placeholder.jpg') AS image " + 484 "FROM Page P " + 485 " JOIN ItemType_Nyhed N ON N.id = P.PageItemId " + 486 " LEFT JOIN newsPictures NP ON NP.PageId = P.PageID " + 487 " WHERE P.PageId = (SELECT RelatedNews1 FROM [Page] JOIN Itemtype_Nyhed ON Itemtype_Nyhed.id = Page.pageItemId WHERE pageId = '" + GetString("Item.PageReferenceId.Id") + "') " + 488 "UNION " + 489 "SELECT DISTINCT P.PageID, N.Title, N.date, N.teaser, N.predefinedtags, COALESCE(NULLIF(N.carousel_image,''), NULLIF(N.image,''), NULLIF(NP.picture,''), '/Files/Templates/Designs/ProjectZero/images/placeholder.jpg') AS image " + 490 "FROM Page P " + 491 " JOIN ItemType_Nyhed N ON N.id = P.PageItemId " + 492 " LEFT JOIN newsPictures NP ON NP.PageId = P.PageID " + 493 " WHERE P.PageId = (SELECT RelatedNews2 FROM [Page] JOIN Itemtype_Nyhed ON Itemtype_Nyhed.id = Page.pageItemId WHERE pageId = '" + GetString("Item.PageReferenceId.Id") + "') " + 494 "UNION " + 495 "SELECT DISTINCT P.PageID, N.Title, N.date, N.teaser, N.predefinedtags, COALESCE(NULLIF(N.carousel_image,''), NULLIF(N.image,''), NULLIF(NP.picture,''), '/Files/Templates/Designs/ProjectZero/images/placeholder.jpg') AS image " + 496 "FROM Page P " + 497 " JOIN ItemType_Nyhed N ON N.id = P.PageItemId " + 498 " LEFT JOIN newsPictures NP ON NP.PageId = P.PageID " + 499 " WHERE P.PageId = (SELECT RelatedNews3 FROM [Page] JOIN Itemtype_Nyhed ON Itemtype_Nyhed.id = Page.pageItemId WHERE pageId = '" + GetString("Item.PageReferenceId.Id") + "') "; 500 } 501 @using (var reader = Dynamicweb.Data.Database.CreateDataReader(sqlRelated)) { 502 while (reader.Read()) { 503 <div class="col-md-4 newsitem"> 504 <span style="display: none" class="hdnDate">@reader["date"]</span> 505 <a href='/Default.aspx?ID=@reader["PageID"]'> 506 <div class="newswrapper"> 507 <div class="newsheader"> 508 <div class="newsheadertext">@(new string(((String)reader["Title"]).Take(30).ToArray()))</div> 509 </div> 510 <div class="newsimage"> 511 <img class="lazyOwl img-responsive" src='/Admin/Public/GetImage.ashx?Image=@reader[5]&Format=jpg&width=300' alt=""> 512 </div> 513 <div class="newscontent"> 514 <div>@(((DateTime)reader["Date"]).ToShortDateString())</div> 515 <p>@(new string(regex.Replace((String)reader["Teaser"], "").Take(150).ToArray()).Replace("a href=","").Replace(">","").Replace("<",""))...</p> 516 </div> 517 </div> 518 </a> 519 </div> 520 } 521 } 522 </div> 523 </div> 524 </div> 525 <div id="map">@GetValue("DwContent(map)")</div> 526 527 528 529 </div> 530 </div> 531 532 <!-- The footer of the homepage --> 533 <footer> 534 <div class="row footerContentWrapper"> 535 <p>ProjectZero | Alsion 2 | 6400 Sønderborg | tlf. 31 68 30 90 | <a href="mailto:post@projectzero.dk">post@projectzero.dk</a> | CVR 29 21 56 42</p> 536 </div> 537 @*if(@GetInteger("DwAreaID") == 1) 538 { 539 <!-- <div id="footermapwrapper"> 540 <a href="http://www.ZEROmap.dk" target="_blank"> 541 <div class="footermap"> 542 <h4 class="footermapheader">ZEROmap<i class="fa fa-chevron-right suggestedsearchicon"></i></h4> 543 <p>Klik ind og bliv inspireret af andres historier</p> 544 </div> 545 </a> 546 </div> --> 547 }*@ 548 <!-- <div id="map-canvas"></div> --> 549 @* @RenderPageContent(125)*@ 550 <!-- <div class="container nopad"> 551 <div class="row"> 552 <div class="col-md-3 footercontent"> 553 <h4 class="footerheader">Kontakt</h4> 554 <p>ProjectZero</p> 555 <p>Alsion 2</p> 556 <p>6400 Sønderborg</p> 557 <p>Tlf. 3840 5425</p> 558 <p><a href="post@projectzero.dk">post@projectzero.dk</a></p> 559 </div> 560 <div class="col-md-3 footercontent"> 561 <div class="contactform"> 562 <h4>&nbsp;</h4> 563 <input type="text" class="form-control" name="txtName" id="txtName" value="Navn" /> 564 <input type="text" class="form-control" name="txtEmail" id="txtEmail" value="Email" /> 565 <textarea class="form-control" name="txtMessage" id="txtMessage" value="Besked"></textarea> 566 <input type="submit" value="Send" class="form-control" id="btnSend" name="btnSend" /> 567 </div> 568 </div> 569 <div class="col-md-3 footercontent"> 570 <h4 class="footerheader">ZEROmap</h4> 571 </div> 572 <div class="col-md-3 footercontent"> 573 <h4 class="footerheader">Samarbejdspartnere</h4> 574 </div> 575 </div> 576 </div> --> 577 </footer> 578 579 <div style="display:none;"><input id="colorcatcher" type="text" name="colorcatcher" value='@GetString("DwTopPageID")'></div> 580 581 582 <div class="cookiepolicy"> 583 <p>Cookiepolitik</p> 584 </div> 585 586 587 588 <!-- Scripts --> 589 590 <!-- jQuery (necessary for Bootstrap's JavaScript plugins) --> 591 <script src="/Files/Templates/Designs/ProjectZero/js/jquery.min.js"></script> 592 <!-- Include all compiled plugins (below), or include individual files as needed --> 593 <!-- <script src="js/bootstrap.min.js"></script> --> 594 <script src="/Files/Templates/Designs/ProjectZero/js/bootstrap.min.js"></script> 595 <script src="/Files/Templates/Designs/ProjectZero/js/holder.js"></script> 596 <script src="/Files/Templates/Designs/ProjectZero/js/jquery.bxslider.js"></script> 597 <script src="/Files/Templates/Designs/ProjectZero/js/plugins/jquery.easing.1.3.js"></script> 598 <script src="/Files/Templates/Designs/ProjectZero/js/plugins/jquery.fitvids.js"></script> 599 <script src="/Files/Templates/Designs/ProjectZero/js/plugins/jquery.lazyload.min.js"></script> 600 <script src="/Files/Templates/Designs/ProjectZero/js/owl.carousel.js"></script> 601 <!-- <script src="js/jquery.prettyPhoto.js"></script> --> 602 <!-- <script type="text/javascript" src="http://s7.addthis.com/js/300/addthis_widget.js#pubid=ra-53ed0a8f52164cd1"></script> --> 603 <script type="text/javascript" src="/Files/Templates/Designs/ProjectZero/Maps/javascripts/Maps.js"></script> 604 <script src="/Files/Templates/Designs/ProjectZero/js/bootstrap-datepicker.js"></script> 605 <script type="text/javascript"> 606 var DWlanguageLayerId = @GetInteger("DwAreaID"); 607 // console.log(DWlanguageLayerId) 608 </script> 609 <script src="/Files/Templates/Designs/ProjectZero/js/jquery.cookiebar.js"></script> 610 <script type="text/javascript">var switchTo5x=true;</script> 611 <script type="text/javascript" id="st_insights_js" src="http://w.sharethis.com/button/buttons.js?publisher=af18e334-9d32-4501-a63a-29208324f396"></script> 612 <script type="text/javascript">stLight.options({publisher: "af18e334-9d32-4501-a63a-29208324f396", doNotHash: false, doNotCopy: false, hashAddressBar: false});</script> 613 <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --> 614 <!-- WARNING: Respond.js doesn't work if you view the page via file:// --> 615 <!--[if lt IE 9]> 616 <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> 617 <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> 618 <![endif]--> 619 620 621 <script src="/Files/Templates/Designs/ProjectZero/js/jquery.kinetic.min.js"></script> 622 <script> 623 $('.timelinewrapper').kinetic({ 624 filterTarget: function(target, e){ 625 if (!/down|start/.test(e.type)){ 626 return !(/|a|/i.test(target.tagName)); 627 } 628 } 629 }); 630 $('.eventnewsprev').click(function(){ 631 $('.timelinewrapper').kinetic('start', { velocity: -10 }); 632 $('.timelinewrapper').kinetic('end'); 633 }); 634 $('.eventnewsnext').click(function(){ 635 $('.timelinewrapper').kinetic('start', { velocity: 10 }); 636 $('.timelinewrapper').kinetic('end'); 637 }); 638 </script> 639 <!-- <script> 640 // This example displays a marker at the center of Australia. 641 // When the user clicks the marker, an info window opens. 642 643 function initialize() { 644 var myLatlng = new google.maps.LatLng(54.954436055687005,9.766051769256592); 645 var markerLatlng = new google.maps.LatLng(54.9130458,9.778900600000043); 646 var mapOptions = { 647 zoom: 11, 648 center: myLatlng 649 }; 650 651 var map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions); 652 653 var contentString = '<div class="mapmarkerwrapper">'+ 654 '<h4>ProjectZero'+ 655 '</h4>'+ 656 '<p>Alsion 2'+ 657 '</p>'+ 658 '<p>6400 Sønderborg'+ 659 '</p>'+ 660 '<p>Tlf: 3840 5425'+ 661 '</p>'+ 662 '<p><a href="mailto:post@projectzero.dk">post@projectzero.dk</a>'+ 663 '</p>'+ 664 '</div>'; 665 666 var infowindow = new google.maps.InfoWindow({ 667 content: contentString 668 }); 669 670 var marker = new google.maps.Marker({ 671 position: markerLatlng, 672 map: map, 673 title: 'Uluru (Ayers Rock)' 674 }); 675 infowindow.open(map,marker); 676 google.maps.event.addListener(marker, 'click', function() { 677 infowindow.open(map,marker); 678 }); 679 map.setCenter(myLatlng); 680 } 681 682 google.maps.event.addDomListener(window, 'load', initialize); 683 684 </script> --> 685 <script> 686 jQuery(document).ready(function(){ 687 jQuery('.date').datepicker({ 688 weekStart: 1, 689 format: "dd-mm-yyyy", 690 calendarWeeks: true, 691 daysShort: true 692 }).prop("readonly", true); 693 }); 694 </script> 695 <script type="text/javascript"> 696 <!-- $("img.lazy").lazyload(); --> 697 $(document).ready(function(){ 698 $(".slidepic").each(function(){ 699 $(this).show(); 700 }); 701 $('.bxslider').bxSlider({ 702 mode: 'fade', 703 captions: true, 704 auto: true, 705 706 adaptiveHeight: true, 707 autoControls: false, 708 pause:10000 709 }); 710 $(".slidepic").attr("title",""); 711 }); 712 </script> 713 <script type="text/javascript"> 714 $(document).ready(function() { 715 //$('#q').on('keyup', function(e) { 716 // if (e.which !== 32) { 717 // var value = $(this).val(); 718 // var noSlashValue = encodeURIComponent(value);//.replace(/\//g,''); 719 // var noSlashCount = noSlashValue.length; 720 // if (noSlashCount >= 3) { 721 // $.ajax({ 722 // url: '/Files/Templates/Designs/ProjectZero/Partials/suggestedsearch.cshtml?search=' + noSlashValue + '&areaId=' + @GetInteger("DwAreaID"), 723 // contentType: 'application/html; charset=ISO-8859-1', 724 // type: 'GET', 725 // dataType: 'html' 726 // }) 727 // .success(function(result) 728 // { 729 // $('#suggestedsearch').html(result); 730 // }) 731 // .error(function(xhr, status) 732 // { 733 // 734 // }) 735 // } 736 // else 737 // { 738 // $("#suggestedsearch").text(""); 739 // } 740 // } 741 //}); 742 }); 743 744 </script> 745 <script type="text/javascript"> 746 $(document).ready(function() { 747 $('input[name=btnNewsSearch]').click(function(e) { 748 $("#newssearchresults").text(""); 749 if (e.which !== 32) { 750 var value = $("input[name=txtSearch]").val(); 751 //var noSlashValue = value.replace(/\//g,''); 752 //var noSlashCount = noSlashValue.length; 753 var encodedValue = encodeURIComponent(value); 754 var dateFrom = $("input[name=txtFromDate]").val(); 755 var dateTo = $("input[name=txtToDate]").val(); 756 var dateFromString = ''; 757 if(dateFrom == ''){ 758 dateFromString = '-1'; 759 }else{ 760 var fromDateParts = dateFrom.split("-"); 761 var year = fromDateParts[2]; 762 var month = parseInt(fromDateParts[1]) - 1; 763 var day = fromDateParts[0]; 764 dateFromString = Date.UTC(year,month,day) / 86400000 ; 765 } 766 var tags = ''; 767 $(".searchCb:checked").each(function(){ 768 var tag = encodeURIComponent($(this).data('tag')); 769 tags += tag + ','; 770 }); 771 if(dateTo == ''){ 772 dateToString = '-1'; 773 }else{ 774 var toDateParts = dateTo.split("-"); 775 var year = toDateParts[2]; 776 var month = parseInt(toDateParts[1]) - 1; 777 var day = toDateParts[0]; 778 dateToString = Date.UTC(year,month,day) / 86400000; 779 } 780 $("#loadergif").show(); 781 $('#newsearchresults').hide(); 782 $('#noresults').hide(); 783 $.ajax({ 784 url: '/Files/Templates/Designs/ProjectZero/Partials/newssearch.cshtml?search=' + encodedValue + '&from=' + dateFromString + '&to=' + dateToString + '&tags=' + tags + '&areaId=' + @GetString("DwAreaID"), 785 contentType: 'application/html; charset=ISO-8859-1', 786 type: 'GET', 787 dataType: 'html' 788 }) 789 .success(function(result) 790 { 791 $('#loadergif').hide(); 792 $('#newsearchresults').html(result); 793 if(result.length == 0){ 794 $('#noresults').show(); 795 }else{ 796 $('#newsearchresults').show(); 797 } 798 }) 799 .error(function(xhr, status) 800 { 801 802 }) 803 804 } 805 }); 806 }); 807 808 </script> 809 810 <script type="text/javascript"> 811 $(document).ready(function() { 812 if($("#forsideundersideowl").length){ 813 $("#owl-nyhedsslider").owlCarousel( 814 { 815 items : 3, 816 itemsDesktop: false, 817 lazyLoad: true, 818 pagination: false 819 }); 820 fixHover(); 821 } 822 }); 823 824 </script> 825 826 <script type="text/javascript"> 827 var owl; 828 var loading = false; 829 $(document).ready(function() { 830 $("#owl-example").owlCarousel( 831 { 832 items : 4, 833 //lazyLoad: true, 834 pagination: false 835 }); 836 owl = $("#owl-example").data('owlCarousel'); 837 }); 838 839 840 </script> 841 <script type="text/javascript"> 842 $(document).ready(function() { 843 844 $(".newsnext").click(function(){ 845 $("#owl-example").trigger('owl.next'); 846 }) 847 $(".newsprev").click(function(){ 848 $("#owl-example").trigger('owl.prev'); 849 }) 850 }); 851 </script> 852 <script type="text/javascript"> 853 854 $(document).ready(fixHover); 855 856 function fixHover(){ 857 $('.newsitem').hover(function() { 858 $(this).find('.newscontent').css({'background-color': '#999999','color':'#FFF'}); 859 $(this).find('.newscontent p').css({'background-color': '#999999','color':'#FFF'}); 860 $(this).find('.newscontent div').css({'background-color': '#999999','color':'#FFF'}); 861 862 }, function() { 863 $(this).find('.newscontent').css({'background-color': '#FFF','color':'#999999'}); 864 $(this).find('.newscontent p').css({'background-color': '#FFF','color':'#999999'}); 865 $(this).find('.newscontent div').css({'background-color': '#FFF','color':'#999999'}); 866 867 }); 868 } 869 </script> 870 <script type="text/javascript"> 871 $(document).ready(function(){ 872 var Input = $('input[name=txtName]'); 873 var default_value = Input.val(); 874 875 Input.focus(function() { 876 if(Input.val() == default_value) Input.val(""); 877 }).blur(function(){ 878 if(Input.val().length == 0) Input.val(default_value); 879 }); 880 }); 881 </script> 882 <script type="text/javascript"> 883 $(document).ready(function(){ 884 var Input = $('input[name=txtEmail]'); 885 var default_value = Input.val(); 886 887 Input.focus(function() { 888 if(Input.val() == default_value) Input.val(""); 889 }).blur(function(){ 890 if(Input.val().length == 0) Input.val(default_value); 891 }); 892 }); 893 </script> 894 <script type="text/javascript"> 895 $(document).ready(function () { 896 if(@GetInteger("DwAreaID") == 1) { 897 $('input[name=search]').val("Søg"); 898 } 899 if(@GetInteger("DwAreaID") == 20) { 900 $('input[name=search]').val("Search"); 901 } 902 if(@GetInteger("DwAreaID") == 21) { 903 $('input[name=search]').val("搜索"); 904 } 905 }); 906 </script> 907 <script type="text/javascript"> 908 $(document).ready(function(){ 909 910 var Input = $('input[name=search]'); 911 var default_value = Input.val(); 912 913 Input.focus(function() { 914 if(Input.val() == default_value) Input.val(""); 915 }).blur(function(){ 916 <!-- if(Input.val().length == 0) Input.val(default_value); --> 917 }); 918 }); 919 </script> 920 <script> 921 jQuery(function($) { 922 $('.navbar-collapse .dropdown').hover(function() { 923 $(this).find('.dropdown-menu').first().stop(true, true).delay(250).slideDown(); 924 925 }, function() { 926 $(this).find('.dropdown-menu').first().stop(true, true).delay(100).slideUp(); 927 928 }); 929 930 931 $('.zeromapmenu .dropdown').hover(function() { 932 $(this).find('.dropdown-menu').first().stop(true, true).delay(250).slideDown(); 933 }, function() { 934 $(this).find('.dropdown-menu').first().stop(true, true).delay(100).slideUp() 935 }); 936 }); 937 </script> 938 <script> 939 940 941 942 var yearTimeOut; 943 var year = new Date().getFullYear(); 944 jQuery(function($) { 945 $("#year").text(year); 946 $("#yearnext").click(function(){ 947 year = year + 1; 948 $("#year").text(year); 949 window.clearTimeout(yearTimeOut) 950 yearTimeOut = setTimeout(getNews(year, -1), 1000); 951 }); 952 $("#yearprev").click(function(){ 953 year = year - 1 954 $("#year").text(year); 955 window.clearTimeout(yearTimeOut) 956 yearTimeOut = setTimeout(getNews(year, -1), 1000); 957 }); 958 }); 959 </script> 960 <script> 961 jQuery(function($) { 962 $(".rotate:contains(Vejen mod nullet)").css("margin-left","-50px"); 963 $(".rotate:contains(Vejen mod nullet)").css("margin-top","50px"); 964 $(".rotate:contains(Learning and Innovation)").css("margin-left","-50px"); 965 $(".rotate:contains(Learning and Innovation)").css("margin-top","50px"); 966 $(".rotate:contains(Borger)").css("margin-left","-20px"); 967 $(".rotate:contains(Borger)").css("margin-top","110px"); 968 }); 969 </script> 970 <script> 971 var monthTimeOut; 972 var month = parseInt(((new Date).getMonth())); 973 var months; 974 if(@GetInteger("DwAreaID") == 1) { 975 months = new Array ("Januar", "Februar", "Marts", "April", "Maj", "Juni", "Juli", "August", "September", "Oktober", "November", "December"); 976 } 977 if(@GetInteger("DwAreaID") == 20) { 978 months = new Array ("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"); 979 } 980 if(@GetInteger("DwAreaID") == 21) { 981 months = new Array ("一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"); 982 } 983 jQuery(function($) { 984 985 $("#month").text(months[month]); 986 987 988 $("#monthnext").click(function(){ 989 if(month == 11) 990 { 991 year = year + 1; 992 $("#year").text(year); 993 month = 0; 994 } 995 else 996 { 997 month++; 998 } 999 $("#month").text(months[month]); 1000 window.clearTimeout(monthTimeOut) 1001 monthTimeOut = setTimeout(getNews( year, month + 1), 1000); 1002 }); 1003 $("#monthprev").click(function(){ 1004 if(month == 0) 1005 { 1006 year = year - 1; 1007 $("#year").text(year); 1008 month = 11; 1009 } 1010 else 1011 { 1012 month--; 1013 } 1014 $("#month").text(months[month]); 1015 window.clearTimeout(monthTimeOut) 1016 monthTimeOut = setTimeout(getNews( year, month + 1), 1000); 1017 }); 1018 1019 }); 1020 </script> 1021 <script> 1022 1023 1024 1025 var eventYearTimeOut; 1026 var eventYear = new Date().getFullYear(); 1027 $(document).ready(function() { 1028 $("#eventyear").text(eventYear); 1029 $("#eventyearnext").click(function(){ 1030 eventYear = eventYear + 1; 1031 $("#eventyear").text(eventYear); 1032 window.clearTimeout(eventYearTimeOut) 1033 eventYearTimeOut = setTimeout(getEvents(eventYear, -1), 1000); 1034 }); 1035 $("#eventyearprev").click(function(){ 1036 eventYear = eventYear - 1 1037 $("#eventyear").text(eventYear); 1038 window.clearTimeout(eventYearTimeOut) 1039 eventYearTimeOut = setTimeout(getEvents(eventYear, -1), 1000); 1040 }); 1041 }); 1042 </script> 1043 <script> 1044 var eventMonthTimeOut; 1045 var eventMonth = parseInt(((new Date).getMonth())); 1046 //var months = new Array ("Januar", "Februar", "Marts", "April", "Maj", "Juni", "Juli", "August", "September", "Oktober", "November", "December"); 1047 1048 $(document).ready(function() { 1049 $("#eventmonth").text(months[eventMonth]); 1050 1051 1052 $("#eventmonthnext").click(function(){ 1053 if(eventMonth == 11) 1054 { 1055 eventYear = eventYear + 1; 1056 $("#eventyear").text(eventYear); 1057 eventMonth = 0; 1058 } 1059 else 1060 { 1061 eventMonth++; 1062 } 1063 $("#eventmonth").text(months[eventMonth]); 1064 window.clearTimeout(eventMonthTimeOut) 1065 eventMonthTimeOut = setTimeout(getEvents( eventYear, eventMonth + 1), 1000); 1066 }); 1067 $("#eventmonthprev").click(function(){ 1068 if(eventMonth == 0) 1069 { 1070 eventYear = eventYear - 1; 1071 $("#eventyear").text(eventYear); 1072 eventMonth = 11; 1073 } 1074 else 1075 { 1076 eventMonth--; 1077 } 1078 $("#eventmonth").text(months[eventMonth]); 1079 window.clearTimeout(eventMonthTimeOut) 1080 eventMonthTimeOut = setTimeout(getEvents( eventYear, eventMonth + 1), 1000); 1081 }); 1082 1083 }); 1084 </script> 1085 <script type="text/javascript"> 1086 function getNews( nyear, nmonth){ 1087 return function(){ 1088 var stringMonth = month + 1; 1089 $.ajax( '/Files/Templates/Designs/ProjectZero/Partials/frontpageNyhedsslider.cshtml?year=' + nyear + '&month=' + nmonth + '&areaId=' + @GetString("DwAreaID"), 1090 { 1091 contentType: 'apllication/html; charset=utf-8', 1092 type: 'get', 1093 dataType: 'html', 1094 success: function(result){ 1095 $('#frontPageOwlcarousel').html($(result)); 1096 $("#owl-example").owlCarousel( 1097 { 1098 items : 4, 1099 lazyLoad: true, 1100 pagination: false 1101 }); 1102 owl = $("#owl-example").data('owlCarousel'); 1103 fixHover(); 1104 } 1105 }) 1106 } 1107 } 1108 </script> 1109 1110 <script type="text/javascript"> 1111 function getEvents( nyear, nmonth){ 1112 return function(){ 1113 var stringMonth = month + 1; 1114 $.ajax( '/Files/Templates/Designs/ProjectZero/Partials/timeline.cshtml?year=' + nyear + '&month=' + nmonth + '&areaId=' + @GetString("DwAreaID"), 1115 { 1116 contentType: 'apllication/html; charset=utf-8', 1117 type: 'get', 1118 dataType: 'html', 1119 success: function(result){ 1120 $('.timelinewrapper').html($(result)); 1121 $('.timelinewrapper').kinetic({ 1122 filterTarget: function(target, e){ 1123 if (!/down|start/.test(e.type)){ 1124 return !(/|a|/i.test(target.tagName)); 1125 } 1126 } 1127 }); 1128 } 1129 }) 1130 } 1131 } 1132 </script> 1133 1134 @* <script type="text/javascript"> 1135 $(document).ready(function(){ 1136 if($("#frontPageOwlcarousel").length){ 1137 $.ajax( '/Files/Templates/Designs/ProjectZero/Partials/frontpageNyhedsslider.cshtml?year=-1&month=-1&areaId=' + @GetString("DwAreaID"), 1138 { 1139 contentType: 'apllication/html; charset=utf-8', 1140 type: 'get', 1141 dataType: 'html', 1142 success: function(result){ 1143 $('#frontPageOwlcarousel').html($(result)); 1144 $("#owl-example").owlCarousel({ 1145 items : 4, 1146 lazyLoad: true, 1147 pagination: false 1148 }); 1149 owl = $("#owl-example").data('owlCarousel'); 1150 fixHover(); 1151 } 1152 } 1153 ) 1154 } 1155 }) 1156 </script>*@ 1157 <script type="text/javascript"> 1158 $(document).ready(function(){ 1159 if(@GetInteger("DwAreaID") == 1) { 1160 $('#newsheaderplaceholder').text("Nyheder"); 1161 $('#eventheaderplaceholder').text("Kalender"); 1162 } 1163 if(@GetInteger("DwAreaID") == 20) { 1164 $('#newsheaderplaceholder').text("News"); 1165 $('#eventheaderplaceholder').text("Events"); 1166 $('.langsearchheader').text("Search"); 1167 $('.langsearchlabel').text("Search for"); 1168 $('.langsearchbtn').val("Search"); 1169 } 1170 if(@GetInteger("DwAreaID") == 21) { 1171 $('#newsheaderplaceholder').text("新闻"); 1172 $('#eventheaderplaceholder').text("事件"); 1173 $('.langsearchheader').text("搜索"); 1174 $('.langsearchlabel').text("搜索"); 1175 $('.langsearchbtn').val("搜索"); 1176 } 1177 }) 1178 </script> 1179 <script type="text/javascript"> 1180 $(document).ready(function(){ 1181 $("#Question_2_11").prop('checked', true); 1182 $("#Question_2_11").parent().parent().hide(); 1183 }) 1184 </script> 1185 <!-- <script> 1186 (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ 1187 (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), 1188 m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) 1189 })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); 1190 1191 if(@GetInteger("DwAreaID") == 1) { 1192 ga('create', 'UA-66343544-1', 'auto'); 1193 } 1194 if(@GetInteger("DwAreaID") == 20) { 1195 ga('create', 'UA-66343544-2', 'auto'); 1196 } 1197 if(@GetInteger("DwAreaID") == 21) { 1198 ga('create', 'UA-5236074-6', 'auto'); 1199 } 1200 console.log(ga); 1201 ga('require', 'linkid'); 1202 ga('send', 'pageview'); 1203 1204 </script> --> 1205 <script type="text/javascript"> 1206 $(document).ready(function(){ 1207 $.cookieBar({ 1208 fixed: true, 1209 bottom:true, 1210 expireDays: 365 1211 }); 1212 }); 1213 </script> 1214 <script type="text/javascript"> 1215 $(document).ready(function(){ 1216 $(".cookiepolicy").click(function(){ 1217 $(".cookiepolicy").fadeOut(300); 1218 // console.log("cookie"); 1219 1220 //Retrieves current cookie preference 1221 var i,cookieValue='',aCookie,aCookies=document.cookie.split('; '); 1222 for (i=0;i<aCookies.length;i++){ 1223 aCookie = aCookies[i].split('='); 1224 if(aCookie[0]=='cb-enabled'){ 1225 1226 var cookieText; 1227 var cookieAcceptText; 1228 if(@GetInteger("DwAreaID") == 1) { 1229 cookieText = 'ProjectZero.dk bruger cookies til statistik og målrettet markedsføring. Klikker du videre på siden, accepterer du, at der sættes cookies til disse formål. Dine informationer bliver ikke delt med tredjepart. <a href="http://www.projectzero.dk/da-DK/TopPages/Om-ProjectZero/Cookie--og-privatlivspolitik.aspx">Læs mere her</a> om vores brug af cookies, herunder hvordan du fravælger brugen af cookies.'; 1230 cookieAcceptText = 'Accepter og luk'; 1231 } 1232 if(@GetInteger("DwAreaID") == 20) { 1233 cookieText = 'ProjectZero.dk bruger cookies til statistik og målrettet markedsføring. Klikker du videre på siden, accepterer du, at der sættes cookies til disse formål. Dine informationer bliver ikke delt med tredjepart. <a href="http://www.projectzero.dk/da-DK/TopPages/Om-ProjectZero/Cookie--og-privatlivspolitik.aspx">Læs mere her</a> om vores brug af cookies, herunder hvordan du fravælger brugen af cookies.'; 1234 cookieAcceptText = 'Accepter og luk'; 1235 } 1236 if(@GetInteger("DwAreaID") == 21) { 1237 cookieText = '我们对信息统计以及有针对性的市场推广上使用小型文本文件。如果你在页面上点击,与此同时即表示你接受小型文本文件将被用为上述目的。 <a href="http://www.projectzero.dk/zh-CN/TopPages/%E5%B0%8F%E5%9E%8B%E6%96%87%E6%9C%AC%E6%96%87%E4%BB%B6%E5%92%8C%E9%9A%90%E7%A7%81%E6%9D%A1%E6%AC%BE.aspx">点击这里查看更多</a> 有关我们的小型文本文件的使用,包括如何选择退出使用小型文本文件的方法。'; 1238 cookieAcceptText = '接受并关闭'; 1239 } 1240 1241 // console.log(cookieText); 1242 1243 var defaults = { 1244 message: cookieText,//'ProjectZero.dk bruger cookies til statistik og målrettet markedsføring. Klikker du videre på siden, accepterer du, at der sættes cookies til disse formål. Dine informationer bliver ikke delt med tredjepart. <a href="http://www.projectzero.dk/da-DK/TopPages/Om-ProjectZero/Cookie--og-privatlivspolitik.aspx">Læs mere her</a> om vores brug af cookies, herunder hvordan du fravælger brugen af cookies.', //Message displayed on bar 1245 acceptButton: true, //Set to true to show accept/enable button 1246 acceptText: cookieAcceptText, //'Accepter og luk', //Text on accept/enable button 1247 acceptFunction: function(cookieValue){if(cookieValue!='enabled' && cookieValue!='accepted') window.location = window.location.href;}, //Function to run after accept 1248 declineButton: false, //Set to true to show decline/disable button 1249 declineText: 'Disable Cookies', //Text on decline/disable button 1250 declineFunction: function(cookieValue){if(cookieValue=='enabled' || cookieValue=='accepted') window.location = window.location.href;}, //Function to run after decline 1251 policyButton: false, //Set to true to show Privacy Policy button 1252 policyText: 'Privacy Policy', //Text on Privacy Policy button 1253 policyURL: '/privacy-policy/', //URL of Privacy Policy 1254 autoEnable: true, //Set to true for cookies to be accepted automatically. Banner still shows 1255 acceptOnContinue: false, //Set to true to accept cookies when visitor moves to another page 1256 acceptOnScroll: false, //Set to true to accept cookies when visitor scrolls X pixels up or down 1257 acceptAnyClick: false, //Set to true to accept cookies when visitor clicks anywhere on the page 1258 expireDays: 365, //Number of days for cookieBar cookie to be stored for 1259 renewOnVisit: false, //Renew the cookie upon revisit to website 1260 forceShow: false, //Force cookieBar to show regardless of user cookie preference 1261 effect: 'slide', //Options: slide, fade, hide 1262 element: 'body', //Element to append/prepend cookieBar to. Remember "." for class or "#" for id. 1263 append: false, //Set to true for cookieBar HTML to be placed at base of website. Actual position may change according to CSS 1264 fixed: false, //Set to true to add the class "fixed" to the cookie bar. Default CSS should fix the position 1265 bottom: false, //Force CSS when fixed, so bar appears at bottom of website 1266 zindex: '', //Can be set in CSS, although some may prefer to set here 1267 domain: String(window.location.hostname), //Location of privacy policy 1268 referrer: String(document.referrer) //Where visitor has come from 1269 }; 1270 1271 1272 var options = $.extend(defaults,options); 1273 //Sets expiration date for cookie 1274 var expireDate = new Date(); 1275 expireDate.setTime(expireDate.getTime()+(options.expireDays*86400000)); 1276 expireDate = expireDate.toGMTString(); 1277 1278 1279 1280 var cookieEntry = 'cb-enabled={value}; expires='+expireDate+'; path=/'; 1281 document.cookie = cookieEntry.replace('{value}',''); 1282 } 1283 } 1284 1285 1286 $.cookieBar({ 1287 fixed: true, 1288 bottom:true, 1289 expireDays: 365, 1290 forceShow: true 1291 }); 1292 $(".cookiex").click(function(){ 1293 $('.cb-enable').click(); 1294 }); 1295 }); 1296 1297 $(".cookiex").click(function(){ 1298 $('.cb-enable').click(); 1299 }); 1300 }); 1301 1302 </script> 1303 <script> 1304 $(document).ready(function() { 1305 $.ajaxSetup({cache:false}); 1306 }); 1307 </script> 1308 <script> 1309 $('.podio-webform-frame').load(function(){ 1310 1311 var iframe = $('.podio-webform-frame').contents(); 1312 1313 iframe.find(".webforms__submit-box button").click(function(){ 1314 alert("test"); 1315 }); 1316 }); 1317 </script> 1318 1319 <!-- <script type="text/javascript"> 1320 $(document).ready(function(){ 1321 if($(window).width() > 500) 1322 { 1323 $("#outernewswrapper").find("img").each(function(){ 1324 if($(this).parent().is('a') || $(this).parent().hasClass('newsimage')) 1325 { 1326 1327 } 1328 else 1329 { 1330 var link = $(this).prop('src'); 1331 $(this).wrap('<a href="' + link + '" rel="prettyPhoto[pp_gal]"></a>'); 1332 } 1333 1334 }); 1335 $("a[rel^='prettyPhoto']").prettyPhoto(); 1336 } 1337 }) 1338 </script> --> 1339 </body> 1340 </html>