Hello, I am using a plugin which displays the last albums uploaded in the gallery on your website.
But it displays this following message:
Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/u467224226/public_html/galeria/api.php on line 11
Warning: mysql_connect(): Access denied for user 'u467224226_yjygu'@'10.1.2.19' (using password: YES) in /home/u467224226/public_html/galeria/api.php on line 11
Could not connect: Access denied for user 'u467224226_yjygu'@'10.1.2.19' (using password: YES)
Below, the following code. Can anyone save me?
<?php
require_once('include/config.inc.php');
header("Content-type: application/x-javascript");
$connect = mysql_connect($CONFIG['dbserver'],$CONFIG['dbuser'],$CONFIG['dbpass'])
or die('Erro ao conectar ao servidor');
$connect_db = mysql_select_db($CONFIG['dbname'], $connect)
or die ('Erro ao conectar ao banco de dados');
$resultado = mysql_query("SELECT * FROM `cpg_albums` ORDER BY `cpg_albums`.`aid` DESC LIMIT 0 , 4", $connect)
or die('Nenhum album encontrado com esta query');
echo 'document.write(\'';
if(mysql_num_rows($resultado) == 0){
echo 'Nenhum álbum cadastrado';
} else {
echo '<section id="ultimas_fotos"> ';
while($row = mysql_fetch_array($resultado)){
echo ' ';
$album_id = $row['aid'];
$subresult = mysql_query("SELECT * FROM `cpg_pictures` where aid=$album_id order by pid DESC LIMIT 0, 20");
if(mysql_num_rows($subresult) == 0){
$album_img = "
http://tisdalephotos.com/images/thumbs/thumb_nopic.png";
} else {
while($subrow = mysql_fetch_array($subresult)){
$album_img = "
http://tisdalephotos.com/albums/".$subrow['filepath'].'thumb_'.$subrow['filename'] .$subrow['datebrowse'];
}
}
echo '<div id="ultalb"><a href="
http://tisdalephotos.com/thumbnails.php?album='.$album_id.' "><img src="'.$album_img.'" alt="" /></a><div id="ultalbt"><a href="
http://tisdalephotos.com/thumbnails.php?album='.$album_id.' ">+</a></div></div>';
echo '';
}
}
echo '</tr></section>';
echo '\');';
?>