Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP] BanLista - eval()'d code on line 23
Inaro
post
Post #1





Grupa: Zarejestrowani
Postów: 132
Pomógł: 0
Dołączył: 4.03.2010

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


Cześć, mam errora i pokazuje mi 'BanLista - eval()'d code on line 23' lecz takiej linijki niema, jest lecz pusta... ^^

  1. <?php
  2.  
  3. global $headerinclude, $header, $theme, $footer, $lang;
  4.  
  5. if(!$mybb->user['uid']) error_no_permission();
  6.  
  7. $lang->load('modcp');
  8.  
  9. $bannedquery = $db->simple_select("banned", "uid, admin, reason, dateline, lifted", "", array("order_by" => 'dateline', "order_dir" => 'DESC'));
  10.  
  11. if ($db->num_rows($bannedquery) > 0)
  12. {
  13. $bannedtablerows = "";
  14. while ($ban = $db->fetch_array($bannedquery))
  15. {
  16. $banneduser = get_user($ban['uid']);
  17. $banby = get_user($ban['admin']);
  18.  
  19. if ($ban['lifted'] > 0)
  20. $unbandate = my_date($mybb->settings['dateformat'], $ban['lifted']);
  21. else
  22. $unbandate = $lang->never;
  23.  
  24. $bannedtablerows .= '<tr>
  25. <td class="trow1">'. build_profile_link($banneduser['username'], $banneduser['uid']). '</td>
  26. <td class="trow1">'. $ban['reason']. '</td>
  27. <td class="trow1">'. build_profile_link($banby['username'], $banby['uid']). '</td>
  28. <td class="trow1">'. my_date($mybb->settings['dateformat'], $ban['dateline']) .'</td>
  29. <td class="trow1">'. $unbandate .'</td>
  30. </tr>';
  31. }
  32. }
  33. else
  34. {
  35. $bannedtablerows = '<tr><td class="trow1" colspan="5" align="center">'. $lang->no_banned .'</td></tr>';
  36. }
  37.  
  38. $template='<html>
  39. <head>
  40. <title>'.$pages['name'].'</title>
  41. {$headerinclude}
  42. </head>
  43. <body>
  44. {$header}
  45. <table border="0" cellspacing="1" cellpadding="4" class="tborder">
  46. <tr><td class="thead" colspan="5"><strong>{$lang->ban_banned}</strong></td></tr>
  47. <tr>
  48. <td class="tcat"><span class="smalltext"><strong>{$lang->username}</strong></span></td>
  49. <td class="tcat"><span class="smalltext"><strong>{$lang->reason}</strong></span></td>
  50. <td class="tcat"><span class="smalltext"><strong>{$lang->ban_bannedby}</strong></span></td>
  51. <td class="tcat"><span class="smalltext"><strong>{$lang->start_date}</strong></span></td>
  52. <td class="tcat"><span class="smalltext"><strong>{$lang->end_date}</strong></span></td>
  53. </tr>
  54. {$bannedtablerows}
  55. </table>
  56. {$footer}
  57. </body>
  58. </html>';
  59.  
  60. $template=str_replace("\'", "'", addslashes($template));
  61.  
  62. add_breadcrumb($pages['name']);
  63.  
  64. eval("\$page=\"".$template."\";");
  65.  
  66. output_page($page);
  67.  
  68. ?>
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi (1 - 5)
Hoku
post
Post #2





Grupa: Zarejestrowani
Postów: 49
Pomógł: 2
Dołączył: 6.07.2010

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


  1. eval("\$page=\"".$template."\";");
(IMG:style_emoticons/default/blinksmiley.gif)
po kiego eval?na dodatek pakujesz do niego string który nie jest poprawnym kodem php eval tak na moje oko skoro to eval sie pruje z błędem. wiec tam błąd to da się zrobić inaczej
wywal to w cholere! ktoś kiedyś napisał smarty
to samo z globalami to zło

Ten post edytował Hoku 13.01.2011, 00:14:45
Go to the top of the page
+Quote Post
Inaro
post
Post #3





Grupa: Zarejestrowani
Postów: 132
Pomógł: 0
Dołączył: 4.03.2010

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


Usunąć eval z tamtej linijki? Podam także kod pluginu http://pastebin.pl/34292

przypominam błąd:
Kod
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/seriousr/public_html/inc/plugins/pagemanager.php(798) : eval()'d code on line 23


Ten post edytował Inaro 14.01.2011, 11:09:08
Go to the top of the page
+Quote Post
CuteOne
post
Post #4





Grupa: Zarejestrowani
Postów: 2 958
Pomógł: 574
Dołączył: 23.09.2008
Skąd: wiesz, że tu jestem?

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


wejdź do pliku pagemanager.php i usuń eval..
Go to the top of the page
+Quote Post
Inaro
post
Post #5





Grupa: Zarejestrowani
Postów: 132
Pomógł: 0
Dołączył: 4.03.2010

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


Ale usunąć samo eval i zostawić ("\$page=\"".$template."\";"); czy usunąć całą linijkę?


Edit: oraz chyba trzeba usunąć z pagemanager.php i tego kodu co podałem wyżej?
Go to the top of the page
+Quote Post
CuteOne
post
Post #6





Grupa: Zarejestrowani
Postów: 2 958
Pomógł: 574
Dołączył: 23.09.2008
Skąd: wiesz, że tu jestem?

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


tak
Go to the top of the page
+Quote Post

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: 22.08.2025 - 19:53