Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Random photos module  (Read 3906 times)

0 Members and 1 Guest are viewing this topic.

bellimar

  • Coppermine newbie
  • Offline Offline
  • Posts: 7
Random photos module
« 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);

?>
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Random photos module
« Reply #1 on: December 02, 2005, 09:02:15 am »

not sure what your question is - standalone coppermine doesn't come with "modules".
Logged
Pages: [1]   Go Up
 

Page created in 0.015 seconds with 15 queries.