Table 'kabarety_portal.fusion_movies' doesn't exist
Zrobiłem tak, ale jak wejdę w kategorię... Mam utworzyć taką tabelę, czy coś źle w movie.php?? daję kod;
<?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."movies.php";
if (!isset($cat_id)) {
opentable($locale['400']);
echo $ticker_content;
echo "<center>".$locale['404'].": ";
// id
if ($sort_by != "id") {
echo "<a href=movies.php?sort_by=id>".$locale['405']."</a>, ";
} else {
echo "<b>".$locale['405']."</b>, ";
}
// name
if ($sort_by != "name") {
echo "<a href=movies.php?sort_by=name>".$locale['406']."</a>, ";
} else {
echo "<b>".$locale['406']."</b>, ";
}
// access
if ($sort_by != "access") {
echo "<a href=movies.php?sort_by=access>".$locale['407']."</a>, ";
} else {
echo "<b>".$locale['407']."</b>, ";
}
// description
if ($sort_by != "description") {
echo "<a href=movies.php?sort_by=description>".$locale['408']."</a>, ";
} else {
echo "<b>".$locale['408']."</b>, ";
}
echo "</center>";
// sortowanie
$sortuj = "name";
$zab = preg_match("#(id|name|access|description)#si", $sort_by);
if (isset($sort_by) && $zab) $sortuj = $sort_by;
$result = dbquery("SELECT * FROM ".$db_prefix."movie_cats WHERE ".groupaccess('movie_cat_access')." ORDER BY 'movie_cat_".$sortuj."'");
$rows = dbrows($result);
if ($rows != 0) {
$column = 0;
echo "<table width='100%' cellspacing='0' cellpadding='0' class='tbl'>\n";
echo "<tr><td>
<table border='1' cellpadding='1' cellspacing='1' width='100%'>
<tr><td align='center' valign='top' width='50%'>".$locale['408']." <span class='small2'></table>";
echo "<td>
<table border='1' cellpadding='1' cellspacing='1' width='100%'>
<tr><td align='center' valign='top' width='50%'>".$locale['409']." <span class='small2'></table>";
while ($data = dbarray($result)) {
if (checkgroup($data['movie_cat_access'])) {
if ($column == 0) { $row1 = "<tr>\n"; } else { $row1 = ""; }
if ($column == 1) { $row2 = "</tr>\n"; $column=-1; } else { $row2 = ""; }
$column++;
$num = dbcount("(movie_cat)", "movie", "movie_cat='".$data['movie_cat_id']."'");
echo $row1."<tr><td>
<table border='1' cellpadding='1' cellspacing='1' width='100%' >
<tr><td align='center' valign='top' width='50%'><a href='".FUSION_SELF."?cat_id=".$data['movie_cat_id']."'>".$data['movie_cat_name']."</a> <span class='small2'></table><td>
<table border='1' cellpadding='1' cellspacing='1' width='100%' >
<tr><td align='center' valign='top' width='50%'>($num)</span></table>
\n";
echo "</td></tr>\n".$row1;
}
}
echo "</tr>\n</table>\n";
} else {
echo "<center>\n".$locale['401']."\n</center>\n";
}
echo $ticker_content;
closetable();
} else {
$res = 0;
if (!isNum($cat_id)) fallback(FUSION_SELF);
$result = dbquery("SELECT * FROM ".$db_prefix."movie_cats WHERE movie_cat_id='$cat_id'");
if (dbrows($result) != 0) {
$cdata = dbarray($result);
if (checkgroup($cdata['movie_cat_access'])) {
$res = 1;
opentable($locale['400'].": ".$cdata['movie_cat_name']);
// linki sortowania
echo "<center>".$locale['404'].": ";
// id
if ($sort_by != "id") {
echo "<a href=movies.php?cat_id=$cat_id&sort_by=id>".$locale['405']."</a>, ";
} else {
echo "<b>".$locale['405']."</b>, ";
}
// subject
if ($sort_by != "subject") {
echo "<a href=movies.php?cat_id=$cat_id&sort_by=subject>".$locale['406']."</a>, ";
} else {
echo "<b>".$locale['406']."</b>, ";
}
// snippet
if ($sort_by != "snippet") {
echo "<a href=movies.php?cat_id=$cat_id&sort_by=snippet>".$locale['408']."</a>, ";
} else {
echo "<b>".$locale['408']."</b>, ";
}
// reads
if ($sort_by != "reads") {
echo "<a href=movies.php?cat_id=$cat_id&sort_by=reads>".$locale['409']."</a>";
} else {
echo "<b>".$locale['409']."</b>";
}
echo "</center>";
$rows = dbcount("(movie_id)", "movies", "movie_cat='$cat_id'");
if (!isset($rowstart) || !isNum($rowstart)) $rowstart = 0;
if ($rows != 0) {
$result = dbquery("SELECT * FROM ".$db_prefix."movies WHERE movie_cat='$cat_id' ORDER BY ".$cdata['movie_cat_sorting']." LIMIT $rowstart,15");
// sortowanie
$sort = $cdata[movie_cat_sorting];
$zab = preg_match("#(id|subject|snippet|reads)#si", $sort_by);
if (isset($sort_by) && $zab) $sort = "movie_".$sort_by;
$result = dbquery("SELECT * FROM ".$db_prefix."movies WHERE movie_cat='$cat_id' ORDER BY ".$sort." LIMIT $rowstart,15");
$numrows = dbrows($result); $i = 1;
while ($data = dbarray($result)) {
if ($data['movie_datestamp']+604800 > time()+($settings['timeoffset']*3600)) {
$new = " <span class='small'>[".$locale['402']."]</span>";
} else {
$new = "";
}
echo "<table cellpadding='0' cellspacing='0' style='border-collapse: collapse; background-color: transparent; border: 1px solid #7e924a' width='100%'><tr><td height='21' class='tbl2' style='text-align:right;'><a href='movies.php?movie_id=".$data['movie_id']."' title='".$data['movie_subject']."'>".$data['movie_subject']."</a>$new ".$locale['405']." ".$data['movie_reads']." ".$locale['406']."<center><style='padding: 4px;'>".stripslashes($data['movie_snippet']);
echo "<a href='movies.php?movie_id=".$data['movie_id']."' title='".$data['movie_subject']."'></a></center></td></tr></table>";
echo ($i != $numrows ? "\n" : "\n"); $i++;
}
closetable();
echo "<div align='center' style='margin-top:5px;'>\n".makePageNav($rowstart,50,$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";
?>
Błędy dajemy w code - Milka
Edytowane przez Milka dnia 05.08.2007 17:51:58
|