jeśli chodzi Ci o treść joke.php i opis.php
JOKE.PHP Dowcipy do przerobienia
<?
/*--------------------------------------------+
| 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'><b><a href='$PHP_SELF?cat_id=".$data['joke_cat_id']."'><u>".$data['joke_cat_name']."</u></b></a> <span class='small2'>(dowcipów <font color='red'><b>$num</b></font>)</span>";
if ($data['joke_cat_description'] != "") echo "<br>\n<span class='small'><font color='orange'>".$data['joke_cat_description']."</font></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";
?>
I OPIS.PHP Opisy zostawic takie jakie są
<?
/*--------------------------------------------+
| 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_opis/locale/".$settings['locale'].".php")) {
include INFUSIONS."eXtreme_opis/locale/".$settings['locale'].".php";
} else {
include INFUSIONS."eXtreme_opis/locale/English.php";
}
if (isset($opis_id)) {
$result = dbquery("UPDATE ".$db_prefix."opis SET opis_count=opis_count+1 WHERE opis_id='$opis_id'");
$result = dbquery("SELECT opis_url FROM ".$db_prefix."opis WHERE opis_id='$opis_id'");
$data = dbarray($result);
header ("Location:".$data['opis_url']);
}
if (!isset($cat_id)) {
opentable($locale['EJ_400']);
$result = dbquery("SELECT * FROM ".$db_prefix."opis_cat ORDER BY opis_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("(opis_cat)", "opis", "opis_cat='".$data['opis_cat_id']."'");
echo "<td align='left' valign='top'><a href='$PHP_SELF?cat_id=".$data['opis_cat_id']."'>".$data['opis_cat_name']."</a> <span class='small2'>(opisów $num)</span><br><br>";
if ($data['opis_cat_description'] != "") echo "<br>\n<span class='small'>".$data['opis_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."opis_cat WHERE opis_cat_id='$cat_id'"))) {
opentable($locale['EJ_400'].": ".$data['opis_cat_name']);
$rows = dbcount("(*)", "opis", "opis_cat='$cat_id'");
if (!$rowstart) $rowstart = 0;
if ($rows != 0) {
$result = dbquery("SELECT * FROM ".$db_prefix."opis WHERE opis_cat='$cat_id' ORDER BY opis_name LIMIT $rowstart,20");
$numrows = dbrows($result); $i = 1;
while ($data = dbarray($result)) {
if ($data['opis_datestamp']+604800 > time()+($settings['timeoffset']*3600)) {
$new = " <span class='small'>".$locale['EJ_410']."</span>";
} else {
$new = "";
}
echo "<b>".$data['opis_name']."</b>$new\n";
if (iADMIN) {
echo " <span class='small'>(<a href='".INFUSIONS."eXtreme_opis/opis_admin.php?step=edit&opis_cat_id=".$data['opis_cat_id']."&opis_id=".$data['opis_id']."'>".$locale['EJ_2010']."</a>)</span>";
}
if ($data['opis_description'] != "")
$opis_opis = $data['opis_description'];
$opis_opis = nl2br($opis_opis);
echo "<br>".$opis_opis."<br><br>\n";
echo "<span class='small'><font class='alt'>".$locale['EJ_2003']." </font><a href='mailto:".$data['opis_mail']."'>";
if ($data['opis_nick'] != "") echo $data['opis_nick']."</a> ";
echo "<font class='alt'>".$locale['EJ_411']."</font> ".showdate("%d.%m.%y", $data['opis_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,20,$rows,3,"$PHP_SELF?cat_id=$cat_id&")."\n</div>\n";
} else {
echo "<center><br>".$locale['EJ_2004']." <a href='opis_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";
?>
Edytowane przez Even dnia 11.08.2006 20:04:25
|