<?php
/***************************************************************************
* figure_figure_images_panel.php for FIGURELIB *
* *
* Copyright (C) 2016 Catzenjaeger *
* www.AlienCollectors.com *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
***************************************************************************/
// Important Files
require_once "../../../maincore.php";
require_once THEMES."templates/header.php";
global $aidlink;
include INFUSIONS."figurelib/infusion_db.php";
require_once INCLUDES."infusions_include.php";
// LANGUAGE
if (file_exists(INFUSIONS."figurelib/locale/".LOCALESET."locale_figurelib.php")) {
include INFUSIONS."figurelib/locale/".LOCALESET."locale_figurelib.php";
} else {
include INFUSIONS."figurelib/locale/English/locale_figurelib.php";
}
// If Infusion isn't installed, redirect to Errorpage
if (!db_exists(DB_FIGURE_ITEMS)) { redirect(BASEDIR."error.php?code=404"); }
// Get Settings
$fil_settings = get_settings("figurelib");
// Start Site
opentable("<div class='text-bold'>".$locale['stats_001']."</div>");
// SEETING FIGURES PER SITE
$limit = 6;
// Set Empty Arrays
$info = array("figure_rows" => 0, "page_nav" => false);
$info['item'] = array();
// Count all Figures
$max_rows = dbcount("(figure_id)", DB_FIGURE_ITEMS, "figure_freigabe=1
AND ".groupaccess("figure_visibility")."
AND figure_retailprice != ''");
// Check Rowstart
$_GET['rowstart'] = isset($_GET['rowstart']) && isnum($_GET['rowstart']) && $_GET['rowstart'] <= $max_rows ? $_GET['rowstart'] : 0;
if ($max_rows) {
$result = dbquery("
SELECT
tb.figure_id, tb.figure_submitter, tb.figure_retailprice, tb.figure_usedprice, tb.figure_freigabe, tb.figure_pubdate, tb.figure_scale, tb.figure_title, tb.figure_manufacturer, tb.figure_brand, tb.figure_datestamp, tb.figure_cat,
tbc.figure_cat_id, tbc.figure_cat_name,
tbu.user_id, tbu.user_name, tbu.user_status, tbu.user_avatar,
tbm.figure_manufacturer_name,
tbb.figure_brand_name,
tbs.figure_scale_id, tbs.figure_scale_name,
fuf.figure_userfigures_figure_id, fuf.figure_userfigures_user_id
FROM ".DB_FIGURE_ITEMS." AS tb
LEFT JOIN ".DB_USERS." AS tbu ON tb.figure_submitter=tbu.user_id
LEFT JOIN ".DB_FIGURE_USERFIGURES." AS fuf ON fuf.figure_userfigures_figure_id=tb.figure_id
LEFT JOIN ".DB_FIGURE_CATS." AS tbc ON tb.figure_cat=tbc.figure_cat_id
LEFT JOIN ".DB_FIGURE_MANUFACTURERS." AS tbm ON tbm.figure_manufacturer_id = tb.figure_manufacturer
LEFT JOIN ".DB_FIGURE_BRANDS." AS tbb ON tbb.figure_brand_id = tb.figure_brand
LEFT JOIN ".DB_FIGURE_SCALES." AS tbs ON tbs.figure_scale_id = tb.figure_scale
WHERE ".(multilang_table("FI") ? "tb.figure_language='".LANGUAGE."' AND" : "")." tb.figure_freigabe='1'
AND figure_retailprice != ''
GROUP BY tb.figure_id
ORDER BY tb.figure_datestamp DESC
LIMIT ".$_GET['rowstart'].",".$limit."
");
// Pagenav
$info['page_nav'] = $max_rows > $limit ? makepagenav($_GET['rowstart'], $limit, $max_rows, 3, FUSION_SELF."?") : 0;
// WENN DATEN UNGLEICH = 0 DANN DARSTELLUNG DER DATEN
if (dbrows($result) == 0) {
} else {
openside("");
while($data = dbarray($result)){
//echo "<div class='container-fluid'>\n";
//echo "<div class='table-responsive'>\n";
//echo "<div class='row'>\n";
// Get correct Image
if (dbcount("(figure_images_image_id)", DB_FIGURE_IMAGES, "figure_images_figure_id='".$data['figure_id']."'")) {
$imageData = dbarray(dbquery("
SELECT
figure_images_image, figure_images_thumb
FROM ".DB_FIGURE_IMAGES."
WHERE figure_images_figure_id='".$data['figure_id']."'
ORDER BY figure_images_toppic DESC
LIMIT 0,1
"));
if ($imageData['figure_images_thumb'] && @file_exists(THUMBS_FIGURES.$imageData['figure_images_thumb'])) {
$imageURL = THUMBS_FIGURES.$imageData['figure_images_thumb'];
} elseif ($imageData['figure_images_image'] && @file_exists(IMAGES_FIGURES.$imageData['figure_images_image'])) {
$imageURL = IMAGES_FIGURES.$imageData['figure_images_image'];
} else {
$imageURL = INFUSIONS."figurelib/images/default.png";
}
} else {
$imageURL = INFUSIONS."figurelib/images/default.png";
}
// COLUMN 1 (image clickable)
echo "<div class='col-lg-12 col-md-12 col-sm-12 col-xs-12'>\n";
echo "<div class='side-small'><a href='".INFUSIONS."figurelib/figures.php?figure_id=".$data['figure_id']."'>\n<img src='".$imageURL."' alt='".$locale['CLFP_002']." : ".$data['figure_title']."' title='".$locale['CLFP_002']." : ".$data['figure_title']."' style='border:0px;max-height:40px;max-width:40px'/></a>";
echo "</div></div>\n";
//echo "</div>\n";
//echo "</div>\n";
//echo "</div>\n";
}
// PAGE NAV
//echo "<br><br>\n";
echo $info['page_nav'] ? "<div class='text-right'>".$info['page_nav']."</div>" : '';
closeside();
}
}
// Close Site
closetable();
// Important File
require_once THEMES."templates/footer.php";
<div class='display-block'>
<div class='display-inline-block m-r-10'>
...
</div>
<div class='display-inline-block m-r-10'>
...
</div>
<div class='display-inline-block m-r-10'>
...
</div>
<div class='display-inline-block m-r-10'>
...
</div>
<div class='display-inline-block m-r-10'>
...
</div>
</div>
Quote
Can't use 5 image with Bootstrap
3 per row is col-**-4
4 per row is col-**-3
6 per row is col-**-2
for 5...Code Download source<div class='display-block'>
<div class='display-inline-block m-r-10'>
...
</div>
<div class='display-inline-block m-r-10'>
...
</div>
<div class='display-inline-block m-r-10'>
...
</div>
<div class='display-inline-block m-r-10'>
...
</div>
<div class='display-inline-block m-r-10'>
...
</div>
</div>
- by Chan
if (dbrows($result)) {
echo "<div class='clearifx'>\n";
while ($data = dbarray($result)) {
echo "<div class='display-inline-block m-r-10'>\n";
PUT YOUR IMAGE HERE.
echo "</div>\n";
}
echo "</div>\n";
}
<?php
/***************************************************************************
* figure_figure_images_panel.php for FIGURELIB *
* *
* Copyright (C) 2016 Catzenjaeger *
* www.AlienCollectors.com *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
***************************************************************************/
// Important Files
require_once "../../../maincore.php";
require_once THEMES."templates/header.php";
global $aidlink;
include INFUSIONS."figurelib/infusion_db.php";
require_once INCLUDES."infusions_include.php";
// LANGUAGE
if (file_exists(INFUSIONS."figurelib/locale/".LOCALESET."locale_figurelib.php")) {
include INFUSIONS."figurelib/locale/".LOCALESET."locale_figurelib.php";
} else {
include INFUSIONS."figurelib/locale/English/locale_figurelib.php";
}
// If Infusion isn't installed, redirect to Errorpage
if (!db_exists(DB_FIGURE_ITEMS)) { redirect(BASEDIR."error.php?code=404"); }
// Get Settings
$fil_settings = get_settings("figurelib");
// Start Site
opentable("<div class='text-bold'>".$locale['stats_001']."</div>");
// SEETING FIGURES PER SITE
$limit = 6;
// Set Empty Arrays
$info = array("figure_rows" => 0, "page_nav" => false);
$info['item'] = array();
// Count all Figures
$max_rows = dbcount("(figure_id)", DB_FIGURE_ITEMS, "figure_freigabe=1
AND ".groupaccess("figure_visibility")."
AND figure_retailprice != ''");
// Check Rowstart
$_GET['rowstart'] = isset($_GET['rowstart']) && isnum($_GET['rowstart']) && $_GET['rowstart'] <= $max_rows ? $_GET['rowstart'] : 0;
if ($max_rows) {
$result = dbquery("
SELECT
tb.figure_id, tb.figure_submitter, tb.figure_retailprice, tb.figure_usedprice, tb.figure_freigabe, tb.figure_pubdate, tb.figure_scale, tb.figure_title, tb.figure_manufacturer, tb.figure_brand, tb.figure_datestamp, tb.figure_cat,
tbc.figure_cat_id, tbc.figure_cat_name,
tbu.user_id, tbu.user_name, tbu.user_status, tbu.user_avatar,
tbm.figure_manufacturer_name,
tbb.figure_brand_name,
tbs.figure_scale_id, tbs.figure_scale_name,
fuf.figure_userfigures_figure_id, fuf.figure_userfigures_user_id
FROM ".DB_FIGURE_ITEMS." AS tb
LEFT JOIN ".DB_USERS." AS tbu ON tb.figure_submitter=tbu.user_id
LEFT JOIN ".DB_FIGURE_USERFIGURES." AS fuf ON fuf.figure_userfigures_figure_id=tb.figure_id
LEFT JOIN ".DB_FIGURE_CATS." AS tbc ON tb.figure_cat=tbc.figure_cat_id
LEFT JOIN ".DB_FIGURE_MANUFACTURERS." AS tbm ON tbm.figure_manufacturer_id = tb.figure_manufacturer
LEFT JOIN ".DB_FIGURE_BRANDS." AS tbb ON tbb.figure_brand_id = tb.figure_brand
LEFT JOIN ".DB_FIGURE_SCALES." AS tbs ON tbs.figure_scale_id = tb.figure_scale
WHERE ".(multilang_table("FI") ? "tb.figure_language='".LANGUAGE."' AND" : "")." tb.figure_freigabe='1'
AND figure_retailprice != ''
GROUP BY tb.figure_id
ORDER BY tb.figure_datestamp DESC
LIMIT ".$_GET['rowstart'].",".$limit."
");
// Pagenav
$info['page_nav'] = $max_rows > $limit ? makepagenav($_GET['rowstart'], $limit, $max_rows, 3, FUSION_SELF."?") : 0;
// WENN DATEN UNGLEICH = 0 DANN DARSTELLUNG DER DATEN
if (dbrows($result) == 0) {
} else {
openside("");
if (dbrows($result)) {
echo "<div class='clearifx'>\n";
while ($data = dbarray($result)) {
//echo "<div class='container-fluid'>\n";
//echo "<div class='table-responsive'>\n";
//echo "<div class='row'>\n";
// Get correct Image
if (dbcount("(figure_images_image_id)", DB_FIGURE_IMAGES, "figure_images_figure_id='".$data['figure_id']."'")) {
$imageData = dbarray(dbquery("
SELECT
figure_images_image, figure_images_thumb
FROM ".DB_FIGURE_IMAGES."
WHERE figure_images_figure_id='".$data['figure_id']."'
ORDER BY figure_images_toppic DESC
LIMIT 0,1
"));
if ($imageData['figure_images_thumb'] && @file_exists(THUMBS_FIGURES.$imageData['figure_images_thumb'])) {
$imageURL = THUMBS_FIGURES.$imageData['figure_images_thumb'];
} elseif ($imageData['figure_images_image'] && @file_exists(IMAGES_FIGURES.$imageData['figure_images_image'])) {
$imageURL = IMAGES_FIGURES.$imageData['figure_images_image'];
} else {
$imageURL = INFUSIONS."figurelib/images/default.png";
}
} else {
$imageURL = INFUSIONS."figurelib/images/default.png";
}
// COLUMN 1 (image clickable)
//echo "<div class='col-lg-12 col-md-12 col-sm-12 col-xs-12'>\n";
echo "<div class='side-small'><a href='".INFUSIONS."figurelib/figures.php?figure_id=".$data['figure_id']."'>\n<img src='".$imageURL."' alt='".$locale['CLFP_002']." : ".$data['figure_title']."' title='".$locale['CLFP_002']." : ".$data['figure_title']."' style='border:0px;max-height:40px;max-width:40px'/></a>";
//echo "</div></div>\n";
echo "</div>\n";
}
echo "</div>\n";
}
// PAGE NAV
//echo "<br><br>\n";
echo $info['page_nav'] ? "<div class='text-right'>".$info['page_nav']."</div>" : '';
closeside();
}
}
if (dbrows($result)) {
echo "<div class='clearfix'>\n";
while ($data = dbarray($result)) {
if (dbcount("(figure_images_image_id)", DB_FIGURE_IMAGES, "figure_images_figure_id='".$data['figure_id']."'")) {
$imageData = dbarray(dbquery("
SELECT
figure_images_image, figure_images_thumb
FROM ".DB_FIGURE_IMAGES."
WHERE figure_images_figure_id='".$data['figure_id']."'
ORDER BY figure_images_toppic DESC
LIMIT 0,1
"));
if ($imageData['figure_images_thumb'] && @file_exists(THUMBS_FIGURES.$imageData['figure_images_thumb'])) {
$imageURL = THUMBS_FIGURES.$imageData['figure_images_thumb'];
} elseif ($imageData['figure_images_image'] && @file_exists(IMAGES_FIGURES.$imageData['figure_images_image'])) {
$imageURL = IMAGES_FIGURES.$imageData['figure_images_image'];
} else {
$imageURL = INFUSIONS."figurelib/images/default.png";
}
} else {
$imageURL = INFUSIONS."figurelib/images/default.png";
}
echo "<div class='display-inline-block m-r-10'>\n";
echo "<a href='".INFUSIONS."figurelib/figures.php?figure_id=".$data['figure_id']."'>\n<img src='".$imageURL."' alt='".$locale['CLFP_002']." : ".$data['figure_title']."' title='".$locale['CLFP_002']." : ".$data['figure_title']."' style='border:0px;max-height:40px;max-width:40px'/>";
echo "</div>\n";
}
echo "</div>\n";
}
Category Forum
Modifications and Requests - 9Labels
None yet
Statistics
2 participants
Notifications
You are not receiving notifications from this thread.
Related Questions