Ok, i followed a tutorial somewhere (can't remember exactly where right now) that let me open directories, now, I need to get it to remove any folders with "admin" or "user" in the names. here's what i have so far.
<select name="theme" id="themeselect">
<?php
if ($handle2 = opendir('../design/templates/'))
{
while (false !== ($themedir = readdir($handle2)))
{
if ($themedir != "." && $themedir != ".." && $themedir != "%admin%" && $themedir != "%usercp%")
if($themedir != $_GET['theme'])
{
echo "<option name=\"theme\" value=\"$themedir\">$themedir</option>";
}
if($themedir == $_GET['theme'])
{
echo "<option name=\"theme\" value=\"$themedir\" selected=\"selected\">$themedir</option>";
}
}
closedir($handle2);
}
?></select>
Now, that although wrong, should give some idea of what i'm trying to do. Any ideas how i'd manage it?
Thanks in advance.