Dear diary,
Today, I began to make a photo album of all of us. It's very exciting because I'm rediscovering old pictures, reminding me of a lot of memories... So I decided to share those with everyone!
//MYSQL_connect("localhost",root,'') or die(" Aïe! Impossible de se connecter à la base. Si le problème persiste, il faut contacter Axel (code d'erreur 405).");
MYSQL_connect("localhost","narudiary","keitarooo") or die(" Aïe! Impossible de se connecter à la base. Si le problème persiste, il faut contacter Axel (code d'erreur 405).");
@mysql_select_db("narudiary") or die(" Arg! Unable to select the database. If the problem persists, I should think of contacting Axel (error code 402).");
$myquery = "SELECT numpic FROM pics ORDER BY numpic DESC";
$queryresult = MYSQL_QUERY($myquery) or die(" Arg! Unable to execute the query. If the problem persists, I should think of contacting Axel (error code 412)");
$numrows = MYSQL_NUM_ROWS($queryresult);
$numentries = $numrows;
while ($numentries > 0) {
$numentries = ($numentries - 15);
$numpages = ($numpages + 1);
}
$index = $_GET[index];
if ($index=="") {$index="1";}
$pagedisplay2 = ($index+1);
$thepage = 0;
print "This is page $pagedisplay2 of the photo album. You can see the other pages here:
Pages: ";
while ($thepage < $numpages) {
$pagedisplay = ($thepage+1);
print " [$pagedisplay]";
$thepage++;
}
if ($index == "0") {$limit = 0;} else {$limit = ($index * 15);}
$myquery = "SELECT numpic, desceng, numtype FROM pics ORDER BY numpic DESC LIMIT $limit,15";
$queryresult = MYSQL_QUERY($myquery) or die(" Arg! Unable to execute the query. If the problem persists, I should contact Axel (error code 412)");
$numrows = MYSQL_NUM_ROWS($queryresult);
$i4=0;
while ($i4 < $numrows)
{
$numpic=mysql_result($queryresult,$i4,"numpic");
$desceng=mysql_result($queryresult,$i4,"desceng");
$numtype=mysql_result($queryresult,$i4,"numtype");
switch ($numtype)
{
case "1";
$ext = "jpg";
break;
case "2";
$ext = "gif";
break;
case "3";
$ext = "png";
break;
case "4";
$ext="bmp";
break;
}
$imgurl = "../images/galleries/$numpic.$ext";
$thumburl = "../images/galleries/$numpic"."t.$ext";
$imagesize = GetImageSize("$imgurl");
$imagebytes = filesize("$imgurl");
print "";
print " $imagesize[0] x $imagesize[1] $imagebytes bytes | ";
print "$desceng | ";
$i4++;
}
include ('../footer.inc');
?>
|