coppermine-gallery.com/forum

Support => cpg1.3.x Support => Older/other versions => cpg1.3 (BBS) Integration / Bridging => Topic started by: bellimar on December 01, 2005, 01:51:12 PM

Title: Random photos module
Post by: bellimar on December 01, 2005, 01:51:12 PM
Hi,
What is wrong here bacuse in other album it works. Tell me what I do wrong. This is module random pics on main site.

<?php

/** ensure this file is being included by a parent file */
defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );


echo '<center>';
$ara1 = mysql_connect('localhost', '******', '*****')
   or die('Could not connect: ' . mysql_error());
mysql_select_db ('******');


$query = "SELECT * FROM `cpg135_albums` ORDER BY RAND() LIMIT 0,3";
$result = mysql_query($query);
while($r = mysql_fetch_array($result)) {


echo '<a href="http://www.galeria.arachnea.pl/displayimage.php?cat='.$r['category'].'" target="_blank"><img src="http://www.galeria.arachnea.pl/thumbnails.php?cat='.$r['pid'].'" alt="obrazek" class="bob"/></a><br/><br/>';
}

echo '</center>';
mysql_close($ara1);

?>
Title: Re: Random photos module
Post by: Joachim Müller on December 02, 2005, 09:02:15 AM
not sure what your question is - standalone coppermine doesn't come with "modules".