Witam.

Zainstalowałem na swojej stronie skrypt CSubskrypcja

Skrypt jest osadzony na stronie, kod skryptu wygląda tak

  1. <?
  2. if(isset($HTTP_POST_VARS))
  3.  {
  4.  while(list($key,$value)=each($HTTP_POST_VARS))
  5. {
  6. $$key=$value;
  7. }
  8. }
  9. ?>
  10.  
  11. <?
  12. if($STEP==""){
  13. $STEP=1;
  14. }
  15.  
  16. if($STEP>0)
  17. {
  18.  if($STEP==1)
  19. {
  20.  
  21. if(!isset($email))
  22. {
  23.  
  24. function formularz()
  25. {
  26. ?>
  27.  
  28. <form ACTION= <?php $adres = $_SERVER['REQUEST_URI']; echo $adres; ?> method=post><INPUT TYPE=HIDDEN NAME=STEP VALUE=2>
  29. <div align="center" id="newsletter">
  30. <center>
  31. <table border="0" width="180" height="90" cellspacing="1">
  32. <tr>
  33. <td width="180" height="30" colspan="2" valign="middle" align="center"><input TYPE="text" name=email>
  34. </td>
  35. </tr>
  36. <tr>
  37. <td width="180" height="30" colspan="2" valign="middle" align="center">Zapisz: <input TYPE="radio" name=confirm value=zapis checked><br /> Wypisz: <input TYPE="radio" name=confirm value=wypis></td>
  38. </tr>
  39. <tr>
  40. <td width="160" height="30" valign="middle" align="center"><input TYPE=submit value='Zatwierdź' style="border: 1px double #ab1414; background-color: #fbfaf8;"></td>
  41. </tr>
  42. </table>
  43. </center>
  44. </div>
  45. </form>
  46.  
  47.  
  48. <?
  49.  }
  50.  return formularz();
  51.  }
  52. }
  53.  
  54. if($STEP==2&&isset($confirm)&&$confirm=='zapis'||$confirm=='wypis'&& !$email)
  55.  {
  56.  if(!eregi("^([a-z0-9_-]+([.a-z0-9_-]+)*)@([a-z0-9_-]{1,}(.[a-z0-9_-]{1,})*.[a-z]{2,3})$",$email))
  57.  {
  58.  echo "<div align="center">
  59. <center>
  60. <table border="0" width="310" height="20">
  61. <tr>
  62. <td width="310" height="20" align=center>blad w adresie ! </td>
  63. </tr>
  64. </table>
  65. </center>
  66. </div></center>";
  67.  
  68.  exit;
  69.  }
  70.  }  
  71. if($STEP==2&&isset($confirm)&&$confirm=='zapis')
  72. {
  73.  
  74.  ?>
  75.  <FORM ACTION=flymail.php METHOD=POST>
  76.  <INPUT TYPE=HIDDEN NAME=STEP VALUE=3>
  77.  <INPUT TYPE=HIDDEN NAME=email VALUE=<?echo($email);?>>
  78.  
  79. <? ///
  80.  
  81.  
  82. $tablica=file("emaile.txt");
  83. $ile=0;
  84.  for($i=0;$i<count($tablica);$i++)
  85.  {
  86. $ex=explode("|**|", $tablica[$i]);
  87.  
  88. if($email==chop($ex[1]))
  89. {
  90.  $ile++;
  91.  if($ile==1)
  92.  {
  93.  echo "<div align="center">
  94. <center>
  95. <table border="0" width="310" height="20">
  96. <tr>
  97. <td width="310" height="20" align=center>Podany adres email (<B>$ex[1]</B>) już istnieje </td>
  98. </tr>
  99. </table>
  100. </center>
  101. </div></center>";
  102.  exit;
  103. }
  104. }
  105.  }
  106.  if($ile==&& $email)
  107.  {
  108. $email=htmlspecialchars($email);
  109. $email=strip_tags($email);
  110.  
  111. $counter=file("emaile.txt");
  112. $row=array_reverse($counter);
  113. $liczba=$row[0]+1;
  114. $plik=fopen("emaile.txt","a");
  115. flock($plik, 2);
  116. fwrite($plik,"$liczba|**|$email|**|n");
  117. flock($plik,3);
  118. fclose($plik);
  119.  
  120. $message ="<html>";
  121. $message .="<head>";
  122. $message .="<META HTTP-EQUIV="Content-type" CONTENT="text/html; charset=iso-8859-2">";
  123. $message .="<title>dodanie subskrypcji</title>";
  124. $message .="</head>";
  125. $message .="<body bgcolor="rgb(245,245,245)">";
  126. $message .="<font style="font-family:vrdana;color:darkblue;font-size:13px;font-weight:normal"><hr>Dostajesz automatycznego emaila z potwierdzeniem subskrypcji - <br><h1>Witamy :)</h1></FONT><br>";
  127. $message .="<a HREF="http://www.twojadres.com.pl">http://www.twojadres.com.pl</A>";// tutaj wpisz swój adres
  128. $message .="<br>";
  129. $message .="<font style="font-family:vrdana;color:darkblue;font-size:13px;font-weight:normal">Data przeslania: $data</font>";
  130. $message .="</body>";
  131. $message .="</html>";
  132.  
  133. $headers ="MIME-Version: 1.0rn";
  134. $headers .="Content-type: text/html; charset=iso-8859-1rn";
  135.  
  136. //mail("$ex[0]","Inormacja o dodaniu subskrypcji","$message","$headers"); // jeśli serwer nie ma obslugi tej funkcjii usun ta linie lub zostaw tak jak jest 
    a jak ma to usun // przed funkcja
  137.  
  138. echo "<div align="center">
  139. <center>
  140. <table border="0" width="310" height="20">
  141. <tr>
  142. <td width="310" height="20" align=center>Dziekujemy za dopisane do bazy adresu <b>$email</b></td>
  143. </tr>
  144. </table>
  145. </center>
  146. </div>";
  147.  
  148.  
  149.  }
  150.  else
  151.  {
  152.  echo "<div align="center">
  153. <center>
  154. <table border="0" width="310" height="20">
  155. <tr>
  156. <td width="310" height="20" align=center>podaj adres!</td>
  157. </tr>
  158. </table>
  159. </center>
  160. </div>";
  161.  }
  162. }
  163.  
  164.  ///
  165.  
  166.  
  167. if($STEP==2&&isset($confirm)&&$confirm=='wypis')
  168. {
  169.  ?><FORM ACTION=flymail.php METHOD=POST>
  170.  <INPUT TYPE=HIDDEN NAME=STEP VALUE=4>
  171.  <input TYPE=HIDDEN NAME=CONFIRM VALUE=<?echo($wypis);?>>
  172.  <INPUT TYPE=HIDDEN NAME=email VALUE=<?echo($email);?>>
  173.  <?
  174.  $nr='0';
  175. $plik=file("emaile.txt");
  176. for($i=0;$i<count($plik);$i++){
  177. $ex=explode("|**|",$plik[$i]);
  178. if(chop($email)==chop($ex[1]))
  179. {
  180. $dane=file("emaile.txt");
  181. unset($dane[$i]);
  182. $file=fopen('emaile.txt','w');
  183. fwrite($file,str_replace("nr","",join('',$dane)));
  184. fclose($file);
  185.  
  186. setlocale('LC_TIME','polish'); 
  187. $data=strftime(" %A, %d %B %Y");
  188.  
  189. $message ="<html>";
  190. $message .="<head>";
  191. $message .="<META HTTP-EQUIV="Content-type" CONTENT="text/html; charset=iso-8859-2">";
  192. $message .="<title>usuniecie subskrypcji</title>";
  193. $message .="</head>";
  194. $message .="<body bgcolor="rgb(245,245,245)">";
  195. $message .="<font style="font-family:vrdana;color:darkblue;font-size:13px;font-weight:normal"><hr>Dostajesz automatycznego emaila z potwierdzeniem usunięcia subskrypcji - <br><h1>szkoda :(</h1></FONT><br>";
  196. $message .="<a HREF="http://www.twojadres.com.pl">http://www.twojadres.com.pl</A>";// tutaj wpisz swój adres
  197. $message .="<br>";
  198. $message .="<font style="font-family:vrdana;color:darkblue;font-size:13px;font-weight:normal">Data przeslania: $data</font>";
  199. $message .="</body>";
  200. $message .="</html>";
  201.  
  202. $headers ="MIME-Version: 1.0rn";
  203. $headers .="Content-type: text/html; charset=iso-8859-1rn";
  204.  
  205. //mail("$ex[0]","Inormacja o usunieciu subskrypcji","$message","$headers"); // jeśli serwer nie ma obslugi tej funkcjii usun ta linie lub zostaw tak jak jest 
    a jak ma to usun // przed funkcja
  206.  
  207. echo "<div align="center">
  208. <center>
  209. <table border="0" width="310" height="20">
  210. <tr>
  211. <td width="310" height="20" align=center>usunieto adres z bazy danych</td>
  212. </tr>
  213. </table>
  214. </center>
  215. </div>n";
  216.  
  217. $nr++;
  218.  
  219. }
  220. }
  221.  
  222. $target=chop(trim($nr));
  223. $trafienia=$target;
  224. if($trafienia<=0)
  225. {
  226. echo "<center><font style="font-family:verdana;color:darkblue;font-size:13px">Adres</font> '<font style="font-family:verdana;color:red;font-size:13px">$email</font><font style="font-family:verdana;color:darkblue;font-size:13px">' nie występuje w bazie danych</font></CENTER>";
  227. }
  228. }
  229.  
  230. }
  231.  
  232.  
  233. ?>


Cały problem polega na tym, że kod HTML poza tym skryptem przestaje być wyświetlany, wszystko poza nim dosłownie znika. Po wrzuceniu na serwer źródło urywa się za głównym formularzem.

Co z tym zrobić ? Gdzie jest błąd ? Skrypt został ściągnięty z Webinside.pl to chyba nie powinien zawierać błędów, a jednak coś jest nie tak.

Z góry dziękuję za wszelką pomoc.