
if ($action != "default") { ?>

} ?>
|
|
|
if ($action == "default") {
$columns = 4;
$curimage = 0;
$imagesperpage = 12;
if (isset($_GET['imstart'])) {
$imstart = $_GET['imstart'];
} else {
$imstart = 0;
}
if (isset($_GET['catid'])) {
$catid = $_GET['catid'];
if($catid > 0) $extrawhere = " AND category.categoryid = $catid";
else $extrawhere = "";
} else {
$catid = 0;
$extrawhere = "";
}
$images = mysql_query("SELECT SQL_CALC_FOUND_ROWS image.*, category.categorytitle FROM image, category, image2category WHERE image.imageid = image2category.imageid AND category.categoryid = image2category.categoryid $extrawhere LIMIT $imstart,$imagesperpage");
$imagenum = mysql_result(mysql_query("SELECT FOUND_ROWS()"),0);
$categories = mysql_query("SELECT * FROM category WHERE parentid=0 ORDER BY sortorder");
$catdrop = '';
while($category = mysql_fetch_array($categories)) {
if ($category['categoryid'] == $catid) $selected = " selected";
else $selected = "";
$catdrop .= '';
}
?>
|
|