Witam. Jestem początkujący w tych sprawach i mianowicie nie mam pojęcia jak przerobić kod articles.php aby http://www.boreck...p?cat_id=7 te gry online pojawiały się w 4 kolumnach.
Poniżej przedstawiam kod źródłowy:
<?php
/*--------------------------------------------+
| PHP-Fusion 5 - Content Management System |
|---------------------------------------------|
| author: Nick Jones (Digitanium) ę 2002-2005 |
| web: http://www.php-fu... |
| email: |
|---------------------------------------------|
| Released under the terms and conditions of |
| the GNU General Public License (Version 2) |
+--------------------------------------------*/
require_once "maincore.php";
require_once "subheader.php";
// panele
$table = "panels_article";
require_once "side_left.php";
include LOCALE.LOCALESET."articles.php";
if (!isset($cat_id)) {
opentable($locale['400']);
$result = dbquery("SELECT * FROM ".$db_prefix."article_cats WHERE ".groupaccess('article_cat_access')." ORDER BY article_cat_name");
$rows = dbrows($result);
if ($rows != 0) {
$counter = 0; $columns = 2;
echo "<table border='0' cellpadding='0' cellspacing='0' width='100%' class='tbl'>\n<tr>\n";
while ($data = dbarray($result)) {
if ($counter != 0 && ($counter % $columns == 0)) echo "</tr>\n<tr>\n";
$num = dbcount("(article_cat)", "articles", "article_cat='".$data['article_cat_id']."'");
($data['article_cat_thumbnail'] == "" ? $thmb = "_brak.gif" : $thmb = $data['article_cat_thumbnail']);
echo "<td valign='top' width='50%'>
<table width='100%'><tr>
<td width='1%'>";
echo "<table cellspacing='0' cellpadding='0' border='0'><tr>\n";
echo "<td><img src='".IMAGES."avatar_mod/gora_lewa.png' height='12' width='12'></td>\n";
echo "<td><img src='".IMAGES."avatar_mod/gora_srodek.png' height='12' width='100%'></td>\n";
echo "<td><img src='".IMAGES."avatar_mod/gora_prawa.png' height='12' width='12'></td></tr>\n";
echo "<td align='left'><img src='".IMAGES."avatar_mod/srodek_lewa.png' width='12' height='100%'></td>\n";
echo "<td align='center' height='1%'>";
echo "<img src='".IMAGES."article_cats/".$thmb."' height='50' width='50'></td>";
echo "<td align='right'><img src='".IMAGES."avatar_mod/srodek_prawa.png' height='100%' width='12'></td></tr><tr>\n";
echo "<td><img src='".IMAGES."avatar_mod/dol_lewa.png' height='12' width='12'></td>\n";
echo "<td><img src='".IMAGES."avatar_mod/dol_srodek.png' height='12' width='100%'></td>\n";
echo "<td><img src='".IMAGES."avatar_mod/dol_prawa.png' height='12' width='12'></td></tr>\n";
echo "</tr></table></td>
<td valign='top'><div class='tbl1'><a href='".FUSION_SELF."?cat_id=".$data['article_cat_id']."'>".$data['article_cat_name']."</a>
<span class='small2'>($num)</span></div>";
if ($data['article_cat_description'] != "") echo "\n<span class='small'>".$data['article_cat_description']."</span>";
echo "</td>
</tr></table>";
echo "</td>\n";
$counter++;
}
echo "</tr>\n</table>\n";
} else {
echo "<center><br>\n".$locale['401']."<br><br>\n</center>\n";
}
closetable();
} else {
$res = 0;
if (!isNum($cat_id)) fallback(FUSION_SELF);
$result = dbquery("SELECT * FROM ".$db_prefix."article_cats WHERE article_cat_id='$cat_id'");
if (dbrows($result) != 0) {
$cdata = dbarray($result);
if (checkgroup($cdata['article_cat_access'])) {
$res = 1;
opentable($locale['400'].": ".$cdata['article_cat_name']);
$rows = dbcount("(article_id)", "articles", "article_cat='$cat_id'");
if (!isset($rowstart) || !isNum($rowstart)) $rowstart = 0;
if ($rows != 0) {
$result = dbquery("SELECT * FROM ".$db_prefix."articles WHERE article_cat='$cat_id' ORDER BY
".$cdata['article_cat_sorting']." LIMIT $rowstart,15");
$numrows = dbrows($result); $i = 1;
while ($data = dbarray($result)) {
if ($data['article_datestamp']+604800 > time()+($settings['timeoffset']*3600)) {
$new = " <span class='small'>[".$locale['402']."]</span>";
} else {
$new = "";
}
echo "<a
href='readarticle.php?article_id=".$data['article_id']."'>".$data['article_subject']."</a>$new<br>\n".stripslashes($data['article_snippet']);
echo ($i != $numrows ? "<br><br>\n" : "\n"); $i++;
}
closetable();
if ($rows > 15) echo "<div align='center'
style='margin-top:5px;'>\n".makePageNav($rowstart,15,$rows,3,FUSION_SELF."?cat_id=$cat_id&")."\n</div>\n";
} else {
echo "<center>".$locale['403']."</center>\n";
closetable();
}
}
}
if ($res == 0) redirect(FUSION_SELF);
}
require_once "side_right.php";
require_once "footer.php";
?> Kliknij i zaczekaj na załadowanie kodu ...
PW od moderatora:
- Przeniesienie tematu - jantom 09.12 - 09:37
- Brak Stopki! - Pieka 09.12 - 09:43
- Zmiana nazwy tematu - jantom 09.12 - 09:44
Edytowane przez Pieka dnia 09.12.2008 10:24:03
|