Advertisement
Guest User

Untitled

a guest
Feb 25th, 2017
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.96 KB | None | 0 0
  1. <div id="container">
  2. <a name="top" id="top"></a>
  3. <div id="header">
  4. <div id="logo">
  5. <div class="wrapper">
  6. <a href="{$mybb->settings['bburl']}/index.php"><img src="{$theme['logo']}" alt="{$mybb->settings['bbname']}" title="{$mybb->settings['bbname']}" /></a><br />
  7.  
  8.  
  9. </div>
  10. </div>
  11. <div id="panel">
  12. <div class="upper">
  13. <div class="wrapper">
  14. {$welcomeblock}
  15. <!-- </div> in header_welcomeblock_member and header_welcomeblock_guest -->
  16. <!-- </div> in header_welcomeblock_member and header_welcomeblock_guest -->
  17. </div>
  18. </div>
  19. <div id="content">
  20. <div class="wrapper">
  21. {$pm_notice}
  22. {$bannedwarning}
  23. {$bbclosedwarning}
  24. {$unreadreports}
  25. {$pending_joinrequests}
  26. {$awaitingusers} <!-- BAM -->{$bam_announcements}<!-- /BAM -->
  27.  
  28. <!-----------------------Match Countdown -------------------------->
  29.  
  30. <center>
  31. <!-- Banner Here -->
  32. <a href="http://notcricinfo.com/forums/PSL.php"><img src="http://notcricinfo.com/forums/images/banner.png"></a>
  33. <br/>
  34. <script language="JavaScript">
  35. TargetDate = Date.UTC(2017, 01, 26, 16, 00, 0, 0, 0); // GMT time - Date.UTC(year, month, day, hours, minutes, seconds, millisec) <---------Target Date
  36. BackColor = "White";
  37. ForeColor = "Green";
  38. CountActive = true;
  39. CountStepper = -1;
  40. LeadingZero = true;
  41. DisplayFormat = "%%D%% Days, %%H%% Hours, %%M%% Minutes, %%S%% Seconds ";
  42. FinishMessage = "Match Underway";
  43. function calcage(secs, num1, num2) {
  44. s = ((Math.floor(secs/num1))%num2).toString();
  45. if (LeadingZero && s.length < 2)
  46. s = "0" + s;
  47. return "<b>" + s + "</b>";
  48. }
  49.  
  50. function CountBack(secs) {
  51. if (secs < 0) {
  52. document.getElementById("cntdwn").innerHTML = FinishMessage;
  53. return;
  54. }
  55. DisplayStr = DisplayFormat.replace(/%%D%%/g, calcage(secs,86400,100000));
  56. DisplayStr = DisplayStr.replace(/%%H%%/g, calcage(secs,3600,24));
  57. DisplayStr = DisplayStr.replace(/%%M%%/g, calcage(secs,60,60));
  58. DisplayStr = DisplayStr.replace(/%%S%%/g, calcage(secs,1,60));
  59.  
  60. document.getElementById("cntdwn").innerHTML = DisplayStr;
  61. if (CountActive)
  62. setTimeout("CountBack(" + (secs+CountStepper) + ")", SetTimeOutPeriod);
  63. }
  64.  
  65. function putspan(backcolor, forecolor) {
  66. document.write("<span style='background-color:" + backcolor +
  67. "; color:" + forecolor + "; font-size:35px; face:verdana'>"+
  68.  
  69. "Islamabad Vs Karachi" //<---------Teams
  70.  
  71. +" starts in: </span><span id='cntdwn' style='background-color:" + backcolor +
  72. "; color:" + forecolor + "; font-size:35px; face:verdana'></span>");
  73. }
  74.  
  75. if (typeof(BackColor)=="undefined")
  76. BackColor = "white";
  77. if (typeof(ForeColor)=="undefined")
  78. ForeColor= "black";
  79. if (typeof(TargetDate)=="undefined")
  80. TargetDate = "12/31/2020 5:00 AM";
  81. if (typeof(DisplayFormat)=="undefined")
  82. DisplayFormat = "%%D%% Days, %%H%% Hours, %%M%% Minutes, %%S%% Seconds.";
  83. if (typeof(CountActive)=="undefined")
  84. CountActive = true;
  85. if (typeof(FinishMessage)=="undefined")
  86. FinishMessage = "";
  87. if (typeof(CountStepper)!="number")
  88. CountStepper = -1;
  89. if (typeof(LeadingZero)=="undefined")
  90. LeadingZero = true;
  91.  
  92.  
  93. CountStepper = Math.ceil(CountStepper);
  94. if (CountStepper == 0)
  95. CountActive = false;
  96. var SetTimeOutPeriod = (Math.abs(CountStepper)-1)*1000 + 990;
  97. putspan(BackColor, ForeColor);
  98. var dthen = new Date(TargetDate);
  99. var dnow = new Date().getTime();
  100. if(CountStepper>0)
  101. ddiff = new Date(dnow-dthen);
  102. else
  103. ddiff = new Date(dthen-dnow);
  104. gsecs = Math.floor(ddiff.valueOf()/1000);
  105. CountBack(gsecs);
  106. </script>
  107.  
  108. </center>
  109. <navigation>
  110. <br />
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement