Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Przekierowanie do strony
nikestylex7
post
Post #1





Grupa: Zarejestrowani
Postów: 386
Pomógł: 7
Dołączył: 22.04.2010
Skąd: Ziemia

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


Mam problem gdyż zrobiłem przekierowanie do jednej strony kiedy użytkownik ograniczenie = 1 gdy chce wejsc w inną opcje strony to i tak przekierowywuje go do tej podanej w lokacji.
mam błąd wiem że to znaczy jakbym wysłał już wcześniej dane tą drogą lecz nic takiego nie miało miejsca. Próbowałem ob_start(); ob_end_flush(); nic zero...
  1. <b>Warning</b>: Cannot modify header information - headers already sent by (output started at /home/strona/public_html/strona.php:6) in <b>/home/strona/public_html/strona.php</b> on line <b>209</b><br />
  2.  


Może to jest spowodowane Tym że w tej opcji strony mam odliczanie czasu czyli ten który mam w bazie - mktime().
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
nikestylex7
post
Post #2





Grupa: Zarejestrowani
Postów: 386
Pomógł: 7
Dołączył: 22.04.2010
Skąd: Ziemia

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


Pomiędzy tym a dołem czyli zakończeniem body i html jest właśnie ta docelowa strona wyświetlana


  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="pl" lang="pl">
  3. <head>
  4. <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
  5. <meta name="Description" content="" />
  6. <meta name="author" content="" />
  7. <meta name="copyright" content="" />
  8. <meta name="Keywords" content="" />
  9.  
  10. <title><?php echo "Coś - " . $title; ?></title>
  11. <link rel=”shortcut icon” href=”favicon.ico” type=”image/x-icon” />
  12. <link rel="stylesheet" href="style.css" type="text/css" />
  13. <!--[if gte IE 5]>
  14. <link rel="stylesheet" href="style2.css" />
  15. <![endif]-->
  16. // skrypty js //
  17. </head>
  18. <body>
  19. <a href="index.php">Strona główna</a>
  20. <?php
  21. if(!isSet($_SESSION['abc'])){
  22. echo "<form name='logowanie' method='post' action='zaloguj.php' onSubmit='var ok=sprawdzLogowanie(); return ok;'>";
  23. if(isSet($_SESSION['komunikat'])){
  24. echo $_SESSION['komunikat'];
  25. }
  26. echo "<table align='center' width='40%'>
  27. <tr>
  28. <td><input class='form1' size='18' name='login' type='text' maxlength='16' value='login' onClick='form1(this.value);' /></td>
  29. <td><input class='form1' size='18' name='pass' type='password' maxlength='16' value='pass' onClick='form2(this.value);' /></td>
  30. </tr>
  31. <tr>
  32. <td><input class='form2' name='haslo' type='submit' value='zaloguj' /></td>
  33. <td><a href='nowehaslo.php'>odzyskiwanie hasła</a></td>
  34. </tr>
  35. </table>
  36. </form>";
  37. }
  38. else{
  39. $user = $_SESSION['abc'];
  40. $user = mysql_fetch_assoc(mysql_query("SELECT * FROM user WHERE user='$user'"));
  41. if ($user['logowanie'] == 1){
  42. echo "
  43. <script>
  44.  
  45. $(document).ready(function() {
  46.  
  47. var align = 'center';
  48. var top = 120;
  49. var width = 650;
  50. var padding = 10;
  51. var backgroundColor = '#FFFFFF';
  52. var source = 'info.php';
  53. var borderColor = '#333333';
  54. var borderWeight = 4;
  55. var borderRadius = 5;
  56. var fadeOutTime = 300;
  57. var disableColor = '#666666';
  58. var disableOpacity = 40;
  59.  
  60. $(document).ready(function() {
  61. modalPopup(align, top, width, padding, disableColor, disableOpacity, backgroundColor, borderColor, borderWeight, borderRadius, fadeOutTime,source);
  62. });
  63. $(document).keyup(function(e) {
  64. if (e.keyCode == 27) {
  65. closePopup(fadeOutTime);
  66. }
  67. });
  68. </script>
  69. ";
  70. $user = $_SESSION['mohergame'];
  71. mysql_query("UPDATE user SET logowanie ='2' WHERE user='$user[user]'");
  72. }else
  73. }
  74. if ($user['zwolniony'] == 1){
  75. header("Location: docelowastrona.php");
  76. <script>
  77.  
  78. $(document).ready(function() {
  79.  
  80. var align = 'center';
  81. var top = 120;
  82. var width = 650;
  83. var padding = 10;
  84. var backgroundColor = '#FFFFFF';
  85. var source = 'jest.php';
  86. var borderColor = '#333333';
  87. var borderWeight = 4;
  88. var borderRadius = 5;
  89. var fadeOutTime = 300;
  90. var disableColor = '#666666';
  91. var disableOpacity = 40;
  92.  
  93. $(document).ready(function() {
  94. modalPopup(align, top, width, padding, disableColor, disableOpacity, backgroundColor, borderColor, borderWeight, borderRadius, fadeOutTime,source);
  95. });
  96. $(document).keyup(function(e) {
  97. if (e.keyCode == 27) {
  98. closePopup(fadeOutTime);
  99. }
  100. });
  101.  
  102. });
  103.  
  104. </script>
  105. ";
  106. $user = $_SESSION['mohergame'];
  107. mysql_query("UPDATE user SET zwolniony='2' WHERE user='$user'");
  108.  
  109. } else if ($user['zwolniony'] == 2){
  110.  
  111. header("Location: docelowastrona.php");
  112. <script>
  113.  
  114. $(document).ready(function() {
  115.  
  116. var align = 'center';
  117. var top = 120;
  118. var width = 650;
  119. var padding = 10;
  120. var backgroundColor = '#FFFFFF';
  121. var source = 'jest2.php';
  122. var borderColor = '#333333';
  123. var borderWeight = 4;
  124. var borderRadius = 5;
  125. var fadeOutTime = 300;
  126. var disableColor = '#666666';
  127. var disableOpacity = 40;
  128.  
  129. $(document).ready(function() {
  130. modalPopup(align, top, width, padding, disableColor, disableOpacity, backgroundColor, borderColor, borderWeight, borderRadius, fadeOutTime,source);
  131. });
  132. $(document).keyup(function(e) {
  133. if (e.keyCode == 27) {
  134. closePopup(fadeOutTime);
  135. }
  136. });
  137.  
  138. });
  139.  
  140. </script>
  141. ";
  142.  
  143.  
  144. } else if ($user['zwolniony'] == 3){
  145. header("Location: docelowastrona.php");
  146. <script>
  147.  
  148. $(document).ready(function() {
  149.  
  150. var align = 'center';
  151. var top = 120;
  152. var width = 650;
  153. var padding = 10;
  154. var backgroundColor = '#FFFFFF';
  155. var source = 'jest3.php';
  156. var borderColor = '#333333';
  157. var borderWeight = 4;
  158. var borderRadius = 5;
  159. var fadeOutTime = 300;
  160. var disableColor = '#666666';
  161. var disableOpacity = 40;
  162.  
  163. $(document).ready(function() {
  164. modalPopup(align, top, width, padding, disableColor, disableOpacity, backgroundColor, borderColor, borderWeight, borderRadius, fadeOutTime,source);
  165. });
  166. $(document).keyup(function(e) {
  167. if (e.keyCode == 27) {
  168. closePopup(fadeOutTime);
  169. }
  170. });
  171.  
  172. });
  173.  
  174. </script>
  175. ";
  176. $user = $_SESSION['mohergame'];
  177. mysql_query("UPDATE user SET zwolniony='0' WHERE user='$user'");
  178.  
  179. }
  180.  
  181.  
  182. echo "<table>
  183. // dane zalogowanego użytkownika //
  184. <table>";
  185. }
  186.  
  187.  
  188. if(isSet($_SESSION['abc'])){
  189. echo "<a href='wyloguj.php'>wyloguj</a>";
  190. }
  191. else{
  192. echo "<a href='rejestracja.php'>zarejestruj</a>";
  193. }
  194. ?>
Go to the top of the page
+Quote Post

Posty w temacie


Closed 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 - 05:49