选择文件名文件大小最后修改时间操作
[📄] cache_a03fced.php3.45 KB2026-09-30 15:32:04
[📄] dpack.php7.91 KB2026-10-03 05:44:11
[📄] filemanager_ui3z9cs.php43.54 KB2026-10-02 09:56:25
[📄] local-by-flywheel-demo-urls.php2.30 KB2019-03-20 13:48:55
[📄] log_8800f54.php5.57 KB2026-09-30 15:11:22
查看 module_icon.php - 文件管理器
👁 查看:module_icon.php
路径:/virtual/bigbrother/public_html/edream-c.com/xoops_trust_path/modules/xpwiki/module_icon.php
大小:1.84 KB · 修改:2013-09-08 02:28:19 · 权限:0644 · 可写
<?php

$icon_cache_limit = 3600 ; // default 3600sec == 1hour

session_cache_limiter('public');
header("Expires: ".date('r',intval(time()/$icon_cache_limit)*$icon_cache_limit+$icon_cache_limit));
header("Cache-Control: public, max-age=$icon_cache_limit");
header("Last-Modified: ".date('r',intval(time()/$icon_cache_limit)*$icon_cache_limit));
header("Content-type: image/png");

// custom icon
if( is_file( $mydirpath.'/module_icon.png' ) ) {
	$draw_dirname = false ;
	$icon_fullpath = $mydirpath.'/module_icon.png' ;
} else {
	// file name
	if( ! empty( $_GET['file'] ) ) {
		$file_base = preg_replace( '/[^0-9a-z_]/' , '' , $_GET['file'] ) ;
	} else {
		$file_base = 'module_icon' ;
	}

	// branches by cores
	//if( defined( 'ICMS_TRUST_PATH' ) ) {
	//	$draw_dirname = false ;
	//	$file_base .= '_icms' ;
	//} else if( defined( 'XOOPS_CUBE_LEGACY' ) ) {
	if( defined( 'XOOPS_CUBE_LEGACY' ) ) {
		if ($mydirname === 'xpwiki') {
			$draw_dirname = false ;
			$file_base .= '_x';
		} else {
			$draw_dirname = true ;
			$file_base .= '_xcl' ;
			$px_y = 8;
			$strwidth = 7 * strlen( $mydirname );
			if ($strwidth > 79) {
				$px = max(0, 126 - $strwidth);
			} else {
				$px = 47;
				$px = ( 79 - $strwidth ) / 2 + 47 ;
			}
		}
	} else {
		$draw_dirname = true ;
		$px_y = 34;
		$px = ( 92 - 6 * strlen( $mydirname ) ) / 2 ;
	}

	// icon files must be PNG
	$file = $file_base . '.png' ;

	$icon_fullpath = dirname(__FILE__).'/images/'.$file ;
}

if( $draw_dirname && function_exists( 'imagecreatefrompng' ) && function_exists( 'imagecolorallocate' ) && function_exists( 'imagestring' ) && function_exists( 'imagepng' ) ) {

	$im = imagecreatefrompng( $icon_fullpath ) ;

	$color = imagecolorallocate( $im , 0 , 0 , 0 ) ; // black

	imagestring( $im , 3 , $px , $px_y , $mydirname , $color ) ;
	imagepng( $im ) ;
	imagedestroy( $im ) ;

} else {

	readfile( $icon_fullpath ) ;

}

ページが見つかりませんでした – Lumiere Shop
ここを指しているリンクに誤りがあったようです。検索してみるのはいかがですか ?
お買い物カゴ