Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [smarty] odświerzanie się
Ruch Radzionków
post
Post #1





Grupa: Zarejestrowani
Postów: 311
Pomógł: 25
Dołączył: 29.08.2011

Ostrzeżenie: (0%)
-----


witam mam problem otórz mam taki kod:
  1. <div id="srodek">
  2. {if ($stronadocelowa)}
  3. {include file="$stronadocelowa"}
  4. {/if}
  5. </div>

oraz 2 kod php:
  1. $str = $_GET['panel'];
  2. if($str == '')
  3. {
  4. include('page/news.php');
  5. $stronadocelowa = SZABLON_PELNA_SCIEZKA . 'news.tpl';
  6. $smarty->assign("stronadocelowa", SZABLON_PELNA_SCIEZKA . 'news.tpl');
  7. echo'1';
  8. }
  9. else
  10. {
  11. if(is_file('page/'.$str.'.php'))
  12. {
  13. include('page/'.$str.'.php');
  14. $stronadocelowa = SZABLON_PELNA_SCIEZKA . ''.$str.'.tpl';
  15. $smarty->assign("stronadocelowa", SZABLON_PELNA_SCIEZKA . ''.$str.'.tpl');
  16. }
  17. else
  18. {
  19. echo'2';
  20. include('page/news.php');
  21. $stronadocelowa = SZABLON_PELNA_SCIEZKA . 'news.tpl';
  22. $smarty->assign("stronadocelowa", SZABLON_PELNA_SCIEZKA . 'news.tpl');
  23. }
  24. }

i mam taki problem że jak zmienię stronę to w php zemienia się wszystko a na stronie w smartach nie jest dalej ta sama strona co była co musze zrobić żeby się automatycznie odświeżała ?
i jeszcze pokazuje mi się strona :
Kod
Smarty Debug Console - Total Time 0.02711
included templates & config files (load time in seconds)
theme\mit2\header.tpl (compile 0.00000) (render 0.00000) (cache 0.00067)
theme\mit2\left.tpl (compile 0.00000) (render 0.00000) (cache 0.00087)
theme\mit2\center.tpl (compile 0.00000) (render 0.00000) (cache 0.00075)
theme\mit2\footer.tpl (compile 0.00000) (render 0.00000) (cache 0.00065)
assigned template variables
$SCRIPT_NAME    Smarty_Variable Object (3)
->value = "/skill/panelsmarty/index.php"
->nocache = false
->scope = "Global"
$sesja    Smarty_Variable Object (3)
->value = "zle"
->nocache = false
->scope = "Smarty root"
$stronadocelowa    Smarty_Variable Object (3)
->value = "theme/mit2/news.tpl"
->nocache = false
->scope = "Smarty root"
$title    Smarty_Variable Object (3)
->value = "strona by mit2"
->nocache = false
->scope = "Smarty root"
$zliczhelp    Smarty_Variable Object (3)
->value = 0
->nocache = false
->scope = "Smarty root"
assigned config file variables (outer template scope)


Ten post edytował Ruch Radzionków 14.09.2012, 10:48:52
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 15.10.2025 - 08:25