Advertisement
Ikillnukes

Snippet Código de Cuenta Atrás By Ikillnukes

Aug 16th, 2013
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 55.74 KB | None | 0 0
  1. <?php
  2. $go = @$_GET['style'];
  3. $y = $_GET['y'];
  4. $m = $_GET['m'];
  5. $d = $_GET['d'];
  6. $h = $_GET['h'];
  7. $min = $_GET['min'];
  8. $color = $_GET['color'];
  9. $bg = $_GET['bg'];
  10. if(empty($go)){$go='style1a';}
  11.  
  12. switch($go){
  13.  
  14.    case 'style1a':
  15.       echo '<html>
  16. <head>
  17. <style type="text/css">
  18. body {background-color:'.$bg.';}
  19. .numbers {
  20.    width: 55px;
  21.    text-align: center;
  22.    font-family: Arial;
  23.    font-size: 28px;
  24.    font-weight: bold;    /* options are normal, bold, bolder, lighter */
  25.    font-style: normal;   /* options are normal or italic */
  26.    color: '.$color.';       /* change color using the hexadecimal color codes for HTML */
  27. }
  28. .title {/* the styles below will affect the title under the numbers, i.e., "Days", "Hours", etc. */
  29.    width: 55px;
  30.    text-align: center;
  31.    font-family: Arial;
  32.    font-size: 10px;
  33.    font-weight: bold;    /* options are normal, bold, bolder, lighter */
  34.    color: '.$color.';       /* change color using the hexadecimal color codes for HTML */
  35. }
  36. #table {
  37.    width: 400px;
  38.    height: 48px;
  39.    border-style: none;
  40.    background-color: transparent;
  41.    margin: 0px auto;
  42.    position: relative;   /* leave as "relative" to keep timer centered on your page, or change to "absolute" then change the values of the "top" and "left" properties to position the timer */
  43.    top: 0px;             /* change to position the timer */
  44.    left: 0px;            /* change to position the timer; delete this property and it\'s value to keep timer centered on page */
  45. }
  46. </style>
  47.  
  48. <script type="text/javascript">
  49.  
  50. /*
  51. Count down until any date script-
  52. By JavaScript Kit (www.javascriptkit.com)
  53. Over 200+ free scripts here!
  54. Modified by Robert M. Kuhnhenn, D.O.
  55. on 5/30/2006 to count down to a specific date AND time,
  56. on 10/20/2007 to a new format, and 1/10/2010 to include
  57. time zone offset.
  58. */
  59.  
  60. /*  Change the items noted in light blue below to create your countdown target date and announcement once the target date and time are reached.  */
  61. var current="Winter is here!";//-->enter what you want the script to display when the target date and time are reached, limit to 20 characters
  62. var year=2010;      //-->Enter the count down target date YEAR
  63. var month=12;        //-->Enter the count down target date MONTH
  64. var day=21;         //-->Enter the count down target date DAY
  65. var hour=18;        //-->Enter the count down target date HOUR (24 hour clock)
  66. var minute=38;      //-->Enter the count down target date MINUTE
  67. var tz=-5;          //-->Offset for your timezone in hours from UTC (see http://wwp.greenwichmeantime.com/index.htm to find the timezone offset for your location)
  68.  
  69. //-->    DO NOT CHANGE THE CODE BELOW!    <--
  70. var montharray=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");
  71.  
  72. function countdown(yr,m,d,hr,min){
  73.    theyear=yr;themonth=m;theday=d;thehour=hr;theminute=min;
  74.    var today=new Date();
  75.    var todayy=today.getYear();
  76.    if (todayy < 1000) {todayy+=1900;}
  77.    var todaym=today.getMonth();
  78.    var todayd=today.getDate();
  79.    var todayh=today.getHours();
  80.    var todaymin=today.getMinutes();
  81.    var todaysec=today.getSeconds();
  82.    var todaystring1=montharray[todaym]+" "+todayd+", "+todayy+" "+todayh+":"+todaymin+":"+todaysec;
  83.    var todaystring=Date.parse(todaystring1)+(tz*1000*60*60);
  84.    var futurestring1=(montharray[m-1]+" "+d+", "+yr+" "+hr+":"+min);
  85.    var futurestring=Date.parse(futurestring1)-(today.getTimezoneOffset()*(1000*60));
  86.    var dd=futurestring-todaystring;
  87.    var dday=Math.floor(dd/(60*60*1000*24)*1);
  88.    var dhour=Math.floor((dd%(60*60*1000*24))/(60*60*1000)*1);
  89.    var dmin=Math.floor(((dd%(60*60*1000*24))%(60*60*1000))/(60*1000)*1);
  90.    var dsec=Math.floor((((dd%(60*60*1000*24))%(60*60*1000))%(60*1000))/1000*1);
  91.    if(dday<=0&&dhour<=0&&dmin<=0&&dsec<=0){
  92.        document.getElementById(\'count2\').innerHTML=current;
  93.        document.getElementById(\'count2\').style.display="inline";
  94.        document.getElementById(\'count2\').style.width="390px";
  95.        document.getElementById(\'dday\').style.display="none";
  96.        document.getElementById(\'dhour\').style.display="none";
  97.        document.getElementById(\'dmin\').style.display="none";
  98.        document.getElementById(\'dsec\').style.display="none";
  99.        document.getElementById(\'days\').style.display="none";
  100.        document.getElementById(\'hours\').style.display="none";
  101.        document.getElementById(\'minutes\').style.display="none";
  102.        document.getElementById(\'seconds\').style.display="none";
  103.        document.getElementById(\'spacer1\').style.display="none";
  104.        document.getElementById(\'spacer2\').style.display="none";
  105.        return;
  106.    }
  107.    else {
  108.        document.getElementById(\'count2\').style.display="none";
  109.        document.getElementById(\'dday\').innerHTML=dday;
  110.        document.getElementById(\'dhour\').innerHTML=dhour;
  111.        document.getElementById(\'dmin\').innerHTML=dmin;
  112.        document.getElementById(\'dsec\').innerHTML=dsec;
  113.        setTimeout("countdown(theyear,themonth,theday,thehour,theminute)",1000);
  114.    }
  115. }
  116. </script>
  117.  
  118. </head>
  119.  
  120. <body onload="countdown('.$y.','.$m.','.$d.','.$h.','.$min.')">
  121. <table id="table" border="0" cellpadding="0" cellspacing="0">
  122.    <tr>
  123.        <td align="center" colspan="6"><div class="numbers" id="count2" style="padding: 5px 0 0 0; "></div></td>
  124.    </tr>
  125.    <tr id="spacer1" height="30">
  126.        <td align="center" ><div class="numbers" ></div></td>
  127.        <td align="center" ><div class="numbers" id="dday"></div></td>
  128.        <td align="center" ><div class="numbers" id="dhour"></div></td>
  129.        <td align="center" ><div class="numbers" id="dmin"></div></td>
  130.        <td align="center" ><div class="numbers" id="dsec"></div></td>
  131.        <td align="center" ><div class="numbers" ></div></td>
  132.    </tr>
  133.    <tr id="spacer2" height="12">
  134.        <td align="center" ><div class="title" ></div></td>
  135.        <td align="center" ><div class="title" id="days">Days</div></td>
  136.        <td align="center" ><div class="title" id="hours">Hours</div></td>
  137.        <td align="center" ><div class="title" id="minutes">Minutes</div></td>
  138.        <td align="center" ><div class="title" id="seconds">Seconds</div></td>
  139.        <td align="center" ><div class="title" ></div></td>
  140.    </tr>
  141. </table>
  142.  
  143. </body>
  144. </html>';
  145.       break;
  146.  
  147.     case 'style1b':
  148.         echo '<html>
  149. <head>
  150. <style type="text/css">
  151. body {background-color:'.$bg.';}
  152. .numbers {
  153.    padding: 0px;
  154.    width: 45px;
  155.    text-align: center;
  156.    font-family: Arial;            
  157.    font-size: 28px;
  158.    font-weight: bold;    /* options are normal, bold, bolder, lighter */
  159.    font-style: normal;   /* options are normal or italic */
  160.    color: '.$color.';       /* change color using the hexadecimal color codes for HTML */
  161. }
  162. .title {    /* the styles below will affect the title under the numbers, i.e., “Days”, “Hours”, etc. */
  163.    border-style: none;
  164.    padding: 0px 0px 3px 0px;
  165.    width: 45px;
  166.    text-align: center;
  167.    font-family: Arial;
  168.    font-size: 10px;
  169.    font-weight: bold;    /* options are normal, bold, bolder, lighter */
  170.    color: '.$color.';       /* change color using the hexadecimal color codes for HTML */
  171. }
  172. #table {
  173.    width: 400px;
  174.    height: 70px;
  175.    border-style: ridge;
  176.    border-width: 3px;
  177.    border-color: #666666;       /* change color using the hexadecimal color codes for HTML */
  178.    background-color: #222222;   /* change color using the hexadecimal color codes for HTML */
  179.    margin: 0px auto;
  180.    position: relative;   /* leave as "relative" to keep timer centered on your page, or change to "absolute" then change the values of the "top" and "left" properties to position the timer */
  181.    top: 0px;             /* change to position the timer */
  182.    left: 0px;            /* change to position the timer; delete this property and it\'s value to keep timer centered on page */
  183. }
  184. </style>
  185.  
  186. <script type="text/javascript">
  187.  
  188. /*
  189. Count down until any date script-
  190. By JavaScript Kit (www.javascriptkit.com)
  191. Over 200+ free scripts here!
  192. Modified by Robert M. Kuhnhenn, D.O.
  193. on 5/30/2006 to count down to a specific date AND time,
  194. on 10/20/2007 to a new format, and 1/10/2010 to include
  195. time zone offset.
  196. */
  197.  
  198. var current="Winter is here!";    //-->enter what you want the script to display when the target date and time are reached, limit to 20 characters
  199. var year=2010;    //-->Enter the count down target date YEAR
  200. var month=12;      //-->Enter the count down target date MONTH
  201. var day=21;       //-->Enter the count down target date DAY
  202. var hour=18;      //-->Enter the count down target date HOUR (24 hour clock)
  203. var minute=38;    //-->Enter the count down target date MINUTE
  204. var tz=-5;        //-->Offset for your timezone in hours from UTC (see http://wwp.greenwichmeantime.com/index.htm to find the timezone offset for your location)
  205.  
  206. //    DO NOT CHANGE THE CODE BELOW!
  207. var montharray=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");
  208.  
  209. function countdown(yr,m,d,hr,min){
  210.    theyear=yr;themonth=m;theday=d;thehour=hr;theminute=min;
  211.    var today=new Date();
  212.    var todayy=today.getYear();
  213.    if (todayy < 1000) {todayy+=1900;}
  214.    var todaym=today.getMonth();
  215.    var todayd=today.getDate();
  216.    var todayh=today.getHours();
  217.    var todaymin=today.getMinutes();
  218.    var todaysec=today.getSeconds();
  219.    var todaystring1=montharray[todaym]+" "+todayd+", "+todayy+" "+todayh+":"+todaymin+":"+todaysec;
  220.    var todaystring=Date.parse(todaystring1)+(tz*1000*60*60);
  221.    var futurestring1=(montharray[m-1]+" "+d+", "+yr+" "+hr+":"+min);
  222.    var futurestring=Date.parse(futurestring1)-(today.getTimezoneOffset()*(1000*60));
  223.    var dd=futurestring-todaystring;
  224.    var dday=Math.floor(dd/(60*60*1000*24)*1);
  225.    var dhour=Math.floor((dd%(60*60*1000*24))/(60*60*1000)*1);
  226.    var dmin=Math.floor(((dd%(60*60*1000*24))%(60*60*1000))/(60*1000)*1);
  227.    var dsec=Math.floor((((dd%(60*60*1000*24))%(60*60*1000))%(60*1000))/1000*1);
  228.    if(dday<=0&&dhour<=0&&dmin<=0&&dsec<=0){
  229.        document.getElementById(\'count2\').innerHTML=current;
  230.        document.getElementById(\'count2\').style.display="inline";
  231.        document.getElementById(\'count2\').style.width="390px";
  232.        document.getElementById(\'dday\').style.display="none";
  233.        document.getElementById(\'dhour\').style.display="none";
  234.        document.getElementById(\'dmin\').style.display="none";
  235.        document.getElementById(\'dsec\').style.display="none";
  236.        document.getElementById(\'days\').style.display="none";
  237.        document.getElementById(\'hours\').style.display="none";
  238.        document.getElementById(\'minutes\').style.display="none";
  239.        document.getElementById(\'seconds\').style.display="none";
  240.        document.getElementById(\'spacer1\').style.display="none";
  241.        document.getElementById(\'spacer2\').style.display="none";
  242.        return;
  243.    }
  244.    else {
  245.        document.getElementById(\'count2\').style.display="none";
  246.        document.getElementById(\'dday\').innerHTML=dday;
  247.        document.getElementById(\'dhour\').innerHTML=dhour;
  248.        document.getElementById(\'dmin\').innerHTML=dmin;
  249.        document.getElementById(\'dsec\').innerHTML=dsec;
  250.        setTimeout("countdown(theyear,themonth,theday,thehour,theminute)",1000);
  251.    }
  252. }
  253. </script>
  254.  
  255. </head>
  256.  
  257. <body onload="countdown('.$y.','.$m.','.$d.','.$h.','.$min.')">
  258. <table id="table" border="0">
  259.    <tr>
  260.        <td align="center" colspan="6"><div class="numbers" id="count2" style="padding: 5px 0 0 0; "></div></td>
  261.    </tr>
  262.    <tr id="spacer1">
  263.        <td align="center" ><div class="numbers" ></div></td>
  264.        <td align="center" ><div class="numbers" id="dday"></div></td>
  265.        <td align="center" ><div class="numbers" id="dhour"></div></td>
  266.        <td align="center" ><div class="numbers" id="dmin"></div></td>
  267.        <td align="center" ><div class="numbers" id="dsec"></div></td>
  268.        <td align="center" ><div class="numbers" ></div></td>
  269.    </tr>
  270.    <tr id="spacer2">
  271.        <td align="center" ><div class="title" ></div></td>
  272.        <td align="center" ><div class="title" id="days">Days</div></td>
  273.        <td align="center" ><div class="title" id="hours">Hours</div></td>
  274.        <td align="center" ><div class="title" id="minutes">Minutes</div></td>
  275.        <td align="center" ><div class="title" id="seconds">Seconds</div></td>
  276.        <td align="center" ><div class="title" ></div></td>
  277.    </tr>
  278. </table>
  279.  
  280. </body>
  281. </html>';
  282.         break;
  283.  
  284.     case 'style1c':
  285.         echo '<html>
  286. <head>
  287. <style type="text/css">
  288. body {background-color:'.$bg.';}
  289. .numbers {
  290.    border-style: ridge;    /* options are none, dotted, dashed, solid, double, groove, ridge, inset, outset */
  291.    border-width: 2px;
  292.    border-color: #666666;  /* change the border color using the hexadecimal color codes for HTML */
  293.    background: #222222;    /* change the background color using the hexadecimal color codes for HTML */
  294.    padding: 2px 0px;
  295.    width: 55px;
  296.    text-align: center;
  297.    font-family: Arial;
  298.    font-size: 28px;
  299.    font-weight: bold;    /* options are normal, bold, bolder, lighter */
  300.    font-style: normal;   /* options are normal or italic */
  301.    color: '.$color.';       /* change color using the hexadecimal color codes for HTML */
  302. }
  303. .title {    /* the styles below will affect the title under the numbers, i.e., “Days”, “Hours”, etc. */
  304.    border: none;    
  305.    padding: 0px;
  306.    width: 55px;
  307.    text-align: center;
  308.    font-family: Arial;
  309.    font-size: 10px;
  310.    font-weight: normal;  /* options are normal, bold, bolder, lighter */
  311.    color: '.$color.';       /* change color using the hexadecimal color codes for HTML */
  312.    background: transparent;    /* change the background color using the hexadecimal color codes for HTML */
  313. }
  314. #table {
  315.    width: 400px;
  316.    border: none;    /* options are none, dotted, dashed, solid, double, groove, ridge, inset, outset */
  317.    margin: 0px auto;
  318.    position: relative;    /* leave as "relative" to keep timer centered on your page, or change to "absolute" then change the values of the "top" and "left" properties to position the timer */
  319.    top: 0px;        /* change to position the timer */
  320.    left: 0px;       /* change to position the timer; delete this property and it\'s value to keep timer centered on page */
  321. }
  322. </style>
  323.  
  324. <script type="text/javascript">
  325.  
  326. /*
  327. Count down until any date script-
  328. By JavaScript Kit (www.javascriptkit.com)
  329. Over 200+ free scripts here!
  330. Modified by Robert M. Kuhnhenn, D.O.
  331. on 5/30/2006 to count down to a specific date AND time,
  332. on 10/20/2007 to a new format, and 1/10/2010 to include
  333. time zone offset.
  334. */
  335.  
  336. var current="Winter is here!";    //-->enter what you want the script to display when the target date and time are reached, limit to 20 characters
  337. var year=2010;    //-->Enter the count down target date YEAR
  338. var month=12;      //-->Enter the count down target date MONTH
  339. var day=21;       //-->Enter the count down target date DAY
  340. var hour=18;      //-->Enter the count down target date HOUR (24 hour clock)
  341. var minute=38;    //-->Enter the count down target date MINUTE
  342. var tz=-5;        //-->Offset for your timezone in hours from UTC (see http://wwp.greenwichmeantime.com/index.htm to find the timezone offset for your location)
  343.  
  344. //    DO NOT CHANGE THE CODE BELOW!
  345. var montharray=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec")
  346.  
  347. function countdown(yr,m,d,hr,min){
  348.    theyear=yr;themonth=m;theday=d;thehour=hr;theminute=min;
  349.    var today=new Date();
  350.    var todayy=today.getYear();
  351.    if (todayy < 1000) {todayy+=1900;}
  352.    var todaym=today.getMonth();
  353.    var todayd=today.getDate();
  354.    var todayh=today.getHours();
  355.    var todaymin=today.getMinutes();
  356.    var todaysec=today.getSeconds();
  357.    var todaystring1=montharray[todaym]+" "+todayd+", "+todayy+" "+todayh+":"+todaymin+":"+todaysec;
  358.    var todaystring=Date.parse(todaystring1)+(tz*1000*60*60);
  359.    var futurestring1=(montharray[m-1]+" "+d+", "+yr+" "+hr+":"+min);
  360.    var futurestring=Date.parse(futurestring1)-(today.getTimezoneOffset()*(1000*60));
  361.    var dd=futurestring-todaystring;
  362.    var dday=Math.floor(dd/(60*60*1000*24)*1);
  363.    var dhour=Math.floor((dd%(60*60*1000*24))/(60*60*1000)*1);
  364.    var dmin=Math.floor(((dd%(60*60*1000*24))%(60*60*1000))/(60*1000)*1);
  365.    var dsec=Math.floor((((dd%(60*60*1000*24))%(60*60*1000))%(60*1000))/1000*1);
  366.    if(dday<=0&&dhour<=0&&dmin<=0&&dsec<=0){
  367.        document.getElementById(\'count2\').innerHTML=current;
  368.        document.getElementById(\'count2\').style.display="block";
  369.        document.getElementById(\'count2\').style.width="390px";
  370.        document.getElementById(\'dday\').style.display="none";
  371.        document.getElementById(\'dhour\').style.display="none";
  372.        document.getElementById(\'dmin\').style.display="none";
  373.        document.getElementById(\'dsec\').style.display="none";
  374.        document.getElementById(\'days\').style.display="none";
  375.        document.getElementById(\'hours\').style.display="none";
  376.        document.getElementById(\'minutes\').style.display="none";
  377.        document.getElementById(\'seconds\').style.display="none";
  378.        document.getElementById(\'spacer1\').style.display="none";
  379.        document.getElementById(\'spacer2\').style.display="none";
  380.        return;
  381.    }
  382.    else {
  383.        document.getElementById(\'count2\').style.display="none";
  384.        document.getElementById(\'dday\').innerHTML=dday;
  385.        document.getElementById(\'dhour\').innerHTML=dhour;
  386.        document.getElementById(\'dmin\').innerHTML=dmin;
  387.        document.getElementById(\'dsec\').innerHTML=dsec;
  388.        setTimeout("countdown(theyear,themonth,theday,thehour,theminute)",1000);
  389.    }
  390. }
  391. </script>
  392.  
  393. </head>
  394.  
  395. <body onload="countdown('.$y.','.$m.','.$d.','.$h.','.$min.')">
  396. <table id="table" border="0">
  397.    <tr>
  398.        <td align="center" colspan="6"><div class="numbers" id="count2" style="padding: 10px; "></div></td>
  399.    </tr>
  400.    <tr id="spacer1">
  401.        <td align="center" ><div class="title" ></div></td>
  402.        <td align="center" ><div class="numbers" id="dday"></div></td>
  403.        <td align="center" ><div class="numbers" id="dhour"></div></td>
  404.        <td align="center" ><div class="numbers" id="dmin"></div></td>
  405.        <td align="center" ><div class="numbers" id="dsec"></div></td>
  406.        <td align="center" ><div class="title" ></div></td>
  407.    </tr>
  408.    <tr id="spacer2">
  409.        <td align="center" ><div class="title" ></div></td>
  410.        <td align="center" ><div class="title" id="days">Days</div></td>
  411.        <td align="center" ><div class="title" id="hours">Hours</div></td>
  412.        <td align="center" ><div class="title" id="minutes">Minutes</div></td>
  413.        <td align="center" ><div class="title" id="seconds">Seconds</div></td>
  414.        <td align="center" ><div class="title" ></div></td>
  415.    </tr>
  416. </table>
  417.  
  418. </body>
  419. </html>';
  420.         break;
  421.  
  422.     case 'style1d':
  423.         echo '<html>
  424. <head>
  425. <style type="text/css">
  426. body {background-color:'.$bg.';}
  427. .background {
  428.    border-style: none;
  429.    width: 62px;
  430.    height: 58px;
  431. }
  432. .numbers {
  433.    border-style: none;
  434.    background-color: #292929;
  435.    padding: 0px;
  436.    margin: 0px;
  437.    width: 62px;
  438.    height: 42px;
  439.    text-align: center;
  440.    font-family: Arial;
  441.    font-size: 34px;
  442.    font-weight: normal;    /* options are normal, bold, bolder, lighter */
  443.    color: '.$color.';     /* change color using the hexadecimal color codes for HTML */
  444. }
  445. .title {    /* the styles below will affect the title under the numbers, i.e., “Days”, “Hours”, etc. */
  446.    border: none;    
  447.    padding: 0px;
  448.    margin: 0px 3px;
  449.    width: 62px;
  450.    text-align: center;
  451.    font-family: Arial;
  452.    font-size: 10px;
  453.    font-weight: normal;    /* options are normal, bold, bolder, lighter */
  454.    color: '.$color.';    /* change color using the hexadecimal color codes for HTML */
  455.    background-color: #000000;  
  456. }
  457. #form {    /* the styles below will affect the outer border of the countdown timer */
  458.    width: 400px;
  459.    height: 80px;
  460.    border-style: ridge;    /* options are none, dotted, dashed, solid, double, groove, ridge, inset, outset */
  461.    border-width: 2px;
  462.    border-color: #666666;  /* change color using the hexadecimal color codes for HTML */
  463.    background-color: #000000;
  464.    padding: 5px;
  465.    margin: 0px auto;
  466.    position: relative;   /* leave as "relative" to keep timer centered on your page, or change to "absolute" then change the values of the "top" and "left" properties to position the timer */
  467.    top: 0px;             /* change to position the timer */
  468.    left: 0px;            /* change to position the timer; delete this property and it\'s value to keep timer centered on page */
  469. }
  470. .line {
  471.    border-style: none;
  472.    width: 62px;
  473.    height: 2px;
  474.    z-index: 15;
  475. }
  476. </style>
  477.  
  478. <script type="text/javascript">
  479.  
  480. /*
  481. Count down until any date script-
  482. By JavaScript Kit (www.javascriptkit.com)
  483. Over 200+ free scripts here!
  484. Modified by Robert M. Kuhnhenn, D.O.
  485. on 5/30/2006 to count down to a specific date AND time,
  486. and on 1/10/2010 to include time zone offset.
  487. */
  488.  
  489. /*  Change the items below to create your countdown target date and announcement once the target date and time are reached.  */
  490. var current="Winter is here!";     //—>enter what you want the script to display when the target date and time are reached, limit to 20 characters
  491. var year=2010;        //—>Enter the count down target date YEAR
  492. var month=12;          //—>Enter the count down target date MONTH
  493. var day=21;           //—>Enter the count down target date DAY
  494. var hour=18;          //—>Enter the count down target date HOUR (24 hour clock)
  495. var minute=38;        //—>Enter the count down target date MINUTE
  496. var tz=-5;            //—>Offset for your timezone in hours from UTC (see http://wwp.greenwichmeantime.com/index.htm to find the timezone offset for your location)
  497.  
  498. //—>    DO NOT CHANGE THE CODE BELOW!    <—
  499. var montharray=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");
  500.  
  501. function countdown(yr,m,d,hr,min){
  502.    theyear=yr;themonth=m;theday=d;thehour=hr;theminute=min;
  503.    var today=new Date();
  504.    var todayy=today.getYear();
  505.    if (todayy < 1000) {
  506.    todayy+=1900; }
  507.    var todaym=today.getMonth();
  508.    var todayd=today.getDate();
  509.    var todayh=today.getHours();
  510.    var todaymin=today.getMinutes();
  511.    var todaysec=today.getSeconds();
  512.    var todaystring1=montharray[todaym]+" "+todayd+", "+todayy+" "+todayh+":"+todaymin+":"+todaysec;
  513.    var todaystring=Date.parse(todaystring1)+(tz*1000*60*60);
  514.    var futurestring1=(montharray[m-1]+" "+d+", "+yr+" "+hr+":"+min);
  515.    var futurestring=Date.parse(futurestring1)-(today.getTimezoneOffset()*(1000*60));
  516.    var dd=futurestring-todaystring;
  517.    var dday=Math.floor(dd/(60*60*1000*24)*1);
  518.    var dhour=Math.floor((dd%(60*60*1000*24))/(60*60*1000)*1);
  519.    var dmin=Math.floor(((dd%(60*60*1000*24))%(60*60*1000))/(60*1000)*1);
  520.    var dsec=Math.floor((((dd%(60*60*1000*24))%(60*60*1000))%(60*1000))/1000*1);
  521.    if(dday<=0&&dhour<=0&&dmin<=0&&dsec<=0){
  522.        document.getElementById(\'count2\').innerHTML=current;
  523.        document.getElementById(\'count2\').style.display="inline";
  524.        document.getElementById(\'count2\').style.width="390px";
  525.        document.getElementById(\'dday\').style.display="none";
  526.        document.getElementById(\'dhour\').style.display="none";
  527.        document.getElementById(\'dmin\').style.display="none";
  528.        document.getElementById(\'dsec\').style.display="none";
  529.        document.getElementById(\'days\').style.display="none";
  530.        document.getElementById(\'hours\').style.display="none";
  531.        document.getElementById(\'minutes\').style.display="none";
  532.        document.getElementById(\'seconds\').style.display="none";
  533.        return;
  534.    }
  535.    else {
  536.        document.getElementById(\'count2\').style.display="none";
  537.        document.getElementById(\'dday\').innerHTML=dday;
  538.        document.getElementById(\'dhour\').innerHTML=dhour;
  539.        document.getElementById(\'dmin\').innerHTML=dmin;
  540.        document.getElementById(\'dsec\').innerHTML=dsec;
  541.        setTimeout("countdown(theyear,themonth,theday,thehour,theminute)",1000);
  542.    }
  543. }
  544. </script>
  545.  
  546. </head>
  547.  
  548. <body onload="countdown('.$y.','.$m.','.$d.','.$h.','.$min.')">
  549. <div id="form">
  550.    <div class="numbers" id="count2" style="position: absolute; top: 10px; height: 60px; padding: 15px 0 0 10px; background-color: #000000; z-index: 20;"></div>
  551.    <img src="images/bkgdimage.gif" class="background" style="position: absolute; left: 69px; top: 12px;"/>
  552.    <img src="images/line.jpg" class="line" style="position: absolute; left: 69px; top: 40px;"/>
  553.    <div class="numbers" id="dday" style="position: absolute; left: 69px; top: 21px;" ></div>
  554.  
  555.    <img src="images/bkgdimage.gif" class="background" style="position: absolute; left: 141px; top: 12px;"/>
  556.    <img src="images/line.jpg" class="line" style="position: absolute; left: 141px; top: 40px;"/>
  557.    <div class="numbers" id="dhour" style="position: absolute; left: 141px; top: 21px;" ></div>
  558.  
  559.    <img src="images/bkgdimage.gif" class="background" style="position: absolute; left: 213px; top: 12px;"/>
  560.    <img src="images/line.jpg" class="line" style="position: absolute; left: 213px; top: 40px;"/>
  561.    <div class="numbers" id="dmin" style="position: absolute; left: 213px; top: 21px;" ></div>
  562.  
  563.    <img src="images/bkgdimage.gif" class="background" style="position: absolute; left: 285px; top: 12px;"/>
  564.    <img src="images/line.jpg" class="line" style="position: absolute; left: 285px; top: 40px;"/>
  565.    <div class="numbers" id="dsec" style="position: absolute; left: 285px; top: 21px;" ></div>
  566.  
  567.    <div class="title" id="days" style="position: absolute; left: 66px; top: 73px;" >Days</div>
  568.    <div class="title" id="hours" style="position: absolute; left: 138px; top: 73px;" >Hours</div>
  569.    <div class="title" id="minutes" style="position: absolute; left: 210px; top: 73px;" >Minutes</div>
  570.    <div class="title" id="seconds" style="position: absolute; left: 282px; top: 73px;" >Seconds</div>
  571. </div>
  572.  
  573. </body>
  574. </html>';
  575.         break;
  576.  
  577.     case 'style2a':
  578.         echo '<html><head>
  579. <style type="text/css">
  580. body {background-color:'.$bg.';}
  581. #count {
  582.    border: none;
  583.    text-align: center;
  584.    font-family: Arial;
  585.    font-size: 26px;
  586.    font-weight: normal;    /* options are normal, bold, bolder, lighter */
  587.    font-style: italic;     /* options are normal or italic */
  588.    color: '.$color.';    /* change color using the hexadecimal color codes for HTML */
  589.    background-color: transparent;    /* change the background color using the hex color codes for HTML */
  590.    margin: 0px auto;
  591.    text-align: center;
  592.    width: 664px;
  593.    height: 37px;
  594.    position: relative;   /* leave as "relative" to keep timer centered on your page, or change to "absolute" then change the values of the "top" and "left" properties to position the timer */
  595.    top: 0px;             /* change to position the timer */
  596.    left: 0px;            /* change to position the timer; delete this property and it\'s value to keep timer centered on page */
  597. }
  598. </style>
  599.  
  600. <script type="text/javascript">
  601.  
  602. /*
  603. Count down until any date script-
  604. By JavaScript Kit (www.javascriptkit.com)
  605. Over 200+ free scripts here!
  606. Modified by Robert M. Kuhnhenn, D.O.
  607. on 5/30/2006 to count down to a specific date AND time,
  608. on 10/20/2007 to a new format, and 1/10/2010 to include
  609. time zone offset.
  610. */
  611.  
  612. /*  Change the items below to create your countdown target date and announcement once the target date and time are reached.  */
  613. var current="Winter is here!";    //-->enter what you want the script to display when the target date and time are reached, limit to 20 characters
  614. var year=2010;    //-->Enter the count down target date YEAR
  615. var month=12;      //-->Enter the count down target date MONTH
  616. var day=21;       //-->Enter the count down target date DAY
  617. var hour=18;      //-->Enter the count down target date HOUR (24 hour clock)
  618. var minute=38;    //-->Enter the count down target date MINUTE
  619. var tz=-5;        //-->Offset for your timezone in hours from UTC (see http://wwp.greenwichmeantime.com/index.htm to find the timezone offset for your location)
  620.  
  621. //    -->DO NOT CHANGE THE CODE BELOW!<--
  622. var montharray=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");
  623.  
  624. function countdown(yr,m,d,hr,min){
  625. theyear=yr;themonth=m;theday=d;thehour=hr;theminute=min;
  626.    var today=new Date();
  627.    var todayy=today.getYear();
  628.    if (todayy < 1000) {todayy+=1900;}
  629.    var todaym=today.getMonth();
  630.    var todayd=today.getDate();
  631.    var todayh=today.getHours();
  632.    var todaymin=today.getMinutes();
  633.    var todaysec=today.getSeconds();
  634.    var todaystring1=montharray[todaym]+" "+todayd+", "+todayy+" "+todayh+":"+todaymin+":"+todaysec;
  635.    var todaystring=Date.parse(todaystring1)+(tz*1000*60*60);
  636.    var futurestring1=(montharray[m-1]+" "+d+", "+yr+" "+hr+":"+min);
  637.    var futurestring=Date.parse(futurestring1)-(today.getTimezoneOffset()*(1000*60));
  638.    var dd=futurestring-todaystring;
  639.    var dday=Math.floor(dd/(60*60*1000*24)*1);
  640.    var dhour=Math.floor((dd%(60*60*1000*24))/(60*60*1000)*1);
  641.    var dmin=Math.floor(((dd%(60*60*1000*24))%(60*60*1000))/(60*1000)*1);
  642.    var dsec=Math.floor((((dd%(60*60*1000*24))%(60*60*1000))%(60*1000))/1000*1);
  643.    if(dday<=0&&dhour<=0&&dmin<=0&&dsec<=0){
  644.        document.getElementById(\'count\').innerHTML=current;
  645.        return;
  646.    }
  647.    else {
  648.        document.getElementById(\'count\').innerHTML=+dday+ " days, "+dhour+" hours, "+dmin+" minutes, and "+dsec+" seconds";
  649.        setTimeout("countdown(theyear,themonth,theday,thehour,theminute)",1000);
  650.    }
  651. }
  652. </script>
  653.  
  654. </head>
  655.  
  656. <body onload="countdown('.$y.','.$m.','.$d.','.$h.','.$min.');">
  657.    <div id="count"></div>
  658.  
  659. </body>
  660. </html>';
  661.         break;
  662.  
  663.     case 'style2b':
  664.         echo '<html>
  665. <head>
  666. <style type="text/css">
  667. body {background-color:'.$bg.';}
  668. #count {
  669.    border-style: ridge;    /* options are none, dotted, dashed, solid, double, groove, ridge, inset, outset */
  670.    border-width: 2px;
  671.    border-color: #666666;  /* change color of the border using the hexadecimal color codes for HTML */
  672.    padding: 4px;           /* change the spacing between the timer and the border */
  673.    text-align: center;
  674.    font-family: Arial;
  675.    font-size: 22px;        /* change the size of the font */
  676.    font-weight: normal;    /* options are normal, bold, bolder, lighter */
  677.    font-style: normal;     /* options are normal or italic */
  678.    color: '.$color.';    /* change color using the hexadecimal color codes for HTML */
  679.    background-color: #222222;    /* change the background color using the hex color codes for HTML */
  680.    margin: 0px auto;
  681.    position: relative;    /* leave as "relative" to keep timer centered on your page, or change to "absolute" then change the values of the "top" and "left" properties to position the timer */
  682.    top: 0px;        /* change to position the timer */
  683.    left: 0px;       /* change to position the timer; delete this property and it\'s value to keep timer centered on page */
  684.    width: 582px;
  685.    height: auto;
  686. }
  687. </style>
  688.  
  689. <script type="text/javascript">
  690.  
  691. /*
  692. Count down until any date script-
  693. By JavaScript Kit (www.javascriptkit.com)
  694. Over 200+ free scripts here!
  695. Modified by Robert M. Kuhnhenn, D.O.
  696. on 5/30/2006 to count down to a specific date AND time,
  697. on 10/20/2007 to a new format, and 1/10/2010 to include
  698. time zone offset.
  699. */
  700.  
  701. /*  Change the items below to create your countdown target date and announcement once the target date and time are reached.  */
  702. var current="Winter is here!";    //-->enter what you want the script to display when the target date and time are reached, limit to 20 characters
  703. var year=2010;    //-->Enter the count down target date YEAR
  704. var month=12;      //-->Enter the count down target date MONTH
  705. var day=21;       //-->Enter the count down target date DAY
  706. var hour=18;      //-->Enter the count down target date HOUR (24 hour clock)
  707. var minute=38;    //-->Enter the count down target date MINUTE
  708. var tz=-5;        //-->Offset for your timezone in hours from UTC (see http://wwp.greenwichmeantime.com/index.htm to find the timezone offset for your location)
  709.  
  710. //-->    DO NOT CHANGE THE CODE BELOW!    <--
  711. var montharray=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");
  712.  
  713. function countdown(yr,m,d,hr,min){
  714. theyear=yr;themonth=m;theday=d;thehour=hr;theminute=min;
  715.    var today=new Date();
  716.    var todayy=today.getYear();
  717.    if (todayy < 1000) {todayy+=1900;}
  718.    var todaym=today.getMonth();
  719.    var todayd=today.getDate();
  720.    var todayh=today.getHours();
  721.    var todaymin=today.getMinutes();
  722.    var todaysec=today.getSeconds();
  723.    var todaystring1=montharray[todaym]+" "+todayd+", "+todayy+" "+todayh+":"+todaymin+":"+todaysec;
  724.    var todaystring=Date.parse(todaystring1)+(tz*1000*60*60);
  725.    var futurestring1=(montharray[m-1]+" "+d+", "+yr+" "+hr+":"+min);
  726.    var futurestring=Date.parse(futurestring1)-(today.getTimezoneOffset()*(1000*60));
  727.    var dd=futurestring-todaystring;
  728.    var dday=Math.floor(dd/(60*60*1000*24)*1);
  729.    var dhour=Math.floor((dd%(60*60*1000*24))/(60*60*1000)*1);
  730.    var dmin=Math.floor(((dd%(60*60*1000*24))%(60*60*1000))/(60*1000)*1);
  731.    var dsec=Math.floor((((dd%(60*60*1000*24))%(60*60*1000))%(60*1000))/1000*1);
  732.    if(dday<=0&&dhour<=0&&dmin<=0&&dsec<=0){
  733.        document.getElementById(\'count\').innerHTML=current;
  734.        return;
  735.    }
  736.    else {
  737.        document.getElementById(\'count\').innerHTML=+dday+ " days, "+dhour+" hours, "+dmin+" minutes, and "+dsec+" seconds";
  738.        setTimeout("countdown(theyear,themonth,theday,thehour,theminute)",1000);
  739.    }
  740. }
  741. </script>
  742.  
  743. </head>
  744.  
  745. <body onload="countdown('.$y.','.$m.','.$d.','.$h.','.$min.');">
  746.    <div id="count"></div>
  747.  
  748. </body>
  749. </html>';
  750.         break;
  751.  
  752.     case 'style3a':
  753.         echo '<html>
  754. <head>
  755. <style type="text/css">
  756. body {background-color:'.$bg.';}
  757. .numbers {
  758.    text-align: right;
  759.    font-family: Arial;
  760.    font-size: 28px;
  761.    font-weight: bold;    /* options are normal, bold, bolder, lighter */
  762.    font-style: italic;   /* options are normal or italic */
  763.    color: '.$color.';       /* change color using the hexadecimal color codes for HTML */
  764. }
  765. .title {    /* the styles below will affect the title next to the numbers, i.e., “Days”, “Hours”, etc. */
  766.    margin: 12px 0px 0px 0px;
  767.    padding: 0px 8px 0px 3px;
  768.    text-align: left;
  769.    font-family: Arial;
  770.    font-size: 10px;
  771.    font-weight: bold;    /* options are normal, bold, bolder, lighter */
  772.    font-style: italic;   /* options are normal or italic */
  773.    color: '.$color.';       /* change color using the hexadecimal color codes for HTML */
  774. }
  775. #table {
  776.    width: auto;
  777.    margin: 0px auto;
  778.    position: relative;    /* leave as "relative" to keep timer centered on your page, or change to "absolute" then change the values of the "top" and "left" properties to position the timer */
  779.    top: 0px;        /* change to position the timer */
  780.    left: 0px;       /* change to position the timer; delete this property and it\'s value to keep timer centered on page */
  781. }
  782. </style>
  783.  
  784. <script type="text/javascript">
  785.  
  786. /*
  787. Count down until any date script-
  788. By JavaScript Kit (www.javascriptkit.com)
  789. Over 200+ free scripts here!
  790. Modified by Robert M. Kuhnhenn, D.O.
  791. on 5/30/2006 to count down to a specific date AND time,
  792. on 10/20/2007 to a new format, and 1/10/2010 to include
  793. time zone offset.
  794. */
  795.  
  796. /*  Change the items below to create your countdown target date and announcement once the target date and time are reached.  */
  797. var current="Winter is here!";    //-->enter what you want the script to display when the target date and time are reached, limit to 20 characters
  798. var year=2010;    //-->Enter the count down target date YEAR
  799. var month=12;     //-->Enter the count down target date MONTH
  800. var day=21;       //-->Enter the count down target date DAY
  801. var hour=18;      //-->Enter the count down target date HOUR (24 hour clock)
  802. var minute=38;    //-->Enter the count down target date MINUTE
  803. var tz=-5;        //-->Offset for your timezone in hours from UTC (see http://wwp.greenwichmeantime.com/index.htm to find the timezone offset for your location)
  804.  
  805. //-->    DO NOT CHANGE THE CODE BELOW!    <--
  806. var montharray=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");
  807.  
  808. function countdown(yr,m,d,hr,min){
  809. theyear=yr;themonth=m;theday=d;thehour=hr;theminute=min;
  810.    var today=new Date();
  811.    var todayy=today.getYear();
  812.    if (todayy < 1000) {todayy+=1900;}
  813.    var todaym=today.getMonth();
  814.    var todayd=today.getDate();
  815.    var todayh=today.getHours();
  816.    var todaymin=today.getMinutes();
  817.    var todaysec=today.getSeconds();
  818.    var todaystring1=montharray[todaym]+" "+todayd+", "+todayy+" "+todayh+":"+todaymin+":"+todaysec;
  819.    var todaystring=Date.parse(todaystring1)+(tz*1000*60*60);
  820.    var futurestring1=(montharray[m-1]+" "+d+", "+yr+" "+hr+":"+min);
  821.    var futurestring=Date.parse(futurestring1)-(today.getTimezoneOffset()*(1000*60));
  822.    var dd=futurestring-todaystring;
  823.    var dday=Math.floor(dd/(60*60*1000*24)*1);
  824.    var dhour=Math.floor((dd%(60*60*1000*24))/(60*60*1000)*1);
  825.    var dmin=Math.floor(((dd%(60*60*1000*24))%(60*60*1000))/(60*1000)*1);
  826.    var dsec=Math.floor((((dd%(60*60*1000*24))%(60*60*1000))%(60*1000))/1000*1);
  827.    if(dday<=0&&dhour<=0&&dmin<=0&&dsec<=0){
  828.        document.getElementById(\'count2\').innerHTML=current;
  829.        document.getElementById(\'count2\').style.display="block";
  830.        document.getElementById(\'count2\').style.width="390px";
  831.        document.getElementById(\'dday\').style.display="none";
  832.        document.getElementById(\'dhour\').style.display="none";
  833.        document.getElementById(\'dmin\').style.display="none";
  834.        document.getElementById(\'dsec\').style.display="none";
  835.        document.getElementById(\'days\').style.display="none";
  836.        document.getElementById(\'hours\').style.display="none";
  837.        document.getElementById(\'minutes\').style.display="none";
  838.        document.getElementById(\'seconds\').style.display="none";
  839.        return;
  840.    }
  841.    else {
  842.        document.getElementById(\'count2\').style.display="none";
  843.        document.getElementById(\'dday\').innerHTML=dday;
  844.        document.getElementById(\'dhour\').innerHTML=dhour;
  845.        document.getElementById(\'dmin\').innerHTML=dmin;
  846.        document.getElementById(\'dsec\').innerHTML=dsec;
  847.        setTimeout("countdown(theyear,themonth,theday,thehour,theminute)",1000);
  848.    }
  849. }
  850.  
  851. </script>
  852.  
  853. </head>
  854.  
  855. <body onload="countdown('.$y.','.$m.','.$d.','.$h.','.$min.');">
  856. <table id="table" cellspacing="0" cellpadding="0" border="0">
  857.    <tr>
  858.        <td colspan="8"><div class="numbers" id="count2" style="text-align: center;"></div></td>
  859.    </tr>
  860.    <tr>
  861.        <td align="right"><div class="numbers" id="dday"></div></td>        
  862.        <td align="left"><div class="title" id="days">Days</div></td>
  863.        <td align="right"><div class="numbers" id="dhour"></div></td>
  864.        <td align="left"><div class="title" id="hours">Hours</div></td>
  865.        <td align="right"><div class="numbers" id="dmin"></div></td>
  866.        <td align="left"><div class="title" id="minutes">Minutes</div></td>
  867.        <td align="right"><div class="numbers" id="dsec"></div></td>
  868.        <td align="left"><div class="title" id="seconds">Seconds</div></td>
  869.    </tr>
  870. </table>
  871.  
  872. </body>
  873. </html>';
  874.         break;
  875.  
  876.     case 'style3b':
  877.         echo '<html>
  878. <head>
  879. <style type="text/css">
  880. body {background-color:'.$bg.';}
  881. .numbers {
  882.    padding: 0px;
  883.    text-align: right;
  884.    font-family: Arial;
  885.    font-size: 28px;
  886.    font-weight: bold;   /* options are normal, bold, bolder, lighter */
  887.    font-style: italic;  /* options are normal or italic */
  888.    color: '.$color.';      /* change color using the hexadecimal color codes for HTML */
  889.    background: #222222;/* change color using the hexadecimal color codes for HTML */
  890. }
  891. .title {/* the styles below will affect the title next to the numbers, i.e., “Days”, “Hours”, etc. */
  892.    padding-right: 5px;
  893.    margin: 12px 0px 0px 0px;
  894.    text-align: left;
  895.    font-family: Arial;
  896.    font-size: 10px;
  897.    font-weight: bold;    /* options are normal, bold, bolder, lighter */
  898.    font-style: italic;   /* options are normal or italic */
  899.    color: '.$color.';       /* change color using the hexadecimal color codes for HTML */
  900.    background: #222222;  /* change color using the hexadecimal color codes for HTML */
  901. }
  902. #countdown {
  903.    display: block;
  904.    width: 400px;
  905.    height: 47px;
  906.    border-style: ridge;    /* options are none, dotted, dashed, solid, double, groove, ridge, inset, outset */
  907.    border-width: 2px;
  908.    border-color: #666666;    /* change color using the hexadecimal color codes for HTML */
  909.    background-color: #222222;    /* change color using the hexadecimal color codes for HTML */
  910.    margin: 0px auto;
  911.    position: relative;    /* leave as "relative" to keep timer centered on your page, or change to "absolute" then change the values of the "top" and "left" properties to position the timer */
  912.    top: 0px;    /* change to position the timer */
  913.    left: 0px;   /* change to position the timer; delete this property and it\'s value to keep timer centered on page */
  914. }
  915. </style>
  916.  
  917. <script type="text/javascript">
  918.  
  919. /*
  920. Count down until any date script-
  921. By JavaScript Kit (www.javascriptkit.com)
  922. Over 200+ free scripts here!
  923. Modified by Robert M. Kuhnhenn, D.O.
  924. on 5/30/2006 to count down to a specific date AND time,
  925. on 10/20/2007 to a new format, and 1/10/2010 to include
  926. time zone offset.
  927. */
  928.  
  929. /*  Change the items below to create your countdown target date and announcement once the target date and time are reached.  */
  930. var current="Winter is here!";    //-->enter what you want the script to display when the target date and time are reached, limit to 20 characters
  931. var year=2010;    //-->Enter the count down target date YEAR
  932. var month=12;      //-->Enter the count down target date MONTH
  933. var day=21;       //-->Enter the count down target date DAY
  934. var hour=18;      //-->Enter the count down target date HOUR (24 hour clock)
  935. var minute=38;    //-->Enter the count down target date MINUTE
  936. var tz=-5;        //-->Offset for your timezone in hours from UTC (see http://wwp.greenwichmeantime.com/index.htm to find the timezone offset for your location)
  937.  
  938. //-->    DO NOT CHANGE THE CODE BELOW!    <--
  939. var montharray=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");
  940.  
  941. function countdown(yr,m,d,hr,min){
  942. theyear=yr;themonth=m;theday=d;thehour=hr;theminute=min;
  943.    var today=new Date();
  944.    var todayy=today.getYear();
  945.    if (todayy < 1000) {todayy+=1900;}
  946.    var todaym=today.getMonth();
  947.    var todayd=today.getDate();
  948.    var todayh=today.getHours();
  949.    var todaymin=today.getMinutes();
  950.    var todaysec=today.getSeconds();
  951.    var todaystring1=montharray[todaym]+" "+todayd+", "+todayy+" "+todayh+":"+todaymin+":"+todaysec;
  952.    var todaystring=Date.parse(todaystring1)+(tz*1000*60*60);
  953.    var futurestring1=(montharray[m-1]+" "+d+", "+yr+" "+hr+":"+min);
  954.    var futurestring=Date.parse(futurestring1)-(today.getTimezoneOffset()*(1000*60));
  955.    var dd=futurestring-todaystring;
  956.    var dday=Math.floor(dd/(60*60*1000*24)*1);
  957.    var dhour=Math.floor((dd%(60*60*1000*24))/(60*60*1000)*1);
  958.    var dmin=Math.floor(((dd%(60*60*1000*24))%(60*60*1000))/(60*1000)*1);
  959.    var dsec=Math.floor((((dd%(60*60*1000*24))%(60*60*1000))%(60*1000))/1000*1);
  960.    if(dday<=0&&dhour<=0&&dmin<=0&&dsec<=0){
  961.        document.getElementById(\'count2\').innerHTML=current;
  962.        document.getElementById(\'count2\').style.display="block";
  963.        document.getElementById(\'count2\').style.width="390px";
  964.        document.getElementById(\'dday\').style.display="none";
  965.        document.getElementById(\'dhour\').style.display="none";
  966.        document.getElementById(\'dmin\').style.display="none";
  967.        document.getElementById(\'dsec\').style.display="none";
  968.        document.getElementById(\'days\').style.display="none";
  969.        document.getElementById(\'hours\').style.display="none";
  970.        document.getElementById(\'minutes\').style.display="none";
  971.        document.getElementById(\'seconds\').style.display="none";
  972.        document.getElementById(\'spacer1\').style.display="none";
  973.        document.getElementById(\'spacer2\').style.display="none";
  974.        return;
  975.    }
  976.    else {
  977.        document.getElementById(\'count2\').style.display="none";
  978.        document.getElementById(\'dday\').innerHTML=dday;
  979.        document.getElementById(\'dhour\').innerHTML=dhour;
  980.        document.getElementById(\'dmin\').innerHTML=dmin;
  981.        document.getElementById(\'dsec\').innerHTML=dsec;
  982.        setTimeout("countdown(theyear,themonth,theday,thehour,theminute)",1000);
  983.    }
  984. }
  985. </script>
  986.  
  987. </head>
  988.  
  989. <body onload="countdown('.$y.','.$m.','.$d.','.$h.','.$min.');">
  990. <div id="countdown" >
  991. <table cellspacing="4" cellpadding="0" border="0" align="center">
  992.    <tr>
  993.        <td colspan="8"><div class="numbers" id="count2" style="text-align: center;"></div></td>
  994.    </tr>
  995.    <tr>
  996.        <td align="right"><div class="numbers" id="dday"></div></td>        
  997.        <td align="left"><div class="title" id="days">Days</div></td>
  998.        <td align="right"><div class="numbers" id="dhour"></div></td>
  999.        <td align="left"><div class="title" id="hours">Hours</div></td>
  1000.        <td align="right"><div class="numbers" id="dmin"></div></td>
  1001.        <td align="left"><div class="title" id="minutes">Minutes</div></td>
  1002.        <td align="right"><div class="numbers" id="dsec"></div></td>
  1003.        <td align="left"><div class="title" id="seconds">Seconds</div></td>
  1004.    </tr>
  1005. </table>
  1006. </div>
  1007.  
  1008. </body>
  1009. </html>';
  1010.         break;
  1011.  
  1012.     case 'digital':
  1013.       echo '<html>
  1014. <head>
  1015.    <style type="text/css">
  1016.    body {font-family:Arial;background-color:'.$bg.';}        
  1017.    #holder {
  1018.        position: relative;
  1019.        top: 10px;
  1020.        left: 0px;
  1021.        width: 270px;
  1022.        height: 60px;
  1023.        border: none;
  1024.        margin: 0px auto;
  1025.    }
  1026.    
  1027.    #title, #note {
  1028.        color: '.$color.';          /* this determines the color of the DAYS, HRS, MIN,
  1029.                     SEC labels under the timer and the color of the
  1030.                     note that displays after reaching the target date
  1031.                     and time; if using the blue digital images,
  1032.                     change to #52C6FF; for the red images,
  1033.                     change to #FF6666; for the white images,
  1034.                     change to #BBBBBB; for the yellow images,
  1035.                     change to #FFFF00 */
  1036.    }
  1037.    
  1038.    #note {
  1039.        position: relative;
  1040.        top: 6px;
  1041.        height: 20px;
  1042.        width: 260px;
  1043.        margin: 0 auto;
  1044.        padding: 0px;
  1045.        text-align: center;
  1046.        font-family: Arial;
  1047.        font-size: 18px;
  1048.        font-weight: bold;    /* options are normal, bold, bolder, lighter */
  1049.        font-style: normal;   /* options are normal or italic */
  1050.        z-index: 1;
  1051.    }
  1052.    
  1053.    .title {
  1054.        border: none;
  1055.        padding: 0px;
  1056.        margin: 0px;
  1057.        width: 30px;
  1058.        text-align: center;
  1059.        font-family: Arial;
  1060.        font-size: 10px;
  1061.        font-weight: normal;    /* options are normal, bold, bolder, lighter */
  1062.        background-color: transparent;
  1063.    }
  1064.    
  1065.    #timer {
  1066.        position: relative;
  1067.        top: 0px;
  1068.        left: 0px;
  1069.        margin: 5px auto;
  1070.        text-align: center;
  1071.        width: 260px;
  1072.        height: 26px;
  1073.        border: none;
  1074.        padding: 10px 5px 20px 5px;
  1075.        background: #000000;            /* may change to another color, or to
  1076.                           "transparent" */
  1077.        border-radius: 20px;
  1078.        box-shadow: 0 0 10px #000000;   /* change to "none" if you don\'t want a
  1079.                           shadow */
  1080.    }
  1081.    </style>
  1082.    
  1083.    <script type="text/javascript">    
  1084.    /*
  1085.    Count down until any date script-
  1086.    By JavaScript Kit (www.javascriptkit.com)
  1087.    Over 200+ free scripts here!
  1088.    Modified by Robert M. Kuhnhenn, D.O.
  1089.    (www.rmkwebdesign.com/Countdown_Timers/)
  1090.    on 5/30/2006 to count down to a specific date AND time,
  1091.    on 10/20/2007 to a new format, on 1/10/2010 to include
  1092.    time zone offset, and on 7/12/2012 to digital numbers.
  1093.    */
  1094.    
  1095.    /*  
  1096.    CHANGE THE ITEMS BELOW TO CREATE YOUR COUNTDOWN TARGET DATE AND ANNOUNCEMENT
  1097.    ONCE THE TARGET DATE AND TIME ARE REACHED.
  1098.    */
  1099.    var note="Winter has arrived!"; /* -->Enter what you want the script to
  1100.                          display when the target date and time
  1101.                          are reached, limit to 25 characters */
  1102.    var year=2012;      /* -->Enter the count down target date YEAR */
  1103.    var month=12;       /* -->Enter the count down target date MONTH */
  1104.    var day=21;         /* -->Enter the count down target date DAY */
  1105.    var hour=6;         /* -->Enter the count down target date HOUR (24 hour
  1106.                      clock) */
  1107.    var minute=12;      /* -->Enter the count down target date MINUTE */
  1108.    var tz=-5;          /* -->Offset for your timezone in hours from UTC (see
  1109.                      http://wwp.greenwichmeantime.com/index.htm to find
  1110.                      the timezone offset for your location) */
  1111.    
  1112.    //-->    DO NOT CHANGE THE CODE BELOW!    <--  
  1113.    d1 = new Image(); d1.src = "images/digital-numbers/'.$color.'/1.png";
  1114.    d2 = new Image(); d2.src = "images/digital-numbers/'.$color.'/2.png";
  1115.    d3 = new Image(); d3.src = "images/digital-numbers/'.$color.'/3.png";
  1116.    d4 = new Image(); d4.src = "images/digital-numbers/'.$color.'/4.png";
  1117.    d5 = new Image(); d5.src = "images/digital-numbers/'.$color.'/5.png";
  1118.    d6 = new Image(); d6.src = "images/digital-numbers/'.$color.'/6.png";
  1119.    d7 = new Image(); d7.src = "images/digital-numbers/'.$color.'/7.png";
  1120.    d8 = new Image(); d8.src = "images/digital-numbers/'.$color.'/8.png";
  1121.    d9 = new Image(); d9.src = "images/digital-numbers/'.$color.'/9.png";
  1122.    d0 = new Image(); d0.src = "images/digital-numbers/'.$color.'/0.png";
  1123.    bkgd = new Image(); bkgd.src = "images/digital-numbers/'.$color.'/bkgd.gif";
  1124.    
  1125.    var montharray=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");
  1126.    
  1127.    function countdown(yr,m,d,hr,min){
  1128.        theyear=yr;themonth=m;theday=d;thehour=hr;theminute=min;
  1129.        var today=new Date();
  1130.        var todayy=today.getYear();
  1131.        if (todayy < 1000) {todayy+=1900;}
  1132.        var todaym=today.getMonth();
  1133.        var todayd=today.getDate();
  1134.        var todayh=today.getHours();
  1135.        var todaymin=today.getMinutes();
  1136.        var todaysec=today.getSeconds();
  1137.        var todaystring1=montharray[todaym]+" "+todayd+", "+todayy+" "+todayh+":"+todaymin+":"+todaysec;
  1138.        var todaystring=Date.parse(todaystring1)+(tz*1000*60*60);
  1139.        var futurestring1=(montharray[m-1]+" "+d+", "+yr+" "+hr+":"+min);
  1140.        var futurestring=Date.parse(futurestring1)-(today.getTimezoneOffset()*(1000*60));
  1141.        var dd=futurestring-todaystring;
  1142.        var dday=Math.floor(dd/(60*60*1000*24)*1);
  1143.        var dhour=Math.floor((dd%(60*60*1000*24))/(60*60*1000)*1);
  1144.        var dmin=Math.floor(((dd%(60*60*1000*24))%(60*60*1000))/(60*1000)*1);
  1145.        var dsec=Math.floor((((dd%(60*60*1000*24))%(60*60*1000))%(60*1000))/1000*1);
  1146.        if(dday<=0&&dhour<=0&&dmin<=0&&dsec<=0){
  1147.            document.getElementById(\'note\').innerHTML=note;
  1148.            document.getElementById(\'note\').style.display="block";
  1149.            document.getElementById(\'countdown\').style.display="none";
  1150.            clearTimeout(startTimer);
  1151.            return;
  1152.        }
  1153.        else {
  1154.            document.getElementById(\'note\').style.display="none";
  1155.            document.getElementById(\'timer\').style.display="block";
  1156.            startTimer = setTimeout("countdown(theyear,themonth,theday,thehour,theminute)",500);
  1157.        }
  1158.        convert(dday,dhour,dmin,dsec);
  1159.    }
  1160.    
  1161.    function convert(d,h,m,s) {
  1162.        if (!document.images) return;
  1163.        if (d <= 9) {
  1164.            document.images.day1.src = bkgd.src;
  1165.            document.images.day2.src = bkgd.src;
  1166.            document.images.day3.src = eval("d"+d+".src");
  1167.        }
  1168.        else if (d <= 99) {
  1169.            document.images.day1.src = bkgd.src;
  1170.            document.images.day2.src = eval("d"+Math.floor(d/10)+".src");
  1171.            document.images.day3.src = eval("d"+(d%10)+".src");
  1172.        }
  1173.        else {
  1174.            document.images.day1.src = eval("d"+Math.floor(d/100)+".src");
  1175.            var day = d.toString();
  1176.            day = day.substr(1,1);
  1177.            day = parseInt(day);
  1178.            document.images.day2.src = eval("d"+day+".src");
  1179.            document.images.day3.src = eval("d"+(d%10)+".src");
  1180.        }
  1181.        if (h <= 9) {
  1182.            document.images.h1.src = d0.src;
  1183.            document.images.h2.src = eval("d"+h+".src");
  1184.        }
  1185.        else {
  1186.            document.images.h1.src = eval("d"+Math.floor(h/10)+".src");
  1187.            document.images.h2.src = eval("d"+(h%10)+".src");
  1188.        }
  1189.        if (m <= 9) {
  1190.            document.images.m1.src = d0.src;
  1191.            document.images.m2.src = eval("d"+m+".src");
  1192.        }
  1193.        else {
  1194.            document.images.m1.src = eval("d"+Math.floor(m/10)+".src");
  1195.            document.images.m2.src = eval("d"+(m%10)+".src");
  1196.        }
  1197.        if (s <= 9) {
  1198.            document.images.s1.src = d0.src;
  1199.            document.images.s2.src = eval("d"+s+".src");
  1200.        }
  1201.        else {
  1202.            document.images.s1.src = eval("d"+Math.floor(s/10)+".src");
  1203.            document.images.s2.src = eval("d"+(s%10)+".src");
  1204.        }
  1205.    }
  1206.    </script>
  1207.  
  1208.    <link rel="stylesheet" type="text/css" media="screen,print" href="navbar.css" />
  1209.        <script type="text/javascript" src="faq.js"></script>
  1210. </head>
  1211. <body onload="countdown('.$y.','.$m.','.$d.','.$h.','.$min.')">
  1212.    <div id="holder">
  1213.        <div id="timer">
  1214.            <div id="note"></div>
  1215.            <div id="countdown">
  1216.                <img height=21 src="images/digital-numbers/'.$color.'/bkgd.gif" width=16 name="day1">
  1217.                <img height=21 src="images/digital-numbers/'.$color.'/bkgd.gif" width=16 name="day2">
  1218.                <img height=21 src="images/digital-numbers/'.$color.'/bkgd.gif" width=16 name="day3">
  1219.                <img height=21 id="colon1" src="images/digital-numbers/'.$color.'/colon.png" width=9 name="d1">
  1220.                <img height=21 src="images/digital-numbers/'.$color.'/bkgd.gif" width=16 name="h1">
  1221.                <img height=21 src="images/digital-numbers/'.$color.'/bkgd.gif" width=16 name="h2">
  1222.                <img height=21 id="colon2" src="images/digital-numbers/'.$color.'/colon.png" width=9 name="g1">
  1223.                <img height=21 src="images/digital-numbers/'.$color.'/bkgd.gif" width=16 name="m1">
  1224.                <img height=21 src="images/digital-numbers/'.$color.'/bkgd.gif" width=16 name="m2">
  1225.                <img height=21 id="colon3" src="images/digital-numbers/'.$color.'/colon.png" width=9 name="j1">
  1226.                <img height=21 src="images/digital-numbers/'.$color.'/bkgd.gif" width=16 name="s1">
  1227.                <img height=21 src="images/digital-numbers/'.$color.'/bkgd.gif" width=16 name="s2">
  1228.                <div id="title">
  1229.                    <div class="title" style="position: absolute; top: 36px; left: 42px">DAYS</div>
  1230.                    <div class="title" style="position: absolute; top: 36px; left: 105px">HRS</div>
  1231.                    <div class="title" style="position: absolute; top: 36px; left: 156px">MIN</div>
  1232.                    <div class="title" style="position: absolute; top: 36px; left: 211px">SEC</div>
  1233.                </div>
  1234.            </div>
  1235.        </div>
  1236.    </div>
  1237. </body>
  1238. </html>';
  1239.       break;
  1240.  
  1241. }
  1242. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement