| Current Path : /var/www/html/mmishra/mm/uprtou1/ |
| Current File : /var/www/html/mmishra/mm/uprtou1/gallery.php |
<?php
//checklogin($user);
$fname = $_REQUEST["fname"];
$no = $_REQUEST["no"];
if (!$no) $no = 1;
$i = 0;
$agPath = absolutePath($webid,'gallery');
$rgPath = relativePath($webid,'gallery');
if ($fname) shell_exec("rm -f {$agPath}/{$fname}");
$dh = opendir($agPath);
while (false !== ($filename = readdir($dh))) {
if (strlen($filename) > 2) {
$files[] = $filename;
$i++;
if ($user) {
//$xml .= "<photo imageurl='$rgPath/$filename' linkurl='$rgPath/$filename' showFlipButton='false'>
$xml .= "<photo imageurl='$rgPath/$filename' linkurl='$rgPath/$filename'>
<title>Image $i</title>
<description>UP Rajarshi Tandon Open University</description>
</photo>";
}
}
}
if ($user) {
$xml = "<tiltviewergallery><photos>$xml</photos></tiltviewergallery>";
generate_file("gallery.xml", $xml);
}
include "tiltview.inc";
/*
if ($no > $i) $no = 1;
$fname = $files[$no];
if (!$fname) $fname = $files[0];
echo "$fname ($no of $i photos)<center>
<img src='$rgPath/$fname' width='100%' height='400'></img><br>";
$no--;
if ($no > 0) echo "[ <a href='$PHP_SELF?conf=$conf&no=$no'>Prev</a> ]";
$no++; $no++;
if ($no <= $i) echo "[ <a href='$PHP_SELF?conf=$conf&no=$no'>Next</a> ]";
echo "</center>";
if ($user) {
$id = innerconf('upload');
echo "<div align='right'>
[ <a href='$PHP_SELF?conf={$id}&addto_gallery=1'>Add</a> |
<a href='$PHP_SELF?conf=$conf&action=remove&no=$no&fname=$fname'>Remove</a> ]
</div>";
}
*/
?>