}
else if (isset($_REQUEST["NP"]))
{
- /* get +- 5 pics from ordered list to show next to a large image */
+ /* get +- 3 pics from ordered list to show next to a large image */
/* first create a temp table with all images and then use rowid to get +-5 images */
{
$ID=intval($_REQUEST["ID"]);
$result = $DB->query("SELECT * FROM NEXTPREV".
- " WHERE rowid > (select rowid from NEXTPREV where id=$ID) -5".
- " AND rowid < (select rowid from NEXTPREV where id=$ID) +5");
+ " WHERE rowid > (select rowid from NEXTPREV where id=$ID) -3".
+ " AND rowid < (select rowid from NEXTPREV where id=$ID) +3");
}
else
{
else if (isset($_REQUEST["ID"]) && !isset($_REQUEST["C"]))
{
$id = intval($_REQUEST["ID"]);
- $result = $DB->query("SELECT base_uri, filename, id FROM photos".
+ $result = $DB->query("SELECT base_uri, filename, id, description, time FROM photos".
" WHERE id=$id");
}
+ else if (isset($_REQUEST["IDT"]))
+ { /* tags of a single image */
+ $id = intval($_REQUEST["IDT"]);
+ $result = $DB->query("SELECT t.name as name FROM photo_tags pt ".
+ " LEFT JOIN tags t on t.id=pt.tag_id".
+ " WHERE pt.photo_id=$id");
+ }
else if (isset($_REQUEST["CLOUD"]))
{
$result = $DB->query("SELECT t.name as name, count(*) as count FROM photo_tags pt ".