Chciałem troszke zmodyfikowac mod spinaxa.
A dokładniej próbowałem zrobić, aby przeglądanie dodanych flashow nie wyglądało tak:
Tytuł: bleble [nowy]
opis: ble ble
TYLKO:
Tytuł: ble ble
Dodał: admin
Komentarzy: 2
Odsłon: 23
Wyczarowałem takie coś..:
<?php
/*--------------------------------------------+
| PHP-Fusion 5 - Content Management System |
|---------------------------------------------|
| author: Nick Jones (Digitanium) © 2002-2005 |
| web: http://www.php-fusion.co.uk |
| email: |
|---------------------------------------------|
| Released under the terms and conditions of |
| the GNU General Public License (Version 2) |
+--------------------------------------------*/
require_once "maincore.php";
require_once "subheader.php";
require_once "side_left.php";
include LOCALE.LOCALESET."articles.php";
if (!isset($cat_id)) {
opentable('Flash');
$result = dbquery("SELECT * FROM ".$db_prefix."flash_cats WHERE ".groupaccess('flash_cat_access')." ORDER BY flash_cat_name");
$rows = dbrows($result);
if ($rows != 0) {
$counter = 0; $columns = 2;
echo "<table 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("(flash_cat)", "flash", "flash_cat='".$data['flash_cat_id']."'");
echo "<td align='center' valign='top' width='50%'><a href='".FUSION_SELF."?cat_id=".$data['flash_cat_id']."'>".$data['flash_cat_name']."</a> <span class='small2'>($num)</span>";
if ($data['flash_cat_description'] != "") echo "<br>\n<span class='small'>".$data['flash_cat_description']."</span>";
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 (dbrows($result) != 0) {
$data = dbarray($result);
if (checkgroup($data['flash_cat_access'])) {
$res = 1;
if ($rowstart == 0) $result = dbquery("UPDATE ".$db_prefix."flash SET flash_reads=flash_reads+1 WHERE flash_id='$flash_id'");
$source = stripslashes($data['flash_source']);
$width = stripslashes($data['flash_width']);
$hight = stripslashes($data['flash_hight']);
$flash_cat = stripslashes($data['flash_cat']);
$subject = stripslashes($data['flash_subject']);
$snippet = stripslashes($data['flash_snippet']);
$datestamp = stripslashes($data['flash_datestamp']);
$allow_comments = stripslashes($data['flash_allow_comments']);
$reads = stripslashes($data['flash_reads']);
$allow_ratings = stripslashes($data['flash_allow_ratings']);
$name = stripslashes($data['flash_name']);
;
$flash = explode("<--PAGEBREAK-->", $flash);
$pagecount = count($flash);
$flash_subject = stripslashes($data['flash_subject']);
$flash_info = array(
"flash_id" => $data['flash_id'],
"user_id" => $data['user_id'],
"user_name" => $data['user_name'],
"flash_date" => $data['flash_datestamp'],
"flash_breaks" => $data['flash_breaks'],
"flash_comments" => dbcount("(comment_id)", "comments", "comment_type='f' AND comment_item_id='".$data['flash_id']."'"),
"flash_reads" => $data['flash_reads']
);
$result = dbquery("SELECT * FROM ".$db_prefix."flash_cats WHERE flash_cat_id='".$data['$flash_cat']."'");
$cdata = dbarray($result);
openside($data['flash_subject']);
if (!isNum($cat_id)) fallback(FUSION_SELF);
$result = dbquery("SELECT * FROM ".$db_prefix."flash_cats WHERE flash_cat_id='$cat_id'");
if (dbrows($result) != 0) {
$cdata = dbarray($result);
if (checkgroup($cdata['flash_cat_access'])) {
$res = 1;
opentable("Flash: ".$cdata['flash_cat_name']);
$rows = dbcount("(flash_id)", "flash", "flash_cat='$cat_id'");
if (!isset($rowstart) || !isNum($rowstart)) $rowstart = 0;
if ($rows != 0) {
$result = dbquery("SELECT * FROM ".$db_prefix."flash WHERE flash_cat='$cat_id' ORDER BY ".$cdata['flash_cat_sorting']." LIMIT $rowstart,15");
$numrows = dbrows($result); $i = 1;
while ($data = dbarray($result)) {
echo ("Nazwa : ");
if ($data['flash_datestamp']+604800 > time()+($settings['timeoffset']*3600)) {
$new = " <span class='small'>[".$locale['402']."]</span>";
} else {
$new = "";
}
echo "<a href='readflash.php?flash_id=".$data['flash_id']."'>".$data['flash_subject']."</a>$new<br>\n".stripslashes($data['flash_snippet']);
echo "<table cellpadding='0' cellspacing='0'><tr><td class='tbl2'>Komentarzy: </td><td class='tbl'>".$flash_info['flash_comments']."</td></tr>
</table>\n";
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";
?>
ale nic z tego...:( jakies propozycje moze?? |