Drakoo napisał/a:
Witam czy ma ktos moze nowa poprawiana wersje dowcipów extreme_joke?? bo te co sa aktualnie w labie niedzialaja w wersji najnowszej fusiona 6,01,6
Działa z tą wersją fusiona.
Ja mam pytanie ciut inne, ale szkoda zakładać nowy topic,
jak ustawić ilość wyświetlanych "dowcipów" na stronie, czy w ogóle się da?
<?
/*--------------------------------------------+
| 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) |
+--------------------------------------------*/
@include_once "../../config.php";
include_once "../../maincore.php";
include_once BASEDIR."subheader.php";
include_once BASEDIR."side_left.php";
if (file_exists(INFUSIONS."eXtreme_joke/locale/".$settings['locale'].".php")) {
include INFUSIONS."eXtreme_joke/locale/".$settings['locale'].".php";
} else {
include INFUSIONS."eXtreme_joke/locale/English.php";
}
if (isset($joke_id)) {
$result = dbquery("UPDATE ".$db_prefix."joke SET joke_count=joke_count+1 WHERE joke_id='$joke_id'");
$result = dbquery("SELECT joke_url FROM ".$db_prefix."joke WHERE joke_id='$joke_id'");
$data = dbarray($result);
header ("Location:".$data['joke_url']);
}
if (!isset($cat_id)) {
opentable($locale['EJ_400']);
$result = dbquery("SELECT * FROM ".$db_prefix."joke_cat ORDER BY joke_cat_name");
$rows = dbrows($result);
if ($rows != 0) {
$columns = 1; $counter = 0;
echo "<table width='100%' cellspacing='0' cellpadding='0' class='tbl'>\n<tr>\n";
while($data = dbarray($result)) {
if ($counter != 0) if ($counter % $columns == 0) echo "</tr>\n<tr>\n";
$num = dbcount("(joke_cat)", "joke", "joke_cat='".$data['joke_cat_id']."'");
echo "<td align='left' valign='top'><a href='$PHP_SELF?cat_id=".$data['joke_cat_id']."'>".$data['joke_cat_name']."</a> <span class='small2'>(dowcipów $num)</span>";
if ($data['joke_cat_description'] != "") echo "<br>\n<span class='small'>".$data['joke_cat_description']."</span>";
echo "</td>\n";
$counter++;
}
echo "</tr>\n</table>\n";
} else {
echo "<center><br>\n".$locale['EJ_430']."<br><br>\n</center>\n";
}
closetable();
} else {
if (!isNum($cat_id)) { header("Location:".$PHP_SELF); exit; }
if ($data = dbarray(dbquery("SELECT * FROM ".$db_prefix."joke_cat WHERE joke_cat_id='$cat_id'"))) {
opentable($locale['EJ_400'].": ".$data['joke_cat_name']);
$rows = dbcount("(*)", "joke", "joke_cat='$cat_id'");
if (!$rowstart) $rowstart = 0;
if ($rows != 0) {
$result = dbquery("SELECT * FROM ".$db_prefix."joke WHERE joke_cat='$cat_id' ORDER BY joke_name LIMIT $rowstart,8");
$numrows = dbrows($result); $i = 1;
while ($data = dbarray($result)) {
if ($data['joke_datestamp']+604800 > time()+($settings['timeoffset']*3600)) {
$new = " <span class='small'>".$locale['EJ_410']."</span>";
} else {
$new = "";
}
echo "<b>".$data['joke_name']."</b>$new\n";
if (iADMIN) {
echo " <span class='small'>(<a href='".INFUSIONS."eXtreme_joke/joke_admin.php?step=edit&joke_cat_id=".$data['joke_cat_id']."&joke_id=".$data['joke_id']."'>".$locale['EJ_2010']."</a>)</span>";
}
if ($data['joke_description'] != "")
$joke_joke = $data['joke_description'];
$joke_joke = nl2br($joke_joke);
echo "<br>".$joke_joke."<br><br>\n";
echo "<span class='small'><font class='alt'>".$locale['EJ_2003']." </font><a href='mailto:".$data['joke_mail']."'>";
if ($data['joke_nick'] != "") echo $data['joke_nick']."</a> ";
echo "<font class='alt'>".$locale['EJ_411']."</font> ".showdate("%d.%m.%y", $data['joke_datestamp'])."\n";
echo ($i != $numrows ? "<hr>\n" : "\n"); $i++;
}
closetable();
echo " <a href=\"javascript:history.go(-1)\"><b>".$locale['EJ_2009']."</b></a><br><div align='center' style='margin-top:5px;'>\n".makePageNav($rowstart,8,$rows,3,"$PHP_SELF?cat_id=$cat_id&")."\n</div>\n";
} else {
echo "<center><br>".$locale['EJ_2004']." <a href='joke_add.php'>".$locale['EJ_2005']."</a><br><br></center>\n";
closetable();
}
} else {
header("Location:".$PHP_SELF); exit;
}
}
include_once "../../side_right.php";
include_once "../../footer.php";
?>
|