Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: Problem
Forum PHP.pl > Forum > PHP
dulek000
index.php:

  1. <?php
  2. include('headers.php');
  3. include('style/topleft.php');
  4. if (isset($_GET[id])) $id=$_GET[id];
  5. else $id='';
  6.  
  7. switch ($id) {
  8. case 'news': include('style/news.php'); break;
  9. case 'contact': include('style/contact.php'); break;
  10. case 'wars': include('style/wars.php'); break;
  11. case 'presence': include('style/presence.php'); break;
  12. case 'recruit': include('style/recruit.php'); break;
  13. case 'members': include('style/members.php'); break;
  14. case 'regulamin': include('style/regulamin.php'); break;
  15. case 'stats': include('style/stats.php'); break;
  16. case 'download': include('style/download.php'); break;
  17. case 'panel': include('style/panel.php'); break;
  18. case 'login': include('style/login.php'); break;
  19. case 'register': include('style/register.php'); break;
  20. default: include ('style/news.php');
  21. }
  22.  
  23. include ('style/rightbottom.php');
  24.  
  25. ?>


headers.php:

  1. <?php
  2. function gettime(){
  3. list($mikrosek, $sek)=explode(&#092;" \", microtime());
  4. return ((float)$mikrosek + (float)$sek);
  5. }
  6. $start = gettime();
  7. header(&#092;"Content-Type: text/html; charset=ISO-8859-2\");
  8. $conn=mysql_connect(&#092;"localhost\", \"*****\", \"******\");  
  9. mysql_select_db(&#092;"*****\", $conn);
  10. $res = mysql_query(&#092;"SELECT * FROM `config` where id='password'\");
  11. while($wrs = mysql_fetch_array($res)){
  12. $pass=&#092;"$wrs[content]\";
  13. }
  14. ini_set('session.use_cookies', 1);
  15. function form()
  16. {
  17. echo &#092;"<form method='POST' action='index.php?id=login'>\";
  18. echo &#092;"Login: <input type='text' name='login' size='7'><br>\";
  19. echo &#092;"Hasło: <input type='password' name='pass' size='7'><br>\";
  20. echo &#092;"<input type='hidden' name='from' value='\". $_SERVER['PHP_SELF'] .\"'>\";
  21. echo &#092;"<input type='submit' value='ok'></form>\";
  22. echo &#092;"<a href='index.php?id=register'>Zarejestruj się</a>\";
  23. } 
  24.  
  25. ?>


W style/topleft.php jest lewe menu. Nie ma kodu php
W style/rightbottom.php jest prawe menu. Znajduje się tam wywołanie funkcji gettime().
W style/panel.php jest tylko kod html.

To był wstęp aaevil.gif

Przy $id="panel" wyskakuje błąd: Fatal error: Cannot redeclare gettime() (previously declared in /usr/export/www/vhosts/funnetwork/hosting/pts1939/headers.php:3) in /usr/export/www/vhosts/funnetwork/hosting/pts1939/headers.php on line 2
NuLL
Moge się założyć że gdzies w skrypcie dwa includujesz plik headers.php
dulek000
Nie wiem, jak to się stało, ale style/panel.php zawierał to co headers.php tongue.gif
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.