"24") { $filex=substr($file,0,22) . "->"; } echo " [$curimage, \"$file\", \"$filex\"],\n"; $curimage++; } } echo " [\"placeholder\"]\n"; closedir($handle); } return($files); } $photovar=$_GET['id']; if (!eregi("^[a-zA-Z0-9_]+$", $photovar)){ echo "alert(\"Photo Album ID must contain only letters, numbers, or underscore, and cannot start with a number\")"; die(); } echo "var $photovar={\n"; echo " baseurl: \"https://" . $_SERVER["SERVER_NAME"] . dirname($_SERVER['PHP_SELF']) . "/\",\n"; echo " images: [\n"; returnimages(); echo " ],\n"; echo " desc: []\n"; echo "}\n"; ?>