» » attachment

attachment

 attachment


:

:

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[] = "<span class=\"attachment\">{$lang['att_denied']}</span>";
$replace_2[] = "<span class=\"attachment\">{$lang['att_denied']}</span>";

} elseif( $config['files_count'] == 'yes' ) {

$replace_1[] = "<span class=\"attachment\"><a href=\"{$config['http_home_url']}engine/download.php?id={$row['id']}{$area}\" >{$row['name']}</a> [{$size}] ({$lang['att_dcount']} {$row['dcount']})</span>";
$replace_2[] = "<span class=\"attachment\"><a href=\"{$config['http_home_url']}engine/download.php?id={$row['id']}{$area}\" >\\1</a> [{$size}] ({$lang['att_dcount']} {$row['dcount']})</span>";

} else {

$replace_1[] = "<span class=\"attachment\"><a href=\"{$config['http_home_url']}engine/download.php?id={$row['id']}{$area}\" >{$row['name']}</a> [{$size}]</span>";
$replace_2[] = "<span class=\"attachment\"><a href=\"{$config['http_home_url']}engine/download.php?id={$row['id']}{$area}\" >\\1</a> [{$size}]</span>";

}

}


:

while ( $row = $db->get_row() ) {
$filego = ROOT_DIR . '/uploads/files/' . $row['onserver'];
$size = formatsize( @filesize( $filego) );
$md5 = md5_file($filego );
$sha1 = sha1_file($filego );
$crc32 = crc32($filego );
$row['name'] = explode( "/", $row['name'] );
$row['name'] = end( $row['name'] );

$path_info = pathinfo($filego);
$format = $path_info['extension'];

switch($format)
{
default: $icon = '{THEME}/dleimages/filetypes/blank.png'; break;
case 'doc': case 'docx': $icon = '{THEME}/dleimages/filetypes/word.png'; break;
case 'bmp': $icon = '{THEME}/dleimages/filetypes/bmp.png'; break;
case 'jpg': case 'jpeg': $icon = '{THEME}/dleimages/filetypes/jpg.png'; break;
case 'swf': $icon = '{THEME}/dleimages/filetypes/swf.png'; break;
case 'png': $icon = '{THEME}/dleimages/filetypes/png.png'; break;
case 'gif': $icon = '{THEME}/dleimages/filetypes/gif.png'; break;
case 'psd': $icon = '{THEME}/dleimages/filetypes/photoshop.png'; break;
case 'mp3': case 'wav': case 'ogg': $icon = '{THEME}/dleimages/filetypes/music.png'; break;
case 'avi': case 'flv': case 'wmv': $icon = '{THEME}/dleimages/filetypes/video.png'; break;
case 'pdf': $icon = '{THEME}/dleimages/filetypes/finerider.png'; break;
case 'exe': $icon = '{THEME}/dleimages/filetypes/exe.png'; break;
case 'txt': $icon = '{THEME}/dleimages/filetypes/txt.png'; break;
case 'phps': case 'php': $icon = '{THEME}/dleimages/filetypes/php.png'; break;
case 'html': case 'htm': $icon = '{THEME}/dleimages/filetypes/code.png'; break;
case 'rar': case 'zip':case '7z': $icon = '{THEME}/dleimages/filetypes/rar.png'; break;
}

$find_1[] = '[attachment=' . $row['id'] . ']';
$find_2[] = "#[attachment={$row['id']}:(.+?)]#i";

if ( ! $user_group[$member_id['user_group']]['allow_files'] ) {

$replace_1[] = "<span class=\"attachment\">{$lang['att_denied']}</span>";
$replace_2[] = "<span class=\"attachment\">{$lang['att_denied']}</span>";

} elseif( $config['files_count'] == 'yes' ) {

$replace_1[] = "<span class=\"attachment\"><img src=\"$icon\" alt=\"$format\" title=\"$format\" align=\"middle\"/> <a href=\"{$config['http_home_url']}engine/download.php?id={$row['id']}{$area}\" >{$row['name']}</a> [{$size}] ({$lang['att_dcount']} {$row['dcount']}) <br /> [<b>MD5:</b> {$md5}] <br /> [<b>SHA1:</b> {$sha1}] <br /> [<b>CRC32:</b> {$crc32}]</span>";
$replace_2[] = "<span class=\"attachment\"><img src=\"$icon\" alt=\"$format\" title=\"$format\" align=\"middle\"/> <a href=\"{$config['http_home_url']}engine/download.php?id={$row['id']}{$area}\" >1</a> [{$size}]({$lang['att_dcount']} {$row['dcount']}) <br /> [<b>MD5:</b> {$md5}] <br /> [<b>SHA1:</b> {$sha1}] <br /> [<b>CRC32:</b> {$crc32}]</span>";

} else {

$replace_1[] = "<span class=\"attachment\"><img src=\"$icon\" alt=\"$format\" title=\"$format\" align=\"middle\"/> <a href=\"{$config['http_home_url']}engine/download.php?id={$row['id']}{$area}\" >{$row['name']}</a> [{$size}] <br /> [<b>MD5:</b> {$md5}] <br /> [<b>SHA1:</b> {$sha1}] <br /> [<b>CRC32:</b> {$crc32}]</span>";
$replace_2[] = "<span class=\"attachment\"><img src=\"$icon\" alt=\"$format\" title=\"$format\" align=\"middle\"/> <a href=\"{$config['http_home_url']}engine/download.php?id={$row['id']}{$area}\" >1</a> [{$size}] <br /> [<b>MD5:</b> {$md5}] <br /> [<b>SHA1:</b> {$sha1}] <br /> [<b>CRC32:</b> {$crc32}]</span>";

}

}


:

po-images.rar [13,33 Kb] (c: 47)
[category=5]

dle attachment:

[/category] [category=4]

dle attachment:

[/category] [category=3]

dle attachment:

[/category] [category=2]

dle attachment:

[/category]

, , .

{topmodules}
{topthemes}

?

smile
fellow

File engine/modules/modweek.php not found.
File engine/modules/themeweek.php not found.
:
File engine/modules/lastcommentsb.php not found.
datalife engine: {referer}
Android, Attachment, centroarts, datalife, dle, Dle 9.3, engine, Final, Gmatist, KiberTemplate, nulled, release, Site, Test-Templates, Update, , , , , , , , , , , , , , , , , , , , , , , , ,