index.php 429 B

1234567891011121314151617
  1. <?php
  2. $topic = @$_GET['topic'];
  3. if (!preg_match('/^[a-z0-9_\-]+\z/', $topic))
  4. $topic = 'whatisinnosetup';
  5. $anchor = '#' . @$_GET['anchor'];
  6. if (!preg_match('/^#[a-zA-Z0-9_\-.]+\z/', $anchor))
  7. $anchor = '';
  8. $text = @file_get_contents('index.htm');
  9. if (!$text) die('Error reading file');
  10. $text = str_replace('topic_whatisinnosetup.htm', htmlspecialchars("topic_$topic.htm$anchor"), $text);
  11. echo $text;
  12. ?>