Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: [PHP]PHP-Fusion niedziałający include
Forum PHP.pl > Forum > Gotowe rozwiązania > Systemy portalowe i CMS'y
Ziom73
Mam problem, otóż na php-fusion nikt mi nie odpowiada, więc chciałem się tu spytać. Chciałem Przerobić ten skrypt:
  1. <?php
  2. /*-------------------------------------------------------+
  3. | PHP-Fusion Content Management System
  4. | Copyright ˆ 2002 - 2008 Nick Jones
  5. | <a href=\"http://www.php-fusion.co.uk/\" target=\"_blank\">http://www.php-fusion.co.uk/</a>
  6. +--------------------------------------------------------+
  7. | Filename: user_rang_include.php
  8. | Author: Qwertz
  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.  
  21. if ($profile_method == "input") {
  22. if (iADMIN && checkrights("C")){
  23.    echo "<tr>\n";
  24.    echo "<td class='tbl' valign='top'>[Admin] Rang: </td>\n";
  25.    echo "<td class='tbl'><input type='text' name='user_rang' value='".(isset($user_data['user_rang']) ? $user_data['user_rang'] : "")."' maxlength='75' class='textbox' style='width:295px;' /></td>\n";
  26.    echo "</tr>\n";
  27.   } else {
  28.       echo "";
  29.   }
  30. } elseif ($profile_method == "display") {
  31.    if ($user_data['user_rang']) {
  32.            echo "<tr>\n";
  33.        echo "<td width='1%' class='tbl1' style='white-space:nowrap'>Rang special:</td>\n";
  34.        echo "<td align='right' class='tbl1'>";
  35.        echo "<img src='".$user_data['user_rang']."' alt='".$user_data['user_rang']."' />\n";    
  36.        echo "</td>\n</tr>\n";
  37.    }
  38. } elseif ($profile_method == "validate_insert") {
  39.    $db_fields .= ", user_rang";
  40.    $db_values .= ", '".(isset($_POST['user_rang']) ? stripinput(trim($_POST['user_rang'])) : "")."'";
  41.  
  42. } elseif ($profile_method == "validate_update") {
  43.    $db_values .= ", user_rang='".(isset($_POST['user_rang']) ? stripinput(trim($_POST['user_rang'])) : "")."'";}
  44. ?>


Na wysuwane menu:, jednak jak ja próbuje to nie działa ;/ :
  1. <?php
  2. /*-------------------------------------------------------+
  3. | PHP-Fusion Content Management System
  4. | Copyright Š 2002 - 2008 Nick Jones
  5. | <a href=\"http://www.php-fusion.co.uk/\" target=\"_blank\">http://www.php-fusion.co.uk/</a>
  6. +--------------------------------------------------------+
  7. | Filename: user_rang_include.php
  8. | Author:
  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. if ($profile_method == "input") {
  21. if (iADMIN && checkrights("C")){
  22.    $user_rang = (isset($user_data['user_rang']) ? $user_data['user_rang'] : 0);
  23.    echo "<tr>\n";
  24.    echo "<td class='tbl'>Ranga :</td>\n";
  25.    echo "<td class='tbl'>\n<select name='user_rang' class='textbox'>\n";
  26.    echo "<option value='0'".($user_rang=="0"?" selected='selected'":"")."></option>\n";
  27.    echo "<option value='1'".($user_rang=="1"?" selected='selected'":"").">Php.png</option>\n";
  28.    echo "<option value='2'".($user_rang=="2"?" selected='selected'":"").">vip.png</option>\n";
  29.    echo "<option value='3'".($user_rang=="3"?" selected='selected'":"").">girl.png</option>\n";
  30.    echo "<option value='4'".($user_rang=="4"?" selected='selected'":"").">spammer.png</option>\n";
  31.    echo "<option value='5'".($user_rang=="5"?" selected='selected'":"").">n00b.png</option>\n";
  32.    echo "<option value='6'".($user_rang=="6"?" selected='selected'":"").">pomocnik.png</option>\n";
  33.    echo "<option value='7'".($user_rang=="7"?" selected='selected'":"").">haker.png</option>\n";
  34.    echo "</select>\n</td>\n";
  35.    echo "</tr>\n";
  36.    }
  37. } elseif ($profile_method == "display") {
  38.    if (isset($user_data['user_rang']) && $user_data['user_rang'] != "0") {
  39.        echo "<tr>\n";
  40.        echo "<td width='1%' class='tbl1' style='white-space:nowrap'>Ranga :</td>\n";
  41.        echo "<td align='right' class='tbl1'>".($user_data['user_rang']=="1" ? Php.png : vip.png : girl.png : spammer.png : n00b.png : pomocnik.png : haker.png)."</td>\n";
  42.        echo "</tr>\n";
  43.    }
  44. } elseif ($profile_method == "validate_insert" || $profile_method == "validate_update") {
  45.    $user_rang = (isset($_POST['user_rang']) && isNum($_POST['user_rang']) ? $_POST['user_rang'] : 0);
  46.    if ($profile_method == "validate_insert") {
  47.        $db_fields .= ", user_rang";
  48.        $db_values .= ", '".$user_rang."'";
  49.    } else {
  50.        $db_values .= ", user_rang='".$user_rang."'";
  51.    }
  52. }
  53. ?>



Za pomoc z góry dziękuję !
pyro
Jeszcze napisz, że nie działa Ci, czyli co się dzieje

A co mi się pierwsze rzuciło w oczy:
Cytat(Ziom73 @ 3.08.2009, 22:17:31 ) *
  1. <?php
  2. echo "<td align='right' class='tbl1'>".($user_data['user_rang']=="1" ? Php.png : vip.png : girl.png : spammer.png : n00b.png : pomocnik.png : haker.png)."</td>\n";
  3. ?>
Ziom73
Nie działa, czyli strona ładuję się tylko do tego momentu, aż do tego skryptu.
pyro
Wskazałem CI pierwszy błąd, popraw i zobacz. Następnym razem załącz także treść błędu.
Ociu
Przenoszę.
Ziom73
Cytat(pyro @ 4.08.2009, 09:05:31 ) *
Wskazałem CI pierwszy błąd, popraw i zobacz. Następnym razem załącz także treść błędu.



Dasz jakąś podpowiedź jak to poprawić, bo ja w tych kodach to nie za bardzo umiem ;]
pyro
Podpowiedź? hmm... wskazałem Ci konkretny błąd, a ten błąd w nim polega na tym, że nie ma czegoś takiego jak Ty w nim zrobiłeś tongue.gif

Cytat
Dasz jakąś podpowiedź jak to poprawić, bo ja w tych kodach to nie za bardzo umiem ;]


Cytat
Chciałem Przerobić ten skrypt


No cóż..
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.