query( "SELECT id, name, onserver, dcount, news_id FROM " . PREFIX . "_static_files WHERE $where" ); $area = "&area=static"; } else { if( is_array( $id ) and count( $id ) ) $where = "news_id IN (" . implode( ",", $id ) . ")"; else $where = "news_id = '".intval($id)."'"; $db->query( "SELECT id, name, onserver, dcount, news_id 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'] ); $find_1[] = '[attachment=' . $row['id'] . ']'; $find_2[] = "#\[attachment={$row['id']}:(.+?)\]#i"; if ( ! $user_group[$member_id['user_group']]['allow_files'] ) { $replace_1[] = "{$lang['att_denied']}"; $replace_2[] = "{$lang['att_denied']}"; } elseif( $config['files_count'] == 'yes' ) { //////////////////////////////////////////// // Мой код //////////////////////////////////////////// if ($dclsconfig[vkl] == "on" ){ $fidname = '.dcls'; $proverka = strpos($row[onserver], $fidname); if ($proverka !== false) { if ( $dclsconfig[vkldcls] == "on" ) { $imyaDcls = $row['onserver']; $skachan = $row['dcount']; $linksilka = $row['id']; $linksilko = $config['http_home_url']; $sizeattach = $size ; $filenamet = $row['name'] ; $replace_1[] = vivodi2($imyaDcls, $skachan, $sizeattach, $linksilka, $linksilko, $filenamet) ; $replace_2[] = vivodi2($imyaDcls, $skachan, $sizeattach, $linksilka, $linksilko, $filenamet) ; } else { $replace_1[] = "{$row['name']} [{$size}] ({$lang['att_dcount']} {$row['dcount']})"; $replace_2[] = "\\1 [{$size}] ({$lang['att_dcount']} {$row['dcount']})"; } } else { if ($dclsconfig[vkltor] == "on") { $fidname = '.torrent'; $proverka = strpos($row[onserver], $fidname); if ($proverka !== false) { if ( $dclsconfig[fullnews] == "" ) { /// работа с торрен файлами require_once ENGINE_DIR.'/modules/torrent/torrent.php'; $onserver = $row['onserver']; $rid = $row['id']; $dcount = $row['dcount']; $name = $row['name']; $link = fullnewstor($onserver, $id, $rid, $dcount, $name); $replace_1[] = $link ; $replace_2[] = $link ; } else { $replace_1[] = ""; $replace_2[] = ""; } } else { $replace_1[] = "{$row['name']} [{$size}] ({$lang['att_dcount']} {$row['dcount']})"; $replace_2[] = "\\1 [{$size}] ({$lang['att_dcount']} {$row['dcount']})"; } } else { $replace_1[] = "{$row['name']} [{$size}] ({$lang['att_dcount']} {$row['dcount']})"; $replace_2[] = "\\1 [{$size}] ({$lang['att_dcount']} {$row['dcount']})"; } } /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// } else { $replace_1[] = "{$row['name']} [{$size}] ({$lang['att_dcount']} {$row['dcount']})"; $replace_2[] = "\\1 [{$size}] ({$lang['att_dcount']} {$row['dcount']})"; } } else { if ($dclsconfig[vkl] == "on") { $fidname ='.dcls'; $proverka = strpos($row[onserver], $fidname); if ($proverka !== false) { $imyaDcls = $row['onserver']; $skachan = $torrent_dcls[schetskachvikl]; $linksilka = $row['id']; $linksilko = $config['http_home_url']; $sizeattach = $size ; $filenamet = $row['name'] ; $replace_1[] = vivodi2($imyaDcls, $skachan, $sizeattach, $linksilka, $linksilko, $filenamet) ; $replace_2[] = vivodi2($imyaDcls, $skachan, $sizeattach, $linksilka, $linksilko, $filenamet) ; } else { $replace_1[] = "{$row['name']} [{$size}]"; $replace_2[] = "\\1 [{$size}]"; } }else { $replace_1[] = "{$row['name']} [{$size}]"; $replace_2[] = "\\1 [{$size}]"; } } //////////////////////////////////////// // Мой код //////////////////////////////////////// } $db->free(); $story = str_replace ( $find_1, $replace_1, $story); $story = preg_replace( $find_2, $replace_2, $story); return $story; } ?> Fatal error: Call to undefined function show_attach() in /var/www/main/data/www/zonagame.org/engine/modules/show.full.php on line 1209