Galleri viser ikke billed
Når jeg vil se mine billeder er det bare blankt.. hvis man markere stedet hvor billedet skal være så kan man finde omriset a billedet.. håber der er en der kan hjælpe med at få mine billeder vist på siden..her får i lige lidt kode at gå ud fra..
>>Index.php<<
<?
include("header.php");
$bamatree = new BamaTree($xoopsDB->prefix("bamagalerie_categorys"),"cid","scid");
if(isset($HTTP_GET_VARS['orderby'])) {
$orderby = convertorderbyin($HTTP_GET_VARS['orderby']);
} else {
$orderby = $galerieConfig['newimg_sort'];
}
$q = "SELECT cid, cname, img, coment, button FROM ".$xoopsDB->prefix("bamagalerie_categorys")." WHERE scid = 0 ORDER BY coment";
$result=$xoopsDB->query($q) or die("");
if($xoopsConfig['startpage'] == "bamagalerie"){
$xoopsOption['show_rblock'] =0;
include(XOOPS_ROOT_PATH."/header.php");
make_cblock();
}else{
$xoopsOption['show_rblock'] =0;
include(XOOPS_ROOT_PATH."/header.php");
}
OpenTable();
$mainlink = 0;
mainheader2($mainlink);
echo "<hr /><br>";
echo "<center>\n";
echo "<table border='0' cellspacing='0' cellpadding='5' width='100%'><tr>\n";
$count = 0;
while($myrow = $xoopsDB->fetchArray($result)) {
$cname = $bamats->makeTboxData4Show($myrow['cname']);
echo "<td valign='middle' align='center' width='30%'>";
if ($myrow['img']){
if ($galerieConfig['safe_mode'] == 0){
$imgurl = GAL_URL."/".$myrow['cname']."/bth-".$bamats->makeTboxData4Edit($myrow['img']);
$link = "<a href='".XOOPS_URL."/modules/bamagalerie/viewcat.php?cid=".$myrow['cid']."'>";
makeRahmen($link, $imgurl, GAL_PATH."/".$myrow['cname']."/bth-".$bamats->makeTboxData4Edit($myrow['img']));
}else{
$img_pfad = GAL_PATH."/".$myrow['cname']."/".$bamats->makeTboxData4Edit($myrow['img']);
makeRahmenFrame($img_pfad);
}
}else{
makeRahmen("", IMG_URL."/hase_cat.jpg", IMG_PATH."/hase_cat.jpg");
}
$totaldownload = getTotalItems($myrow['cid'], 1);
echo "</td><td valign='top' width='20%'>";
if ( $myrow['button'] == "" ){
if ($myrow['coment']==""){
echo "<a href='".XOOPS_URL."/modules/bamagalerie/viewcat.php?cid=".$myrow['cid']."'>".$myrow['cname']."</a> ($totaldownload)<br>";
}else{
echo "<a href='".XOOPS_URL."/modules/bamagalerie/viewcat.php?cid=".$myrow['cid']."'>".$myrow['coment']."</a> ($totaldownload)<br>";
}
}else{
echo "<a href='".XOOPS_URL."/modules/bamagalerie/viewcat.php?cid=".$myrow['cid']."'><img src='".IMG_URL."/button/".$myrow['button']."' border='0'></a> ($totaldownload)<br>";
}
$arr=array();
$bamatree = new BamaTree($xoopsDB->prefix("bamagalerie_categorys"),"cid","scid");
$arr=$bamatree->getFirstChild($myrow['cid'], "coment");
$space = 0;
$chcount = 0;
foreach($arr as $ele){
$chcname=$bamats->makeTboxData4Show($ele['coment']);
if ($chcount>4){
echo "<br> <a href='".XOOPS_URL."/modules/bamagalerie/viewcat.php?cid=".$myrow['cid']."'>"._MD_CAT_MOR." ...</a>";
break;
}
if ($space>0){
echo "<br>";
}
$result1 = $xoopsDB->query("SELECT button FROM ".$xoopsDB->prefix("bamagalerie_categorys")." WHERE cid = '".$ele['cid']."'");
list($button)=$xoopsDB->fetchRow($result1);
if ( $button == "" ){
echo " <a href='".XOOPS_URL."/modules/bamagalerie/viewcat.php?cid=".$ele['cid']."'>".$chcname."</a>";
}else{
echo " <a href='".XOOPS_URL."/modules/bamagalerie/viewcat.php?cid=".$ele['cid']."'><img src='".IMG_URL."/button/".$button."' border='0'></a>";
}
$space++;
$chcount++;
$result2 = $xoopsDB->query("SELECT cid FROM ".$xoopsDB->prefix("bamagalerie_categorys")." WHERE scid = '".$ele['cid']."'");
list($cid)=$xoopsDB->fetchRow($result2);
if ($cid > 0) {echo "<br> <a href='".XOOPS_URL."/modules/bamagalerie/viewcat.php?cid=".$ele['cid']."'>"._MD_CAT_MOR." ...</a>";}
}
if ($count<1) {
echo "</td>";
}
$count++;
if ($count==2) {
echo "</td></tr><tr>";
$count = 0;
}
}
if ( $count == 1){
echo "<td colspan='2'> </td></tr></table>";
}else{
echo "</tr></table>";
}
$numrows = BamaImg::countAllImg(array("free>'0' "));
echo "<br><br>";
printf(_MD_THEREARE,$numrows);
echo "</center>";
CloseTable();
if ( $galerieConfig['newimg'] >= 1 ){
echo "<br>";
OpenTable();
echo "<div align='center'><big><b>"._MD_LATESTLIST."</b></big><br>";
if( $galerieConfig['newimg'] > 1 ){
$orderbyTrans = convertorderbytrans($orderby);
echo "<br /><small><center>"._MD_SORTBY."
"._MD_TITLE." (<a href='index.php?orderby=titreA'><img src='images/up.gif' border='0' align='middle' alt='' /></a><a href='index.php?orderby=titreD'><img src='images/down.gif' border='0' align='middle' alt='' /></a>)
"._MD_DATE." (<a href='index.php?orderby=dateA'><img src='images/up.gif' border='0' align='middle' alt='' /></a><a href='index.php?orderby=dateD'><img src='images/down.gif' border='0' align='middle' alt='' /></a>)
"._MD_RATING." (<a href='index.php?orderby=ratingA'><img src='images/up.gif' border='0' align='middle' alt='' /></a><a href=index.php?orderby=ratingD><img src='images/down.gif' border='0' align='middle' alt='' /></a>)
"._MD_POPULARITY." (<a href='index.php?orderby=clicA'><img src='images/up.gif' border='0' align='middle' alt='' /></a><a href='index.php?orderby=clicD'><img src='images/down.gif' border='0' align='middle' alt='' /></a>)";
echo "<br /><b><small>";
printf(_MD_CURSORTBY,$orderbyTrans);
echo "</small></b><br /><br /></center>";
}else{
echo "<br>";
}
showNew();
echo "</div>";
CloseTable();
}
include(XOOPS_ROOT_PATH."/modules/bamagalerie/footer.php");
include(XOOPS_ROOT_PATH."/footer.php");
function showNew(){
global $bamats, $xoopsDB, $xoopsConfig, $xoopsModule, $orderby, $galerieConfig;
global $votum, $popdruck, $imgversand;
if ( $galerieConfig['imgfree']==1 ){$ing_conf="free>=1";}else{$ing_conf="free=1";}
$result = $xoopsDB->query("SELECT id, cid, nom, email, cname, titre, img, coment, clic, rating, vote, date FROM ".$xoopsDB->prefix("bamagalerie_img")." WHERE ".$ing_conf." ORDER BY ".$orderby."",$galerieConfig['newimg'],0);
echo "<table width='100%' cellspacing='0' cellpadding='10' border='0'>";
$x=0;
$b=1;
while(list($id, $cid, $nom, $email, $cname, $titre, $img, $coment, $clic, $rating, $vote, $date)=$xoopsDB->fetchRow($result)) {
$rating = number_format($rating, 2);
$cname = $bamats->makeTboxData4Show($cname);
$nom = $bamats->makeTboxData4Show($nom);
$titre = $bamats->makeTboxData4Show($titre);
$email = $bamats->makeTboxData4Show($email);
$clic = number_format($clic, 0);
$vote = number_format($vote, 0);
$img = $bamats->makeTboxData4Show($img);
$datetime = formatTimestamp($date,"s");
$coment = $bamats->makeTareaData4Show($coment,0);
include(XOOPS_ROOT_PATH."/modules/bamagalerie/template/img_format.php");
$x++;
}
echo "</table>";
}
?>
>>index.php slut<<
>>img.php<<
<?
include("../../mainfile.php");
if( !eregi( XOOPS_URL, $HTTP_REFERER) || $image == 0) {
echo "<table height='100%' width='100%' border='0' cellspacing='0' cellpadding='0' align='center' valign='middle'><tr>";
echo "<td align='center'><font size='2' color='#ff0000'><b>Selbst fotografieren macht Spass<br><br>(c) by ".XOOPS_URL."</b></font></td></tr></table>";
}else{
$result = $db->query("SELECT cname, img FROM ".$db->prefix("bamagalerie_img")." WHERE id=".$image."");
list($cname, $img)=$db->fetch_row($db->query("SELECT cname, img FROM ".$db->prefix("bamagalerie_img")." WHERE id=".$image.""));
$img_file = XOOPS_ROOT_PATH."/modules/bamagalerie/galerie/".$cname."/".$img;
if(file_exists($img_file)){
$size = getimagesize($img_file);
echo "<table border='0' cellspacing='0' cellpadding='0'><tr>";
echo "<td style='background-image:url(".XOOPS_URL."/modules/bamagalerie/galerie/".$cname."/".$img.")'>";
echo "<img src='".XOOPS_URL."/modules/bamagalerie/images/blank.gif' ".$size[3]." border='0'>";
echo "</td></tr></table>";
}else{
echo "Image nicht vorhanden";
}
}
?>
>>img.php slut<<
håber at der er en der kan finde fejlen.. for jeg kan ikke.. på forhånd tak..
Ps.: der kan muligvis blive tale om flere point hvis det er..