Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP]Polskie znaki w skrypcie php
idealistka77
post
Post #1





Grupa: Zarejestrowani
Postów: 12
Pomógł: 0
Dołączył: 11.12.2010

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


Czemu nie wyświetlają mi się polskie znaki w skrypcie php?
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
idealistka77
post
Post #2





Grupa: Zarejestrowani
Postów: 12
Pomógł: 0
Dołączył: 11.12.2010

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


  1. <?php
  2. header('Content-type: text/html; charset=utf-8');
  3. // |===========================================================================|
  4. // || IMP Links Manager v1.0 ||
  5. // || System jest opatry na plikach tekstowych ||
  6. // || Szanuj prawa autorskie i nie usuwaj tych informacji! ||
  7. // || W razie problemów prosze wejsc na nasze forum: "forum.imps.boo.pl" ||
  8. // |===========================================================================|
  9.  
  10. if(!isset($scriptpath)){
  11. $scriptpath="linki";
  12. }
  13. if(eregi("://", $scriptpath)){
  14. exit("<center>Nieautoryzowany dostęp!</center>");
  15. }
  16. if(!file_exists($scriptpath."/config.ict.php")){
  17. ?>
  18. <br><br><center>Aby zainstalować skrypt <a href="#" onclick="window.open('<? echo $scriptpath; ?>/install.php','Instalcja','width=655,height=444,resizable=0,scrollbars=no,menubar=no')">kliknij tutaj</a></center><br><br>
  19. <?
  20. }
  21. else{
  22. $config_plik=file($scriptpath."/config.ict.php");
  23. $config=explode("||", $config_plik[1]);
  24. if(file_exists($scriptpath."/dane/dzialy.".$config[6])){
  25. $dzialy=file($scriptpath."/dane/dzialy.".$config[6]);
  26. }
  27.  
  28. require($scriptpath.'/functions.php');
  29. $conf_strona=make_url($config[0]);
  30.  
  31. $pban="nie";
  32. if(file_exists($scriptpath."/ban.ict")){
  33. $ban_file=file($scriptpath."/ban.ict");
  34. foreach($ban_file as $ban){
  35. $ban=explode("||", $ban);
  36. if($ban[1]==$_SERVER['REMOTE_ADDR']){
  37. $pban="tak";
  38. }
  39. }
  40. }
  41.  
  42. if(!isset($_GET['k']) && $_GET['katalog']!="add" && $_GET['katalog']!="add_save" && $_GET['komentarze']!="show" && $_GET['komentarze']!="add" && $_GET['komentarze']!="save" && $_GET['katalog']!="search" && $_GET['katalog']!="zglos" && $_GET['katalog']!="zglos_save"){
  43. if($config[11]=="tak"){
  44. tpl_replace(array('{DODAJ}','{SPATH}','{SEARCH_FORM_BEGIN}','{SEARCH_INPUT}','{SEARCH_SUBMIT}','{SEARCH_FORM_END}','{SEARCH}'),array($conf_strona.'katalog=add',$scriptpath,'<form action="'.$conf_strona.'katalog=search" method="POST">','<input type="text" name="search_words" value="'.$_POST["search_words"].'">','<input type="submit" value="szukaj">','</form>',$conf_strona.'katalog=search'),$scriptpath.'/template/main/header.html');
  45. }
  46. if(file_exists($scriptpath."/dane/dzialy.".$config[6])){
  47. foreach($dzialy as $dzial){
  48. $dzial=stripslashes($dzial);
  49. $dzial=explode("||", $dzial);
  50. if($config[2]=="tak"){
  51. if(file_exists($scriptpath."/dane/".$dzial[0].".".$config[6])){
  52. $count_plik=file($scriptpath."/dane/".$dzial[0].".".$config[6]);
  53. $count=count($count_plik);
  54. tpl_replace(array('{KATEGORIA}','{ILOSC}','{SPATH}','{OPIS}','{SEARCH}'),array('<a href="'.$conf_strona.'k='.$dzial[0].'">'.$dzial[1].'</a>',$count,$scriptpath,$dzial[2],$conf_strona.'katalog=search'),$scriptpath.'/template/main/main.html');
  55. }
  56. else{
  57. tpl_replace(array('{KATEGORIA}','{ILOSC}','{SPATH}','{OPIS}','{SEARCH}'),array('<a href="'.$conf_strona.'k='.$dzial[0].'">'.$dzial[1].'</a>','0',$scriptpath,$dzial[2],$conf_strona.'katalog=search'),$scriptpath.'/template/main/main.html');
  58. }
  59. }
  60. else{
  61. if(file_exists($scriptpath."/dane/".$dzial[0].".".$config[6])){
  62. $count_plik=file($scriptpath."/dane/".$dzial[0].".".$config[6]);
  63. $count=count($count_plik);
  64. if($count!=""){
  65. tpl_replace(array('{KATEGORIA}','{ILOSC}','{SPATH}','{OPIS}','{SEARCH}'),array('<a href="'.$conf_strona.'k='.$dzial[0].'">'.$dzial[1].'</a>',$count,$scriptpath,$dzial[2],$conf_strona.'katalog=search'),$scriptpath.'/template/main/main.html');
  66. }
  67. }
  68. }
  69. }
  70. }
  71. if($config[11]=="tak"){
  72. tpl_replace(array('{DODAJ}','{SPATH}','{SEARCH_FORM_BEGIN}','{SEARCH_INPUT}','{SEARCH_SUBMIT}','{SEARCH_FORM_END}','{SEARCH}'),array($conf_strona.'katalog=add',$scriptpath,'<form action="'.$conf_strona.'katalog=search" method="POST">','<input type="text" name="search_words" value="'.$_POST["search_words"].'">','<input type="submit" value="szukaj">','</form>',$conf_strona.'katalog=search'),$scriptpath.'/template/main/footer.html');
  73. }
  74. }
  75.  
  76. if(file_exists($scriptpath."/dane/dzialy.".$config[6])){
  77. foreach($dzialy as $dzial){
  78. $dzial=stripslashes($dzial);
  79. $dzial=explode("||", $dzial);
  80. switch($_GET['k']){
  81. case "".$dzial[0]."":
  82. if (!file_exists($scriptpath."/dane/".$dzial[0].".".$config[6])) {
  83. wiadomosc('<b>Brak wpisów w tej kategorii!</b><br><a href="'.$conf_strona.'katalog=add"><b>Dodaj stronę do katalogu</b></a>');
  84. }
  85. else {
  86. $count_plik=file($scriptpath."/dane/".$dzial[0].".".$config[6]);
  87. $count=count($count_plik);
  88. if($count==""){
  89. wiadomosc('<b>Brak wpisów w tej kategorii!</b><br><a href="'.$conf_strona.'katalog=add"><b>Dodaj stronę do katalogu</b></a>');
  90. }
  91. else{
  92. tpl_replace(array('{KATEGORIA}','{SPATH}','{SEARCH}'),array($dzial[1],$scriptpath,$conf_strona.'katalog=search'),$scriptpath.'/template/category/header.html');
  93. $linki=file($scriptpath."/dane/".$dzial[0].".".$config[6]);
  94. foreach ($linki as $link){
  95. $link=stripslashes($link);
  96. $link=explode("||", $link);
  97. cenzor_replace("cenzor.ict");
  98. emot_replace("emotki.ict");
  99. imp_code_replace("code.ict");
  100. tpl_replace(array('{URL}','{NAZWA}','{OPIS}','{KLIKNIEC}','{SPATH}','{SEARCH}','{KOMENTARZE}','{ILE_KOMENTARZY}','{SREDNIA}','{ZGLOS}'),array($scriptpath.'/go.php?dzial='.$dzial[0].'&id='.$link[0],$link[2],$link[3],$link[4],$scriptpath,$conf_strona.'katalog=search',$conf_strona.'komentarze=show&link_id='.$dzial[0].'&kom_id='.$link[0],ile_kom($scriptpath),srednia($link[0]),$conf_strona.'katalog=zglos&kat_id='.$dzial[0].'&l_id='.$link[0]),$scriptpath.'/template/category/links.html');
  101. }
  102. }
  103. }
  104. tpl_replace(array('{WSTECZ}','{DODAJ}','{SPATH}','{SEARCH}'),array($conf_strona,$conf_strona.'katalog=add',$scriptpath,$conf_strona.'katalog=search'),$scriptpath.'/template/category/footer.html');
  105. break;
  106. }
  107. }
  108. }
  109.  
  110. switch($_GET['komentarze']){
  111. case show:
  112. if($config[12]=="tak"){
  113.  
  114.  

Niestety niedziała. Całego kodu nie idzie wkleić. (IMG:style_emoticons/default/dostal.gif)

ponawiam pytanie (IMG:style_emoticons/default/smile.gif)

można zamknąć, już działa (IMG:style_emoticons/default/smile.gif) (IMG:style_emoticons/default/smile.gif)
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: 6.10.2025 - 04:37