$tip, $dir, $ind, $file
"; preg_match('/^[0-9a-z_]*$/', $ind) or die("User error: ind"); switch ($tip) { case 1: $ext = '.tex'; break; case 2: foreach (array('.gif', '.png') as $ext) { if (file_exists("$base/$dir/$file$ext")) break; } break; case 3: $ext = "$ind.html"; break; default: $ext = "$ind.html"; $tip = 4; break; } $filename = "$dir/$file$ext"; # print "FILENAME: $filename - REGEXP: $base/$filename - SUBJECT: " . realpath("$base/$filename") . " - P: " . realpath($dir) . "
\n"; # if (! preg_match("+^$base+", realpath("$base/$filename")) ) die("User error: dir + filename"); if (! file_exists("$base/$filename")) $tip = 4; if ($tip < 3) $kep_van[3-$tip] = 1; else $kep_van[3] = 0; $out .= ''."\n"; $out .= '