[Help]dead front timer

04/25/2010 13:21 chrisg2010#1
any one know how to set the df timer script O.o
this one

PHP Code:
<?php
//
// War Script by mta'chrono
//
$hour_wars = array(14022008);
sort($hour_wars);
$hour_now date('14:00');
$hour_next 04;

foreach(
$hour_wars as $hour_war) {
  if(
$hour_war $hour_now) {
    
$hour_next $hour_war;
    break;
  }
}

$wartime = (mktime($hour_next44) - time(15:00));
?>

countdown_x1500 = <?=$wartime;?>;
function convert_to_time_x1500(secs_x1500)
{
  secs_x1500 = parseInt(secs_x1500);
  hh_x1500 = secs_x1500 / 3600;
  hh_x1500 = parseInt(hh_x1500);
  mmt_x1500 = secs_x1500 - (hh_x1500 * 3600);
  mm_x1500 = mmt_x1500 / 60;
  mm_x1500 = parseInt(mm_x1500);
  ss_x1500 = mmt_x1500 - (mm_x1500 * 60);

  if (hh_x1500 > 23)
  {
     dd_x1500 = hh_x1500 / 24;
     dd_x1500 = parseInt(dd_x1500);
     hh_x1500 = hh_x1500 - (dd_x1500 * 24);
  } else { dd_x1500 = 0; }

  if (ss_x1500 < 10) { ss_x1500 = "0"+ss_x1500; }
  if (mm_x1500 < 10) { mm_x1500 = "0"+mm_x1500; }
  if (hh_x1500 < 10) { hh_x1500 = "0"+hh_x1500; }
  if (dd_x1500 == 0) { return (hh_x1500+":"+mm_x1500+":"+ss_x1500); }
  else {
    if (dd_x1500 > 1) { return (dd_x1500+" days "+hh_x1500+":"+mm_x1500+":"+ss_x1500); }
    else { return (dd_x1500+" day "+hh_x1500+":"+mm_x1500+":"+ss_x1500); }
  }
}
function do_cd_x1500()
{
  if (countdown_x1500 < 0)
  {
    document.getElementById('nationwarx1500').innerHTML = "<b><span style='color: red;'>Deadfront is NOW!!</span></b>";
  }
  else
  {
    document.getElementById('nationwarx1500').innerHTML = convert_to_time_x1500(countdown_x1500) + " hours";
    setTimeout('do_cd_x1500()', 1000);
  }
  countdown_x1500 = countdown_x1500 - 1;
}
document.write("<span id='nationwarx1500'></span>\n");
do_cd_x1500();
im not that good with php
04/26/2010 06:15 antondude#2
$hour_wars = array(14, 02, 20, 08);

There is your times
04/26/2010 10:24 eLO21#3
But last DF time must be "00" if you don't set 00, counter will be stop on last time and you must wait 24/h to work again
04/27/2010 18:43 dannyx12345#4
do you have to set the last df time to 00 in DB also???? for it to work correctly? or just in the script?
04/27/2010 23:07 naruto820#5
it does not have any connection to your database
this script just checks the time on the top of the script
Code:
$hour_wars = array(14, 02, 20, 08);
so if you have more dfs like 6 for example u just add 2 more times.
04/27/2010 23:29 [DEV]AlphaOMEGA#6
Quote:
Parse error: syntax error, unexpected ':' in C:\xampp\htdocs\dfcounter.php on line 17
we did that doesnt work
04/28/2010 06:05 gedimazs#7
Quote:
Originally Posted by [DEV]AlphaOMEGA View Post
we did that doesnt work
That script is a crap, go to dkundeground and look for DF time script there, you will find fixed one.
04/28/2010 07:37 N0bleman80#8
Quote:
Originally Posted by gedimazs View Post
That script is a crap, go to dkundeground and look for DF time script there, you will find fixed one.
that is the same script from dk underground, dfcounter.
04/28/2010 13:22 daddycool.#9
Try this script,

PHP Code:
<?php
//
// War Script by mta'chrono
//
$hour_wars = array(03061215182100);
sort($hour_wars);
$hour_now date('H');
$hour_next 03;


foreach(
$hour_wars as $hour_war)
{
if(
$hour_war $hour_now)
{
$hour_next $hour_war;
break;
}
}

$wartime = (mktime($hour_next00) - time());
?>

<script type="text/javascript">

countdown_x1500 = <?php print $wartime?>; //**********
function convert_to_time_x1500(secs_x1500)
{
secs_x1500 = parseInt(secs_x1500);
hh_x1500 = secs_x1500 / 3600;
hh_x1500 = parseInt(hh_x1500);
mmt_x1500 = secs_x1500 - (hh_x1500 * 3600);
mm_x1500 = mmt_x1500 / 60;
mm_x1500 = parseInt(mm_x1500);
ss_x1500 = mmt_x1500 - (mm_x1500 * 60);

if (hh_x1500 > 23)
{
dd_x1500 = hh_x1500 / 24;
dd_x1500 = parseInt(dd_x1500);
hh_x1500 = hh_x1500 - (dd_x1500 * 24);
}
else
{ dd_x1500 = 0; }

if (ss_x1500 < 10) { ss_x1500 = "0"+ss_x1500; }
if (mm_x1500 < 10) { mm_x1500 = "0"+mm_x1500; }
if (hh_x1500 < 10) { hh_x1500 = "0"+hh_x1500; }
if (dd_x1500 == 0)
{ return (hh_x1500+":"+mm_x1500+":"+ss_x1500); }
else
{
if (dd_x1500 > 1)
{ return (dd_x1500+" days "+hh_x1500+":"+mm_x1500+":"+ss_x1500); }
else
{ return (dd_x1500+" day "+hh_x1500+":"+mm_x1500+":"+ss_x1500); }
}
}

function do_cd_x1500()
{
if (countdown_x1500 < 0)
{
document.getElementById('nationwarx1500').innerHTM L = "<b><span style='color: red;'>Deadfront is NOW!!</span></b>";
}
else
{
document.getElementById('nationwarx1500').innerHTM L = convert_to_time_x1500(countdown_x1500) + " hours Next DeathFront CountDown";
setTimeout('do_cd_x1500()', 1000);
}
countdown_x1500 = countdown_x1500 - 1;
}

document.write("<span id='nationwarx1500'>valami</span>\n"); //**********
do_cd_x1500();

</script>
credits to [Only registered and activated users can see links. Click Here To Register...]

Original post: [Only registered and activated users can see links. Click Here To Register...]
04/28/2010 13:47 naruto820#10
for me none of the dead front scripts worked on my xampp for windows. But when I used them in my actual linux webhost most worked fine.
04/28/2010 13:49 daddycool.#11
Works fine with AppServ v2.5.9
04/29/2010 07:30 Decima#12
the original script works fine as long as u edit 90% of it . . . . .

alternatively u could just learn php and re-write the whole damned thing is a matter of about 10 minutes . . .
04/29/2010 07:56 N0bleman80#13
Quote:
Originally Posted by Decima View Post
the original script works fine as long as u edit 90% of it . . . . .

alternatively u could just learn php and re-write the whole damned thing is a matter of about 10 minutes . . .
why so angry.. lol yes the 2nd 1 work fine post by darth nerd work fine.. and naruto820 learn some php scripting.. ^^
04/29/2010 13:49 *JayKay*#14
Here is the script's DF Running counter perfectly you just change the schedules within the php and everything works the download link below to download this file contains a php file and an ajax there who want this:

Download:
[Only registered and activated users can see links. Click Here To Register...]

Scan:
PHP Code:
Arquivo DF.rar recebido em 2010.04.29 11:45:29 (UTC)
AndamentoCarregando ... na fila aguardando analisando terminado NÃO ENCONTRADO PARADO 


Resultado
0/41 (0%)
Carregando informação do servidor... 
O seu arquivo está na posição1.
Tempo estimado de início é entre 38 e 55 segundos
.
Não feche a janela até que a análise esteja completa
O mecanismo que estava processando o arquivo parounós esperaremos alguns segundos para tentar recuperar o resultado.
Se estiver esperando por mais de cinco minutosvocê terá que reenviar o arquivo
O seu arquivo está sendo analisado por VirusTotal no momento,
os resultados serão exibidos assim que forem gerados
 
Modo compacto Imprimir resultados  O seu arquivo expirou ou não existe
O serviço está parado no momentoo seu arquivo está esperando para ser analisado (posição: ) por tempo indeterminado.
Você pode aguardar por resposta na página (atualização automáticaou digite o seu email no campo abaixo e clique em "enviar" para que o sistema envie uma notificação quando a análise terminar.  Email:  
  

Antivírus Versão Última Atualização Resultado 
a
-squared 4.5.0.50 2010.04.29 
AhnLab-V3 2010.04.29.05 2010.04.29 
AntiVir 8.2.1.224 2010.04.29 
Antiy-AVL 2.0.3.7 2010.04.29 
Authentium 5.2.0.5 2010.04.29 
Avast 4.8.1351.0 2010.04.29 
Avast5 5.0.332.0 2010.04.29 
AVG 9.0.0.787 2010.04.29 
BitDefender 7.2 2010.04.29 
CAT-QuickHeal 10.00 2010.04.29 
ClamAV 0.96.0.3-git 2010.04.29 
Comodo 4710 2010.04.29 
DrWeb 5.0.2.03300 2010.04.29 
eSafe 7.0.17.0 2010.04.28 
eTrust-Vet 35.2.7457 2010.04.29 
F-Prot 4.5.1.85 2010.04.28 
F-Secure 9.0.15370.0 2010.04.29 
Fortinet 4.0.14.0 2010.04.27 
GData 21 2010.04.29 
Ikarus T3.1.1.80.0 2010.04.29 
Jiangmin 13.0.900 2010.04.29 
Kaspersky 7.0.0.125 2010.04.29 
McAfee 5.400.0.1158 2010.04.29 
McAfee-GW-Edition 6.8.5 2010.04.29 
Microsoft 1.5703 2010.04.29 
NOD32 5071 2010.04.29 
Norman 6.04.12 2010.04.29 
nProtect 2010-04-29.01 2010.04.29 
Panda 10.0.2.7 2010.04.28 
PCTools 7.0.3.5 2010.04.29 
Prevx 3.0 2010.04.29 
Rising 22.45.03.03 2010.04.29 
Sophos 4.53.0 2010.04.29 
Sunbelt 6235 2010.04.28 
Symantec 20091.2.0.41 2010.04.29 
TheHacker 6.5.2.0.272 2010.04.28 
TrendMicro 9.120.0.1004 2010.04.29 
TrendMicro-HouseCall 9.120.0.1004 2010.04.29 
VBA32 3.12.12.4 2010.04.28 
ViRobot 2010.4.27.2295 2010.04.28 
VirusBuster 5.0.27.0 2010.04.29 
Informações adicionais 
If you like please thank!
04/30/2010 04:09 dannyx12345#15
if it wasnt in spanish ro what ever language that is we could use it but no clue how to read/understand it if u can convert to english much appreciated