Joob 1 Denunciar post Postado Janeiro 31, 2014 Boas pessoal, Tenho uma pequena questão.. nestas funções.. public function custom($url,$splash,$id,$timer=5){ $data=json_decode($splash,TRUE); $data["banner"]=$this->config["url"]."/static/user_content/{$id}_files/{$data["banner"]}"; $data["avatar"]=$this->config["url"]."/static/user_content/{$id}_files/{$data["avatar"]}"; Main::add('<script>var count = "20";var countdown = setInterval(function(){$(".c-countdown span").html(count);if (count < 1) {clearInterval(countdown);window.location="'.$url.'";}count--;}, 1000);</script>',"custom",FALSE); include(TEMPLATE."/header.php"); include(TEMPLATE."/custom.php"); include(TEMPLATE."/footer.php"); } public function test_page($url=array()){ if(!$this->url_test($url["url"])){ header("Location: {$url["url"]}"); } if($this->config["tracking"]=="2" && !empty($this->config["analytic"])){ Main::add("<script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,'script','//www.google-analytics.com/analytics.js','ga');ga('create', '{$this->config["analytic"]}', '{$this->domain($this->config["url"])}');ga('send', 'pageview');</script>","custom",FALSE); } include(TEMPLATE."/test.php"); } Quero colocar as seguintes variáveis "$data & Main", da função "custom", na função "test_page": $data["banner"]=$this->config["url"]."/static/user_content/{$id}_files/{$data["banner"]}"; Main::add('<script>var count = "20";var countdown = setInterval(function(){$(".c-countdown span").html(count);if (count < 1) {clearInterval(countdown);window.location="'.$url.'";}count--;}, 1000);</script>',"custom",FALSE); Ou seja, a variável "banner", vai chamar um banner automático, e o "Main", vai fazer a contagem em segundos, para depois mudar de página. Fico aguardar uma dica de alguém, obrigado. Abraço, Joob Compartilhar este post Link para o post Compartilhar em outros sites
Joob 1 Denunciar post Postado Fevereiro 1, 2014 Pessoal, enganei-me no tópico.. coloquei isto no JavaScript.. mudem para a secção PHP por favor.. Obrigado Compartilhar este post Link para o post Compartilhar em outros sites