файл engine\\modules\\functions.phpПоказать / Скрыть текстfunction show_attach($story, $id, $static = false) { global $db, $config, $lang, $user_group, $member_id; if( $static ) { if( is_array( $id ) and count( $id ) ) $where = "static_id IN (" . implode( ",", $id ) . ")"; else $where = "static_id = '$id'"; $db->query( "SELECT id, name, onserver, dcount FROM " . PREFIX . "_static_files WHERE $where" ); $area = "&amp;area=static"; } else { if( is_array( $id ) and count( $id ) ) $where = "news_id IN (" . implode( ",", $id ) . ")"; else $where = "news_id = '$id'"; $db->query( "SELECT id, name, onserver, dcount FROM " . PREFIX . "_files WHERE $where" ); $area = ""; } while ( $row = $db->get_row() ) { $size = formatsize( @filesize( ROOT_DIR . '/uploads/files/' . $row['onserver'] ) ); $row['name'] = explode( "/", $row['name'] ); $row['name'] = end( $row['name'] ); if( ! $user_group[$member_id['user_group']]['allow_files'] ) { $link = "<span class="attachment">{$lang['att_denied']}</span>"; } elseif( $config['files_count'] == 'yes' ) { $link = "<span class="attachment"><a href="{$config['http_home_url']}download/index.php?{$row['id']}{$area}" >{$row['name']}</a> [{$size}] ({$lang['att_dcount']} {$row['dcount']})</span>"; } else { $link = "<span class="attachment"><a href="{$config['http_home_url']}download/index.php?{$row['id']}{$area}" >{$row['name']}</a> [{$size}]</span>"; } $story = str_replace( '[attachment=' . $row['id'] . ']', $link, $story ); } $db->free(); return $story;}файл engine\\classes\\parse.class.phpПоказать / Скрыть текст function build_url($url = array()) { global $config; $skip_it = 0; ................................................................................................ return "<a href=\"".$url['html']."\" ".$target.">".$show."</a>" . $url['end']; }