- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
function f_includes(&$text){
//REPLACE FILE INCLUDES LINKS
$regex = '/{(ФАЙЛ=)\s*(.*?)}/i';
$matches = array();
preg_match_all( $regex, $text, $matches, PREG_SET_ORDER );
foreach ($matches as $elm) {
$elm[0] = str_replace('{', '', $elm[0]);
$elm[0] = str_replace('}', '', $elm[0]);
parse_str( $elm[0], $args );
$file=@$args['ФАЙЛ'];
if ($file){
$output = getLink($file);
} else { $output = ''; }
$text = str_replace('{ФАЙЛ='.$file.'}', $output, $text );
}
return true;
}
Что за п##дец. InstantCMS.
Комментарии (2) RSS