<% if($amode=="ja"): include ("../../scripts/kb/anmelden.html"); $thisadmin = mysql_fetch_array($result); endif; %> zurück <% ######################################################## # Knowledgebase 1000 (c) Thomas.Tausend@2000-onLine.de # ######################################################## require("../../scripts/dbdetails.php"); $dbcode = mysql_connect("localhost",$user,$pw); if(!$sort){$sort="cID";} if(!$dbcode): echo "Kein Kontakt zur Datenbank"; endif; # Als erstes listen wir 'mal die vorhandenen Topics mit Level X if(!$level){$level=0;} $query = "SELECT * FROM topics WHERE ID = $level"; $result = mysql_db_query($db,$query,$dbcode); $headrow = mysql_fetch_array($result); # so geht's # $query = "select ID, title, admin, subof, name, totopic, count(content.cID) as anzahl from (topics LEFT JOIN content ON topics.ID = content.totopic) LEFT JOIN admins ON topics.admin=aID WHERE topics.subof=$level AND topics.free=0 GROUP BY topics.ID ORDER BY topics.ID"; $query = "select ID, title, subof, totopic, admin, count(content.cID) as anzahl from (topics LEFT JOIN content ON topics.ID = content.totopic) WHERE topics.subof=$level AND topics.free=0 GROUP BY topics.ID ORDER BY topics.ID"; # $query = "select topics.ID, topics.title, topics.subof, totopic, count(content.cID) as anzahl, count(topicsSUB.ID) as subtopics FROM (topics LEFT JOIN content ON topics.ID = content.totopic) LEFT JOIN topics as topicsSUB ON topics.ID=topicsSUB.subof WHERE topics.subof=$level GROUP BY topics.ID ORDER BY topics.ID"; $result = mysql_db_query($db,$query,$dbcode); if(!$result): echo "Konnte Abfrage nicht ausführen!"; else: $num = mysql_num_rows($result); endif; %> <% if ($amode=="ja"): $aID=$thisadmin["aID"]; $master=$thisadmin["master"]; %>
<% echo "Admin: " . $thisadmin["name"]; %>
<% endif; if ($num>0 || $amode=="ja"): %> <% if($amode=="ja"): %> <% else: %> <%endif;%> <% else: %> <% endif; %> <% while($row = mysql_fetch_array($result)): $query="SELECT ID FROM topics WHERE subof=" . $row["ID"]; $saresult = mysql_db_query("$db",$query,$dbcode); if($saresult): $subanz = mysql_numrows($saresult); endif; %> <% endwhile; %>
Suchen:
    Admins verwalten
 
    Topics verwalten
 
   abmelden
 
       Titel Anz.
<% if ($level>0): %> " target="_self"> <% endif;%> <% if ($level>0): %> " target="_self"> <% endif; echo $headrow["title"]; %>
<% if ($subanz>0): %> <% endif; %> <% if (($row["anzahl"]>0 AND $amode!="ja")OR ($amode=="ja" AND ($master==1 OR $aID==$row["admin"]))): %> <% echo $row["title"]; %> <% else: %> <% echo $row["title"]; %> <% endif; %> <% echo $row["anzahl"]; %>
 
Nicht hier klicken, sondern oben bei den Überschriften! = Ebene tiefer
Nicht hier klicken, sondern oben bei den Überschriften! = Ebene höher