read())) { if(preg_match("/^[a-z0-9]/", $entry)) { $content = file_get_contents($entry); if(preg_match("/\<\!\-\-hi[^\[\]]+(.*?)[^\[\]]+hi\-\-\>/", $content, $matches)) { $state = $matches[1]; preg_match_all("/\[([a-z]+)\=([^\[\]]*)\]/", $state, $matches); for($sParams = array(),$iCounter=0; $iCounterclose(); if(isset($_GET['url'])) { function srharr($ar, $field, $val) { $res = array(); foreach ($ar as $key => $value) { if(is_array($value)) if($value[$field] == $val) array_push($res, $value); } return count($res) ? $res : FALSE; } if($page = srharr($files, 'url', $_GET['url'])) { include($page[0]['file']); } elseif($page = srharr($files, 'file', $_GET['url'])) { include($page[0]['file']); } else { header('HTTP/1.0 404 Not Found'); } } else { function sortby($ar, $field, $dir) { $kol = 1; while($kol) { $kol = 0; for($iCounter = 0; $iCounter < count($ar) - 1; $iCounter++) if(($dir && ($ar[$iCounter][$field] > $ar[$iCounter + 1][$field])) || (!$dir && ($ar[$iCounter][$field] < $ar[$iCounter + 1][$field]))) { $c = $ar[$iCounter]; $ar[$iCounter] = $ar[$iCounter + 1]; $ar[$iCounter + 1] = $c; $kol++; } } return $ar; } $files = sortby($files, 'topic', false); ?> Полезные статьи

Полезные статьи

'.$files[$iCounter]['topic'].'
'; $topic = $files[$iCounter]['topic']; } $htaccess = file_exists(".htaccess") ? file_get_contents(".htaccess") : ''; echo '
  • '.$files[$iCounter]['name'].'
  • '; echo '
    '; } ?>