Pomoc - Szukaj - U¿ytkownicy - Kalendarz
Pe³na wersja: [PHP][HTML]php w html
Forum PHP.pl > Forum > Przedszkole
-Ja-
  1. <html>
  2. <center>
  3. <font color=red><b>Szukaj bana:</b></font><br>
  4. <table cellspacing='1' class='szukaj'>
  5. <tr>
  6. <form name="searchnick" method="post" action="ban_search.php">
  7. <td height='16' class='szukaj'>Nick:</td>
  8. <td height='16' class='szukaj'><input type='text' name='nick' value='' id="head_search_field"></td>
  9. <td height='16' class='szukaj'><input type='image' name='submit' src="http://www.freebuttons.com/freebuttons/ShipControl/ShipControlLj4.gif"></td>
  10. </form>
  11. </tr>
  12. <tr>
  13. <form name="searchnick" method="post" action="ban_search.php">
  14. <td height='16' class='szukaj'>IP:</td>
  15. <td height='16' class='szukaj'><input type='text' name='steamid' value='' id="head_search_field"></td>
  16. <td height='16' class='szukaj'><input type='image' name='submit' src="http://www.freebuttons.com/freebuttons/ShipControl/ShipControlLj4.gif"></td>
  17. </form>
  18. </tr>
  19.  
  20. </center>
  21. </table>
  22. </html>
  23.  
  24.  
  25. <?
  26.  
  27. /*
  28.  *
  29.  * AMXBans, managing bans for Half-Life modifications
  30.  * Copyright (C) 2003, 2004 Ronald Renes / Jeroen de Rover
  31.  *
  32.  * web : <a href=\"http://www.xs4all.nl/~yomama/amxbans/\" target=\"_blank\">http://www.xs4all.nl/~yomama/amxbans/</a>
  33.  * mail : yomama@xs4all.nl
  34.  * ICQ : 104115504
  35.  *  
  36.  * This file is part of AMXBans.
  37.  *
  38.  * AMXBans is free software; you can redistribute it and/or modify
  39.  * it under the terms of the GNU General Public License as published by
  40.  * the Free Software Foundation; either version 2 of the License, or
  41.  * (at your option) any later version.
  42.  *
  43.  * AMXBans is distributed in the hope that it will be useful,
  44.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  45.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  46.  * GNU General Public License for more details.
  47.  *
  48.  * You should have received a copy of the GNU General Public License
  49.  * along with AMXBans; if not, write to the Free Software
  50.  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  51.  *
  52.  */
  53.  
  54. // Added by Geesu
  55. if ( !file_exists("include/config.inc.php") )
  56. {
  57.  
  58. header("Location: http://" . $_SERVER['HTTP_HOST']
  59.  . rtrim(dirname($_SERVER['PHP_SELF']), '/')
  60.  . "/" . "admin/setup.php");
  61.  
  62. }
  63.  
  64. $previous_button = NULL;
  65. $next_button = NULL;
  66. // End Added by Geesu
  67.  
  68.  
  69. // Start session
  70.  
  71. session_start();
  72.  
  73. // Require basic site files
  74. require("include/config.inc.php");
  75.  
  76. if ($config->error_handler == "enabled") {
  77. include("$config->error_handler_path");
  78. }
  79.  
  80. if ($config->geoip == "enabled") {
  81. include("$config->path_root/include/geoip.inc");
  82. }
  83.  
  84. require("$config->path_root/include/functions.lang.php");
  85. require("$config->path_root/include/functions.inc.php");
  86.  
  87. // First we get the total number of bans in the date base.
  88.  
  89.  
  90. $resource = mysql_query("SELECT COUNT(bid) AS all_bans FROM $config->bans") or die(mysql_error());
  91. $result = mysql_fetch_object($resource);
  92.  
  93. // Get the page number, if no number is defined make default 1
  94. if(isset($_GET["page"]) AND is_numeric($_GET["page"])) {
  95. $page = $_GET["page"];
  96.  
  97. if($page < 1) {
  98. trigger_error("Pagenumbers need to be >= 1.", E_USER_NOTICE);
  99. }
  100. } else {
  101. $page = 1;
  102. }
  103.  
  104. ...
  105. ...
  106. ...
  107. ...
  108.  
  109.  
  110. $smarty->display('main_header.tpl');
  111. $smarty->display('ban_list.tpl');
  112. $smarty->display('main_footer.tpl);
  113.  
  114. ?>


Mam taki kod, doda³em html na góre i wyrzuca mi b³±d co jest ¼le ?
LonelyKnight
Mo¿e powiesz jaki b³±d? smile.gif
nospor
zapewne: cannot sent headers... headers already sent

@gosc szukaj na forum pod haslem:
headers already sent
problem poruszany milion i 10 razy
daniel1302
A ja odpowiem
  1. <?php
  2. header("Location: http://" . $_SERVER['HTTP_HOST']
  3.  . rtrim(dirname($_SERVER['PHP_SELF']), /&#092;')
  4.  . "/" . "admin/setup.php");
  5. ?>

To musisz daæ przed kodem HTML
nospor
@daniel1302 a session_start() to juz nie? O zgubinym warunku juz nie wspomne winksmiley.jpg
Pozatym dostal info co ma zrobic. Jakby troche poszukal to by mu sie nic nie stalo.
To jest wersja lo-fi g³ównej zawarto¶ci. Aby zobaczyæ pe³n± wersjê z wiêksz± zawarto¶ci±, obrazkami i formatowaniem proszê kliknij tutaj.
Invision Power Board © 2001-2025 Invision Power Services, Inc.