Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [inne][PHP]PHP fusion - błąd
VeParadox
post
Post #1





Grupa: Zarejestrowani
Postów: 154
Pomógł: 0
Dołączył: 29.08.2012

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


Witajcie.
Odpaliłem dziś ten skrypt i chciałem sprawdzic czy wszystko jest ok. Niestety przy próbie wrzucenia dodatkowego panelu wyskakuje mi error
Parse error: syntax error, unexpected T_STRING in /home/odrowaz/public_html/themes/templates/panels.php(74) : eval()'d code on line 3
Oczywiście czytać umiem i wiem w jakim pliku jest problem, tylko nie bardzo wiem co tam jest nie halo... jak go naprawic? Pomożecie?
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
nospor
post
Post #2





Grupa: Moderatorzy
Postów: 36 559
Pomógł: 6315
Dołączył: 27.12.2004




Jasne ze pomozemy, przeciez wszyscy wiemy jak wyglada kod w tamtym miejscu.
Odpowiedź jest banalnie prosta: masz zrobić to i to, na 100% pomoże (IMG:style_emoticons/default/smile.gif)
Go to the top of the page
+Quote Post
VeParadox
post
Post #3





Grupa: Zarejestrowani
Postów: 154
Pomógł: 0
Dołączył: 29.08.2012

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


Cytat(nospor @ 17.07.2015, 09:22:58 ) *
Jasne ze pomozemy, przeciez wszyscy wiemy jak wyglada kod w tamtym miejscu.
Odpowiedź jest banalnie prosta: masz zrobić to i to, na 100% pomoże (IMG:style_emoticons/default/smile.gif)


No ta, sory, juz daje kodzik (IMG:style_emoticons/default/smile.gif)
  1. <?php
  2. /*-------------------------------------------------------+
  3. | PHP-Fusion Content Management System
  4. | Copyright (C) 2002 - 2011 Nick Jones
  5. | <a href="http://www.php-fusion.co.uk/" target="_blank">http://www.php-fusion.co.uk/</a>
  6. +--------------------------------------------------------+
  7. | Filename: panels.php
  8. | Author: PHP-Fusion Development Team
  9. +--------------------------------------------------------+
  10. | This program is released as free software under the
  11. | Affero GPL license. You can redistribute it and/or
  12. | modify it under the terms of this license which you
  13. | can read by viewing the included agpl.txt or online
  14. | at www.gnu.org/licenses/agpl.html. Removal of this
  15. | copyright header is strictly prohibited without
  16. | written permission from the original author(s).
  17. +--------------------------------------------------------*/
  18. if (!defined("IN_FUSION")) { die("Access Denied"); }
  19.  
  20. // Add admin message
  21. $ad_mess = array(); $admin_mess ='';
  22. if (iADMIN && !defined("ADMIN_PANEL")) {
  23. $admin_mess .= "<a id='content' name='content'></a>\n";
  24. if (iSUPERADMIN && file_exists(BASEDIR."setup.php")) $ad_mess[] = $locale['global_198'];
  25. if ($settings['maintenance']) $ad_mess[] = $locale['global_190'];
  26. if (!$userdata['user_admin_password']) $ad_mess[] = $locale['global_199'];
  27. if (!empty($ad_mess)) {
  28. $admin_mess .= "<div class='admin-message'>";
  29. foreach ($ad_mess as $message) {
  30. $admin_mess .= $message."<br />\n";
  31. }
  32. $admin_mess .= "</div>\n";
  33. }
  34. }
  35.  
  36. $admin_mess .= "<noscript><div class='noscript-message admin-message'>".$locale['global_303']."</div>\n</noscript>\n<!--error_handler-->\n";
  37.  
  38.  
  39. // Declare panels side
  40. $p_name = array(
  41. array('name' => 'LEFT', 'side' => 'left'),
  42. array('name' => 'U_CENTER', 'side' => 'upper'),
  43. array('name' => 'L_CENTER', 'side' => 'lower'),
  44. array('name' => 'RIGHT', 'side' => 'right')
  45. );
  46.  
  47. // Get panels data to array
  48. $panels_cache = array();
  49. $p_result = dbquery("SELECT panel_name, panel_filename, panel_content, panel_side, panel_type, panel_access, panel_display, panel_url_list, panel_restriction FROM ".DB_PANELS." WHERE panel_status='1' ORDER BY panel_side, panel_order");
  50. while ($panel_data = dbarray($p_result)) {
  51. if (checkgroup($panel_data['panel_access'])) { $panels_cache[$panel_data['panel_side']][] = $panel_data; }
  52. }
  53.  
  54. $url_arr = array();
  55. foreach ($p_name as $p_key => $p_side) {
  56. if (isset($panels_cache[$p_key + 1]) || defined("ADMIN_PANEL")) {
  57. ob_start();
  58. if (!defined("ADMIN_PANEL")) {
  59. if (check_panel_status($p_side['side'])) {
  60. foreach ($panels_cache[$p_key + 1] as $p_data) {
  61. $url_arr = explode("\r\n", $p_data['panel_url_list']);
  62. if ($p_data['panel_url_list'] == ""
  63. || ($p_data['panel_restriction'] == 1 && (!in_array(TRUE_PHP_SELF.(FUSION_QUERY ? "?".FUSION_QUERY : ""), $url_arr) && !in_array(TRUE_PHP_SELF, $url_arr)))
  64. || ($p_data['panel_restriction'] == 0 && (in_array(TRUE_PHP_SELF.(FUSION_QUERY ? "?".FUSION_QUERY : ""), $url_arr) || in_array(TRUE_PHP_SELF, $url_arr))))
  65. {
  66. if (($p_data['panel_side'] != 2 && $p_data['panel_side'] != 3)
  67. || $p_data['panel_display'] == 1 || $settings['opening_page'] == START_PAGE)
  68. {
  69. if ($p_data['panel_type'] == "file") {
  70. if (file_exists(INFUSIONS.$p_data['panel_filename']."/".$p_data['panel_filename'].".php")) {
  71. include INFUSIONS.$p_data['panel_filename']."/".$p_data['panel_filename'].".php";
  72. }
  73. } else {
  74. eval(stripslashes($p_data['panel_content']));
  75. }
  76. }
  77. }
  78. }
  79. unset($p_data);
  80. }
  81. } else if ($p_key == 0) {
  82. require_once ADMIN."navigation.php";
  83. }
  84. define($p_side['name'], ($p_side['name'] === 'U_CENTER' ? $admin_mess : '').ob_get_contents());
  85. ob_end_clean();
  86. } else {
  87. define($p_side['name'], ($p_side['name'] === 'U_CENTER' ? $admin_mess : ''));
  88. }
  89. }
  90. unset($panels_cache);
  91.  
  92. if (defined("ADMIN_PANEL") || LEFT && !RIGHT) {
  93. $main_style = "side-left";
  94. } elseif (LEFT && RIGHT) {
  95. $main_style = "side-both";
  96. } elseif (!LEFT && RIGHT) {
  97. $main_style = "side-right";
  98. } elseif (!LEFT && !RIGHT) {
  99. $main_style = "";
  100. }
  101. ?>
Go to the top of the page
+Quote Post

Posty w temacie


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: 11.10.2025 - 09:55