Witam!

Wyklepałem prosty formularz do generowaniu opisu. Chciałem sobie wrzucić to w ładny szablon, i wszystko było ok do momentu wklepywania kodu do szablonu i sprawdzania czy działa. Okazało się że po wysłaniu wypełnionego formularza dane nie są wczytywane, i wynik jest pusty. Udało mi się osiągnąć aby dane były wczytywane, ale nadal nie wszystko działa jak należy dlatego prosze o pomoc. Chodzi dokładnie o ten formularz:
  1. <?php
  2. $subNav = array(
  3. "Welcome ; welcome.php ; #509601;",
  4. "Film ; film.php ; #509601;",
  5. "Wynik ; film-end.php ; #509601;",
  6. );
  7.  
  8.  
  9. include_once("inc/essentials.php");
  10.  
  11. /*Include a sidebar */
  12. include_once("inc/sidebar.php");
  13. showSidebar("some_info");
  14. ?>
  15.  
  16. <script>
  17. $mainNav.set("tilegroup 2")
  18. </script>
  19.  
  20.  
  21. <h1 class="margin-t-0">Film</h1>
  22. <hr>
  23. <p><font size=15>Wypełnij i generuj:</font></p>
  24. <form action="?p=FilmWynik" method="POST">
  25. <b>Nazwa filmu: </b><input type="text" name="ntk1" /><br>
  26. <b>Link do plakatu: </b><input type="text" name="ntk2" /><i> Minimalna rozdzielczość to w=355 h=512</i><br>
  27. <b>Opis I: </b><input type="text" name="ntk3" /><br>
  28. <b>Opis II: </b><input type="text" name="ntk4" /><br>
  29. <b>Screen I: </b><input type="text" name="ntk5" /><br>
  30. <b>Screen II: </b><input type="text" name="ntk6" /><br><br>
  31. <center><input type="submit" value="Start" /></center>
  32. </form>


i efekt końcowy ma być wyświetlany tu:

  1. <?php
  2. $subNav = array(
  3. "Welcome ; welcome.php ; #509601;",
  4. "Film ; film.php ; #509601;",
  5. "Wynik ; film-end.php ; #509601;",
  6. );
  7.  
  8.  
  9. include_once("inc/essentials.php");
  10.  
  11. /*Include a sidebar */
  12. include_once("inc/sidebar.php");
  13. showSidebar("some_info");
  14. ?>
  15.  
  16. <script>
  17. $mainNav.set("tilegroup 2")
  18. </script>
  19.  
  20.  
  21. <h1 class="margin-t-0">Wynik</h1>
  22. <hr>
  23. <?php
  24.  
  25. <p><textarea cols="63" rows="32" readonly="readonly">
  26. <div style="font:normal normal normal 9pt/normal Verdana;text-align:justify;padding:8px 8px 3px 8px;border:5px double #339999;color:#000000;" class="quote">
  27. <center>
  28. <span style="color:#ff7d2f;font-size:36px;font-family:"comic sans ms", cursive;">'.$_POST['ntk1'].'</span>
  29.  
  30. <img alt="PLAKAT" border="0" width="355" height="512" src="'.$_POST['ntk2'].'"></center>
  31.  
  32.  
  33.  
  34. <div style="font:normal normal normal 10pt/normal Verdana;text-align:justify;padding:0px 20px 10px 20px;border:3px inset #000000;" class="quote">
  35.  
  36. <center><img border="0" alt="OPIS" src="/ImagePreview.aspx?e=_iXr2dklz4WZ2PhB8pKUOA&amp;pv=2"></center>
  37. <hr><i>'.$_POST['ntk3'].'</i>
  38. <hr>
  39. '.$_POST['ntk4'].'
  40. </div>
  41.  
  42. <div style="font:normal normal normal 10pt/normal Verdana;text-align:justify;padding:40px 20px 5px 20px;border:3px inset #000000;" class="quote"><center><img border="0" alt="SCREENY" src="/ImagePreview.aspx?e=h-Jqd2WUtosFXz3TXVFjvg&pv=2"></center>
  43.  
  44.  
  45. <hr><img width="608" height="362" src="'.$_POST['ntk5'].'" alt="#1" class="shrinkToFit decoded"><hr><img width="608" height="362" class="shrinkToFit decoded" alt="#2" src="'.$_POST['ntk6'].'"></div></div></textarea></p>' ?>


Jeżeli w formularzu action będzie równe #!/FilmWynik dane nie są wczytywane, gdy jest ?p=FilmWynik szablon nie działa jak należy. Proszę o pomoc aby szablon był wyświetlany poprawnie (czyli jak w #!/FilmWynik) oraz były wczytywane dane. Z góry przepraszam za wszelkie niejasności w tym poście!

(plik init.php odp za adres)
  1. <?php
  2. $tileTypes = array();
  3. $tile = array();
  4.  
  5. function chars($r){
  6. $charSearch = array("/ŕ|á|â|ă|ä|ĺ|ć|Ŕ|Á|Â|Ă|Ä|Ĺ|Ć/","/ç|Ç/","/č|é|ę|ë|Č|É|Ę|Ë/","/ě|í|î|ď|Ě|Í|Î|Ď/","/ň|ó|ô|ő|ö|đ|ř|Ň|Ó|Ô|Ő|Ö|Đ|Ř/","/œ|Œ/","/ů|ú|ű|ü|Ů|Ú|Ű|Ü/","/ý|˙|Ý|Ÿ/","/š|Š/","/ž|Ž/","/Ţ/","/ß/","/ƒ|Ƒ/");
  7. $charReplace = array("a","c","e","i","o","oe","u","y","s","z","b","ss","f");
  8. return preg_replace($charSearch, $charReplace, $r);
  9. };
  10.  
  11.  
  12. function stripSpaces($s){
  13. return str_replace(" ","-",$s);
  14. }
  15. function makeLinkHref($l){
  16. global $pageTitles, $bot, $nojsuser;
  17. if($l==""){
  18. return "";
  19. }
  20. if(substr($l,0,9) == 'external:'){
  21. return substr($l,9);
  22. }
  23.  
  24. if(substr($l,0,7) == "http://" ||
  25. substr($l,0,8) == "https://" ||
  26. substr($l,0,1) == "/" ||
  27. substr($l,0,1) == "#" ||
  28. $l[strlen($l)-1] == "/")
  29. {
  30. return $l;
  31. }
  32. if(array_key_exists($l,$pageTitles)){
  33. $lu = strtolower(chars($pageTitles[$l]));
  34. }else{
  35. $lu = strtolower(chars("url=".$l));
  36. }
  37.  
  38. if($bot && !$nojsuser){
  39. return "#!/".stripSpaces($lu);
  40. }else{
  41. return "?p=".stripSpaces($lu);
  42. }
  43. }
  44. function makeLink($l){ // make valid links
  45. global $pageTitles, $bot, $nojsuser;
  46. $t = " ";
  47. if($l==""){
  48. return "";
  49. }
  50. if(substr($l,0,7) == 'newtab:'){
  51. $t = " target='_blank' ";
  52. $l = substr($l,7);
  53. }
  54. $l = makeLinkHref($l);
  55.  
  56. if($bot && !$nojsuser){
  57. return $t."href='".stripSpaces($l)."'";
  58. }else{
  59. return $t."href='".stripSpaces($l)."'";
  60. }
  61. }
  62. function passToJS(){
  63. global $passToJS;
  64. foreach($passToJS as $phpName=>$jsName){
  65. global ${$phpName};
  66. echo $jsName." = '".addslashes(${$phpName})."';";
  67. }
  68. }
  69. ?>