Размер файла: 1.04Kb
<?php
$fod=getcwd();
$fold=$fod."/inc/members";
chdir($fold);
$fo=opendir($fold);
while ($read=readdir($fo))
{
if(($read != ".") && ($read != ".."))
{
$note[]=$read;
$fnt = file("$read");
$notes[] = $fnt[0];
rsort($note);
}
}
chdir("../../");
closedir($fo);
$count_notes = count($notes);
if (isset($_GET['sid']))
{
$sid = htmlspecialchars(substr(trim($_GET['sid']), 0, 4));
include "./inc/code.php";
}
else {
?>
<p> </p><p> </p><center><form><input type="hidden" name="id" value="top"><input type="hidden" name="action" value="getcode"><b>Выберите ваш сайт :<br><select name="sid" style="width:460px">
<?php
echo $notes[0];
for ($j=0;$j<$count_notes;$j++) {
$record = explode("¤", trim($notes[$j]));
$st=substr($notes[$j],0,1);
if ($st != "*") {
echo "<option value=\"".$record[4]."\">";
echo substr(trim(substr($record[0], 7)),0,60)."</option>";
}
}
?>
</select><br><br>
<input type="submit" class=sb2 value="Получить код">
</form>
<? } ?>