Revision 1797
Added by Luisehahne about 13 years ago
| browse.php | ||
|---|---|---|
| 17 | 17 |
|
| 18 | 18 |
// Create admin object |
| 19 | 19 |
require('../../config.php');
|
| 20 |
require_once(WB_PATH.'/framework/class.admin.php');
|
|
| 20 |
if(!class_exists('admin', false)){ include(WB_PATH.'/framework/class.admin.php'); }
|
|
| 21 | 21 |
$admin = new admin('Media', 'media', false);
|
| 22 | 22 |
|
| 23 | 23 |
$starttime = explode(" ", microtime());
|
| ... | ... | |
| 66 | 66 |
} |
| 67 | 67 |
} |
| 68 | 68 |
|
| 69 |
function ShowTip($name,$detail='') {
|
|
| 70 |
$parts = explode(".", $name);
|
|
| 71 |
$ext = strtolower(end($parts)); |
|
| 72 |
if (strpos('.gif.jpg.jpeg.png.bmp.',$ext) )
|
|
| 73 |
return 'onmouseover="overlib(\'<img src=\\\''.$name.'\\\' maxwidth=\\\'200\\\' maxheight=\\\'200\\\'>\',VAUTO, WIDTH)" onmouseout="nd()" ' ; |
|
| 74 |
else |
|
| 75 |
return ''; |
|
| 69 |
function ToolTip($name, $detail = '') |
|
| 70 |
{
|
|
| 71 |
// parse_str($name, $array); |
|
| 72 |
// $name = $array['img']; |
|
| 73 |
$parts = explode(".", $name);
|
|
| 74 |
$ext = strtolower( end($parts)); |
|
| 75 |
if (strpos('.gif.jpg.jpeg.png.bmp.', $ext))
|
|
| 76 |
{
|
|
| 77 |
$retVal = 'onmouseover="return overlib('.
|
|
| 78 |
'\'<img src=\\\''.($name).'\\\''. |
|
| 79 |
'maxwidth=\\\'300\\\' '. |
|
| 80 |
'maxheight=\\\'300\\\'>\','. |
|
| 81 |
// '>\','. |
|
| 82 |
'CAPTION,\''.basename($name).'\','. |
|
| 83 |
'FGCOLOR,\'#ffffff\','. |
|
| 84 |
'BGCOLOR,\'#557c9e\','. |
|
| 85 |
'BORDER,1,'. |
|
| 86 |
'FGCOLOR, \'#ffffff\','. |
|
| 87 |
'BGCOLOR,\'#557c9e\','. |
|
| 88 |
'CAPTIONSIZE,\'12px\','. |
|
| 89 |
'CLOSETEXT,\'X\','. |
|
| 90 |
'CLOSECOLOR,\'#ffffff\','. |
|
| 91 |
'CLOSESIZE,\'14px\','. |
|
| 92 |
'VAUTO,'. |
|
| 93 |
'HAUTO,'. |
|
| 94 |
''. |
|
| 95 |
'STICKY,'. |
|
| 96 |
'MOUSEOFF,'. |
|
| 97 |
'WRAP,'. |
|
| 98 |
'CELLPAD,5'. |
|
| 99 |
''. |
|
| 100 |
''. |
|
| 101 |
''. |
|
| 102 |
')" onmouseout="return nd()"'; |
|
| 103 |
return $retVal; |
|
| 104 |
// return ('onmouseover="return overlib(\'<img src=\\\''.($name).'\\\' maxwidth=\\\'600\\\' maxheight=\\\'600\\\'>\',BORDER,1,FGCOLOR, \'#ffffff\',VAUTO,WIDTH)" onmouseout="return nd()" ');
|
|
| 105 |
} else {
|
|
| 106 |
return ''; |
|
| 107 |
} |
|
| 76 | 108 |
} |
| 77 | 109 |
|
| 78 | 110 |
function fsize($size) {
|
| ... | ... | |
| 239 | 271 |
$info = getimagesize(WB_PATH.MEDIA_DIRECTORY.$directory.'/'.$name); |
| 240 | 272 |
if ($info[0]) {
|
| 241 | 273 |
$imgdetail = fsize(filesize(WB_PATH.MEDIA_DIRECTORY.$directory.'/'.$name)).'<br /> '.$info[0].' x '.$info[1].' px'; |
| 242 |
$icon = 'thumb.php?t=1&img='.$directory.'/'.$name;
|
|
| 243 |
$tooltip = ShowTip('thumb.php?t=2&img='.$directory.'/'.$name);
|
|
| 274 |
$icon = 'thumbs.php?t=1&img='.$directory.'/'.$name;
|
|
| 275 |
$tooltip = ToolTip('thumbs.php?t=2&img='.$directory.'/'.$name);
|
|
| 244 | 276 |
} |
| 245 | 277 |
} |
| 246 | 278 |
|
Also available in: Unified diff
+ add new image class to admin/media for better images preview