<% if($amode=="ja"): include ("../../scripts/kb/anmelden.html"); $thisadmin = mysql_fetch_array($result); endif; %> KNOWLEDGE BASE <% ######################################################## # Knowledgebase 1000 (c) Thomas.Tausend@2000-onLine.de # ######################################################## require("../../scripts/dbdetails.php"); $dbcode = mysql_connect($host,$user,$pw); if(!$sort){$sort="cID";} if(!$dbcode): echo "Kein Kontakt zur Datenbank"; endif; %>

<% ### include("header.htm"); # 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); $query = "select ID, title, admin, subof, name, totopic, count(content.cID) as anzahl, date_format(max(content.updated), '%d.%m.%Y %H:%i:%s') as letzter 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"; $result = mysql_db_query($db,$query,$dbcode); if(!$result): echo "Konnte Abfrage nicht ausführen!"; else: $num = mysql_num_rows($result); endif; if($suchtext): $query = "select *, date_format(updated, '%d.%m.%Y') as datum from content WHERE (text like '%$suchtext%' OR headline like '%$suchtext%') ORDER BY $sort $direction"; elseif($alter): $query = "select *, (to_days(now())-to_days(updated)) as tanz, date_format(updated, '%d.%m.%Y') as datum from content where (to_days(now())-to_days(updated)) <$alter order by tanz"; else: $query = "select *, date_format(updated, '%d.%m.%Y') as datum from content WHERE totopic = $level ORDER BY $sort $direction"; endif; $result = mysql_db_query($db,$query,$dbcode); $canzahl= mysql_numrows($result); if ($thisadmin["aID"]!=$headrow["admin"] AND $thisadmin["master"]!=1): $amode="nein"; endif; if($canzahl>0 OR $amode=="ja"): %> <% if($alter): %> <% endif; %> <% while($row = mysql_fetch_array($result)): %> <% endwhile; if ($amode=="ja" and !$suchtext): %><% endif; else: if($suchtext): %>

Leider habe ich keine Beiträge zum Stichwort <% echo $suchtext; %> gefunden!

<% endif; endif; %>

Hier die <% echo $canzahl; %> neuen Einträge der letzten <% echo $alter; %> Tage:

Tage

<% echo $headrow["title"]; %>

   
<% if($sort=="headline"): if ($direction=="DESC"): %> <% else: %> <% endif; endif; %> ">
Überschrift
<% if($sort=="author"): if ($direction=="DESC"): %> <% else: %> <% endif; endif; %> ">
Autor
<% if($sort=="updated"): if ($direction=="DESC"): %> <% else: %> <% endif; endif; %> ">
Datum
<% if ($amode=="ja"): $level=$row["totopic"]; echo ""; endif; %> "; echo $row["headline"]; %> <% echo $row["author"]; %> <% echo $row["datum"]; %>
 <% $avar="unten.htm?amode=$amode&level=$level&action=new&hID=" . $headrow["ID"]; %>