Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Problem z mailingiem
Tygrys22
post
Post #1





Grupa: Zarejestrowani
Postów: 26
Pomógł: 0
Dołączył: 29.06.2008

Ostrzeżenie: (10%)
X----


Mam do Was jescze jedno pytanie, a mianowicie, oto cały tekst z pliku konfig.ini wziety z katalogu mailing. Jest on odpowiedzailny za logowanie do pliku index.php (sluzy do zarządzania mailingiem). Jestem pewny ze hasło i login wpisuje poprawnie ale nie mogę sie zalogować wiec sadze ze brakuje coś w skrypcie.


index.php
  1. <?
  2. include("inc/konfig.inc");
  3. if($pass) $hack=1;
  4. if($l && $h)
  5. {
  6. if($main && !$hack) $h=md5($h);
  7. if($h==$haslo && $l==$login) $pass=1; }
  8. if($main && $pass && !$hack) { echo "
  9. <p>Użytkownik <font color=red><b>$login</b></font>, poprawnie zalogowany do systemu subskrypcji 
  10. <font color=red><b>$sub_name</b></font></p>"; }
  11. if($w=="lista" && $pass && !$hack) include("inc/lista.inc");
  12. if($w=="wyslij" && $pass && !$hack) include("inc/wyslij.inc");
  13. if($pass && !$hack) { echo "
  14.  
  15.  }
  16. elseif(!$pass || $hack) { ?>
  17.  
  18.  
  19. <? include("inc/footer.inc"); ?>


Ten post edytował Tygrys22 7.07.2008, 22:42:18
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
Tygrys22
post
Post #2





Grupa: Zarejestrowani
Postów: 26
Pomógł: 0
Dołączył: 29.06.2008

Ostrzeżenie: (10%)
X----


Ok rzeczywiscie wysyła bez problemu na gmail.com (IMG:http://forum.php.pl/style_emoticons/default/smile.gif)
NIewiem jeszcze czemu plik db/lista.xh nie pobiera danych z bazy mysQL w ktorej zapisuja sie @ podane przez uzytkownikow w subskrpcji.

TO JEST PLIK LISTA.inc nie wiem czy to on jest za to odpowiedzialny ?

  1. <?
  2. $lista = file("db/lista.xh");
  3.  
  4. if(($action=="usun") && $email)
  5. {
  6. if($email<=count($lista))
  7. {
  8. $email--;
  9. $usuniety=$lista[$email];
  10. unset($lista[$email]);
  11.  
  12. $fd = fopen ("db/lista.xh", "w+");
  13. $i=0;
  14. while ($i<=count($lista)) {
  15. fwrite($fd, $lista[$i]);
  16. $i++;
  17. }
  18. fclose($fd);
  19.  
  20. echo "Usunięto e-mail: <font color=red><b>$usuniety</b></font>";
  21. }
  22. else { echo "<font color=red><b>Nie ma takiego e-maila w bazie $sub_name</b></font>"; }
  23.  
  24. }
  25.  
  26. if(($action=="dodaj") && $email)
  27. {
  28. $lista = implode("", file("db/lista.xh"));
  29. if(preg_match("/b$emailb/i", $lista)) $jest=1;
  30.  
  31. if(!$jest)
  32. {
  33. $fd = fopen ("db/lista.xh", "a");
  34. fwrite($fd, $email."\n");
  35. fclose($fd); 
  36.  
  37. echo "Dopisano e-mail: <font color=red><b>$email</b></font>";
  38. }
  39. else { echo "<font color=red><b>$email już figuruje na twojej liście $sub_name</b></font>"; }
  40.  
  41. }
  42.  
  43. $ile=count($lista);
  44. echo "<p>Lista aktywnych e-maili subskrypcji: <font color=red><b>$ile</b></font></p>";
  45.  
  46. if($ile<>0) { echo "
  47. <table width=60% align=\"center\">
  48. <tr><td width=5% valign=\"top\"><b>nr</b></td><td width=70% valign=\"top\"><b>e-mail</b> sortuj: <a href=\"?w=lista&h=$h&l=$l&type=n\">najnowsze</a> | <a href=\"?w=lista&h=$h&l=$l&type=o\">najstarsze</a></td><td width=25% valign=\"top\"><b>akcje</b></td></tr>";
  49.  
  50. $lista = file ("db/lista.xh");
  51. # domyślny format wyświetlania
  52. # najnowsze na górze
  53. if($type<>"o" || !$type) {
  54. $num=0;
  55. $ile=count($lista);
  56. while ($ile>0) { $ile--;
  57. echo "<tr><td width=5%>".($num+1)."</td><td width=70%><a href=\"mailto:$lista[$ile]\">$lista[$ile]</a> </td><td width=25%> <a href=\"?w=lista&h=$h&l=$l&action=usun&email=".($ile+1)."\">usuń</a></td></tr>"; 
  58.  $num++; }
  59. }
  60. # najstarsze na górze
  61. if($type=="o") {
  62. $num=0;
  63. while ($num<count($lista)) {
  64. echo "<tr><td width=5%>".($num+1)."</td><td width=60%><a href=\"mailto:$lista[$num]\">$lista[$num]</a> </td><td width=25%> <a href=\"?w=lista&h=$h&l=$l&action=usun&email=".($num+1)."&type=o\">usuń</a></td></tr>"; 
  65. $num++; }
  66. }
  67. echo "</table>";
  68. }
  69. else echo "<font color=red><b>W bazie $sub_name nie ma jeszcze żadnych e-mail!</b></font>";
  70. ?>
  71. <form name="form1" method="post" action="<? if($type=="o") echo "?w=lista&h=$h&l=$l&type=o"; else echo "?w=lista&h=$h&l=$l&type=n"; ?>">
  72. dodaj nowy e-mail:  
  73. <input type="text" name="email"> 
  74. <input type="hidden" name="action" value="dodaj">
  75. <input type="submit" name="Submit" value="Dodaj">
  76. </form>


Wie ktoś jak to wykonać (IMG:http://forum.php.pl/style_emoticons/default/questionmark.gif)

Ten post edytował Tygrys22 2.07.2008, 17:17:01
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: 11.10.2025 - 17:45