Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> Problem
dulek000
post 18.03.2005, 18:59:42
Post #1





Grupa: Zarejestrowani
Postów: 23
Pomógł: 0
Dołączył: 16.03.2005

Ostrzeżenie: (0%)
-----


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
Go to the top of the page
+Quote Post
NuLL
post 18.03.2005, 19:02:39
Post #2





Grupa: Zarejestrowani
Postów: 2 262
Pomógł: 21
Dołączył: 3.05.2004
Skąd: Sopot, Krakow, W-wa

Ostrzeżenie: (0%)
-----


Moge się założyć że gdzies w skrypcie dwa includujesz plik headers.php


--------------------
Javascript, Coffeescript, Node.js, Mongo, CouchDb, chmury, workery & inne bajery - zycie jest zbyt krotkie aby miec nudna prace :)
Go to the top of the page
+Quote Post
dulek000
post 18.03.2005, 20:50:14
Post #3





Grupa: Zarejestrowani
Postów: 23
Pomógł: 0
Dołączył: 16.03.2005

Ostrzeżenie: (0%)
-----


Nie wiem, jak to się stało, ale style/panel.php zawierał to co headers.php tongue.gif
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Wersja Lo-Fi Aktualny czas: 23.06.2025 - 03:35