Code: Alles auswählen
#
# Tabellenstruktur für Tabelle `_links_links`
#
mysql_query("CREATE TABLE " . $GLOBALS['prefix'] . "_links_links (
lid int(11) NOT NULL auto_increment,
cid int(11) NOT NULL default '0',
sid int(11) NOT NULL default '0',
title varchar(100) NOT NULL default '',
url varchar(100) NOT NULL default '',
adsaff varchar(100) NOT NULL default '',
description text NOT NULL,
date datetime default NULL,
name varchar(100) NOT NULL default '',
email varchar(100) NOT NULL default '',
address varchar(100) NOT NULL default '',
hits int(11) NOT NULL default '0',
submitter varchar(60) NOT NULL default '',
linkratingsummary double(6,4) NOT NULL default '0.0000',
totalvotes int(11) NOT NULL default '0',
totalcomments int(11) NOT NULL default '0',
length varchar(20) NOT NULL default '',
reciprocal varchar(100) NOT NULL default '',
PRIMARY KEY (lid)
) TYPE=MyISAM");
function index() {
$result = sql_query("select cid, title, cdescription, topicimage from ".$GLOBALS['prefix']."_links_categories where parentid='0' order by title", $GLOBALS['dbi']);
$count = 0;
while(list($cid, $title, $cdescription, $topicimage) = sql_fetch_row($result, $GLOBALS['dbi'])) {
$cid = intval($cid);
$title = stripslashes($title);
$cdescription = stripslashes($cdescription);
$cresult = sql_query("select * from ".$GLOBALS['prefix']."_links_links where cid='$cid'", $GLOBALS['dbi']);
$cnumrows = sql_num_rows($cresult, $GLOBALS['dbi']);
# Hauptüberschriften der Kategorien
$keyword = seotitle($title);
$titleseo1 = $keyword[0];
$titleseo2 = $keyword[1];
$abstand = " ";
if ($topicimage != "_blank.gif") {
echo "<td>$abstand<font class=\"option\"><strong><big><img src=\"images/links/$topicimage\" alt=\"$title\"></big></strong> <a href=\"modules.php?name=Web_Links&l_op=viewlink&dummy1=$titleseo1&dummy2=$titleseo2&cid=$cid\"><b>$title</b></a></font>"; categorynewlinkgraphic($cid);
} else {
echo "<td>$abstand<font class=\"option\"></strong> <a href=\"modules.php?name=Web_Links&l_op=viewlink&dummy1=$titleseo1&dummy2=$titleseo2&cid=$cid\"><b>$title</b></a></font>"; categorynewlinkgraphic($cid);
}
$titelmehr = $cid;
echo "<br>";
$result2 = sql_query("select cid, title from ".$GLOBALS['prefix']."_links_categories where parentid='$cid' order by title limit 0, ".$GLOBALS['lihau']."", $GLOBALS['dbi']);
$space = 0;
while(list($cid, $stitle) = sql_fetch_row($result2, $GLOBALS['dbi'])) {
$cid = intval($cid);
$stitle = stripslashes($stitle);
$keyword = seotitle($stitle);
if (empty($keyword[0])) { $keyword[0]="";}
if (empty($keyword[1])) { $keyword[1]="";}
$titleseo3 = $keyword[0];
$titleseo4 = $keyword[1];
if ($space>0) {
}
$cresult2 = sql_query("select * from ".$GLOBALS['prefix']."_links_links where cid='$cid'", $GLOBALS['dbi']);
$cnumrows2 = sql_num_rows($cresult2, $GLOBALS['dbi']);
echo "$abstand<font class=\"content\"><a href=\"modules.php?name=Web_Links&l_op=viewlink&dummy1=$titleseo1&dummy2=$titleseo2&dummy3=$titleseo3&dummy4=$titleseo4&cid=$cid\">$stitle</a> ($cnumrows2)</font><br>";
$space++;
}
echo "$abstand<a title=\"$title\" target=\"_self\" href=\"modules.php?name=Web_Links&l_op=viewlink&dummy1=$titleseo1&dummy2=$titleseo2&cid=$titelmehr\">"._READMORE."</a>";
if ($count<1) {
echo "</td><td></td>";
$dum = 1;
}
if ($count>=1) {
echo "</td><td>$abstand</td>";
$dum = 1;
}
if ($count==$GLOBALS['perrow']) {
echo "</td><td>$abstand</td>";
$dum = 1;
}
$count++;
if ($count == $GLOBALS['perrow']) { # Spalteneinteilung
echo "</tr><tr>";
$count = 0;
$dum = 0;
}
}
if ($dum == 1) {
echo "</tr></table>";
} elseif ($dum == 0) {
echo "<td></td></tr></table>";
}
}
@net(t)worker so sieht die function für die startseite aus. Wenn ich kein Administrator bin sinds 99 Abfragen