";
if(isset($_GET['rpd']) && intval($_GET['rpd']) > 0) {
$rid=intval($_GET['rpd']);
$cmd = "lynx -dump https://guap.ru/sveden/education/yearFiles?id=".$rid;
$proc = popen($cmd, 'r');
$re = ":sveden/$rid/.*\.pdf:";
$l = '';
while(!feof($proc)) {
$l .= fread($proc,4096);
}
fclose($proc);
foreach(explode("\n",$l) as $ll) {
if(preg_match($re,$ll)) {
$ll = preg_replace('/^\s*\d+\.\s*/','',$ll);
if(!preg_match(':/ann_:',$ll))
echo $ll,"
\n";
}
}
}
?>