2014-12-13, 02:44:46
This should work...
<?php
global $args;
$dir1=$args[0];
$dir=GSDATAUPLOADPATH.$args[0];
$files1 = scandir($dir);
$a=rand(2,count($files1)-1);
echo "<img src='".get_site_url(false)."data/uploads/".$dir1."/".$files1[$a]."' width='100%'>"
?>
<?php
global $args;
$dir1=$args[0];
$dir=GSDATAUPLOADPATH.$args[0];
$files1 = scandir($dir);
$a=rand(2,count($files1)-1);
echo "<img src='".get_site_url(false)."data/uploads/".$dir1."/".$files1[$a]."' width='100%'>"
?>