pragmaMx Support Forum

Archive => veraltete bzw. unsupportete Systeme und Module => Alt Archive => PHPNuke 5.2-6.0 & VKP 5.5 => Thema gestartet von: Ronwaste am 17 Januar 2003, 14:10:59

Titel: Book_List Modul gibt ständig fehler aus...
Beitrag von: Ronwaste am 17 Januar 2003, 14:10:59
Hallo Leute ich habe mal ne dringende Bitte an EUch.
Ich habe für meine Seite www.psihorizont.de das Book_List script in benutzung leider kommt da immer die fehlermeldung cannot add header information blab blub in html/admin/modules/book.php und immer eine andere Zeile... ich meine er macht  zwar alles was er soll aber es bervt nach einer zeit... die zeilen die betroffen sind in denen steht folgendes...
 Header("Location: admin.php?op=book");

könnte mri einer helfen?? ich poste mal die komplette book.php

 <?php

/************************************************************************/
/* PHP-NUKE: Web Portal System                                          */
/* ===========================                                          */
/*                                                                      */
/* Copyright (c) 2001 by Francisco Burzi (fbc@mandrakesoft.com)         */
/* http://phpnuke.org                                                   */
/*                                                                      */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License.       */
/************************************************************************/

if (!eregi("admin.php", $PHP_SELF)) { die ("Access Denied"); }

$module_name = "Book_List";

if (isset($currentlang)) {
        include("modules/$module_name/language/lang-$currentlang.php");
        $language = $currentlang;
} else {
    include("modules/$module_name/language/lang-$language.php");
}

$hlpfile = "manual/sections.html";
$result = sql_query("select radminsuper from $prefix"._authors." where aid='$aid'", $dbi);
list($radminsuper) = sql_fetch_row($result, $dbi);
if ($radminsuper==1) {

function book() {
    global $hlpfile, $prefix, $dbi, $language, $multilingual, $bgcolor2;
    include("header.php");
    GraphicAdmin($hlpfile);
    title(""._BOOKMANAGER."");
    OpenTable();
    echo "<table border=\"0\" width=\"100%\"><tr>"
."<td bgcolor=\"$bgcolor2\"><b>"._NAME."</b></td><td align=\"center\" bgcolor=\"$bgcolor2\"><b>"._AUTHOR."</b></td><td align=\"center\" bgcolor=\"$bgcolor2\"><b>"._PUBLISHER."</b></td><td align=\"center\" bgcolor=\"$bgcolor2\"><b>"._YEAR."</b></td></tr>";
    $result = sql_query("select id, catid, name, author, publisher, year, edition, isbn, url, review, img, hits from $prefix"._books." order by name", $dbi);
    while(list($id, $catid, $name, $author, $publisher, $year, $edition, $isbn, $url, $review, $img, $hits) = sql_fetch_row($result, $dbi)) {
      echo "<tr><td><a href=\"admin.php?op=book_edit&id=$id\">$name</a></td><td align=\"center\">$author</td><td align=\"center\">$publisher</td><td align=\"center\">$year</td></tr>";
    }
    echo "</table>";
    CloseTable();
    echo "<br>";
    OpenTable();
    echo "<center><b>"._ADDNEWBOOK."</b></center><br><br>"
."<form action=\"admin.php\" method=\"post\">";
echo "<b>"._TITLE.":</b><br>"
."<input type=\"text\" name=\"name\" size=\"50\"><br><br>"
."<b>"._AUTHOR.":</b><br>"
."<input type=\"text\" name=\"author\" size=\"50\"><br><br>"
        ."<b>"._PUBLISHER.":</b><br>"
."<input type=\"text\" name=\"publisher\" size=\"50\"><br><br>"
        ."<b>"._YEAR.":</b><br>"
."<input type=\"text\" name=\"year\" size=\"50\"><br><br>"
        ."<b>"._EDITION.":</b><br>"
."<input type=\"text\" name=\"edition\" size=\"50\"><br><br>"
        ."<b>"._ISBN.":</b><br>"
        ."<input type=\"text\" name=\"isbn\" size=\"50\"><br><br>"
        ."<b>"._URL.":</b><br>"
        ."<input type=\"text\" name=\"url\" value=\"http://\" size=\"50\"><br><br>"
      ."<b>"._REVIEW."</b><br>"
        ."<textarea class=textbox wrap=\"virtual\" cols=\"150\" rows=\"50\" name=\"review\"></textarea><p>"
        ."<b>"._IMAGE."</b><br>"
        ."<input type=\"text\" name=\"img\" size=\"50\"><br>"
        .""._IMAGELOCATION."<br><br>";
    $result2 = sql_query("select cid, title, parentid from ".$prefix."_books_categories order by title DESC", $dbi);
    echo "<b>"._CATEGORY.":  </b>"
        ."<select name=\"catid\">";
    while(list($cid2,$title2,$parentid2) = sql_fetch_row($result2, $dbi)) {
    if ($parentid2>0) $title2 = getparent($parentid2,$title2);
        echo "<option name=\"catid\" value=\"$cid2\">$title2</option>";
}
echo "</select><p>";          
        echo "<input type=\"hidden\" name=\"op\" value=\"book_save\">"
            ."<input type=\"submit\" value=\""._ADDNEWBOOK."\"></form>";
    CloseTable();
    echo "<br>";
    categories();
 include("footer.php");
}

function book_edit($id) {
    global $hlpfile, $prefix, $dbi, $language, $multilingual, $bgcolor2;
    include("header.php");
    GraphicAdmin($hlpfile);
    title(""._BOOKMANAGER."");
    $result = sql_query("select id, catid, name, author, publisher, year, edition, isbn, url, review, img, hits from $prefix"._books." WHERE id='$id'", $dbi);
    list($id, $catid, $name, $author, $publisher, $year, $edition, $isbn, $url, $review, $img, $hits) = sql_fetch_row($result, $dbi);
    OpenTable();
    echo "<center><b>"._EDITBOOK."</b></center><br><br>"
."<form action=\"admin.php\" method=\"post\">";
echo "<b>"._TITLE.":</b><br>"
."<input type=\"text\" name=\"name\" value=\"$name\" size=\"50\"><br><br>"
."<b>"._AUTHOR.":</b><br>"
."<input type=\"text\" name=\"author\" value=\"$author\" size=\"50\"><br><br>"
        ."<b>"._PUBLISHER.":</b><br>"
."<input type=\"text\" name=\"publisher\" value=\"$publisher\" size=\"50\"><br><br>"
        ."<b>"._YEAR.":</b><br>"
."<input type=\"text\" name=\"year\" value=\"$year\" size=\"50\"><br><br>"
        ."<b>"._EDITION.":</b><br>"
."<input type=\"text\" name=\"edition\" value=\"$edition\" size=\"50\"><br><br>"
        ."<b>"._ISBN.":</b><br>"
."<input type=\"text\" name=\"isbn\" value=\"$isbn\" size=\"50\"><br><br>"
        ."<b>"._URL.":</b><br>"
        ."<input type=\"text\" name=\"url\" value=\"$url\" size=\"50\"><br><br>"
      ."<b>"._REVIEW."</b><br>"
        ."<textarea class=textbox wrap=\"virtual\" cols=\"150\" rows=\"50\"  name=\"review\">$review</textarea><br><br>"
        ."<b>"._IMAGE."</b><br>"
        ."<input type=\"text\" name=\"img\" size=\"50\"><br>"
        .""._IMAGELOCATION."<br><br>";
    $result2 = sql_query("select cid, title, parentid from ".$prefix."_books_categories order by title DESC", $dbi);
    echo "<b>"._CATEGORY.":  </b>"
        ."<select name=\"catid\">";
    while(list($cid2,$title2,$parentid2) = sql_fetch_row($result2, $dbi)) {
    if ($parentid2>0) $title2 = getparent($parentid2,$title2);
        echo "<option name=\"catid\" value=\"$cid2\">$title2</option>";
}
echo "</select><p>"      
        ."<input type=\"hidden\" name=\"id\" value=\"$id\">"
."<input type=\"hidden\" name=\"op\" value=\"book_save_edit\">"
."<input type=\"submit\" value=\""._SAVECHANGES."\"> <a href=\"admin.php?op=book_delete&id=$id\">"._DELETE."</a>"
."</form>";
    CloseTable();
    echo "<br>";
    include("footer.php");
}

function book_save($id, $catid, $name, $author, $publisher, $year, $edition, $isbn, $url, $review, $img) {
    global $prefix, $dbi;
    sql_query("insert into ".$prefix."_books values(NULL, '$catid', '$name',  '$author', '$publisher', '$year', '$edition', '$isbn', '$url', '$review', '$img', '', '', '', '')", $dbi);
    Header("Location: admin.php?op=book");
}

function book_save_edit($id, $catid, $name, $author, $publisher, $year, $edition, $isbn, $url, $review, $img) {
    global $prefix, $dbi;
    sql_query("update ".$prefix."_books set catid='$catid', name='$name', author='$author', publisher='$publisher', year='$year', edition='$edition', isbn='$isbn', url='$url', review='$review' where id='$id'", $dbi);
    Header("Location: admin.php?op=book");
}

function book_delete($id, $ok=0) {
    global $prefix, $dbi;
    if ($ok==1) {
        sql_query("delete from $prefix"._books." where id='$id'", $dbi);
Header("Location: admin.php?op=book");
    } else {
        include("header.php");
        GraphicAdmin($hlpfile);
title(""._BOOKMANAGER."");
$result = sql_query("select name from $prefix"._books." where id='$id'", $dbi);
list($name) = sql_fetch_row($result, $dbi);
OpenTable();
echo "<center><b>"._DELBOOK.": $name</b><br><br>"
   .""._DELBOOKWARNING."<br><br>"
   ."[ <a href=\"admin.php?op=book\">"._NO."</a> | <a href=\"admin.php?op=book_delete&id=$id&ok=1\">"._YES."</a> ]</center>";
CloseTable();
        include("footer.php");
    }
}

function categories() {
    global $hlpfile, $prefix, $dbi, $language, $multilingual, $bgcolor2;
    OpenTable();
    echo "<center><font class=\"title\"><b>"._BOOKSCAT."</b></font></center><br>";
    echo "<table border=\"0\" cellspacing=\"15\" cellpadding=\"5\" align=\"center\"><tr>";
    $result = sql_query("select cid, title from ".$prefix."_books_categories where parentid=0 order by title", $dbi);
           while(list($cid, $title, $cdescription) = sql_fetch_row($result, $dbi)) {
            echo "<td valign=\"top\"><font class=\"option\">
              <a href=\"admin.php?op=book_category_edit&cid=$cid\"><b>$title</b></a></font>";
              if ($cdescription) {
                echo "<br> <font class=\"content\">$cdescription</font>";
              } else {
              echo "";
              }
$result2 = sql_query("select cid, title from ".$prefix."_books_categories where parentid=$cid order by title limit 0,3", $dbi);
while(list($cid, $stitle) = sql_fetch_row($result2, $dbi)) {
       echo "<br>  <font class=\"content\"><a href=\"admin.php?op=book_category_edit&cid=$cid\">$stitle</a></font>";
            }
            }
echo "</td></tr></table>";
    echo "<center><b>"._ADDNEWCATEGORY."</b></center><br><br>"
."<form action=\"admin.php\" method=\"post\">";
echo "<b>"._TITLE.":</b><br>"
."<input type=\"text\" name=\"title\" size=\"50\"><br><br>"
."<b>"._DESC.":</b><br>"
      ."<input type=\"text\" name=\"cdescription\" size=\"50\"><br><br>";
    $result2 = sql_query("select cid, title, parentid from ".$prefix."_books_categories where parentid='0' order by title DESC", $dbi);
    echo "<b>"._CATEGORYPARENT.":  </b>"
        ."<select name=\"parentid\">";
        echo "<option name=\"catid\" value=\"0\">"._NOPARENT."</option>";
    while(list($cid2,$title2,$parentid2) = sql_fetch_row($result2, $dbi)) {
        echo "<option name=\"catid\" value=\"$cid2\">$title2</option>";
}
echo "</select><br>"        
        .""._CATDISCLAIMER."<p>";
      echo "<input type=\"hidden\" name=\"op\" value=\"book_category_save\">"
 ."<input type=\"submit\" value=\""._ADDNEWCAT."\">";

    CloseTable();
}

function book_category_save($title, $cdescription, $parentid) {
    global $prefix, $dbi;
    sql_query("insert into $prefix"._books_categories." values(NULL, '$title', '$cdescription',  '$parentid')", $dbi);
    Header("Location: admin.php?op=book");
}
       
function book_category_edit($cid) {
    global $hlpfile, $prefix, $dbi, $language, $multilingual, $bgcolor2;
    include("header.php");
    GraphicAdmin($hlpfile);
    title(""._BOOKMANAGER."");
    $result = sql_query("select cid, title, cdescription, parentid from ".$prefix."_books_categories where cid='$cid'", $dbi);
    list($cid, $title, $cdescription, $parentid) = sql_fetch_row($result, $dbi);
    echo "<center><b>"._EDITCATEGORY."</b></center><br><br>"
."<form action=\"admin.php\" method=\"post\">";
echo "<b>"._TITLE.":</b><br>"
."<input type=\"text\" name=\"title\" value=\"$title\" size=\"50\"><br><br>"
."<b>"._DESC.":</b><br>"
      ."<input type=\"text\" name=\"cdescription\" value=\"$cdescription\" size=\"50\"><br><br>";
    if ($parentid1 !== "0") {
    $result2 = sql_query("select cid, title, parentid from ".$prefix."_books_categories where parentid='0' order by title DESC", $dbi);
    echo "<b>"._CATEGORYPARENT.":  </b>"
        ."<select name=\"parentid\">";
        echo "<option name=\"parentid\" value=\"0\">"._NOPARENT."</option>";
    while(list($cid2,$title2,$parentid2) = sql_fetch_row($result2, $dbi)) {
        echo "<option name=\"parentid\" value=\"$cid2\">$title2</option>";
}
echo "</select><br>"        
        .""._CATDISCLAIMER."<p>";
    } else {
        echo "<input type=\"hidden\" name=\"parentid\" value=\"0\">";
    }
        echo "<input type=\"hidden\" name=\"cid\" value=\"$cid\">"
."<input type=\"hidden\" name=\"op\" value=\"book_category_save_edit\">"
."<input type=\"submit\" value=\""._SAVECHANGES."\"> [ <a href=\"admin.php?op=book_category_delete&cid=$cid&ok=0\">"._DELETE."</a> ]"
."</form>";
       
       
    CloseTable();
    echo "<br>";
    include("footer.php");
}

function book_category_save_edit($cid, $title, $cdescription, $parentid) {
    global $prefix, $dbi;
    sql_query("update $prefix"._books_categories." set title='$title', cdescription='$cdescription', parentid='$parentid' where cid='$cid'", $dbi);
    Header("Location: admin.php?op=book");
}

function book_category_delete($cid, $ok) {
    global $prefix, $dbi;
    if ($ok==1) {
        sql_query("delete from $prefix"._books_categories." where parentid='$cid'", $dbi);
        sql_query("delete from $prefix"._books_categories." where cid='$cid'", $dbi);
       
Header("Location: admin.php?op=book");
    } else {
        include("header.php");
        GraphicAdmin($hlpfile);
title(""._BOOKMANAGER."");
$result = sql_query("select title from $prefix"._books_categories." where cid='$cid'", $dbi);
list($title) = sql_fetch_row($result, $dbi);
OpenTable();
echo "<center><b>"._DELCATBOOK.": $title</b><br><br>"
   .""._DELBOOKCATWARNING."<br><br>"
   ."[ <a href=\"admin.php?op=book\">"._NO."</a> | <a href=\"admin.php?op=book_category_delete&cid=$cid&ok=1\">"._YES."</a> ]</center>";
CloseTable();
        include("footer.php");
    }
}

function getparent($parentid,$title) {
    global $prefix, $dbi;
    $result = sql_query("select cid, title, parentid from ".$prefix."_books_categories where cid=$parentid", $dbi);
    while(list($cid, $ptitle, $pparentid) = sql_fetch_row($result, $dbi)) {
      if ($ptitle!="") $title=$ptitle."/".$title;
        if ($pparentid!=0) {
          $title=getparent($pparentid,$title);
      }
   
    return $title;
    }
}

switch ($op) {

    case "book":
    book();
    break;

    case "book_edit":
    book_edit($id);
    break;

    case "book_delete":
    book_delete($id, $ok);
    break;

    case "book_save":
    book_save($id, $catid, $name, $author, $publisher, $year, $edition, $isbn, $url, $review, $img);
    break;

    case "book_save_edit":
    book_save_edit($id, $catid, $name, $author, $publisher, $year, $edition, $isbn, $url, $review, $img);
    break;

    case "book_category_save":
    book_category_save($title, $cdescription,$parentid);
    break;
   
    case "book_category_edit":
    book_category_edit($cid);
    break;
   
    case "book_category_delete":
    book_category_delete($cid, $ok);
    break;
   
    case "book_category_save_edit":
    book_category_save_edit($cid, $title, $cdescription, $parentid);
    break;

}

} else {
    echo "Access Denied";
}

?>
Titel: Re: Book_List Modul gibt ständig fehler aus...
Beitrag von: jubilee am 17 Januar 2003, 14:36:18
Hmmmm....
Könntest Du als Info bitte einmal etwas
über die verwendete Software posten:
Welches Nuke verwendest Du ?
MfG
jubilee
Titel: Re: Book_List Modul gibt ständig fehler aus...
Beitrag von: Ronwaste am 17 Januar 2003, 17:20:24
ich benutze nukeware platium090.. aber ich benutze euren messanger eurer krasses forum und und und :-) ps ich habe überall euer copyright brav drinnen gelassen :-)