|
<?php
|
|
$i=intval($_GET['name'])+1;
|
|
require('init.php');
|
|
$result = mysql_query('SELECT * FROM photos WHERE id='.$i);
|
|
$row = mysql_fetch_assoc($result);
|
|
|
|
if(!row) die('Error');
|
|
|
|
header('Content-Type: text/xml');
|
|
echo '<?xml version="1.0" encoding="utf-8"?>';
|
|
?>
|
|
|
|
<data>
|
|
<name><?=$row['id']?>: <?=basename($row['photo_name'])?></name>
|
|
<desc xmlns="http://www.w3.org/1999/xhtml"><p><?=$row['description']?></p></desc>
|
|
<src><?=$row['photo_name']?></src>
|
|
<author><?=$row['author']?></author>
|
|
<?if($i==$count){?><last /><? } ?>
|
|
<?if($i==0){?><first /><? } ?>
|
|
</data>
|